codexapp 0.1.4 → 0.1.8

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.
@@ -0,0 +1,48 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/**
2
+ * @vue/shared v3.5.28
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function Mo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const it={},fr=[],ln=()=>{},Ba=()=>!1,_s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Po=e=>e.startsWith("onUpdate:"),wt=Object.assign,No=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Uc=Object.prototype.hasOwnProperty,Qe=(e,t)=>Uc.call(e,t),je=Array.isArray,hr=e=>Jr(e)==="[object Map]",Fa=e=>Jr(e)==="[object Set]",fi=e=>Jr(e)==="[object Date]",Be=e=>typeof e=="function",pt=e=>typeof e=="string",Jt=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",Ha=e=>(Xe(e)||Be(e))&&Be(e.then)&&Be(e.catch),Ua=Object.prototype.toString,Jr=e=>Ua.call(e),Vc=e=>Jr(e).slice(8,-1),Va=e=>Jr(e)==="[object Object]",Oo=e=>pt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Pr=Mo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ks=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},qc=/-\w/g,Wt=ks(e=>e.replace(qc,t=>t.slice(1).toUpperCase())),Wc=/\B([A-Z])/g,Ln=ks(e=>e.replace(Wc,"-$1").toLowerCase()),Ts=ks(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ls=ks(e=>e?`on${Ts(e)}`:""),Pn=(e,t)=>!Object.is(e,t),as=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},qa=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},jo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Kc=e=>{const t=pt(e)?Number(e):NaN;return isNaN(t)?e:t};let hi;const Ss=()=>hi||(hi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function rr(e){if(je(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=pt(r)?Jc(r):rr(r);if(s)for(const o in s)t[o]=s[o]}return t}else if(pt(e)||Xe(e))return e}const Gc=/;(?![^(]*\))/g,zc=/:([^]+)/,Yc=/\/\*[^]*?\*\//g;function Jc(e){const t={};return e.replace(Yc,"").split(Gc).forEach(n=>{if(n){const r=n.split(zc);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function lt(e){let t="";if(pt(e))t=e;else if(je(e))for(let n=0;n<e.length;n++){const r=lt(e[n]);r&&(t+=r+" ")}else if(Xe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Qc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Xc=Mo(Qc);function Wa(e){return!!e||e===""}function Zc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Lo(e[r],t[r]);return n}function Lo(e,t){if(e===t)return!0;let n=fi(e),r=fi(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Jt(e),r=Jt(t),n||r)return e===t;if(n=je(e),r=je(t),n||r)return n&&r?Zc(e,t):!1;if(n=Xe(e),r=Xe(t),n||r){if(!n||!r)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const i in e){const a=e.hasOwnProperty(i),l=t.hasOwnProperty(i);if(a&&!l||!a&&l||!Lo(e[i],t[i]))return!1}}return String(e)===String(t)}const Ka=e=>!!(e&&e.__v_isRef===!0),ke=e=>pt(e)?e:e==null?"":je(e)||Xe(e)&&(e.toString===Ua||!Be(e.toString))?Ka(e)?ke(e.value):JSON.stringify(e,Ga,2):String(e),Ga=(e,t)=>Ka(t)?Ga(e,t.value):hr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],o)=>(n[Ds(r,o)+" =>"]=s,n),{})}:Fa(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ds(n))}:Jt(t)?Ds(t):Xe(t)&&!je(t)&&!Va(t)?String(t):t,Ds=(e,t="")=>{var n;return Jt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
+ * @vue/reactivity v3.5.28
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let Lt;class eu{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=Lt,!t&&Lt&&(this.index=(Lt.scopes||(Lt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Lt;try{return Lt=this,t()}finally{Lt=n}}}on(){++this._on===1&&(this.prevScope=Lt,Lt=this)}off(){this._on>0&&--this._on===0&&(Lt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function tu(){return Lt}let at;const Bs=new WeakSet;class za{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,Lt&&Lt.active&&Lt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Bs.has(this)&&(Bs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ja(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pi(this),Qa(this);const t=at,n=zt;at=this,zt=!0;try{return this.fn()}finally{Xa(this),at=t,zt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Fo(t);this.deps=this.depsTail=void 0,pi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Bs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){lo(this)&&this.run()}get dirty(){return lo(this)}}let Ya=0,Nr,Or;function Ja(e,t=!1){if(e.flags|=8,t){e.next=Or,Or=e;return}e.next=Nr,Nr=e}function Do(){Ya++}function Bo(){if(--Ya>0)return;if(Or){let t=Or;for(Or=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Nr;){let t=Nr;for(Nr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function Qa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Xa(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Fo(r),nu(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function lo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Za(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Za(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Hr)||(e.globalVersion=Hr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!lo(e))))return;e.flags|=2;const t=e.dep,n=at,r=zt;at=e,zt=!0;try{Qa(e);const s=e.fn(e._value);(t.version===0||Pn(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{at=n,zt=r,Xa(e),e.flags&=-3}}function Fo(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Fo(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function nu(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let zt=!0;const el=[];function yn(){el.push(zt),zt=!1}function wn(){const e=el.pop();zt=e===void 0?!0:e}function pi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=at;at=void 0;try{t()}finally{at=n}}}let Hr=0;class ru{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ho{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(!at||!zt||at===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==at)n=this.activeLink=new ru(at,this),at.deps?(n.prevDep=at.depsTail,at.depsTail.nextDep=n,at.depsTail=n):at.deps=at.depsTail=n,tl(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=at.depsTail,n.nextDep=void 0,at.depsTail.nextDep=n,at.depsTail=n,at.deps===n&&(at.deps=r)}return n}trigger(t){this.version++,Hr++,this.notify(t)}notify(t){Do();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Bo()}}}function tl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)tl(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const co=new WeakMap,tr=Symbol(""),uo=Symbol(""),Ur=Symbol("");function At(e,t,n){if(zt&&at){let r=co.get(e);r||co.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Ho),s.map=r,s.key=n),s.track()}}function mn(e,t,n,r,s,o){const i=co.get(e);if(!i){Hr++;return}const a=l=>{l&&l.trigger()};if(Do(),t==="clear")i.forEach(a);else{const l=je(e),d=l&&Oo(n);if(l&&n==="length"){const c=Number(r);i.forEach((f,g)=>{(g==="length"||g===Ur||!Jt(g)&&g>=c)&&a(f)})}else switch((n!==void 0||i.has(void 0))&&a(i.get(n)),d&&a(i.get(Ur)),t){case"add":l?d&&a(i.get("length")):(a(i.get(tr)),hr(e)&&a(i.get(uo)));break;case"delete":l||(a(i.get(tr)),hr(e)&&a(i.get(uo)));break;case"set":hr(e)&&a(i.get(tr));break}}Bo()}function ar(e){const t=Ye(e);return t===e?t:(At(t,"iterate",Ur),Vt(e)?t:t.map(Qt))}function xs(e){return At(e=Ye(e),"iterate",Ur),e}function In(e,t){return bn(e)?vr(nr(e)?Qt(t):t):Qt(t)}const su={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>In(this,e))},concat(...e){return ar(this).concat(...e.map(t=>je(t)?ar(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=In(this,e[1]),e))},every(e,t){return un(this,"every",e,t,void 0,arguments)},filter(e,t){return un(this,"filter",e,t,n=>n.map(r=>In(this,r)),arguments)},find(e,t){return un(this,"find",e,t,n=>In(this,n),arguments)},findIndex(e,t){return un(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return un(this,"findLast",e,t,n=>In(this,n),arguments)},findLastIndex(e,t){return un(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return un(this,"forEach",e,t,void 0,arguments)},includes(...e){return Hs(this,"includes",e)},indexOf(...e){return Hs(this,"indexOf",e)},join(e){return ar(this).join(e)},lastIndexOf(...e){return Hs(this,"lastIndexOf",e)},map(e,t){return un(this,"map",e,t,void 0,arguments)},pop(){return Cr(this,"pop")},push(...e){return Cr(this,"push",e)},reduce(e,...t){return mi(this,"reduce",e,t)},reduceRight(e,...t){return mi(this,"reduceRight",e,t)},shift(){return Cr(this,"shift")},some(e,t){return un(this,"some",e,t,void 0,arguments)},splice(...e){return Cr(this,"splice",e)},toReversed(){return ar(this).toReversed()},toSorted(e){return ar(this).toSorted(e)},toSpliced(...e){return ar(this).toSpliced(...e)},unshift(...e){return Cr(this,"unshift",e)},values(){return Fs(this,"values",e=>In(this,e))}};function Fs(e,t,n){const r=xs(e),s=r[t]();return r!==e&&!Vt(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const ou=Array.prototype;function un(e,t,n,r,s,o){const i=xs(e),a=i!==e&&!Vt(e),l=i[t];if(l!==ou[t]){const f=l.apply(e,o);return a?Qt(f):f}let d=n;i!==e&&(a?d=function(f,g){return n.call(this,In(e,f),g,e)}:n.length>2&&(d=function(f,g){return n.call(this,f,g,e)}));const c=l.call(i,d,r);return a&&s?s(c):c}function mi(e,t,n,r){const s=xs(e);let o=n;return s!==e&&(Vt(e)?n.length>3&&(o=function(i,a,l){return n.call(this,i,a,l,e)}):o=function(i,a,l){return n.call(this,i,In(e,a),l,e)}),s[t](o,...r)}function Hs(e,t,n){const r=Ye(e);At(r,"iterate",Ur);const s=r[t](...n);return(s===-1||s===!1)&&qo(n[0])?(n[0]=Ye(n[0]),r[t](...n)):s}function Cr(e,t,n=[]){yn(),Do();const r=Ye(e)[t].apply(e,n);return Bo(),wn(),r}const iu=Mo("__proto__,__v_isRef,__isVue"),nl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Jt));function au(e){Jt(e)||(e=String(e));const t=Ye(this);return At(t,"has",e),t.hasOwnProperty(e)}class rl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(s?o?vu:al:o?il:ol).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const i=je(t);if(!s){let l;if(i&&(l=su[n]))return l;if(n==="hasOwnProperty")return au}const a=Reflect.get(t,n,Rt(t)?t:r);if((Jt(n)?nl.has(n):iu(n))||(s||At(t,"get",n),o))return a;if(Rt(a)){const l=i&&Oo(n)?a:a.value;return s&&Xe(l)?ho(l):l}return Xe(a)?s?ho(a):Cs(a):a}}class sl extends rl{constructor(t=!1){super(!1,t)}set(t,n,r,s){let o=t[n];const i=je(t)&&Oo(n);if(!this._isShallow){const d=bn(o);if(!Vt(r)&&!bn(r)&&(o=Ye(o),r=Ye(r)),!i&&Rt(o)&&!Rt(r))return d||(o.value=r),!0}const a=i?Number(n)<t.length:Qe(t,n),l=Reflect.set(t,n,r,Rt(t)?t:s);return t===Ye(s)&&(a?Pn(r,o)&&mn(t,"set",n,r):mn(t,"add",n,r)),l}deleteProperty(t,n){const r=Qe(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&mn(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!Jt(n)||!nl.has(n))&&At(t,"has",n),r}ownKeys(t){return At(t,"iterate",je(t)?"length":tr),Reflect.ownKeys(t)}}class lu extends rl{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const cu=new sl,uu=new lu,du=new sl(!0);const fo=e=>e,es=e=>Reflect.getPrototypeOf(e);function fu(e,t,n){return function(...r){const s=this.__v_raw,o=Ye(s),i=hr(o),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,d=s[e](...r),c=n?fo:t?vr:Qt;return!t&&At(o,"iterate",l?uo:tr),wt(Object.create(d),{next(){const{value:f,done:g}=d.next();return g?{value:f,done:g}:{value:a?[c(f[0]),c(f[1])]:c(f),done:g}}})}}function ts(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function hu(e,t){const n={get(s){const o=this.__v_raw,i=Ye(o),a=Ye(s);e||(Pn(s,a)&&At(i,"get",s),At(i,"get",a));const{has:l}=es(i),d=t?fo:e?vr:Qt;if(l.call(i,s))return d(o.get(s));if(l.call(i,a))return d(o.get(a));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&At(Ye(s),"iterate",tr),s.size},has(s){const o=this.__v_raw,i=Ye(o),a=Ye(s);return e||(Pn(s,a)&&At(i,"has",s),At(i,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const i=this,a=i.__v_raw,l=Ye(a),d=t?fo:e?vr:Qt;return!e&&At(l,"iterate",tr),a.forEach((c,f)=>s.call(o,d(c),d(f),i))}};return wt(n,e?{add:ts("add"),set:ts("set"),delete:ts("delete"),clear:ts("clear")}:{add(s){!t&&!Vt(s)&&!bn(s)&&(s=Ye(s));const o=Ye(this);return es(o).has.call(o,s)||(o.add(s),mn(o,"add",s,s)),this},set(s,o){!t&&!Vt(o)&&!bn(o)&&(o=Ye(o));const i=Ye(this),{has:a,get:l}=es(i);let d=a.call(i,s);d||(s=Ye(s),d=a.call(i,s));const c=l.call(i,s);return i.set(s,o),d?Pn(o,c)&&mn(i,"set",s,o):mn(i,"add",s,o),this},delete(s){const o=Ye(this),{has:i,get:a}=es(o);let l=i.call(o,s);l||(s=Ye(s),l=i.call(o,s)),a&&a.call(o,s);const d=o.delete(s);return l&&mn(o,"delete",s,void 0),d},clear(){const s=Ye(this),o=s.size!==0,i=s.clear();return o&&mn(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=fu(s,e,t)}),n}function Uo(e,t){const n=hu(e,t);return(r,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Qe(n,s)&&s in r?n:r,s,o)}const pu={get:Uo(!1,!1)},mu={get:Uo(!1,!0)},gu={get:Uo(!0,!1)};const ol=new WeakMap,il=new WeakMap,al=new WeakMap,vu=new WeakMap;function yu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function wu(e){return e.__v_skip||!Object.isExtensible(e)?0:yu(Vc(e))}function Cs(e){return bn(e)?e:Vo(e,!1,cu,pu,ol)}function ll(e){return Vo(e,!1,du,mu,il)}function ho(e){return Vo(e,!0,uu,gu,al)}function Vo(e,t,n,r,s){if(!Xe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=wu(e);if(o===0)return e;const i=s.get(e);if(i)return i;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function nr(e){return bn(e)?nr(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Vt(e){return!!(e&&e.__v_isShallow)}function qo(e){return e?!!e.__v_raw:!1}function Ye(e){const t=e&&e.__v_raw;return t?Ye(t):e}function bu(e){return!Qe(e,"__v_skip")&&Object.isExtensible(e)&&qa(e,"__v_skip",!0),e}const Qt=e=>Xe(e)?Cs(e):e,vr=e=>Xe(e)?ho(e):e;function Rt(e){return e?e.__v_isRef===!0:!1}function H(e){return cl(e,!1)}function _u(e){return cl(e,!0)}function cl(e,t){return Rt(e)?e:new ku(e,t)}class ku{constructor(t,n){this.dep=new Ho,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ye(t),this._value=n?t:Qt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Vt(t)||bn(t);t=r?t:Ye(t),Pn(t,n)&&(this._rawValue=t,this._value=r?t:Qt(t),this.dep.trigger())}}function Ne(e){return Rt(e)?e.value:e}const Tu={get:(e,t,n)=>t==="__v_raw"?e:Ne(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Rt(s)&&!Rt(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function ul(e){return nr(e)?e:new Proxy(e,Tu)}class Su{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ho(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Hr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&at!==this)return Ja(this,!0),!0}get value(){const t=this.dep.track();return Za(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function xu(e,t,n=!1){let r,s;return Be(e)?r=e:(r=e.get,s=e.set),new Su(r,s,n)}const ns={},fs=new WeakMap;let Qn;function Cu(e,t=!1,n=Qn){if(n){let r=fs.get(n);r||fs.set(n,r=[]),r.push(e)}}function Au(e,t,n=it){const{immediate:r,deep:s,once:o,scheduler:i,augmentJob:a,call:l}=n,d=F=>s?F:Vt(F)||s===!1||s===0?gn(F,1):gn(F);let c,f,g,b,$=!1,A=!1;if(Rt(e)?(f=()=>e.value,$=Vt(e)):nr(e)?(f=()=>d(e),$=!0):je(e)?(A=!0,$=e.some(F=>nr(F)||Vt(F)),f=()=>e.map(F=>{if(Rt(F))return F.value;if(nr(F))return d(F);if(Be(F))return l?l(F,2):F()})):Be(e)?t?f=l?()=>l(e,2):e:f=()=>{if(g){yn();try{g()}finally{wn()}}const F=Qn;Qn=c;try{return l?l(e,3,[b]):e(b)}finally{Qn=F}}:f=ln,t&&s){const F=f,ae=s===!0?1/0:s;f=()=>gn(F(),ae)}const B=tu(),q=()=>{c.stop(),B&&B.active&&No(B.effects,c)};if(o&&t){const F=t;t=(...ae)=>{F(...ae),q()}}let M=A?new Array(e.length).fill(ns):ns;const V=F=>{if(!(!(c.flags&1)||!c.dirty&&!F))if(t){const ae=c.run();if(s||$||(A?ae.some((oe,le)=>Pn(oe,M[le])):Pn(ae,M))){g&&g();const oe=Qn;Qn=c;try{const le=[ae,M===ns?void 0:A&&M[0]===ns?[]:M,b];M=ae,l?l(t,3,le):t(...le)}finally{Qn=oe}}}else c.run()};return a&&a(V),c=new za(f),c.scheduler=i?()=>i(V,!1):V,b=F=>Cu(F,!1,c),g=c.onStop=()=>{const F=fs.get(c);if(F){if(l)l(F,4);else for(const ae of F)ae();fs.delete(c)}},t?r?V(!0):M=c.run():i?i(V.bind(null,!0),!0):c.run(),q.pause=c.pause.bind(c),q.resume=c.resume.bind(c),q.stop=q,q}function gn(e,t=1/0,n){if(t<=0||!Xe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Rt(e))gn(e.value,t,n);else if(je(e))for(let r=0;r<e.length;r++)gn(e[r],t,n);else if(Fa(e)||hr(e))e.forEach(r=>{gn(r,t,n)});else if(Va(e)){for(const r in e)gn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&gn(e[r],t,n)}return e}/**
10
+ * @vue/runtime-core v3.5.28
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function Qr(e,t,n,r){try{return r?e(...r):e()}catch(s){As(s,t,n)}}function Xt(e,t,n,r){if(Be(e)){const s=Qr(e,t,n,r);return s&&Ha(s)&&s.catch(o=>{As(o,t,n)}),s}if(je(e)){const s=[];for(let o=0;o<e.length;o++)s.push(Xt(e[o],t,n,r));return s}}function As(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||it;if(t){let a=t.parent;const l=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,l,d)===!1)return}a=a.parent}if(o){yn(),Qr(o,null,10,[e,l,d]),wn();return}}Eu(e,n,s,r,i)}function Eu(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const Ot=[];let rn=-1;const pr=[];let Rn=null,cr=0;const dl=Promise.resolve();let hs=null;function qt(e){const t=hs||dl;return e?t.then(this?e.bind(this):e):t}function Iu(e){let t=rn+1,n=Ot.length;for(;t<n;){const r=t+n>>>1,s=Ot[r],o=Vr(s);o<e||o===e&&s.flags&2?t=r+1:n=r}return t}function Wo(e){if(!(e.flags&1)){const t=Vr(e),n=Ot[Ot.length-1];!n||!(e.flags&2)&&t>=Vr(n)?Ot.push(e):Ot.splice(Iu(t),0,e),e.flags|=1,fl()}}function fl(){hs||(hs=dl.then(pl))}function Ru(e){je(e)?pr.push(...e):Rn&&e.id===-1?Rn.splice(cr+1,0,e):e.flags&1||(pr.push(e),e.flags|=1),fl()}function gi(e,t,n=rn+1){for(;n<Ot.length;n++){const r=Ot[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Ot.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function hl(e){if(pr.length){const t=[...new Set(pr)].sort((n,r)=>Vr(n)-Vr(r));if(pr.length=0,Rn){Rn.push(...t);return}for(Rn=t,cr=0;cr<Rn.length;cr++){const n=Rn[cr];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Rn=null,cr=0}}const Vr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function pl(e){try{for(rn=0;rn<Ot.length;rn++){const t=Ot[rn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Qr(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;rn<Ot.length;rn++){const t=Ot[rn];t&&(t.flags&=-2)}rn=-1,Ot.length=0,hl(),hs=null,(Ot.length||pr.length)&&pl()}}let _t=null,ml=null;function ps(e){const t=_t;return _t=e,ml=e&&e.type.__scopeId||null,t}function nt(e,t=_t,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&vs(-1);const o=ps(t);let i;try{i=e(...s)}finally{ps(o),r._d&&vs(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function Nn(e,t){if(_t===null)return e;const n=Ps(_t),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,i,a,l=it]=t[s];o&&(Be(o)&&(o={mounted:o,updated:o}),o.deep&&gn(i),r.push({dir:o,instance:n,value:i,oldValue:void 0,arg:a,modifiers:l}))}return e}function Kn(e,t,n,r){const s=e.dirs,o=t&&t.dirs;for(let i=0;i<s.length;i++){const a=s[i];o&&(a.oldValue=o[i].value);let l=a.dir[r];l&&(yn(),Xt(l,n,8,[e.el,a,e,t]),wn())}}function ls(e,t){if(It){let n=It.provides;const r=It.parent&&It.parent.provides;r===n&&(n=It.provides=Object.create(r)),n[e]=t}}function Yt(e,t,n=!1){const r=Jo();if(r||gr){let s=gr?gr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&Be(t)?t.call(r&&r.proxy):t}}const $u=Symbol.for("v-scx"),Mu=()=>Yt($u);function ft(e,t,n){return gl(e,t,n)}function gl(e,t,n=it){const{immediate:r,deep:s,flush:o,once:i}=n,a=wt({},n),l=t&&r||!t&&o!=="post";let d;if(Gr){if(o==="sync"){const b=Mu();d=b.__watcherHandles||(b.__watcherHandles=[])}else if(!l){const b=()=>{};return b.stop=ln,b.resume=ln,b.pause=ln,b}}const c=It;a.call=(b,$,A)=>Xt(b,c,$,A);let f=!1;o==="post"?a.scheduler=b=>{Ct(b,c&&c.suspense)}:o!=="sync"&&(f=!0,a.scheduler=(b,$)=>{$?b():Wo(b)}),a.augmentJob=b=>{t&&(b.flags|=4),f&&(b.flags|=2,c&&(b.id=c.uid,b.i=c))};const g=Au(e,t,a);return Gr&&(d?d.push(g):l&&g()),g}function Pu(e,t,n){const r=this.proxy,s=pt(e)?e.includes(".")?vl(r,e):()=>r[e]:e.bind(r,r);let o;Be(t)?o=t:(o=t.handler,n=t);const i=Xr(this),a=gl(s,o.bind(r),n);return i(),a}function vl(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const yl=Symbol("_vte"),wl=e=>e.__isTeleport,jr=e=>e&&(e.disabled||e.disabled===""),vi=e=>e&&(e.defer||e.defer===""),yi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,wi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,po=(e,t)=>{const n=e&&e.to;return pt(n)?t?t(n):null:n},bl={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,o,i,a,l,d){const{mc:c,pc:f,pbc:g,o:{insert:b,querySelector:$,createText:A,createComment:B}}=d,q=jr(t.props);let{shapeFlag:M,children:V,dynamicChildren:F}=t;if(e==null){const ae=t.el=A(""),oe=t.anchor=A("");b(ae,n,r),b(oe,n,r);const le=(re,te)=>{M&16&&c(V,re,te,s,o,i,a,l)},de=()=>{const re=t.target=po(t.props,$),te=mo(re,t,A,b);re&&(i!=="svg"&&yi(re)?i="svg":i!=="mathml"&&wi(re)&&(i="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(re),q||(le(re,te),cs(t,!1)))};q&&(le(n,oe),cs(t,!0)),vi(t.props)?(t.el.__isMounted=!1,Ct(()=>{de(),delete t.el.__isMounted},o)):de()}else{if(vi(t.props)&&e.el.__isMounted===!1){Ct(()=>{bl.process(e,t,n,r,s,o,i,a,l,d)},o);return}t.el=e.el,t.targetStart=e.targetStart;const ae=t.anchor=e.anchor,oe=t.target=e.target,le=t.targetAnchor=e.targetAnchor,de=jr(e.props),re=de?n:oe,te=de?ae:le;if(i==="svg"||yi(oe)?i="svg":(i==="mathml"||wi(oe))&&(i="mathml"),F?(g(e.dynamicChildren,F,re,s,o,i,a),zo(e,t,!0)):l||f(e,t,re,te,s,o,i,a,!1),q)de?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):rs(t,n,ae,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const fe=t.target=po(t.props,$);fe&&rs(t,fe,null,d,0)}else de&&rs(t,oe,le,d,1);cs(t,q)}},remove(e,t,n,{um:r,o:{remove:s}},o){const{shapeFlag:i,children:a,anchor:l,targetStart:d,targetAnchor:c,target:f,props:g}=e;if(f&&(s(d),s(c)),o&&s(l),i&16){const b=o||!jr(g);for(let $=0;$<a.length;$++){const A=a[$];r(A,t,n,b,!!A.dynamicChildren)}}},move:rs,hydrate:Nu};function rs(e,t,n,{o:{insert:r},m:s},o=2){o===0&&r(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:l,children:d,props:c}=e,f=o===2;if(f&&r(i,t,n),(!f||jr(c))&&l&16)for(let g=0;g<d.length;g++)s(d[g],t,n,2);f&&r(a,t,n)}function Nu(e,t,n,r,s,o,{o:{nextSibling:i,parentNode:a,querySelector:l,insert:d,createText:c}},f){function g(B,q){let M=q;for(;M;){if(M&&M.nodeType===8){if(M.data==="teleport start anchor")t.targetStart=M;else if(M.data==="teleport anchor"){t.targetAnchor=M,B._lpa=t.targetAnchor&&i(t.targetAnchor);break}}M=i(M)}}function b(B,q){q.anchor=f(i(B),q,a(B),n,r,s,o)}const $=t.target=po(t.props,l),A=jr(t.props);if($){const B=$._lpa||$.firstChild;t.shapeFlag&16&&(A?(b(e,t),g($,B),t.targetAnchor||mo($,t,c,d,a(e)===$?e:null)):(t.anchor=i(e),g($,B),t.targetAnchor||mo($,t,c,d),f(B&&i(B),t,$,n,r,s,o))),cs(t,A)}else A&&t.shapeFlag&16&&(b(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const _l=bl;function cs(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function mo(e,t,n,r,s=null){const o=t.targetStart=n(""),i=t.targetAnchor=n("");return o[yl]=i,e&&(r(o,e,s),r(i,e,s)),i}const sn=Symbol("_leaveCb"),Ar=Symbol("_enterCb");function Ou(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Dn(()=>{e.isMounted=!0}),Bn(()=>{e.isUnmounting=!0}),e}const Ut=[Function,Array],kl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ut,onEnter:Ut,onAfterEnter:Ut,onEnterCancelled:Ut,onBeforeLeave:Ut,onLeave:Ut,onAfterLeave:Ut,onLeaveCancelled:Ut,onBeforeAppear:Ut,onAppear:Ut,onAfterAppear:Ut,onAppearCancelled:Ut},Tl=e=>{const t=e.subTree;return t.component?Tl(t.component):t},ju={name:"BaseTransition",props:kl,setup(e,{slots:t}){const n=Jo(),r=Ou();return()=>{const s=t.default&&Cl(t.default(),!0);if(!s||!s.length)return;const o=Sl(s),i=Ye(e),{mode:a}=i;if(r.isLeaving)return Us(o);const l=bi(o);if(!l)return Us(o);let d=go(l,i,r,n,f=>d=f);l.type!==Et&&qr(l,d);let c=n.subTree&&bi(n.subTree);if(c&&c.type!==Et&&!Xn(c,l)&&Tl(n).type!==Et){let f=go(c,i,r,n);if(qr(c,f),a==="out-in"&&l.type!==Et)return r.isLeaving=!0,f.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,c=void 0},Us(o);a==="in-out"&&l.type!==Et?f.delayLeave=(g,b,$)=>{const A=xl(r,c);A[String(c.key)]=c,g[sn]=()=>{b(),g[sn]=void 0,delete d.delayedLeave,c=void 0},d.delayedLeave=()=>{$(),delete d.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return o}}};function Sl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Et){t=n;break}}return t}const Lu=ju;function xl(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function go(e,t,n,r,s){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:d,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:g,onLeave:b,onAfterLeave:$,onLeaveCancelled:A,onBeforeAppear:B,onAppear:q,onAfterAppear:M,onAppearCancelled:V}=t,F=String(e.key),ae=xl(n,e),oe=(re,te)=>{re&&Xt(re,r,9,te)},le=(re,te)=>{const fe=te[1];oe(re,te),je(re)?re.every(X=>X.length<=1)&&fe():re.length<=1&&fe()},de={mode:i,persisted:a,beforeEnter(re){let te=l;if(!n.isMounted)if(o)te=B||l;else return;re[sn]&&re[sn](!0);const fe=ae[F];fe&&Xn(e,fe)&&fe.el[sn]&&fe.el[sn](),oe(te,[re])},enter(re){let te=d,fe=c,X=f;if(!n.isMounted)if(o)te=q||d,fe=M||c,X=V||f;else return;let Me=!1;re[Ar]=Ze=>{Me||(Me=!0,Ze?oe(X,[re]):oe(fe,[re]),de.delayedLeave&&de.delayedLeave(),re[Ar]=void 0)};const We=re[Ar].bind(null,!1);te?le(te,[re,We]):We()},leave(re,te){const fe=String(e.key);if(re[Ar]&&re[Ar](!0),n.isUnmounting)return te();oe(g,[re]);let X=!1;re[sn]=We=>{X||(X=!0,te(),We?oe(A,[re]):oe($,[re]),re[sn]=void 0,ae[fe]===e&&delete ae[fe])};const Me=re[sn].bind(null,!1);ae[fe]=e,b?le(b,[re,Me]):Me()},clone(re){const te=go(re,t,n,r,s);return s&&s(te),te}};return de}function Us(e){if(Es(e))return e=On(e),e.children=null,e}function bi(e){if(!Es(e))return wl(e.type)&&e.children?Sl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Be(n.default))return n.default()}}function qr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,qr(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 Cl(e,t=!1,n){let r=[],s=0;for(let o=0;o<e.length;o++){let i=e[o];const a=n==null?i.key:String(n)+String(i.key!=null?i.key:o);i.type===De?(i.patchFlag&128&&s++,r=r.concat(Cl(i.children,t,a))):(t||i.type!==Et)&&r.push(a!=null?On(i,{key:a}):i)}if(s>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}function kt(e,t){return Be(e)?wt({name:e.name},t,{setup:e}):e}function Al(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function _i(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ms=new WeakMap;function Lr(e,t,n,r,s=!1){if(je(e)){e.forEach((A,B)=>Lr(A,t&&(je(t)?t[B]:t),n,r,s));return}if(mr(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Lr(e,t,n,r.component.subTree);return}const o=r.shapeFlag&4?Ps(r.component):r.el,i=s?null:o,{i:a,r:l}=e,d=t&&t.r,c=a.refs===it?a.refs={}:a.refs,f=a.setupState,g=Ye(f),b=f===it?Ba:A=>_i(c,A)?!1:Qe(g,A),$=(A,B)=>!(B&&_i(c,B));if(d!=null&&d!==l){if(ki(t),pt(d))c[d]=null,b(d)&&(f[d]=null);else if(Rt(d)){const A=t;$(d,A.k)&&(d.value=null),A.k&&(c[A.k]=null)}}if(Be(l))Qr(l,a,12,[i,c]);else{const A=pt(l),B=Rt(l);if(A||B){const q=()=>{if(e.f){const M=A?b(l)?f[l]:c[l]:$()||!e.k?l.value:c[e.k];if(s)je(M)&&No(M,o);else if(je(M))M.includes(o)||M.push(o);else if(A)c[l]=[o],b(l)&&(f[l]=c[l]);else{const V=[o];$(l,e.k)&&(l.value=V),e.k&&(c[e.k]=V)}}else A?(c[l]=i,b(l)&&(f[l]=i)):B&&($(l,e.k)&&(l.value=i),e.k&&(c[e.k]=i))};if(i){const M=()=>{q(),ms.delete(e)};M.id=-1,ms.set(e,M),Ct(M,n)}else ki(e),q()}}}function ki(e){const t=ms.get(e);t&&(t.flags|=8,ms.delete(e))}Ss().requestIdleCallback;Ss().cancelIdleCallback;const mr=e=>!!e.type.__asyncLoader,Es=e=>e.type.__isKeepAlive;function Du(e,t){El(e,"a",t)}function Bu(e,t){El(e,"da",t)}function El(e,t,n=It){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Is(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Es(s.parent.vnode)&&Fu(r,t,n,s),s=s.parent}}function Fu(e,t,n,r){const s=Is(t,e,r,!0);Rs(()=>{No(r[t],s)},n)}function Is(e,t,n=It,r=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{yn();const a=Xr(n),l=Xt(t,n,e,i);return a(),wn(),l});return r?s.unshift(o):s.push(o),o}}const _n=e=>(t,n=It)=>{(!Gr||e==="sp")&&Is(e,(...r)=>t(...r),n)},Hu=_n("bm"),Dn=_n("m"),Uu=_n("bu"),Vu=_n("u"),Bn=_n("bum"),Rs=_n("um"),qu=_n("sp"),Wu=_n("rtg"),Ku=_n("rtc");function Gu(e,t=It){Is("ec",e,t)}const zu="components",Il=Symbol.for("v-ndc");function Yu(e){return pt(e)?Ju(zu,e,!1)||e:e||Il}function Ju(e,t,n=!0,r=!1){const s=_t||It;if(s){const o=s.type;{const a=Od(o,!1);if(a&&(a===t||a===Wt(t)||a===Ts(Wt(t))))return o}const i=Ti(s[e]||o[e],t)||Ti(s.appContext[e],t);return!i&&r?o:i}}function Ti(e,t){return e&&(e[t]||e[Wt(t)]||e[Ts(Wt(t))])}function ht(e,t,n,r){let s;const o=n,i=je(e);if(i||pt(e)){const a=i&&nr(e);let l=!1,d=!1;a&&(l=!Vt(e),d=bn(e),e=xs(e)),s=new Array(e.length);for(let c=0,f=e.length;c<f;c++)s[c]=t(l?d?vr(Qt(e[c])):Qt(e[c]):e[c],c,void 0,o)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,o)}else if(Xe(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,o));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,d=a.length;l<d;l++){const c=a[l];s[l]=t(e[c],c,l,o)}}else s=[];return s}function an(e,t,n={},r,s){if(_t.ce||_t.parent&&mr(_t.parent)&&_t.parent.ce){const d=Object.keys(n).length>0;return t!=="default"&&(n.name=t),_(),ot(De,null,[Ee("slot",n,r)],d?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),_();const i=o&&Rl(o(n)),a=n.key||i&&i.key,l=ot(De,{key:(a&&!Jt(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||[],i&&e._===1?64:-2);return o&&o._c&&(o._d=!0),l}function Rl(e){return e.some(t=>Kr(t)?!(t.type===Et||t.type===De&&!Rl(t.children)):!0)?e:null}const vo=e=>e?Jl(e)?Ps(e):vo(e.parent):null,Dr=wt(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=>vo(e.parent),$root:e=>vo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ml(e),$forceUpdate:e=>e.f||(e.f=()=>{Wo(e.update)}),$nextTick:e=>e.n||(e.n=qt.bind(e.proxy)),$watch:e=>Pu.bind(e)}),Vs=(e,t)=>e!==it&&!e.__isScriptSetup&&Qe(e,t),Qu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:o,accessCache:i,type:a,appContext:l}=e;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(Vs(r,t))return i[t]=1,r[t];if(s!==it&&Qe(s,t))return i[t]=2,s[t];if(Qe(o,t))return i[t]=3,o[t];if(n!==it&&Qe(n,t))return i[t]=4,n[t];yo&&(i[t]=0)}}const d=Dr[t];let c,f;if(d)return t==="$attrs"&&At(e.attrs,"get",""),d(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==it&&Qe(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,Qe(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:o}=e;return Vs(s,t)?(s[t]=n,!0):r!==it&&Qe(r,t)?(r[t]=n,!0):Qe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,props:o,type:i}},a){let l;return!!(n[a]||e!==it&&a[0]!=="$"&&Qe(e,a)||Vs(t,a)||Qe(o,a)||Qe(r,a)||Qe(Dr,a)||Qe(s.config.globalProperties,a)||(l=i.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Qe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Xu(){return Zu().slots}function Zu(e){const t=Jo();return t.setupContext||(t.setupContext=Xl(t))}function Si(e){return je(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let yo=!0;function ed(e){const t=Ml(e),n=e.proxy,r=e.ctx;yo=!1,t.beforeCreate&&xi(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:l,inject:d,created:c,beforeMount:f,mounted:g,beforeUpdate:b,updated:$,activated:A,deactivated:B,beforeDestroy:q,beforeUnmount:M,destroyed:V,unmounted:F,render:ae,renderTracked:oe,renderTriggered:le,errorCaptured:de,serverPrefetch:re,expose:te,inheritAttrs:fe,components:X,directives:Me,filters:We}=t;if(d&&td(d,r,null),i)for(const Le in i){const Ie=i[Le];Be(Ie)&&(r[Le]=Ie.bind(n))}if(s){const Le=s.call(n,n);Xe(Le)&&(e.data=Cs(Le))}if(yo=!0,o)for(const Le in o){const Ie=o[Le],rt=Be(Ie)?Ie.bind(n,n):Be(Ie.get)?Ie.get.bind(n,n):ln,tt=!Be(Ie)&&Be(Ie.set)?Ie.set.bind(n):ln,et=ce({get:rt,set:tt});Object.defineProperty(r,Le,{enumerable:!0,configurable:!0,get:()=>et.value,set:qe=>et.value=qe})}if(a)for(const Le in a)$l(a[Le],r,n,Le);if(l){const Le=Be(l)?l.call(n):l;Reflect.ownKeys(Le).forEach(Ie=>{ls(Ie,Le[Ie])})}c&&xi(c,e,"c");function Se(Le,Ie){je(Ie)?Ie.forEach(rt=>Le(rt.bind(n))):Ie&&Le(Ie.bind(n))}if(Se(Hu,f),Se(Dn,g),Se(Uu,b),Se(Vu,$),Se(Du,A),Se(Bu,B),Se(Gu,de),Se(Ku,oe),Se(Wu,le),Se(Bn,M),Se(Rs,F),Se(qu,re),je(te))if(te.length){const Le=e.exposed||(e.exposed={});te.forEach(Ie=>{Object.defineProperty(Le,Ie,{get:()=>n[Ie],set:rt=>n[Ie]=rt,enumerable:!0})})}else e.exposed||(e.exposed={});ae&&e.render===ln&&(e.render=ae),fe!=null&&(e.inheritAttrs=fe),X&&(e.components=X),Me&&(e.directives=Me),re&&Al(e)}function td(e,t,n=ln){je(e)&&(e=wo(e));for(const r in e){const s=e[r];let o;Xe(s)?"default"in s?o=Yt(s.from||r,s.default,!0):o=Yt(s.from||r):o=Yt(s),Rt(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[r]=o}}function xi(e,t,n){Xt(je(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function $l(e,t,n,r){let s=r.includes(".")?vl(n,r):()=>n[r];if(pt(e)){const o=t[e];Be(o)&&ft(s,o)}else if(Be(e))ft(s,e.bind(n));else if(Xe(e))if(je(e))e.forEach(o=>$l(o,t,n,r));else{const o=Be(e.handler)?e.handler.bind(n):t[e.handler];Be(o)&&ft(s,o,e)}}function Ml(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(d=>gs(l,d,i,!0)),gs(l,t,i)),Xe(t)&&o.set(t,l),l}function gs(e,t,n,r=!1){const{mixins:s,extends:o}=t;o&&gs(e,o,n,!0),s&&s.forEach(i=>gs(e,i,n,!0));for(const i in t)if(!(r&&i==="expose")){const a=nd[i]||n&&n[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const nd={data:Ci,props:Ai,emits:Ai,methods:Mr,computed:Mr,beforeCreate:Pt,created:Pt,beforeMount:Pt,mounted:Pt,beforeUpdate:Pt,updated:Pt,beforeDestroy:Pt,beforeUnmount:Pt,destroyed:Pt,unmounted:Pt,activated:Pt,deactivated:Pt,errorCaptured:Pt,serverPrefetch:Pt,components:Mr,directives:Mr,watch:sd,provide:Ci,inject:rd};function Ci(e,t){return t?e?function(){return wt(Be(e)?e.call(this,this):e,Be(t)?t.call(this,this):t)}:t:e}function rd(e,t){return Mr(wo(e),wo(t))}function wo(e){if(je(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Pt(e,t){return e?[...new Set([].concat(e,t))]:t}function Mr(e,t){return e?wt(Object.create(null),e,t):t}function Ai(e,t){return e?je(e)&&je(t)?[...new Set([...e,...t])]:wt(Object.create(null),Si(e),Si(t??{})):t}function sd(e,t){if(!e)return t;if(!t)return e;const n=wt(Object.create(null),e);for(const r in t)n[r]=Pt(e[r],t[r]);return n}function Pl(){return{app:null,config:{isNativeTag:Ba,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 od=0;function id(e,t){return function(r,s=null){Be(r)||(r=wt({},r)),s!=null&&!Xe(s)&&(s=null);const o=Pl(),i=new WeakSet,a=[];let l=!1;const d=o.app={_uid:od++,_component:r,_props:s,_container:null,_context:o,_instance:null,version:Ld,get config(){return o.config},set config(c){},use(c,...f){return i.has(c)||(c&&Be(c.install)?(i.add(c),c.install(d,...f)):Be(c)&&(i.add(c),c(d,...f))),d},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),d},component(c,f){return f?(o.components[c]=f,d):o.components[c]},directive(c,f){return f?(o.directives[c]=f,d):o.directives[c]},mount(c,f,g){if(!l){const b=d._ceVNode||Ee(r,s);return b.appContext=o,g===!0?g="svg":g===!1&&(g=void 0),e(b,c,g),l=!0,d._container=c,c.__vue_app__=d,Ps(b.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Xt(a,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,f){return o.provides[c]=f,d},runWithContext(c){const f=gr;gr=d;try{return c()}finally{gr=f}}};return d}}let gr=null;const ad=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Wt(t)}Modifiers`]||e[`${Ln(t)}Modifiers`];function ld(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||it;let s=n;const o=t.startsWith("update:"),i=o&&ad(r,t.slice(7));i&&(i.trim&&(s=n.map(c=>pt(c)?c.trim():c)),i.number&&(s=n.map(jo)));let a,l=r[a=Ls(t)]||r[a=Ls(Wt(t))];!l&&o&&(l=r[a=Ls(Ln(t))]),l&&Xt(l,e,6,s);const d=r[a+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Xt(d,e,6,s)}}const cd=new WeakMap;function Nl(e,t,n=!1){const r=n?cd:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const o=e.emits;let i={},a=!1;if(!Be(e)){const l=d=>{const c=Nl(d,t,!0);c&&(a=!0,wt(i,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(Xe(e)&&r.set(e,null),null):(je(o)?o.forEach(l=>i[l]=null):wt(i,o),Xe(e)&&r.set(e,i),i)}function $s(e,t){return!e||!_s(t)?!1:(t=t.slice(2).replace(/Once$/,""),Qe(e,t[0].toLowerCase()+t.slice(1))||Qe(e,Ln(t))||Qe(e,t))}function Ei(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:l,render:d,renderCache:c,props:f,data:g,setupState:b,ctx:$,inheritAttrs:A}=e,B=ps(e);let q,M;try{if(n.shapeFlag&4){const F=s||r,ae=F;q=on(d.call(ae,F,c,f,b,g,$)),M=a}else{const F=t;q=on(F.length>1?F(f,{attrs:a,slots:i,emit:l}):F(f,null)),M=t.props?a:ud(a)}}catch(F){Br.length=0,As(F,e,1),q=Ee(Et)}let V=q;if(M&&A!==!1){const F=Object.keys(M),{shapeFlag:ae}=V;F.length&&ae&7&&(o&&F.some(Po)&&(M=dd(M,o)),V=On(V,M,!1,!0))}return n.dirs&&(V=On(V,null,!1,!0),V.dirs=V.dirs?V.dirs.concat(n.dirs):n.dirs),n.transition&&qr(V,n.transition),q=V,ps(B),q}const ud=e=>{let t;for(const n in e)(n==="class"||n==="style"||_s(n))&&((t||(t={}))[n]=e[n]);return t},dd=(e,t)=>{const n={};for(const r in e)(!Po(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function fd(e,t,n){const{props:r,children:s,component:o}=e,{props:i,children:a,patchFlag:l}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Ii(r,i,d):!!i;if(l&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const g=c[f];if(Ol(i,r,g)&&!$s(d,g))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===i?!1:r?i?Ii(r,i,d):!0:!!i;return!1}function Ii(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const o=r[s];if(Ol(t,e,o)&&!$s(n,o))return!0}return!1}function Ol(e,t,n){const r=e[n],s=t[n];return n==="style"&&Xe(r)&&Xe(s)?!Lo(r,s):r!==s}function hd({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const jl={},Ll=()=>Object.create(jl),Dl=e=>Object.getPrototypeOf(e)===jl;function pd(e,t,n,r=!1){const s={},o=Ll();e.propsDefaults=Object.create(null),Bl(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);n?e.props=r?s:ll(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function md(e,t,n,r){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=Ye(s),[l]=e.propsOptions;let d=!1;if((r||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let g=c[f];if($s(e.emitsOptions,g))continue;const b=t[g];if(l)if(Qe(o,g))b!==o[g]&&(o[g]=b,d=!0);else{const $=Wt(g);s[$]=bo(l,a,$,b,e,!1)}else b!==o[g]&&(o[g]=b,d=!0)}}}else{Bl(e,t,s,o)&&(d=!0);let c;for(const f in a)(!t||!Qe(t,f)&&((c=Ln(f))===f||!Qe(t,c)))&&(l?n&&(n[f]!==void 0||n[c]!==void 0)&&(s[f]=bo(l,a,f,void 0,e,!0)):delete s[f]);if(o!==a)for(const f in o)(!t||!Qe(t,f))&&(delete o[f],d=!0)}d&&mn(e.attrs,"set","")}function Bl(e,t,n,r){const[s,o]=e.propsOptions;let i=!1,a;if(t)for(let l in t){if(Pr(l))continue;const d=t[l];let c;s&&Qe(s,c=Wt(l))?!o||!o.includes(c)?n[c]=d:(a||(a={}))[c]=d:$s(e.emitsOptions,l)||(!(l in r)||d!==r[l])&&(r[l]=d,i=!0)}if(o){const l=Ye(n),d=a||it;for(let c=0;c<o.length;c++){const f=o[c];n[f]=bo(s,l,f,d[f],e,!Qe(d,f))}}return i}function bo(e,t,n,r,s,o){const i=e[n];if(i!=null){const a=Qe(i,"default");if(a&&r===void 0){const l=i.default;if(i.type!==Function&&!i.skipFactory&&Be(l)){const{propsDefaults:d}=s;if(n in d)r=d[n];else{const c=Xr(s);r=d[n]=l.call(null,t),c()}}else r=l;s.ce&&s.ce._setProp(n,r)}i[0]&&(o&&!a?r=!1:i[1]&&(r===""||r===Ln(n))&&(r=!0))}return r}const gd=new WeakMap;function Fl(e,t,n=!1){const r=n?gd:t.propsCache,s=r.get(e);if(s)return s;const o=e.props,i={},a=[];let l=!1;if(!Be(e)){const c=f=>{l=!0;const[g,b]=Fl(f,t,!0);wt(i,g),b&&a.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!l)return Xe(e)&&r.set(e,fr),fr;if(je(o))for(let c=0;c<o.length;c++){const f=Wt(o[c]);Ri(f)&&(i[f]=it)}else if(o)for(const c in o){const f=Wt(c);if(Ri(f)){const g=o[c],b=i[f]=je(g)||Be(g)?{type:g}:wt({},g),$=b.type;let A=!1,B=!0;if(je($))for(let q=0;q<$.length;++q){const M=$[q],V=Be(M)&&M.name;if(V==="Boolean"){A=!0;break}else V==="String"&&(B=!1)}else A=Be($)&&$.name==="Boolean";b[0]=A,b[1]=B,(A||Qe(b,"default"))&&a.push(f)}}const d=[i,a];return Xe(e)&&r.set(e,d),d}function Ri(e){return e[0]!=="$"&&!Pr(e)}const Ko=e=>e==="_"||e==="_ctx"||e==="$stable",Go=e=>je(e)?e.map(on):[on(e)],vd=(e,t,n)=>{if(t._n)return t;const r=nt((...s)=>Go(t(...s)),n);return r._c=!1,r},Hl=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Ko(s))continue;const o=e[s];if(Be(o))t[s]=vd(s,o,r);else if(o!=null){const i=Go(o);t[s]=()=>i}}},Ul=(e,t)=>{const n=Go(t);e.slots.default=()=>n},Vl=(e,t,n)=>{for(const r in t)(n||!Ko(r))&&(e[r]=t[r])},yd=(e,t,n)=>{const r=e.slots=Ll();if(e.vnode.shapeFlag&32){const s=t._;s?(Vl(r,t,n),n&&qa(r,"_",s,!0)):Hl(t,r)}else t&&Ul(e,t)},wd=(e,t,n)=>{const{vnode:r,slots:s}=e;let o=!0,i=it;if(r.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:Vl(s,t,n):(o=!t.$stable,Hl(t,s)),i=t}else t&&(Ul(e,t),i={default:1});if(o)for(const a in s)!Ko(a)&&i[a]==null&&delete s[a]},Ct=Sd;function bd(e){return _d(e)}function _d(e,t){const n=Ss();n.__VUE__=!0;const{insert:r,remove:s,patchProp:o,createElement:i,createText:a,createComment:l,setText:d,setElementText:c,parentNode:f,nextSibling:g,setScopeId:b=ln,insertStaticContent:$}=e,A=(p,v,x,L=null,U=null,O=null,ne=void 0,Z=null,Y=!!v.dynamicChildren)=>{if(p===v)return;p&&!Xn(p,v)&&(L=C(p),qe(p,U,O,!0),p=null),v.patchFlag===-2&&(Y=!1,v.dynamicChildren=null);const{type:W,ref:ie,shapeFlag:se}=v;switch(W){case Ms:B(p,v,x,L);break;case Et:q(p,v,x,L);break;case Ws:p==null&&M(v,x,L,ne);break;case De:X(p,v,x,L,U,O,ne,Z,Y);break;default:se&1?ae(p,v,x,L,U,O,ne,Z,Y):se&6?Me(p,v,x,L,U,O,ne,Z,Y):(se&64||se&128)&&W.process(p,v,x,L,U,O,ne,Z,Y,ye)}ie!=null&&U?Lr(ie,p&&p.ref,O,v||p,!v):ie==null&&p&&p.ref!=null&&Lr(p.ref,null,O,p,!0)},B=(p,v,x,L)=>{if(p==null)r(v.el=a(v.children),x,L);else{const U=v.el=p.el;v.children!==p.children&&d(U,v.children)}},q=(p,v,x,L)=>{p==null?r(v.el=l(v.children||""),x,L):v.el=p.el},M=(p,v,x,L)=>{[p.el,p.anchor]=$(p.children,v,x,L,p.el,p.anchor)},V=({el:p,anchor:v},x,L)=>{let U;for(;p&&p!==v;)U=g(p),r(p,x,L),p=U;r(v,x,L)},F=({el:p,anchor:v})=>{let x;for(;p&&p!==v;)x=g(p),s(p),p=x;s(v)},ae=(p,v,x,L,U,O,ne,Z,Y)=>{if(v.type==="svg"?ne="svg":v.type==="math"&&(ne="mathml"),p==null)oe(v,x,L,U,O,ne,Z,Y);else{const W=p.el&&p.el._isVueCE?p.el:null;try{W&&W._beginPatch(),re(p,v,U,O,ne,Z,Y)}finally{W&&W._endPatch()}}},oe=(p,v,x,L,U,O,ne,Z)=>{let Y,W;const{props:ie,shapeFlag:se,transition:we,dirs:Ce}=p;if(Y=p.el=i(p.type,O,ie&&ie.is,ie),se&8?c(Y,p.children):se&16&&de(p.children,Y,null,L,U,qs(p,O),ne,Z),Ce&&Kn(p,null,L,"created"),le(Y,p,p.scopeId,ne,L),ie){for(const Oe in ie)Oe!=="value"&&!Pr(Oe)&&o(Y,Oe,null,ie[Oe],O,L);"value"in ie&&o(Y,"value",null,ie.value,O),(W=ie.onVnodeBeforeMount)&&nn(W,L,p)}Ce&&Kn(p,null,L,"beforeMount");const $e=kd(U,we);$e&&we.beforeEnter(Y),r(Y,v,x),((W=ie&&ie.onVnodeMounted)||$e||Ce)&&Ct(()=>{W&&nn(W,L,p),$e&&we.enter(Y),Ce&&Kn(p,null,L,"mounted")},U)},le=(p,v,x,L,U)=>{if(x&&b(p,x),L)for(let O=0;O<L.length;O++)b(p,L[O]);if(U){let O=U.subTree;if(v===O||Kl(O.type)&&(O.ssContent===v||O.ssFallback===v)){const ne=U.vnode;le(p,ne,ne.scopeId,ne.slotScopeIds,U.parent)}}},de=(p,v,x,L,U,O,ne,Z,Y=0)=>{for(let W=Y;W<p.length;W++){const ie=p[W]=Z?pn(p[W]):on(p[W]);A(null,ie,v,x,L,U,O,ne,Z)}},re=(p,v,x,L,U,O,ne)=>{const Z=v.el=p.el;let{patchFlag:Y,dynamicChildren:W,dirs:ie}=v;Y|=p.patchFlag&16;const se=p.props||it,we=v.props||it;let Ce;if(x&&Gn(x,!1),(Ce=we.onVnodeBeforeUpdate)&&nn(Ce,x,v,p),ie&&Kn(v,p,x,"beforeUpdate"),x&&Gn(x,!0),(se.innerHTML&&we.innerHTML==null||se.textContent&&we.textContent==null)&&c(Z,""),W?te(p.dynamicChildren,W,Z,x,L,qs(v,U),O):ne||Ie(p,v,Z,null,x,L,qs(v,U),O,!1),Y>0){if(Y&16)fe(Z,se,we,x,U);else if(Y&2&&se.class!==we.class&&o(Z,"class",null,we.class,U),Y&4&&o(Z,"style",se.style,we.style,U),Y&8){const $e=v.dynamicProps;for(let Oe=0;Oe<$e.length;Oe++){const Fe=$e[Oe],Ue=se[Fe],N=we[Fe];(N!==Ue||Fe==="value")&&o(Z,Fe,Ue,N,U,x)}}Y&1&&p.children!==v.children&&c(Z,v.children)}else!ne&&W==null&&fe(Z,se,we,x,U);((Ce=we.onVnodeUpdated)||ie)&&Ct(()=>{Ce&&nn(Ce,x,v,p),ie&&Kn(v,p,x,"updated")},L)},te=(p,v,x,L,U,O,ne)=>{for(let Z=0;Z<v.length;Z++){const Y=p[Z],W=v[Z],ie=Y.el&&(Y.type===De||!Xn(Y,W)||Y.shapeFlag&198)?f(Y.el):x;A(Y,W,ie,null,L,U,O,ne,!0)}},fe=(p,v,x,L,U)=>{if(v!==x){if(v!==it)for(const O in v)!Pr(O)&&!(O in x)&&o(p,O,v[O],null,U,L);for(const O in x){if(Pr(O))continue;const ne=x[O],Z=v[O];ne!==Z&&O!=="value"&&o(p,O,Z,ne,U,L)}"value"in x&&o(p,"value",v.value,x.value,U)}},X=(p,v,x,L,U,O,ne,Z,Y)=>{const W=v.el=p?p.el:a(""),ie=v.anchor=p?p.anchor:a("");let{patchFlag:se,dynamicChildren:we,slotScopeIds:Ce}=v;Ce&&(Z=Z?Z.concat(Ce):Ce),p==null?(r(W,x,L),r(ie,x,L),de(v.children||[],x,ie,U,O,ne,Z,Y)):se>0&&se&64&&we&&p.dynamicChildren&&p.dynamicChildren.length===we.length?(te(p.dynamicChildren,we,x,U,O,ne,Z),(v.key!=null||U&&v===U.subTree)&&zo(p,v,!0)):Ie(p,v,x,ie,U,O,ne,Z,Y)},Me=(p,v,x,L,U,O,ne,Z,Y)=>{v.slotScopeIds=Z,p==null?v.shapeFlag&512?U.ctx.activate(v,x,L,ne,Y):We(v,x,L,U,O,ne,Y):Ze(p,v,Y)},We=(p,v,x,L,U,O,ne)=>{const Z=p.component=$d(p,L,U);if(Es(p)&&(Z.ctx.renderer=ye),Md(Z,!1,ne),Z.asyncDep){if(U&&U.registerDep(Z,Se,ne),!p.el){const Y=Z.subTree=Ee(Et);q(null,Y,v,x),p.placeholder=Y.el}}else Se(Z,p,v,x,U,O,ne)},Ze=(p,v,x)=>{const L=v.component=p.component;if(fd(p,v,x))if(L.asyncDep&&!L.asyncResolved){Le(L,v,x);return}else L.next=v,L.update();else v.el=p.el,L.vnode=v},Se=(p,v,x,L,U,O,ne)=>{const Z=()=>{if(p.isMounted){let{next:se,bu:we,u:Ce,parent:$e,vnode:Oe}=p;{const m=ql(p);if(m){se&&(se.el=Oe.el,Le(p,se,ne)),m.asyncDep.then(()=>{Ct(()=>{p.isUnmounted||W()},U)});return}}let Fe=se,Ue;Gn(p,!1),se?(se.el=Oe.el,Le(p,se,ne)):se=Oe,we&&as(we),(Ue=se.props&&se.props.onVnodeBeforeUpdate)&&nn(Ue,$e,se,Oe),Gn(p,!0);const N=Ei(p),K=p.subTree;p.subTree=N,A(K,N,f(K.el),C(K),p,U,O),se.el=N.el,Fe===null&&hd(p,N.el),Ce&&Ct(Ce,U),(Ue=se.props&&se.props.onVnodeUpdated)&&Ct(()=>nn(Ue,$e,se,Oe),U)}else{let se;const{el:we,props:Ce}=v,{bm:$e,m:Oe,parent:Fe,root:Ue,type:N}=p,K=mr(v);Gn(p,!1),$e&&as($e),!K&&(se=Ce&&Ce.onVnodeBeforeMount)&&nn(se,Fe,v),Gn(p,!0);{Ue.ce&&Ue.ce._hasShadowRoot()&&Ue.ce._injectChildStyle(N);const m=p.subTree=Ei(p);A(null,m,x,L,p,U,O),v.el=m.el}if(Oe&&Ct(Oe,U),!K&&(se=Ce&&Ce.onVnodeMounted)){const m=v;Ct(()=>nn(se,Fe,m),U)}(v.shapeFlag&256||Fe&&mr(Fe.vnode)&&Fe.vnode.shapeFlag&256)&&p.a&&Ct(p.a,U),p.isMounted=!0,v=x=L=null}};p.scope.on();const Y=p.effect=new za(Z);p.scope.off();const W=p.update=Y.run.bind(Y),ie=p.job=Y.runIfDirty.bind(Y);ie.i=p,ie.id=p.uid,Y.scheduler=()=>Wo(ie),Gn(p,!0),W()},Le=(p,v,x)=>{v.component=p;const L=p.vnode.props;p.vnode=v,p.next=null,md(p,v.props,L,x),wd(p,v.children,x),yn(),gi(p),wn()},Ie=(p,v,x,L,U,O,ne,Z,Y=!1)=>{const W=p&&p.children,ie=p?p.shapeFlag:0,se=v.children,{patchFlag:we,shapeFlag:Ce}=v;if(we>0){if(we&128){tt(W,se,x,L,U,O,ne,Z,Y);return}else if(we&256){rt(W,se,x,L,U,O,ne,Z,Y);return}}Ce&8?(ie&16&&he(W,U,O),se!==W&&c(x,se)):ie&16?Ce&16?tt(W,se,x,L,U,O,ne,Z,Y):he(W,U,O,!0):(ie&8&&c(x,""),Ce&16&&de(se,x,L,U,O,ne,Z,Y))},rt=(p,v,x,L,U,O,ne,Z,Y)=>{p=p||fr,v=v||fr;const W=p.length,ie=v.length,se=Math.min(W,ie);let we;for(we=0;we<se;we++){const Ce=v[we]=Y?pn(v[we]):on(v[we]);A(p[we],Ce,x,null,U,O,ne,Z,Y)}W>ie?he(p,U,O,!0,!1,se):de(v,x,L,U,O,ne,Z,Y,se)},tt=(p,v,x,L,U,O,ne,Z,Y)=>{let W=0;const ie=v.length;let se=p.length-1,we=ie-1;for(;W<=se&&W<=we;){const Ce=p[W],$e=v[W]=Y?pn(v[W]):on(v[W]);if(Xn(Ce,$e))A(Ce,$e,x,null,U,O,ne,Z,Y);else break;W++}for(;W<=se&&W<=we;){const Ce=p[se],$e=v[we]=Y?pn(v[we]):on(v[we]);if(Xn(Ce,$e))A(Ce,$e,x,null,U,O,ne,Z,Y);else break;se--,we--}if(W>se){if(W<=we){const Ce=we+1,$e=Ce<ie?v[Ce].el:L;for(;W<=we;)A(null,v[W]=Y?pn(v[W]):on(v[W]),x,$e,U,O,ne,Z,Y),W++}}else if(W>we)for(;W<=se;)qe(p[W],U,O,!0),W++;else{const Ce=W,$e=W,Oe=new Map;for(W=$e;W<=we;W++){const J=v[W]=Y?pn(v[W]):on(v[W]);J.key!=null&&Oe.set(J.key,W)}let Fe,Ue=0;const N=we-$e+1;let K=!1,m=0;const E=new Array(N);for(W=0;W<N;W++)E[W]=0;for(W=Ce;W<=se;W++){const J=p[W];if(Ue>=N){qe(J,U,O,!0);continue}let ge;if(J.key!=null)ge=Oe.get(J.key);else for(Fe=$e;Fe<=we;Fe++)if(E[Fe-$e]===0&&Xn(J,v[Fe])){ge=Fe;break}ge===void 0?qe(J,U,O,!0):(E[ge-$e]=W+1,ge>=m?m=ge:K=!0,A(J,v[ge],x,null,U,O,ne,Z,Y),Ue++)}const I=K?Td(E):fr;for(Fe=I.length-1,W=N-1;W>=0;W--){const J=$e+W,ge=v[J],Ae=v[J+1],ze=J+1<ie?Ae.el||Wl(Ae):L;E[W]===0?A(null,ge,x,ze,U,O,ne,Z,Y):K&&(Fe<0||W!==I[Fe]?et(ge,x,ze,2):Fe--)}}},et=(p,v,x,L,U=null)=>{const{el:O,type:ne,transition:Z,children:Y,shapeFlag:W}=p;if(W&6){et(p.component.subTree,v,x,L);return}if(W&128){p.suspense.move(v,x,L);return}if(W&64){ne.move(p,v,x,ye);return}if(ne===De){r(O,v,x);for(let se=0;se<Y.length;se++)et(Y[se],v,x,L);r(p.anchor,v,x);return}if(ne===Ws){V(p,v,x);return}if(L!==2&&W&1&&Z)if(L===0)Z.beforeEnter(O),r(O,v,x),Ct(()=>Z.enter(O),U);else{const{leave:se,delayLeave:we,afterLeave:Ce}=Z,$e=()=>{p.ctx.isUnmounted?s(O):r(O,v,x)},Oe=()=>{O._isLeaving&&O[sn](!0),se(O,()=>{$e(),Ce&&Ce()})};we?we(O,$e,Oe):Oe()}else r(O,v,x)},qe=(p,v,x,L=!1,U=!1)=>{const{type:O,props:ne,ref:Z,children:Y,dynamicChildren:W,shapeFlag:ie,patchFlag:se,dirs:we,cacheIndex:Ce}=p;if(se===-2&&(U=!1),Z!=null&&(yn(),Lr(Z,null,x,p,!0),wn()),Ce!=null&&(v.renderCache[Ce]=void 0),ie&256){v.ctx.deactivate(p);return}const $e=ie&1&&we,Oe=!mr(p);let Fe;if(Oe&&(Fe=ne&&ne.onVnodeBeforeUnmount)&&nn(Fe,v,p),ie&6)Te(p.component,x,L);else{if(ie&128){p.suspense.unmount(x,L);return}$e&&Kn(p,null,v,"beforeUnmount"),ie&64?p.type.remove(p,v,x,ye,L):W&&!W.hasOnce&&(O!==De||se>0&&se&64)?he(W,v,x,!1,!0):(O===De&&se&384||!U&&ie&16)&&he(Y,v,x),L&&ut(p)}(Oe&&(Fe=ne&&ne.onVnodeUnmounted)||$e)&&Ct(()=>{Fe&&nn(Fe,v,p),$e&&Kn(p,null,v,"unmounted")},x)},ut=p=>{const{type:v,el:x,anchor:L,transition:U}=p;if(v===De){ue(x,L);return}if(v===Ws){F(p);return}const O=()=>{s(x),U&&!U.persisted&&U.afterLeave&&U.afterLeave()};if(p.shapeFlag&1&&U&&!U.persisted){const{leave:ne,delayLeave:Z}=U,Y=()=>ne(x,O);Z?Z(p.el,O,Y):Y()}else O()},ue=(p,v)=>{let x;for(;p!==v;)x=g(p),s(p),p=x;s(v)},Te=(p,v,x)=>{const{bum:L,scope:U,job:O,subTree:ne,um:Z,m:Y,a:W}=p;$i(Y),$i(W),L&&as(L),U.stop(),O&&(O.flags|=8,qe(ne,p,v,x)),Z&&Ct(Z,v),Ct(()=>{p.isUnmounted=!0},v)},he=(p,v,x,L=!1,U=!1,O=0)=>{for(let ne=O;ne<p.length;ne++)qe(p[ne],v,x,L,U)},C=p=>{if(p.shapeFlag&6)return C(p.component.subTree);if(p.shapeFlag&128)return p.suspense.next();const v=g(p.anchor||p.el),x=v&&v[yl];return x?g(x):v};let z=!1;const ee=(p,v,x)=>{let L;p==null?v._vnode&&(qe(v._vnode,null,null,!0),L=v._vnode.component):A(v._vnode||null,p,v,null,null,null,x),v._vnode=p,z||(z=!0,gi(L),hl(),z=!1)},ye={p:A,um:qe,m:et,r:ut,mt:We,mc:de,pc:Ie,pbc:te,n:C,o:e};return{render:ee,hydrate:void 0,createApp:id(ee)}}function qs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Gn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function kd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function zo(e,t,n=!1){const r=e.children,s=t.children;if(je(r)&&je(s))for(let o=0;o<r.length;o++){const i=r[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=pn(s[o]),a.el=i.el),!n&&a.patchFlag!==-2&&zo(i,a)),a.type===Ms&&(a.patchFlag===-1&&(a=s[o]=pn(a)),a.el=i.el),a.type===Et&&!a.el&&(a.el=i.el)}}function Td(e){const t=e.slice(),n=[0];let r,s,o,i,a;const l=e.length;for(r=0;r<l;r++){const d=e[r];if(d!==0){if(s=n[n.length-1],e[s]<d){t[r]=s,n.push(r);continue}for(o=0,i=n.length-1;o<i;)a=o+i>>1,e[n[a]]<d?o=a+1:i=a;d<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function ql(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ql(t)}function $i(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Wl(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Wl(t.subTree):null}const Kl=e=>e.__isSuspense;function Sd(e,t){t&&t.pendingBranch?je(e)?t.effects.push(...e):t.effects.push(e):Ru(e)}const De=Symbol.for("v-fgt"),Ms=Symbol.for("v-txt"),Et=Symbol.for("v-cmt"),Ws=Symbol.for("v-stc"),Br=[];let Ft=null;function _(e=!1){Br.push(Ft=e?null:[])}function xd(){Br.pop(),Ft=Br[Br.length-1]||null}let Wr=1;function vs(e,t=!1){Wr+=e,e<0&&Ft&&t&&(Ft.hasOnce=!0)}function Gl(e){return e.dynamicChildren=Wr>0?Ft||fr:null,xd(),Wr>0&&Ft&&Ft.push(e),e}function S(e,t,n,r,s,o){return Gl(w(e,t,n,r,s,o,!0))}function ot(e,t,n,r,s){return Gl(Ee(e,t,n,r,s,!0))}function Kr(e){return e?e.__v_isVNode===!0:!1}function Xn(e,t){return e.type===t.type&&e.key===t.key}const zl=({key:e})=>e??null,us=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?pt(e)||Rt(e)||Be(e)?{i:_t,r:e,k:t,f:!!n}:e:null);function w(e,t=null,n=null,r=0,s=null,o=e===De?0:1,i=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&zl(t),ref:t&&us(t),scopeId:ml,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:_t};return a?(Yo(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=pt(n)?8:16),Wr>0&&!i&&Ft&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Ft.push(l),l}const Ee=Cd;function Cd(e,t=null,n=null,r=0,s=null,o=!1){if((!e||e===Il)&&(e=Et),Kr(e)){const a=On(e,t,!0);return n&&Yo(a,n),Wr>0&&!o&&Ft&&(a.shapeFlag&6?Ft[Ft.indexOf(e)]=a:Ft.push(a)),a.patchFlag=-2,a}if(jd(e)&&(e=e.__vccOpts),t){t=Ad(t);let{class:a,style:l}=t;a&&!pt(a)&&(t.class=lt(a)),Xe(l)&&(qo(l)&&!je(l)&&(l=wt({},l)),t.style=rr(l))}const i=pt(e)?1:Kl(e)?128:wl(e)?64:Xe(e)?4:Be(e)?2:0;return w(e,t,n,r,s,i,o,!0)}function Ad(e){return e?qo(e)||Dl(e)?wt({},e):e:null}function On(e,t,n=!1,r=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:l}=e,d=t?Yl(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&zl(d),ref:t&&t.ref?n&&o?je(o)?o.concat(us(t)):[o,us(t)]:us(t):o,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!==De?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&On(e.ssContent),ssFallback:e.ssFallback&&On(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&qr(c,l.clone(c)),c}function Ed(e=" ",t=0){return Ee(Ms,null,e,t)}function pe(e="",t=!1){return t?(_(),ot(Et,null,e)):Ee(Et,null,e)}function on(e){return e==null||typeof e=="boolean"?Ee(Et):je(e)?Ee(De,null,e.slice()):Kr(e)?pn(e):Ee(Ms,null,String(e))}function pn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:On(e)}function Yo(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(je(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),Yo(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!Dl(t)?t._ctx=_t:s===3&&_t&&(_t.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Be(t)?(t={default:t,_ctx:_t},n=32):(t=String(t),r&64?(n=16,t=[Ed(t)]):n=8);e.children=t,e.shapeFlag|=n}function Yl(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=lt([t.class,r.class]));else if(s==="style")t.style=rr([t.style,r.style]);else if(_s(s)){const o=t[s],i=r[s];i&&o!==i&&!(je(o)&&o.includes(i))&&(t[s]=o?[].concat(o,i):i)}else s!==""&&(t[s]=r[s])}return t}function nn(e,t,n,r=null){Xt(e,t,7,[n,r])}const Id=Pl();let Rd=0;function $d(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||Id,o={uid:Rd++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new eu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Fl(r,s),emitsOptions:Nl(r,s),emit:null,emitted:null,propsDefaults:it,inheritAttrs:r.inheritAttrs,ctx:it,data:it,props:it,attrs:it,slots:it,refs:it,setupState:it,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=ld.bind(null,o),e.ce&&e.ce(o),o}let It=null;const Jo=()=>It||_t;let ys,_o;{const e=Ss(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};ys=t("__VUE_INSTANCE_SETTERS__",n=>It=n),_o=t("__VUE_SSR_SETTERS__",n=>Gr=n)}const Xr=e=>{const t=It;return ys(e),e.scope.on(),()=>{e.scope.off(),ys(t)}},Mi=()=>{It&&It.scope.off(),ys(null)};function Jl(e){return e.vnode.shapeFlag&4}let Gr=!1;function Md(e,t=!1,n=!1){t&&_o(t);const{props:r,children:s}=e.vnode,o=Jl(e);pd(e,r,o,t),yd(e,s,n||t);const i=o?Pd(e,t):void 0;return t&&_o(!1),i}function Pd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Qu);const{setup:r}=n;if(r){yn();const s=e.setupContext=r.length>1?Xl(e):null,o=Xr(e),i=Qr(r,e,0,[e.props,s]),a=Ha(i);if(wn(),o(),(a||e.sp)&&!mr(e)&&Al(e),a){if(i.then(Mi,Mi),t)return i.then(l=>{Pi(e,l)}).catch(l=>{As(l,e,0)});e.asyncDep=i}else Pi(e,i)}else Ql(e)}function Pi(e,t,n){Be(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xe(t)&&(e.setupState=ul(t)),Ql(e)}function Ql(e,t,n){const r=e.type;e.render||(e.render=r.render||ln);{const s=Xr(e);yn();try{ed(e)}finally{wn(),s()}}}const Nd={get(e,t){return At(e,"get",""),e[t]}};function Xl(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Nd),slots:e.slots,emit:e.emit,expose:t}}function Ps(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ul(bu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Dr)return Dr[n](e)},has(t,n){return n in t||n in Dr}})):e.proxy}function Od(e,t=!0){return Be(e)?e.displayName||e.name:e.name||t&&e.__name}function jd(e){return Be(e)&&"__vccOpts"in e}const ce=(e,t)=>xu(e,t,Gr);function Qo(e,t,n){try{vs(-1);const r=arguments.length;return r===2?Xe(t)&&!je(t)?Kr(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Kr(n)&&(n=[n]),Ee(e,t,n))}finally{vs(1)}}const Ld="3.5.28";/**
14
+ * @vue/runtime-dom v3.5.28
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let ko;const Ni=typeof window<"u"&&window.trustedTypes;if(Ni)try{ko=Ni.createPolicy("vue",{createHTML:e=>e})}catch{}const Zl=ko?e=>ko.createHTML(e):e=>e,Dd="http://www.w3.org/2000/svg",Bd="http://www.w3.org/1998/Math/MathML",hn=typeof document<"u"?document:null,Oi=hn&&hn.createElement("template"),Fd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?hn.createElementNS(Dd,e):t==="mathml"?hn.createElementNS(Bd,e):n?hn.createElement(e,{is:n}):hn.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>hn.createTextNode(e),createComment:e=>hn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,o){const i=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{Oi.innerHTML=Zl(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Oi.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Cn="transition",Er="animation",zr=Symbol("_vtc"),ec={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Hd=wt({},kl,ec),Ud=e=>(e.displayName="Transition",e.props=Hd,e),Vd=Ud((e,{slots:t})=>Qo(Lu,qd(e),t)),zn=(e,t=[])=>{je(e)?e.forEach(n=>n(...t)):e&&e(...t)},ji=e=>e?je(e)?e.some(t=>t.length>1):e.length>1:!1;function qd(e){const t={};for(const X in e)X in ec||(t[X]=e[X]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:d=i,appearToClass:c=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:b=`${n}-leave-to`}=e,$=Wd(s),A=$&&$[0],B=$&&$[1],{onBeforeEnter:q,onEnter:M,onEnterCancelled:V,onLeave:F,onLeaveCancelled:ae,onBeforeAppear:oe=q,onAppear:le=M,onAppearCancelled:de=V}=t,re=(X,Me,We,Ze)=>{X._enterCancelled=Ze,Yn(X,Me?c:a),Yn(X,Me?d:i),We&&We()},te=(X,Me)=>{X._isLeaving=!1,Yn(X,f),Yn(X,b),Yn(X,g),Me&&Me()},fe=X=>(Me,We)=>{const Ze=X?le:M,Se=()=>re(Me,X,We);zn(Ze,[Me,Se]),Li(()=>{Yn(Me,X?l:o),dn(Me,X?c:a),ji(Ze)||Di(Me,r,A,Se)})};return wt(t,{onBeforeEnter(X){zn(q,[X]),dn(X,o),dn(X,i)},onBeforeAppear(X){zn(oe,[X]),dn(X,l),dn(X,d)},onEnter:fe(!1),onAppear:fe(!0),onLeave(X,Me){X._isLeaving=!0;const We=()=>te(X,Me);dn(X,f),X._enterCancelled?(dn(X,g),Hi(X)):(Hi(X),dn(X,g)),Li(()=>{X._isLeaving&&(Yn(X,f),dn(X,b),ji(F)||Di(X,r,B,We))}),zn(F,[X,We])},onEnterCancelled(X){re(X,!1,void 0,!0),zn(V,[X])},onAppearCancelled(X){re(X,!0,void 0,!0),zn(de,[X])},onLeaveCancelled(X){te(X),zn(ae,[X])}})}function Wd(e){if(e==null)return null;if(Xe(e))return[Ks(e.enter),Ks(e.leave)];{const t=Ks(e);return[t,t]}}function Ks(e){return Kc(e)}function dn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[zr]||(e[zr]=new Set)).add(t)}function Yn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[zr];n&&(n.delete(t),n.size||(e[zr]=void 0))}function Li(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Kd=0;function Di(e,t,n,r){const s=e._endId=++Kd,o=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:a,propCount:l}=Gd(e,t);if(!i)return r();const d=i+"end";let c=0;const f=()=>{e.removeEventListener(d,g),o()},g=b=>{b.target===e&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},a+1),e.addEventListener(d,g)}function Gd(e,t){const n=window.getComputedStyle(e),r=$=>(n[$]||"").split(", "),s=r(`${Cn}Delay`),o=r(`${Cn}Duration`),i=Bi(s,o),a=r(`${Er}Delay`),l=r(`${Er}Duration`),d=Bi(a,l);let c=null,f=0,g=0;t===Cn?i>0&&(c=Cn,f=i,g=o.length):t===Er?d>0&&(c=Er,f=d,g=l.length):(f=Math.max(i,d),c=f>0?i>d?Cn:Er:null,g=c?c===Cn?o.length:l.length:0);const b=c===Cn&&/\b(?:transform|all)(?:,|$)/.test(r(`${Cn}Property`).toString());return{type:c,timeout:f,propCount:g,hasTransform:b}}function Bi(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Fi(n)+Fi(e[r])))}function Fi(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Hi(e){return(e?e.ownerDocument:document).body.offsetHeight}function zd(e,t,n){const r=e[zr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ui=Symbol("_vod"),Yd=Symbol("_vsh"),Jd=Symbol(""),Qd=/(?:^|;)\s*display\s*:/;function Xd(e,t,n){const r=e.style,s=pt(n);let o=!1;if(n&&!s){if(t)if(pt(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();n[a]==null&&ds(r,a,"")}else for(const i in t)n[i]==null&&ds(r,i,"");for(const i in n)i==="display"&&(o=!0),ds(r,i,n[i])}else if(s){if(t!==n){const i=r[Jd];i&&(n+=";"+i),r.cssText=n,o=Qd.test(n)}}else t&&e.removeAttribute("style");Ui in e&&(e[Ui]=o?r.display:"",e[Yd]&&(r.display="none"))}const Vi=/\s*!important$/;function ds(e,t,n){if(je(n))n.forEach(r=>ds(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Zd(e,t);Vi.test(n)?e.setProperty(Ln(r),n.replace(Vi,""),"important"):e[r]=n}}const qi=["Webkit","Moz","ms"],Gs={};function Zd(e,t){const n=Gs[t];if(n)return n;let r=Wt(t);if(r!=="filter"&&r in e)return Gs[t]=r;r=Ts(r);for(let s=0;s<qi.length;s++){const o=qi[s]+r;if(o in e)return Gs[t]=o}return t}const Wi="http://www.w3.org/1999/xlink";function Ki(e,t,n,r,s,o=Xc(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Wi,t.slice(6,t.length)):e.setAttributeNS(Wi,t,n):n==null||o&&!Wa(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Jt(n)?String(n):n)}function Gi(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Zl(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Wa(n):n==null&&a==="string"?(n="",i=!0):a==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(s||t)}function ur(e,t,n,r){e.addEventListener(t,n,r)}function ef(e,t,n,r){e.removeEventListener(t,n,r)}const zi=Symbol("_vei");function tf(e,t,n,r,s=null){const o=e[zi]||(e[zi]={}),i=o[t];if(r&&i)i.value=r;else{const[a,l]=nf(t);if(r){const d=o[t]=of(r,s);ur(e,a,d,l)}else i&&(ef(e,a,i,l),o[t]=void 0)}}const Yi=/(?:Once|Passive|Capture)$/;function nf(e){let t;if(Yi.test(e)){t={};let r;for(;r=e.match(Yi);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ln(e.slice(2)),t]}let zs=0;const rf=Promise.resolve(),sf=()=>zs||(rf.then(()=>zs=0),zs=Date.now());function of(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Xt(af(r,n.value),t,5,[r])};return n.value=e,n.attached=sf(),n}function af(e,t){if(je(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Ji=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,lf=(e,t,n,r,s,o)=>{const i=s==="svg";t==="class"?zd(e,r,i):t==="style"?Xd(e,n,r):_s(t)?Po(t)||tf(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):cf(e,t,r,i))?(Gi(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ki(e,t,r,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!pt(r))?Gi(e,Wt(t),r,o,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Ki(e,t,r,i))};function cf(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ji(t)&&Be(n));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 s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Ji(t)&&pt(n)?!1:t in e}const Qi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return je(t)?n=>as(t,n):t};function uf(e){e.target.composing=!0}function Xi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ys=Symbol("_assign");function Zi(e,t,n){return t&&(e=e.trim()),n&&(e=jo(e)),e}const jn={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Ys]=Qi(s);const o=r||s.props&&s.props.type==="number";ur(e,t?"change":"input",i=>{i.target.composing||e[Ys](Zi(e.value,n,o))}),(n||o)&&ur(e,"change",()=>{e.value=Zi(e.value,n,o)}),t||(ur(e,"compositionstart",uf),ur(e,"compositionend",Xi),ur(e,"change",Xi))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:o}},i){if(e[Ys]=Qi(i),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?jo(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},df=["ctrl","shift","alt","meta"],ff={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>df.some(n=>e[`${n}Key`]&&!t.includes(n))},ct=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((s,...o)=>{for(let i=0;i<t.length;i++){const a=ff[t[i]];if(a&&a(s,t))return}return e(s,...o)}))},hf={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ht=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;const o=Ln(s.key);if(t.some(i=>i===o||hf[i]===o))return e(s)}))},pf=wt({patchProp:lf},Fd);let ea;function mf(){return ea||(ea=bd(pf))}const gf=((...e)=>{const t=mf().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=yf(r);if(!s)return;const o=t._component;!Be(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=n(s,!1,vf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t});function vf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function yf(e){return pt(e)?document.querySelector(e):e}/*!
18
+ * vue-router v4.6.4
19
+ * (c) 2025 Eduardo San Martin Morote
20
+ * @license MIT
21
+ */const dr=typeof document<"u";function tc(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function wf(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&tc(e.default)}const Je=Object.assign;function Js(e,t){const n={};for(const r in t){const s=t[r];n[r]=Zt(s)?s.map(e):e(s)}return n}const Fr=()=>{},Zt=Array.isArray;function ta(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const nc=/#/g,bf=/&/g,_f=/\//g,kf=/=/g,Tf=/\?/g,rc=/\+/g,Sf=/%5B/g,xf=/%5D/g,sc=/%5E/g,Cf=/%60/g,oc=/%7B/g,Af=/%7C/g,ic=/%7D/g,Ef=/%20/g;function Xo(e){return e==null?"":encodeURI(""+e).replace(Af,"|").replace(Sf,"[").replace(xf,"]")}function If(e){return Xo(e).replace(oc,"{").replace(ic,"}").replace(sc,"^")}function To(e){return Xo(e).replace(rc,"%2B").replace(Ef,"+").replace(nc,"%23").replace(bf,"%26").replace(Cf,"`").replace(oc,"{").replace(ic,"}").replace(sc,"^")}function Rf(e){return To(e).replace(kf,"%3D")}function $f(e){return Xo(e).replace(nc,"%23").replace(Tf,"%3F")}function Mf(e){return $f(e).replace(_f,"%2F")}function Yr(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Pf=/\/$/,Nf=e=>e.replace(Pf,"");function Qs(e,t,n="/"){let r,s={},o="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(r=t.slice(0,l),o=t.slice(l,a>0?a:t.length),s=e(o.slice(1))),a>=0&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=Df(r??t,n),{fullPath:r+o+i,path:r,query:s,hash:Yr(i)}}function Of(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function na(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function jf(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&yr(t.matched[r],n.matched[s])&&ac(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function yr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ac(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Lf(e[n],t[n]))return!1;return!0}function Lf(e,t){return Zt(e)?ra(e,t):Zt(t)?ra(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function ra(e,t){return Zt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Df(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,i,a;for(i=0;i<r.length;i++)if(a=r[i],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(i).join("/")}const An={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let So=(function(e){return e.pop="pop",e.push="push",e})({}),Xs=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Bf(e){if(!e)if(dr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Nf(e)}const Ff=/^[^#]+#/;function Hf(e,t){return e.replace(Ff,"#")+t}function Uf(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Ns=()=>({left:window.scrollX,top:window.scrollY});function Vf(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=Uf(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function sa(e,t){return(history.state?history.state.position-t:-1)+e}const xo=new Map;function qf(e,t){xo.set(e,t)}function Wf(e){const t=xo.get(e);return xo.delete(e),t}function Kf(e){return typeof e=="string"||e&&typeof e=="object"}function lc(e){return typeof e=="string"||typeof e=="symbol"}let mt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const cc=Symbol("");mt.MATCHER_NOT_FOUND+"",mt.NAVIGATION_GUARD_REDIRECT+"",mt.NAVIGATION_ABORTED+"",mt.NAVIGATION_CANCELLED+"",mt.NAVIGATION_DUPLICATED+"";function wr(e,t){return Je(new Error,{type:e,[cc]:!0},t)}function fn(e,t){return e instanceof Error&&cc in e&&(t==null||!!(e.type&t))}const Gf=["params","query","hash"];function zf(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Gf)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Yf(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(rc," "),o=s.indexOf("="),i=Yr(o<0?s:s.slice(0,o)),a=o<0?null:Yr(s.slice(o+1));if(i in t){let l=t[i];Zt(l)||(l=t[i]=[l]),l.push(a)}else t[i]=a}return t}function oa(e){let t="";for(let n in e){const r=e[n];if(n=Rf(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Zt(r)?r.map(s=>s&&To(s)):[r&&To(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Jf(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Zt(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const Qf=Symbol(""),ia=Symbol(""),Os=Symbol(""),Zo=Symbol(""),Co=Symbol("");function Ir(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $n(e,t,n,r,s,o=i=>i()){const i=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const d=g=>{g===!1?l(wr(mt.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?l(g):Kf(g)?l(wr(mt.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(i&&r.enterCallbacks[s]===i&&typeof g=="function"&&i.push(g),a())},c=o(()=>e.call(r&&r.instances[s],t,n,d));let f=Promise.resolve(c);e.length<3&&(f=f.then(d)),f.catch(g=>l(g))})}function Zs(e,t,n,r,s=o=>o()){const o=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(tc(l)){const d=(l.__vccOpts||l)[t];d&&o.push($n(d,n,r,i,a,s))}else{let d=l();o.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const f=wf(c)?c.default:c;i.mods[a]=c,i.components[a]=f;const g=(f.__vccOpts||f)[t];return g&&$n(g,n,r,i,a,s)()}))}}return o}function Xf(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let i=0;i<o;i++){const a=t.matched[i];a&&(e.matched.find(d=>yr(d,a))?r.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(d=>yr(d,l))||s.push(l))}return[n,r,s]}/*!
22
+ * vue-router v4.6.4
23
+ * (c) 2025 Eduardo San Martin Morote
24
+ * @license MIT
25
+ */let Zf=()=>location.protocol+"//"+location.host;function uc(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let i=s.includes(e.slice(o))?e.slice(o).length:1,a=s.slice(i);return a[0]!=="/"&&(a="/"+a),na(a,"")}return na(n,e)+r+s}function eh(e,t,n,r){let s=[],o=[],i=null;const a=({state:g})=>{const b=uc(e,location),$=n.value,A=t.value;let B=0;if(g){if(n.value=b,t.value=g,i&&i===$){i=null;return}B=A?g.position-A.position:0}else r(b);s.forEach(q=>{q(n.value,$,{delta:B,type:So.pop,direction:B?B>0?Xs.forward:Xs.back:Xs.unknown})})};function l(){i=n.value}function d(g){s.push(g);const b=()=>{const $=s.indexOf(g);$>-1&&s.splice($,1)};return o.push(b),b}function c(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(Je({},g.state,{scroll:Ns()}),"")}}function f(){for(const g of o)g();o=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:l,listen:d,destroy:f}}function aa(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Ns():null}}function th(e){const{history:t,location:n}=window,r={value:uc(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,d,c){const f=e.indexOf("#"),g=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Zf()+e+l;try{t[c?"replaceState":"pushState"](d,"",g),s.value=d}catch(b){console.error(b),n[c?"replace":"assign"](g)}}function i(l,d){o(l,Je({},t.state,aa(s.value.back,l,s.value.forward,!0),d,{position:s.value.position}),!0),r.value=l}function a(l,d){const c=Je({},s.value,t.state,{forward:l,scroll:Ns()});o(c.current,c,!0),o(l,Je({},aa(r.value,l,null),{position:c.position+1},d),!1),r.value=l}return{location:r,state:s,push:a,replace:i}}function nh(e){e=Bf(e);const t=th(e),n=eh(e,t.state,t.location,t.replace);function r(o,i=!0){i||n.pauseListeners(),history.go(o)}const s=Je({location:"",base:e,go:r,createHref:Hf.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function rh(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),nh(e)}let er=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var yt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(yt||{});const sh={type:er.Static,value:""},oh=/[a-zA-Z0-9_]/;function ih(e){if(!e)return[[]];if(e==="/")return[[sh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${d}": ${b}`)}let n=yt.Static,r=n;const s=[];let o;function i(){o&&s.push(o),o=[]}let a=0,l,d="",c="";function f(){d&&(n===yt.Static?o.push({type:er.Static,value:d}):n===yt.Param||n===yt.ParamRegExp||n===yt.ParamRegExpEnd?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:er.Param,value:d,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),d="")}function g(){d+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==yt.ParamRegExp){r=n,n=yt.EscapeNext;continue}switch(n){case yt.Static:l==="/"?(d&&f(),i()):l===":"?(f(),n=yt.Param):g();break;case yt.EscapeNext:g(),n=r;break;case yt.Param:l==="("?n=yt.ParamRegExp:oh.test(l)?g():(f(),n=yt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case yt.ParamRegExp:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=yt.ParamRegExpEnd:c+=l;break;case yt.ParamRegExpEnd:f(),n=yt.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===yt.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),f(),i(),s}const la="[^/]+?",ah={sensitive:!1,strict:!1,start:!0,end:!0};var Nt=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Nt||{});const lh=/[.+*?^${}()[\]/\\]/g;function ch(e,t){const n=Je({},ah,t),r=[];let s=n.start?"^":"";const o=[];for(const d of e){const c=d.length?[]:[Nt.Root];n.strict&&!d.length&&(s+="/");for(let f=0;f<d.length;f++){const g=d[f];let b=Nt.Segment+(n.sensitive?Nt.BonusCaseSensitive:0);if(g.type===er.Static)f||(s+="/"),s+=g.value.replace(lh,"\\$&"),b+=Nt.Static;else if(g.type===er.Param){const{value:$,repeatable:A,optional:B,regexp:q}=g;o.push({name:$,repeatable:A,optional:B});const M=q||la;if(M!==la){b+=Nt.BonusCustomRegExp;try{`${M}`}catch(F){throw new Error(`Invalid custom RegExp for param "${$}" (${M}): `+F.message)}}let V=A?`((?:${M})(?:/(?:${M}))*)`:`(${M})`;f||(V=B&&d.length<2?`(?:/${V})`:"/"+V),B&&(V+="?"),s+=V,b+=Nt.Dynamic,B&&(b+=Nt.BonusOptional),A&&(b+=Nt.BonusRepeatable),M===".*"&&(b+=Nt.BonusWildcard)}c.push(b)}r.push(c)}if(n.strict&&n.end){const d=r.length-1;r[d][r[d].length-1]+=Nt.BonusStrict}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const i=new RegExp(s,n.sensitive?"":"i");function a(d){const c=d.match(i),f={};if(!c)return null;for(let g=1;g<c.length;g++){const b=c[g]||"",$=o[g-1];f[$.name]=b&&$.repeatable?b.split("/"):b}return f}function l(d){let c="",f=!1;for(const g of e){(!f||!c.endsWith("/"))&&(c+="/"),f=!1;for(const b of g)if(b.type===er.Static)c+=b.value;else if(b.type===er.Param){const{value:$,repeatable:A,optional:B}=b,q=$ in d?d[$]:"";if(Zt(q)&&!A)throw new Error(`Provided param "${$}" is an array but it is not repeatable (* or + modifiers)`);const M=Zt(q)?q.join("/"):q;if(!M)if(B)g.length<2&&(c.endsWith("/")?c=c.slice(0,-1):f=!0);else throw new Error(`Missing required param "${$}"`);c+=M}}return c||"/"}return{re:i,score:r,keys:o,parse:a,stringify:l}}function uh(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===Nt.Static+Nt.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Nt.Static+Nt.Segment?1:-1:0}function dc(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const o=uh(r[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-r.length)===1){if(ca(r))return 1;if(ca(s))return-1}return s.length-r.length}function ca(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const dh={strict:!1,end:!0,sensitive:!1};function fh(e,t,n){const r=ch(ih(e.path),n),s=Je(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function hh(e,t){const n=[],r=new Map;t=ta(dh,t);function s(f){return r.get(f)}function o(f,g,b){const $=!b,A=da(f);A.aliasOf=b&&b.record;const B=ta(t,f),q=[A];if("alias"in f){const F=typeof f.alias=="string"?[f.alias]:f.alias;for(const ae of F)q.push(da(Je({},A,{components:b?b.record.components:A.components,path:ae,aliasOf:b?b.record:A})))}let M,V;for(const F of q){const{path:ae}=F;if(g&&ae[0]!=="/"){const oe=g.record.path,le=oe[oe.length-1]==="/"?"":"/";F.path=g.record.path+(ae&&le+ae)}if(M=fh(F,g,B),b?b.alias.push(M):(V=V||M,V!==M&&V.alias.push(M),$&&f.name&&!fa(M)&&i(f.name)),fc(M)&&l(M),A.children){const oe=A.children;for(let le=0;le<oe.length;le++)o(oe[le],M,b&&b.children[le])}b=b||M}return V?()=>{i(V)}:Fr}function i(f){if(lc(f)){const g=r.get(f);g&&(r.delete(f),n.splice(n.indexOf(g),1),g.children.forEach(i),g.alias.forEach(i))}else{const g=n.indexOf(f);g>-1&&(n.splice(g,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function a(){return n}function l(f){const g=gh(f,n);n.splice(g,0,f),f.record.name&&!fa(f)&&r.set(f.record.name,f)}function d(f,g){let b,$={},A,B;if("name"in f&&f.name){if(b=r.get(f.name),!b)throw wr(mt.MATCHER_NOT_FOUND,{location:f});B=b.record.name,$=Je(ua(g.params,b.keys.filter(V=>!V.optional).concat(b.parent?b.parent.keys.filter(V=>V.optional):[]).map(V=>V.name)),f.params&&ua(f.params,b.keys.map(V=>V.name))),A=b.stringify($)}else if(f.path!=null)A=f.path,b=n.find(V=>V.re.test(A)),b&&($=b.parse(A),B=b.record.name);else{if(b=g.name?r.get(g.name):n.find(V=>V.re.test(g.path)),!b)throw wr(mt.MATCHER_NOT_FOUND,{location:f,currentLocation:g});B=b.record.name,$=Je({},g.params,f.params),A=b.stringify($)}const q=[];let M=b;for(;M;)q.unshift(M.record),M=M.parent;return{name:B,path:A,params:$,matched:q,meta:mh(q)}}e.forEach(f=>o(f));function c(){n.length=0,r.clear()}return{addRoute:o,resolve:d,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:s}}function ua(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function da(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ph(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ph(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function fa(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function mh(e){return e.reduce((t,n)=>Je(t,n.meta),{})}function gh(e,t){let n=0,r=t.length;for(;n!==r;){const o=n+r>>1;dc(e,t[o])<0?r=o:n=o+1}const s=vh(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function vh(e){let t=e;for(;t=t.parent;)if(fc(t)&&dc(e,t)===0)return t}function fc({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ha(e){const t=Yt(Os),n=Yt(Zo),r=ce(()=>{const l=Ne(e.to);return t.resolve(l)}),s=ce(()=>{const{matched:l}=r.value,{length:d}=l,c=l[d-1],f=n.matched;if(!c||!f.length)return-1;const g=f.findIndex(yr.bind(null,c));if(g>-1)return g;const b=pa(l[d-2]);return d>1&&pa(c)===b&&f[f.length-1].path!==b?f.findIndex(yr.bind(null,l[d-2])):g}),o=ce(()=>s.value>-1&&kh(n.params,r.value.params)),i=ce(()=>s.value>-1&&s.value===n.matched.length-1&&ac(n.params,r.value.params));function a(l={}){if(_h(l)){const d=t[Ne(e.replace)?"replace":"push"](Ne(e.to)).catch(Fr);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:r,href:ce(()=>r.value.href),isActive:o,isExactActive:i,navigate:a}}function yh(e){return e.length===1?e[0]:e}const wh=kt({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:ha,setup(e,{slots:t}){const n=Cs(ha(e)),{options:r}=Yt(Os),s=ce(()=>({[ma(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[ma(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&yh(t.default(n));return e.custom?o:Qo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),bh=wh;function _h(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function kh(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Zt(s)||s.length!==r.length||r.some((o,i)=>o.valueOf()!==s[i].valueOf()))return!1}return!0}function pa(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ma=(e,t,n)=>e??t??n,Th=kt({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Yt(Co),s=ce(()=>e.route||r.value),o=Yt(ia,0),i=ce(()=>{let d=Ne(o);const{matched:c}=s.value;let f;for(;(f=c[d])&&!f.components;)d++;return d}),a=ce(()=>s.value.matched[i.value]);ls(ia,ce(()=>i.value+1)),ls(Qf,a),ls(Co,s);const l=H();return ft(()=>[l.value,a.value,e.name],([d,c,f],[g,b,$])=>{c&&(c.instances[f]=d,b&&b!==c&&d&&d===g&&(c.leaveGuards.size||(c.leaveGuards=b.leaveGuards),c.updateGuards.size||(c.updateGuards=b.updateGuards))),d&&c&&(!b||!yr(c,b)||!g)&&(c.enterCallbacks[f]||[]).forEach(A=>A(d))},{flush:"post"}),()=>{const d=s.value,c=e.name,f=a.value,g=f&&f.components[c];if(!g)return ga(n.default,{Component:g,route:d});const b=f.props[c],$=b?b===!0?d.params:typeof b=="function"?b(d):b:null,B=Qo(g,Je({},$,t,{onVnodeUnmounted:q=>{q.component.isUnmounted&&(f.instances[c]=null)},ref:l}));return ga(n.default,{Component:B,route:d})||B}}});function ga(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Sh=Th;function xh(e){const t=hh(e.routes,e),n=e.parseQuery||Yf,r=e.stringifyQuery||oa,s=e.history,o=Ir(),i=Ir(),a=Ir(),l=_u(An);let d=An;dr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Js.bind(null,C=>""+C),f=Js.bind(null,Mf),g=Js.bind(null,Yr);function b(C,z){let ee,ye;return lc(C)?(ee=t.getRecordMatcher(C),ye=z):ye=C,t.addRoute(ye,ee)}function $(C){const z=t.getRecordMatcher(C);z&&t.removeRoute(z)}function A(){return t.getRoutes().map(C=>C.record)}function B(C){return!!t.getRecordMatcher(C)}function q(C,z){if(z=Je({},z||l.value),typeof C=="string"){const x=Qs(n,C,z.path),L=t.resolve({path:x.path},z),U=s.createHref(x.fullPath);return Je(x,L,{params:g(L.params),hash:Yr(x.hash),redirectedFrom:void 0,href:U})}let ee;if(C.path!=null)ee=Je({},C,{path:Qs(n,C.path,z.path).path});else{const x=Je({},C.params);for(const L in x)x[L]==null&&delete x[L];ee=Je({},C,{params:f(x)}),z.params=f(z.params)}const ye=t.resolve(ee,z),xe=C.hash||"";ye.params=c(g(ye.params));const p=Of(r,Je({},C,{hash:If(xe),path:ye.path})),v=s.createHref(p);return Je({fullPath:p,hash:xe,query:r===oa?Jf(C.query):C.query||{}},ye,{redirectedFrom:void 0,href:v})}function M(C){return typeof C=="string"?Qs(n,C,l.value.path):Je({},C)}function V(C,z){if(d!==C)return wr(mt.NAVIGATION_CANCELLED,{from:z,to:C})}function F(C){return le(C)}function ae(C){return F(Je(M(C),{replace:!0}))}function oe(C,z){const ee=C.matched[C.matched.length-1];if(ee&&ee.redirect){const{redirect:ye}=ee;let xe=typeof ye=="function"?ye(C,z):ye;return typeof xe=="string"&&(xe=xe.includes("?")||xe.includes("#")?xe=M(xe):{path:xe},xe.params={}),Je({query:C.query,hash:C.hash,params:xe.path!=null?{}:C.params},xe)}}function le(C,z){const ee=d=q(C),ye=l.value,xe=C.state,p=C.force,v=C.replace===!0,x=oe(ee,ye);if(x)return le(Je(M(x),{state:typeof x=="object"?Je({},xe,x.state):xe,force:p,replace:v}),z||ee);const L=ee;L.redirectedFrom=z;let U;return!p&&jf(r,ye,ee)&&(U=wr(mt.NAVIGATION_DUPLICATED,{to:L,from:ye}),et(ye,ye,!0,!1)),(U?Promise.resolve(U):te(L,ye)).catch(O=>fn(O)?fn(O,mt.NAVIGATION_GUARD_REDIRECT)?O:tt(O):Ie(O,L,ye)).then(O=>{if(O){if(fn(O,mt.NAVIGATION_GUARD_REDIRECT))return le(Je({replace:v},M(O.to),{state:typeof O.to=="object"?Je({},xe,O.to.state):xe,force:p}),z||L)}else O=X(L,ye,!0,v,xe);return fe(L,ye,O),O})}function de(C,z){const ee=V(C,z);return ee?Promise.reject(ee):Promise.resolve()}function re(C){const z=ue.values().next().value;return z&&typeof z.runWithContext=="function"?z.runWithContext(C):C()}function te(C,z){let ee;const[ye,xe,p]=Xf(C,z);ee=Zs(ye.reverse(),"beforeRouteLeave",C,z);for(const x of ye)x.leaveGuards.forEach(L=>{ee.push($n(L,C,z))});const v=de.bind(null,C,z);return ee.push(v),he(ee).then(()=>{ee=[];for(const x of o.list())ee.push($n(x,C,z));return ee.push(v),he(ee)}).then(()=>{ee=Zs(xe,"beforeRouteUpdate",C,z);for(const x of xe)x.updateGuards.forEach(L=>{ee.push($n(L,C,z))});return ee.push(v),he(ee)}).then(()=>{ee=[];for(const x of p)if(x.beforeEnter)if(Zt(x.beforeEnter))for(const L of x.beforeEnter)ee.push($n(L,C,z));else ee.push($n(x.beforeEnter,C,z));return ee.push(v),he(ee)}).then(()=>(C.matched.forEach(x=>x.enterCallbacks={}),ee=Zs(p,"beforeRouteEnter",C,z,re),ee.push(v),he(ee))).then(()=>{ee=[];for(const x of i.list())ee.push($n(x,C,z));return ee.push(v),he(ee)}).catch(x=>fn(x,mt.NAVIGATION_CANCELLED)?x:Promise.reject(x))}function fe(C,z,ee){a.list().forEach(ye=>re(()=>ye(C,z,ee)))}function X(C,z,ee,ye,xe){const p=V(C,z);if(p)return p;const v=z===An,x=dr?history.state:{};ee&&(ye||v?s.replace(C.fullPath,Je({scroll:v&&x&&x.scroll},xe)):s.push(C.fullPath,xe)),l.value=C,et(C,z,ee,v),tt()}let Me;function We(){Me||(Me=s.listen((C,z,ee)=>{if(!Te.listening)return;const ye=q(C),xe=oe(ye,Te.currentRoute.value);if(xe){le(Je(xe,{replace:!0,force:!0}),ye).catch(Fr);return}d=ye;const p=l.value;dr&&qf(sa(p.fullPath,ee.delta),Ns()),te(ye,p).catch(v=>fn(v,mt.NAVIGATION_ABORTED|mt.NAVIGATION_CANCELLED)?v:fn(v,mt.NAVIGATION_GUARD_REDIRECT)?(le(Je(M(v.to),{force:!0}),ye).then(x=>{fn(x,mt.NAVIGATION_ABORTED|mt.NAVIGATION_DUPLICATED)&&!ee.delta&&ee.type===So.pop&&s.go(-1,!1)}).catch(Fr),Promise.reject()):(ee.delta&&s.go(-ee.delta,!1),Ie(v,ye,p))).then(v=>{v=v||X(ye,p,!1),v&&(ee.delta&&!fn(v,mt.NAVIGATION_CANCELLED)?s.go(-ee.delta,!1):ee.type===So.pop&&fn(v,mt.NAVIGATION_ABORTED|mt.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),fe(ye,p,v)}).catch(Fr)}))}let Ze=Ir(),Se=Ir(),Le;function Ie(C,z,ee){tt(C);const ye=Se.list();return ye.length?ye.forEach(xe=>xe(C,z,ee)):console.error(C),Promise.reject(C)}function rt(){return Le&&l.value!==An?Promise.resolve():new Promise((C,z)=>{Ze.add([C,z])})}function tt(C){return Le||(Le=!C,We(),Ze.list().forEach(([z,ee])=>C?ee(C):z()),Ze.reset()),C}function et(C,z,ee,ye){const{scrollBehavior:xe}=e;if(!dr||!xe)return Promise.resolve();const p=!ee&&Wf(sa(C.fullPath,0))||(ye||!ee)&&history.state&&history.state.scroll||null;return qt().then(()=>xe(C,z,p)).then(v=>v&&Vf(v)).catch(v=>Ie(v,C,z))}const qe=C=>s.go(C);let ut;const ue=new Set,Te={currentRoute:l,listening:!0,addRoute:b,removeRoute:$,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:A,resolve:q,options:e,push:F,replace:ae,go:qe,back:()=>qe(-1),forward:()=>qe(1),beforeEach:o.add,beforeResolve:i.add,afterEach:a.add,onError:Se.add,isReady:rt,install(C){C.component("RouterLink",bh),C.component("RouterView",Sh),C.config.globalProperties.$router=Te,Object.defineProperty(C.config.globalProperties,"$route",{enumerable:!0,get:()=>Ne(l)}),dr&&!ut&&l.value===An&&(ut=!0,F(s.location).catch(ye=>{}));const z={};for(const ye in An)Object.defineProperty(z,ye,{get:()=>l.value[ye],enumerable:!0});C.provide(Os,Te),C.provide(Zo,ll(z)),C.provide(Co,l);const ee=C.unmount;ue.add(C),C.unmount=function(){ue.delete(C),ue.size<1&&(d=An,Me&&Me(),Me=null,l.value=An,ut=!1,Le=!1),ee()}}};function he(C){return C.reduce((z,ee)=>z.then(()=>re(ee)),Promise.resolve())}return Te}function Ch(){return Yt(Os)}function Ah(e){return Yt(Zo)}const va=768;function hc(){const e=H(typeof window<"u"?window.innerWidth<va:!1);let t=null;function n(r){e.value=r.matches}return Dn(()=>{t=window.matchMedia(`(max-width: ${va-1}px)`),e.value=t.matches,t.addEventListener("change",n)}),Rs(()=>{t==null||t.removeEventListener("change",n)}),{isMobile:e}}const Eh={key:0,class:"desktop-sidebar"},Ih={class:"desktop-main"},ya="codex-web-local.sidebar-width.v1",Rh=260,$h=620,wa=320,Mh=kt({__name:"DesktopLayout",props:{isSidebarCollapsed:{type:Boolean,default:!1}},emits:["close-sidebar"],setup(e){const t=e,{isMobile:n}=hc();function r(d){return Math.min($h,Math.max(Rh,d))}function s(){if(typeof window>"u")return wa;const d=window.localStorage.getItem(ya),c=Number(d);return Number.isFinite(c)?r(c):wa}const o=H(s()),i=ce(()=>n.value||t.isSidebarCollapsed?{"--sidebar-width":"0px","--layout-columns":"minmax(0, 1fr)"}:{"--sidebar-width":`${o.value}px`,"--layout-columns":"var(--sidebar-width) 1px minmax(0, 1fr)"});function a(d){typeof window>"u"||window.localStorage.setItem(ya,String(d))}function l(d){d.preventDefault();const c=d.clientX,f=o.value,g=$=>{const A=$.clientX-c;o.value=r(f+A)},b=()=>{a(o.value),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",b)};window.addEventListener("mousemove",g),window.addEventListener("mouseup",b)}return(d,c)=>(_(),S("div",{class:lt(["desktop-layout",{"is-mobile":Ne(n)}]),style:rr(i.value)},[Ne(n)?(_(),ot(_l,{key:0,to:"body"},[Ee(Vd,{name:"drawer"},{default:nt(()=>[e.isSidebarCollapsed?pe("",!0):(_(),S("div",{key:0,class:"mobile-drawer-backdrop",onClick:c[1]||(c[1]=f=>d.$emit("close-sidebar"))},[w("aside",{class:"mobile-drawer",onClick:c[0]||(c[0]=ct(()=>{},["stop"]))},[an(d.$slots,"sidebar",{},void 0,!0)])]))]),_:3})])):pe("",!0),Ne(n)?pe("",!0):(_(),S(De,{key:1},[e.isSidebarCollapsed?pe("",!0):(_(),S("aside",Eh,[an(d.$slots,"sidebar",{},void 0)])),e.isSidebarCollapsed?pe("",!0):(_(),S("button",{key:1,class:"desktop-resize-handle",type:"button","aria-label":"Resize sidebar",onMousedown:l},null,32))],64)),w("section",Ih,[an(d.$slots,"content",{},void 0)])],6))}}),Ge=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},Ph=Ge(Mh,[["__scopeId","data-v-2039d51b"]]),Nh={},Oh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function jh(e,t){return _(),S("svg",Oh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2m2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8m-9 4h4"},null,-1)])])}const eo=Ge(Nh,[["render",jh]]),Lh={},Dh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Bh(e,t){return _(),S("svg",Dh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m6 9l6 6l6-6"},null,-1)])])}const ei=Ge(Lh,[["render",Bh]]),Fh={},Hh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Uh(e,t){return _(),S("svg",Hh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 6l6 6l-6 6"},null,-1)])])}const pc=Ge(Fh,[["render",Uh]]),Vh={},qh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Wh(e,t){return _(),S("svg",qh,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M6 12a2 2 0 1 0 0-4a2 2 0 0 0 0 4m6 0a2 2 0 1 0 0-4a2 2 0 0 0 0 4m6 0a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const ba=Ge(Vh,[["render",Wh]]),Kh={},Gh={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function zh(e,t){return _(),S("svg",Gh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 20h4L18.5 9.5a2.828 2.828 0 1 0-4-4L4 16zm9.5-13.5l4 4"},null,-1)])])}const ws=Ge(Kh,[["render",zh]]),Yh={},Jh={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Qh(e,t){return _(),S("svg",Jh,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2"},null,-1)])])}const Xh=Ge(Yh,[["render",Qh]]),Zh={},ep={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function tp(e,t){return _(),S("svg",ep,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m5 19l2.757-7.351A1 1 0 0 1 8.693 11H21a1 1 0 0 1 .986 1.164l-.996 5.211A2 2 0 0 1 19.026 19za2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v2"},null,-1)])])}const np=Ge(Zh,[["render",tp]]),rp={},sp={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function op(e,t){return _(),S("svg",sp,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 18v-6m0 0a4 4 0 0 1 4-4h2m-6 4a4 4 0 0 0-4-4H6m0-4a2 2 0 1 0 0 4a2 2 0 0 0 0-4m12 0a2 2 0 1 0 0 4a2 2 0 0 0 0-4m-6 14a2 2 0 1 0 0 4a2 2 0 0 0 0-4"},null,-1)])])}const to=Ge(rp,[["render",op]]),ip={},ap={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function lp(e,t){return _(),S("svg",ap,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 4.5l-4 4L7 10l-1.5 1.5l7 7L14 17l1.5-4l4-4M9 15l-4.5 4.5M14.5 4L20 9.5"},null,-1)])])}const no=Ge(ip,[["render",lp]]),cp={key:0,class:"sidebar-menu-row-left"},up={class:"sidebar-menu-row-main"},dp={key:1,class:"sidebar-menu-row-right"},fp={key:0,class:"sidebar-menu-row-right-default"},hp={key:1,class:"sidebar-menu-row-right-hover"},pp=kt({inheritAttrs:!1,__name:"SidebarMenuRow",props:{as:{default:"div"},forceRightHover:{type:Boolean,default:!1}},setup(e){const t=e,n=Xu(),r=ce(()=>!!n.left),s=ce(()=>!!n.right),o=ce(()=>!!n["right-hover"]),i=ce(()=>s.value||o.value);return(a,l)=>(_(),ot(Yu(t.as),Yl({class:"sidebar-menu-row","data-has-left":r.value,"data-has-right":i.value,"data-has-right-hover":o.value,"data-force-right-hover":t.forceRightHover},a.$attrs),{default:nt(()=>[r.value?(_(),S("span",cp,[an(a.$slots,"left",{},void 0,!0)])):pe("",!0),w("span",up,[an(a.$slots,"default",{},void 0,!0)]),i.value?(_(),S("span",dp,[s.value?(_(),S("span",fp,[an(a.$slots,"right",{},void 0,!0)])):pe("",!0),o.value?(_(),S("span",hp,[an(a.$slots,"right-hover",{},void 0,!0)])):pe("",!0)])):pe("",!0)]),_:3},16,["data-has-left","data-has-right","data-has-right-hover","data-force-right-hover"]))}}),Jn=Ge(pp,[["__scopeId","data-v-daeca4df"]]),mp={class:"thread-tree-root"},gp={key:0,class:"pinned-section"},vp={class:"thread-list"},yp={class:"thread-left-stack"},wp=["data-state"],bp=["onClick"],_p=["onClick"],kp={class:"thread-row-title-wrap"},Tp={class:"thread-row-title"},Sp={class:"thread-row-time"},xp=["data-confirm","onClick"],Cp={key:0},Ap=["aria-expanded"],Ep=["data-active"],Ip={key:0},Rp=["data-active"],$p={key:0},Mp={key:1,class:"thread-tree-no-results"},Pp={key:2,class:"thread-tree-loading"},Np={key:3,class:"thread-list thread-list-global"},Op={class:"thread-left-stack"},jp=["data-state"],Lp=["onClick"],Dp=["onClick"],Bp={class:"thread-row-title-wrap"},Fp={class:"thread-row-title"},Hp={class:"thread-row-time"},Up=["data-confirm","onClick"],Vp={key:0},qp=["data-project-name","data-expanded","data-dragging"],Wp={class:"project-icon-stack"},Kp={class:"project-icon-folder"},Gp={class:"project-icon-chevron"},zp=["data-dragging-handle","onMousedown"],Yp={class:"project-title"},Jp={class:"project-hover-controls"},Qp=["onClick"],Xp=["onClick"],Zp=["onClick"],em=["onInput"],tm=["aria-label","title","onClick"],nm={key:0,class:"thread-list"},rm={class:"thread-left-stack"},sm=["data-state"],om=["onClick"],im=["onClick"],am={class:"thread-row-title-wrap"},lm={class:"thread-row-title"},cm={class:"thread-row-time"},um=["data-confirm","onClick"],dm={key:0},fm=["onClick"],hm=4,_a=6,ka="codex-web-local.thread-view-mode.v1",Ta="codex-web-local.collapsed-projects.v1",pm=kt({__name:"SidebarThreadTree",props:{groups:{},projectDisplayNameById:{},selectedThreadId:{},isLoading:{type:Boolean},searchQuery:{}},emits:["select","archive","start-new-thread","rename-project","remove-project","reorder-project"],setup(e,{emit:t}){const n=e,r=t,s=H({}),o=H({}),i=H([]),a=H(""),l=H(""),d=H("actions"),c=H(""),f=H(null),g=H(null),b=H(null);let $=null,A=null;const B=H(""),q=H({}),M=new Map,V=new Map,F=new WeakMap,ae=H(null),oe=H(!1),le=H(te()),de=typeof window<"u"?new ResizeObserver(k=>{for(const R of k){const P=R.target,Q=F.get(P);Q&&E(Q,P)}}):null;function re(){if(typeof window>"u")return{};try{const k=window.localStorage.getItem(Ta);if(!k)return{};const R=JSON.parse(k);return!R||typeof R!="object"||Array.isArray(R)?{}:R}catch{return{}}}function te(){return typeof window>"u"?"project":window.localStorage.getItem(ka)==="chronological"?"chronological":"project"}o.value=re(),ft(o,k=>{typeof window>"u"||window.localStorage.setItem(Ta,JSON.stringify(k))},{deep:!0}),ft(le,k=>{typeof window>"u"||window.localStorage.setItem(ka,k)});const fe=ce(()=>n.searchQuery.trim().toLowerCase()),X=ce(()=>fe.value.length>0);function Me(k){if(!X.value)return!0;const R=fe.value;return k.title.toLowerCase().includes(R)||k.preview.toLowerCase().includes(R)}const We=ce(()=>X.value?n.groups.map(k=>({...k,threads:k.threads.filter(Me)})).filter(k=>k.threads.length>0):n.groups),Ze=ce(()=>le.value==="chronological"),Se=ce(()=>{const k=We.value,R=[];for(const P of k)for(const Q of P.threads)ue(Q.id)||R.push(Q);return R.sort((P,Q)=>{const Ve=new Date(P.updatedAtIso||P.createdAtIso).getTime();return new Date(Q.updatedAtIso||Q.createdAtIso).getTime()-Ve})}),Le=ce(()=>{const k=new Map;for(const R of n.groups)for(const P of R.threads)k.set(P.id,P);return k}),Ie=ce(()=>i.value.map(k=>Le.value.get(k)??null).filter(k=>k!==null).filter(Me)),rt=ce(()=>{const k=b.value;if(!k||k.dropTargetIndexFull===null||n.groups.length===0)return null;const R=Math.max(0,Math.min(k.dropTargetIndexFull,n.groups.length)),P=R>k.fromIndex?R-1:R,Q=Math.max(0,Math.min(P,n.groups.length-1));return Q===k.fromIndex?null:Q}),tt=ce(()=>{const R=(X.value?We.value:n.groups).map(Dt=>Dt.projectName),P=b.value,Q=rt.value;if(!P||Q===null)return R;const Ve=[...R],[vt]=Ve.splice(P.fromIndex,1);return vt?(Ve.splice(Q,0,vt),Ve):R}),et=ce(()=>{const k={};let R=0;for(const P of tt.value)k[P]=R,R+=Ce(P);return k}),qe=ce(()=>{let k=0;for(const R of tt.value)k+=Ce(R);return{height:`${Math.max(0,k)}px`}});function ut(k){const R=new Date(k).getTime();if(Number.isNaN(R))return"n/a";const P=Math.abs(Date.now()-R);if(P<6e4)return"now";const Q=Math.floor(P/6e4);if(Q<60)return`${Q}m`;const Ve=Math.floor(Q/60);return Ve<24?`${Ve}h`:`${Math.floor(Ve/24)}d`}function ue(k){return i.value.includes(k)}function Te(k){if(ue(k)){i.value=i.value.filter(R=>R!==k);return}i.value=[k,...i.value]}function he(k){r("select",k)}function C(k){if(a.value!==k){a.value=k;return}a.value="",i.value=i.value.filter(R=>R!==k),r("archive",k)}function z(k){return`start new thread ${xe(k)}`}function ee(k){r("start-new-thread",k)}function ye(k){a.value===k&&(a.value="")}function xe(k){return n.projectDisplayNameById[k]??k}function p(k){return l.value===k}function v(){l.value="",d.value="actions",c.value=""}function x(){oe.value=!oe.value}function L(k){le.value=k,oe.value=!1}function U(k){if(l.value===k){v();return}l.value=k,d.value="actions",c.value=xe(k)}function O(k){l.value=k,d.value="rename",c.value=xe(k)}function ne(k){r("rename-project",{projectName:k,displayName:c.value})}function Z(k){r("remove-project",k),v()}function Y(k,R){if(!k.altKey||k.key!=="ArrowUp"&&k.key!=="ArrowDown")return;const P=n.groups.findIndex(vt=>vt.projectName===R);if(P<0)return;const Q=k.key==="ArrowUp"?-1:1,Ve=Math.max(0,Math.min(P+Q,n.groups.length-1));Ve!==P&&(k.preventDefault(),r("reorder-project",{projectName:R,toIndex:Ve}))}function W(k){return s.value[k]===!0}function ie(k){return o.value[k]===!0}function se(k){s.value={...s.value,[k]:!W(k)}}function we(k){if(B.value===k){B.value="";return}o.value={...o.value,[k]:!ie(k)}}function Ce(k){const R=q.value[k]??0,P=b.value,Ve=((P==null?void 0:P.projectName)===k?P.groupHeight:null)??R,vt=ie(k)?0:_a;return Math.max(0,Ve+vt)}function $e(k,R){const P=R instanceof HTMLElement?R:R&&"$el"in R&&R.$el instanceof HTMLElement?R.$el:null;if(P){V.set(k,P);return}V.delete(k)}function Oe(k){const R=l.value;if(!R)return!1;const P=V.get(R);if(!P)return!1;if((typeof k.composedPath=="function"?k.composedPath():[]).includes(P))return!0;const Ve=k.target;return Ve instanceof Node?P.contains(Ve):!1}function Fe(k){if(oe.value){const R=ae.value,P=typeof k.composedPath=="function"?k.composedPath():[];!!R&&(P.includes(R)||k.target instanceof Node&&R.contains(k.target))||(oe.value=!1)}l.value&&(Oe(k)||v())}function Ue(k){l.value&&(Oe(k)||v())}function N(){oe.value&&(oe.value=!1),l.value&&v()}function K(){window.addEventListener("pointerdown",Fe,{capture:!0}),window.addEventListener("focusin",Ue,{capture:!0}),window.addEventListener("blur",N)}function m(){window.removeEventListener("pointerdown",Fe,{capture:!0}),window.removeEventListener("focusin",Ue,{capture:!0}),window.removeEventListener("blur",N)}function E(k,R){const P=R.getBoundingClientRect().height;if(!Number.isFinite(P)||P<=0)return;const Q=q.value[k];Q!==void 0&&Math.abs(Q-P)<.5||(q.value={...q.value,[k]:P})}function I(k,R){const P=M.get(k);P&&P!==R&&de&&de.unobserve(P);const Q=R instanceof HTMLElement?R:R&&"$el"in R&&R.$el instanceof HTMLElement?R.$el:null;if(Q){M.set(k,Q),F.set(Q,k),E(k,Q),de==null||de.observe(Q);return}P&&(de==null||de.unobserve(P)),M.delete(k)}function J(k,R){if(k.button!==0||g.value||b.value)return;const P=n.groups.findIndex(Dt=>Dt.projectName===R),Q=M.get(R);if(P<0||!Q)return;const Ve=Q.getBoundingClientRect(),vt=ie(R)?0:_a;g.value={projectName:R,fromIndex:P,startClientX:k.clientX,startClientY:k.clientY,pointerOffsetY:k.clientY-Ve.top,groupLeft:Ve.left,groupWidth:Ve.width,groupHeight:Ve.height,groupOuterHeight:Ve.height+vt},k.preventDefault(),ge()}function ge(){window.addEventListener("mousemove",ze),window.addEventListener("mouseup",be),window.addEventListener("keydown",me)}function Ae(){window.removeEventListener("mousemove",ze),window.removeEventListener("mouseup",be),window.removeEventListener("keydown",me)}function ze(k){$={clientX:k.clientX,clientY:k.clientY},gt()}function be(k){Gt({clientX:k.clientX,clientY:k.clientY});const R=b.value;if(R&&rt.value!==null){const P=n.groups.findIndex(Q=>Q.projectName===R.projectName);if(P>=0){const Q=rt.value;Q!==P&&r("reorder-project",{projectName:R.projectName,toIndex:Q})}}dt()}function me(k){k.key==="Escape"&&(!g.value&&!b.value||(k.preventDefault(),dt()))}function dt(){A!==null&&(window.cancelAnimationFrame(A),A=null),$=null,g.value=null,b.value=null,B.value="",Ae()}function gt(){A===null&&(A=window.requestAnimationFrame(()=>{if(A=null,!$)return;const k=$;$=null,Gt(k)}))}function Gt(k){const R=g.value;if(!b.value&&R){const P=k.clientX-R.startClientX,Q=k.clientY-R.startClientY;if(Math.hypot(P,Q)<hm)return;v(),B.value=R.projectName,b.value={projectName:R.projectName,fromIndex:R.fromIndex,pointerOffsetY:R.pointerOffsetY,groupLeft:R.groupLeft,groupWidth:R.groupWidth,groupHeight:R.groupHeight,groupOuterHeight:R.groupOuterHeight,ghostTop:k.clientY-R.pointerOffsetY,dropTargetIndexFull:null}}b.value&&Tt(k)}function Tt(k){const R=b.value;if(!R)return;if(R.ghostTop=k.clientY-R.pointerOffsetY,!Fn(k)){R.dropTargetIndexFull=null;return}const P=k.clientY,Q=f.value;if(!Q){R.dropTargetIndexFull=null;return}const Ve=Q.getBoundingClientRect(),vt=new Map(n.groups.map((jt,Sn)=>[jt.projectName,Sn])),Dt=n.groups.map(jt=>jt.projectName).filter(jt=>jt!==R.projectName);let sr=0,or=n.groups.length;for(const jt of Dt){const Sn=vt.get(jt);if(Sn===void 0)continue;const Hn=Ce(jt),xr=Ve.top+sr+Hn/2;if(P<xr){or=Sn;break}sr+=Hn}R.dropTargetIndexFull=or}function Fn(k){const R=f.value;if(!R)return!1;const P=R.getBoundingClientRect(),Q=k.clientX>=P.left&&k.clientX<=P.right,Ve=k.clientY>=P.top-32&&k.clientY<=P.bottom+32;return Q&&Ve}function kn(k){var R;return((R=b.value)==null?void 0:R.projectName)===k}function _r(k){const R=b.value,P=et.value[k]??0,Q=l.value===k;return!R||R.projectName!==k?{position:"absolute",top:"0",left:"0",right:"0",zIndex:Q?"40":"1",transform:`translate3d(0, ${P}px, 0)`,willChange:"transform",transition:"transform 180ms ease"}:{position:"fixed",top:"0",left:`${R.groupLeft}px`,width:`${R.groupWidth}px`,height:`${R.groupHeight}px`,zIndex:"50",pointerEvents:"none",transform:`translate3d(0, ${R.ghostTop}px, 0)`,willChange:"transform",transition:"transform 0ms linear"}}function cn(k){return k.threads.filter(R=>!ue(R.id))}function kr(k){if(X.value)return cn(k);if(ie(k.projectName))return[];const R=cn(k);return W(k.projectName)?R:R.slice(0,10)}function Tr(k){return X.value?!1:!ie(k.projectName)&&cn(k).length>10}function Tn(k){return cn(k).length>0}function en(k){return k.inProgress?"working":k.unread?"unread":"idle"}ft(()=>n.groups.map(k=>k.projectName),k=>{var Ve,vt;const R=((Ve=b.value)==null?void 0:Ve.projectName)??((vt=g.value)==null?void 0:vt.projectName)??"";R&&!n.groups.some(Dt=>Dt.projectName===R)&&dt();const P=new Set(k),Q=Object.fromEntries(Object.entries(q.value).filter(([Dt])=>P.has(Dt)));Object.keys(Q).length!==Object.keys(q.value).length&&(q.value=Q)});const Sr=ce(()=>oe.value||l.value!=="");return ft(Sr,k=>{if(k){K();return}m()}),Bn(()=>{for(const k of M.values())de==null||de.unobserve(k);M.clear(),V.clear(),m(),dt()}),(k,R)=>(_(),S("section",mp,[Ie.value.length>0?(_(),S("section",gp,[w("ul",vp,[(_(!0),S(De,null,ht(Ie.value,P=>(_(),S("li",{key:P.id,class:"thread-row-item"},[Ee(Jn,{class:"thread-row","data-active":P.id===e.selectedThreadId,"data-pinned":ue(P.id),onMouseleave:Q=>ye(P.id)},{left:nt(()=>[w("span",yp,[P.inProgress||P.unread?(_(),S("span",{key:0,class:"thread-status-indicator","data-state":en(P)},null,8,wp)):pe("",!0),w("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:Q=>Te(P.id)},[Ee(no,{class:"thread-icon"})],8,bp)])]),right:nt(()=>[w("span",Sp,ke(ut(P.createdAtIso||P.updatedAtIso)),1)]),"right-hover":nt(()=>[w("button",{class:"thread-archive-button","data-confirm":a.value===P.id,type:"button",title:"archive_thread",onClick:Q=>C(P.id)},[a.value===P.id?(_(),S("span",Cp,"confirm")):(_(),ot(eo,{key:1,class:"thread-icon"}))],8,xp)]),default:nt(()=>[w("button",{class:"thread-main-button",type:"button",onClick:Q=>he(P.id)},[w("span",kp,[w("span",Tp,ke(P.title),1),P.hasWorktree?(_(),ot(to,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):pe("",!0)])],8,_p)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])])):pe("",!0),Ee(Jn,{as:"header",class:"thread-tree-header-row"},{right:nt(()=>[w("div",{ref_key:"organizeMenuWrapRef",ref:ae,class:"organize-menu-wrap"},[w("button",{class:"organize-menu-trigger",type:"button","aria-expanded":oe.value,"aria-label":"Organize threads",title:"Organize threads",onClick:x},[Ee(ba,{class:"thread-icon"})],8,Ap),oe.value?(_(),S("div",{key:0,class:"organize-menu-panel",onClick:R[2]||(R[2]=ct(()=>{},["stop"]))},[R[7]||(R[7]=w("p",{class:"organize-menu-title"},"Organize",-1)),w("button",{class:"organize-menu-item","data-active":le.value==="project",type:"button",onClick:R[0]||(R[0]=P=>L("project"))},[R[5]||(R[5]=w("span",null,"By project",-1)),le.value==="project"?(_(),S("span",Ip,"✓")):pe("",!0)],8,Ep),w("button",{class:"organize-menu-item","data-active":le.value==="chronological",type:"button",onClick:R[1]||(R[1]=P=>L("chronological"))},[R[6]||(R[6]=w("span",null,"Chronological list",-1)),le.value==="chronological"?(_(),S("span",$p,"✓")):pe("",!0)],8,Rp)])):pe("",!0)],512)]),default:nt(()=>[R[8]||(R[8]=w("span",{class:"thread-tree-header"},"Threads",-1))]),_:1}),X.value&&We.value.length===0?(_(),S("p",Mp,"No matching threads")):e.isLoading&&e.groups.length===0?(_(),S("p",Pp,"Loading threads...")):Ze.value?(_(),S("ul",Np,[(_(!0),S(De,null,ht(Se.value,P=>(_(),S("li",{key:P.id,class:"thread-row-item"},[Ee(Jn,{class:"thread-row","data-active":P.id===e.selectedThreadId,"data-pinned":ue(P.id),onMouseleave:Q=>ye(P.id)},{left:nt(()=>[w("span",Op,[P.inProgress||P.unread?(_(),S("span",{key:0,class:"thread-status-indicator","data-state":en(P)},null,8,jp)):pe("",!0),w("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:Q=>Te(P.id)},[Ee(no,{class:"thread-icon"})],8,Lp)])]),right:nt(()=>[w("span",Hp,ke(ut(P.createdAtIso||P.updatedAtIso)),1)]),"right-hover":nt(()=>[w("button",{class:"thread-archive-button","data-confirm":a.value===P.id,type:"button",title:"archive_thread",onClick:Q=>C(P.id)},[a.value===P.id?(_(),S("span",Vp,"confirm")):(_(),ot(eo,{key:1,class:"thread-icon"}))],8,Up)]),default:nt(()=>[w("button",{class:"thread-main-button",type:"button",onClick:Q=>he(P.id)},[w("span",Bp,[w("span",Fp,ke(P.title),1),P.hasWorktree?(_(),ot(to,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):pe("",!0)])],8,Dp)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])):(_(),S("div",{key:4,ref_key:"groupsContainerRef",ref:f,class:"thread-tree-groups",style:rr(qe.value)},[(_(!0),S(De,null,ht(We.value,P=>(_(),S("article",{key:P.projectName,ref_for:!0,ref:Q=>I(P.projectName,Q),class:"project-group","data-project-name":P.projectName,"data-expanded":!ie(P.projectName),"data-dragging":kn(P.projectName),style:rr(_r(P.projectName))},[Ee(Jn,{as:"div",class:"project-header-row",role:"button",tabindex:"0",onClick:Q=>we(P.projectName),onKeydown:[Q=>Y(Q,P.projectName),Ht(ct(Q=>we(P.projectName),["prevent"]),["enter"]),Ht(ct(Q=>we(P.projectName),["prevent"]),["space"])]},{left:nt(()=>[w("span",Wp,[w("span",Kp,[ie(P.projectName)?(_(),ot(Xh,{key:0,class:"thread-icon"})):(_(),ot(np,{key:1,class:"thread-icon"}))]),w("span",Gp,[ie(P.projectName)?(_(),ot(pc,{key:0,class:"thread-icon"})):(_(),ot(ei,{key:1,class:"thread-icon"}))])])]),right:nt(()=>[w("div",Jp,[w("div",{ref_for:!0,ref:Q=>$e(P.projectName,Q),class:"project-menu-wrap"},[w("button",{class:"project-menu-trigger",type:"button",title:"project_menu",onClick:ct(Q=>U(P.projectName),["stop"])},[Ee(ba,{class:"thread-icon"})],8,Qp),p(P.projectName)?(_(),S("div",{key:0,class:"project-menu-panel",onClick:R[4]||(R[4]=ct(()=>{},["stop"]))},[d.value==="actions"?(_(),S(De,{key:0},[w("button",{class:"project-menu-item",type:"button",onClick:Q=>O(P.projectName)}," Edit name ",8,Xp),w("button",{class:"project-menu-item project-menu-item-danger",type:"button",onClick:Q=>Z(P.projectName)}," Remove ",8,Zp)],64)):(_(),S(De,{key:1},[R[9]||(R[9]=w("label",{class:"project-menu-label"},"Project name",-1)),Nn(w("input",{"onUpdate:modelValue":R[3]||(R[3]=Q=>c.value=Q),class:"project-menu-input",type:"text",onInput:Q=>ne(P.projectName)},null,40,em),[[jn,c.value]])],64))])):pe("",!0)],512),w("button",{class:"thread-start-button",type:"button","aria-label":z(P.projectName),title:z(P.projectName),onClick:ct(Q=>ee(P.projectName),["stop"])},[Ee(ws,{class:"thread-icon"})],8,tm)])]),default:nt(()=>[w("span",{class:"project-main-button","data-dragging-handle":kn(P.projectName),onMousedown:ct(Q=>J(Q,P.projectName),["left"])},[w("span",Yp,ke(xe(P.projectName)),1)],40,zp)]),_:2},1032,["onClick","onKeydown"]),Tn(P)?(_(),S("ul",nm,[(_(!0),S(De,null,ht(kr(P),Q=>(_(),S("li",{key:Q.id,class:"thread-row-item"},[Ee(Jn,{class:"thread-row","data-active":Q.id===e.selectedThreadId,"data-pinned":ue(Q.id),onMouseleave:Ve=>ye(Q.id)},{left:nt(()=>[w("span",rm,[Q.inProgress||Q.unread?(_(),S("span",{key:0,class:"thread-status-indicator","data-state":en(Q)},null,8,sm)):pe("",!0),w("button",{class:"thread-pin-button",type:"button",title:"pin",onClick:Ve=>Te(Q.id)},[Ee(no,{class:"thread-icon"})],8,om)])]),right:nt(()=>[w("span",cm,ke(ut(Q.createdAtIso||Q.updatedAtIso)),1)]),"right-hover":nt(()=>[w("button",{class:"thread-archive-button","data-confirm":a.value===Q.id,type:"button",title:"archive_thread",onClick:Ve=>C(Q.id)},[a.value===Q.id?(_(),S("span",dm,"confirm")):(_(),ot(eo,{key:1,class:"thread-icon"}))],8,um)]),default:nt(()=>[w("button",{class:"thread-main-button",type:"button",onClick:Ve=>he(Q.id)},[w("span",am,[w("span",lm,ke(Q.title),1),Q.hasWorktree?(_(),ot(to,{key:0,class:"thread-row-worktree-icon",title:"Worktree thread"})):pe("",!0)])],8,im)]),_:2},1032,["data-active","data-pinned","onMouseleave"])]))),128))])):(_(),ot(Jn,{key:1,as:"p",class:"project-empty-row"},{left:nt(()=>[...R[10]||(R[10]=[w("span",{class:"project-empty-spacer"},null,-1)])]),default:nt(()=>[R[11]||(R[11]=w("span",{class:"project-empty"},"No threads",-1))]),_:1})),Tr(P)?(_(),ot(Jn,{key:2,class:"thread-show-more-row"},{left:nt(()=>[...R[12]||(R[12]=[w("span",{class:"thread-show-more-spacer"},null,-1)])]),default:nt(()=>[w("button",{class:"thread-show-more-button",type:"button",onClick:Q=>se(P.projectName)},ke(W(P.projectName)?"Show less":"Show more"),9,fm)]),_:2},1024)):pe("",!0)],12,qp))),128))],4))]))}}),mm=Ge(pm,[["__scopeId","data-v-5bbc0cb5"]]),gm={class:"content-header"},vm={class:"content-leading"},ym={class:"content-title"},wm={class:"content-actions"},bm=kt({__name:"ContentHeader",props:{title:{}},setup(e){return(t,n)=>(_(),S("header",gm,[w("div",vm,[an(t.$slots,"leading",{},void 0)]),w("h1",ym,ke(e.title),1),w("div",wm,[an(t.$slots,"actions",{},void 0)])]))}}),_m=Ge(bm,[["__scopeId","data-v-66ee223c"]]),km={},Tm={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Sm(e,t){return _(),S("svg",Tm,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"},null,-1)])])}const ti=Ge(km,[["render",Sm]]),xm={},Cm={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Am(e,t){return _(),S("svg",Cm,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 14L4 9l5-5m-5 5h11a4 4 0 0 1 0 8H4"},null,-1)])])}const Em=Ge(xm,[["render",Am]]),Im={class:"conversation-root"},Rm={key:0,class:"conversation-loading"},$m={key:1,class:"conversation-empty"},Mm={class:"message-row"},Pm={class:"message-stack"},Nm={class:"request-card"},Om={class:"request-title"},jm={class:"request-meta"},Lm={key:0,class:"request-reason"},Dm={key:1,class:"request-actions"},Bm=["onClick"],Fm=["onClick"],Hm=["onClick"],Um=["onClick"],Vm={key:2,class:"request-actions"},qm=["onClick"],Wm=["onClick"],Km=["onClick"],Gm=["onClick"],zm={key:3,class:"request-user-input"},Ym={class:"request-question-title"},Jm={key:0,class:"request-question-text"},Qm=["value","onChange"],Xm=["value"],Zm=["value","onInput"],eg=["onClick"],tg={key:4,class:"request-actions"},ng=["onClick"],rg=["onClick"],sg={key:5,class:"request-actions"},og=["onClick"],ig=["onClick"],ag=["data-role","data-message-type"],lg={key:0,class:"message-row","data-role":"system"},cg={class:"message-stack","data-role":"system"},ug=["onClick"],dg={class:"cmd-label"},fg={class:"cmd-status"},hg={class:"cmd-output-inner"},pg={class:"cmd-output"},mg=["data-role","data-message-type"],gg=["data-role"],vg=["data-role"],yg=["data-role"],wg=["onClick"],bg=["src"],_g={key:1,class:"message-file-attachments"},kg=["title"],Tg=["data-role"],Sg={key:0,class:"worked-separator-wrap","aria-live":"polite"},xg=["onClick"],Cg={class:"worked-separator-text"},Ag={key:0,class:"worked-details"},Eg=["onClick"],Ig={class:"cmd-label"},Rg={class:"cmd-status"},$g={class:"cmd-output-inner"},Mg={class:"cmd-output"},Pg={key:1,class:"message-text-flow"},Ng={key:0,class:"message-text"},Og={key:0},jg={key:2,class:"message-inline-code"},Lg={key:1,class:"message-text"},Dg=["onClick"],Bg=["src","alt","onError"],Fg=["onClick"],Hg={key:0,class:"conversation-item conversation-item-overlay"},Ug={class:"message-row"},Vg={class:"message-stack"},qg={class:"live-overlay-inline","aria-live":"polite"},Wg={class:"live-overlay-label"},Kg={key:0,class:"live-overlay-reasoning"},Gg={key:1,class:"live-overlay-error"},zg=["src"],Yg=16,Jg=kt({__name:"ThreadConversation",props:{messages:{},pendingRequests:{},liveOverlay:{},isLoading:{type:Boolean},activeThreadId:{},scrollState:{},isTurnInProgress:{type:Boolean},isRollingBack:{type:Boolean}},emits:["updateScrollState","respondServerRequest","rollback"],setup(e,{emit:t}){const n=H(new Set),r=H(new Set),s=H(new Set),o=H({});function i(m){return m.messageType==="commandExecution"&&!!m.commandExecution}function a(m){var E;return((E=m.commandExecution)==null?void 0:E.status)==="inProgress"||r.value.has(m.id)?!0:n.value.has(m.id)}function l(m){return r.value.has(m.id)}function d(m){var I;if(((I=m.commandExecution)==null?void 0:I.status)==="inProgress")return;const E=new Set(n.value);E.has(m.id)?E.delete(m.id):E.add(m.id),n.value=E}function c(m){const E=new Set(s.value);E.has(m.id)?E.delete(m.id):E.add(m.id),s.value=E}function f(m){return s.value.has(m.id)}function g(m){const E=m.commandExecution;if(!E)return"";switch(E.status){case"inProgress":return"⟳ Running";case"completed":return E.exitCode===0?"✓ Completed":`✗ Exit ${E.exitCode??"?"}`;case"failed":return"✗ Failed";case"declined":return"⊘ Declined";case"interrupted":return"⊘ Interrupted";default:return""}}function b(m){var I,J;const E=(I=m.commandExecution)==null?void 0:I.status;return E==="inProgress"?"cmd-status-running":E==="completed"&&((J=m.commandExecution)==null?void 0:J.exitCode)===0?"cmd-status-ok":"cmd-status-error"}function $(m){const E=new Set(r.value);E.add(m),r.value=E,setTimeout(()=>{const I=new Set(r.value);I.delete(m),r.value=I},1e3)}function A(m,E){const I=[];for(let J=E-1;J>=0;J--){const ge=m[J];if(ge.messageType==="commandExecution")I.unshift(ge);else if(ge.role==="user"||ge.messageType==="worked")break}return I}const B=e,q=t,M=H(null),V=H(null),F=H(""),ae=H({}),oe=H({});let le=0,de=0,re=0;const te=new WeakSet,fe=H(new Set);function X(m){if(!m||/\s/u.test(m)||m.endsWith("/")||m.endsWith("\\")||/^[A-Za-z][A-Za-z0-9+.-]*:\/\//u.test(m))return!1;const E=m.startsWith("/"),I=/^[A-Za-z]:[\\/]/u.test(m),J=m.startsWith("./")||m.startsWith("../")||m.startsWith("~/"),ge=m.includes("/")||m.includes("\\");return E||I||J||ge}function Me(m){return m.replace(/\\/gu,"/").split("/").filter(Boolean).pop()||m}function We(m){if(!m)return null;let E=m,I=null;const J=E.match(/^(.*)#L(\d+)(?:C\d+)?$/u);if(J)E=J[1],I=Number(J[2]);else{const ge=E.match(/^(.*):(\d+)(?::\d+)?$/u);ge&&(E=ge[1],I=Number(ge[2]))}return X(E)?{path:E,line:I}:null}function Ze(m){if(!m.includes("`"))return[{kind:"text",value:m}];const E=[];let I=0,J=0;for(;I<m.length;){if(m[I]!=="`"){I+=1;continue}let ge=1;for(;I+ge<m.length&&m[I+ge]==="`";)ge+=1;const Ae="`".repeat(ge);let ze=I+ge,be=-1;for(;ze<m.length;){const dt=m.indexOf(Ae,ze);if(dt<0)break;const gt=dt>0&&m[dt-1]==="`",Gt=dt+ge<m.length&&m[dt+ge]==="`",Tt=m.slice(I+ge,dt).includes(`
26
+ `);if(!gt&&!Gt&&!Tt){be=dt;break}ze=dt+1}if(be<0){I+=ge;continue}I>J&&E.push({kind:"text",value:m.slice(J,I)});const me=m.slice(I+ge,be);if(me.length>0){const dt=We(me);if(dt){const gt=Me(dt.path),Gt=dt.line?`${gt} (line ${String(dt.line)})`:gt;E.push({kind:"file",value:me,displayName:Gt})}else E.push({kind:"code",value:me})}else E.push({kind:"text",value:`${Ae}${Ae}`});I=be+ge,J=I}return J<m.length&&E.push({kind:"text",value:m.slice(J)}),E}function Se(m){const E=m.trim();if(!E)return"";if(E.startsWith("data:")||E.startsWith("blob:")||E.startsWith("http://")||E.startsWith("https://")||E.startsWith("/codex-local-image?"))return E;if(E.startsWith("file://"))return`/codex-local-image?path=${encodeURIComponent(E)}`;const I=E.startsWith("/"),J=/^[A-Za-z]:[\\/]/u.test(E);return I||J?`/codex-local-image?path=${encodeURIComponent(E)}`:E}function Le(m){if(!m.includes("![")||!m.includes("]("))return[{kind:"text",value:m}];const E=[],I=/!\[([^\]]*)\]\(([^)\n]+)\)/gu;let J=0;for(const ge of m.matchAll(I)){const[Ae,ze,be]=ge;if(typeof ge.index!="number")continue;const me=ge.index,dt=me+Ae.length,gt=Se(be.trim());gt&&(me>J&&E.push({kind:"text",value:m.slice(J,me)}),E.push({kind:"image",url:gt,alt:ze.trim(),markdown:Ae}),J=dt)}return J<m.length&&E.push({kind:"text",value:m.slice(J)}),E.length>0?E:[{kind:"text",value:m}]}function Ie(m){return m!==null&&typeof m=="object"&&!Array.isArray(m)?m:null}function rt(m){const E=new Date(m);return Number.isNaN(E.getTime())?m:E.toLocaleTimeString()}function tt(m){const E=Ie(m.params),I=E==null?void 0:E.reason;return typeof I=="string"?I.trim():""}function et(m,E){return`${String(m)}:${E}`}function qe(m){const E=Ie(m.params),I=Array.isArray(E==null?void 0:E.questions)?E.questions:[],J=[];for(const ge of I){const Ae=Ie(ge);if(!Ae)continue;const ze=typeof Ae.id=="string"?Ae.id:"";if(!ze)continue;const be=Array.isArray(Ae.options)?Ae.options.map(me=>Ie(me)).map(me=>me==null?void 0:me.label).filter(me=>typeof me=="string"&&me.length>0):[];J.push({id:ze,header:typeof Ae.header=="string"?Ae.header:"",question:typeof Ae.question=="string"?Ae.question:"",isOther:Ae.isOther===!0,options:be})}return J}function ut(m,E,I){const J=et(m,E),ge=ae.value[J];return typeof ge=="string"&&ge.length>0?ge:I}function ue(m,E){const I=et(m,E);return oe.value[I]??""}function Te(m,E,I){const J=I.target;if(!(J instanceof HTMLSelectElement))return;const ge=et(m,E);ae.value={...ae.value,[ge]:J.value}}function he(m,E,I){const J=I.target;if(!(J instanceof HTMLInputElement))return;const ge=et(m,E);oe.value={...oe.value,[ge]:J.value}}function C(m,E){q("respondServerRequest",{id:m,result:{decision:E}})}function z(m){const E=qe(m),I={};for(const J of E){const ge=ut(m.id,J.id,J.options[0]||""),Ae=ue(m.id,J.id).trim(),ze=[ge,Ae].map(be=>be.trim()).filter(be=>be.length>0);I[J.id]={answers:ze}}q("respondServerRequest",{id:m.id,result:{answers:I}})}function ee(m){q("respondServerRequest",{id:m,result:{success:!1,contentItems:[{type:"inputText",text:"Tool call rejected from codex-web-local UI."}]}})}function ye(m){q("respondServerRequest",{id:m,result:{success:!0,contentItems:[]}})}function xe(m){q("respondServerRequest",{id:m,result:{}})}function p(m){q("respondServerRequest",{id:m,error:{code:-32e3,message:"Rejected from codex-web-local UI."}})}function v(m){return!(m.role!=="user"&&m.role!=="assistant"||typeof m.turnIndex!="number"||B.isTurnInProgress||B.isRollingBack)}function x(m){v(m)&&q("rollback",{turnIndex:m.turnIndex})}function L(){const m=M.value,E=V.value;!m||!E||(m.scrollTop=m.scrollHeight,E.scrollIntoView({block:"end"}))}function U(m){return m.scrollHeight-(m.scrollTop+m.clientHeight)<=Yg}function O(m){if(!B.activeThreadId)return;const E=Math.max(m.scrollHeight-m.clientHeight,0),I=E>0?Math.min(Math.max(m.scrollTop/E,0),1):1;q("updateScrollState",{threadId:B.activeThreadId,state:{scrollTop:m.scrollTop,isAtBottom:U(m),scrollRatio:I}})}function ne(){const m=M.value;if(!m)return;const E=B.scrollState;if(!E||E.isAtBottom){Z();return}const I=Math.max(m.scrollHeight-m.clientHeight,0),J=typeof E.scrollRatio=="number"?E.scrollRatio*I:E.scrollTop;m.scrollTop=Math.min(Math.max(J,0),I),O(m)}function Z(){const m=M.value;m&&(L(),O(m))}function Y(){const m=B.scrollState;return!m||m.isAtBottom===!0}function W(){if(!Y()){re=0,de=0;return}if(Z(),re-=1,re<=0){de=0;return}de=requestAnimationFrame(W)}function ie(m=6){Y()&&(de&&(cancelAnimationFrame(de),de=0),re=Math.max(m,1),de=requestAnimationFrame(W))}function se(){ie(3)}function we(){if(!Y())return;const m=M.value;if(!m)return;const E=m.querySelectorAll("img.message-image-preview");for(const I of E)I.complete||te.has(I)||(te.add(I),I.addEventListener("load",se,{once:!0}),I.addEventListener("error",se,{once:!0}))}async function Ce(){await qt(),le&&cancelAnimationFrame(le),le=requestAnimationFrame(()=>{le=0,ne(),we(),ie()})}ft(()=>B.messages,async m=>{if(!B.isLoading){for(const E of m){if(E.messageType!=="commandExecution"||!E.commandExecution)continue;const I=o.value[E.id],J=E.commandExecution.status;I==="inProgress"&&J!=="inProgress"&&$(E.id),o.value[E.id]=J}await Ce()}}),ft(()=>B.liveOverlay,async m=>{m&&(await qt(),Z(),ie(8))},{deep:!0}),ft(()=>B.isLoading,async m=>{m||await Ce()}),ft(()=>B.activeThreadId,()=>{F.value="",fe.value=new Set},{flush:"post"});function $e(){const m=M.value;!m||B.isLoading||O(m)}function Oe(m){F.value=Se(m)}function Fe(m,E){return`${m}:${String(E)}`}function Ue(m,E){const I=new Set(fe.value);I.add(Fe(m,E)),fe.value=I}function N(m,E){return fe.value.has(Fe(m,E))}function K(){F.value=""}return Bn(()=>{le&&cancelAnimationFrame(le),de&&cancelAnimationFrame(de)}),(m,E)=>(_(),S("section",Im,[e.isLoading?(_(),S("p",Rm,"Loading messages...")):e.messages.length===0&&e.pendingRequests.length===0&&!e.liveOverlay?(_(),S("p",$m," No messages in this thread yet. ")):(_(),S("ul",{key:2,ref_key:"conversationListRef",ref:M,class:"conversation-list",onScroll:$e},[(_(!0),S(De,null,ht(e.pendingRequests,I=>(_(),S("li",{key:`server-request:${I.id}`,class:"conversation-item conversation-item-request"},[w("div",Mm,[w("div",Pm,[w("article",Nm,[w("p",Om,ke(I.method),1),w("p",jm,"Request #"+ke(I.id)+" · "+ke(rt(I.receivedAtIso)),1),tt(I)?(_(),S("p",Lm,ke(tt(I)),1)):pe("",!0),I.method==="item/commandExecution/requestApproval"?(_(),S("section",Dm,[w("button",{type:"button",class:"request-button request-button-primary",onClick:J=>C(I.id,"accept")},"Accept",8,Bm),w("button",{type:"button",class:"request-button",onClick:J=>C(I.id,"acceptForSession")},"Accept for Session",8,Fm),w("button",{type:"button",class:"request-button",onClick:J=>C(I.id,"decline")},"Decline",8,Hm),w("button",{type:"button",class:"request-button",onClick:J=>C(I.id,"cancel")},"Cancel",8,Um)])):I.method==="item/fileChange/requestApproval"?(_(),S("section",Vm,[w("button",{type:"button",class:"request-button request-button-primary",onClick:J=>C(I.id,"accept")},"Accept",8,qm),w("button",{type:"button",class:"request-button",onClick:J=>C(I.id,"acceptForSession")},"Accept for Session",8,Wm),w("button",{type:"button",class:"request-button",onClick:J=>C(I.id,"decline")},"Decline",8,Km),w("button",{type:"button",class:"request-button",onClick:J=>C(I.id,"cancel")},"Cancel",8,Gm)])):I.method==="item/tool/requestUserInput"?(_(),S("section",zm,[(_(!0),S(De,null,ht(qe(I),J=>(_(),S("div",{key:`${I.id}:${J.id}`,class:"request-question"},[w("p",Ym,ke(J.header||J.question),1),J.header&&J.question?(_(),S("p",Jm,ke(J.question),1)):pe("",!0),w("select",{class:"request-select",value:ut(I.id,J.id,J.options[0]||""),onChange:ge=>Te(I.id,J.id,ge)},[(_(!0),S(De,null,ht(J.options,ge=>(_(),S("option",{key:`${I.id}:${J.id}:${ge}`,value:ge},ke(ge),9,Xm))),128))],40,Qm),J.isOther?(_(),S("input",{key:1,class:"request-input",type:"text",value:ue(I.id,J.id),placeholder:"Other answer",onInput:ge=>he(I.id,J.id,ge)},null,40,Zm)):pe("",!0)]))),128)),w("button",{type:"button",class:"request-button request-button-primary",onClick:J=>z(I)}," Submit Answers ",8,eg)])):I.method==="item/tool/call"?(_(),S("section",tg,[w("button",{type:"button",class:"request-button request-button-primary",onClick:J=>ee(I.id)},"Fail Tool Call",8,ng),w("button",{type:"button",class:"request-button",onClick:J=>ye(I.id)},"Success (Empty)",8,rg)])):(_(),S("section",sg,[w("button",{type:"button",class:"request-button request-button-primary",onClick:J=>xe(I.id)},"Return Empty Result",8,og),w("button",{type:"button",class:"request-button",onClick:J=>p(I.id)},"Reject Request",8,ig)]))])])])]))),128)),(_(!0),S(De,null,ht(e.messages,I=>{var J,ge;return _(),S("li",{key:I.id,class:lt(["conversation-item",{"conversation-item-rollbackable":v(I)}]),"data-role":I.role,"data-message-type":I.messageType||""},[i(I)?(_(),S("div",lg,[w("div",cg,[w("button",{type:"button",class:lt(["cmd-row",[b(I),{"cmd-expanded":a(I)}]]),onClick:Ae=>d(I)},[w("span",{class:lt(["cmd-chevron",{"cmd-chevron-open":a(I)}])},"▶",2),w("code",dg,ke(((J=I.commandExecution)==null?void 0:J.command)||"(command)"),1),w("span",fg,ke(g(I)),1)],10,ug),w("div",{class:lt(["cmd-output-wrap",{"cmd-output-visible":a(I),"cmd-output-collapsing":l(I)}])},[w("div",hg,[w("pre",pg,ke(((ge=I.commandExecution)==null?void 0:ge.aggregatedOutput)||"(no output)"),1)])],2)])])):(_(),S("div",{key:1,class:"message-row","data-role":I.role,"data-message-type":I.messageType||""},[w("div",{class:"message-stack","data-role":I.role},[w("article",{class:"message-body","data-role":I.role},[I.images&&I.images.length>0?(_(),S("ul",{key:0,class:"message-image-list","data-role":I.role},[(_(!0),S(De,null,ht(I.images,Ae=>(_(),S("li",{key:Ae,class:"message-image-item"},[w("button",{class:"message-image-button",type:"button",onClick:ze=>Oe(Ae)},[w("img",{class:"message-image-preview",src:Se(Ae),alt:"Message image preview",loading:"lazy"},null,8,bg)],8,wg)]))),128))],8,yg)):pe("",!0),I.fileAttachments&&I.fileAttachments.length>0?(_(),S("div",_g,[(_(!0),S(De,null,ht(I.fileAttachments,Ae=>(_(),S("span",{key:Ae.path,class:"message-file-chip"},[E[2]||(E[2]=w("span",{class:"message-file-chip-icon"},"📄",-1)),w("span",{class:"message-file-chip-name",title:Ae.path},ke(Ae.label),9,kg)]))),128))])):pe("",!0),I.text.length>0?(_(),S("article",{key:2,class:"message-card","data-role":I.role},[I.messageType==="worked"?(_(),S("div",Sg,[w("button",{type:"button",class:"worked-separator",onClick:Ae=>c(I)},[E[3]||(E[3]=w("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1)),w("span",{class:lt(["worked-chevron",{"worked-chevron-open":f(I)}])},"▶",2),w("p",Cg,ke(I.text),1),E[4]||(E[4]=w("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1))],8,xg),f(I)?(_(),S("div",Ag,[(_(!0),S(De,null,ht(A(e.messages,e.messages.indexOf(I)),Ae=>{var ze,be;return _(),S("div",{key:`worked-cmd-${Ae.id}`,class:"worked-cmd-item"},[w("button",{type:"button",class:lt(["cmd-row",[b(Ae),{"cmd-expanded":a(Ae)}]]),onClick:me=>d(Ae)},[w("span",{class:lt(["cmd-chevron",{"cmd-chevron-open":a(Ae)}])},"▶",2),w("code",Ig,ke(((ze=Ae.commandExecution)==null?void 0:ze.command)||"(command)"),1),w("span",Rg,ke(g(Ae)),1)],10,Eg),w("div",{class:lt(["cmd-output-wrap",{"cmd-output-visible":a(Ae),"cmd-output-collapsing":l(Ae)}])},[w("div",$g,[w("pre",Mg,ke(((be=Ae.commandExecution)==null?void 0:be.aggregatedOutput)||"(no output)"),1)])],2)])}),128))])):pe("",!0)])):(_(),S("div",Pg,[(_(!0),S(De,null,ht(Le(I.text),(Ae,ze)=>(_(),S(De,{key:`block-${ze}`},[Ae.kind==="text"?(_(),S("p",Ng,[(_(!0),S(De,null,ht(Ze(Ae.value),(be,me)=>(_(),S(De,{key:`seg-${ze}-${me}`},[be.kind==="text"?(_(),S("span",Og,ke(be.value),1)):be.kind==="file"?(_(),S("a",{key:1,class:"message-file-link",href:"#",onClick:E[0]||(E[0]=ct(()=>{},["prevent"]))},ke(be.displayName),1)):(_(),S("code",jg,ke(be.value),1))],64))),128))])):N(I.id,ze)?(_(),S("p",Lg,ke(Ae.markdown),1)):(_(),S("button",{key:2,class:"message-image-button",type:"button",onClick:be=>Oe(Ae.url)},[w("img",{class:"message-image-preview message-markdown-image",src:Ae.url,alt:Ae.alt||"Embedded message image",loading:"lazy",onError:be=>Ue(I.id,ze)},null,40,Bg)],8,Dg))],64))),128))]))],8,Tg)):pe("",!0)],8,vg),v(I)?(_(),S("button",{key:0,class:"rollback-button",type:"button",title:"Rollback to this message (remove this turn and all after it)",onClick:Ae=>x(I)},[Ee(Em,{class:"rollback-icon"}),E[5]||(E[5]=w("span",{class:"rollback-label"},"Rollback",-1))],8,Fg)):pe("",!0)],8,gg)],8,mg))],10,ag)}),128)),e.liveOverlay?(_(),S("li",Hg,[w("div",Ug,[w("div",Vg,[w("article",qg,[w("p",Wg,ke(e.liveOverlay.activityLabel),1),e.liveOverlay.reasoningText?(_(),S("p",Kg,ke(e.liveOverlay.reasoningText),1)):pe("",!0),e.liveOverlay.errorText?(_(),S("p",Gg,ke(e.liveOverlay.errorText),1)):pe("",!0)])])])])):pe("",!0),w("li",{ref_key:"bottomAnchorRef",ref:V,class:"conversation-bottom-anchor"},null,512)],544)),F.value.length>0?(_(),S("div",{key:3,class:"image-modal-backdrop",onClick:K},[w("div",{class:"image-modal-content",onClick:E[1]||(E[1]=ct(()=>{},["stop"]))},[w("button",{class:"image-modal-close",type:"button","aria-label":"Close image preview",onClick:K},[Ee(ti,{class:"icon-svg"})]),w("img",{class:"image-modal-image",src:F.value,alt:"Expanded message image"},null,8,zg)])])):pe("",!0)]))}}),Qg=Ge(Jg,[["__scopeId","data-v-857238be"]]);function Xg(e){var c;const t=H("idle"),n=H(typeof navigator<"u"&&!!((c=navigator.mediaDevices)!=null&&c.getUserMedia));let r=null,s=null,o=[];async function i(){var f;if(!(t.value!=="idle"||!n.value))try{s=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1}}),o=[],r=new MediaRecorder(s),r.ondataavailable=g=>{g.data.size>0&&o.push(g.data)},r.onstop=()=>{var $;const g=o,b=(r==null?void 0:r.mimeType)||(($=g[0])==null?void 0:$.type)||"audio/webm";d(),t.value="idle",l(g,b)},r.start(),t.value="recording"}catch(g){d(),(f=e.onError)==null||f.call(e,g)}}function a(){t.value!=="recording"||!r||r.state!=="inactive"&&r.stop()}async function l(f,g){var $;if(f.length===0)return;const b=new Blob(f,{type:g});try{const A=g.split(/[/;]/)[1]??"webm",B=`----codex-transcribe-${crypto.randomUUID()}`,q=new Uint8Array(await b.arrayBuffer()),M=new TextEncoder,V=[];V.push(M.encode(`--${B}\r
27
+ `)),V.push(M.encode(`Content-Disposition: form-data; name="file"; filename="codex.${A}"\r
28
+ `)),V.push(M.encode(`Content-Type: ${g}\r
29
+ \r
30
+ `)),V.push(q),V.push(M.encode(`\r
31
+ --${B}--\r
32
+ `));let F=0;for(const te of V)F+=te.byteLength;const ae=new Uint8Array(F);let oe=0;for(const te of V)ae.set(te,oe),oe+=te.byteLength;const le=await fetch("/codex-api/transcribe",{method:"POST",headers:{"Content-Type":`multipart/form-data; boundary=${B}`},body:ae});if(!le.ok)throw new Error(`Transcription failed: ${le.status}`);const re=((await le.json()).text??"").trim();re.length>0&&e.onTranscript(re)}catch(A){($=e.onError)==null||$.call(e,A)}finally{t.value!=="recording"&&(t.value="idle")}}function d(){r&&(r.ondataavailable=null,r.onstop=null,r=null),s&&(s.getTracks().forEach(f=>f.stop()),s=null),o=[]}return Bn(d),{state:t,isSupported:n,startRecording:i,stopRecording:a}}function Sa(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}class vn extends Error{constructor(t,n){super(t),this.name="CodexApiError",this.code=n.code,this.method=n.method,this.status=n.status}}function ni(e,t){const n=Sa(e);if(!n)return t;const r=n.error;if(typeof r=="string"&&r.length>0)return r;const s=Sa(r);return s&&typeof s.message=="string"&&s.message.length>0?s.message:t}function br(e,t,n){return e instanceof vn?e:e instanceof Error?new vn(e.message||t,{code:"unknown_error",method:n}):new vn(t,{code:"unknown_error",method:n})}function mc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}async function Zg(e,t){const n={method:e,params:t??null};let r;try{r=await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch(i){throw new vn(i instanceof Error?i.message:`RPC ${e} failed before request was sent`,{code:"network_error",method:e})}let s=null;try{s=await r.json()}catch{s=null}if(!r.ok)throw new vn(ni(s,`RPC ${e} failed with HTTP ${r.status}`),{code:"http_error",method:e,status:r.status});const o=s;if(!o||typeof o!="object"||!("result"in o))throw new vn(`RPC ${e} returned malformed envelope`,{code:"invalid_response",method:e,status:r.status});return o.result}function ev(e){const t=mc(e);if(!t||typeof t.method!="string"||t.method.length===0)return null;const n=typeof t.atIso=="string"&&t.atIso.length>0?t.atIso:new Date().toISOString();return{method:t.method,params:t.params??null,atIso:n}}function tv(e){if(typeof window>"u"||typeof EventSource>"u")return()=>{};const t=new EventSource("/codex-api/events");return t.onmessage=n=>{try{const r=JSON.parse(n.data),s=ev(r);s&&e(s)}catch{}},()=>{t.close()}}async function nv(e){let t;try{t=await fetch("/codex-api/server-requests/respond",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(r){throw new vn(r instanceof Error?r.message:"Failed to reply to server request",{code:"network_error",method:"server-requests/respond"})}let n=null;try{n=await t.json()}catch{n=null}if(!t.ok)throw new vn(ni(n,`Server request reply failed with HTTP ${t.status}`),{code:"http_error",method:"server-requests/respond",status:t.status})}async function rv(){const e=await fetch("/codex-api/server-requests/pending");let t=null;try{t=await e.json()}catch{t=null}if(!e.ok)throw new vn(ni(t,`Pending server requests failed with HTTP ${e.status}`),{code:"http_error",method:"server-requests/pending",status:e.status});const n=mc(t),r=n==null?void 0:n.data;return Array.isArray(r)?r:[]}function xa(e){return new Date(e*1e3).toISOString()}function sv(e){return e.split("/").filter(Boolean).at(-1)||e||"unknown-project"}function ov(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}const iv=/^##\s+(.+?):\s+(.+?)\s*$/,av=/^#\s*files mentioned by the user\s*:?\s*$/i;function lv(e){var s,o;const t=e.split(`
33
+ `).findIndex(i=>av.test(i.trim()));if(t<0)return[];const n=e.split(`
34
+ `).slice(t+1),r=[];for(const i of n){const a=i.trim();if(!a)continue;const l=a.match(iv);if(!l)break;const d=(s=l[1])==null?void 0:s.trim(),c=(o=l[2])==null?void 0:o.trim().replace(/\s+\((?:lines?\s+\d+(?:-\d+)?)\)\s*$/,"");d&&c&&r.push({label:d,path:c})}return r}function cv(e){const t=/(?:^|\n)\s{0,3}#{0,6}\s*my request for codex\s*:?\s*/giu,n=Array.from(e.matchAll(t));if(n.length===0)return e.trim();const r=n.at(-1);if(!r||typeof r.index!="number")return e.trim();const s=r.index+r[0].length;return e.slice(s).trim()}function uv(e,t){if(!Array.isArray(t))return{text:"",images:[],fileAttachments:[],rawBlocks:[]};const n=[],r=[],s=[];for(const[a,l]of t.entries())l.type==="text"&&typeof l.text=="string"&&l.text.length>0&&n.push(l.text),l.type==="image"&&typeof l.url=="string"&&l.url.trim().length>0&&r.push(l.url.trim()),l.type!=="text"&&l.type!=="image"&&s.push({id:`${e}:user-content:${a}`,role:"user",text:"",messageType:`userContent.${l.type}`,rawPayload:ov(l),isUnhandled:!0});const o=n.join(`
35
+ `),i=lv(o);return{text:cv(o),images:r,fileAttachments:i,rawBlocks:s}}function dv(e){if(e.type==="agentMessage")return[{id:e.id,role:"assistant",text:e.text,messageType:e.type}];if(e.type==="userMessage"){const t=uv(e.id,e.content),n=[];return(t.text.length>0||t.images.length>0||t.fileAttachments.length>0)&&n.push({id:e.id,role:"user",text:t.text,images:t.images,fileAttachments:t.fileAttachments.length>0?t.fileAttachments:void 0,messageType:e.type}),n.push(...t.rawBlocks),n.length===0?[]:n}if(e.type==="reasoning")return[];if(e.type==="commandExecution"){const t=e,n=fv(t.status),r=typeof t.command=="string"?t.command:"",s=typeof t.cwd=="string"?t.cwd:null,o=typeof t.aggregatedOutput=="string"?t.aggregatedOutput:"",i=typeof t.exitCode=="number"?t.exitCode:null;return[{id:e.id,role:"system",text:r,messageType:"commandExecution",commandExecution:{command:r,cwd:s,status:n,aggregatedOutput:o,exitCode:i}}]}return[]}function fv(e){return e==="completed"||e==="failed"||e==="declined"||e==="interrupted"?e:e==="inProgress"||e==="in_progress"?"inProgress":"completed"}function hv(e){const t=[e.preview];for(const n of t)if(typeof n=="string"&&n.trim().length>0)return n.trim();return""}function pv(e){const t=hv(e);return t.length>0?t:"Untitled thread"}function mv(e){const t=e,n=typeof t.cwd=="string"?t.cwd:e.cwd,r=t.isWorktree===!0||t.worktree===!0||t.worktreeId!==void 0||t.worktreePath!==void 0||n.includes("/.codex/worktrees/")||n.includes("/.git/worktrees/");return{id:e.id,title:pv(e),projectName:sv(e.cwd),cwd:e.cwd,hasWorktree:r,createdAtIso:xa(e.createdAt),updatedAtIso:xa(e.updatedAt),preview:e.preview,unread:!1,inProgress:!1}}function gv(e){const t=new Map;for(const n of e){const r=t.get(n.projectName);r?r.push(n):t.set(n.projectName,[n])}return Array.from(t.entries()).map(([n,r])=>({projectName:n,threads:r.sort((s,o)=>new Date(o.updatedAtIso).getTime()-new Date(s.updatedAtIso).getTime())})).sort((n,r)=>{var i,a;const s=new Date(((i=n.threads[0])==null?void 0:i.updatedAtIso)??0).getTime();return new Date(((a=r.threads[0])==null?void 0:a.updatedAtIso)??0).getTime()-s})}function vv(e){const t=e.data.map(mv);return gv(t)}function gc(e){const t=Array.isArray(e.thread.turns)?e.thread.turns:[],n=[];for(let r=0;r<t.length;r++){const s=t[r],o=Array.isArray(s.items)?s.items:[];for(const i of o)for(const a of dv(i))n.push({...a,turnIndex:r})}return n}async function Kt(e,t){try{return await Zg(e,t)}catch(n){throw br(n,`RPC ${e} failed`,e)}}function yv(e){return typeof e=="string"&&["none","minimal","low","medium","high","xhigh"].includes(e)?e:""}async function wv(){const e=await Kt("thread/list",{archived:!1,limit:100,sortKey:"updated_at"});return vv(e)}async function bv(e){const t=await Kt("thread/read",{threadId:e,includeTurns:!0});return gc(t)}async function _v(){try{return await wv()}catch(e){throw br(e,"Failed to load thread groups","thread/list")}}async function kv(e){try{return await bv(e)}catch(t){throw br(t,`Failed to load thread ${e}`,"thread/read")}}function Tv(e){return tv(e)}async function Sv(e,t){await nv({id:e,...t})}async function xv(){return rv()}async function Ca(e){await Kt("thread/resume",{threadId:e})}async function Cv(e){await Kt("thread/archive",{threadId:e})}async function Av(e,t){const n=await Kt("thread/rollback",{threadId:e,numTurns:t});return gc(n)}function Ev(e){if(!e||typeof e!="object")return"";const n=e.thread;if(n&&typeof n=="object"){const r=n.id;if(typeof r=="string"&&r.length>0)return r}return""}async function Iv(e,t){try{const n={};typeof e=="string"&&e.trim().length>0&&(n.cwd=e.trim()),typeof t=="string"&&t.trim().length>0&&(n.model=t.trim());const r=await Kt("thread/start",n),s=Ev(r);if(!s)throw new Error("thread/start did not return a thread id");return s}catch(n){throw br(n,"Failed to start a new thread","thread/start")}}function Rv(e,t){if(t.length===0)return e;let n=`# Files mentioned by the user:
36
+ `;for(const r of t)n+=`
37
+ ## ${r.label}: ${r.path}
38
+ `;return`${n}
39
+ ## My request for Codex:
40
+
41
+ ${e}
42
+ `}async function $v(e,t,n=[],r,s,o,i=[]){try{const l=[{type:"text",text:Rv(t,i)}];for(const f of n){const g=f.trim();g&&l.push({type:"image",url:g,image_url:g})}if(o)for(const f of o)l.push({type:"skill",name:f.name,path:f.path});const d=i.map(f=>({label:f.label,path:f.path,fsPath:f.fsPath})),c={threadId:e,input:l};d.length>0&&(c.attachments=d),typeof r=="string"&&r.length>0&&(c.model=r),typeof s=="string"&&s.length>0&&(c.effort=s),await Kt("turn/start",c)}catch(a){throw br(a,`Failed to start turn for thread ${e}`,"turn/start")}}async function Mv(e,t){const n=e.trim(),r=(t==null?void 0:t.trim())||"";if(n)try{if(!r)throw new Error("turn/interrupt requires turnId");await Kt("turn/interrupt",{threadId:n,turnId:r})}catch(s){throw br(s,`Failed to interrupt turn for thread ${n}`,"turn/interrupt")}}async function Pv(){const e=await Kt("model/list",{}),t=[];for(const n of e.data){const r=n.id||n.model;!r||t.includes(r)||t.push(r)}return t}async function Nv(){const e=await Kt("config/read",{}),t=e.config.model??"",n=yv(e.config.model_reasoning_effort);return{model:t,reasoningEffort:n}}function Ov(e){const t=e&&typeof e=="object"&&!Array.isArray(e)?e:{},n=o=>{if(!Array.isArray(o))return[];const i=[];for(const a of o)typeof a=="string"&&a.length>0&&!i.includes(a)&&i.push(a);return i},r=t.labels,s={};if(r&&typeof r=="object"&&!Array.isArray(r))for(const[o,i]of Object.entries(r))typeof o=="string"&&o.length>0&&typeof i=="string"&&(s[o]=i);return{order:n(t.order),labels:s,active:n(t.active)}}async function Aa(){const e=await fetch("/codex-api/workspace-roots-state"),t=await e.json();if(!e.ok)throw new Error("Failed to load workspace roots state");const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return Ov(n.data)}async function Ea(){const e=await fetch("/codex-api/home-directory"),t=await e.json();if(!e.ok)throw new Error("Failed to load home directory");const n=t&&typeof t=="object"&&!Array.isArray(t)?t:{},r=n.data&&typeof n.data=="object"&&!Array.isArray(n.data)?n.data:{};return typeof r.path=="string"?r.path.trim():""}async function jv(e){if(!(await fetch("/codex-api/workspace-roots-state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save workspace roots state")}async function Lv(e,t){const n=await fetch("/codex-api/project-root",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,createIfMissing:(t==null?void 0:t.createIfMissing)===!0,label:(t==null?void 0:t.label)??""})}),r=await n.json();if(!n.ok){const a=ri(r,"Failed to open project root");throw new Error(a)}const s=r&&typeof r=="object"&&!Array.isArray(r)?r:{},o=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{};return typeof o.path=="string"?o.path.trim():""}async function Dv(e){const t=new URLSearchParams({basePath:e}),n=await fetch(`/codex-api/project-root-suggestion?${t.toString()}`),r=await n.json();if(!n.ok){const i=ri(r,"Failed to suggest project name");throw new Error(i)}const s=r&&typeof r=="object"&&!Array.isArray(r)?r:{},o=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{};return{name:typeof o.name=="string"?o.name.trim():"",path:typeof o.path=="string"?o.path.trim():""}}async function Bv(e,t,n=20){const r=e.trim();if(!r)return[];const s=await fetch("/codex-api/composer-file-search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cwd:r,query:t.trim(),limit:n})}),o=await s.json();if(!s.ok){const d=ri(o,"Failed to search files");throw new Error(d)}const i=o&&typeof o=="object"&&!Array.isArray(o)?o:{},a=Array.isArray(i.data)?i.data:[],l=[];for(const d of a){if(!d||typeof d!="object"||Array.isArray(d))continue;const f=d.path,g=typeof f=="string"?f.trim():"";g&&l.push({path:g})}return l}function ri(e,t){const r=(e&&typeof e=="object"&&!Array.isArray(e)?e:{}).error;return typeof r=="string"&&r.trim().length>0?r:t}async function Fv(){try{const e=await fetch("/codex-api/thread-titles");return e.ok?(await e.json()).data??{titles:{},order:[]}:{titles:{},order:[]}}catch{return{titles:{},order:[]}}}async function Ia(e,t){try{await fetch("/codex-api/thread-titles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,title:t})})}catch{}}async function Hv(e,t){var n;try{return((n=(await Kt("generate-thread-title",{prompt:e,cwd:t})).title)==null?void 0:n.trim())??""}catch{return""}}async function Uv(e){try{const t={};e&&e.length>0&&(t.cwds=e);const n=await Kt("skills/list",t),r=[],s=new Set;for(const o of n.data)for(const i of o.skills)!i.name||s.has(i.path)||(s.add(i.path),r.push({name:i.name,description:i.shortDescription||i.description||"",path:i.path,scope:i.scope,enabled:i.enabled}));return r}catch{return[]}}async function Vv(e){try{const t=new FormData;t.append("file",e);const n=await fetch("/codex-api/upload-file",{method:"POST",body:t});return n.ok?(await n.json()).path??null:null}catch{return null}}const qv={},Wv={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Kv(e,t){return _(),S("svg",Wv,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m12 5l0 14m-6-8l6-6l6 6"},null,-1)])])}const Gv=Ge(qv,[["render",Kv]]),zv={},Yv={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function Jv(e,t){return _(),S("svg",Yv,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 2m0 3a3 3 0 0 1 3-3h0a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3h0a3 3 0 0 1-3-3zM5 10a7 7 0 0 0 14 0M8 21h8M12 17v4"},null,-1)])])}const Qv=Ge(zv,[["render",Jv]]),Xv={},Zv={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function ey(e,t){return _(),S("svg",Zv,[...t[0]||(t[0]=[w("path",{stroke:"none",fill:"none",d:"M0 0h24v24H0z"},null,-1),w("path",{fill:"currentColor",d:"M8 5a3 3 0 0 0 -3 3v8a3 3 0 0 0 3 3h8a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-8z"},null,-1)])])}const ty=Ge(Xv,[["render",ey]]),ny=["disabled"],ry={class:"composer-dropdown-value"},sy={class:"composer-dropdown-menu"},oy={key:0,class:"composer-dropdown-search-wrap"},iy=["placeholder","onKeydown"],ay={class:"composer-dropdown-options",role:"listbox"},ly=["onClick"],cy={key:0,class:"composer-dropdown-empty"},uy={key:1,class:"composer-dropdown-add-wrap"},dy=["placeholder","onKeydown"],fy=kt({__name:"ComposerDropdown",props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean},openDirection:{},enableSearch:{type:Boolean},searchPlaceholder:{},showAddAction:{type:Boolean},addActionLabel:{},defaultAddValue:{},addPlaceholder:{}},emits:["update:modelValue","add"],setup(e,{emit:t}){const n=e,r=t,s=H(null),o=H(null),i=H(null),a=H(!1),l=H(""),d=H(!1),c=H(""),f=ce(()=>{var fe;const te=n.options.find(X=>X.value===n.modelValue);return te?te.label:((fe=n.placeholder)==null?void 0:fe.trim())||""}),g=ce(()=>n.openDirection??"down"),b=ce(()=>n.enableSearch===!0),$=ce(()=>n.showAddAction===!0),A=ce(()=>{var te;return((te=n.searchPlaceholder)==null?void 0:te.trim())||"Quick search projects"}),B=ce(()=>{var te;return((te=n.addActionLabel)==null?void 0:te.trim())||"Add new project"}),q=ce(()=>{var te;return((te=n.addPlaceholder)==null?void 0:te.trim())||"Project name or absolute path"}),M=ce(()=>{const te=l.value.trim().toLowerCase();return te?n.options.filter(fe=>fe.label.toLowerCase().includes(te)||fe.value.toLowerCase().includes(te)):n.options});function V(){n.disabled||(a.value=!a.value)}function F(te){r("update:modelValue",te),a.value=!1,l.value=""}function ae(){var te;d.value=!0,c.value=((te=n.defaultAddValue)==null?void 0:te.trim())||"",qt(()=>{var fe;return(fe=i.value)==null?void 0:fe.focus()})}function oe(){if(l.value.length>0){l.value="";return}a.value=!1}function le(){const te=c.value.trim();te&&(r("add",te),d.value=!1,c.value="",a.value=!1,l.value="")}function de(){d.value=!1,c.value="",qt(()=>{var te;return(te=o.value)==null?void 0:te.focus()})}function re(te){if(!a.value)return;const fe=s.value;if(!fe)return;const X=te.target;X instanceof Node&&(fe.contains(X)||(a.value=!1,l.value="",d.value=!1,c.value=""))}return ft(a,te=>{if(!te){d.value=!1,c.value="";return}b.value&&qt(()=>{var fe;return(fe=o.value)==null?void 0:fe.focus()})}),Dn(()=>{window.addEventListener("pointerdown",re)}),Bn(()=>{window.removeEventListener("pointerdown",re)}),(te,fe)=>(_(),S("div",{ref_key:"rootRef",ref:s,class:"composer-dropdown"},[w("button",{class:"composer-dropdown-trigger",type:"button",disabled:e.disabled,onClick:V},[w("span",ry,ke(f.value),1),Ee(ei,{class:"composer-dropdown-chevron"})],8,ny),a.value?(_(),S("div",{key:0,class:lt(["composer-dropdown-menu-wrap",{"composer-dropdown-menu-wrap-up":g.value==="up","composer-dropdown-menu-wrap-down":g.value==="down"}])},[w("div",sy,[b.value?(_(),S("div",oy,[Nn(w("input",{ref_key:"searchInputRef",ref:o,"onUpdate:modelValue":fe[0]||(fe[0]=X=>l.value=X),class:"composer-dropdown-search-input",type:"text",placeholder:A.value,onKeydown:Ht(ct(oe,["prevent"]),["esc"])},null,40,iy),[[jn,l.value]])])):pe("",!0),w("ul",ay,[(_(!0),S(De,null,ht(M.value,X=>(_(),S("li",{key:X.value},[w("button",{class:lt(["composer-dropdown-option",{"is-selected":X.value===e.modelValue}]),type:"button",onClick:Me=>F(X.value)},ke(X.label),11,ly)]))),128)),M.value.length===0?(_(),S("li",cy," No matching projects ")):pe("",!0)]),$.value?(_(),S("div",uy,[d.value?(_(),S(De,{key:0},[Nn(w("input",{ref_key:"addInputRef",ref:i,"onUpdate:modelValue":fe[1]||(fe[1]=X=>c.value=X),class:"composer-dropdown-add-input",type:"text",placeholder:q.value,onKeydown:[Ht(ct(le,["prevent"]),["enter"]),Ht(ct(de,["prevent"]),["esc"])]},null,40,dy),[[jn,c.value]]),w("div",{class:"composer-dropdown-add-actions"},[w("button",{type:"button",class:"composer-dropdown-add-btn",onClick:le},"Open"),w("button",{type:"button",class:"composer-dropdown-add-btn",onClick:de},"Cancel")])],64)):(_(),S("button",{key:1,type:"button",class:"composer-dropdown-add",onClick:ae},ke(B.value),1))])):pe("",!0)])],2)):pe("",!0)],512))}}),Ao=Ge(fy,[["__scopeId","data-v-8fdced75"]]),hy=["disabled"],py={class:"search-dropdown-value"},my={class:"search-dropdown-search-wrap"},gy=["placeholder","onKeydown"],vy={key:0,class:"search-dropdown-list",role:"listbox"},yy=["onClick","onPointerenter"],wy={class:"search-dropdown-option-check"},by={class:"search-dropdown-option-label"},_y={key:0,class:"search-dropdown-option-desc"},ky={key:1,class:"search-dropdown-empty"},Ty=kt({__name:"ComposerSearchDropdown",props:{options:{},selectedValues:{},placeholder:{},searchPlaceholder:{},disabled:{type:Boolean},openDirection:{}},emits:["toggle"],setup(e,{emit:t}){const n=e,r=t,s=H(null),o=H(null),i=H(!1),a=H(""),l=H(0),d=ce(()=>n.openDirection??"down"),c=ce(()=>new Set(n.selectedValues)),f=ce(()=>{if(n.selectedValues.length===0)return n.placeholder||"Select...";if(n.selectedValues.length===1){const M=n.options.find(V=>V.value===n.selectedValues[0]);return(M==null?void 0:M.label)||n.placeholder||"Select..."}return`${n.selectedValues.length} selected`}),g=ce(()=>{const M=a.value.toLowerCase().trim();return M?n.options.filter(V=>{var F;return V.label.toLowerCase().includes(M)||(((F=V.description)==null?void 0:F.toLowerCase().includes(M))??!1)}):n.options});function b(){n.disabled||(i.value=!i.value,i.value&&(a.value="",l.value=0,qt(()=>{var M;return(M=o.value)==null?void 0:M.focus()})))}function $(M){r("toggle",M.value,!c.value.has(M.value))}function A(M){g.value.length!==0&&(l.value=(l.value+M+g.value.length)%g.value.length)}function B(){const M=g.value[l.value];M&&$(M)}function q(M){if(!i.value)return;const V=s.value;if(!V)return;const F=M.target;F instanceof Node&&(V.contains(F)||(i.value=!1))}return ft(a,()=>{l.value=0}),Dn(()=>window.addEventListener("pointerdown",q)),Bn(()=>window.removeEventListener("pointerdown",q)),(M,V)=>(_(),S("div",{ref_key:"rootRef",ref:s,class:"search-dropdown"},[w("button",{class:"search-dropdown-trigger",type:"button",disabled:e.disabled,onClick:b},[w("span",py,ke(f.value),1),Ee(ei,{class:"search-dropdown-chevron"})],8,hy),i.value?(_(),S("div",{key:0,class:lt(["search-dropdown-menu-wrap",{"search-dropdown-menu-wrap-up":d.value==="up","search-dropdown-menu-wrap-down":d.value==="down"}])},[w("div",my,[Nn(w("input",{ref_key:"searchRef",ref:o,"onUpdate:modelValue":V[0]||(V[0]=F=>a.value=F),class:"search-dropdown-search",type:"text",placeholder:e.searchPlaceholder,onKeydown:[V[1]||(V[1]=Ht(ct(F=>i.value=!1,["prevent"]),["escape"])),Ht(ct(B,["prevent"]),["enter"]),V[2]||(V[2]=Ht(ct(F=>A(1),["prevent"]),["arrow-down"])),V[3]||(V[3]=Ht(ct(F=>A(-1),["prevent"]),["arrow-up"]))]},null,40,gy),[[jn,a.value]])]),g.value.length>0?(_(),S("ul",vy,[(_(!0),S(De,null,ht(g.value,(F,ae)=>(_(),S("li",{key:F.value},[w("button",{class:lt(["search-dropdown-option",{"is-selected":c.value.has(F.value),"is-highlighted":ae===l.value}]),type:"button",onClick:oe=>$(F),onPointerenter:oe=>l.value=ae},[w("span",wy,ke(c.value.has(F.value)?"✓":""),1),w("span",by,ke(F.label),1),F.description?(_(),S("span",_y,ke(F.description),1)):pe("",!0)],42,yy)]))),128))])):(_(),S("div",ky,"No results"))],2)):pe("",!0)],512))}}),Sy=Ge(Ty,[["__scopeId","data-v-4d3f2c83"]]),xy={class:"skill-picker-header"},Cy=["onKeydown"],Ay={key:0,class:"skill-picker-list",role:"listbox"},Ey=["onClick","onPointerenter"],Iy={class:"skill-picker-name"},Ry={key:0,class:"skill-picker-desc"},$y={key:1,class:"skill-picker-empty"},My=kt({__name:"ComposerSkillPicker",props:{skills:{},visible:{type:Boolean},anchorBottom:{},anchorLeft:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,r=t,s=H(null),o=H(null),i=H(""),a=H(0),l=ce(()=>{const g=i.value.toLowerCase().trim();return g?n.skills.filter(b=>b.name.toLowerCase().includes(g)||b.description.toLowerCase().includes(g)):n.skills}),d=ce(()=>{const g={};return n.anchorBottom!=null&&(g.bottom=`${n.anchorBottom}px`),n.anchorLeft!=null&&(g.left=`${n.anchorLeft}px`),g});function c(g){l.value.length!==0&&(a.value=(a.value+g+l.value.length)%l.value.length)}function f(){const g=l.value[a.value];g&&r("select",g)}return ft(()=>n.visible,g=>{g&&(i.value="",a.value=0,qt(()=>{var b;return(b=o.value)==null?void 0:b.focus()}))}),ft(i,()=>{a.value=0}),(g,b)=>e.visible?(_(),S("div",{key:0,ref_key:"rootRef",ref:s,class:"skill-picker",style:rr(d.value)},[w("div",xy,[Nn(w("input",{ref_key:"searchInputRef",ref:o,"onUpdate:modelValue":b[0]||(b[0]=$=>i.value=$),class:"skill-picker-search",type:"text",placeholder:"Search skills...",onKeydown:[b[1]||(b[1]=Ht(ct($=>g.$emit("close"),["prevent"]),["escape"])),Ht(ct(f,["prevent"]),["enter"]),b[2]||(b[2]=Ht(ct($=>c(1),["prevent"]),["arrow-down"])),b[3]||(b[3]=Ht(ct($=>c(-1),["prevent"]),["arrow-up"]))]},null,40,Cy),[[jn,i.value]])]),l.value.length>0?(_(),S("ul",Ay,[(_(!0),S(De,null,ht(l.value,($,A)=>(_(),S("li",{key:$.path},[w("button",{class:lt(["skill-picker-item",{"is-highlighted":A===a.value}]),type:"button",onClick:B=>g.$emit("select",$),onPointerenter:B=>a.value=A},[w("span",Iy,ke($.name),1),$.description?(_(),S("span",Ry,ke($.description),1)):pe("",!0)],42,Ey)]))),128))])):(_(),S("div",$y,"No skills found"))],4)):pe("",!0)}}),Py=Ge(My,[["__scopeId","data-v-d6a08788"]]),Ny={key:0,class:"thread-composer-attachments"},Oy=["src","alt"],jy=["aria-label","disabled","onClick"],Ly={key:1,class:"thread-composer-file-chips"},Dy=["title"],By=["aria-label","disabled","onClick"],Fy={key:2,class:"thread-composer-skill-chips"},Hy={class:"thread-composer-skill-chip-name"},Uy=["aria-label","onClick"],Vy={class:"thread-composer-input-wrap"},qy={key:0,class:"thread-composer-file-mentions"},Wy=["onMousedown"],Ky={key:1,class:"thread-composer-file-mention-icon-markdown"},Gy={class:"thread-composer-file-mention-text"},zy={class:"thread-composer-file-mention-name"},Yy={key:0,class:"thread-composer-file-mention-dir"},Jy={key:1,class:"thread-composer-file-mention-empty"},Qy=["placeholder","disabled"],Xy={class:"thread-composer-controls"},Zy=["disabled"],ew={key:0,class:"thread-composer-attach-menu"},tw=["disabled"],nw=["disabled"],rw={class:"thread-composer-actions"},sw=["aria-label","title","disabled"],ow=["disabled"],iw=["aria-label","title","disabled"],aw=["disabled"],lw=["disabled"],cw=kt({__name:"ThreadComposer",props:{activeThreadId:{},cwd:{},models:{},selectedModel:{},selectedReasoningEffort:{},skills:{},isTurnInProgress:{type:Boolean},isInterruptingTurn:{type:Boolean},disabled:{type:Boolean},hasQueueAbove:{type:Boolean}},emits:["submit","interrupt","update:selected-model","update:selected-reasoning-effort"],setup(e,{emit:t}){const n=e,r=t,s=H(""),o=H([]),i=H([]),a=H([]),{state:l,isSupported:d,startRecording:c,stopRecording:f}=Xg({onTranscript:N=>{s.value=s.value?`${s.value}
43
+ ${N}`:N}}),g=H(null),b=H(null),$=H(null),A=H(null),B=H(!1),q=H(!1),M=H(null),V=H(""),F=H([]),ae=H(!1),oe=H(0);let le=0,de=null;const re=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),te=[{value:"none",label:"None"},{value:"minimal",label:"Minimal"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"Extra high"}],fe=ce(()=>n.models.map(N=>({value:N,label:N}))),X=ce(()=>n.skills??[]),Me=ce(()=>i.value.map(N=>N.path)),We=ce(()=>(n.skills??[]).map(N=>({value:N.path,label:N.name,description:N.description}))),Ze=ce(()=>n.disabled||!n.activeThreadId?!1:s.value.trim().length>0||o.value.length>0||a.value.length>0),Se=ce(()=>n.disabled||!n.activeThreadId),Le=ce(()=>n.activeThreadId?"Type a message... (@ for files, / for skills)":"Select a thread to send a message");function Ie(N="steer"){var m;const K=s.value.trim();if(Ze.value){if(r("submit",{text:K,imageUrls:o.value.map(E=>E.url),fileAttachments:[...a.value],skills:i.value.map(E=>({name:E.name,path:E.path})),mode:N}),s.value="",o.value=[],i.value=[],a.value=[],B.value=!1,q.value=!1,O(),re){(m=A.value)==null||m.blur();return}qt(()=>{var E;return(E=A.value)==null?void 0:E.focus()})}}function rt(){r("interrupt")}function tt(N){r("update:selected-model",N)}function et(N){r("update:selected-reasoning-effort",N)}function qe(){Se.value||(B.value=!B.value)}function ut(){var N;(N=b.value)==null||N.click()}function ue(){var N;(N=$.value)==null||N.click()}function Te(N){o.value=o.value.filter(K=>K.id!==N)}function he(N){i.value=i.value.filter(K=>K.path!==N)}function C(N){a.value=a.value.filter(K=>K.fsPath!==N)}function z(N){const K=N.replace(/\\/g,"/");if(a.value.some(I=>I.fsPath===K))return;const m=K.split("/").filter(Boolean),E=m[m.length-1]??K;a.value=[...a.value,{label:E,path:K,fsPath:K}]}function ee(N){return N.type.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp)$/i.test(N.name)}function ye(N){if(!(!N||N.length===0))for(const K of Array.from(N))if(ee(K)){const m=new FileReader;m.onload=()=>{typeof m.result=="string"&&o.value.push({id:`${Date.now()}-${Math.random().toString(36).slice(2)}`,name:K.name,url:m.result})},m.readAsDataURL(K)}else Vv(K).then(m=>{m&&z(m)}).catch(()=>{})}function xe(N){N&&(N.value="")}function p(N){const K=N.target;ye((K==null?void 0:K.files)??null),xe(K),B.value=!1}function v(N){const K=N.target;ye((K==null?void 0:K.files)??null),xe(K),B.value=!1}function x(){const N=s.value;N==="/"?q.value=!0:q.value&&!N.startsWith("/")&&(q.value=!1),ne()}function L(N){if(ae.value){if(N.key==="Escape"){N.preventDefault(),O();return}if(N.key==="ArrowDown"){N.preventDefault(),F.value.length>0&&(oe.value=(oe.value+1)%F.value.length);return}if(N.key==="ArrowUp"){if(N.preventDefault(),F.value.length>0){const K=F.value.length;oe.value=(oe.value+K-1)%K}return}if(N.key==="Enter"||N.key==="Tab"){N.preventDefault();const K=F.value[oe.value];K?Y(K):O();return}}if(N.key==="Enter"&&!N.shiftKey){N.preventDefault(),Ie("steer");return}if(q.value){if(N.key==="Escape"){N.preventDefault(),U();return}if(N.key==="ArrowDown"||N.key==="ArrowUp"){N.preventDefault();return}}}function U(){var N;q.value=!1,(N=A.value)==null||N.focus()}function O(){ae.value=!1,M.value=null,V.value="",F.value=[],oe.value=0}function ne(){const N=A.value;if(!N){O();return}const K=N.selectionStart??s.value.length,E=s.value.slice(0,K).match(/(^|\s)(@[^\s@]*)$/);if(!E){O();return}const I=E[2]??"",J=I.length,ge=K-J;M.value=ge,V.value=I.slice(1),ae.value=!0,Z()}async function Z(){if(!ae.value)return;const N=(n.cwd??"").trim();if(!N){F.value=[];return}de&&clearTimeout(de);const K=++le;de=setTimeout(async()=>{try{const m=await Bv(N,V.value,20);if(!ae.value||K!==le)return;F.value=m,oe.value=0}catch{if(!ae.value||K!==le)return;F.value=[]}},120)}function Y(N){const K=A.value,m=M.value;if(m!==null&&K){const E=K.selectionStart??s.value.length;s.value=`${s.value.slice(0,m)}${s.value.slice(E)}`.trimEnd()}z(N.path),O(),qt(()=>K==null?void 0:K.focus())}function W(N){const K=N.lastIndexOf("/");return K<0?N:N.slice(K+1)}function ie(N){const K=N.lastIndexOf("/");return K<=0?"":N.slice(0,K)}function se(N){const K=W(N),m=K.lastIndexOf(".");return m<=0?"":K.slice(m+1).toLowerCase()}function we(N){const K=se(N);return K==="ts"?"TS":K==="tsx"?"TSX":K==="js"?"JS":K==="jsx"?"JSX":K==="json"?"{}":""}function Ce(N){const K=se(N);return K.startsWith("ts")?"ts":K.startsWith("js")?"js":K==="json"?"json":"default"}function $e(N){const K=se(N);return K==="md"||K==="mdx"}function Oe(N){var K;i.value.some(m=>m.path===N.path)||(i.value=[...i.value,N]),s.value=s.value.startsWith("/")?"":s.value,q.value=!1,(K=A.value)==null||K.focus()}function Fe(N,K){if(K){const m=(n.skills??[]).find(E=>E.path===N);m&&!i.value.some(E=>E.path===N)&&(i.value=[...i.value,m])}else i.value=i.value.filter(m=>m.path!==N)}function Ue(N){if(!B.value)return;const K=g.value;if(!K)return;const m=N.target;!m||K.contains(m)||(B.value=!1)}return Dn(()=>{document.addEventListener("click",Ue)}),Bn(()=>{document.removeEventListener("click",Ue),de&&clearTimeout(de)}),ft(()=>n.activeThreadId,()=>{s.value="",o.value=[],i.value=[],a.value=[],B.value=!1,q.value=!1,O()}),ft(()=>n.cwd,()=>{ae.value&&Z()}),(N,K)=>(_(),S("form",{class:"thread-composer",onSubmit:K[7]||(K[7]=ct(m=>Ie("steer"),["prevent"]))},[w("div",{class:lt(["thread-composer-shell",{"thread-composer-shell--no-top-radius":e.hasQueueAbove}])},[o.value.length>0?(_(),S("div",Ny,[(_(!0),S(De,null,ht(o.value,m=>(_(),S("div",{key:m.id,class:"thread-composer-attachment"},[w("img",{class:"thread-composer-attachment-image",src:m.url,alt:m.name||"Selected image"},null,8,Oy),w("button",{class:"thread-composer-attachment-remove",type:"button","aria-label":`Remove ${m.name||"image"}`,disabled:Se.value,onClick:E=>Te(m.id)}," x ",8,jy)]))),128))])):pe("",!0),a.value.length>0?(_(),S("div",Ly,[(_(!0),S(De,null,ht(a.value,m=>(_(),S("span",{key:m.fsPath,class:"thread-composer-file-chip"},[Ee(ws,{class:"thread-composer-file-chip-icon"}),w("span",{class:"thread-composer-file-chip-name",title:m.fsPath},ke(m.label),9,Dy),w("button",{class:"thread-composer-file-chip-remove",type:"button","aria-label":`Remove ${m.label}`,disabled:Se.value,onClick:E=>C(m.fsPath)},"×",8,By)]))),128))])):pe("",!0),i.value.length>0?(_(),S("div",Fy,[(_(!0),S(De,null,ht(i.value,m=>(_(),S("span",{key:m.path,class:"thread-composer-skill-chip"},[w("span",Hy,ke(m.name),1),w("button",{class:"thread-composer-skill-chip-remove",type:"button","aria-label":`Remove skill ${m.name}`,onClick:E=>he(m.path)},"×",8,Uy)]))),128))])):pe("",!0),w("div",Vy,[ae.value?(_(),S("div",qy,[F.value.length>0?(_(!0),S(De,{key:0},ht(F.value,(m,E)=>(_(),S("button",{key:m.path,class:lt(["thread-composer-file-mention-row",{"is-active":E===oe.value}]),type:"button",onMousedown:ct(I=>Y(m),["prevent"])},[we(m.path)?(_(),S("span",{key:0,class:lt(["thread-composer-file-mention-icon-badge",`is-${Ce(m.path)}`])},ke(we(m.path)),3)):$e(m.path)?(_(),S("span",Ky,"↓")):(_(),ot(ws,{key:2,class:"thread-composer-file-mention-icon-file"})),w("span",Gy,[w("span",zy,ke(W(m.path)),1),ie(m.path)?(_(),S("span",Yy,ke(ie(m.path)),1)):pe("",!0)])],42,Wy))),128)):(_(),S("div",Jy,"No matching files"))])):pe("",!0),Nn(w("textarea",{ref_key:"inputRef",ref:A,"onUpdate:modelValue":K[0]||(K[0]=m=>s.value=m),class:"thread-composer-input",placeholder:Le.value,disabled:Se.value,onInput:x,onKeydown:L},null,40,Qy),[[jn,s.value]]),Ee(Py,{skills:X.value,visible:q.value,"anchor-bottom":44,"anchor-left":0,onSelect:Oe,onClose:U},null,8,["skills","visible"])]),w("div",Xy,[w("div",{ref_key:"attachMenuRootRef",ref:g,class:"thread-composer-attach"},[w("button",{class:"thread-composer-attach-trigger",type:"button","aria-label":"Add photos & files",disabled:Se.value,onClick:qe}," + ",8,Zy),B.value?(_(),S("div",ew,[w("button",{class:"thread-composer-attach-item",type:"button",disabled:Se.value,onClick:ut}," Add photos & files ",8,tw),w("button",{class:"thread-composer-attach-item",type:"button",disabled:Se.value,onClick:ue}," Take photo ",8,nw)])):pe("",!0)],512),Ee(Ao,{class:"thread-composer-control","model-value":e.selectedModel,options:fe.value,placeholder:"Model","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.models.length===0||e.isTurnInProgress,"onUpdate:modelValue":tt},null,8,["model-value","options","disabled"]),Ee(Sy,{class:"thread-composer-control",options:We.value,"selected-values":Me.value,placeholder:"Skills","search-placeholder":"Search skills...","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress||(e.skills??[]).length===0,onToggle:Fe},null,8,["options","selected-values","disabled"]),Ee(Ao,{class:"thread-composer-control","model-value":e.selectedReasoningEffort,options:te,placeholder:"Thinking","open-direction":"up",disabled:e.disabled||!e.activeThreadId||e.isTurnInProgress,"onUpdate:modelValue":et},null,8,["model-value","disabled"]),w("div",rw,[Ne(d)&&!e.isTurnInProgress?(_(),S("button",{key:0,class:lt(["thread-composer-mic",{"thread-composer-mic--active":Ne(l)!=="idle"}]),type:"button","aria-label":Ne(l)==="recording"?"Stop dictation":"Hold to dictate",title:Ne(l)==="recording"?"Release to transcribe":"Hold to dictate",disabled:Se.value,onMousedown:K[1]||(K[1]=ct((...m)=>Ne(c)&&Ne(c)(...m),["prevent"])),onMouseup:K[2]||(K[2]=(...m)=>Ne(f)&&Ne(f)(...m)),onMouseleave:K[3]||(K[3]=m=>Ne(l)==="recording"&&Ne(f)()),onTouchstart:K[4]||(K[4]=ct((...m)=>Ne(c)&&Ne(c)(...m),["prevent"])),onTouchend:K[5]||(K[5]=(...m)=>Ne(f)&&Ne(f)(...m))},[Ee(Qv,{class:"thread-composer-mic-icon"})],42,sw)):pe("",!0),e.isTurnInProgress?(_(),S("button",{key:1,class:"thread-composer-stop",type:"button","aria-label":"Stop",disabled:e.disabled||!e.activeThreadId||e.isInterruptingTurn,onClick:rt},[Ee(ty,{class:"thread-composer-stop-icon"})],8,ow)):pe("",!0),w("button",{class:lt(["thread-composer-submit",{"thread-composer-submit--queue":e.isTurnInProgress}]),type:"button","aria-label":e.isTurnInProgress?"Queue message":"Send message",title:e.isTurnInProgress?"Queue (button) · Enter to steer":"Send",disabled:!Ze.value,onClick:K[6]||(K[6]=m=>Ie(e.isTurnInProgress?"queue":"steer"))},[Ee(Gv,{class:"thread-composer-submit-icon"})],10,iw)])])],2),w("input",{ref_key:"photoLibraryInputRef",ref:b,class:"thread-composer-hidden-input",type:"file",multiple:"",disabled:Se.value,onChange:p},null,40,aw),w("input",{ref_key:"cameraCaptureInputRef",ref:$,class:"thread-composer-hidden-input",type:"file",accept:"image/*",capture:"environment",disabled:Se.value,onChange:v},null,40,lw)],32))}}),Ra=Ge(cw,[["__scopeId","data-v-544bb546"]]),uw={key:0,class:"queued-messages"},dw={class:"queued-messages-inner"},fw={class:"queued-row-text"},hw={class:"queued-row-actions"},pw=["onClick"],mw=["onClick"],gw=kt({__name:"QueuedMessages",props:{messages:{}},emits:["steer","delete"],setup(e){return(t,n)=>e.messages.length>0?(_(),S("div",uw,[w("div",dw,[(_(!0),S(De,null,ht(e.messages,r=>(_(),S("div",{key:r.id,class:"queued-row"},[n[1]||(n[1]=w("svg",{class:"queued-row-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})],-1)),w("span",fw,ke(r.text),1),w("div",hw,[w("button",{class:"queued-row-steer",type:"button",title:"Send now without interrupting work",onClick:s=>t.$emit("steer",r.id)},"Steer",8,pw),w("button",{class:"queued-row-delete",type:"button","aria-label":"Delete queued message",title:"Delete queued message",onClick:s=>t.$emit("delete",r.id)},[...n[0]||(n[0]=[w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 7h16M10 11v6M14 11v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"})],-1)])],8,mw)])]))),128))])])):pe("",!0)}}),vw=Ge(gw,[["__scopeId","data-v-ea583733"]]),yw={},ww={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function bw(e,t){return _(),S("svg",ww,[...t[0]||(t[0]=[w("circle",{cx:"11",cy:"11",r:"8"},null,-1),w("path",{d:"m21 21-4.35-4.35"},null,-1)])])}const Eo=Ge(yw,[["render",bw]]),_w={class:"skill-card-top"},kw=["src","alt"],Tw={key:1,class:"skill-card-avatar-fallback"},Sw={class:"skill-card-info"},xw={class:"skill-card-header"},Cw={class:"skill-card-name"},Aw={key:0,class:"skill-card-badge-disabled"},Ew={key:1,class:"skill-card-badge"},Iw={class:"skill-card-owner"},Rw={key:0,class:"skill-card-desc"},$w={key:1,class:"skill-card-date"},Mw=kt({__name:"SkillCard",props:{skill:{}},emits:["select"],setup(e){const t=e,n=ce(()=>{const s=t.skill.publishedAt;if(!s)return"";const o=new Date(s),a=Date.now()-s;return a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:a<2592e6?`${Math.floor(a/864e5)}d ago`:o.toLocaleDateString("en-US",{month:"short",day:"numeric"})});function r(s){const o=s.target;o.style.display="none"}return(s,o)=>(_(),S("button",{class:lt(["skill-card",{"is-disabled":e.skill.installed&&e.skill.enabled===!1}]),type:"button",onClick:o[0]||(o[0]=i=>s.$emit("select",e.skill))},[w("div",_w,[e.skill.avatarUrl?(_(),S("img",{key:0,class:"skill-card-avatar",src:e.skill.avatarUrl,alt:e.skill.owner,loading:"lazy",onError:r},null,40,kw)):(_(),S("div",Tw,ke(e.skill.owner.charAt(0)),1)),w("div",Sw,[w("div",xw,[w("span",Cw,ke(e.skill.displayName||e.skill.name),1),e.skill.installed&&e.skill.enabled===!1?(_(),S("span",Aw,"Disabled")):e.skill.installed?(_(),S("span",Ew,"Installed")):pe("",!0)]),w("span",Iw,ke(e.skill.owner),1)])]),e.skill.description?(_(),S("p",Rw,ke(e.skill.description),1)):pe("",!0),n.value?(_(),S("span",$w,ke(n.value),1)):pe("",!0)],2))}}),$a=Ge(Mw,[["__scopeId","data-v-2a1e8196"]]),Pw={class:"sdm-panel"},Nw={class:"sdm-header"},Ow={class:"sdm-title-area"},jw=["src","alt"],Lw={class:"sdm-title-col"},Dw={class:"sdm-title-row"},Bw={class:"sdm-title"},Fw={key:0,class:"sdm-badge-disabled"},Hw={class:"sdm-owner"},Uw={class:"sdm-body"},Vw={key:0,class:"sdm-desc"},qw={key:1,class:"sdm-readme-loading"},Ww=["innerHTML"],Kw=["href"],Gw={class:"sdm-footer"},zw={class:"sdm-footer-actions"},Yw=["disabled"],Jw=["disabled"],Qw=["disabled"],Xw=kt({__name:"SkillDetailModal",props:{skill:{},visible:{type:Boolean},isInstalling:{type:Boolean},isUninstalling:{type:Boolean}},emits:["close","install","uninstall","toggle-enabled"],setup(e,{emit:t}){const n=e,r=t,s=H(null),o=H(""),i=H(!1),a=ce(()=>s.value??n.skill.enabled??!0),l=ce(()=>n.isInstalling===!0||n.isUninstalling===!0),d=ce(()=>{const A=o.value;if(!A)return"";const B=A.replace(/^---[\s\S]*?---\s*/,"");return c(B)});function c(A){return A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/^### (.+)$/gm,"<h4>$1</h4>").replace(/^## (.+)$/gm,"<h3>$1</h3>").replace(/^# (.+)$/gm,"<h2>$1</h2>").replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/`([^`]+)`/g,"<code>$1</code>").replace(/^- (.+)$/gm,"<li>$1</li>").replace(/(<li>.*<\/li>\n?)+/g,"<ul>$&</ul>").replace(/\n{2,}/g,"<br/><br/>").replace(/\n/g,"<br/>")}async function f(){if(!(!n.skill.owner||!n.skill.name)){i.value=!0,o.value="";try{const A=new URLSearchParams({owner:n.skill.owner,name:n.skill.name}),B=await fetch(`/codex-api/skills-hub/readme?${A}`);if(!B.ok)return;const q=await B.json();o.value=q.content??""}catch{}finally{i.value=!1}}}ft(()=>n.visible,A=>{A&&(s.value=null,o.value="",f())});function g(){r("install",n.skill)}function b(){r("uninstall",n.skill)}function $(){const A=!a.value;s.value=A,r("toggle-enabled",n.skill,A)}return(A,B)=>(_(),ot(_l,{to:"body"},[e.visible?(_(),S("div",{key:0,class:"sdm-overlay",onClick:B[1]||(B[1]=ct(q=>A.$emit("close"),["self"]))},[w("div",Pw,[w("div",Nw,[w("div",Ow,[e.skill.avatarUrl?(_(),S("img",{key:0,class:"sdm-avatar",src:e.skill.avatarUrl,alt:e.skill.owner,loading:"lazy"},null,8,jw)):pe("",!0),w("div",Lw,[w("div",Dw,[w("h3",Bw,ke(e.skill.displayName||e.skill.name),1),e.skill.installed&&!a.value?(_(),S("span",Fw,"Disabled")):pe("",!0)]),w("span",Hw,ke(e.skill.owner),1)])]),w("button",{class:"sdm-close",type:"button","aria-label":"Close",onClick:B[0]||(B[0]=q=>A.$emit("close"))},[Ee(ti,{class:"sdm-close-icon"})])]),w("div",Uw,[e.skill.description?(_(),S("p",Vw,ke(e.skill.description),1)):pe("",!0),i.value?(_(),S("div",qw,"Loading skill contents...")):o.value?(_(),S("div",{key:2,class:"sdm-readme",innerHTML:d.value},null,8,Ww)):pe("",!0),w("a",{class:"sdm-link",href:e.skill.url,target:"_blank",rel:"noopener noreferrer"},"View on GitHub",8,Kw)]),w("div",Gw,[w("div",zw,[e.skill.installed?(_(),S("button",{key:0,class:"sdm-btn sdm-btn-danger",type:"button",disabled:l.value,onClick:b},ke(n.isUninstalling?"Uninstalling...":"Uninstall"),9,Yw)):(_(),S("button",{key:1,class:"sdm-btn sdm-btn-primary",type:"button",disabled:l.value,onClick:g},ke(n.isInstalling?"Installing...":"Install"),9,Jw)),e.skill.installed?(_(),S("button",{key:2,class:"sdm-btn sdm-btn-secondary",type:"button",disabled:l.value,onClick:$},ke(a.value?"Disable":"Enable"),9,Qw)):pe("",!0)])])])])):pe("",!0)]))}}),Zw=Ge(Xw,[["__scopeId","data-v-19a385ca"]]),eb={class:"skills-hub"},tb={class:"skills-hub-toolbar"},nb={class:"skills-hub-search-wrap"},rb={key:0,class:"skills-hub-count"},sb={key:1,class:"skills-hub-section"},ob={class:"skills-hub-section-title"},ib={key:0,class:"skills-hub-grid"},ab={class:"skills-hub-section"},lb={key:0,class:"skills-hub-loading"},cb={key:1,class:"skills-hub-error"},ub={key:0,class:"skills-hub-grid"},db={key:1,class:"skills-hub-empty"},ss="codex-web-local.skills-hub.cache.v1",fb=kt({__name:"SkillsHub",emits:["skills-changed"],setup(e,{emit:t}){const n={name:"",owner:"",description:"",url:"",installed:!1},r=H(null),s=H(""),o=H("date"),i=H([]),a=H([]),l=H(0),d=H(!1),c=H(""),f=H(!0),g=H(!1),b=H(n),$=H(null),A=H(""),B=H(!1),q=H(!1);let M=null,V=null;const F=t,ae=ce(()=>o.value==="date"?"Newest":"A-Z"),oe=ce(()=>{var ue;return((ue=$.value)==null?void 0:ue.type)==="error"?"skills-hub-toast-error":"skills-hub-toast-success"}),le=ce(()=>`${b.value.owner}/${b.value.name}`),de=ce(()=>B.value&&A.value===le.value),re=ce(()=>q.value&&A.value===le.value),te=ce(()=>{const ue=s.value.toLowerCase().trim();return ue?a.value.filter(Te=>Te.name.toLowerCase().includes(ue)||Te.owner.toLowerCase().includes(ue)||(Te.displayName??"").toLowerCase().includes(ue)):a.value});function fe(ue,Te="success"){$.value={text:ue,type:Te},V&&clearTimeout(V),V=setTimeout(()=>{$.value=null},3e3)}function X(){o.value=o.value==="date"?"name":"date",Ie(s.value)}function Me(ue){return`${o.value}::${ue.trim().toLowerCase()}`}function We(ue){var Te;if(typeof window>"u")return null;try{const he=window.localStorage.getItem(ss);return he?((Te=JSON.parse(he).byKey)==null?void 0:Te[ue])??null:null}catch{return null}}function Ze(ue,Te){if(!(typeof window>"u"))try{const he=window.localStorage.getItem(ss),z=(he?JSON.parse(he):{}).byKey??{};z[ue]=Te,window.localStorage.setItem(ss,JSON.stringify({byKey:z}))}catch{}}function Se(){if(!(typeof window>"u"))try{window.localStorage.removeItem(ss)}catch{}}function Le(ue){const Te=ue.installed??[];a.value=Te;const he=new Set(Te.map(C=>C.name));i.value=ue.data.map(C=>{if(C.installed||he.has(C.name)){const z=Te.find(ee=>ee.name===C.name);return{...C,installed:!0,path:(z==null?void 0:z.path)??C.path,enabled:(z==null?void 0:z.enabled)??C.enabled}}return C}).filter(C=>!C.installed),l.value=ue.total}async function Ie(ue){const Te=Me(ue),he=We(Te);he&&Le(he),d.value=!he,c.value="";try{const C=new URLSearchParams;ue.trim()&&C.set("q",ue.trim()),C.set("limit","100"),C.set("sort",o.value);const z=await fetch(`/codex-api/skills-hub?${C}`);if(!z.ok)throw new Error(`HTTP ${z.status}`);const ee=await z.json();Le(ee),Ze(Te,ee)}catch(C){c.value=C instanceof Error?C.message:"Failed to load skills"}finally{d.value=!1}}function rt(){M&&clearTimeout(M),M=setTimeout(()=>Ie(s.value),300)}function tt(ue){b.value=ue,g.value=!0}async function et(ue){A.value=`${ue.owner}/${ue.name}`,B.value=!0;try{const he=await(await fetch("/codex-api/skills-hub/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:ue.owner,name:ue.name})})).json();if(!he.ok)throw new Error(he.error||"Install failed");const C={...ue,installed:!0,path:he.path,enabled:!0};a.value=[...a.value,C],i.value=i.value.filter(z=>z.name!==ue.name),b.value=C,fe(`${ue.displayName||ue.name} skill installed`),g.value=!1,Se(),F("skills-changed")}catch(Te){fe(Te instanceof Error?Te.message:"Failed to install skill","error")}finally{B.value=!1}}async function qe(ue){A.value=`${ue.owner}/${ue.name}`,q.value=!0;try{const he=await(await fetch("/codex-api/skills-hub/uninstall",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ue.name,path:ue.path})})).json();if(!he.ok)throw new Error(he.error||"Uninstall failed");a.value=a.value.filter(C=>C.name!==ue.name),ue.owner!=="local"&&(i.value=[...i.value,{...ue,installed:!1,path:void 0,enabled:void 0}]),fe(`${ue.displayName||ue.name} skill uninstalled`),g.value=!1,Se(),F("skills-changed")}catch(Te){fe(Te instanceof Error?Te.message:"Failed to uninstall skill","error")}finally{q.value=!1}}async function ut(ue,Te){try{if(!(await fetch("/codex-api/rpc",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:"skills/config/write",params:{path:ue.path,enabled:Te}})})).ok)throw new Error("Failed to update skill");fe(`${ue.displayName||ue.name} skill ${Te?"enabled":"disabled"}`),await Ie(s.value)}catch(he){fe(he instanceof Error?he.message:"Failed to update skill","error")}}return Dn(()=>{Ie("")}),(ue,Te)=>(_(),S("div",eb,[Te[3]||(Te[3]=w("div",{class:"skills-hub-header"},[w("h2",{class:"skills-hub-title"},"Skills Hub"),w("p",{class:"skills-hub-subtitle"},"Browse and discover skills from the OpenClaw community")],-1)),w("div",tb,[w("div",nb,[Ee(Eo,{class:"skills-hub-search-icon"}),Nn(w("input",{ref_key:"searchRef",ref:r,"onUpdate:modelValue":Te[0]||(Te[0]=he=>s.value=he),class:"skills-hub-search",type:"text",placeholder:"Search skills... (e.g. flight, docker, react)",onInput:rt},null,544),[[jn,s.value]]),l.value>0?(_(),S("span",rb,ke(l.value)+" skills",1)):pe("",!0)]),w("button",{class:"skills-hub-sort",type:"button",onClick:X},ke(ae.value),1)]),$.value?(_(),S("div",{key:0,class:lt(["skills-hub-toast",oe.value])},ke($.value.text),3)):pe("",!0),te.value.length>0?(_(),S("div",sb,[w("button",{class:"skills-hub-section-toggle",type:"button",onClick:Te[1]||(Te[1]=he=>f.value=!f.value)},[w("span",ob,"Installed ("+ke(te.value.length)+")",1),Ee(pc,{class:lt(["skills-hub-section-chevron",{"is-open":f.value}])},null,8,["class"])]),f.value?(_(),S("div",ib,[(_(!0),S(De,null,ht(te.value,he=>(_(),ot($a,{key:he.name,skill:he,onSelect:C=>tt(C)},null,8,["skill","onSelect"]))),128))])):pe("",!0)])):pe("",!0),w("div",ab,[d.value?(_(),S("div",lb,"Loading skills...")):c.value?(_(),S("div",cb,ke(c.value),1)):(_(),S(De,{key:2},[i.value.length>0?(_(),S("div",ub,[(_(!0),S(De,null,ht(i.value,he=>(_(),ot($a,{key:he.url,skill:he,onSelect:C=>tt(C)},null,8,["skill","onSelect"]))),128))])):s.value.trim()?(_(),S("div",db,'No skills found for "'+ke(s.value)+'"',1)):pe("",!0)],64))]),Ee(Zw,{skill:b.value,visible:g.value,"is-installing":de.value,"is-uninstalling":re.value,onClose:Te[2]||(Te[2]=he=>g.value=!1),onInstall:et,onUninstall:qe,onToggleEnabled:ut},null,8,["skill","visible","is-installing","is-uninstalling"])]))}}),hb=Ge(fb,[["__scopeId","data-v-1967b404"]]),pb={},mb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function gb(e,t){return _(),S("svg",mb,[...t[0]||(t[0]=[w("path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12"},null,-1),w("path",{d:"M9 4l0 16"},null,-1)])])}const vb=Ge(pb,[["render",gb]]),yb={},wb={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"};function bb(e,t){return _(),S("svg",wb,[...t[0]||(t[0]=[w("path",{d:"M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm12 -16h-8v14h8a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1"},null,-1)])])}const _b=Ge(yb,[["render",bb]]),kb={},Tb={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function Sb(e,t){return _(),S("svg",Tb,[...t[0]||(t[0]=[w("path",{d:"M20 11a8.1 8.1 0 0 0-15.5-2m-.5-4v4h4"},null,-1),w("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null,-1)])])}const xb=Ge(kb,[["render",Sb]]),Cb={class:"sidebar-thread-controls"},Ab=["aria-label","title"],Eb=["aria-pressed","aria-label","title"],Ib=kt({__name:"SidebarThreadControls",props:{isSidebarCollapsed:{type:Boolean},isAutoRefreshEnabled:{type:Boolean},autoRefreshButtonLabel:{},showNewThreadButton:{type:Boolean}},emits:["toggle-sidebar","toggle-auto-refresh","start-new-thread"],setup(e){return(t,n)=>(_(),S("div",Cb,[w("button",{class:"sidebar-thread-controls-button",type:"button","aria-label":e.isSidebarCollapsed?"Expand sidebar":"Collapse sidebar",title:e.isSidebarCollapsed?"Expand sidebar":"Collapse sidebar",onClick:n[0]||(n[0]=r=>t.$emit("toggle-sidebar"))},[e.isSidebarCollapsed?(_(),ot(_b,{key:0,class:"sidebar-thread-controls-icon"})):(_(),ot(vb,{key:1,class:"sidebar-thread-controls-icon"}))],8,Ab),w("button",{class:"sidebar-thread-controls-button",type:"button","aria-pressed":e.isAutoRefreshEnabled,"aria-label":e.autoRefreshButtonLabel,title:e.autoRefreshButtonLabel,onClick:n[1]||(n[1]=r=>t.$emit("toggle-auto-refresh"))},[Ee(xb,{class:"sidebar-thread-controls-icon"})],8,Eb),an(t.$slots,"default",{},void 0),e.showNewThreadButton?(_(),S("button",{key:0,class:"sidebar-thread-controls-button",type:"button","aria-label":"Start new thread",title:"Start new thread",onClick:n[2]||(n[2]=r=>t.$emit("start-new-thread"))},[Ee(ws,{class:"sidebar-thread-controls-icon"})])):pe("",!0)]))}}),Ma=Ge(Ib,[["__scopeId","data-v-57866500"]]);function Mn(e){return e.flatMap(t=>t.threads)}const vc="codex-web-local.thread-read-state.v1",yc="codex-web-local.thread-scroll-state.v1",Io="codex-web-local.selected-thread-id.v1",wc="codex-web-local.project-order.v1",bc="codex-web-local.project-display-name.v1",_c="codex-web-local.auto-refresh-enabled.v1",ro=220,Rr=4e3,Pa=["none","minimal","low","medium","high","xhigh"],$r="__global__";function Rb(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(vc);if(!e)return{};const t=JSON.parse(e);return!t||typeof t!="object"||Array.isArray(t)?{}:t}catch{return{}}}function Na(e){typeof window>"u"||window.localStorage.setItem(vc,JSON.stringify(e))}function $b(){return typeof window>"u"?!1:window.localStorage.getItem(_c)==="1"}function Oa(e){typeof window>"u"||window.localStorage.setItem(_c,e?"1":"0")}function kc(e,t,n){return Math.min(Math.max(e,t),n)}function Mb(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;if(typeof t.scrollTop!="number"||!Number.isFinite(t.scrollTop)||typeof t.isAtBottom!="boolean")return null;const n={scrollTop:Math.max(0,t.scrollTop),isAtBottom:t.isAtBottom};return typeof t.scrollRatio=="number"&&Number.isFinite(t.scrollRatio)&&(n.scrollRatio=kc(t.scrollRatio,0,1)),n}function Pb(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(yc);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,s]of Object.entries(t)){if(!r)continue;const o=Mb(s);o&&(n[r]=o)}return n}catch{return{}}}function ja(e){typeof window>"u"||window.localStorage.setItem(yc,JSON.stringify(e))}function Nb(){return typeof window>"u"?"":window.localStorage.getItem(Io)??""}function Ob(e){if(!(typeof window>"u")){if(!e){window.localStorage.removeItem(Io);return}window.localStorage.setItem(Io,e)}}function jb(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(wc);if(!e)return[];const t=JSON.parse(e);if(!Array.isArray(t))return[];const n=[];for(const r of t)typeof r=="string"&&r.length>0&&!n.includes(r)&&n.push(r);return n}catch{return[]}}function lr(e){typeof window>"u"||window.localStorage.setItem(wc,JSON.stringify(e))}function Lb(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(bc);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const n={};for(const[r,s]of Object.entries(t))typeof r=="string"&&r.length>0&&typeof s=="string"&&(n[r]=s);return n}catch{return{}}}function so(e){typeof window>"u"||window.localStorage.setItem(bc,JSON.stringify(e))}function os(e,t){const n=[];for(const r of e)n.includes(r)||n.push(r);for(const r of t)n.includes(r.projectName)||n.push(r.projectName);return Zn(e,n)?e:n}function oo(e,t){const n=new Map(e.map(s=>[s.projectName,s])),r=t.map(s=>n.get(s)??{projectName:s,threads:[]});for(const s of e)t.includes(s.projectName)||r.push(s);return r}function Zn(e,t){const n=Array.isArray(e)?e:[],r=Array.isArray(t)?t:[];if(n.length!==r.length)return!1;for(let s=0;s<n.length;s+=1)if(n[s]!==r[s])return!1;return!0}function Db(e,t,n){if(t<0||t>=e.length||n<0||n>=e.length||t===n)return e;const r=[...e],[s]=r.splice(t,1);return r.splice(n,0,s),r}function Bb(e,t){return!e&&!t?!0:!e||!t?!1:e.status===t.status&&e.aggregatedOutput===t.aggregatedOutput&&e.exitCode===t.exitCode}function Ro(e,t){return e.id===t.id&&e.role===t.role&&e.text===t.text&&Zn(e.images,t.images)&&e.messageType===t.messageType&&e.rawPayload===t.rawPayload&&e.isUnhandled===t.isUnhandled&&Bb(e.commandExecution,t.commandExecution)&&e.turnIndex===t.turnIndex}function bs(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Fb(e,t,n={}){const r=new Map(e.map(c=>[c.id,c])),s=new Map(t.map(c=>[c.id,c])),o=t.map(c=>{const f=r.get(c.id);return f&&Ro(f,c)?f:c});if(n.preserveMissing!==!0)return bs(e,o)?e:o;const i=e.map(c=>{const f=s.get(c.id);return!f||Ro(c,f)?c:f}),a=new Set(e.map(c=>c.id)),l=o.filter(c=>!a.has(c.id)),d=[...i,...l];return bs(e,d)?e:d}function $o(e){return e.replace(/\s+/gu," ").trim()}function Hb(e,t){const n=new Set(t.filter(s=>s.role==="assistant").map(s=>$o(s.text)).filter(s=>s.length>0));if(n.size===0)return e;const r=e.filter(s=>{if(s.messageType!=="agentMessage.live")return!0;const o=$o(s.text);return o.length===0?!1:!n.has(o)});return r.length===e.length?e:r}function La(e,t){const n=e.findIndex(o=>o.id===t.id);if(n<0)return[...e,t];const r=e[n];if(Ro(r,t))return e;const s=[...e];return s.splice(n,1,t),s}const Tc="worked";function En(e){if(!e)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function Ub(e){if(!Number.isFinite(e)||e<=0)return"<1s";const t=Math.max(1,Math.round(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),s=t%60,o=[];n>0&&o.push(`${n}h`),(r>0||n>0)&&o.push(`${r}m`);const i=s>0||o.length===0?s:0;return o.push(`${i}s`),o.join(" ")}function Vb(e,t){return!e&&!t?!0:!e||!t?!1:e.turnId===t.turnId&&e.durationMs===t.durationMs}function qb(e,t){if(!e&&!t)return!0;if(!e||!t||e.label!==t.label||e.details.length!==t.details.length)return!1;for(let n=0;n<e.details.length;n+=1)if(e.details[n]!==t.details[n])return!1;return!0}function Wb(e){return{id:`turn-summary:${e.turnId}`,role:"system",text:`Worked for ${Ub(e.durationMs)}`,messageType:Tc}}function Kb(e){for(let t=e.length-1;t>=0;t-=1)if(e[t].role==="assistant")return t;return-1}function Gb(e,t){const n=Wb(t),r=e.filter(i=>i.messageType!==Tc),s=Kb(r);if(s<0)return[...r,n];const o=[...r];return o.splice(s,0,n),o}function Mt(e,t){if(!(t in e))return e;const n={...e};return delete n[t],n}function zb(e,t){return e.id===t.id&&e.title===t.title&&e.projectName===t.projectName&&e.cwd===t.cwd&&e.createdAtIso===t.createdAtIso&&e.updatedAtIso===t.updatedAtIso&&e.preview===t.preview&&e.unread===t.unread&&e.inProgress===t.inProgress}function Yb(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Jb(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function xt(e,t){const n=Object.entries(e).filter(([r])=>t.has(r));return n.length===Object.keys(e).length?e:Object.fromEntries(n)}function is(e,t){const n=new Map(e.map(s=>[s.projectName,s])),r=t.map(s=>{const o=n.get(s.projectName),i=new Map((o==null?void 0:o.threads.map(l=>[l.id,l]))??[]),a=s.threads.map(l=>{const d=i.get(l.id);return d&&zb(d,l)?d:l});return o&&o.projectName===s.projectName&&Yb(o.threads,a)?o:{projectName:s.projectName,threads:a}});return Jb(e,r)?e:r}function Qb(e,t,n){const r=new Set(Mn(t).map(a=>a.id)),s=Mn(e).filter(a=>n[a.id]===!0&&!r.has(a.id));if(s.length===0)return t;const o=new Map(t.map(a=>[a.projectName,a])),i=t.map(a=>({projectName:a.projectName,threads:[...a.threads]}));for(const a of s){if(o.get(a.projectName)){const d=i.findIndex(c=>c.projectName===a.projectName);d>=0&&(i[d]={projectName:i[d].projectName,threads:[a,...i[d].threads]});continue}i.push({projectName:a.projectName,threads:[a]})}return i}function Xb(e){return e.split("/").filter(Boolean).at(-1)||e||"unknown-project"}function io(e){const t=e.replace(/\\/gu,"/");return t.split("/").filter(Boolean).at(-1)||t}function Zb(e){const t=e.split(`
44
+ `).map(n=>n.trim()).find(n=>n.length>0);return t?t.slice(0,80):"Untitled thread"}function e0(){const e=H([]),t=H([]),n=H(Nb()),r=H({}),s=H({}),o=H({}),i=H({}),a=H({}),l=H({}),d=H({}),c=H([]),f=H(""),g=H("medium"),b=H(Rb()),$=H(Pb()),A=H(jb()),B=H(Lb()),q=H({}),M=H({}),V=H({}),F=H({}),ae=H({}),oe=H({}),le=H({}),de=H({}),re=H({}),te=H([]),fe=H(!1),X=H(!1),Me=H(!1),We=H(!1),Ze=H(!1),Se=H(""),Le=H(!1),Ie=H(!1),rt=H($b()),tt=H(Math.floor(Rr/1e3));let et=null,qe=null,ut=null,ue=null,Te=!1;const he=new Set;let C=!1,z=!1;const ee=new Map,ye=ce(()=>Mn(e.value)),xe=ce(()=>ye.value.find(u=>u.id===n.value)??null),p=ce(()=>$.value[n.value]??null),v=ce(()=>{const u=[],h=n.value;return h&&Array.isArray(de.value[h])&&u.push(...de.value[h]),Array.isArray(de.value[$r])&&u.push(...de.value[$r]),u.sort((y,T)=>y.receivedAtIso.localeCompare(T.receivedAtIso))}),x=ce(()=>{var G;const u=n.value;if(!u)return null;const h=ae.value[u],y=(o.value[u]??"").trim(),T=(((G=oe.value[u])==null?void 0:G.message)??"").trim();return!h&&!y&&!T?null:{activityLabel:(h==null?void 0:h.label)||"Thinking",activityDetails:(h==null?void 0:h.details)??[],reasoningText:y,errorText:T}}),L=ce(()=>{const u=n.value;if(!u)return[];const h=r.value[u]??[],y=s.value[u]??[],T=i.value[u]??[],G=[...h,...T,...y],j=F.value[u];return j?Gb(G,j):G});function U(u){n.value!==u&&(n.value=u,Ob(u),z=!1)}function O(u){f.value=u.trim()}function ne(u){u&&!Pa.includes(u)||(g.value=u)}function Z(u,h){const y=u.trim()||"default",T=h||"default";return[`Model: ${y}`,`Thinking: ${T}`]}async function Y(){try{const[u,h]=await Promise.all([Pv(),Nv()]);c.value=u,f.value.length>0&&u.includes(f.value)||(h.model&&u.includes(h.model)?f.value=h.model:u.length>0?f.value=u[0]:f.value=""),h.reasoningEffort&&Pa.includes(h.reasoningEffort)&&(g.value=h.reasoningEffort)}catch{}}function W(u){const h=re.value;return Object.keys(h).length===0?u:u.map(y=>({projectName:y.projectName,threads:y.threads.map(T=>{const G=h[T.id];return G?{...T,title:G}:T})}))}function ie(){const h=W(t.value).map(y=>({projectName:y.projectName,threads:y.threads.map(T=>{const G=a.value[T.id]===!0,j=n.value===T.id,_e=b.value[T.id],Pe=d.value[T.id]===!0,Re=!j&&!G&&(Pe||_e!==T.updatedAtIso);return{...T,inProgress:G,unread:Re}})}));e.value=is(e.value,h)}function se(u,h,y){const T=new Date().toISOString(),G=h.trim(),j=Xb(G),_e={id:u,title:Zb(y),projectName:j,cwd:G,hasWorktree:G.includes("/.codex/worktrees/")||G.includes("/.git/worktrees/"),createdAtIso:T,updatedAtIso:T,preview:y,unread:!1,inProgress:!1},Pe=t.value.findIndex(st=>st.projectName===j);if(Pe>=0){const Bt=t.value[Pe].threads.filter(qn=>qn.id!==u),Vn={projectName:j,threads:[_e,...Bt]},xn=[...t.value];xn.splice(Pe,1,Vn),t.value=xn}else t.value=[{projectName:j,threads:[_e]},...t.value];const Re=os(A.value,t.value);Zn(A.value,Re)||(A.value=Re,lr(A.value)),ie()}function we(u){const h=new Set(u.map(j=>j.id)),y=xt(b.value,h);y!==b.value&&(b.value=y,Na(y));const T=xt($.value,h);T!==$.value&&($.value=T,ja(T)),M.value=xt(M.value,h),q.value=xt(q.value,h),V.value=xt(V.value,h),r.value=xt(r.value,h),s.value=xt(s.value,h),o.value=xt(o.value,h),i.value=xt(i.value,h),F.value=xt(F.value,h),ae.value=xt(ae.value,h),oe.value=xt(oe.value,h),le.value=xt(le.value,h),d.value=xt(d.value,h),a.value=xt(a.value,h);const G={};for(const[j,_e]of Object.entries(de.value))(j===$r||h.has(j))&&(G[j]=_e);de.value=G}function Ce(u){const h=Mn(t.value).find(y=>y.id===u);h&&(b.value={...b.value,[u]:h.updatedAtIso},Na(b.value),d.value[u]&&(d.value=Mt(d.value,u)),ie())}function $e(u,h){if(!u)return;const y=F.value[u];if(h){if(Vb(y,h))return;F.value={...F.value,[u]:h}}else y&&(F.value=Mt(F.value,u))}function Oe(u,h){!u||a.value[u]===!0===h||(h?a.value={...a.value,[u]:!0}:a.value=Mt(a.value,u),ie())}function Fe(u){u&&u!==n.value&&d.value[u]!==!0&&(d.value={...d.value,[u]:!0},ie())}function Ue(u,h){if(!u)return;const y=ae.value[u];if(!h){y&&(ae.value=Mt(ae.value,u));return}const T=cn(h.label)||"Thinking",G=h.details.map(Pe=>cn(Pe)).filter(Pe=>Pe.length>0&&Pe!==T),j=Array.from(new Set([...(y==null?void 0:y.details)??[],...G])).slice(-3),_e={label:T,details:j};qb(y,_e)||(ae.value={...ae.value,[u]:_e})}function N(u,h){if(!u)return;const y=oe.value[u],T=h?$o(h):"";if(!T){y&&(oe.value=Mt(oe.value,u));return}(y==null?void 0:y.message)!==T&&(oe.value={...oe.value,[u]:{message:T}})}function K(u){const h=Mn(t.value).find(y=>y.id===u);return(h==null?void 0:h.updatedAtIso)??""}function m(u,h){if(!u)return;const y={scrollTop:Math.max(0,h.scrollTop),isAtBottom:h.isAtBottom===!0};typeof h.scrollRatio=="number"&&Number.isFinite(h.scrollRatio)&&(y.scrollRatio=kc(h.scrollRatio,0,1));const T=$.value[u];T&&T.scrollTop===y.scrollTop&&T.isAtBottom===y.isAtBottom&&T.scrollRatio===y.scrollRatio||($.value={...$.value,[u]:y},ja($.value))}function E(u,h){const y=r.value[u]??[];bs(y,h)||(r.value={...r.value,[u]:h})}function I(u,h){const y=s.value[u]??[];bs(y,h)||(s.value={...s.value,[u]:h})}function J(u,h){const y=s.value[u]??[],T=La(y,h);I(u,T)}function ge(u,h){if(!u)return;const y=h.trim(),T=o.value[u]??"";if(y.length===0){if(!T)return;o.value=Mt(o.value,u);return}T!==y&&(o.value={...o.value,[u]:y})}function Ae(u,h){if(!u)return;const y=o.value[u]??"";ge(u,`${y}${h}`)}function ze(u){u&&u in o.value&&(o.value=Mt(o.value,u))}function be(u){return u!==null&&typeof u=="object"&&!Array.isArray(u)?u:null}function me(u){return typeof u=="string"?u:""}function dt(u){return typeof u=="number"&&Number.isFinite(u)?u:null}function gt(u){const h=be(u.params);if(!h)return"";const y=me(h.threadId);if(y)return y;const T=me(h.thread_id);if(T)return T;const G=me(h.conversationId);if(G)return G;const j=me(h.conversation_id);if(j)return j;const _e=be(h.thread),Pe=me(_e==null?void 0:_e.id);if(Pe)return Pe;const Re=be(h.turn),st=me(Re==null?void 0:Re.threadId);if(st)return st;const Bt=me(Re==null?void 0:Re.thread_id);return Bt||""}function Gt(u){if(u.method!=="turn/completed")return"";const h=be(u.params),y=be(h==null?void 0:h.turn);if(!y||y.status!=="failed")return"";const T=be(y.error);return me(T==null?void 0:T.message)}function Tt(u){const h=be(u);if(!h)return null;const y=h.id,T=me(h.method),G=h.params;if(typeof y!="number"||!Number.isInteger(y)||!T)return null;const j=be(G),_e=me(j==null?void 0:j.threadId)||$r,Pe=me(j==null?void 0:j.turnId),Re=me(j==null?void 0:j.itemId),st=me(h.receivedAtIso)||new Date().toISOString();return{id:y,method:T,threadId:_e,turnId:Pe,itemId:Re,receivedAtIso:st,params:G??null}}function Fn(u){const h=u.threadId||$r,y=de.value[h]??[],T=y.findIndex(j=>j.id===u.id),G=[...y];T>=0?G.splice(T,1,u):G.push(u),de.value={...de.value,[h]:G.sort((j,_e)=>j.receivedAtIso.localeCompare(_e.receivedAtIso))}}function kn(u){const h={};for(const[y,T]of Object.entries(de.value)){const G=T.filter(j=>j.id!==u);G.length>0&&(h[y]=G)}de.value=h}function _r(u){if(u.method==="server/request"){const h=Tt(u.params);return h&&Fn(h),!0}if(u.method==="server/request/resolved"){const h=be(u.params),y=h==null?void 0:h.id;return typeof y=="number"&&Number.isInteger(y)&&kn(y),!0}return!1}function cn(u){return u.replace(/\s+/gu," ").trim()}function kr(u){const h=gt(u);if(!h)return null;if(u.method==="turn/started")return{threadId:h,activity:{label:"Thinking",details:[]}};if(u.method==="item/started"){const y=be(u.params),T=be(y==null?void 0:y.item),G=me(T==null?void 0:T.type).toLowerCase();if(G==="reasoning")return{threadId:h,activity:{label:"Thinking",details:[]}};if(G==="agentmessage")return{threadId:h,activity:{label:"Writing response",details:[]}};if(G==="commandexecution"){const j=me(T==null?void 0:T.command);return{threadId:h,activity:{label:"Running command",details:j?[j]:[]}}}}return u.method==="item/commandExecution/outputDelta"?{threadId:h,activity:{label:"Running command",details:[]}}:u.method==="item/reasoning/summaryTextDelta"||u.method==="item/reasoning/summaryPartAdded"?{threadId:h,activity:{label:"Thinking",details:[]}}:u.method==="item/agentMessage/delta"?{threadId:h,activity:{label:"Writing response",details:[]}}:null}function Tr(u){if(u.method!=="turn/started")return null;const h=be(u.params);if(!h)return null;const y=gt(u);if(!y)return null;const T=be(h.turn),G=me(T==null?void 0:T.id)||me(h.turnId)||`${y}:unknown`;if(!G)return null;const j=En(me(T==null?void 0:T.startedAt))??En(me(h.startedAt))??En(u.atIso)??Date.now();return{threadId:y,turnId:G,startedAtMs:j}}function Tn(u){if(u.method!=="turn/completed")return null;const h=be(u.params);if(!h)return null;const y=gt(u);if(!y)return null;const T=be(h.turn),G=me(T==null?void 0:T.id)||me(h.turnId)||`${y}:unknown`;if(!G)return null;const j=En(me(T==null?void 0:T.completedAt))??En(me(h.completedAt))??En(u.atIso)??Date.now(),_e=En(me(T==null?void 0:T.startedAt))??En(me(h.startedAt))??void 0;return{threadId:y,turnId:G,completedAtMs:j,startedAtMs:_e}}function en(u){return`${u}:live-reasoning`}function Sr(u){const h=be(u.params);if(!h)return"";if(u.method==="item/started"){const y=be(h.item);return!y||y.type!=="reasoning"?"":me(y.id)}return""}function k(u){const h=be(u.params);if(!h)return null;if(u.method==="item/reasoning/summaryTextDelta"){const y=me(h.itemId),T=me(h.delta);return!y||!T?null:{messageId:en(y),delta:T}}return null}function R(u){const h=be(u.params);if(!h)return"";if(u.method==="item/reasoning/summaryPartAdded"){const y=me(h.itemId);return y?en(y):""}return""}function P(u){const h=be(u.params);if(!h)return"";if(u.method==="item/completed"){const y=be(h.item);return!y||y.type!=="reasoning"?"":en(me(y.id))}return""}function Q(u){const h=be(u.params);if(!h)return"";if(u.method==="item/started"){const y=be(h.item);return!y||y.type!=="agentMessage"?"":me(y.id)}return""}function Ve(u){const h=be(u.params);if(!h)return null;if(u.method==="item/agentMessage/delta"){const y=me(h.itemId),T=me(h.delta);return!y||!T?null:{messageId:y,delta:T}}return null}function vt(u){const h=be(u.params);if(!h)return null;if(u.method==="item/completed"){const y=be(h.item);if(!y||y.type!=="agentMessage")return null;const T=me(y.id),G=me(y.text);return!T||!G?null:{id:T,role:"assistant",text:G,messageType:"agentMessage.live"}}return null}function Dt(u){if(u.method!=="item/started")return null;const h=be(u.params),y=be(h==null?void 0:h.item);if(!y||y.type!=="commandExecution")return null;const T=me(y.id),G=me(y.command);if(!T)return null;const j=typeof y.cwd=="string"?y.cwd:null;return{id:T,role:"system",text:G,messageType:"commandExecution",commandExecution:{command:G,cwd:j,status:"inProgress",aggregatedOutput:"",exitCode:null}}}function sr(u){if(u.method!=="item/commandExecution/outputDelta")return null;const h=be(u.params);if(!h)return null;const y=me(h.itemId),T=me(h.delta);return!y||!T?null:{itemId:y,delta:T}}function or(u){if(u.method!=="item/completed")return null;const h=be(u.params),y=be(h==null?void 0:h.item);if(!y||y.type!=="commandExecution")return null;const T=me(y.id),G=me(y.command);if(!T)return null;const j=typeof y.cwd=="string"?y.cwd:null,_e=me(y.status),Pe=_e==="failed"?"failed":_e==="declined"?"declined":_e==="interrupted"?"interrupted":"completed",Re=typeof y.aggregatedOutput=="string"?y.aggregatedOutput:"",st=typeof y.exitCode=="number"?y.exitCode:null;return{id:T,role:"system",text:G,messageType:"commandExecution",commandExecution:{command:G,cwd:j,status:Pe,aggregatedOutput:Re,exitCode:st}}}function jt(u,h){const y=i.value[u]??[],T=La(y,h);T!==y&&(i.value={...i.value,[u]:T})}function Sn(u,h){const y=i.value[u];if(!y||y.length===0)return;const T=new Set(h.map(j=>j.id)),G=y.filter(j=>!T.has(j.id));G.length!==y.length&&(G.length===0?i.value=Mt(i.value,u):i.value={...i.value,[u]:G})}function Hn(u){if(u.method==="item/agentMessage/delta")return!0;const h=be(u.params);if(!h)return!1;if(u.method==="item/completed"){const y=be(h.item);return(y==null?void 0:y.type)==="agentMessage"}return!1}function xr(u){var qn,ci,ui,di;if(_r(u))return;if(u.method==="thread/name/updated"){const Ke=be(u.params),tn=me(Ke==null?void 0:Ke.threadId),Wn=me(Ke==null?void 0:Ke.threadName);tn&&Wn&&(re.value={...re.value,[tn]:Wn},ie(),Ia(tn,Wn))}const h=kr(u);h&&Ue(h.threadId,h.activity);const y=Tr(u);y&&(ee.set(y.turnId,y),le.value={...le.value,[y.threadId]:y.turnId},$e(y.threadId,null),N(y.threadId,null),Oe(y.threadId,!0),d.value[y.threadId]&&(d.value=Mt(d.value,y.threadId)));const T=Tn(u);if(T){const Ke=ee.get(T.turnId);Ke&&ee.delete(T.turnId);const tn=dt((qn=be(u.params))==null?void 0:qn.durationMs)??dt((ui=be((ci=be(u.params))==null?void 0:ci.turn))==null?void 0:ui.durationMs)??(typeof T.startedAtMs=="number"?T.completedAtMs-T.startedAtMs:null)??(Ke?T.completedAtMs-Ke.startedAtMs:null),Wn=typeof tn=="number"?Math.max(0,tn):0;$e(T.threadId,{turnId:T.turnId,durationMs:Wn}),le.value[T.threadId]&&(le.value=Mt(le.value,T.threadId)),Oe(T.threadId,!1),Ue(T.threadId,null),Fe(T.threadId),oi(T.threadId)}const G=Gt(u);if(G){const Ke=(T==null?void 0:T.threadId)||gt(u);Ke&&N(Ke,G),Se.value=G}else T&&N(T.threadId,null);const j=gt(u);if(!j||j!==n.value)return;Q(u);const _e=Ve(u);if(_e){const Ke=(s.value[j]??[]).find(Wn=>Wn.id===_e.messageId),tn=`${(Ke==null?void 0:Ke.text)??""}${_e.delta}`;J(j,{id:_e.messageId,role:"assistant",text:tn,messageType:"agentMessage.live"})}const Pe=vt(u);Pe&&J(j,Pe),Sr(u);const Re=k(u);if(Re&&Ae(j,Re.delta),R(u)){const Ke=o.value[j]??"";Ke.trim().length>0&&!Ke.endsWith(`
45
+
46
+ `)&&ge(j,`${Ke}
47
+
48
+ `)}P(u);const Bt=Dt(u);Bt&&(jt(j,Bt),Ue(j,{label:"Running command",details:[((di=Bt.commandExecution)==null?void 0:di.command)??""]}));const Vn=sr(u);if(Vn){const Ke=(i.value[j]??[]).find(tn=>tn.id===Vn.itemId);Ke!=null&&Ke.commandExecution&&jt(j,{...Ke,commandExecution:{...Ke.commandExecution,aggregatedOutput:`${Ke.commandExecution.aggregatedOutput}${Vn.delta}`}})}const xn=or(u);if(xn&&jt(j,xn),Hn(u)&&(z&&n.value&&m(n.value,{scrollTop:0,isAtBottom:!0,scrollRatio:1}),ze(j)),u.method==="turn/completed"){z=!1,ze(j),i.value[j]&&(i.value=Mt(i.value,j));const Ke=gt(u);Ke&&(Oe(Ke,!1),Ue(Ke,null),Fe(Ke),oi(Ke))}}function D(u){const h=gt(u);h&&he.add(h);const y=u.method;(y.startsWith("thread/")||y.startsWith("turn/")||y.startsWith("item/"))&&(Te=!0),!(qe!==null||typeof window>"u")&&(qe=window.setTimeout(()=>{qe=null,ir()},ro))}async function ve(u){if(!C){C=!0;try{const h=await Aa(),y=[];for(const T of h.order){const G=io(T);y.includes(G)||y.push(G)}if(y.length>0){const T=os(y,u);Zn(A.value,T)||(A.value=T,lr(A.value))}if(Object.keys(h.labels).length>0){const T={...B.value};let G=!1;for(const[j,_e]of Object.entries(h.labels)){const Pe=io(j);T[Pe]!==_e&&(T[Pe]=_e,G=!0)}G&&(B.value=T,so(T))}}catch{}}}async function He(){if(!(Object.keys(re.value).length>0))try{const u=await Fv();Object.keys(u.titles).length>0&&(re.value=u.titles)}catch{}}async function bt(u,h,y){if(re.value[u])return;const T=h.trim();if(!T)return;const G=T.length>300?T.slice(0,300):T;try{const j=await Hv(G,y);if(!j||re.value[u])return;re.value={...re.value,[u]:j},ie(),Ia(u,j)}catch{}}async function St(){var u;Ie.value||(fe.value=!0);try{const[h]=await Promise.all([_v(),He()]);await ve(h);const y=os(A.value,h);Zn(A.value,y)||(A.value=y,lr(A.value));const T=oo(h,A.value),G=Qb(t.value,T,a.value);t.value=is(t.value,G),a.value=xt(a.value,new Set(Mn(t.value).map(Pe=>Pe.id))),ie(),Ie.value=!0;const j=Mn(e.value);we(j),j.some(Pe=>Pe.id===n.value)||U(((u=j[0])==null?void 0:u.id)??"")}finally{fe.value=!1}}async function $t(u,h={}){if(!u)return;const y=M.value[u]===!0,T=h.silent!==!0&&!y;T&&(X.value=!0);try{V.value[u]!==!0&&(await Ca(u),V.value={...V.value,[u]:!0});const G=await kv(u),j=r.value[u]??[],_e=Fb(j,G,{preserveMissing:h.silent===!0});E(u,_e);const Pe=s.value[u]??[],Re=Hb(Pe,G);I(u,Re),Sn(u,G),M.value={...M.value,[u]:!0};const st=K(u);st&&(q.value={...q.value,[u]:st}),Ce(u)}finally{T&&(X.value=!1)}}async function Un(){try{const u=t.value.flatMap(h=>h.threads.map(y=>y.cwd)).filter(Boolean);te.value=await Uv(u.length>0?[...new Set(u)]:void 0)}catch{}}async function Sc(){Se.value="";try{await St(),await Promise.all([Y(),Un()]),await $t(n.value)}catch(u){Se.value=u instanceof Error?u.message:"Unknown application error"}}async function xc(u){U(u);try{await $t(u)}catch(h){Se.value=h instanceof Error?h.message:"Unknown application error"}}async function Cc(u){try{await Cv(u),await St(),n.value===u&&await $t(n.value)}catch(h){Se.value=h instanceof Error?h.message:"Unknown application error"}}async function si(u,h=[],y=[],T="steer",G=[]){const j=n.value,_e=u.trim();if(!j||!_e&&h.length===0&&G.length===0)return;const Pe=a.value[j]===!0;if(Pe&&T==="queue"){const Re=l.value[j]??[],st=`q-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;l.value={...l.value,[j]:[...Re,{id:st,text:_e,imageUrls:h,skills:y,fileAttachments:G}]};return}if(Pe){z=!0,Zr(j,_e,h,y,G).catch(Re=>{const st=Re instanceof Error?Re.message:"Unknown application error";N(j,st),Se.value=st});return}Se.value="",z=!0,$e(j,null),Ue(j,{label:"Thinking",details:Z(f.value,g.value)}),N(j,null),Oe(j,!0);try{await Zr(j,_e,h,y,G)}catch(Re){z=!1,Oe(j,!1),Ue(j,null);const st=Re instanceof Error?Re.message:"Unknown application error";throw N(j,st),Se.value=st,Re}}async function Ac(u,h,y=[],T=[],G=[]){const j=u.trim(),_e=h.trim(),Pe=f.value.trim();if(!j&&y.length===0&&G.length===0)return"";Me.value=!0,Se.value="";let Re="";try{if(Re=await Iv(_e||void 0,Pe||void 0),!Re)return"";se(Re,_e,j||"[Image]"),V.value={...V.value,[Re]:!0},U(Re),z=!0,$e(Re,null),Ue(Re,{label:"Thinking",details:Z(f.value,g.value)}),N(Re,null),Oe(Re,!0);const st=Re,Bt=_e||null,Vn=j;return Zr(Re,j,y,T,G).catch(xn=>{z=!1,Oe(Re,!1),Ue(Re,null);const qn=xn instanceof Error?xn.message:"Unknown application error";N(Re,qn),Se.value=qn}).finally(()=>{Me.value=!1}),bt(st,Vn,Bt),Re}catch(st){z=!1,Re&&(Oe(Re,!1),Ue(Re,null));const Bt=st instanceof Error?st.message:"Unknown application error";throw Re&&N(Re,Bt),Se.value=Bt,Me.value=!1,st}}async function Zr(u,h,y=[],T=[],G=[]){const j=f.value.trim(),_e=g.value;try{V.value[u]!==!0&&await Ca(u),await $v(u,h,y,j||void 0,_e||void 0,T.length>0?T:void 0,G),V.value={...V.value,[u]:!0},he.add(u),Te=!0,await ir()}catch(Pe){throw Pe}}async function oi(u){const h=l.value[u];if(!h||h.length===0)return;const[y,...T]=h;l.value=T.length>0?{...l.value,[u]:T}:Mt(l.value,u),Me.value=!0,Se.value="",z=!0,$e(u,null),Ue(u,{label:"Thinking",details:Z(f.value,g.value)}),N(u,null),Oe(u,!0);try{await Zr(u,y.text,y.imageUrls,y.skills,y.fileAttachments)}catch{Oe(u,!1),Ue(u,null)}finally{Me.value=!1}}async function Ec(){const u=n.value;if(!u||a.value[u]!==!0)return;const h=le.value[u];We.value=!0,Se.value="";try{await Mv(u,h),Oe(u,!1),Ue(u,null),N(u,null),le.value[u]&&(le.value=Mt(le.value,u)),he.add(u),Te=!0,await ir()}catch(y){const T=y instanceof Error?y.message:"Failed to interrupt active turn";N(u,T),Se.value=T}finally{We.value=!1}}async function Ic(u){const h=n.value;if(!h||Ze.value)return;const T=(r.value[h]??[]).reduce((j,_e)=>typeof _e.turnIndex=="number"&&_e.turnIndex>j?_e.turnIndex:j,-1);if(T<0||u>T)return;const G=T-u+1;if(!(G<1)){Ze.value=!0,Se.value="";try{const j=await Av(h,G);E(h,j),I(h,[]),ze(h),i.value[h]&&(i.value=Mt(i.value,h)),$e(h,null),Ue(h,null),N(h,null),Te=!0,await ir()}catch(j){Se.value=j instanceof Error?j.message:"Failed to rollback thread"}finally{Ze.value=!1}}}function Rc(u,h){u.length===0||(B.value[u]??"")===h||(B.value={...B.value,[u]:h},so(B.value))}function $c(u){var G;if(u.length===0)return;const h=A.value.filter(j=>j!==u);if(Zn(A.value,h)||(A.value=h,lr(A.value)),t.value=t.value.filter(j=>j.projectName!==u),B.value[u]!==void 0){const j={...B.value};delete j[u],B.value=j,so(j)}ie();const y=Mn(e.value);we(y),y.some(j=>j.id===n.value)||U(((G=y[0])==null?void 0:G.id)??""),js()}function Mc(u,h){if(u.length===0||t.value.length===0)return;const y=t.value.map(Re=>Re.projectName),T=y.indexOf(u);if(T===-1)return;const G=Math.max(0,Math.min(h,y.length-1)),j=Db(y,T,G);if(j===y)return;const _e=os(j,t.value);A.value=_e,lr(A.value);const Pe=oo(t.value,A.value);t.value=is(t.value,Pe),ie(),js()}function Pc(u){const h=u.trim();if(!h)return;const y=[h,...A.value.filter(G=>G!==h)];if(Zn(A.value,y))return;A.value=y,lr(A.value);const T=oo(t.value,A.value);t.value=is(t.value,T),ie(),js()}async function js(){var u,h;try{const y=await Aa(),T=new Map;for(const _e of y.order){const Pe=io(_e);T.has(Pe)||T.set(Pe,_e)}for(const _e of t.value){const Pe=((h=(u=_e.threads[0])==null?void 0:u.cwd)==null?void 0:h.trim())??"";Pe&&T.set(_e.projectName,Pe)}const G=[];for(const _e of A.value){const Pe=T.get(_e);Pe&&!G.includes(Pe)&&G.push(Pe)}for(const _e of y.order)G.includes(_e)||G.push(_e);const j=y.active.filter(_e=>G.includes(_e));j.length===0&&G.length>0&&j.push(G[0]),await jv({order:G,labels:y.labels,active:j})}catch{}}async function Nc(){if(!Le.value){Le.value=!0;try{if(await St(),!n.value)return;const u=n.value,h=K(u),y=q.value[u]??"",T=h.length>0&&h!==y;(a.value[u]===!0||T)&&await $t(u,{silent:!0})}catch{}finally{Le.value=!1}}}async function ir(){if(Le.value){typeof window<"u"&&qe===null&&(qe=window.setTimeout(()=>{qe=null,ir()},ro));return}Le.value=!0;const u=Te,h=new Set(he);Te=!1,he.clear();try{u&&await St();const y=n.value;if(!y)return;const T=h.has(y),G=a.value[y]===!0,j=K(y),_e=q.value[y]??"",Pe=j.length>0&&j!==_e;(T||G||Pe||u)&&await $t(y,{silent:!0})}catch{}finally{Le.value=!1,(Te||he.size>0)&&typeof window<"u"&&qe===null&&(qe=window.setTimeout(()=>{qe=null,ir()},ro))}}function Oc(){typeof window>"u"||et||(rt.value&&ai(),jc(),et=Tv(u=>{xr(u),D(u)}))}async function jc(){try{const u=await xv();for(const h of u){const y=Tt(h);y&&Fn(y)}}catch{}}async function Lc(u){try{await Sv(u.id,{result:u.result,error:u.error}),kn(u.id)}catch(h){Se.value=h instanceof Error?h.message:"Failed to reply to server request"}}function ii(u={}){const h=u.updatePreference??!0;ut!==null&&typeof window<"u"&&(window.clearInterval(ut),ut=null),ue!==null&&typeof window<"u"&&(window.clearInterval(ue),ue=null),h&&(rt.value=!1,Oa(!1)),tt.value=Math.floor(Rr/1e3)}function ai(){typeof window>"u"||ut!==null||ue!==null||(rt.value=!0,Oa(!0),tt.value=Math.floor(Rr/1e3),ut=window.setInterval(()=>{tt.value=Math.floor(Rr/1e3),Nc()},Rr),ue=window.setInterval(()=>{tt.value=Math.max(0,tt.value-1)},1e3))}function Dc(){if(rt.value){ii();return}ai()}function Bc(){ii({updatePreference:!1}),et&&(et(),et=null),Te=!1,he.clear(),ee.clear(),qe!==null&&typeof window<"u"&&(window.clearTimeout(qe),qe=null),z=!1,r.value={},s.value={},o.value={},i.value={},ae.value={},F.value={},oe.value={},le.value={},l.value={}}const Fc=ce(()=>{const u=n.value;return u?l.value[u]??[]:[]});function li(u){const h=n.value;if(!h)return;const y=l.value[h];if(!y)return;const T=y.filter(G=>G.id!==u);l.value=T.length>0?{...l.value,[h]:T}:Mt(l.value,h)}function Hc(u){const h=n.value;if(!h)return;const y=l.value[h];if(!y)return;const T=y.find(G=>G.id===u);T&&(li(u),si(T.text,T.imageUrls,T.skills,"steer",T.fileAttachments))}return{projectGroups:e,projectDisplayNameById:B,selectedThread:xe,selectedThreadScrollState:p,selectedThreadServerRequests:v,selectedLiveOverlay:x,selectedThreadId:n,availableModelIds:c,selectedModelId:f,selectedReasoningEffort:g,installedSkills:te,messages:L,isLoadingThreads:fe,isLoadingMessages:X,isSendingMessage:Me,isInterruptingTurn:We,isAutoRefreshEnabled:rt,autoRefreshSecondsLeft:tt,error:Se,refreshAll:Sc,refreshSkills:Un,selectThread:xc,setThreadScrollState:m,archiveThreadById:Cc,sendMessageToSelectedThread:si,sendMessageToNewThread:Ac,interruptSelectedThreadTurn:Ec,rollbackSelectedThread:Ic,isRollingBack:Ze,selectedThreadQueuedMessages:Fc,removeQueuedMessage:li,steerQueuedMessage:Hc,setSelectedModelId:O,setSelectedReasoningEffort:ne,respondToPendingServerRequest:Lc,renameProject:Rc,removeProject:$c,reorderProject:Mc,pinProjectToTop:Pc,toggleAutoRefreshTimer:Dc,startPolling:Oc,stopPolling:Bc}}const t0={class:"sidebar-root"},n0=["aria-pressed"],r0={key:1,class:"sidebar-search-bar"},s0={class:"content-root"},o0={class:"content-body"},i0={key:1,class:"content-grid"},a0={class:"new-thread-empty"},l0={key:2,class:"content-grid"},c0={class:"content-thread"},u0={class:"composer-with-queue"},d0={class:"build-badge","aria-label":"Worktree name"},Da="codex-web-local.sidebar-collapsed.v1",f0=kt({__name:"App",setup(e){const t="4dc0",{projectGroups:n,projectDisplayNameById:r,selectedThread:s,selectedThreadScrollState:o,selectedThreadServerRequests:i,selectedLiveOverlay:a,selectedThreadId:l,availableModelIds:d,selectedModelId:c,selectedReasoningEffort:f,installedSkills:g,messages:b,isLoadingThreads:$,isLoadingMessages:A,isInterruptingTurn:B,isAutoRefreshEnabled:q,autoRefreshSecondsLeft:M,refreshAll:V,refreshSkills:F,selectThread:ae,setThreadScrollState:oe,archiveThreadById:le,sendMessageToSelectedThread:de,sendMessageToNewThread:re,interruptSelectedThreadTurn:te,rollbackSelectedThread:fe,isRollingBack:X,selectedThreadQueuedMessages:Me,removeQueuedMessage:We,steerQueuedMessage:Ze,setSelectedModelId:Se,setSelectedReasoningEffort:Le,respondToPendingServerRequest:Ie,renameProject:rt,removeProject:tt,reorderProject:et,pinProjectToTop:qe,toggleAutoRefreshTimer:ut,startPolling:ue,stopPolling:Te}=e0(),he=Ah(),C=Ch(),{isMobile:z}=hc(),ee=H(!1),ye=H(!1),xe=H(""),p=H(sr()),v=H(""),x=H(!1),L=H(null),U=H("New Project (1)"),O=H(""),ne=ce(()=>{const D=he.params.threadId;return typeof D=="string"?D:""}),Z=ce(()=>{const D=new Set;for(const ve of n.value)for(const He of ve.threads)D.add(He.id);return D}),Y=ce(()=>he.name==="home"),W=ce(()=>he.name==="skills"),ie=ce(()=>{var D;return W.value?"Skills":Y.value?"New thread":((D=s.value)==null?void 0:D.title)??"Choose a thread"}),se=ce(()=>q.value?`Auto refresh in ${String(M.value)}s`:"Enable 4s refresh"),we=ce(()=>b.value.filter(D=>{const ve=jt(D.messageType,D.role);return ve==="worked"?!0:!(ve==="turnActivity.live"||ve==="turnError.live"||ve==="agentReasoning.live")})),Ce=ce(()=>a.value),$e=ce(()=>Y.value?"__new-thread__":l.value),Oe=ce(()=>{var D,ve;return Y.value?xe.value.trim():((ve=(D=s.value)==null?void 0:D.cwd)==null?void 0:ve.trim())??""}),Fe=ce(()=>{var D;return!Y.value&&((D=s.value)==null?void 0:D.inProgress)===!0}),Ue=ce(()=>{var bt,St;const D=[],ve=new Set;for(const $t of n.value){const Un=((St=(bt=$t.threads[0])==null?void 0:bt.cwd)==null?void 0:St.trim())??"";!Un||ve.has(Un)||(ve.add(Un),D.push({value:Un,label:r.value[$t.projectName]??$t.projectName}))}const He=xe.value.trim();return He&&!ve.has(He)&&D.unshift({value:He,label:R(He)}),D});Dn(()=>{window.addEventListener("keydown",Fn),Sn(),Sr(),Tn()}),Rs(()=>{window.removeEventListener("keydown",Fn),Te()});function N(){F()}function K(){x.value=!x.value,x.value?qt(()=>{var D;return(D=L.value)==null?void 0:D.focus()}):v.value=""}function m(){var D;v.value="",(D=L.value)==null||D.focus()}function E(D){D.key==="Escape"&&(x.value=!1,v.value="")}function I(D){D&&(he.name==="thread"&&ne.value===D||(C.push({name:"thread",params:{threadId:D}}),z.value&&Tt(!0)))}function J(D){le(D)}function ge(D){var bt,St;const ve=n.value.find($t=>$t.projectName===D),He=((St=(bt=ve==null?void 0:ve.threads[0])==null?void 0:bt.cwd)==null?void 0:St.trim())??"";He&&(xe.value=He),z.value&&Tt(!0),!Y.value&&C.push({name:"home"})}function Ae(){var ve,He;const D=((He=(ve=s.value)==null?void 0:ve.cwd)==null?void 0:He.trim())??"";D&&(xe.value=D),z.value&&Tt(!0),!Y.value&&C.push({name:"home"})}function ze(D){rt(D.projectName,D.displayName)}function be(D){tt(D)}function me(D){et(D.projectName,D.toIndex)}function dt(D){oe(D.threadId,D.state)}function gt(D){Ie(D)}function Gt(){ut()}function Tt(D){p.value!==D&&(p.value=D,or(D))}function Fn(D){D.defaultPrevented||!D.ctrlKey&&!D.metaKey||D.shiftKey||D.altKey||D.key.toLowerCase()==="b"&&(D.preventDefault(),Tt(!p.value))}function kn(D){const ve=D.text;if(Y.value){xr(ve,D.imageUrls,D.skills,D.fileAttachments);return}de(ve,D.imageUrls,D.skills,D.mode,D.fileAttachments)}function _r(D){xe.value=D.trim()}async function cn(D){const ve=D.trim();if(!ve)return;const He=Tr(ve),bt=await kr(),St=He?ve:P(bt,ve);if(St)try{const $t=await Lv(St,{createIfMissing:!He,label:He?"":ve});$t&&(xe.value=$t,qe(R($t)),Tn())}catch{}}async function kr(){const D=en();if(D)return D;try{const ve=await Ea();if(ve)return O.value=ve,ve}catch{}return""}function Tr(D){return D?D.startsWith("~/")||D.startsWith("/")?!0:/^[a-zA-Z]:[\\/]/.test(D):!1}async function Tn(){const D=en();if(!D){U.value="New Project (1)";return}try{const ve=await Dv(D);U.value=ve.name||"New Project (1)"}catch{U.value="New Project (1)"}}function en(){var He,bt;const D=xe.value.trim();if(D)return k(D);const ve=((bt=(He=Ue.value[0])==null?void 0:He.value)==null?void 0:bt.trim())??"";return ve?k(ve):O.value.trim()}async function Sr(){try{O.value=await Ea()}catch{O.value=""}}function k(D){const ve=D.trim().replace(/\/+$/,"");if(!ve)return"";const He=ve.lastIndexOf("/");return He<=0?"":ve.slice(0,He)}function R(D){const ve=D.trim().replace(/\/+$/,"");if(!ve)return"";const He=ve.lastIndexOf("/");return He<0?ve:ve.slice(He+1)}function P(D,ve){const He=D.trim().replace(/\/+$/,""),bt=ve.trim().replace(/^\/+/,"");return!He||!bt?"":`${He}/${bt}`}function Q(D){Se(D)}function Ve(D){Le(D)}function vt(){te()}function Dt(D){fe(D.turnIndex)}function sr(){return typeof window>"u"?!1:window.localStorage.getItem(Da)==="1"}function or(D){typeof window>"u"||window.localStorage.setItem(Da,D?"1":"0")}function jt(D,ve){const He=(D??"").trim();return He.length>0?He:ve.trim()||"message"}async function Sn(){await V(),ye.value=!0,await Hn(),ue()}async function Hn(){if(!ee.value){ee.value=!0;try{if(he.name==="home"||he.name==="skills"){l.value!==""&&await ae("");return}if(he.name==="thread"){const D=ne.value;if(!D)return;if(!Z.value.has(D)){await C.replace({name:"home"});return}l.value!==D&&await ae(D);return}}finally{ee.value=!1}}}ft(()=>[he.name,ne.value,$.value,Z.value.has(ne.value),l.value],async()=>{ye.value&&await Hn()}),ft(()=>l.value,async D=>{if(ye.value&&!ee.value&&!(Y.value||W.value)){if(!D){he.name!=="home"&&await C.replace({name:"home"});return}he.name==="thread"&&ne.value===D||await C.replace({name:"thread",params:{threadId:D}})}}),ft(()=>Ue.value,D=>{if(D.length===0){xe.value="";return}D.some(He=>He.value===xe.value)||(xe.value=D[0].value),Tn()},{immediate:!0}),ft(()=>xe.value,()=>{Tn()}),ft(z,D=>{D&&!p.value&&Tt(!0)});async function xr(D,ve=[],He=[],bt=[]){try{const St=await re(D,xe.value,ve,He,bt);if(!St)return;await C.replace({name:"thread",params:{threadId:St}})}catch{}}return(D,ve)=>(_(),S(De,null,[Ee(Ph,{"is-sidebar-collapsed":p.value,onCloseSidebar:ve[4]||(ve[4]=He=>Tt(!0))},{sidebar:nt(()=>[w("section",t0,[p.value?pe("",!0):(_(),ot(Ma,{key:0,class:"sidebar-thread-controls-host","is-sidebar-collapsed":p.value,"is-auto-refresh-enabled":Ne(q),"auto-refresh-button-label":se.value,"show-new-thread-button":!0,onToggleSidebar:ve[0]||(ve[0]=He=>Tt(!p.value)),onToggleAutoRefresh:Gt,onStartNewThread:Ae},{default:nt(()=>[w("button",{class:"sidebar-search-toggle",type:"button","aria-pressed":x.value,"aria-label":"Search threads",title:"Search threads",onClick:K},[Ee(Eo,{class:"sidebar-search-toggle-icon"})],8,n0)]),_:1},8,["is-sidebar-collapsed","is-auto-refresh-enabled","auto-refresh-button-label"])),!p.value&&x.value?(_(),S("div",r0,[Ee(Eo,{class:"sidebar-search-bar-icon"}),Nn(w("input",{ref_key:"sidebarSearchInputRef",ref:L,"onUpdate:modelValue":ve[1]||(ve[1]=He=>v.value=He),class:"sidebar-search-input",type:"text",placeholder:"Filter threads...",onKeydown:E},null,544),[[jn,v.value]]),v.value.length>0?(_(),S("button",{key:0,class:"sidebar-search-clear",type:"button","aria-label":"Clear search",onClick:m},[Ee(ti,{class:"sidebar-search-clear-icon"})])):pe("",!0)])):pe("",!0),p.value?pe("",!0):(_(),S("button",{key:2,class:lt(["sidebar-skills-link",{"is-active":W.value}]),type:"button",onClick:ve[2]||(ve[2]=He=>{Ne(C).push({name:"skills"}),Ne(z)&&Tt(!0)})}," Skills Hub ",2)),p.value?pe("",!0):(_(),ot(mm,{key:3,groups:Ne(n),"project-display-name-by-id":Ne(r),"selected-thread-id":Ne(l),"is-loading":Ne($),"search-query":v.value,onSelect:I,onArchive:J,onStartNewThread:ge,onRenameProject:ze,onRemoveProject:be,onReorderProject:me},null,8,["groups","project-display-name-by-id","selected-thread-id","is-loading","search-query"]))])]),content:nt(()=>[w("section",s0,[Ee(_m,{title:ie.value},{leading:nt(()=>[p.value||Ne(z)?(_(),ot(Ma,{key:0,class:"sidebar-thread-controls-header-host","is-sidebar-collapsed":p.value,"is-auto-refresh-enabled":Ne(q),"auto-refresh-button-label":se.value,"show-new-thread-button":!0,onToggleSidebar:ve[3]||(ve[3]=He=>Tt(!p.value)),onToggleAutoRefresh:Gt,onStartNewThread:Ae},null,8,["is-sidebar-collapsed","is-auto-refresh-enabled","auto-refresh-button-label"])):pe("",!0)]),_:1},8,["title"]),w("section",o0,[W.value?(_(),ot(hb,{key:0,onSkillsChanged:N})):Y.value?(_(),S("div",i0,[w("div",a0,[ve[5]||(ve[5]=w("p",{class:"new-thread-hero"},"Let's build",-1)),Ee(Ao,{class:"new-thread-folder-dropdown","model-value":xe.value,options:Ue.value,placeholder:"Choose folder","enable-search":!0,"search-placeholder":"Quick search project","show-add-action":!0,"add-action-label":"+ Add new project","default-add-value":U.value,"add-placeholder":"Project name or absolute path",disabled:!1,"onUpdate:modelValue":_r,onAdd:cn},null,8,["model-value","options","default-add-value"])]),Ee(Ra,{"active-thread-id":$e.value,cwd:Oe.value,models:Ne(d),"selected-model":Ne(c),"selected-reasoning-effort":Ne(f),skills:Ne(g),"is-turn-in-progress":!1,"is-interrupting-turn":!1,onSubmit:kn,"onUpdate:selectedModel":Q,"onUpdate:selectedReasoningEffort":Ve},null,8,["active-thread-id","cwd","models","selected-model","selected-reasoning-effort","skills"])])):(_(),S("div",l0,[w("div",c0,[Ee(Qg,{messages:we.value,"is-loading":Ne(A),"active-thread-id":$e.value,"scroll-state":Ne(o),"live-overlay":Ce.value,"pending-requests":Ne(i),"is-turn-in-progress":Fe.value,"is-rolling-back":Ne(X),onUpdateScrollState:dt,onRespondServerRequest:gt,onRollback:Dt},null,8,["messages","is-loading","active-thread-id","scroll-state","live-overlay","pending-requests","is-turn-in-progress","is-rolling-back"])]),w("div",u0,[Ee(vw,{messages:Ne(Me),onSteer:Ne(Ze),onDelete:Ne(We)},null,8,["messages","onSteer","onDelete"]),Ee(Ra,{"active-thread-id":$e.value,cwd:Oe.value,models:Ne(d),"selected-model":Ne(c),"selected-reasoning-effort":Ne(f),skills:Ne(g),"is-turn-in-progress":Fe.value,"is-interrupting-turn":Ne(B),"has-queue-above":Ne(Me).length>0,onSubmit:kn,"onUpdate:selectedModel":Q,"onUpdate:selectedReasoningEffort":Ve,onInterrupt:vt},null,8,["active-thread-id","cwd","models","selected-model","selected-reasoning-effort","skills","is-turn-in-progress","is-interrupting-turn","has-queue-above"])])]))])])]),_:1},8,["is-sidebar-collapsed"]),w("div",d0," WT "+ke(Ne(t)),1)],64))}}),h0=Ge(f0,[["__scopeId","data-v-a165fa31"]]),ao={render:()=>null},p0=xh({history:rh(),routes:[{path:"/",name:"home",component:ao},{path:"/thread/:threadId",name:"thread",component:ao},{path:"/skills",name:"skills",component:ao},{path:"/new-thread",redirect:{name:"home"}},{path:"/:pathMatch(.*)*",redirect:{name:"home"}}]});gf(h0).use(p0).mount("#app");