neoctl-web 0.1.4 → 0.1.6

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,122 @@
1
+ var mm=Object.defineProperty;var bm=(e,t,n)=>t in e?mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $e=(e,t,n)=>bm(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/**
2
+ * @vue/shared v3.5.34
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function nl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ue={},ks=[],en=()=>{},Cd=()=>!1,to=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),no=e=>e.startsWith("onUpdate:"),Xe=Object.assign,sl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},km=Object.prototype.hasOwnProperty,Oe=(e,t)=>km.call(e,t),me=Array.isArray,ys=e=>Or(e)==="[object Map]",Cs=e=>Or(e)==="[object Set]",cu=e=>Or(e)==="[object Date]",Se=e=>typeof e=="function",Ke=e=>typeof e=="string",tn=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",Id=e=>(Pe(e)||Se(e))&&Se(e.then)&&Se(e.catch),Md=Object.prototype.toString,Or=e=>Md.call(e),ym=e=>Or(e).slice(8,-1),Rd=e=>Or(e)==="[object Object]",rl=e=>Ke(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,mr=nl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),so=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},_m=/-\w/g,yt=so(e=>e.replace(_m,t=>t.slice(1).toUpperCase())),vm=/\B([A-Z])/g,On=so(e=>e.replace(vm,"-$1").toLowerCase()),ro=so(e=>e.charAt(0).toUpperCase()+e.slice(1)),ca=so(e=>e?`on${ro(e)}`:""),Xt=(e,t)=>!Object.is(e,t),Ri=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Nd=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},io=e=>{const t=parseFloat(e);return isNaN(t)?e:t},wm=e=>{const t=Ke(e)?Number(e):NaN;return isNaN(t)?e:t};let uu;const oo=()=>uu||(uu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function St(e){if(me(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],o=Ke(i)?Tm(i):St(i);if(o)for(const a in o)t[a]=o[a]}return t}else if(Ke(e)||Pe(e))return e}const xm=/;(?![^(]*\))/g,Sm=/:([^]+)/,Em=/\/\*[^]*?\*\//g;function Tm(e){const t={};return e.replace(Em,"").split(xm).forEach(n=>{if(n){const i=n.split(Sm);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function de(e){let t="";if(Ke(e))t=e;else if(me(e))for(let n=0;n<e.length;n++){const i=de(e[n]);i&&(t+=i+" ")}else if(Pe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Am="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Cm=nl(Am);function Ld(e){return!!e||e===""}function Im(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=Nn(e[i],t[i]);return n}function Nn(e,t){if(e===t)return!0;let n=cu(e),i=cu(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=tn(e),i=tn(t),n||i)return e===t;if(n=me(e),i=me(t),n||i)return n&&i?Im(e,t):!1;if(n=Pe(e),i=Pe(t),n||i){if(!n||!i)return!1;const o=Object.keys(e).length,a=Object.keys(t).length;if(o!==a)return!1;for(const c in e){const u=e.hasOwnProperty(c),f=t.hasOwnProperty(c);if(u&&!f||!u&&f||!Nn(e[c],t[c]))return!1}}return String(e)===String(t)}function il(e,t){return e.findIndex(n=>Nn(n,t))}const Od=e=>!!(e&&e.__v_isRef===!0),A=e=>Ke(e)?e:e==null?"":me(e)||Pe(e)&&(e.toString===Md||!Se(e.toString))?Od(e)?A(e.value):JSON.stringify(e,Dd,2):String(e),Dd=(e,t)=>Od(t)?Dd(e,t.value):ys(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,o],a)=>(n[ua(i,a)+" =>"]=o,n),{})}:Cs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ua(n))}:tn(t)?ua(t):Pe(t)&&!me(t)&&!Rd(t)?String(t):t,ua=(e,t="")=>{var n;return tn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
+ * @vue/reactivity v3.5.34
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let Je;class Mm{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Je&&(Je.active?(this.parent=Je,this.index=(Je.scopes||(Je.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!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=Je;try{return Je=this,t()}finally{Je=n}}}on(){++this._on===1&&(this.prevScope=Je,Je=this)}off(){if(this._on>0&&--this._on===0){if(Je===this)Je=this.prevScope;else{let t=Je;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Rm(){return Je}function Nm(e,t=!1){Je&&Je.cleanups.push(e)}let Fe;const da=new WeakSet;class Pd{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Je&&(Je.active?Je.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,da.has(this)&&(da.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Bd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,du(this),Ud(this);const t=Fe,n=Ft;Fe=this,Ft=!0;try{return this.fn()}finally{Fd(this),Fe=t,Ft=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ll(t);this.deps=this.depsTail=void 0,du(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?da.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Na(this)&&this.run()}get dirty(){return Na(this)}}let $d=0,br,kr;function Bd(e,t=!1){if(e.flags|=8,t){e.next=kr,kr=e;return}e.next=br,br=e}function ol(){$d++}function al(){if(--$d>0)return;if(kr){let t=kr;for(kr=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;br;){let t=br;for(br=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function Ud(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fd(e){let t,n=e.depsTail,i=n;for(;i;){const o=i.prevDep;i.version===-1?(i===n&&(n=o),ll(i),Lm(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}e.deps=t,e.depsTail=n}function Na(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(zd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function zd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Tr)||(e.globalVersion=Tr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Na(e))))return;e.flags|=2;const t=e.dep,n=Fe,i=Ft;Fe=e,Ft=!0;try{Ud(e);const o=e.fn(e._value);(t.version===0||Xt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Fe=n,Ft=i,Fd(e),e.flags&=-3}}function ll(e,t=!1){const{dep:n,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)ll(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Lm(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ft=!0;const Hd=[];function mn(){Hd.push(Ft),Ft=!1}function bn(){const e=Hd.pop();Ft=e===void 0?!0:e}function du(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Fe;Fe=void 0;try{t()}finally{Fe=n}}}let Tr=0;class Om{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 cl{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(!Fe||!Ft||Fe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Fe)n=this.activeLink=new Om(Fe,this),Fe.deps?(n.prevDep=Fe.depsTail,Fe.depsTail.nextDep=n,Fe.depsTail=n):Fe.deps=Fe.depsTail=n,jd(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Fe.depsTail,n.nextDep=void 0,Fe.depsTail.nextDep=n,Fe.depsTail=n,Fe.deps===n&&(Fe.deps=i)}return n}trigger(t){this.version++,Tr++,this.notify(t)}notify(t){ol();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{al()}}}function jd(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)jd(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const La=new WeakMap,Qn=Symbol(""),Oa=Symbol(""),Ar=Symbol("");function at(e,t,n){if(Ft&&Fe){let i=La.get(e);i||La.set(e,i=new Map);let o=i.get(n);o||(i.set(n,o=new cl),o.map=i,o.key=n),o.track()}}function fn(e,t,n,i,o,a){const c=La.get(e);if(!c){Tr++;return}const u=f=>{f&&f.trigger()};if(ol(),t==="clear")c.forEach(u);else{const f=me(e),m=f&&rl(n);if(f&&n==="length"){const p=Number(i);c.forEach((y,w)=>{(w==="length"||w===Ar||!tn(w)&&w>=p)&&u(y)})}else switch((n!==void 0||c.has(void 0))&&u(c.get(n)),m&&u(c.get(Ar)),t){case"add":f?m&&u(c.get("length")):(u(c.get(Qn)),ys(e)&&u(c.get(Oa)));break;case"delete":f||(u(c.get(Qn)),ys(e)&&u(c.get(Oa)));break;case"set":ys(e)&&u(c.get(Qn));break}}al()}function ds(e){const t=Ne(e);return t===e?t:(at(t,"iterate",Ar),Mt(e)?t:t.map(zt))}function ao(e){return at(e=Ne(e),"iterate",Ar),e}function Yt(e,t){return kn(e)?Ss(Yn(e)?zt(t):t):zt(t)}const Dm={__proto__:null,[Symbol.iterator](){return fa(this,Symbol.iterator,e=>Yt(this,e))},concat(...e){return ds(this).concat(...e.map(t=>me(t)?ds(t):t))},entries(){return fa(this,"entries",e=>(e[1]=Yt(this,e[1]),e))},every(e,t){return an(this,"every",e,t,void 0,arguments)},filter(e,t){return an(this,"filter",e,t,n=>n.map(i=>Yt(this,i)),arguments)},find(e,t){return an(this,"find",e,t,n=>Yt(this,n),arguments)},findIndex(e,t){return an(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return an(this,"findLast",e,t,n=>Yt(this,n),arguments)},findLastIndex(e,t){return an(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return an(this,"forEach",e,t,void 0,arguments)},includes(...e){return ga(this,"includes",e)},indexOf(...e){return ga(this,"indexOf",e)},join(e){return ds(this).join(e)},lastIndexOf(...e){return ga(this,"lastIndexOf",e)},map(e,t){return an(this,"map",e,t,void 0,arguments)},pop(){return nr(this,"pop")},push(...e){return nr(this,"push",e)},reduce(e,...t){return fu(this,"reduce",e,t)},reduceRight(e,...t){return fu(this,"reduceRight",e,t)},shift(){return nr(this,"shift")},some(e,t){return an(this,"some",e,t,void 0,arguments)},splice(...e){return nr(this,"splice",e)},toReversed(){return ds(this).toReversed()},toSorted(e){return ds(this).toSorted(e)},toSpliced(...e){return ds(this).toSpliced(...e)},unshift(...e){return nr(this,"unshift",e)},values(){return fa(this,"values",e=>Yt(this,e))}};function fa(e,t,n){const i=ao(e),o=i[t]();return i!==e&&!Mt(e)&&(o._next=o.next,o.next=()=>{const a=o._next();return a.done||(a.value=n(a.value)),a}),o}const Pm=Array.prototype;function an(e,t,n,i,o,a){const c=ao(e),u=c!==e&&!Mt(e),f=c[t];if(f!==Pm[t]){const y=f.apply(e,a);return u?zt(y):y}let m=n;c!==e&&(u?m=function(y,w){return n.call(this,Yt(e,y),w,e)}:n.length>2&&(m=function(y,w){return n.call(this,y,w,e)}));const p=f.call(c,m,i);return u&&o?o(p):p}function fu(e,t,n,i){const o=ao(e),a=o!==e&&!Mt(e);let c=n,u=!1;o!==e&&(a?(u=i.length===0,c=function(m,p,y){return u&&(u=!1,m=Yt(e,m)),n.call(this,m,Yt(e,p),y,e)}):n.length>3&&(c=function(m,p,y){return n.call(this,m,p,y,e)}));const f=o[t](c,...i);return u?Yt(e,f):f}function ga(e,t,n){const i=Ne(e);at(i,"iterate",Ar);const o=i[t](...n);return(o===-1||o===!1)&&fl(n[0])?(n[0]=Ne(n[0]),i[t](...n)):o}function nr(e,t,n=[]){mn(),ol();const i=Ne(e)[t].apply(e,n);return al(),bn(),i}const $m=nl("__proto__,__v_isRef,__isVue"),Wd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tn));function Bm(e){tn(e)||(e=String(e));const t=Ne(this);return at(t,"has",e),t.hasOwnProperty(e)}class Kd{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return i===(o?a?qm:Zd:a?qd:Gd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const c=me(t);if(!o){let f;if(c&&(f=Dm[n]))return f;if(n==="hasOwnProperty")return Bm}const u=Reflect.get(t,n,ut(t)?t:i);if((tn(n)?Wd.has(n):$m(n))||(o||at(t,"get",n),a))return u;if(ut(u)){const f=c&&rl(n)?u:u.value;return o&&Pe(f)?Pa(f):f}return Pe(u)?o?Pa(u):_s(u):u}}class Vd extends Kd{constructor(t=!1){super(!1,t)}set(t,n,i,o){let a=t[n];const c=me(t)&&rl(n);if(!this._isShallow){const m=kn(a);if(!Mt(i)&&!kn(i)&&(a=Ne(a),i=Ne(i)),!c&&ut(a)&&!ut(i))return m||(a.value=i),!0}const u=c?Number(n)<t.length:Oe(t,n),f=Reflect.set(t,n,i,ut(t)?t:o);return t===Ne(o)&&(u?Xt(i,a)&&fn(t,"set",n,i):fn(t,"add",n,i)),f}deleteProperty(t,n){const i=Oe(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&i&&fn(t,"delete",n,void 0),o}has(t,n){const i=Reflect.has(t,n);return(!tn(n)||!Wd.has(n))&&at(t,"has",n),i}ownKeys(t){return at(t,"iterate",me(t)?"length":Qn),Reflect.ownKeys(t)}}class Um extends Kd{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Fm=new Vd,zm=new Um,Hm=new Vd(!0);const Da=e=>e,ki=e=>Reflect.getPrototypeOf(e);function jm(e,t,n){return function(...i){const o=this.__v_raw,a=Ne(o),c=ys(a),u=e==="entries"||e===Symbol.iterator&&c,f=e==="keys"&&c,m=o[e](...i),p=n?Da:t?Ss:zt;return!t&&at(a,"iterate",f?Oa:Qn),Xe(Object.create(m),{next(){const{value:y,done:w}=m.next();return w?{value:y,done:w}:{value:u?[p(y[0]),p(y[1])]:p(y),done:w}}})}}function yi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Wm(e,t){const n={get(o){const a=this.__v_raw,c=Ne(a),u=Ne(o);e||(Xt(o,u)&&at(c,"get",o),at(c,"get",u));const{has:f}=ki(c),m=t?Da:e?Ss:zt;if(f.call(c,o))return m(a.get(o));if(f.call(c,u))return m(a.get(u));a!==c&&a.get(o)},get size(){const o=this.__v_raw;return!e&&at(Ne(o),"iterate",Qn),o.size},has(o){const a=this.__v_raw,c=Ne(a),u=Ne(o);return e||(Xt(o,u)&&at(c,"has",o),at(c,"has",u)),o===u?a.has(o):a.has(o)||a.has(u)},forEach(o,a){const c=this,u=c.__v_raw,f=Ne(u),m=t?Da:e?Ss:zt;return!e&&at(f,"iterate",Qn),u.forEach((p,y)=>o.call(a,m(p),m(y),c))}};return Xe(n,e?{add:yi("add"),set:yi("set"),delete:yi("delete"),clear:yi("clear")}:{add(o){const a=Ne(this),c=ki(a),u=Ne(o),f=!t&&!Mt(o)&&!kn(o)?u:o;return c.has.call(a,f)||Xt(o,f)&&c.has.call(a,o)||Xt(u,f)&&c.has.call(a,u)||(a.add(f),fn(a,"add",f,f)),this},set(o,a){!t&&!Mt(a)&&!kn(a)&&(a=Ne(a));const c=Ne(this),{has:u,get:f}=ki(c);let m=u.call(c,o);m||(o=Ne(o),m=u.call(c,o));const p=f.call(c,o);return c.set(o,a),m?Xt(a,p)&&fn(c,"set",o,a):fn(c,"add",o,a),this},delete(o){const a=Ne(this),{has:c,get:u}=ki(a);let f=c.call(a,o);f||(o=Ne(o),f=c.call(a,o)),u&&u.call(a,o);const m=a.delete(o);return f&&fn(a,"delete",o,void 0),m},clear(){const o=Ne(this),a=o.size!==0,c=o.clear();return a&&fn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=jm(o,e,t)}),n}function ul(e,t){const n=Wm(e,t);return(i,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?i:Reflect.get(Oe(n,o)&&o in i?n:i,o,a)}const Km={get:ul(!1,!1)},Vm={get:ul(!1,!0)},Gm={get:ul(!0,!1)};const Gd=new WeakMap,qd=new WeakMap,Zd=new WeakMap,qm=new WeakMap;function Zm(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qm(e){return e.__v_skip||!Object.isExtensible(e)?0:Zm(ym(e))}function _s(e){return kn(e)?e:dl(e,!1,Fm,Km,Gd)}function Ym(e){return dl(e,!1,Hm,Vm,qd)}function Pa(e){return dl(e,!0,zm,Gm,Zd)}function dl(e,t,n,i,o){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=Qm(e);if(a===0)return e;const c=o.get(e);if(c)return c;const u=new Proxy(e,a===2?i:n);return o.set(e,u),u}function Yn(e){return kn(e)?Yn(e.__v_raw):!!(e&&e.__v_isReactive)}function kn(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function fl(e){return e?!!e.__v_raw:!1}function Ne(e){const t=e&&e.__v_raw;return t?Ne(t):e}function Jm(e){return!Oe(e,"__v_skip")&&Object.isExtensible(e)&&Nd(e,"__v_skip",!0),e}const zt=e=>Pe(e)?_s(e):e,Ss=e=>Pe(e)?Pa(e):e;function ut(e){return e?e.__v_isRef===!0:!1}function We(e){return Qd(e,!1)}function Xm(e){return Qd(e,!0)}function Qd(e,t){return ut(e)?e:new eb(e,t)}class eb{constructor(t,n){this.dep=new cl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ne(t),this._value=n?t:zt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||Mt(t)||kn(t);t=i?t:Ne(t),Xt(t,n)&&(this._rawValue=t,this._value=i?t:zt(t),this.dep.trigger())}}function gu(e){e.dep&&e.dep.trigger()}function yr(e){return ut(e)?e.value:e}const tb={get:(e,t,n)=>t==="__v_raw"?e:yr(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const o=e[t];return ut(o)&&!ut(n)?(o.value=n,!0):Reflect.set(e,t,n,i)}};function Yd(e){return Yn(e)?e:new Proxy(e,tb)}class nb{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new cl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Tr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Fe!==this)return Bd(this,!0),!0}get value(){const t=this.dep.track();return zd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function sb(e,t,n=!1){let i,o;return Se(e)?i=e:(i=e.get,o=e.set),new nb(i,o,n)}const _i={},Bi=new WeakMap;let Vn;function rb(e,t=!1,n=Vn){if(n){let i=Bi.get(n);i||Bi.set(n,i=[]),i.push(e)}}function ib(e,t,n=Ue){const{immediate:i,deep:o,once:a,scheduler:c,augmentJob:u,call:f}=n,m=R=>o?R:Mt(R)||o===!1||o===0?gn(R,1):gn(R);let p,y,w,I,T=!1,P=!1;if(ut(e)?(y=()=>e.value,T=Mt(e)):Yn(e)?(y=()=>m(e),T=!0):me(e)?(P=!0,T=e.some(R=>Yn(R)||Mt(R)),y=()=>e.map(R=>{if(ut(R))return R.value;if(Yn(R))return m(R);if(Se(R))return f?f(R,2):R()})):Se(e)?t?y=f?()=>f(e,2):e:y=()=>{if(w){mn();try{w()}finally{bn()}}const R=Vn;Vn=p;try{return f?f(e,3,[I]):e(I)}finally{Vn=R}}:y=en,t&&o){const R=y,q=o===!0?1/0:o;y=()=>gn(R(),q)}const U=Rm(),N=()=>{p.stop(),U&&U.active&&sl(U.effects,p)};if(a&&t){const R=t;t=(...q)=>{R(...q),N()}}let B=P?new Array(e.length).fill(_i):_i;const l=R=>{if(!(!(p.flags&1)||!p.dirty&&!R))if(t){const q=p.run();if(o||T||(P?q.some((ee,re)=>Xt(ee,B[re])):Xt(q,B))){w&&w();const ee=Vn;Vn=p;try{const re=[q,B===_i?void 0:P&&B[0]===_i?[]:B,I];B=q,f?f(t,3,re):t(...re)}finally{Vn=ee}}}else p.run()};return u&&u(l),p=new Pd(y),p.scheduler=c?()=>c(l,!1):l,I=R=>rb(R,!1,p),w=p.onStop=()=>{const R=Bi.get(p);if(R){if(f)f(R,4);else for(const q of R)q();Bi.delete(p)}},t?i?l(!0):B=p.run():c?c(l.bind(null,!0),!0):p.run(),N.pause=p.pause.bind(p),N.resume=p.resume.bind(p),N.stop=N,N}function gn(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ut(e))gn(e.value,t,n);else if(me(e))for(let i=0;i<e.length;i++)gn(e[i],t,n);else if(Cs(e)||ys(e))e.forEach(i=>{gn(i,t,n)});else if(Rd(e)){for(const i in e)gn(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&gn(e[i],t,n)}return e}/**
10
+ * @vue/runtime-core v3.5.34
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function Dr(e,t,n,i){try{return i?e(...i):e()}catch(o){lo(o,t,n)}}function Ht(e,t,n,i){if(Se(e)){const o=Dr(e,t,n,i);return o&&Id(o)&&o.catch(a=>{lo(a,t,n)}),o}if(me(e)){const o=[];for(let a=0;a<e.length;a++)o.push(Ht(e[a],t,n,i));return o}}function lo(e,t,n,i=!0){const o=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:c}=t&&t.appContext.config||Ue;if(t){let u=t.parent;const f=t.proxy,m=`https://vuejs.org/error-reference/#runtime-${n}`;for(;u;){const p=u.ec;if(p){for(let y=0;y<p.length;y++)if(p[y](e,f,m)===!1)return}u=u.parent}if(a){mn(),Dr(a,null,10,[e,f,m]),bn();return}}ob(e,n,o,i,c)}function ob(e,t,n,i=!0,o=!1){if(o)throw e;console.error(e)}const bt=[];let Qt=-1;const vs=[];let Mn=null,ps=0;const Jd=Promise.resolve();let Ui=null;function pn(e){const t=Ui||Jd;return e?t.then(this?e.bind(this):e):t}function ab(e){let t=Qt+1,n=bt.length;for(;t<n;){const i=t+n>>>1,o=bt[i],a=Cr(o);a<e||a===e&&o.flags&2?t=i+1:n=i}return t}function gl(e){if(!(e.flags&1)){const t=Cr(e),n=bt[bt.length-1];!n||!(e.flags&2)&&t>=Cr(n)?bt.push(e):bt.splice(ab(t),0,e),e.flags|=1,Xd()}}function Xd(){Ui||(Ui=Jd.then(tf))}function lb(e){me(e)?vs.push(...e):Mn&&e.id===-1?Mn.splice(ps+1,0,e):e.flags&1||(vs.push(e),e.flags|=1),Xd()}function hu(e,t,n=Qt+1){for(;n<bt.length;n++){const i=bt[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;bt.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function ef(e){if(vs.length){const t=[...new Set(vs)].sort((n,i)=>Cr(n)-Cr(i));if(vs.length=0,Mn){Mn.push(...t);return}for(Mn=t,ps=0;ps<Mn.length;ps++){const n=Mn[ps];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Mn=null,ps=0}}const Cr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function tf(e){try{for(Qt=0;Qt<bt.length;Qt++){const t=bt[Qt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Dr(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Qt<bt.length;Qt++){const t=bt[Qt];t&&(t.flags&=-2)}Qt=-1,bt.length=0,ef(),Ui=null,(bt.length||vs.length)&&tf()}}let Et=null,nf=null;function Fi(e){const t=Et;return Et=e,nf=e&&e.type.__scopeId||null,t}function sf(e,t=Et,n){if(!t||e._n)return e;const i=(...o)=>{i._d&&Cu(-1);const a=Fi(t);let c;try{c=e(...o)}finally{Fi(a),i._d&&Cu(1)}return c};return i._n=!0,i._c=!0,i._d=!0,i}function Ct(e,t){if(Et===null)return e;const n=go(Et),i=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[a,c,u,f=Ue]=t[o];a&&(Se(a)&&(a={mounted:a,updated:a}),a.deep&&gn(c),i.push({dir:a,instance:n,value:c,oldValue:void 0,arg:u,modifiers:f}))}return e}function jn(e,t,n,i){const o=e.dirs,a=t&&t.dirs;for(let c=0;c<o.length;c++){const u=o[c];a&&(u.oldValue=a[c].value);let f=u.dir[i];f&&(mn(),Ht(f,n,8,[e.el,u,e,t]),bn())}}function cb(e,t){if(lt){let n=lt.provides;const i=lt.parent&&lt.parent.provides;i===n&&(n=lt.provides=Object.create(i)),n[e]=t}}function Ni(e,t,n=!1){const i=Lf();if(i||ws){let o=ws?ws._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Se(t)?t.call(i&&i.proxy):t}}const ub=Symbol.for("v-scx"),db=()=>Ni(ub);function ot(e,t,n){return rf(e,t,n)}function rf(e,t,n=Ue){const{immediate:i,deep:o,flush:a,once:c}=n,u=Xe({},n),f=t&&i||!t&&a!=="post";let m;if(Rr){if(a==="sync"){const I=db();m=I.__watcherHandles||(I.__watcherHandles=[])}else if(!f){const I=()=>{};return I.stop=en,I.resume=en,I.pause=en,I}}const p=lt;u.call=(I,T,P)=>Ht(I,p,T,P);let y=!1;a==="post"?u.scheduler=I=>{mt(I,p&&p.suspense)}:a!=="sync"&&(y=!0,u.scheduler=(I,T)=>{T?I():gl(I)}),u.augmentJob=I=>{t&&(I.flags|=4),y&&(I.flags|=2,p&&(I.id=p.uid,I.i=p))};const w=ib(e,t,u);return Rr&&(m?m.push(w):f&&w()),w}function fb(e,t,n){const i=this.proxy,o=Ke(e)?e.includes(".")?of(i,e):()=>i[e]:e.bind(i,i);let a;Se(t)?a=t:(a=t.handler,n=t);const c=Br(this),u=rf(o,a.bind(i),n);return c(),u}function of(e,t){const n=t.split(".");return()=>{let i=e;for(let o=0;o<n.length&&i;o++)i=i[n[o]];return i}}const Tn=new WeakMap,af=Symbol("_vte"),gb=e=>e.__isTeleport,Gn=e=>e&&(e.disabled||e.disabled===""),hb=e=>e&&(e.defer||e.defer===""),pu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,mu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,$a=(e,t)=>{const n=e&&e.to;return Ke(n)?t?t(n):null:n},pb={name:"Teleport",__isTeleport:!0,process(e,t,n,i,o,a,c,u,f,m){const{mc:p,pc:y,pbc:w,o:{insert:I,querySelector:T,createText:P,createComment:U,parentNode:N}}=m,B=Gn(t.props);let{dynamicChildren:l}=t;const R=(re,oe,ne)=>{re.shapeFlag&16&&p(re.children,oe,ne,o,a,c,u,f)},q=(re=t)=>{const oe=Gn(re.props),ne=re.target=$a(re.props,T),pe=Ba(ne,re,P,I);ne&&(c!=="svg"&&pu(ne)?c="svg":c!=="mathml"&&mu(ne)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(ne),oe||(R(re,ne,pe),ar(re,!1)))},ee=re=>{const oe=()=>{if(Tn.get(re)===oe){if(Tn.delete(re),Gn(re.props)){const ne=N(re.el)||n;R(re,ne,re.anchor),ar(re,!0)}q(re)}};Tn.set(re,oe),mt(oe,a)};if(e==null){const re=t.el=P(""),oe=t.anchor=P("");if(I(re,n,i),I(oe,n,i),hb(t.props)||a&&a.pendingBranch){ee(t);return}B&&(R(t,n,oe),ar(t,!0)),q()}else{t.el=e.el;const re=t.anchor=e.anchor,oe=Tn.get(e);if(oe){oe.flags|=8,Tn.delete(e),ee(t);return}t.targetStart=e.targetStart;const ne=t.target=e.target,pe=t.targetAnchor=e.targetAnchor,_e=Gn(e.props),te=_e?n:ne,we=_e?re:pe;if(c==="svg"||pu(ne)?c="svg":(c==="mathml"||mu(ne))&&(c="mathml"),l?(w(e.dynamicChildren,l,te,o,a,c,u),ml(e,t,!0)):f||y(e,t,te,we,o,a,c,u,!1),B)_e?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):vi(t,n,re,m,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Te=t.target=$a(t.props,T);Te&&vi(t,Te,null,m,0)}else _e&&vi(t,ne,pe,m,1);ar(t,B)}},remove(e,t,n,{um:i,o:{remove:o}},a){const{shapeFlag:c,children:u,anchor:f,targetStart:m,targetAnchor:p,target:y,props:w}=e;let I=a||!Gn(w);const T=Tn.get(e);if(T&&(T.flags|=8,Tn.delete(e),I=!1),y&&(o(m),o(p)),a&&o(f),c&16)for(let P=0;P<u.length;P++){const U=u[P];i(U,t,n,I,!!U.dynamicChildren)}},move:vi,hydrate:mb};function vi(e,t,n,{o:{insert:i},m:o},a=2){a===0&&i(e.targetAnchor,t,n);const{el:c,anchor:u,shapeFlag:f,children:m,props:p}=e,y=a===2;if(y&&i(c,t,n),!Tn.has(e)&&(!y||Gn(p))&&f&16)for(let w=0;w<m.length;w++)o(m[w],t,n,2);y&&i(u,t,n)}function mb(e,t,n,i,o,a,{o:{nextSibling:c,parentNode:u,querySelector:f,insert:m,createText:p}},y){function w(U,N){let B=N;for(;B;){if(B&&B.nodeType===8){if(B.data==="teleport start anchor")t.targetStart=B;else if(B.data==="teleport anchor"){t.targetAnchor=B,U._lpa=t.targetAnchor&&c(t.targetAnchor);break}}B=c(B)}}function I(U,N){N.anchor=y(c(U),N,u(U),n,i,o,a)}const T=t.target=$a(t.props,f),P=Gn(t.props);if(T){const U=T._lpa||T.firstChild;t.shapeFlag&16&&(P?(I(e,t),w(T,U),t.targetAnchor||Ba(T,t,p,m,u(e)===T?e:null)):(t.anchor=c(e),w(T,U),t.targetAnchor||Ba(T,t,p,m),y(U&&c(U),t,T,n,i,o,a))),ar(t,P)}else P&&t.shapeFlag&16&&(I(e,t),t.targetStart=e,t.targetAnchor=c(e));return t.anchor&&c(t.anchor)}const Kt=pb;function ar(e,t){const n=e.ctx;if(n&&n.ut){let i,o;for(t?(i=e.el,o=e.anchor):(i=e.targetStart,o=e.targetAnchor);i&&i!==o;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function Ba(e,t,n,i,o=null){const a=t.targetStart=n(""),c=t.targetAnchor=n("");return a[af]=c,e&&(i(a,e,o),i(c,e,o)),c}const An=Symbol("_leaveCb"),sr=Symbol("_enterCb");function bb(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Pr(()=>{e.isMounted=!0}),$r(()=>{e.isUnmounting=!0}),e}const It=[Function,Array],kb={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:It,onEnter:It,onAfterEnter:It,onEnterCancelled:It,onBeforeLeave:It,onLeave:It,onAfterLeave:It,onLeaveCancelled:It,onBeforeAppear:It,onAppear:It,onAfterAppear:It,onAppearCancelled:It};function yb(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function Ua(e,t,n,i,o){const{appear:a,mode:c,persisted:u=!1,onBeforeEnter:f,onEnter:m,onAfterEnter:p,onEnterCancelled:y,onBeforeLeave:w,onLeave:I,onAfterLeave:T,onLeaveCancelled:P,onBeforeAppear:U,onAppear:N,onAfterAppear:B,onAppearCancelled:l}=t,R=String(e.key),q=yb(n,e),ee=(ne,pe)=>{ne&&Ht(ne,i,9,pe)},re=(ne,pe)=>{const _e=pe[1];ee(ne,pe),me(ne)?ne.every(te=>te.length<=1)&&_e():ne.length<=1&&_e()},oe={mode:c,persisted:u,beforeEnter(ne){let pe=f;if(!n.isMounted)if(a)pe=U||f;else return;ne[An]&&ne[An](!0);const _e=q[R];_e&&ms(e,_e)&&_e.el[An]&&_e.el[An](),ee(pe,[ne])},enter(ne){if(q[R]===e)return;let pe=m,_e=p,te=y;if(!n.isMounted)if(a)pe=N||m,_e=B||p,te=l||y;else return;let we=!1;ne[sr]=He=>{we||(we=!0,He?ee(te,[ne]):ee(_e,[ne]),oe.delayedLeave&&oe.delayedLeave(),ne[sr]=void 0)};const Te=ne[sr].bind(null,!1);pe?re(pe,[ne,Te]):Te()},leave(ne,pe){const _e=String(e.key);if(ne[sr]&&ne[sr](!0),n.isUnmounting)return pe();ee(w,[ne]);let te=!1;ne[An]=Te=>{te||(te=!0,pe(),Te?ee(P,[ne]):ee(T,[ne]),ne[An]=void 0,q[_e]===e&&delete q[_e])};const we=ne[An].bind(null,!1);q[_e]=e,I?re(I,[ne,we]):we()},clone(ne){return Ua(ne,t,n,i)}};return oe}function Ir(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ir(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 lf(e,t=!1,n){let i=[],o=0;for(let a=0;a<e.length;a++){let c=e[a];const u=n==null?c.key:String(n)+String(c.key!=null?c.key:a);c.type===ue?(c.patchFlag&128&&o++,i=i.concat(lf(c.children,t,u))):(t||c.type!==yn)&&i.push(u!=null?Xn(c,{key:u}):c)}if(o>1)for(let a=0;a<i.length;a++)i[a].patchFlag=-2;return i}function cf(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function bu(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const zi=new WeakMap;function _r(e,t,n,i,o=!1){if(me(e)){e.forEach((P,U)=>_r(P,t&&(me(t)?t[U]:t),n,i,o));return}if(vr(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&_r(e,t,n,i.component.subTree);return}const a=i.shapeFlag&4?go(i.component):i.el,c=o?null:a,{i:u,r:f}=e,m=t&&t.r,p=u.refs===Ue?u.refs={}:u.refs,y=u.setupState,w=Ne(y),I=y===Ue?Cd:P=>bu(p,P)?!1:Oe(w,P),T=(P,U)=>!(U&&bu(p,U));if(m!=null&&m!==f){if(ku(t),Ke(m))p[m]=null,I(m)&&(y[m]=null);else if(ut(m)){const P=t;T(m,P.k)&&(m.value=null),P.k&&(p[P.k]=null)}}if(Se(f))Dr(f,u,12,[c,p]);else{const P=Ke(f),U=ut(f);if(P||U){const N=()=>{if(e.f){const B=P?I(f)?y[f]:p[f]:T()||!e.k?f.value:p[e.k];if(o)me(B)&&sl(B,a);else if(me(B))B.includes(a)||B.push(a);else if(P)p[f]=[a],I(f)&&(y[f]=p[f]);else{const l=[a];T(f,e.k)&&(f.value=l),e.k&&(p[e.k]=l)}}else P?(p[f]=c,I(f)&&(y[f]=c)):U&&(T(f,e.k)&&(f.value=c),e.k&&(p[e.k]=c))};if(c){const B=()=>{N(),zi.delete(e)};B.id=-1,zi.set(e,B),mt(B,n)}else ku(e),N()}}}function ku(e){const t=zi.get(e);t&&(t.flags|=8,zi.delete(e))}oo().requestIdleCallback;oo().cancelIdleCallback;const vr=e=>!!e.type.__asyncLoader,uf=e=>e.type.__isKeepAlive;function _b(e,t){df(e,"a",t)}function vb(e,t){df(e,"da",t)}function df(e,t,n=lt){const i=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(co(t,i,n),n){let o=n.parent;for(;o&&o.parent;)uf(o.parent.vnode)&&wb(i,t,n,o),o=o.parent}}function wb(e,t,n,i){const o=co(t,e,i,!0);gf(()=>{sl(i[t],o)},n)}function co(e,t,n=lt,i=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...c)=>{mn();const u=Br(n),f=Ht(t,n,e,c);return u(),bn(),f});return i?o.unshift(a):o.push(a),a}}const _n=e=>(t,n=lt)=>{(!Rr||e==="sp")&&co(e,(...i)=>t(...i),n)},xb=_n("bm"),Pr=_n("m"),Sb=_n("bu"),ff=_n("u"),$r=_n("bum"),gf=_n("um"),Eb=_n("sp"),Tb=_n("rtg"),Ab=_n("rtc");function Cb(e,t=lt){co("ec",e,t)}const Ib="components";function Mb(e,t){return Nb(Ib,e,!0,t)||e}const Rb=Symbol.for("v-ndc");function Nb(e,t,n=!0,i=!1){const o=Et||lt;if(o){const a=o.type;{const u=mk(a,!1);if(u&&(u===t||u===yt(t)||u===ro(yt(t))))return a}const c=yu(o[e]||a[e],t)||yu(o.appContext[e],t);return!c&&i?a:c}}function yu(e,t){return e&&(e[t]||e[yt(t)]||e[ro(yt(t))])}function Ae(e,t,n,i){let o;const a=n,c=me(e);if(c||Ke(e)){const u=c&&Yn(e);let f=!1,m=!1;u&&(f=!Mt(e),m=kn(e),e=ao(e)),o=new Array(e.length);for(let p=0,y=e.length;p<y;p++)o[p]=t(f?m?Ss(zt(e[p])):zt(e[p]):e[p],p,void 0,a)}else if(typeof e=="number"){o=new Array(e);for(let u=0;u<e;u++)o[u]=t(u+1,u,void 0,a)}else if(Pe(e))if(e[Symbol.iterator])o=Array.from(e,(u,f)=>t(u,f,void 0,a));else{const u=Object.keys(e);o=new Array(u.length);for(let f=0,m=u.length;f<m;f++){const p=u[f];o[f]=t(e[p],p,f,a)}}else o=[];return o}const Fa=e=>e?Of(e)?go(e):Fa(e.parent):null,wr=Xe(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=>Fa(e.parent),$root:e=>Fa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pf(e),$forceUpdate:e=>e.f||(e.f=()=>{gl(e.update)}),$nextTick:e=>e.n||(e.n=pn.bind(e.proxy)),$watch:e=>fb.bind(e)}),ha=(e,t)=>e!==Ue&&!e.__isScriptSetup&&Oe(e,t),Lb={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:o,props:a,accessCache:c,type:u,appContext:f}=e;if(t[0]!=="$"){const w=c[t];if(w!==void 0)switch(w){case 1:return i[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(ha(i,t))return c[t]=1,i[t];if(o!==Ue&&Oe(o,t))return c[t]=2,o[t];if(Oe(a,t))return c[t]=3,a[t];if(n!==Ue&&Oe(n,t))return c[t]=4,n[t];za&&(c[t]=0)}}const m=wr[t];let p,y;if(m)return t==="$attrs"&&at(e.attrs,"get",""),m(e);if((p=u.__cssModules)&&(p=p[t]))return p;if(n!==Ue&&Oe(n,t))return c[t]=4,n[t];if(y=f.config.globalProperties,Oe(y,t))return y[t]},set({_:e},t,n){const{data:i,setupState:o,ctx:a}=e;return ha(o,t)?(o[t]=n,!0):i!==Ue&&Oe(i,t)?(i[t]=n,!0):Oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:o,props:a,type:c}},u){let f;return!!(n[u]||e!==Ue&&u[0]!=="$"&&Oe(e,u)||ha(t,u)||Oe(a,u)||Oe(i,u)||Oe(wr,u)||Oe(o.config.globalProperties,u)||(f=c.__cssModules)&&f[u])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function _u(e){return me(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let za=!0;function Ob(e){const t=pf(e),n=e.proxy,i=e.ctx;za=!1,t.beforeCreate&&vu(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:c,watch:u,provide:f,inject:m,created:p,beforeMount:y,mounted:w,beforeUpdate:I,updated:T,activated:P,deactivated:U,beforeDestroy:N,beforeUnmount:B,destroyed:l,unmounted:R,render:q,renderTracked:ee,renderTriggered:re,errorCaptured:oe,serverPrefetch:ne,expose:pe,inheritAttrs:_e,components:te,directives:we,filters:Te}=t;if(m&&Db(m,i,null),c)for(const Q in c){const Z=c[Q];Se(Z)&&(i[Q]=Z.bind(n))}if(o){const Q=o.call(n,n);Pe(Q)&&(e.data=_s(Q))}if(za=!0,a)for(const Q in a){const Z=a[Q],fe=Se(Z)?Z.bind(n,n):Se(Z.get)?Z.get.bind(n,n):en,xe=!Se(Z)&&Se(Z.set)?Z.set.bind(n):en,Ie=ye({get:fe,set:xe});Object.defineProperty(i,Q,{enumerable:!0,configurable:!0,get:()=>Ie.value,set:ve=>Ie.value=ve})}if(u)for(const Q in u)hf(u[Q],i,n,Q);if(f){const Q=Se(f)?f.call(n):f;Reflect.ownKeys(Q).forEach(Z=>{cb(Z,Q[Z])})}p&&vu(p,e,"c");function O(Q,Z){me(Z)?Z.forEach(fe=>Q(fe.bind(n))):Z&&Q(Z.bind(n))}if(O(xb,y),O(Pr,w),O(Sb,I),O(ff,T),O(_b,P),O(vb,U),O(Cb,oe),O(Ab,ee),O(Tb,re),O($r,B),O(gf,R),O(Eb,ne),me(pe))if(pe.length){const Q=e.exposed||(e.exposed={});pe.forEach(Z=>{Object.defineProperty(Q,Z,{get:()=>n[Z],set:fe=>n[Z]=fe,enumerable:!0})})}else e.exposed||(e.exposed={});q&&e.render===en&&(e.render=q),_e!=null&&(e.inheritAttrs=_e),te&&(e.components=te),we&&(e.directives=we),ne&&cf(e)}function Db(e,t,n=en){me(e)&&(e=Ha(e));for(const i in e){const o=e[i];let a;Pe(o)?"default"in o?a=Ni(o.from||i,o.default,!0):a=Ni(o.from||i):a=Ni(o),ut(a)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>a.value,set:c=>a.value=c}):t[i]=a}}function vu(e,t,n){Ht(me(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function hf(e,t,n,i){let o=i.includes(".")?of(n,i):()=>n[i];if(Ke(e)){const a=t[e];Se(a)&&ot(o,a)}else if(Se(e))ot(o,e.bind(n));else if(Pe(e))if(me(e))e.forEach(a=>hf(a,t,n,i));else{const a=Se(e.handler)?e.handler.bind(n):t[e.handler];Se(a)&&ot(o,a,e)}}function pf(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:c}}=e.appContext,u=a.get(t);let f;return u?f=u:!o.length&&!n&&!i?f=t:(f={},o.length&&o.forEach(m=>Hi(f,m,c,!0)),Hi(f,t,c)),Pe(t)&&a.set(t,f),f}function Hi(e,t,n,i=!1){const{mixins:o,extends:a}=t;a&&Hi(e,a,n,!0),o&&o.forEach(c=>Hi(e,c,n,!0));for(const c in t)if(!(i&&c==="expose")){const u=Pb[c]||n&&n[c];e[c]=u?u(e[c],t[c]):t[c]}return e}const Pb={data:wu,props:xu,emits:xu,methods:lr,computed:lr,beforeCreate:ht,created:ht,beforeMount:ht,mounted:ht,beforeUpdate:ht,updated:ht,beforeDestroy:ht,beforeUnmount:ht,destroyed:ht,unmounted:ht,activated:ht,deactivated:ht,errorCaptured:ht,serverPrefetch:ht,components:lr,directives:lr,watch:Bb,provide:wu,inject:$b};function wu(e,t){return t?e?function(){return Xe(Se(e)?e.call(this,this):e,Se(t)?t.call(this,this):t)}:t:e}function $b(e,t){return lr(Ha(e),Ha(t))}function Ha(e){if(me(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ht(e,t){return e?[...new Set([].concat(e,t))]:t}function lr(e,t){return e?Xe(Object.create(null),e,t):t}function xu(e,t){return e?me(e)&&me(t)?[...new Set([...e,...t])]:Xe(Object.create(null),_u(e),_u(t??{})):t}function Bb(e,t){if(!e)return t;if(!t)return e;const n=Xe(Object.create(null),e);for(const i in t)n[i]=ht(e[i],t[i]);return n}function mf(){return{app:null,config:{isNativeTag:Cd,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 Ub=0;function Fb(e,t){return function(i,o=null){Se(i)||(i=Xe({},i)),o!=null&&!Pe(o)&&(o=null);const a=mf(),c=new WeakSet,u=[];let f=!1;const m=a.app={_uid:Ub++,_component:i,_props:o,_container:null,_context:a,_instance:null,version:kk,get config(){return a.config},set config(p){},use(p,...y){return c.has(p)||(p&&Se(p.install)?(c.add(p),p.install(m,...y)):Se(p)&&(c.add(p),p(m,...y))),m},mixin(p){return a.mixins.includes(p)||a.mixins.push(p),m},component(p,y){return y?(a.components[p]=y,m):a.components[p]},directive(p,y){return y?(a.directives[p]=y,m):a.directives[p]},mount(p,y,w){if(!f){const I=m._ceVNode||kt(i,o);return I.appContext=a,w===!0?w="svg":w===!1&&(w=void 0),e(I,p,w),f=!0,m._container=p,p.__vue_app__=m,go(I.component)}},onUnmount(p){u.push(p)},unmount(){f&&(Ht(u,m._instance,16),e(null,m._container),delete m._container.__vue_app__)},provide(p,y){return a.provides[p]=y,m},runWithContext(p){const y=ws;ws=m;try{return p()}finally{ws=y}}};return m}}let ws=null;const zb=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yt(t)}Modifiers`]||e[`${On(t)}Modifiers`];function Hb(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||Ue;let o=n;const a=t.startsWith("update:"),c=a&&zb(i,t.slice(7));c&&(c.trim&&(o=n.map(p=>Ke(p)?p.trim():p)),c.number&&(o=n.map(io)));let u,f=i[u=ca(t)]||i[u=ca(yt(t))];!f&&a&&(f=i[u=ca(On(t))]),f&&Ht(f,e,6,o);const m=i[u+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Ht(m,e,6,o)}}const jb=new WeakMap;function bf(e,t,n=!1){const i=n?jb:t.emitsCache,o=i.get(e);if(o!==void 0)return o;const a=e.emits;let c={},u=!1;if(!Se(e)){const f=m=>{const p=bf(m,t,!0);p&&(u=!0,Xe(c,p))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!a&&!u?(Pe(e)&&i.set(e,null),null):(me(a)?a.forEach(f=>c[f]=null):Xe(c,a),Pe(e)&&i.set(e,c),c)}function uo(e,t){return!e||!to(t)?!1:(t=t.slice(2).replace(/Once$/,""),Oe(e,t[0].toLowerCase()+t.slice(1))||Oe(e,On(t))||Oe(e,t))}function Su(e){const{type:t,vnode:n,proxy:i,withProxy:o,propsOptions:[a],slots:c,attrs:u,emit:f,render:m,renderCache:p,props:y,data:w,setupState:I,ctx:T,inheritAttrs:P}=e,U=Fi(e);let N,B;try{if(n.shapeFlag&4){const R=o||i,q=R;N=Jt(m.call(q,R,p,y,I,w,T)),B=u}else{const R=t;N=Jt(R.length>1?R(y,{attrs:u,slots:c,emit:f}):R(y,null)),B=t.props?u:Wb(u)}}catch(R){xr.length=0,lo(R,e,1),N=kt(yn)}let l=N;if(B&&P!==!1){const R=Object.keys(B),{shapeFlag:q}=l;R.length&&q&7&&(a&&R.some(no)&&(B=Kb(B,a)),l=Xn(l,B,!1,!0))}return n.dirs&&(l=Xn(l,null,!1,!0),l.dirs=l.dirs?l.dirs.concat(n.dirs):n.dirs),n.transition&&Ir(l,n.transition),N=l,Fi(U),N}const Wb=e=>{let t;for(const n in e)(n==="class"||n==="style"||to(n))&&((t||(t={}))[n]=e[n]);return t},Kb=(e,t)=>{const n={};for(const i in e)(!no(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function Vb(e,t,n){const{props:i,children:o,component:a}=e,{props:c,children:u,patchFlag:f}=t,m=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return i?Eu(i,c,m):!!c;if(f&8){const p=t.dynamicProps;for(let y=0;y<p.length;y++){const w=p[y];if(kf(c,i,w)&&!uo(m,w))return!0}}}else return(o||u)&&(!u||!u.$stable)?!0:i===c?!1:i?c?Eu(i,c,m):!0:!!c;return!1}function Eu(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let o=0;o<i.length;o++){const a=i[o];if(kf(t,e,a)&&!uo(n,a))return!0}return!1}function kf(e,t,n){const i=e[n],o=t[n];return n==="style"&&Pe(i)&&Pe(o)?!Nn(i,o):i!==o}function Gb({vnode:e,parent:t,suspense:n},i){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=i,e=o),o===e)(e=t.vnode).el=i,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=i)}const yf={},_f=()=>Object.create(yf),vf=e=>Object.getPrototypeOf(e)===yf;function qb(e,t,n,i=!1){const o={},a=_f();e.propsDefaults=Object.create(null),wf(e,t,o,a);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=i?o:Ym(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function Zb(e,t,n,i){const{props:o,attrs:a,vnode:{patchFlag:c}}=e,u=Ne(o),[f]=e.propsOptions;let m=!1;if((i||c>0)&&!(c&16)){if(c&8){const p=e.vnode.dynamicProps;for(let y=0;y<p.length;y++){let w=p[y];if(uo(e.emitsOptions,w))continue;const I=t[w];if(f)if(Oe(a,w))I!==a[w]&&(a[w]=I,m=!0);else{const T=yt(w);o[T]=ja(f,u,T,I,e,!1)}else I!==a[w]&&(a[w]=I,m=!0)}}}else{wf(e,t,o,a)&&(m=!0);let p;for(const y in u)(!t||!Oe(t,y)&&((p=On(y))===y||!Oe(t,p)))&&(f?n&&(n[y]!==void 0||n[p]!==void 0)&&(o[y]=ja(f,u,y,void 0,e,!0)):delete o[y]);if(a!==u)for(const y in a)(!t||!Oe(t,y))&&(delete a[y],m=!0)}m&&fn(e.attrs,"set","")}function wf(e,t,n,i){const[o,a]=e.propsOptions;let c=!1,u;if(t)for(let f in t){if(mr(f))continue;const m=t[f];let p;o&&Oe(o,p=yt(f))?!a||!a.includes(p)?n[p]=m:(u||(u={}))[p]=m:uo(e.emitsOptions,f)||(!(f in i)||m!==i[f])&&(i[f]=m,c=!0)}if(a){const f=Ne(n),m=u||Ue;for(let p=0;p<a.length;p++){const y=a[p];n[y]=ja(o,f,y,m[y],e,!Oe(m,y))}}return c}function ja(e,t,n,i,o,a){const c=e[n];if(c!=null){const u=Oe(c,"default");if(u&&i===void 0){const f=c.default;if(c.type!==Function&&!c.skipFactory&&Se(f)){const{propsDefaults:m}=o;if(n in m)i=m[n];else{const p=Br(o);i=m[n]=f.call(null,t),p()}}else i=f;o.ce&&o.ce._setProp(n,i)}c[0]&&(a&&!u?i=!1:c[1]&&(i===""||i===On(n))&&(i=!0))}return i}const Qb=new WeakMap;function xf(e,t,n=!1){const i=n?Qb:t.propsCache,o=i.get(e);if(o)return o;const a=e.props,c={},u=[];let f=!1;if(!Se(e)){const p=y=>{f=!0;const[w,I]=xf(y,t,!0);Xe(c,w),I&&u.push(...I)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!a&&!f)return Pe(e)&&i.set(e,ks),ks;if(me(a))for(let p=0;p<a.length;p++){const y=yt(a[p]);Tu(y)&&(c[y]=Ue)}else if(a)for(const p in a){const y=yt(p);if(Tu(y)){const w=a[p],I=c[y]=me(w)||Se(w)?{type:w}:Xe({},w),T=I.type;let P=!1,U=!0;if(me(T))for(let N=0;N<T.length;++N){const B=T[N],l=Se(B)&&B.name;if(l==="Boolean"){P=!0;break}else l==="String"&&(U=!1)}else P=Se(T)&&T.name==="Boolean";I[0]=P,I[1]=U,(P||Oe(I,"default"))&&u.push(y)}}const m=[c,u];return Pe(e)&&i.set(e,m),m}function Tu(e){return e[0]!=="$"&&!mr(e)}const hl=e=>e==="_"||e==="_ctx"||e==="$stable",pl=e=>me(e)?e.map(Jt):[Jt(e)],Yb=(e,t,n)=>{if(t._n)return t;const i=sf((...o)=>pl(t(...o)),n);return i._c=!1,i},Sf=(e,t,n)=>{const i=e._ctx;for(const o in e){if(hl(o))continue;const a=e[o];if(Se(a))t[o]=Yb(o,a,i);else if(a!=null){const c=pl(a);t[o]=()=>c}}},Ef=(e,t)=>{const n=pl(t);e.slots.default=()=>n},Tf=(e,t,n)=>{for(const i in t)(n||!hl(i))&&(e[i]=t[i])},Jb=(e,t,n)=>{const i=e.slots=_f();if(e.vnode.shapeFlag&32){const o=t._;o?(Tf(i,t,n),n&&Nd(i,"_",o,!0)):Sf(t,i)}else t&&Ef(e,t)},Xb=(e,t,n)=>{const{vnode:i,slots:o}=e;let a=!0,c=Ue;if(i.shapeFlag&32){const u=t._;u?n&&u===1?a=!1:Tf(o,t,n):(a=!t.$stable,Sf(t,o)),c=t}else t&&(Ef(e,t),c={default:1});if(a)for(const u in o)!hl(u)&&c[u]==null&&delete o[u]},mt=rk;function ek(e){return tk(e)}function tk(e,t){const n=oo();n.__VUE__=!0;const{insert:i,remove:o,patchProp:a,createElement:c,createText:u,createComment:f,setText:m,setElementText:p,parentNode:y,nextSibling:w,setScopeId:I=en,insertStaticContent:T}=e,P=(v,E,L,F=null,W=null,z=null,$=void 0,Y=null,H=!!E.dynamicChildren)=>{if(v===E)return;v&&!ms(v,E)&&(F=_t(v),ve(v,W,z,!0),v=null),E.patchFlag===-2&&(H=!1,E.dynamicChildren=null);const{type:D,ref:ae,shapeFlag:X}=E;switch(D){case fo:U(v,E,L,F);break;case yn:N(v,E,L,F);break;case Li:v==null&&B(E,L,F,$);break;case ue:te(v,E,L,F,W,z,$,Y,H);break;default:X&1?q(v,E,L,F,W,z,$,Y,H):X&6?we(v,E,L,F,W,z,$,Y,H):(X&64||X&128)&&D.process(v,E,L,F,W,z,$,Y,H,Nt)}ae!=null&&W?_r(ae,v&&v.ref,z,E||v,!E):ae==null&&v&&v.ref!=null&&_r(v.ref,null,z,v,!0)},U=(v,E,L,F)=>{if(v==null)i(E.el=u(E.children),L,F);else{const W=E.el=v.el;E.children!==v.children&&m(W,E.children)}},N=(v,E,L,F)=>{v==null?i(E.el=f(E.children||""),L,F):E.el=v.el},B=(v,E,L,F)=>{[v.el,v.anchor]=T(v.children,E,L,F,v.el,v.anchor)},l=({el:v,anchor:E},L,F)=>{let W;for(;v&&v!==E;)W=w(v),i(v,L,F),v=W;i(E,L,F)},R=({el:v,anchor:E})=>{let L;for(;v&&v!==E;)L=w(v),o(v),v=L;o(E)},q=(v,E,L,F,W,z,$,Y,H)=>{if(E.type==="svg"?$="svg":E.type==="math"&&($="mathml"),v==null)ee(E,L,F,W,z,$,Y,H);else{const D=v.el&&v.el._isVueCE?v.el:null;try{D&&D._beginPatch(),ne(v,E,W,z,$,Y,H)}finally{D&&D._endPatch()}}},ee=(v,E,L,F,W,z,$,Y)=>{let H,D;const{props:ae,shapeFlag:X,transition:ce,dirs:ge}=v;if(H=v.el=c(v.type,z,ae&&ae.is,ae),X&8?p(H,v.children):X&16&&oe(v.children,H,null,F,W,pa(v,z),$,Y),ge&&jn(v,null,F,"created"),re(H,v,v.scopeId,$,F),ae){for(const J in ae)J!=="value"&&!mr(J)&&a(H,J,null,ae[J],z,F);"value"in ae&&a(H,"value",null,ae.value,z),(D=ae.onVnodeBeforeMount)&&Vt(D,F,v)}ge&&jn(v,null,F,"beforeMount");const j=nk(W,ce);j&&ce.beforeEnter(H),i(H,E,L),((D=ae&&ae.onVnodeMounted)||j||ge)&&mt(()=>{try{D&&Vt(D,F,v),j&&ce.enter(H),ge&&jn(v,null,F,"mounted")}finally{}},W)},re=(v,E,L,F,W)=>{if(L&&I(v,L),F)for(let z=0;z<F.length;z++)I(v,F[z]);if(W){let z=W.subTree;if(E===z||If(z.type)&&(z.ssContent===E||z.ssFallback===E)){const $=W.vnode;re(v,$,$.scopeId,$.slotScopeIds,W.parent)}}},oe=(v,E,L,F,W,z,$,Y,H=0)=>{for(let D=H;D<v.length;D++){const ae=v[D]=Y?dn(v[D]):Jt(v[D]);P(null,ae,E,L,F,W,z,$,Y)}},ne=(v,E,L,F,W,z,$)=>{const Y=E.el=v.el;let{patchFlag:H,dynamicChildren:D,dirs:ae}=E;H|=v.patchFlag&16;const X=v.props||Ue,ce=E.props||Ue;let ge;if(L&&Wn(L,!1),(ge=ce.onVnodeBeforeUpdate)&&Vt(ge,L,E,v),ae&&jn(E,v,L,"beforeUpdate"),L&&Wn(L,!0),(X.innerHTML&&ce.innerHTML==null||X.textContent&&ce.textContent==null)&&p(Y,""),D?pe(v.dynamicChildren,D,Y,L,F,pa(E,W),z):$||Z(v,E,Y,null,L,F,pa(E,W),z,!1),H>0){if(H&16)_e(Y,X,ce,L,W);else if(H&2&&X.class!==ce.class&&a(Y,"class",null,ce.class,W),H&4&&a(Y,"style",X.style,ce.style,W),H&8){const j=E.dynamicProps;for(let J=0;J<j.length;J++){const se=j[J],he=X[se],Ce=ce[se];(Ce!==he||se==="value")&&a(Y,se,he,Ce,W,L)}}H&1&&v.children!==E.children&&p(Y,E.children)}else!$&&D==null&&_e(Y,X,ce,L,W);((ge=ce.onVnodeUpdated)||ae)&&mt(()=>{ge&&Vt(ge,L,E,v),ae&&jn(E,v,L,"updated")},F)},pe=(v,E,L,F,W,z,$)=>{for(let Y=0;Y<E.length;Y++){const H=v[Y],D=E[Y],ae=H.el&&(H.type===ue||!ms(H,D)||H.shapeFlag&198)?y(H.el):L;P(H,D,ae,null,F,W,z,$,!0)}},_e=(v,E,L,F,W)=>{if(E!==L){if(E!==Ue)for(const z in E)!mr(z)&&!(z in L)&&a(v,z,E[z],null,W,F);for(const z in L){if(mr(z))continue;const $=L[z],Y=E[z];$!==Y&&z!=="value"&&a(v,z,Y,$,W,F)}"value"in L&&a(v,"value",E.value,L.value,W)}},te=(v,E,L,F,W,z,$,Y,H)=>{const D=E.el=v?v.el:u(""),ae=E.anchor=v?v.anchor:u("");let{patchFlag:X,dynamicChildren:ce,slotScopeIds:ge}=E;ge&&(Y=Y?Y.concat(ge):ge),v==null?(i(D,L,F),i(ae,L,F),oe(E.children||[],L,ae,W,z,$,Y,H)):X>0&&X&64&&ce&&v.dynamicChildren&&v.dynamicChildren.length===ce.length?(pe(v.dynamicChildren,ce,L,W,z,$,Y),(E.key!=null||W&&E===W.subTree)&&ml(v,E,!0)):Z(v,E,L,ae,W,z,$,Y,H)},we=(v,E,L,F,W,z,$,Y,H)=>{E.slotScopeIds=Y,v==null?E.shapeFlag&512?W.ctx.activate(E,L,F,$,H):Te(E,L,F,W,z,$,H):He(v,E,H)},Te=(v,E,L,F,W,z,$)=>{const Y=v.component=dk(v,F,W);if(uf(v)&&(Y.ctx.renderer=Nt),fk(Y,!1,$),Y.asyncDep){if(W&&W.registerDep(Y,O,$),!v.el){const H=Y.subTree=kt(yn);N(null,H,E,L),v.placeholder=H.el}}else O(Y,v,E,L,W,z,$)},He=(v,E,L)=>{const F=E.component=v.component;if(Vb(v,E,L))if(F.asyncDep&&!F.asyncResolved){Q(F,E,L);return}else F.next=E,F.update();else E.el=v.el,F.vnode=E},O=(v,E,L,F,W,z,$)=>{const Y=()=>{if(v.isMounted){let{next:X,bu:ce,u:ge,parent:j,vnode:J}=v;{const st=Af(v);if(st){X&&(X.el=J.el,Q(v,X,$)),st.asyncDep.then(()=>{mt(()=>{v.isUnmounted||D()},W)});return}}let se=X,he;Wn(v,!1),X?(X.el=J.el,Q(v,X,$)):X=J,ce&&Ri(ce),(he=X.props&&X.props.onVnodeBeforeUpdate)&&Vt(he,j,X,J),Wn(v,!0);const Ce=Su(v),ze=v.subTree;v.subTree=Ce,P(ze,Ce,y(ze.el),_t(ze),v,W,z),X.el=Ce.el,se===null&&Gb(v,Ce.el),ge&&mt(ge,W),(he=X.props&&X.props.onVnodeUpdated)&&mt(()=>Vt(he,j,X,J),W)}else{let X;const{el:ce,props:ge}=E,{bm:j,m:J,parent:se,root:he,type:Ce}=v,ze=vr(E);Wn(v,!1),j&&Ri(j),!ze&&(X=ge&&ge.onVnodeBeforeMount)&&Vt(X,se,E),Wn(v,!0);{he.ce&&he.ce._hasShadowRoot()&&he.ce._injectChildStyle(Ce,v.parent?v.parent.type:void 0);const st=v.subTree=Su(v);P(null,st,L,F,v,W,z),E.el=st.el}if(J&&mt(J,W),!ze&&(X=ge&&ge.onVnodeMounted)){const st=E;mt(()=>Vt(X,se,st),W)}(E.shapeFlag&256||se&&vr(se.vnode)&&se.vnode.shapeFlag&256)&&v.a&&mt(v.a,W),v.isMounted=!0,E=L=F=null}};v.scope.on();const H=v.effect=new Pd(Y);v.scope.off();const D=v.update=H.run.bind(H),ae=v.job=H.runIfDirty.bind(H);ae.i=v,ae.id=v.uid,H.scheduler=()=>gl(ae),Wn(v,!0),D()},Q=(v,E,L)=>{E.component=v;const F=v.vnode.props;v.vnode=E,v.next=null,Zb(v,E.props,F,L),Xb(v,E.children,L),mn(),hu(v),bn()},Z=(v,E,L,F,W,z,$,Y,H=!1)=>{const D=v&&v.children,ae=v?v.shapeFlag:0,X=E.children,{patchFlag:ce,shapeFlag:ge}=E;if(ce>0){if(ce&128){xe(D,X,L,F,W,z,$,Y,H);return}else if(ce&256){fe(D,X,L,F,W,z,$,Y,H);return}}ge&8?(ae&16&&dt(D,W,z),X!==D&&p(L,X)):ae&16?ge&16?xe(D,X,L,F,W,z,$,Y,H):dt(D,W,z,!0):(ae&8&&p(L,""),ge&16&&oe(X,L,F,W,z,$,Y,H))},fe=(v,E,L,F,W,z,$,Y,H)=>{v=v||ks,E=E||ks;const D=v.length,ae=E.length,X=Math.min(D,ae);let ce;for(ce=0;ce<X;ce++){const ge=E[ce]=H?dn(E[ce]):Jt(E[ce]);P(v[ce],ge,L,null,W,z,$,Y,H)}D>ae?dt(v,W,z,!0,!1,X):oe(E,L,F,W,z,$,Y,H,X)},xe=(v,E,L,F,W,z,$,Y,H)=>{let D=0;const ae=E.length;let X=v.length-1,ce=ae-1;for(;D<=X&&D<=ce;){const ge=v[D],j=E[D]=H?dn(E[D]):Jt(E[D]);if(ms(ge,j))P(ge,j,L,null,W,z,$,Y,H);else break;D++}for(;D<=X&&D<=ce;){const ge=v[X],j=E[ce]=H?dn(E[ce]):Jt(E[ce]);if(ms(ge,j))P(ge,j,L,null,W,z,$,Y,H);else break;X--,ce--}if(D>X){if(D<=ce){const ge=ce+1,j=ge<ae?E[ge].el:F;for(;D<=ce;)P(null,E[D]=H?dn(E[D]):Jt(E[D]),L,j,W,z,$,Y,H),D++}}else if(D>ce)for(;D<=X;)ve(v[D],W,z,!0),D++;else{const ge=D,j=D,J=new Map;for(D=j;D<=ce;D++){const et=E[D]=H?dn(E[D]):Jt(E[D]);et.key!=null&&J.set(et.key,D)}let se,he=0;const Ce=ce-j+1;let ze=!1,st=0;const jt=new Array(Ce);for(D=0;D<Ce;D++)jt[D]=0;for(D=ge;D<=X;D++){const et=v[D];if(he>=Ce){ve(et,W,z,!0);continue}let vt;if(et.key!=null)vt=J.get(et.key);else for(se=j;se<=ce;se++)if(jt[se-j]===0&&ms(et,E[se])){vt=se;break}vt===void 0?ve(et,W,z,!0):(jt[vt-j]=D+1,vt>=st?st=vt:ze=!0,P(et,E[vt],L,null,W,z,$,Y,H),he++)}const rs=ze?sk(jt):ks;for(se=rs.length-1,D=Ce-1;D>=0;D--){const et=j+D,vt=E[et],Rs=E[et+1],Ns=et+1<ae?Rs.el||Cf(Rs):F;jt[D]===0?P(null,vt,L,Ns,W,z,$,Y,H):ze&&(se<0||D!==rs[se]?Ie(vt,L,Ns,2):se--)}}},Ie=(v,E,L,F,W=null)=>{const{el:z,type:$,transition:Y,children:H,shapeFlag:D}=v;if(D&6){Ie(v.component.subTree,E,L,F);return}if(D&128){v.suspense.move(E,L,F);return}if(D&64){$.move(v,E,L,Nt);return}if($===ue){i(z,E,L);for(let X=0;X<H.length;X++)Ie(H[X],E,L,F);i(v.anchor,E,L);return}if($===Li){l(v,E,L);return}if(F!==2&&D&1&&Y)if(F===0)Y.beforeEnter(z),i(z,E,L),mt(()=>Y.enter(z),W);else{const{leave:X,delayLeave:ce,afterLeave:ge}=Y,j=()=>{v.ctx.isUnmounted?o(z):i(z,E,L)},J=()=>{z._isLeaving&&z[An](!0),X(z,()=>{j(),ge&&ge()})};ce?ce(z,j,J):J()}else i(z,E,L)},ve=(v,E,L,F=!1,W=!1)=>{const{type:z,props:$,ref:Y,children:H,dynamicChildren:D,shapeFlag:ae,patchFlag:X,dirs:ce,cacheIndex:ge,memo:j}=v;if(X===-2&&(W=!1),Y!=null&&(mn(),_r(Y,null,L,v,!0),bn()),ge!=null&&(E.renderCache[ge]=void 0),ae&256){E.ctx.deactivate(v);return}const J=ae&1&&ce,se=!vr(v);let he;if(se&&(he=$&&$.onVnodeBeforeUnmount)&&Vt(he,E,v),ae&6)Be(v.component,L,F);else{if(ae&128){v.suspense.unmount(L,F);return}J&&jn(v,null,E,"beforeUnmount"),ae&64?v.type.remove(v,E,L,Nt,F):D&&!D.hasOnce&&(z!==ue||X>0&&X&64)?dt(D,E,L,!1,!0):(z===ue&&X&384||!W&&ae&16)&&dt(H,E,L),F&&rt(v)}const Ce=j!=null&&ge==null;(se&&(he=$&&$.onVnodeUnmounted)||J||Ce)&&mt(()=>{he&&Vt(he,E,v),J&&jn(v,null,E,"unmounted"),Ce&&(v.el=null)},L)},rt=v=>{const{type:E,el:L,anchor:F,transition:W}=v;if(E===ue){Ye(L,F);return}if(E===Li){R(v);return}const z=()=>{o(L),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(v.shapeFlag&1&&W&&!W.persisted){const{leave:$,delayLeave:Y}=W,H=()=>$(L,z);Y?Y(v.el,z,H):H()}else z()},Ye=(v,E)=>{let L;for(;v!==E;)L=w(v),o(v),v=L;o(E)},Be=(v,E,L)=>{const{bum:F,scope:W,job:z,subTree:$,um:Y,m:H,a:D}=v;Au(H),Au(D),F&&Ri(F),W.stop(),z&&(z.flags|=8,ve($,v,E,L)),Y&&mt(Y,E),mt(()=>{v.isUnmounted=!0},E)},dt=(v,E,L,F=!1,W=!1,z=0)=>{for(let $=z;$<v.length;$++)ve(v[$],E,L,F,W)},_t=v=>{if(v.shapeFlag&6)return _t(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const E=w(v.anchor||v.el),L=E&&E[af];return L?w(L):E};let At=!1;const vn=(v,E,L)=>{let F;v==null?E._vnode&&(ve(E._vnode,null,null,!0),F=E._vnode.component):P(E._vnode||null,v,E,null,null,null,L),E._vnode=v,At||(At=!0,hu(F),ef(),At=!1)},Nt={p:P,um:ve,m:Ie,r:rt,mt:Te,mc:oe,pc:Z,pbc:pe,n:_t,o:e};return{render:vn,hydrate:void 0,createApp:Fb(vn)}}function pa({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 Wn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function nk(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ml(e,t,n=!1){const i=e.children,o=t.children;if(me(i)&&me(o))for(let a=0;a<i.length;a++){const c=i[a];let u=o[a];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=o[a]=dn(o[a]),u.el=c.el),!n&&u.patchFlag!==-2&&ml(c,u)),u.type===fo&&(u.patchFlag===-1&&(u=o[a]=dn(u)),u.el=c.el),u.type===yn&&!u.el&&(u.el=c.el)}}function sk(e){const t=e.slice(),n=[0];let i,o,a,c,u;const f=e.length;for(i=0;i<f;i++){const m=e[i];if(m!==0){if(o=n[n.length-1],e[o]<m){t[i]=o,n.push(i);continue}for(a=0,c=n.length-1;a<c;)u=a+c>>1,e[n[u]]<m?a=u+1:c=u;m<e[n[a]]&&(a>0&&(t[i]=n[a-1]),n[a]=i)}}for(a=n.length,c=n[a-1];a-- >0;)n[a]=c,c=t[c];return n}function Af(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Af(t)}function Au(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Cf(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Cf(t.subTree):null}const If=e=>e.__isSuspense;function rk(e,t){t&&t.pendingBranch?me(e)?t.effects.push(...e):t.effects.push(e):lb(e)}const ue=Symbol.for("v-fgt"),fo=Symbol.for("v-txt"),yn=Symbol.for("v-cmt"),Li=Symbol.for("v-stc"),xr=[];let Tt=null;function k(e=!1){xr.push(Tt=e?null:[])}function ik(){xr.pop(),Tt=xr[xr.length-1]||null}let Mr=1;function Cu(e,t=!1){Mr+=e,e<0&&Tt&&t&&(Tt.hasOnce=!0)}function Mf(e){return e.dynamicChildren=Mr>0?Tt||ks:null,ik(),Mr>0&&Tt&&Tt.push(e),e}function _(e,t,n,i,o,a){return Mf(d(e,t,n,i,o,a,!0))}function pt(e,t,n,i,o){return Mf(kt(e,t,n,i,o,!0))}function Rf(e){return e?e.__v_isVNode===!0:!1}function ms(e,t){return e.type===t.type&&e.key===t.key}const Nf=({key:e})=>e??null,Oi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ke(e)||ut(e)||Se(e)?{i:Et,r:e,k:t,f:!!n}:e:null);function d(e,t=null,n=null,i=0,o=null,a=e===ue?0:1,c=!1,u=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Nf(t),ref:t&&Oi(t),scopeId:nf,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:a,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Et};return u?(bl(f,n),a&128&&e.normalize(f)):n&&(f.shapeFlag|=Ke(n)?8:16),Mr>0&&!c&&Tt&&(f.patchFlag>0||a&6)&&f.patchFlag!==32&&Tt.push(f),f}const kt=ok;function ok(e,t=null,n=null,i=0,o=null,a=!1){if((!e||e===Rb)&&(e=yn),Rf(e)){const u=Xn(e,t,!0);return n&&bl(u,n),Mr>0&&!a&&Tt&&(u.shapeFlag&6?Tt[Tt.indexOf(e)]=u:Tt.push(u)),u.patchFlag=-2,u}if(bk(e)&&(e=e.__vccOpts),t){t=ak(t);let{class:u,style:f}=t;u&&!Ke(u)&&(t.class=de(u)),Pe(f)&&(fl(f)&&!me(f)&&(f=Xe({},f)),t.style=St(f))}const c=Ke(e)?1:If(e)?128:gb(e)?64:Pe(e)?4:Se(e)?2:0;return d(e,t,n,i,o,c,a,!0)}function ak(e){return e?fl(e)||vf(e)?Xe({},e):e:null}function Xn(e,t,n=!1,i=!1){const{props:o,ref:a,patchFlag:c,children:u,transition:f}=e,m=t?lk(o||{},t):o,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&Nf(m),ref:t&&t.ref?n&&a?me(a)?a.concat(Oi(t)):[a,Oi(t)]:Oi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ue?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Xn(e.ssContent),ssFallback:e.ssFallback&&Xn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&i&&Ir(p,f.clone(p)),p}function cr(e=" ",t=0){return kt(fo,null,e,t)}function Iu(e,t){const n=kt(Li,null,e);return n.staticCount=t,n}function V(e="",t=!1){return t?(k(),pt(yn,null,e)):kt(yn,null,e)}function Jt(e){return e==null||typeof e=="boolean"?kt(yn):me(e)?kt(ue,null,e.slice()):Rf(e)?dn(e):kt(fo,null,String(e))}function dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Xn(e)}function bl(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(me(t))n=16;else if(typeof t=="object")if(i&65){const o=t.default;o&&(o._c&&(o._d=!1),bl(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!vf(t)?t._ctx=Et:o===3&&Et&&(Et.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Se(t)?(t={default:t,_ctx:Et},n=32):(t=String(t),i&64?(n=16,t=[cr(t)]):n=8);e.children=t,e.shapeFlag|=n}function lk(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const o in i)if(o==="class")t.class!==i.class&&(t.class=de([t.class,i.class]));else if(o==="style")t.style=St([t.style,i.style]);else if(to(o)){const a=t[o],c=i[o];c&&a!==c&&!(me(a)&&a.includes(c))?t[o]=a?[].concat(a,c):c:c==null&&a==null&&!no(o)&&(t[o]=c)}else o!==""&&(t[o]=i[o])}return t}function Vt(e,t,n,i=null){Ht(e,t,7,[n,i])}const ck=mf();let uk=0;function dk(e,t,n){const i=e.type,o=(t?t.appContext:e.appContext)||ck,a={uid:uk++,vnode:e,type:i,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Mm(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:xf(i,o),emitsOptions:bf(i,o),emit:null,emitted:null,propsDefaults:Ue,inheritAttrs:i.inheritAttrs,ctx:Ue,data:Ue,props:Ue,attrs:Ue,slots:Ue,refs:Ue,setupState:Ue,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 a.ctx={_:a},a.root=t?t.root:a,a.emit=Hb.bind(null,a),e.ce&&e.ce(a),a}let lt=null;const Lf=()=>lt||Et;let ji,Wa;{const e=oo(),t=(n,i)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(i),a=>{o.length>1?o.forEach(c=>c(a)):o[0](a)}};ji=t("__VUE_INSTANCE_SETTERS__",n=>lt=n),Wa=t("__VUE_SSR_SETTERS__",n=>Rr=n)}const Br=e=>{const t=lt;return ji(e),e.scope.on(),()=>{e.scope.off(),ji(t)}},Mu=()=>{lt&&lt.scope.off(),ji(null)};function Of(e){return e.vnode.shapeFlag&4}let Rr=!1;function fk(e,t=!1,n=!1){t&&Wa(t);const{props:i,children:o}=e.vnode,a=Of(e);qb(e,i,a,t),Jb(e,o,n||t);const c=a?gk(e,t):void 0;return t&&Wa(!1),c}function gk(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Lb);const{setup:i}=n;if(i){mn();const o=e.setupContext=i.length>1?pk(e):null,a=Br(e),c=Dr(i,e,0,[e.props,o]),u=Id(c);if(bn(),a(),(u||e.sp)&&!vr(e)&&cf(e),u){if(c.then(Mu,Mu),t)return c.then(f=>{Ru(e,f)}).catch(f=>{lo(f,e,0)});e.asyncDep=c}else Ru(e,c)}else Df(e)}function Ru(e,t,n){Se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=Yd(t)),Df(e)}function Df(e,t,n){const i=e.type;e.render||(e.render=i.render||en);{const o=Br(e);mn();try{Ob(e)}finally{bn(),o()}}}const hk={get(e,t){return at(e,"get",""),e[t]}};function pk(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,hk),slots:e.slots,emit:e.emit,expose:t}}function go(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Yd(Jm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in wr)return wr[n](e)},has(t,n){return n in t||n in wr}})):e.proxy}function mk(e,t=!0){return Se(e)?e.displayName||e.name:e.name||t&&e.__name}function bk(e){return Se(e)&&"__vccOpts"in e}const ye=(e,t)=>sb(e,t,Rr),kk="3.5.34";/**
14
+ * @vue/runtime-dom v3.5.34
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let Ka;const Nu=typeof window<"u"&&window.trustedTypes;if(Nu)try{Ka=Nu.createPolicy("vue",{createHTML:e=>e})}catch{}const Pf=Ka?e=>Ka.createHTML(e):e=>e,yk="http://www.w3.org/2000/svg",_k="http://www.w3.org/1998/Math/MathML",un=typeof document<"u"?document:null,Lu=un&&un.createElement("template"),vk={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const o=t==="svg"?un.createElementNS(yk,e):t==="mathml"?un.createElementNS(_k,e):n?un.createElement(e,{is:n}):un.createElement(e);return e==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:e=>un.createTextNode(e),createComment:e=>un.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>un.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,o,a){const c=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{Lu.innerHTML=Pf(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const u=Lu.content;if(i==="svg"||i==="mathml"){const f=u.firstChild;for(;f.firstChild;)u.appendChild(f.firstChild);u.removeChild(f)}t.insertBefore(u,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Sn="transition",rr="animation",Es=Symbol("_vtc"),$f={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},wk=Xe({},kb,$f),Kn=(e,t=[])=>{me(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ou=e=>e?me(e)?e.some(t=>t.length>1):e.length>1:!1;function xk(e){const t={};for(const te in e)te in $f||(t[te]=e[te]);if(e.css===!1)return t;const{name:n="v",type:i,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:u=`${n}-enter-to`,appearFromClass:f=a,appearActiveClass:m=c,appearToClass:p=u,leaveFromClass:y=`${n}-leave-from`,leaveActiveClass:w=`${n}-leave-active`,leaveToClass:I=`${n}-leave-to`}=e,T=Sk(o),P=T&&T[0],U=T&&T[1],{onBeforeEnter:N,onEnter:B,onEnterCancelled:l,onLeave:R,onLeaveCancelled:q,onBeforeAppear:ee=N,onAppear:re=B,onAppearCancelled:oe=l}=t,ne=(te,we,Te,He)=>{te._enterCancelled=He,Cn(te,we?p:u),Cn(te,we?m:c),Te&&Te()},pe=(te,we)=>{te._isLeaving=!1,Cn(te,y),Cn(te,I),Cn(te,w),we&&we()},_e=te=>(we,Te)=>{const He=te?re:B,O=()=>ne(we,te,Te);Kn(He,[we,O]),Du(()=>{Cn(we,te?f:a),Gt(we,te?p:u),Ou(He)||Pu(we,i,P,O)})};return Xe(t,{onBeforeEnter(te){Kn(N,[te]),Gt(te,a),Gt(te,c)},onBeforeAppear(te){Kn(ee,[te]),Gt(te,f),Gt(te,m)},onEnter:_e(!1),onAppear:_e(!0),onLeave(te,we){te._isLeaving=!0;const Te=()=>pe(te,we);Gt(te,y),te._enterCancelled?(Gt(te,w),Va(te)):(Va(te),Gt(te,w)),Du(()=>{te._isLeaving&&(Cn(te,y),Gt(te,I),Ou(R)||Pu(te,i,U,Te))}),Kn(R,[te,Te])},onEnterCancelled(te){ne(te,!1,void 0,!0),Kn(l,[te])},onAppearCancelled(te){ne(te,!0,void 0,!0),Kn(oe,[te])},onLeaveCancelled(te){pe(te),Kn(q,[te])}})}function Sk(e){if(e==null)return null;if(Pe(e))return[ma(e.enter),ma(e.leave)];{const t=ma(e);return[t,t]}}function ma(e){return wm(e)}function Gt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Es]||(e[Es]=new Set)).add(t)}function Cn(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[Es];n&&(n.delete(t),n.size||(e[Es]=void 0))}function Du(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ek=0;function Pu(e,t,n,i){const o=e._endId=++Ek,a=()=>{o===e._endId&&i()};if(n!=null)return setTimeout(a,n);const{type:c,timeout:u,propCount:f}=Bf(e,t);if(!c)return i();const m=c+"end";let p=0;const y=()=>{e.removeEventListener(m,w),a()},w=I=>{I.target===e&&++p>=f&&y()};setTimeout(()=>{p<f&&y()},u+1),e.addEventListener(m,w)}function Bf(e,t){const n=window.getComputedStyle(e),i=T=>(n[T]||"").split(", "),o=i(`${Sn}Delay`),a=i(`${Sn}Duration`),c=$u(o,a),u=i(`${rr}Delay`),f=i(`${rr}Duration`),m=$u(u,f);let p=null,y=0,w=0;t===Sn?c>0&&(p=Sn,y=c,w=a.length):t===rr?m>0&&(p=rr,y=m,w=f.length):(y=Math.max(c,m),p=y>0?c>m?Sn:rr:null,w=p?p===Sn?a.length:f.length:0);const I=p===Sn&&/\b(?:transform|all)(?:,|$)/.test(i(`${Sn}Property`).toString());return{type:p,timeout:y,propCount:w,hasTransform:I}}function $u(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>Bu(n)+Bu(e[i])))}function Bu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Va(e){return(e?e.ownerDocument:document).body.offsetHeight}function Tk(e,t,n){const i=e[Es];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Uu=Symbol("_vod"),Ak=Symbol("_vsh"),Ck=Symbol(""),Ik=/(?:^|;)\s*display\s*:/;function Mk(e,t,n){const i=e.style,o=Ke(n);let a=!1;if(n&&!o){if(t)if(Ke(t))for(const c of t.split(";")){const u=c.slice(0,c.indexOf(":")).trim();n[u]==null&&ur(i,u,"")}else for(const c in t)n[c]==null&&ur(i,c,"");for(const c in n){c==="display"&&(a=!0);const u=n[c];u!=null?Nk(e,c,!Ke(t)&&t?t[c]:void 0,u)||ur(i,c,u):ur(i,c,"")}}else if(o){if(t!==n){const c=i[Ck];c&&(n+=";"+c),i.cssText=n,a=Ik.test(n)}}else t&&e.removeAttribute("style");Uu in e&&(e[Uu]=a?i.display:"",e[Ak]&&(i.display="none"))}const Fu=/\s*!important$/;function ur(e,t,n){if(me(n))n.forEach(i=>ur(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=Rk(e,t);Fu.test(n)?e.setProperty(On(i),n.replace(Fu,""),"important"):e[i]=n}}const zu=["Webkit","Moz","ms"],ba={};function Rk(e,t){const n=ba[t];if(n)return n;let i=yt(t);if(i!=="filter"&&i in e)return ba[t]=i;i=ro(i);for(let o=0;o<zu.length;o++){const a=zu[o]+i;if(a in e)return ba[t]=a}return t}function Nk(e,t,n,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ke(i)&&n===i}const Hu="http://www.w3.org/1999/xlink";function ju(e,t,n,i,o,a=Cm(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Hu,t.slice(6,t.length)):e.setAttributeNS(Hu,t,n):n==null||a&&!Ld(n)?e.removeAttribute(t):e.setAttribute(t,a?"":tn(n)?String(n):n)}function Wu(e,t,n,i,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Pf(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const u=a==="OPTION"?e.getAttribute("value")||"":e.value,f=n==null?e.type==="checkbox"?"on":"":String(n);(u!==f||!("_value"in e))&&(e.value=f),n==null&&e.removeAttribute(t),e._value=n;return}let c=!1;if(n===""||n==null){const u=typeof e[t];u==="boolean"?n=Ld(n):n==null&&u==="string"?(n="",c=!0):u==="number"&&(n=0,c=!0)}try{e[t]=n}catch{}c&&e.removeAttribute(o||t)}function hn(e,t,n,i){e.addEventListener(t,n,i)}function Lk(e,t,n,i){e.removeEventListener(t,n,i)}const Ku=Symbol("_vei");function Ok(e,t,n,i,o=null){const a=e[Ku]||(e[Ku]={}),c=a[t];if(i&&c)c.value=i;else{const[u,f]=Dk(t);if(i){const m=a[t]=Bk(i,o);hn(e,u,m,f)}else c&&(Lk(e,u,c,f),a[t]=void 0)}}const Vu=/(?:Once|Passive|Capture)$/;function Dk(e){let t;if(Vu.test(e)){t={};let i;for(;i=e.match(Vu);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):On(e.slice(2)),t]}let ka=0;const Pk=Promise.resolve(),$k=()=>ka||(Pk.then(()=>ka=0),ka=Date.now());function Bk(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Ht(Uk(i,n.value),t,5,[i])};return n.value=e,n.attached=$k(),n}function Uk(e,t){if(me(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(i=>o=>!o._stopped&&i&&i(o))}else return t}const Gu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fk=(e,t,n,i,o,a)=>{const c=o==="svg";t==="class"?Tk(e,i,c):t==="style"?Mk(e,n,i):to(t)?no(t)||Ok(e,t,n,i,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):zk(e,t,i,c))?(Wu(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ju(e,t,i,c,a,t!=="value")):e._isVueCE&&(Hk(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ke(i)))?Wu(e,yt(t),i,a,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),ju(e,t,i,c))};function zk(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Gu(t)&&Se(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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Gu(t)&&Ke(n)?!1:t in e}function Hk(e,t){const n=e._def.props;if(!n)return!1;const i=yt(t);return Array.isArray(n)?n.some(o=>yt(o)===i):Object.keys(n).some(o=>yt(o)===i)}const Uf=new WeakMap,Ff=new WeakMap,Wi=Symbol("_moveCb"),qu=Symbol("_enterCb"),jk=e=>(delete e.props.mode,e),Wk=jk({name:"TransitionGroup",props:Xe({},wk,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Lf(),i=bb();let o,a;return ff(()=>{if(!o.length)return;const c=e.moveClass||`${e.name||"v"}-move`;if(!Zk(o[0].el,n.vnode.el,c)){o=[];return}o.forEach(Vk),o.forEach(Gk);const u=o.filter(qk);Va(n.vnode.el),u.forEach(f=>{const m=f.el,p=m.style;Gt(m,c),p.transform=p.webkitTransform=p.transitionDuration="";const y=m[Wi]=w=>{w&&w.target!==m||(!w||w.propertyName.endsWith("transform"))&&(m.removeEventListener("transitionend",y),m[Wi]=null,Cn(m,c))};m.addEventListener("transitionend",y)}),o=[]}),()=>{const c=Ne(e),u=xk(c);let f=c.tag||ue;if(o=[],a)for(let m=0;m<a.length;m++){const p=a[m];p.el&&p.el instanceof Element&&(o.push(p),Ir(p,Ua(p,u,i,n)),Uf.set(p,zf(p.el)))}a=t.default?lf(t.default()):[];for(let m=0;m<a.length;m++){const p=a[m];p.key!=null&&Ir(p,Ua(p,u,i,n))}return kt(f,null,a)}}}),Kk=Wk;function Vk(e){const t=e.el;t[Wi]&&t[Wi](),t[qu]&&t[qu]()}function Gk(e){Ff.set(e,zf(e.el))}function qk(e){const t=Uf.get(e),n=Ff.get(e),i=t.left-n.left,o=t.top-n.top;if(i||o){const a=e.el,c=a.style,u=a.getBoundingClientRect();let f=1,m=1;return a.offsetWidth&&(f=u.width/a.offsetWidth),a.offsetHeight&&(m=u.height/a.offsetHeight),(!Number.isFinite(f)||f===0)&&(f=1),(!Number.isFinite(m)||m===0)&&(m=1),Math.abs(f-1)<.01&&(f=1),Math.abs(m-1)<.01&&(m=1),c.transform=c.webkitTransform=`translate(${i/f}px,${o/m}px)`,c.transitionDuration="0s",e}}function zf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Zk(e,t,n){const i=e.cloneNode(),o=e[Es];o&&o.forEach(u=>{u.split(/\s+/).forEach(f=>f&&i.classList.remove(f))}),n.split(/\s+/).forEach(u=>u&&i.classList.add(u)),i.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(i);const{hasTransform:c}=Bf(i);return a.removeChild(i),c}const Ln=e=>{const t=e.props["onUpdate:modelValue"]||!1;return me(t)?n=>Ri(t,n):t};function Qk(e){e.target.composing=!0}function Zu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Rt=Symbol("_assign");function Qu(e,t,n){return t&&(e=e.trim()),n&&(e=io(e)),e}const $t={created(e,{modifiers:{lazy:t,trim:n,number:i}},o){e[Rt]=Ln(o);const a=i||o.props&&o.props.type==="number";hn(e,t?"change":"input",c=>{c.target.composing||e[Rt](Qu(e.value,n,a))}),(n||a)&&hn(e,"change",()=>{e.value=Qu(e.value,n,a)}),t||(hn(e,"compositionstart",Qk),hn(e,"compositionend",Zu),hn(e,"change",Zu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:o,number:a}},c){if(e[Rt]=Ln(c),e.composing)return;const u=(a||e.type==="number")&&!/^0\d/.test(e.value)?io(e.value):e.value,f=t??"";if(u===f)return;const m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(i&&t===n||o&&e.value.trim()===f)||(e.value=f)}},Ga={deep:!0,created(e,t,n){e[Rt]=Ln(n),hn(e,"change",()=>{const i=e._modelValue,o=Ts(e),a=e.checked,c=e[Rt];if(me(i)){const u=il(i,o),f=u!==-1;if(a&&!f)c(i.concat(o));else if(!a&&f){const m=[...i];m.splice(u,1),c(m)}}else if(Cs(i)){const u=new Set(i);a?u.add(o):u.delete(o),c(u)}else c(Hf(e,a))})},mounted:Yu,beforeUpdate(e,t,n){e[Rt]=Ln(n),Yu(e,t,n)}};function Yu(e,{value:t,oldValue:n},i){e._modelValue=t;let o;if(me(t))o=il(t,i.props.value)>-1;else if(Cs(t))o=t.has(i.props.value);else{if(t===n)return;o=Nn(t,Hf(e,!0))}e.checked!==o&&(e.checked=o)}const Yk={created(e,{value:t},n){e.checked=Nn(t,n.props.value),e[Rt]=Ln(n),hn(e,"change",()=>{e[Rt](Ts(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[Rt]=Ln(i),t!==n&&(e.checked=Nn(t,i.props.value))}},Jk={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const o=Cs(t);hn(e,"change",()=>{const a=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>n?io(Ts(c)):Ts(c));e[Rt](e.multiple?o?new Set(a):a:a[0]),e._assigning=!0,pn(()=>{e._assigning=!1})}),e[Rt]=Ln(i)},mounted(e,{value:t}){Ju(e,t)},beforeUpdate(e,t,n){e[Rt]=Ln(n)},updated(e,{value:t}){e._assigning||Ju(e,t)}};function Ju(e,t){const n=e.multiple,i=me(t);if(!(n&&!i&&!Cs(t))){for(let o=0,a=e.options.length;o<a;o++){const c=e.options[o],u=Ts(c);if(n)if(i){const f=typeof u;f==="string"||f==="number"?c.selected=t.some(m=>String(m)===String(u)):c.selected=il(t,u)>-1}else c.selected=t.has(u);else if(Nn(Ts(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ts(e){return"_value"in e?e._value:e.value}function Hf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Xk={created(e,t,n){wi(e,t,n,null,"created")},mounted(e,t,n){wi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){wi(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){wi(e,t,n,i,"updated")}};function ey(e,t){switch(e){case"SELECT":return Jk;case"TEXTAREA":return $t;default:switch(t){case"checkbox":return Ga;case"radio":return Yk;default:return $t}}}function wi(e,t,n,i,o){const c=ey(e.tagName,n.props&&n.props.type)[o];c&&c(e,t,n,i)}const ty=["ctrl","shift","alt","meta"],ny={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)=>ty.some(n=>e[`${n}Key`]&&!t.includes(n))},tt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=(o,...a)=>{for(let c=0;c<t.length;c++){const u=ny[t[c]];if(u&&u(o,t))return}return e(o,...a)})},sy={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Xu=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=o=>{if(!("key"in o))return;const a=On(o.key);if(t.some(c=>c===a||sy[c]===a))return e(o)})},ry=Xe({patchProp:Fk},vk);let ed;function iy(){return ed||(ed=ek(ry))}const oy=(...e)=>{const t=iy().createApp(...e),{mount:n}=t;return t.mount=i=>{const o=ly(i);if(!o)return;const a=t._component;!Se(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,ay(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function ay(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ly(e){return Ke(e)?document.querySelector(e):e}function kl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ts=kl();function jf(e){ts=e}var qn={exec:()=>null};function Me(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(ct.caret,"$1"),n=n.replace(o,c),i},getRegex:()=>new RegExp(n,t)};return i}var cy=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),ct={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},uy=/^(?:[ \t]*(?:\n|$))+/,dy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,fy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ur=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,gy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,yl=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kf=Me(Wf).replace(/bull/g,yl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),hy=Me(Wf).replace(/bull/g,yl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_l=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,py=/^[^\n]+/,vl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,my=Me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),by=Me(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yl).getRegex(),ho="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ky=Me("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",wl).replace("tag",ho).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vf=Me(_l).replace("hr",Ur).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ho).getRegex(),yy=Me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vf).getRegex(),xl={blockquote:yy,code:dy,def:my,fences:fy,heading:gy,hr:Ur,html:ky,lheading:Kf,list:by,newline:uy,paragraph:Vf,table:qn,text:py},td=Me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ur).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ho).getRegex(),_y={...xl,lheading:hy,table:td,paragraph:Me(_l).replace("hr",Ur).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",td).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ho).getRegex()},vy={...xl,html:Me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Me(_l).replace("hr",Ur).replace("heading",` *#{1,6} *[^
18
+ ]`).replace("lheading",Kf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},wy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gf=/^( {2,}|\\)\n(?!\s*$)/,Sy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Is=/[\p{P}\p{S}]/u,po=/[\s\p{P}\p{S}]/u,Sl=/[^\s\p{P}\p{S}]/u,Ey=Me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,po).getRegex(),qf=/(?!~)[\p{P}\p{S}]/u,Ty=/(?!~)[\s\p{P}\p{S}]/u,Ay=/(?:[^\s\p{P}\p{S}]|~)/u,Cy=Me(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",cy?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Zf=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Iy=Me(Zf,"u").replace(/punct/g,Is).getRegex(),My=Me(Zf,"u").replace(/punct/g,qf).getRegex(),Qf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ry=Me(Qf,"gu").replace(/notPunctSpace/g,Sl).replace(/punctSpace/g,po).replace(/punct/g,Is).getRegex(),Ny=Me(Qf,"gu").replace(/notPunctSpace/g,Ay).replace(/punctSpace/g,Ty).replace(/punct/g,qf).getRegex(),Ly=Me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Sl).replace(/punctSpace/g,po).replace(/punct/g,Is).getRegex(),Oy=Me(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Is).getRegex(),Dy="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Py=Me(Dy,"gu").replace(/notPunctSpace/g,Sl).replace(/punctSpace/g,po).replace(/punct/g,Is).getRegex(),$y=Me(/\\(punct)/,"gu").replace(/punct/g,Is).getRegex(),By=Me(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Uy=Me(wl).replace("(?:-->|$)","-->").getRegex(),Fy=Me("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Uy).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ki=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,zy=Me(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ki).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Yf=Me(/^!?\[(label)\]\[(ref)\]/).replace("label",Ki).replace("ref",vl).getRegex(),Jf=Me(/^!?\[(ref)\](?:\[\])?/).replace("ref",vl).getRegex(),Hy=Me("reflink|nolink(?!\\()","g").replace("reflink",Yf).replace("nolink",Jf).getRegex(),nd=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,El={_backpedal:qn,anyPunctuation:$y,autolink:By,blockSkip:Cy,br:Gf,code:xy,del:qn,delLDelim:qn,delRDelim:qn,emStrongLDelim:Iy,emStrongRDelimAst:Ry,emStrongRDelimUnd:Ly,escape:wy,link:zy,nolink:Jf,punctuation:Ey,reflink:Yf,reflinkSearch:Hy,tag:Fy,text:Sy,url:qn},jy={...El,link:Me(/^!?\[(label)\]\((.*?)\)/).replace("label",Ki).getRegex(),reflink:Me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ki).getRegex()},qa={...El,emStrongRDelimAst:Ny,emStrongLDelim:My,delLDelim:Oy,delRDelim:Py,url:Me(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",nd).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Me(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",nd).getRegex()},Wy={...qa,br:Me(Gf).replace("{2,}","*").getRegex(),text:Me(qa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xi={normal:xl,gfm:_y,pedantic:vy},ir={normal:El,gfm:qa,breaks:Wy,pedantic:jy},Ky={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sd=e=>Ky[e];function qt(e,t){if(t){if(ct.escapeTest.test(e))return e.replace(ct.escapeReplace,sd)}else if(ct.escapeTestNoEncode.test(e))return e.replace(ct.escapeReplaceNoEncode,sd);return e}function rd(e){try{e=encodeURI(e).replace(ct.percentDecode,"%")}catch{return null}return e}function id(e,t){var a;let n=e.replace(ct.findPipe,(c,u,f)=>{let m=!1,p=u;for(;--p>=0&&f[p]==="\\";)m=!m;return m?"|":" |"}),i=n.split(ct.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(ct.slashPipe,"|");return i}function En(e,t,n){let i=e.length;if(i===0)return"";let o=0;for(;o<i&&e.charAt(i-o-1)===t;)o++;return e.slice(0,i-o)}function od(e){let t=e.split(`
19
+ `),n=t.length-1;for(;n>=0&&ct.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
20
+ `)}function Vy(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function Gy(e,t=0){let n=t,i="";for(let o of e)if(o===" "){let a=4-n%4;i+=" ".repeat(a),n+=a}else i+=o,n++;return i}function ad(e,t,n,i,o){let a=t.href,c=t.title||null,u=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:c,text:u,tokens:i.inlineTokens(u)};return i.state.inLink=!1,f}function qy(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(`
21
+ `).map(a=>{let c=a.match(n.other.beginningSpace);if(c===null)return a;let[u]=c;return u.length>=o.length?a.slice(o.length):a}).join(`
22
+ `)}var Vi=class{constructor(e){$e(this,"options");$e(this,"rules");$e(this,"lexer");this.options=e||ts}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:od(t[0]),i=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:i}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],i=qy(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let i=En(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:En(t[0],`
23
+ `),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:En(t[0],`
24
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=En(t[0],`
25
+ `).split(`
26
+ `),i="",o="",a=[];for(;n.length>0;){let c=!1,u=[],f;for(f=0;f<n.length;f++)if(this.rules.other.blockquoteStart.test(n[f]))u.push(n[f]),c=!0;else if(!c)u.push(n[f]);else break;n=n.slice(f);let m=u.join(`
27
+ `),p=m.replace(this.rules.other.blockquoteSetextReplace,`
28
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
29
+ ${m}`:m,o=o?`${o}
30
+ ${p}`:p;let y=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,a,!0),this.lexer.state.top=y,n.length===0)break;let w=a.at(-1);if((w==null?void 0:w.type)==="code")break;if((w==null?void 0:w.type)==="blockquote"){let I=w,T=I.raw+`
31
+ `+n.join(`
32
+ `),P=this.blockquote(T);a[a.length-1]=P,i=i.substring(0,i.length-I.raw.length)+P.raw,o=o.substring(0,o.length-I.text.length)+P.text;break}else if((w==null?void 0:w.type)==="list"){let I=w,T=I.raw+`
33
+ `+n.join(`
34
+ `),P=this.list(T);a[a.length-1]=P,i=i.substring(0,i.length-w.raw.length)+P.raw,o=o.substring(0,o.length-I.raw.length)+P.raw,n=T.substring(a.at(-1).raw.length).split(`
35
+ `);continue}}return{type:"blockquote",raw:i,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),i=n.length>1,o={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let a=this.rules.other.listItemRegex(n),c=!1;for(;e;){let f=!1,m="",p="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;m=t[0],e=e.substring(m.length);let y=Gy(t[2].split(`
36
+ `,1)[0],t[1].length),w=e.split(`
37
+ `,1)[0],I=!y.trim(),T=0;if(this.options.pedantic?(T=2,p=y.trimStart()):I?T=t[1].length+1:(T=y.search(this.rules.other.nonSpaceChar),T=T>4?1:T,p=y.slice(T),T+=t[1].length),I&&this.rules.other.blankLine.test(w)&&(m+=w+`
38
+ `,e=e.substring(w.length+1),f=!0),!f){let P=this.rules.other.nextBulletRegex(T),U=this.rules.other.hrRegex(T),N=this.rules.other.fencesBeginRegex(T),B=this.rules.other.headingBeginRegex(T),l=this.rules.other.htmlBeginRegex(T),R=this.rules.other.blockquoteBeginRegex(T);for(;e;){let q=e.split(`
39
+ `,1)[0],ee;if(w=q,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),ee=w):ee=w.replace(this.rules.other.tabCharGlobal," "),N.test(w)||B.test(w)||l.test(w)||R.test(w)||P.test(w)||U.test(w))break;if(ee.search(this.rules.other.nonSpaceChar)>=T||!w.trim())p+=`
40
+ `+ee.slice(T);else{if(I||y.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(y)||B.test(y)||U.test(y))break;p+=`
41
+ `+w}I=!w.trim(),m+=q+`
42
+ `,e=e.substring(q.length+1),y=ee.slice(T)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(c=!0)),o.items.push({type:"list_item",raw:m,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),o.raw+=m}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let f of o.items){this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]);let m=f.tokens[0];if(f.task&&((m==null?void 0:m.type)==="text"||(m==null?void 0:m.type)==="paragraph")){f.text=f.text.replace(this.rules.other.listReplaceTask,""),m.raw=m.raw.replace(this.rules.other.listReplaceTask,""),m.text=m.text.replace(this.rules.other.listReplaceTask,"");for(let y=this.lexer.inlineQueue.length-1;y>=0;y--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[y].src)){this.lexer.inlineQueue[y].src=this.lexer.inlineQueue[y].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(f.raw);if(p){let y={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};f.checked=y.checked,o.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=y.raw+f.tokens[0].raw,f.tokens[0].text=y.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(y)):f.tokens.unshift({type:"paragraph",raw:y.raw,text:y.raw,tokens:[y]}):f.tokens.unshift(y)}}else f.task&&(f.task=!1);if(!o.loose){let p=f.tokens.filter(w=>w.type==="space"),y=p.length>0&&p.some(w=>this.rules.other.anyLine.test(w.raw));o.loose=y}}if(o.loose)for(let f of o.items){f.loose=!0;for(let m of f.tokens)m.type==="text"&&(m.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=od(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:En(t[0],`
43
+ `),href:i,title:o}}}table(e){var c;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=id(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
44
+ `):[],a={type:"table",raw:En(t[0],`
45
+ `),header:[],align:[],rows:[]};if(n.length===i.length){for(let u of i)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<n.length;u++)a.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:a.align[u]});for(let u of o)a.rows.push(id(u,a.header.length).map((f,m)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:a.align[m]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:En(t[0],`
46
+ `),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
47
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=En(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=Vy(t[2],"()");if(a===-2)return;if(a>-1){let c=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let i=t[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),ad(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[i.toLowerCase()];if(!o){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return ad(n,o,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!n||this.rules.inline.punctuation.exec(n))){let o=[...i[0]].length-1,a,c,u=o,f=0,m=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,t=t.slice(-1*e.length+o);(i=m.exec(t))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(c=[...a].length,i[3]||i[4]){u+=c;continue}else if((i[5]||i[6])&&o%3&&!((o+c)%3)){f+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+f);let p=[...i[0]][0].length,y=e.slice(0,o+i.index+p+c);if(Math.min(o,c)%2){let I=y.slice(1,-1);return{type:"em",raw:y,text:I,tokens:this.lexer.inlineTokens(I)}}let w=y.slice(2,-2);return{type:"strong",raw:y,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!n||this.rules.inline.punctuation.exec(n))){let o=[...i[0]].length-1,a,c,u=o,f=this.rules.inline.delRDelim;for(f.lastIndex=0,t=t.slice(-1*e.length+o);(i=f.exec(t))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a||(c=[...a].length,c!==o))continue;if(i[3]||i[4]){u+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u);let m=[...i[0]][0].length,p=e.slice(0,o+i.index+m+c),y=p.slice(o,-o);return{type:"del",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,i;return t[2]==="@"?(n=t[1],i="mailto:"+n):(n=t[1],i=n),{type:"link",raw:t[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let i,o;if(t[2]==="@")i=t[0],o="mailto:"+i;else{let a;do a=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(a!==t[0]);i=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Bt=class Za{constructor(t){$e(this,"tokens");$e(this,"options");$e(this,"state");$e(this,"inlineQueue");$e(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ts,this.options.tokenizer=this.options.tokenizer||new Vi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:ct,block:xi.normal,inline:ir.normal};this.options.pedantic?(n.block=xi.pedantic,n.inline=ir.pedantic):this.options.gfm&&(n.block=xi.gfm,this.options.breaks?n.inline=ir.breaks:n.inline=ir.gfm),this.tokenizer.rules=n}static get rules(){return{block:xi,inline:ir}}static lex(t,n){return new Za(n).lex(t)}static lexInline(t,n){return new Za(n).inlineTokens(t)}lex(t){t=t.replace(ct.carriageReturn,`
48
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],i=!1){var a,c,u;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(ct.tabCharGlobal," ").replace(ct.spaceLine,""));let o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let f;if((c=(a=this.options.extensions)==null?void 0:a.block)!=null&&c.some(p=>(f=p.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.space(t)){t=t.substring(f.raw.length);let p=n.at(-1);f.raw.length===1&&p!==void 0?p.raw+=`
49
+ `:n.push(f);continue}if(f=this.tokenizer.code(t)){t=t.substring(f.raw.length);let p=n.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
50
+ `)?"":`
51
+ `)+f.raw,p.text+=`
52
+ `+f.text,this.inlineQueue.at(-1).src=p.text):n.push(f);continue}if(f=this.tokenizer.fences(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.heading(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.hr(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.blockquote(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.list(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.html(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.def(t)){t=t.substring(f.raw.length);let p=n.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
53
+ `)?"":`
54
+ `)+f.raw,p.text+=`
55
+ `+f.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[f.tag]||(this.tokens.links[f.tag]={href:f.href,title:f.title},n.push(f));continue}if(f=this.tokenizer.table(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.lheading(t)){t=t.substring(f.raw.length),n.push(f);continue}let m=t;if((u=this.options.extensions)!=null&&u.startBlock){let p=1/0,y=t.slice(1),w;this.options.extensions.startBlock.forEach(I=>{w=I.call({lexer:this},y),typeof w=="number"&&w>=0&&(p=Math.min(p,w))}),p<1/0&&p>=0&&(m=t.substring(0,p+1))}if(this.state.top&&(f=this.tokenizer.paragraph(m))){let p=n.at(-1);i&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
56
+ `)?"":`
57
+ `)+f.raw,p.text+=`
58
+ `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):n.push(f),i=m.length!==t.length,t=t.substring(f.raw.length);continue}if(f=this.tokenizer.text(t)){t=t.substring(f.raw.length);let p=n.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
59
+ `)?"":`
60
+ `)+f.raw,p.text+=`
61
+ `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):n.push(f);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var m,p,y,w,I;this.tokenizer.lexer=this;let i=t,o=null;if(this.tokens.links){let T=Object.keys(this.tokens.links);if(T.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)T.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)a=o[2]?o[2].length:0,i=i.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((p=(m=this.options.hooks)==null?void 0:m.emStrongMask)==null?void 0:p.call({lexer:this},i))??i;let c=!1,u="",f=1/0;for(;t;){if(t.length<f)f=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}c||(u=""),c=!1;let T;if((w=(y=this.options.extensions)==null?void 0:y.inline)!=null&&w.some(U=>(T=U.call({lexer:this},t,n))?(t=t.substring(T.raw.length),n.push(T),!0):!1))continue;if(T=this.tokenizer.escape(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.tag(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.link(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(T.raw.length);let U=n.at(-1);T.type==="text"&&(U==null?void 0:U.type)==="text"?(U.raw+=T.raw,U.text+=T.text):n.push(T);continue}if(T=this.tokenizer.emStrong(t,i,u)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.codespan(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.br(t)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.del(t,i,u)){t=t.substring(T.raw.length),n.push(T);continue}if(T=this.tokenizer.autolink(t)){t=t.substring(T.raw.length),n.push(T);continue}if(!this.state.inLink&&(T=this.tokenizer.url(t))){t=t.substring(T.raw.length),n.push(T);continue}let P=t;if((I=this.options.extensions)!=null&&I.startInline){let U=1/0,N=t.slice(1),B;this.options.extensions.startInline.forEach(l=>{B=l.call({lexer:this},N),typeof B=="number"&&B>=0&&(U=Math.min(U,B))}),U<1/0&&U>=0&&(P=t.substring(0,U+1))}if(T=this.tokenizer.inlineText(P)){t=t.substring(T.raw.length),T.raw.slice(-1)!=="_"&&(u=T.raw.slice(-1)),c=!0;let U=n.at(-1);(U==null?void 0:U.type)==="text"?(U.raw+=T.raw,U.text+=T.text):n.push(T);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(this.options.silent)console.error(n);else throw new Error(n)}},Gi=class{constructor(e){$e(this,"options");$e(this,"parser");this.options=e||ts}space(e){return""}code({text:e,lang:t,escaped:n}){var a;let i=(a=(t||"").match(ct.notSpaceStart))==null?void 0:a[0],o=e.replace(ct.endingNewline,"")+`
62
+ `;return i?'<pre><code class="language-'+qt(i)+'">'+(n?o:qt(o,!0))+`</code></pre>
63
+ `:"<pre><code>"+(n?o:qt(o,!0))+`</code></pre>
64
+ `}blockquote({tokens:e}){return`<blockquote>
65
+ ${this.parser.parse(e)}</blockquote>
66
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
67
+ `}hr(e){return`<hr>
68
+ `}list(e){let t=e.ordered,n=e.start,i="";for(let c=0;c<e.items.length;c++){let u=e.items[c];i+=this.listitem(u)}let o=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+o+a+`>
69
+ `+i+"</"+o+`>
70
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
71
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
72
+ `}table(e){let t="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);t+=this.tablerow({text:n});let i="";for(let o=0;o<e.rows.length;o++){let a=e.rows[o];n="";for(let c=0;c<a.length;c++)n+=this.tablecell(a[c]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
73
+ <thead>
74
+ `+t+`</thead>
75
+ `+i+`</table>
76
+ `}tablerow({text:e}){return`<tr>
77
+ ${e}</tr>
78
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
79
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${qt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let i=this.parser.parseInline(n),o=rd(e);if(o===null)return i;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+qt(t)+'"'),a+=">"+i+"</a>",a}image({href:e,title:t,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let o=rd(e);if(o===null)return qt(n);e=o;let a=`<img src="${e}" alt="${qt(n)}"`;return t&&(a+=` title="${qt(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:qt(e.text)}},Tl=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Ut=class Qa{constructor(t){$e(this,"options");$e(this,"renderer");$e(this,"textRenderer");this.options=t||ts,this.options.renderer=this.options.renderer||new Gi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Tl}static parse(t,n){return new Qa(n).parse(t)}static parseInline(t,n){return new Qa(n).parseInline(t)}parse(t){var i,o;this.renderer.parser=this;let n="";for(let a=0;a<t.length;a++){let c=t[a];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[c.type]){let f=c,m=this.options.extensions.renderers[f.type].call({parser:this},f);if(m!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){n+=m||"";continue}}let u=c;switch(u.type){case"space":{n+=this.renderer.space(u);break}case"hr":{n+=this.renderer.hr(u);break}case"heading":{n+=this.renderer.heading(u);break}case"code":{n+=this.renderer.code(u);break}case"table":{n+=this.renderer.table(u);break}case"blockquote":{n+=this.renderer.blockquote(u);break}case"list":{n+=this.renderer.list(u);break}case"checkbox":{n+=this.renderer.checkbox(u);break}case"html":{n+=this.renderer.html(u);break}case"def":{n+=this.renderer.def(u);break}case"paragraph":{n+=this.renderer.paragraph(u);break}case"text":{n+=this.renderer.text(u);break}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(t,n=this.renderer){var o,a;this.renderer.parser=this;let i="";for(let c=0;c<t.length;c++){let u=t[c];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[u.type]){let m=this.options.extensions.renderers[u.type].call({parser:this},u);if(m!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){i+=m||"";continue}}let f=u;switch(f.type){case"escape":{i+=n.text(f);break}case"html":{i+=n.html(f);break}case"link":{i+=n.link(f);break}case"image":{i+=n.image(f);break}case"checkbox":{i+=n.checkbox(f);break}case"strong":{i+=n.strong(f);break}case"em":{i+=n.em(f);break}case"codespan":{i+=n.codespan(f);break}case"br":{i+=n.br(f);break}case"del":{i+=n.del(f);break}case"text":{i+=n.text(f);break}default:{let m='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return i}},Mi,dr=(Mi=class{constructor(e){$e(this,"options");$e(this,"block");this.options=e||ts}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Bt.lex:Bt.lexInline}provideParser(e=this.block){return e?Ut.parse:Ut.parseInline}},$e(Mi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),$e(Mi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Mi),Zy=class{constructor(...e){$e(this,"defaults",kl());$e(this,"options",this.setOptions);$e(this,"parse",this.parseMarkdown(!0));$e(this,"parseInline",this.parseMarkdown(!1));$e(this,"Parser",Ut);$e(this,"Renderer",Gi);$e(this,"TextRenderer",Tl);$e(this,"Lexer",Bt);$e(this,"Tokenizer",Vi);$e(this,"Hooks",dr);this.use(...e)}walkTokens(e,t){var i,o;let n=[];for(let a of e)switch(n=n.concat(t.call(this,a)),a.type){case"table":{let c=a;for(let u of c.header)n=n.concat(this.walkTokens(u.tokens,t));for(let u of c.rows)for(let f of u)n=n.concat(this.walkTokens(f.tokens,t));break}case"list":{let c=a;n=n.concat(this.walkTokens(c.items,t));break}default:{let c=a;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{let f=c[u].flat(1/0);n=n.concat(this.walkTokens(f,t))}):c.tokens&&(n=n.concat(this.walkTokens(c.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=t.renderers[o.name];a?t.renderers[o.name]=function(...c){let u=o.renderer.apply(this,c);return u===!1&&(u=a.apply(this,c)),u}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),i.extensions=t),n.renderer){let o=this.defaults.renderer||new Gi(this.defaults);for(let a in n.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,u=n.renderer[c],f=o[c];o[c]=(...m)=>{let p=u.apply(o,m);return p===!1&&(p=f.apply(o,m)),p||""}}i.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new Vi(this.defaults);for(let a in n.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,u=n.tokenizer[c],f=o[c];o[c]=(...m)=>{let p=u.apply(o,m);return p===!1&&(p=f.apply(o,m)),p}}i.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new dr;for(let a in n.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,u=n.hooks[c],f=o[c];dr.passThroughHooks.has(a)?o[c]=m=>{if(this.defaults.async&&dr.passThroughHooksRespectAsync.has(a))return(async()=>{let y=await u.call(o,m);return f.call(o,y)})();let p=u.call(o,m);return f.call(o,p)}:o[c]=(...m)=>{if(this.defaults.async)return(async()=>{let y=await u.apply(o,m);return y===!1&&(y=await f.apply(o,m)),y})();let p=u.apply(o,m);return p===!1&&(p=f.apply(o,m)),p}}i.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,a=n.walkTokens;i.walkTokens=function(c){let u=[];return u.push(a.call(this,c)),o&&(u=u.concat(o.call(this,c))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Bt.lex(e,t??this.defaults)}parser(e,t){return Ut.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let i={...n},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(t):t,u=await(o.hooks?await o.hooks.provideLexer(e):e?Bt.lex:Bt.lexInline)(c,o),f=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(f,o.walkTokens));let m=await(o.hooks?await o.hooks.provideParser(e):e?Ut.parse:Ut.parseInline)(f,o);return o.hooks?await o.hooks.postprocess(m):m})().catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let c=(o.hooks?o.hooks.provideLexer(e):e?Bt.lex:Bt.lexInline)(t,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=(o.hooks?o.hooks.provideParser(e):e?Ut.parse:Ut.parseInline)(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return a(c)}}}onError(e,t){return n=>{if(n.message+=`
80
+ Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+qt(n.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(n);throw n}}},es=new Zy;function Re(e,t){return es.parse(e,t)}Re.options=Re.setOptions=function(e){return es.setOptions(e),Re.defaults=es.defaults,jf(Re.defaults),Re};Re.getDefaults=kl;Re.defaults=ts;Re.use=function(...e){return es.use(...e),Re.defaults=es.defaults,jf(Re.defaults),Re};Re.walkTokens=function(e,t){return es.walkTokens(e,t)};Re.parseInline=es.parseInline;Re.Parser=Ut;Re.parser=Ut.parse;Re.Renderer=Gi;Re.TextRenderer=Tl;Re.Lexer=Bt;Re.lexer=Bt.lex;Re.Tokenizer=Vi;Re.Hooks=dr;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;Ut.parse;Bt.lex;function Qy(e,t,n){const i=new Array(e);return new Proxy(i,{get(o,a,c){if(typeof a=="string"){const u=a.charCodeAt(0);if(u>=48&&u<=57){const f=+a;if(Number.isInteger(f)&&f>=0&&f<e){let m=o[f];if(!m){const p=t[f*2];m=o[f]={index:f,key:n(f),start:p,size:t[f*2+1],end:p+t[f*2+1],lane:0}}return m}}if(a==="length")return e}return Reflect.get(o,a,c)}})}function fs(e,t,n){let i=n.initialDeps??[],o,a=!0;function c(){const u=e();return(u.length!==i.length||u.some((m,p)=>i[p]!==m))&&(i=u,o=t(...u),n!=null&&n.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(o),a=!1),o}return c.updateDeps=u=>{i=u},c}function ld(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Yy=(e,t)=>Math.abs(e-t)<1.01,Jy=(e,t,n)=>{let i;return Object.assign(function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)},{cancel:()=>{e.clearTimeout(i)}})};let or;const ya=()=>{if(or!==void 0)return or;if(typeof navigator>"u")return or=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return or=!0;const e=navigator.maxTouchPoints;return or=navigator.platform==="MacIntel"&&e!==void 0&&e>0},cd=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Xy=e=>e,Xf=e=>{const t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(i);for(let a=0;a<i;a++)o[a]=t+a;return o},e_=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=c=>{const{width:u,height:f}=c;t({width:Math.round(u),height:Math.round(f)})};if(o(cd(n)),!i.ResizeObserver)return()=>{};const a=new i.ResizeObserver(c=>{const u=()=>{const f=c[0];if(f!=null&&f.borderBoxSize){const m=f.borderBoxSize[0];if(m){o({width:m.inlineSize,height:m.blockSize});return}}o(cd(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},qi={passive:!0},t_=typeof window>"u"?!0:"onscrollend"in window,n_=(e,t,n)=>{const i=e.scrollElement;if(!i)return;const o=e.targetWindow;if(!o)return;const a=e.options.useScrollendEvent&&t_;let c=0;const u=a?null:Jy(o,()=>t(c,!1),e.options.isScrollingResetDelay),f=y=>()=>{c=n(i),u==null||u(),t(c,y)},m=f(!0),p=f(!1);return i.addEventListener("scroll",m,qi),a&&i.addEventListener("scrollend",p,qi),()=>{i.removeEventListener("scroll",m),a&&i.removeEventListener("scrollend",p),u==null||u.cancel()}},s_=(e,t)=>n_(e,t,n=>{const{horizontal:i,isRtl:o}=e.options;return i?n.scrollLeft*(o&&-1||1):n.scrollTop}),r_=(e,t,n)=>{if(n.options.useCachedMeasurements){const i=n.indexFromElement(e),o=n.options.getItemKey(i);return n.itemSizeCache.get(o)??n.options.estimateSize(i)}if(t!=null&&t.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const i=n.indexFromElement(e),o=n.options.getItemKey(i),a=n.itemSizeCache.get(o);if(a!==void 0)return a}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},i_=(e,{adjustments:t=0,behavior:n},i)=>{var o,a;(a=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})},o_=i_;class a_{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,i,o;return((o=(i=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:i.now)==null?void 0:o.call(i))??Date.now()},this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const c=()=>{const u=a.target,f=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);for(const[m,p]of this.elementsCache)if(p===u){this.elementsCache.delete(m);break}return}this.isIndexInRange(f)&&this.shouldMeasureDuringScroll(f)&&this.resizeItem(f,this.options.measureElement(u,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var a;return(a=i())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=i())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var i,o;const a={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Xy,rangeExtractor:Xf,onChange:()=>{},measureElement:r_,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const w in n){const I=n[w];I!==void 0&&(a[w]=I)}const c=this.options;let u=null,f=null,m=!1;if(c!==void 0&&c.enabled&&a.enabled&&a.anchorTo==="end"&&this.scrollElement!==null){const w=c.count,I=a.count,T=this.getMeasurements(),P=w>0?((i=T[0])==null?void 0:i.key)??c.getItemKey(0):null,U=w>0?((o=T[w-1])==null?void 0:o.key)??c.getItemKey(w-1):null;if(I!==w||w>0&&I>0&&(a.getItemKey(0)!==P||a.getItemKey(I-1)!==U)){m=!0;const l=w>0?this.getVirtualItemForOffset(this.getScrollOffset())??T[0]:null;l&&(u=[l.key,this.getScrollOffset()-l.start]);const R=a.followOnAppend===!0?"auto":a.followOnAppend||null;R&&I>w&&this.isAtEnd(c.scrollEndThreshold)&&(w===0||a.getItemKey(I-1)!==U)&&(f=R)}}this.options=a,m&&(this.pendingMin=0,this.itemSizeCacheVersion++);let p=!1,y=0;if(u&&this.scrollOffset!==null){const[w,I]=u,T=this.getMeasurements(),{count:P,getItemKey:U}=this.options;let N=0;for(;N<P&&U(N)!==w;)N++;if(N<P){const B=T[N];if(B){const l=Math.max(0,B.start+I);l!==this.scrollOffset&&(y=l-this.scrollOffset,this.scrollOffset=l,p=!0)}}}(p||f)&&(this.pendingScrollAnchor=[p?u[0]:null,p?u[1]:0,f,y])},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=fs(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}if(this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,c)=>{if(c&&this._intendedScrollOffset===null&&a===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(a-this._intendedScrollOffset)<1.5&&(a=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const u=this.getScrollOffset();this.scrollDirection=c?u===a?this.scrollDirection:u<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=c,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const a=this.scrollElement,c=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},u=()=>{this._iosTouching=!1,!(!ya()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};a.addEventListener("touchstart",c,qi),a.addEventListener("touchend",u,qi),this.unsubs.push(()=>{a.removeEventListener("touchstart",c),a.removeEventListener("touchend",u),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[a,c,u,f]=o;a!==null&&!u&&(ya()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?f!==0&&(this._iosDeferredAdjustment+=f):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),u&&this.scrollToEnd({behavior:u})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),i=this.getMaxScrollOffset();if(n<0||n>i)return;if(this._iosDeferredAdjustment<0&&n>=i-1){this._iosDeferredAdjustment=0;return}const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=fs(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,i,o,a,c,u,f,m)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMin=null,{count:n,paddingStart:i,scrollMargin:o,getItemKey:a,enabled:c,lanes:u,laneAssignmentMode:f,gap:m}),{key:!1}),this.isIndexInRange=n=>n>=0&&n<this.options.count,this.getMeasurements=fs(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:i,scrollMargin:o,getItemKey:a,enabled:c,lanes:u,laneAssignmentMode:f,gap:m},p)=>{const y=this.itemSizeCache;if(!c)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const N of this.laneAssignments.keys())N>=n&&this.laneAssignments.delete(N);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(N=>{this.itemSizeCache.set(N.key,N.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),u===1){const N=n*2;let B=this._flatMeasurements;if(!B||B.length<N){const q=new Float64Array(N);B&&w>0&&q.set(B.subarray(0,w*2)),B=q,this._flatMeasurements=B}let l;if(w===0)l=i+o;else{const q=w-1;l=B[q*2]+B[q*2+1]+m}for(let q=w;q<n;q++){const ee=a(q),re=y.get(ee),oe=typeof re=="number"?re:this.options.estimateSize(q);B[q*2]=l,B[q*2+1]=oe,l+=oe+m}const R=Qy(n,B,a);return this.measurementsCache=R,R}const I=this.measurementsCache.slice(0,w),T=new Array(u).fill(void 0),P=new Float64Array(u);let U=0;for(let N=0;N<w;N++){const B=I[N];B&&(T[B.lane]===void 0&&U++,T[B.lane]=N,P[B.lane]=B.end)}for(let N=w;N<n;N++){const B=a(N),l=this.laneAssignments.get(N);let R,q;const ee=f==="estimate"||y.has(B);if(l!==void 0&&this.options.lanes>1){R=l;const pe=T[R],_e=pe!==void 0?I[pe]:void 0;q=_e?_e.end+m:i+o}else if(U===u){let pe=0,_e=P[0],te=T[0];for(let we=1;we<u;we++){const Te=P[we];(Te<_e||Te===_e&&T[we]<te)&&(pe=we,_e=Te,te=T[we])}R=pe,q=_e+m,ee&&this.laneAssignments.set(N,R)}else R=N%this.options.lanes,q=i+o,ee&&this.laneAssignments.set(N,R);const re=y.get(B),oe=typeof re=="number"?re:this.options.estimateSize(N),ne=q+oe;I[N]={index:N,start:q,size:oe,end:ne,key:B,lane:R},T[R]===void 0&&U++,T[R]=N,P[R]=ne}return this.measurementsCache=I,I},{key:!1,debug:()=>this.options.debug}),this.calculateRange=fs(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,o,a)=>n.length===0||i===0?(this.range=null,null):(this.range=c_(n,i,o,a,a===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=fs(()=>{let n=null,i=null;const o=this.calculateRange();return o&&(n=o.startIndex,i=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,o,a,c)=>a===null||c===null?[]:n({startIndex:a,endIndex:c,overscan:i,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,o=n.getAttribute(i);return o?parseInt(o,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index);if(o!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),c=Math.max(0,o-a),u=Math.min(this.options.count-1,o+a);return n>=c&&n<=u}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((c,u)=>{c.isConnected||(this.observer.unobserve(c),this.elementsCache.delete(u))});return}const i=this.indexFromElement(n);if(!this.isIndexInRange(i))return;const o=this.options.getItemKey(i),a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,i)=>{var o,a;if(!this.isIndexInRange(n))return;let c,u,f;const m=this._flatMeasurements;if(this.options.lanes===1&&m!==null)f=this.options.getItemKey(n),u=m[n*2],c=m[n*2+1];else{const w=this.measurementsCache[n];if(!w)return;f=w.key,u=w.start,c=w.size}const p=this.itemSizeCache.get(f)??c,y=i-p;if(y!==0){const w=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,I=w?this.getTotalSize():0,T=this.getScrollOffset()+this.scrollAdjustments,U=!this.itemSizeCache.has(f)?u<T:u+p<=T&&this.scrollDirection!=="backward",N=((a=this.scrollState)==null?void 0:a.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:f,start:u,size:c,end:u+c,lane:0},y,this):U);(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(f,i),this.itemSizeCacheVersion++;let B=!1;w?B=this.applyScrollAdjustment(this.getTotalSize()-I):N&&(B=this.applyScrollAdjustment(y)),this.notify(B)}},this.getVirtualItems=fs(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const o=[];for(let a=0,c=n.length;a<c;a++){const u=n[a],f=i[u];o.push(f)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length===0)return;const o=this._flatMeasurements,a=this.options.lanes===1&&o!=null,c=eg(0,i.length-1,a?u=>o[u*2]:u=>ld(i[u]).start,n);return ld(i[c])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,i,o=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),c=this.getScrollOffset();i==="auto"&&(i=n>=c+a?"end":"start"),i==="center"?n+=(o-a)/2:i==="end"&&(n-=a);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),a=this.getScrollOffset(),c=this.measurementsCache[n];if(!c)return;if(i==="auto")if(c.end>=a+o-this.options.scrollPaddingEnd)i="end";else if(c.start<=a+this.options.scrollPaddingStart)i="start";else return[a,i];if(i==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),i];const u=i==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,i,c.size),i]},this.scrollToOffset=(n,{align:i="start",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0;const a=this.getOffsetForAlignment(n,i),c=this.now();this.scrollState={index:null,align:i,behavior:o,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:i="auto",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0,n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,i);if(!a)return;const[c,u]=a,f=this.now();this.scrollState={index:n,align:u,behavior:o,startedAt:f,lastTargetOffset:c,stableFrames:0},this._scrollToOffset(c,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:i="auto"}={})=>{const o=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let o;if(i.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const a=i.length-1,c=this._flatMeasurements;c!=null?o=c[a*2]+c[a*2+1]:o=((n=i[a])==null?void 0:n.end)??0}else{const a=Array(this.options.lanes).fill(null);let c=i.length-1;for(;c>=0&&a.some(u=>u===null);){const u=i[c];a[u.lane]===null&&(a[u.lane]=u.end),c--}o=Math.max(...a.filter(u=>u!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const i=this.getMeasurements();for(const o of i)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:i,behavior:o})=>{this._intendedScrollOffset=n+(i??0),this.options.scrollToFn(n,{behavior:o,adjustments:i},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){return t===0?!1:ya()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=t,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=i?i[0]:this.scrollState.lastTargetOffset,a=1,c=o!==this.scrollState.lastTargetOffset;if(!c&&Yy(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,c){const u=this.getSize()||600,f=Math.abs(o-this.getScrollOffset()),m=this.scrollState.behavior==="smooth"&&f>u;this.scrollState.lastTargetOffset=o,m||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:m?"smooth":"auto"})}this.scheduleScrollReconcile()}}const eg=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,a=n(o);if(a<i)e=o+1;else if(a>i)t=o-1;else return o}return e>0?e-1:0};function l_(e,t,n){let i=0;for(;i<=t;){const o=(i+t)/2|0,a=e[o*2];if(a<n)i=o+1;else if(a>n)t=o-1;else return o}return i>0?i-1:0}function c_(e,t,n,i,o){const a=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:a};if(i===1&&o!==null){const m=l_(o,a,n);let p=m;const y=n+t;for(;p<a&&o[p*2]+o[p*2+1]<y;)p++;return{startIndex:m,endIndex:p}}let u=eg(0,a,m=>e[m].start,n),f=u;if(i===1)for(;f<a&&e[f].end<n+t;)f++;else if(i>1){const m=Array(i).fill(0);for(;f<a&&m.some(y=>y<n+t);){const y=e[f];m[y.lane]=y.end,f++}const p=Array(i).fill(n+t);for(;u>=0&&p.some(y=>y>=n);){const y=e[u];p[y.lane]=y.start,u--}u=Math.max(0,u-u%i),f=Math.min(a,f+(i-1-f%i))}return{startIndex:u,endIndex:f}}function u_(e){const t=new a_(yr(e)),n=Xm(t),i=t._didMount();return ot(()=>yr(e).getScrollElement(),o=>{o&&t._willUpdate()},{immediate:!0}),ot(()=>yr(e),o=>{t.setOptions({...o,onChange:(a,c)=>{var u;gu(n),(u=o.onChange)==null||u.call(o,a,c)}}),t._willUpdate(),gu(n)},{immediate:!0}),Nm(i),n}function d_(e){return u_(ye(()=>({observeElementRect:e_,observeElementOffset:s_,scrollToFn:o_,...yr(e)})))}function f_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tg(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],i=typeof n;(i==="object"||i==="function")&&!Object.isFrozen(n)&&tg(n)}),e}class ud{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function ng(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Rn(e,...t){const n=Object.create(null);for(const i in e)n[i]=e[i];return t.forEach(function(i){for(const o in i)n[o]=i[o]}),n}const g_="</span>",dd=e=>!!e.scope,h_=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((i,o)=>`${i}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`};class p_{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=ng(t)}openNode(t){if(!dd(t))return;const n=h_(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){dd(t)&&(this.buffer+=g_)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const fd=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Al{constructor(){this.rootNode=fd(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=fd({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(i=>this._walk(t,i)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Al._collapse(n)}))}}class m_ extends Al{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const i=t.root;n&&(i.scope=`language:${n}`),this.add(i)}toHTML(){return new p_(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Nr(e){return e?typeof e=="string"?e:e.source:null}function sg(e){return ns("(?=",e,")")}function b_(e){return ns("(?:",e,")*")}function k_(e){return ns("(?:",e,")?")}function ns(...e){return e.map(n=>Nr(n)).join("")}function y_(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Cl(...e){return"("+(y_(e).capture?"":"?:")+e.map(i=>Nr(i)).join("|")+")"}function rg(e){return new RegExp(e.toString()+"|").exec("").length-1}function __(e,t){const n=e&&e.exec(t);return n&&n.index===0}const v_=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Il(e,{joinWith:t}){let n=0;return e.map(i=>{n+=1;const o=n;let a=Nr(i),c="";for(;a.length>0;){const u=v_.exec(a);if(!u){c+=a;break}c+=a.substring(0,u.index),a=a.substring(u.index+u[0].length),u[0][0]==="\\"&&u[1]?c+="\\"+String(Number(u[1])+o):(c+=u[0],u[0]==="("&&n++)}return c}).map(i=>`(${i})`).join(t)}const w_=/\b\B/,ig="[a-zA-Z]\\w*",Ml="[a-zA-Z_]\\w*",og="\\b\\d+(\\.\\d+)?",ag="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",lg="\\b(0b[01]+)",x_="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",S_=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ns(t,/.*\b/,e.binary,/\b.*/)),Rn({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},Lr={begin:"\\\\[\\s\\S]",relevance:0},E_={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Lr]},T_={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Lr]},A_={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},mo=function(e,t,n={}){const i=Rn({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=Cl("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:ns(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},C_=mo("//","$"),I_=mo("/\\*","\\*/"),M_=mo("#","$"),R_={scope:"number",begin:og,relevance:0},N_={scope:"number",begin:ag,relevance:0},L_={scope:"number",begin:lg,relevance:0},O_={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Lr,{begin:/\[/,end:/\]/,relevance:0,contains:[Lr]}]},D_={scope:"title",begin:ig,relevance:0},P_={scope:"title",begin:Ml,relevance:0},$_={begin:"\\.\\s*"+Ml,relevance:0},B_=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Si=Object.freeze({__proto__:null,APOS_STRING_MODE:E_,BACKSLASH_ESCAPE:Lr,BINARY_NUMBER_MODE:L_,BINARY_NUMBER_RE:lg,COMMENT:mo,C_BLOCK_COMMENT_MODE:I_,C_LINE_COMMENT_MODE:C_,C_NUMBER_MODE:N_,C_NUMBER_RE:ag,END_SAME_AS_BEGIN:B_,HASH_COMMENT_MODE:M_,IDENT_RE:ig,MATCH_NOTHING_RE:w_,METHOD_GUARD:$_,NUMBER_MODE:R_,NUMBER_RE:og,PHRASAL_WORDS_MODE:A_,QUOTE_STRING_MODE:T_,REGEXP_MODE:O_,RE_STARTERS_RE:x_,SHEBANG:S_,TITLE_MODE:D_,UNDERSCORE_IDENT_RE:Ml,UNDERSCORE_TITLE_MODE:P_});function U_(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function F_(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function z_(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=U_,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function H_(e,t){Array.isArray(e.illegal)&&(e.illegal=Cl(...e.illegal))}function j_(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function W_(e,t){e.relevance===void 0&&(e.relevance=1)}const K_=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=ns(n.beforeMatch,sg(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},V_=["of","and","for","in","not","or","if","then","parent","list","value"],G_="keyword";function cg(e,t,n=G_){const i=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(a){Object.assign(i,cg(e[a],t,a))}),i;function o(a,c){t&&(c=c.map(u=>u.toLowerCase())),c.forEach(function(u){const f=u.split("|");i[f[0]]=[a,q_(f[0],f[1])]})}}function q_(e,t){return t?Number(t):Z_(e)?0:1}function Z_(e){return V_.includes(e.toLowerCase())}const gd={},Jn=e=>{console.error(e)},hd=(e,...t)=>{console.log(`WARN: ${e}`,...t)},gs=(e,t)=>{gd[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),gd[`${e}/${t}`]=!0)},Zi=new Error;function ug(e,t,{key:n}){let i=0;const o=e[n],a={},c={};for(let u=1;u<=t.length;u++)c[u+i]=o[u],a[u+i]=!0,i+=rg(t[u-1]);e[n]=c,e[n]._emit=a,e[n]._multi=!0}function Q_(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Jn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Zi;if(typeof e.beginScope!="object"||e.beginScope===null)throw Jn("beginScope must be object"),Zi;ug(e,e.begin,{key:"beginScope"}),e.begin=Il(e.begin,{joinWith:""})}}function Y_(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Jn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Zi;if(typeof e.endScope!="object"||e.endScope===null)throw Jn("endScope must be object"),Zi;ug(e,e.end,{key:"endScope"}),e.end=Il(e.end,{joinWith:""})}}function J_(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function X_(e){J_(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Q_(e),Y_(e)}function ev(e){function t(c,u){return new RegExp(Nr(c),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(u?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(u,f){f.position=this.position++,this.matchIndexes[this.matchAt]=f,this.regexes.push([f,u]),this.matchAt+=rg(u)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const u=this.regexes.map(f=>f[1]);this.matcherRe=t(Il(u,{joinWith:"|"}),!0),this.lastIndex=0}exec(u){this.matcherRe.lastIndex=this.lastIndex;const f=this.matcherRe.exec(u);if(!f)return null;const m=f.findIndex((y,w)=>w>0&&y!==void 0),p=this.matchIndexes[m];return f.splice(0,m),Object.assign(f,p)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(u){if(this.multiRegexes[u])return this.multiRegexes[u];const f=new n;return this.rules.slice(u).forEach(([m,p])=>f.addRule(m,p)),f.compile(),this.multiRegexes[u]=f,f}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(u,f){this.rules.push([u,f]),f.type==="begin"&&this.count++}exec(u){const f=this.getMatcher(this.regexIndex);f.lastIndex=this.lastIndex;let m=f.exec(u);if(this.resumingScanAtSamePosition()&&!(m&&m.index===this.lastIndex)){const p=this.getMatcher(0);p.lastIndex=this.lastIndex+1,m=p.exec(u)}return m&&(this.regexIndex+=m.position+1,this.regexIndex===this.count&&this.considerAll()),m}}function o(c){const u=new i;return c.contains.forEach(f=>u.addRule(f.begin,{rule:f,type:"begin"})),c.terminatorEnd&&u.addRule(c.terminatorEnd,{type:"end"}),c.illegal&&u.addRule(c.illegal,{type:"illegal"}),u}function a(c,u){const f=c;if(c.isCompiled)return f;[F_,j_,X_,K_].forEach(p=>p(c,u)),e.compilerExtensions.forEach(p=>p(c,u)),c.__beforeBegin=null,[z_,H_,W_].forEach(p=>p(c,u)),c.isCompiled=!0;let m=null;return typeof c.keywords=="object"&&c.keywords.$pattern&&(c.keywords=Object.assign({},c.keywords),m=c.keywords.$pattern,delete c.keywords.$pattern),m=m||/\w+/,c.keywords&&(c.keywords=cg(c.keywords,e.case_insensitive)),f.keywordPatternRe=t(m,!0),u&&(c.begin||(c.begin=/\B|\b/),f.beginRe=t(f.begin),!c.end&&!c.endsWithParent&&(c.end=/\B|\b/),c.end&&(f.endRe=t(f.end)),f.terminatorEnd=Nr(f.end)||"",c.endsWithParent&&u.terminatorEnd&&(f.terminatorEnd+=(c.end?"|":"")+u.terminatorEnd)),c.illegal&&(f.illegalRe=t(c.illegal)),c.contains||(c.contains=[]),c.contains=[].concat(...c.contains.map(function(p){return tv(p==="self"?c:p)})),c.contains.forEach(function(p){a(p,f)}),c.starts&&a(c.starts,u),f.matcher=o(f),f}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Rn(e.classNameAliases||{}),a(e)}function dg(e){return e?e.endsWithParent||dg(e.starts):!1}function tv(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Rn(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:dg(e)?Rn(e,{starts:e.starts?Rn(e.starts):null}):Object.isFrozen(e)?Rn(e):e}var nv="11.11.1";class sv extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const _a=ng,pd=Rn,md=Symbol("nomatch"),rv=7,fg=function(e){const t=Object.create(null),n=Object.create(null),i=[];let o=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let u={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:m_};function f(O){return u.noHighlightRe.test(O)}function m(O){let Q=O.className+" ";Q+=O.parentNode?O.parentNode.className:"";const Z=u.languageDetectRe.exec(Q);if(Z){const fe=oe(Z[1]);return fe||(hd(a.replace("{}",Z[1])),hd("Falling back to no-highlight mode for this block.",O)),fe?Z[1]:"no-highlight"}return Q.split(/\s+/).find(fe=>f(fe)||oe(fe))}function p(O,Q,Z){let fe="",xe="";typeof Q=="object"?(fe=O,Z=Q.ignoreIllegals,xe=Q.language):(gs("10.7.0","highlight(lang, code, ...args) has been deprecated."),gs("10.7.0",`Please use highlight(code, options) instead.
81
+ https://github.com/highlightjs/highlight.js/issues/2277`),xe=O,fe=Q),Z===void 0&&(Z=!0);const Ie={code:fe,language:xe};Te("before:highlight",Ie);const ve=Ie.result?Ie.result:y(Ie.language,Ie.code,Z);return ve.code=Ie.code,Te("after:highlight",ve),ve}function y(O,Q,Z,fe){const xe=Object.create(null);function Ie(j,J){return j.keywords[J]}function ve(){if(!$.keywords){H.addText(D);return}let j=0;$.keywordPatternRe.lastIndex=0;let J=$.keywordPatternRe.exec(D),se="";for(;J;){se+=D.substring(j,J.index);const he=F.case_insensitive?J[0].toLowerCase():J[0],Ce=Ie($,he);if(Ce){const[ze,st]=Ce;if(H.addText(se),se="",xe[he]=(xe[he]||0)+1,xe[he]<=rv&&(ae+=st),ze.startsWith("_"))se+=J[0];else{const jt=F.classNameAliases[ze]||ze;Be(J[0],jt)}}else se+=J[0];j=$.keywordPatternRe.lastIndex,J=$.keywordPatternRe.exec(D)}se+=D.substring(j),H.addText(se)}function rt(){if(D==="")return;let j=null;if(typeof $.subLanguage=="string"){if(!t[$.subLanguage]){H.addText(D);return}j=y($.subLanguage,D,!0,Y[$.subLanguage]),Y[$.subLanguage]=j._top}else j=I(D,$.subLanguage.length?$.subLanguage:null);$.relevance>0&&(ae+=j.relevance),H.__addSublanguage(j._emitter,j.language)}function Ye(){$.subLanguage!=null?rt():ve(),D=""}function Be(j,J){j!==""&&(H.startScope(J),H.addText(j),H.endScope())}function dt(j,J){let se=1;const he=J.length-1;for(;se<=he;){if(!j._emit[se]){se++;continue}const Ce=F.classNameAliases[j[se]]||j[se],ze=J[se];Ce?Be(ze,Ce):(D=ze,ve(),D=""),se++}}function _t(j,J){return j.scope&&typeof j.scope=="string"&&H.openNode(F.classNameAliases[j.scope]||j.scope),j.beginScope&&(j.beginScope._wrap?(Be(D,F.classNameAliases[j.beginScope._wrap]||j.beginScope._wrap),D=""):j.beginScope._multi&&(dt(j.beginScope,J),D="")),$=Object.create(j,{parent:{value:$}}),$}function At(j,J,se){let he=__(j.endRe,se);if(he){if(j["on:end"]){const Ce=new ud(j);j["on:end"](J,Ce),Ce.isMatchIgnored&&(he=!1)}if(he){for(;j.endsParent&&j.parent;)j=j.parent;return j}}if(j.endsWithParent)return At(j.parent,J,se)}function vn(j){return $.matcher.regexIndex===0?(D+=j[0],1):(ge=!0,0)}function Nt(j){const J=j[0],se=j.rule,he=new ud(se),Ce=[se.__beforeBegin,se["on:begin"]];for(const ze of Ce)if(ze&&(ze(j,he),he.isMatchIgnored))return vn(J);return se.skip?D+=J:(se.excludeBegin&&(D+=J),Ye(),!se.returnBegin&&!se.excludeBegin&&(D=J)),_t(se,j),se.returnBegin?0:J.length}function ss(j){const J=j[0],se=Q.substring(j.index),he=At($,j,se);if(!he)return md;const Ce=$;$.endScope&&$.endScope._wrap?(Ye(),Be(J,$.endScope._wrap)):$.endScope&&$.endScope._multi?(Ye(),dt($.endScope,j)):Ce.skip?D+=J:(Ce.returnEnd||Ce.excludeEnd||(D+=J),Ye(),Ce.excludeEnd&&(D=J));do $.scope&&H.closeNode(),!$.skip&&!$.subLanguage&&(ae+=$.relevance),$=$.parent;while($!==he.parent);return he.starts&&_t(he.starts,j),Ce.returnEnd?0:J.length}function v(){const j=[];for(let J=$;J!==F;J=J.parent)J.scope&&j.unshift(J.scope);j.forEach(J=>H.openNode(J))}let E={};function L(j,J){const se=J&&J[0];if(D+=j,se==null)return Ye(),0;if(E.type==="begin"&&J.type==="end"&&E.index===J.index&&se===""){if(D+=Q.slice(J.index,J.index+1),!o){const he=new Error(`0 width match regex (${O})`);throw he.languageName=O,he.badRule=E.rule,he}return 1}if(E=J,J.type==="begin")return Nt(J);if(J.type==="illegal"&&!Z){const he=new Error('Illegal lexeme "'+se+'" for mode "'+($.scope||"<unnamed>")+'"');throw he.mode=$,he}else if(J.type==="end"){const he=ss(J);if(he!==md)return he}if(J.type==="illegal"&&se==="")return D+=`
82
+ `,1;if(ce>1e5&&ce>J.index*3)throw new Error("potential infinite loop, way more iterations than matches");return D+=se,se.length}const F=oe(O);if(!F)throw Jn(a.replace("{}",O)),new Error('Unknown language: "'+O+'"');const W=ev(F);let z="",$=fe||W;const Y={},H=new u.__emitter(u);v();let D="",ae=0,X=0,ce=0,ge=!1;try{if(F.__emitTokens)F.__emitTokens(Q,H);else{for($.matcher.considerAll();;){ce++,ge?ge=!1:$.matcher.considerAll(),$.matcher.lastIndex=X;const j=$.matcher.exec(Q);if(!j)break;const J=Q.substring(X,j.index),se=L(J,j);X=j.index+se}L(Q.substring(X))}return H.finalize(),z=H.toHTML(),{language:O,value:z,relevance:ae,illegal:!1,_emitter:H,_top:$}}catch(j){if(j.message&&j.message.includes("Illegal"))return{language:O,value:_a(Q),illegal:!0,relevance:0,_illegalBy:{message:j.message,index:X,context:Q.slice(X-100,X+100),mode:j.mode,resultSoFar:z},_emitter:H};if(o)return{language:O,value:_a(Q),illegal:!1,relevance:0,errorRaised:j,_emitter:H,_top:$};throw j}}function w(O){const Q={value:_a(O),illegal:!1,relevance:0,_top:c,_emitter:new u.__emitter(u)};return Q._emitter.addText(O),Q}function I(O,Q){Q=Q||u.languages||Object.keys(t);const Z=w(O),fe=Q.filter(oe).filter(pe).map(Ye=>y(Ye,O,!1));fe.unshift(Z);const xe=fe.sort((Ye,Be)=>{if(Ye.relevance!==Be.relevance)return Be.relevance-Ye.relevance;if(Ye.language&&Be.language){if(oe(Ye.language).supersetOf===Be.language)return 1;if(oe(Be.language).supersetOf===Ye.language)return-1}return 0}),[Ie,ve]=xe,rt=Ie;return rt.secondBest=ve,rt}function T(O,Q,Z){const fe=Q&&n[Q]||Z;O.classList.add("hljs"),O.classList.add(`language-${fe}`)}function P(O){let Q=null;const Z=m(O);if(f(Z))return;if(Te("before:highlightElement",{el:O,language:Z}),O.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",O);return}if(O.children.length>0&&(u.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(O)),u.throwUnescapedHTML))throw new sv("One of your code blocks includes unescaped HTML.",O.innerHTML);Q=O;const fe=Q.textContent,xe=Z?p(fe,{language:Z,ignoreIllegals:!0}):I(fe);O.innerHTML=xe.value,O.dataset.highlighted="yes",T(O,Z,xe.language),O.result={language:xe.language,re:xe.relevance,relevance:xe.relevance},xe.secondBest&&(O.secondBest={language:xe.secondBest.language,relevance:xe.secondBest.relevance}),Te("after:highlightElement",{el:O,result:xe,text:fe})}function U(O){u=pd(u,O)}const N=()=>{R(),gs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function B(){R(),gs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let l=!1;function R(){function O(){R()}if(document.readyState==="loading"){l||window.addEventListener("DOMContentLoaded",O,!1),l=!0;return}document.querySelectorAll(u.cssSelector).forEach(P)}function q(O,Q){let Z=null;try{Z=Q(e)}catch(fe){if(Jn("Language definition for '{}' could not be registered.".replace("{}",O)),o)Jn(fe);else throw fe;Z=c}Z.name||(Z.name=O),t[O]=Z,Z.rawDefinition=Q.bind(null,e),Z.aliases&&ne(Z.aliases,{languageName:O})}function ee(O){delete t[O];for(const Q of Object.keys(n))n[Q]===O&&delete n[Q]}function re(){return Object.keys(t)}function oe(O){return O=(O||"").toLowerCase(),t[O]||t[n[O]]}function ne(O,{languageName:Q}){typeof O=="string"&&(O=[O]),O.forEach(Z=>{n[Z.toLowerCase()]=Q})}function pe(O){const Q=oe(O);return Q&&!Q.disableAutodetect}function _e(O){O["before:highlightBlock"]&&!O["before:highlightElement"]&&(O["before:highlightElement"]=Q=>{O["before:highlightBlock"](Object.assign({block:Q.el},Q))}),O["after:highlightBlock"]&&!O["after:highlightElement"]&&(O["after:highlightElement"]=Q=>{O["after:highlightBlock"](Object.assign({block:Q.el},Q))})}function te(O){_e(O),i.push(O)}function we(O){const Q=i.indexOf(O);Q!==-1&&i.splice(Q,1)}function Te(O,Q){const Z=O;i.forEach(function(fe){fe[Z]&&fe[Z](Q)})}function He(O){return gs("10.7.0","highlightBlock will be removed entirely in v12.0"),gs("10.7.0","Please use highlightElement now."),P(O)}Object.assign(e,{highlight:p,highlightAuto:I,highlightAll:R,highlightElement:P,highlightBlock:He,configure:U,initHighlighting:N,initHighlightingOnLoad:B,registerLanguage:q,unregisterLanguage:ee,listLanguages:re,getLanguage:oe,registerAliases:ne,autoDetection:pe,inherit:pd,addPlugin:te,removePlugin:we}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=nv,e.regex={concat:ns,lookahead:sg,either:Cl,optional:k_,anyNumberOfTimes:b_};for(const O in Si)typeof Si[O]=="object"&&tg(Si[O]);return Object.assign(e,Si),e},As=fg({});As.newInstance=()=>fg({});var iv=As;As.HighlightJS=As;As.default=As;const je=f_(iv),bd="[A-Za-z$_][0-9A-Za-z$_]*",ov=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],av=["true","false","null","undefined","NaN","Infinity"],gg=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],hg=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],pg=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],lv=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],cv=[].concat(pg,gg,hg);function va(e){const t=e.regex,n=(Z,{after:fe})=>{const xe="</"+Z[0].slice(1);return Z.input.indexOf(xe,fe)!==-1},i=bd,o={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,fe)=>{const xe=Z[0].length+Z.index,Ie=Z.input[xe];if(Ie==="<"||Ie===","){fe.ignoreMatch();return}Ie===">"&&(n(Z,{after:xe})||fe.ignoreMatch());let ve;const rt=Z.input.substring(xe);if(ve=rt.match(/^\s*=/)){fe.ignoreMatch();return}if((ve=rt.match(/^\s+extends\s+/))&&ve.index===0){fe.ignoreMatch();return}}},u={$pattern:bd,keyword:ov,literal:av,built_in:cv,"variable.language":lv},f="[0-9](_?[0-9])*",m=`\\.(${f})`,p="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${p})((${m})|\\.)?|(${m}))[eE][+-]?(${f})\\b`},{begin:`\\b(${p})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},w={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},I={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"css"}},P={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"graphql"}},U={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,w]},B={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I,T,P,U,{match:/\$\d+/},y];w.contains=l.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(l)});const R=[].concat(B,w.contains),q=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(R)}]),ee={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:q},re={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},oe={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...gg,...hg]}},ne={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},pe={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[ee],illegal:/%/},_e={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(Z){return t.concat("(?!",Z.join("|"),")")}const we={match:t.concat(/\b/,te([...pg,"super","import"].map(Z=>`${Z}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Te={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},He={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},ee]},O="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Q={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(O)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[ee]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:q,CLASS_REFERENCE:oe},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ne,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I,T,P,U,B,{match:/\$\d+/},y,oe,{scope:"attr",match:i+t.lookahead(":"),relevance:0},Q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[B,e.REGEXP_MODE,{className:"function",begin:O,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:q}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},pe,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[ee,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},Te,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[ee]},we,_e,re,He,{match:/\$[(.]/}]}}const Qi="[A-Za-z$_][0-9A-Za-z$_]*",mg=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],bg=["true","false","null","undefined","NaN","Infinity"],kg=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],yg=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_g=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],vg=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],wg=[].concat(_g,kg,yg);function uv(e){const t=e.regex,n=(Z,{after:fe})=>{const xe="</"+Z[0].slice(1);return Z.input.indexOf(xe,fe)!==-1},i=Qi,o={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,fe)=>{const xe=Z[0].length+Z.index,Ie=Z.input[xe];if(Ie==="<"||Ie===","){fe.ignoreMatch();return}Ie===">"&&(n(Z,{after:xe})||fe.ignoreMatch());let ve;const rt=Z.input.substring(xe);if(ve=rt.match(/^\s*=/)){fe.ignoreMatch();return}if((ve=rt.match(/^\s+extends\s+/))&&ve.index===0){fe.ignoreMatch();return}}},u={$pattern:Qi,keyword:mg,literal:bg,built_in:wg,"variable.language":vg},f="[0-9](_?[0-9])*",m=`\\.(${f})`,p="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${p})((${m})|\\.)?|(${m}))[eE][+-]?(${f})\\b`},{begin:`\\b(${p})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},w={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},I={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"css"}},P={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"graphql"}},U={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,w]},B={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I,T,P,U,{match:/\$\d+/},y];w.contains=l.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(l)});const R=[].concat(B,w.contains),q=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(R)}]),ee={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:q},re={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},oe={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...kg,...yg]}},ne={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},pe={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[ee],illegal:/%/},_e={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(Z){return t.concat("(?!",Z.join("|"),")")}const we={match:t.concat(/\b/,te([..._g,"super","import"].map(Z=>`${Z}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Te={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},He={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},ee]},O="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Q={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(O)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[ee]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:q,CLASS_REFERENCE:oe},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ne,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I,T,P,U,B,{match:/\$\d+/},y,oe,{scope:"attr",match:i+t.lookahead(":"),relevance:0},Q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[B,e.REGEXP_MODE,{className:"function",begin:O,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:q}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},pe,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[ee,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},Te,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[ee]},we,_e,re,He,{match:/\$[(.]/}]}}function wa(e){const t=e.regex,n=uv(e),i=Qi,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},u={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Qi,keyword:mg.concat(f),literal:bg,built_in:wg.concat(o),"variable.language":vg},p={className:"meta",begin:"@"+i},y=(P,U,N)=>{const B=P.contains.findIndex(l=>l.label===U);if(B===-1)throw new Error("can not find mode to replace");P.contains.splice(B,1,N)};Object.assign(n.keywords,m),n.exports.PARAMS_CONTAINS.push(p);const w=n.contains.find(P=>P.scope==="attr"),I=Object.assign({},w,{match:t.concat(i,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,w,I]),n.contains=n.contains.concat([p,a,c,I]),y(n,"shebang",e.SHEBANG()),y(n,"use_strict",u);const T=n.contains.find(P=>P.label==="func.def");return T.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function kd(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},p={begin:/\{\{/,relevance:0},y={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,p,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,p,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,p,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,p,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},w="[0-9](_?[0-9])*",I=`(\\b(${w}))?\\.(${w})|\\b(${w})\\.`,T=`\\b|${i.join("|")}`,P={className:"number",relevance:0,variants:[{begin:`(\\b(${w})|(${I}))[eE][+-]?(${w})[jJ]?(?=${T})`},{begin:`(${I})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${T})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${T})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${T})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${T})`},{begin:`\\b(${w})[jJ](?=${T})`}]},U={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",f,P,y,e.HASH_COMMENT_MODE]}]};return m.contains=[y,P,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[f,P,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},y,U,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[N]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[P,N,y]}]}}function xa(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(u);const f={match:/\\"/},m={className:"string",begin:/'/,end:/'/},p={match:/\\'/},y={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},w=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],I=e.SHEBANG({binary:`(${w.join("|")})`,relevance:10}),T={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},P=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],U=["true","false"],N={match:/(\/[a-z._-]+)+/},B=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],l=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],R=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],q=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:P,literal:U,built_in:[...B,...l,"set","shopt",...R,...q]},contains:[I,e.SHEBANG(),T,y,a,c,N,u,f,m,p,n]}}function dv(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],o={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const fv=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),gv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],hv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],pv=[...gv,...hv],mv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),bv=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),kv=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),yv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function _v(e){const t=e.regex,n=fv(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",a=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",u=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,i,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+bv.join("|")+")"},{begin:":(:)?("+kv.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+yv.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...u,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...u,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:mv.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...u,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+pv.join("|")+")\\b"}]}}function Sa(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(a,{begin:/\(/,end:/\)/}),u=e.inherit(e.APOS_STRING_MODE,{className:"string"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,f,u,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,c,f,u]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function yd(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,f={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},p={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},y=e.inherit(m,{contains:[]}),w=e.inherit(p,{contains:[]});m.contains.push(w),p.contains.push(y);let I=[n,f];return[m,p,y,w].forEach(N=>{N.contains=N.contains.concat(I)}),I=I.concat(m,p),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:I},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:I}]}]},n,a,m,p,{className:"quote",begin:"^>\\s+",contains:I,end:"$"},o,i,f,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function _d(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},u=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),w={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},I={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},T={begin:/\{/,end:/\}/,contains:[I],illegal:"\\n",relevance:0},P={begin:"\\[",end:"\\]",contains:[I],illegal:"\\n",relevance:0},U=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},w,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},T,P,a,c],N=[...U];return N.pop(),N.push(u),I.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:U}}function vv(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}const wv=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},xv=["disabled","aria-label","aria-expanded"],Sv=["aria-label"],Ev=["disabled","aria-selected","onClick"],Tv={__name:"NeoSelect",props:{modelValue:{default:""},options:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:"请选择"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,i=t,o=We(null),a=We(null),c=We(!1),u=`neo-select-${Math.random().toString(36).slice(2,10)}`,f=ye(()=>n.options.map((l,R)=>l&&typeof l=="object"&&!Array.isArray(l)?{value:Object.prototype.hasOwnProperty.call(l,"value")?l.value:l.label,label:String(l.label??l.value??""),disabled:l.disabled===!0,key:String(l.key??l.value??R)}:{value:l,label:String(l??""),disabled:!1,key:`${String(l)}-${R}`})),m=ye(()=>f.value.find(l=>Object.is(l.value,n.modelValue))),p=ye(()=>{var l;return((l=m.value)==null?void 0:l.label)||"请选择"});function y(){c.value=!1}async function w(l=!1){var re,oe;if(n.disabled||c.value)return;c.value=!0,await pn();const R=[...((re=a.value)==null?void 0:re.querySelectorAll("button:not(:disabled)"))||[]],ee=((oe=a.value)==null?void 0:oe.querySelector('button[aria-selected="true"]'))||(l?R.at(-1):R[0]);ee==null||ee.focus()}function I(){c.value?y():w()}function T(l){l.disabled||(y(),Object.is(l.value,n.modelValue)||(i("update:modelValue",l.value),i("change",l.value)),pn(()=>{var R,q;return(q=(R=o.value)==null?void 0:R.querySelector(".neo-select-trigger"))==null?void 0:q.focus()}))}function P(l){(l.key==="ArrowDown"||l.key==="ArrowUp")&&(l.preventDefault(),w(l.key==="ArrowUp")),l.key==="Escape"&&c.value&&(l.preventDefault(),l.stopPropagation(),y())}function U(l,R){var oe,ne;const q=[...((oe=a.value)==null?void 0:oe.querySelectorAll("button:not(:disabled)"))||[]];if(!q.length)return;const ee=q.indexOf(document.activeElement),re=R==="start"?0:R==="end"?q.length-1:(ee+R+q.length)%q.length;l.preventDefault(),(ne=q[re])==null||ne.focus()}function N(l){l.key==="ArrowDown"?U(l,1):l.key==="ArrowUp"?U(l,-1):l.key==="Home"?U(l,"start"):l.key==="End"?U(l,"end"):l.key==="Escape"?(l.preventDefault(),l.stopPropagation(),y(),pn(()=>{var R,q;return(q=(R=o.value)==null?void 0:R.querySelector(".neo-select-trigger"))==null?void 0:q.focus()})):l.key==="Tab"&&y()}function B(l){var R;c.value&&!((R=o.value)!=null&&R.contains(l.target))&&y()}return Pr(()=>document.addEventListener("pointerdown",B)),$r(()=>document.removeEventListener("pointerdown",B)),(l,R)=>(k(),_("span",{ref_key:"root",ref:o,class:de(["neo-select",{open:c.value,disabled:e.disabled}])},[d("button",{type:"button",class:"neo-select-trigger",disabled:e.disabled,"aria-label":e.ariaLabel,"aria-haspopup":"listbox","aria-expanded":c.value,"aria-controls":u,onClick:I,onKeydown:P},[d("span",null,A(p.value),1)],40,xv),c.value?(k(),_("span",{key:0,id:u,ref_key:"menu",ref:a,class:"neo-select-menu",role:"listbox","aria-label":e.ariaLabel,onKeydown:N},[(k(!0),_(ue,null,Ae(f.value,q=>(k(),_("button",{key:q.key,type:"button",role:"option",disabled:q.disabled,class:de({selected:Object.is(q.value,e.modelValue)}),"aria-selected":Object.is(q.value,e.modelValue),onClick:ee=>T(q)},A(q.label),11,Ev))),128))],40,Sv)):V("",!0)],2))}},Ei=wv(Tv,[["__scopeId","data-v-6927f03a"]]),Yi=1,Ya=2,Rl=3,Nl=4,Ll=5,Ol=6,Dl=7,Pl=8,Ji=9,Xi=10,Ja=11,Di=12,fr=13,gr=14,hr=15,pr=16,bs=17,Xa=18,xt=19,Sr=20,In=21,xg=22,Er=23,eo=24,Ms=25,Sg=26,el=27,Pi=28,$i=29,ln=30,Zt=31,Ti=101,vd=102,Eg=103,wd=104,Ea=105,xs=1,$l=2,Tg=4,Ag=8,Cg=16;function Av(e){switch(e){case xs:return"href";case $l:return"src";case Tg:return"class";case Ag:return"checked";case Cg:return"start"}}const Cv=e=>{switch(e){case 1:return Rl;case 2:return Nl;case 3:return Ll;case 4:return Ol;case 5:return Dl;default:return Pl}},Iv=Cv,xd=24;function Mv(e){const t=new Uint32Array(xd);return t[0]=Yi,{renderer:e,text:"",pending:"",tokens:t,len:0,token:Yi,fence_end:0,blockquote_idx:0,hr_char:"",hr_chars:0,fence_start:0,spaces:new Uint8Array(xd),indent:"",indent_len:0,table_state:0}}function Sd(e){e.pending.length>0&&nt(e,`
83
+ `)}function Le(e){e.text.length!==0&&(console.assert(e.len>0,"Never adding text to root"),e.renderer.add_text(e.renderer.data,e.text),e.text="")}function Qe(e){console.assert(e.len>0,"No nodes to end"),e.len-=1,e.token=e.tokens[e.len],e.renderer.end_token(e.renderer.data)}function De(e,t){(e.tokens[e.len]===eo||e.tokens[e.len]===Er)&&t!==Ms&&Qe(e),e.len+=1,e.tokens[e.len]=t,e.token=t,e.renderer.add_token(e.renderer.data,t)}function Rv(e,t,n){for(;n<=e.len;){if(e.tokens[n]===t)return n;n+=1}return-1}function Zn(e,t){for(e.fence_start=0;e.len>t;)Qe(e)}function Ai(e,t){let n=0;for(let i=0;i<=e.len&&(t-=e.spaces[i],!(t<0));i+=1)switch(e.tokens[i]){case Ji:case Xi:case Sr:case Ms:n=i;break}for(;e.len>n;)Qe(e);return t}function Ta(e,t){let n=-1,i=-1;for(let o=e.blockquote_idx+1;o<=e.len;o+=1)if(e.tokens[o]===Ms){if(e.indent_len<e.spaces[o]){i=-1;break}i=o}else e.tokens[o]===t&&(n=o);return i===-1?n===-1?(Zn(e,e.blockquote_idx),De(e,t),!0):(Zn(e,n),!1):(Zn(e,i),De(e,t),!0)}function Aa(e,t){De(e,Ms),e.spaces[e.len]=e.indent_len+t,cn(e),e.token=Eg}function cn(e){e.indent="",e.indent_len=0,e.pending=""}function tl(e){switch(e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return!0;default:return!1}}function Nv(e){switch(e){case 32:case 58:case 59:case 41:case 44:case 33:case 46:case 63:case 93:case 10:return!0;default:return!1}}function Lv(e){return tl(e)||Nv(e)}function nt(e,t){for(const n of t){if(e.token===Ti){switch(n){case" ":e.indent_len+=1;continue;case" ":e.indent_len+=4;continue}let o=Ai(e,e.indent_len);e.indent_len=0,e.token=e.tokens[e.len],o>0&&nt(e," ".repeat(o))}const i=e.pending+n;switch(e.token){case In:case Yi:case Sr:case eo:case Er:switch(console.assert(e.text.length===0,"Root should not have any text"),e.pending[0]){case void 0:e.pending=n;continue;case" ":console.assert(e.pending.length===1),e.pending=n,e.indent+=" ",e.indent_len+=1;continue;case" ":console.assert(e.pending.length===1),e.pending=n,e.indent+=" ",e.indent_len+=4;continue;case`
84
+ `:if(console.assert(e.pending.length===1),e.tokens[e.len]===Ms&&e.token===In){Qe(e),cn(e),e.pending=n;continue}Zn(e,e.blockquote_idx),cn(e),e.blockquote_idx=0,e.fence_start=0,e.pending=n;continue;case"#":switch(n){case"#":if(e.pending.length<6){e.pending=i;continue}break;case" ":Ai(e,e.indent_len),De(e,Iv(e.pending.length)),cn(e);continue}break;case">":{const a=Rv(e,Sr,e.blockquote_idx+1);a===-1?(Zn(e,e.blockquote_idx),e.blockquote_idx+=1,e.fence_start=0,De(e,Sr)):e.blockquote_idx=a,cn(e),e.pending=n;continue}case"-":case"*":case"_":if(e.hr_chars===0&&(console.assert(e.pending.length===1,"Pending should be one character"),e.hr_chars=1,e.hr_char=e.pending),e.hr_chars>0){switch(n){case e.hr_char:e.hr_chars+=1,e.pending=i;continue;case" ":e.pending=i;continue;case`
85
+ `:if(e.hr_chars<3)break;Ai(e,e.indent_len),e.renderer.add_token(e.renderer.data,xg),e.renderer.end_token(e.renderer.data),cn(e),e.hr_chars=0;continue}e.hr_chars=0}if(e.pending[0]!=="_"&&e.pending[1]===" "){Ta(e,Er),Aa(e,2),nt(e,i.slice(2));continue}break;case"`":if(e.pending.length<3){if(n==="`"){e.pending=i,e.fence_start=i.length;continue}e.fence_start=0;break}switch(n){case"`":e.pending.length===e.fence_start?(e.pending=i,e.fence_start=i.length):(De(e,Ya),cn(e),e.fence_start=0,nt(e,i));continue;case`
86
+ `:{Ai(e,e.indent_len),De(e,Xi),e.pending.length>e.fence_start&&e.renderer.set_attr(e.renderer.data,Tg,e.pending.slice(e.fence_start)),cn(e),e.token=Ti;continue}default:e.pending=i;continue}case"+":if(n!==" ")break;Ta(e,Er),Aa(e,2);continue;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":if(e.pending[e.pending.length-1]==="."){if(n!==" ")break;Ta(e,eo)&&e.pending!=="1."&&e.renderer.set_attr(e.renderer.data,Cg,e.pending.slice(0,-1)),Aa(e,e.pending.length+1);continue}else{const a=n.charCodeAt(0);if(a===46||tl(a)){e.pending=i;continue}}break;case"|":Zn(e,e.blockquote_idx),De(e,el),De(e,Pi),e.pending="",nt(e,n);continue}let o=i;if(e.token===In)e.token=e.tokens[e.len],e.renderer.add_token(e.renderer.data,In),e.renderer.end_token(e.renderer.data);else if(e.indent_len>=4){let a=0;for(;a<4;a+=1)if(e.indent[a]===" "){a=a+1;break}o=e.indent.slice(a)+i,De(e,Ji)}else De(e,Ya);cn(e),nt(e,o);continue;case el:if(e.table_state===1)switch(n){case"-":case" ":case"|":case":":e.pending=i;continue;case`
87
+ `:e.table_state=2,e.pending="";continue;default:Qe(e),e.table_state=0;break}else switch(e.pending){case"|":De(e,Pi),e.pending="",nt(e,n);continue;case`
88
+ `:Qe(e),e.pending="",e.table_state=0,nt(e,n);continue}break;case Pi:switch(e.pending){case"":break;case"|":De(e,$i),Qe(e),e.pending="",nt(e,n);continue;case`
89
+ `:Qe(e),e.table_state=Math.min(e.table_state+1,2),e.pending="",nt(e,n);continue;default:De(e,$i),nt(e,n);continue}break;case $i:if(e.pending==="|"){Le(e),Qe(e),e.pending="",nt(e,n);continue}break;case Ji:switch(i){case`
90
+ `:case`
91
+ `:case`
92
+ `:case`
93
+ `:case`
94
+ `:e.text+=`
95
+ `,e.pending="";continue;case`
96
+ `:case`
97
+ `:case`
98
+ `:case`
99
+ `:e.pending=i;continue;default:e.pending.length!==0?(Le(e),Qe(e),e.pending=n):e.text+=n;continue}case Xi:switch(n){case"`":e.pending=i;continue;case`
100
+ `:if(i.length===e.fence_start+e.fence_end+1){Le(e),Qe(e),e.pending="",e.fence_start=0,e.fence_end=0,e.token=Ti;continue}e.token=Ti;break;case" ":if(e.pending[0]===`
101
+ `){e.pending=i,e.fence_end+=1;continue}break}e.text+=e.pending,e.pending=n,e.fence_end=1;continue;case Ja:switch(n){case"`":i.length===e.fence_start+ +(e.pending[0]===" ")?(Le(e),Qe(e),e.pending="",e.fence_start=0):e.pending=i;continue;case`
102
+ `:e.text+=e.pending,e.pending="",e.token=In,e.blockquote_idx=0,Le(e);continue;case" ":e.text+=e.pending,e.pending=n;continue;default:e.text+=i,e.pending="";continue}case Eg:switch(e.pending.length){case 0:if(n!=="[")break;e.pending=i;continue;case 1:if(n!==" "&&n!=="x")break;e.pending=i;continue;case 2:if(n!=="]")break;e.pending=i;continue;case 3:if(n!==" ")break;e.renderer.add_token(e.renderer.data,Sg),e.pending[1]==="x"&&e.renderer.set_attr(e.renderer.data,Ag,""),e.renderer.end_token(e.renderer.data),e.pending=" ";continue}e.token=e.tokens[e.len],e.pending="",nt(e,i);continue;case gr:case hr:{let a="*",c=Di;if(e.token===hr&&(a="_",c=fr),a===e.pending){if(Le(e),a===n){Qe(e),e.pending="";continue}De(e,c),e.pending=n;continue}break}case Di:case fr:{let a="*",c=gr;switch(e.token===fr&&(a="_",c=hr),e.pending){case a:a===n?e.tokens[e.len-1]===c?e.pending=i:(Le(e),De(e,c),e.pending=""):(Le(e),Qe(e),e.pending=n);continue;case a+a:const u=e.token;Le(e),Qe(e),Qe(e),a!==n?(De(e,u),e.pending=n):e.pending="";continue}break}case pr:if(i==="~~"){Le(e),Qe(e),e.pending="";continue}break;case Ea:n===`
103
+ `?(Le(e),De(e,ln),e.pending=""):(e.token=e.tokens[e.len],e.pending[0]==="\\"?e.text+="[":e.text+="$$",e.pending="",nt(e,n));continue;case ln:if(i==="\\]"||i==="$$"){Le(e),Qe(e),e.pending="";continue}break;case Zt:if(i==="\\)"||e.pending[0]==="$"){Le(e),Qe(e),n===")"?e.pending="":e.pending=n;continue}break;case vd:i==="http://"||i==="https://"?(Le(e),De(e,Xa),e.pending=i,e.text=i):"http:/"[e.pending.length]===n||"https:/"[e.pending.length]===n?e.pending=i:(e.token=e.tokens[e.len],nt(e,n));continue;case bs:case xt:if(e.pending==="]"){Le(e),n==="("?e.pending=i:(Qe(e),e.pending=n);continue}if(e.pending[0]==="]"&&e.pending[1]==="("){if(n===")"){const a=e.token===bs?xs:$l,c=e.pending.slice(2);e.renderer.set_attr(e.renderer.data,a,c),Qe(e),e.pending=""}else e.pending+=n;continue}break;case Xa:n===" "||n===`
104
+ `||n==="\\"?(e.renderer.set_attr(e.renderer.data,xs,e.pending),Le(e),Qe(e),e.pending=n):(e.text+=n,e.pending=i);continue;case wd:if(i.startsWith("<br")){if(i.length===3||n===" "||n==="/"&&(i.length===4||e.pending[e.pending.length-1]===" ")){e.pending=i;continue}if(n===">"){Le(e),e.token=e.tokens[e.len],e.renderer.add_token(e.renderer.data,In),e.renderer.end_token(e.renderer.data),e.pending="";continue}}e.token=e.tokens[e.len],e.text+="<",e.pending=e.pending.slice(1),nt(e,n);continue}switch(e.pending[0]){case"\\":if(e.token===xt||e.token===ln||e.token===Zt)break;switch(n){case"(":Le(e),De(e,Zt),e.pending="";continue;case"[":e.token=Ea,e.pending=i;continue;case`
105
+ `:e.pending=n;continue;default:let o=n.charCodeAt(0);e.pending="",e.text+=tl(o)||o>=65&&o<=90||o>=97&&o<=122?i:n;continue}case`
106
+ `:switch(e.token){case xt:case ln:case Zt:break;case Rl:case Nl:case Ll:case Ol:case Dl:case Pl:Le(e),Zn(e,e.blockquote_idx),e.blockquote_idx=0,e.pending=n;continue;default:Le(e),e.pending=n,e.token=In,e.blockquote_idx=0;continue}break;case"<":if(e.token!==xt&&e.token!==ln&&e.token!==Zt){Le(e),e.pending=i,e.token=wd;continue}break;case"`":if(e.token===xt)break;n==="`"?(e.fence_start+=1,e.pending=i):(e.fence_start+=1,Le(e),De(e,Ja),e.text=n===" "||n===`
107
+ `?"":n,e.pending="");continue;case"_":case"*":{if(e.token===xt||e.token===ln||e.token===Zt||e.token===gr)break;let o=Di,a=gr;const c=e.pending[0];if(c==="_"&&(o=fr,a=hr),e.pending.length===1){if(c===n){e.pending=i;continue}if(n!==" "&&n!==`
108
+ `){Le(e),De(e,o),e.pending=n;continue}}else{if(c===n){Le(e),De(e,a),De(e,o),e.pending="";continue}if(n!==" "&&n!==`
109
+ `){Le(e),De(e,a),e.pending=n;continue}}break}case"~":if(e.token!==xt&&e.token!==pr){if(e.pending==="~"){if(n==="~"){e.pending=i;continue}}else if(n!==" "&&n!==`
110
+ `){Le(e),De(e,pr),e.pending=n;continue}}break;case"$":if(e.token!==xt&&e.token!==pr&&e.pending==="$")if(n==="$"){e.token=Ea,e.pending=i;continue}else{if(Lv(n.charCodeAt(0)))break;Le(e),De(e,Zt),e.pending=n;continue}break;case"[":if(e.token!==xt&&e.token!==bs&&e.token!==ln&&e.token!==Zt&&n!=="]"){Le(e),De(e,bs),e.pending=n;continue}break;case"!":if(e.token!==xt&&n==="["){Le(e),De(e,xt),e.pending="";continue}break;case" ":if(e.pending.length===1&&n===" ")continue;break}if(e.token!==xt&&e.token!==bs&&e.token!==ln&&e.token!==Zt&&n==="h"&&(e.pending===" "||e.pending==="")){e.text+=e.pending,e.pending=n,e.token=vd;continue}e.text+=e.pending,e.pending=n}Le(e)}function Ov(e){return{add_token:Dv,end_token:Pv,add_text:$v,set_attr:Ig,data:{nodes:[e,,,,,],index:0}}}function Dv(e,t){var o;let n=e.nodes[e.index],i;switch(t){case Yi:return;case Sr:i=document.createElement("blockquote");break;case Ya:i=document.createElement("p");break;case In:i=document.createElement("br");break;case xg:i=document.createElement("hr");break;case Rl:i=document.createElement("h1");break;case Nl:i=document.createElement("h2");break;case Ll:i=document.createElement("h3");break;case Ol:i=document.createElement("h4");break;case Dl:i=document.createElement("h5");break;case Pl:i=document.createElement("h6");break;case Di:case fr:i=document.createElement("em");break;case gr:case hr:i=document.createElement("strong");break;case pr:i=document.createElement("s");break;case Ja:i=document.createElement("code");break;case Xa:case bs:i=document.createElement("a");break;case xt:i=document.createElement("img");break;case Er:i=document.createElement("ul");break;case eo:i=document.createElement("ol");break;case Ms:i=document.createElement("li");break;case Sg:let a=i=document.createElement("input");a.type="checkbox",a.disabled=!0;break;case Ji:case Xi:n=n.appendChild(document.createElement("pre")),i=document.createElement("code");break;case el:i=document.createElement("table");break;case Pi:switch(n.children.length){case 0:n=n.appendChild(document.createElement("thead"));break;case 1:n=n.appendChild(document.createElement("tbody"));break;default:n=n.children[1]}i=document.createElement("tr");break;case $i:i=document.createElement(((o=n.parentElement)==null?void 0:o.tagName)==="THEAD"?"th":"td");break;case ln:i=document.createElement("equation-block");break;case Zt:i=document.createElement("equation-inline");break}e.nodes[++e.index]=n.appendChild(i)}function Pv(e){e.index-=1}function $v(e,t){e.nodes[e.index].appendChild(document.createTextNode(t))}function Ig(e,t,n){e.nodes[e.index].setAttribute(Av(t),n)}const Bv={__name:"StreamingMarkdown",props:{text:{type:String,default:""},exposedResources:{type:Array,default:()=>[]}},setup(e){const t=e,n=We(null);let i,o="",a="",c;function u(){c&&clearTimeout(c),c=void 0}function f(){u(),c=setTimeout(()=>{c=void 0,i!=null&&i.pending&&o&&T(`${o}
111
+ `,o)},80)}function m(P){const U=String(P||"").trim();return U?/^(?:https?:|mailto:|\/|#)/i.test(U)?!0:!/^[a-z][a-z\d+.-]*:/i.test(U):!1}function p(P){const U=String(P||"").trim();return t.exposedResources.find(N=>String((N==null?void 0:N.reference)||"").trim()===U)}function y(P){const U=Number(P);if(!Number.isFinite(U)||U<=0)return"";const N=["B","KB","MB","GB"];let B=U,l=0;for(;B>=1024&&l<N.length-1;)B/=1024,l+=1;return`${B>=10||l===0?Math.round(B):B.toFixed(1)}${N[l]}`}function w(P){return{...Ov(P),set_attr(N,B,l){const R=B===xs?p(l):void 0,q=(R==null?void 0:R.url)||l;if(!((B===xs||B===$l)&&!m(q))&&(Ig(N,B,q),B===xs)){const ee=N.nodes[N.index];if(R){if(ee.classList.add("inline-resource-link",`inline-resource-${R.kind||"link"}`),R.kind==="download"||R.downloadName){ee.setAttribute("download",R.downloadName||R.label||""),ee.setAttribute("title",`下载 ${R.label||R.downloadName||"资源"}`),ee.removeAttribute("target"),ee.removeAttribute("rel"),ee.dataset.resourceDownload="true",ee.dataset.resourceExpiresAt=String(Number(R.expiresAt)||0);const re=y(R.sizeBytes);re&&(ee.dataset.resourceSize=`(${re})`)}}else ee.setAttribute("target","_blank"),ee.setAttribute("rel","noreferrer noopener")}}}}function I(P){if(!i)return;const U=String(P||"");if(u(),!U.startsWith(o)||a!==o){T(U),f();return}const N=U.slice(o.length);o=U,a=U,N&&nt(i,N),f()}function T(P=t.text,U=P){const N=n.value;N&&(i&&Sd(i),N.replaceChildren(),i=Mv(w(N)),a=String(P||""),o=String(U||""),a&&nt(i,a))}return Pr(()=>{T(),f()}),ot(()=>t.text,I,{flush:"post"}),ot(()=>t.exposedResources,()=>T(),{deep:!0,flush:"post"}),$r(()=>{u(),i&&Sd(i),i=void 0}),(P,U)=>(k(),_("div",{ref_key:"root",ref:n,class:"streaming-markdown-content"},null,512))}},Uv=["onDblclick"],Fv=["aria-label","onClick"],zv=["title","onClick"],Hv=["aria-label","onClick"],jv=Object.assign({name:"CwdTreeNode"},{__name:"CwdTreeNode",props:{nodes:{type:Array,default:()=>[]},children:{type:Object,default:()=>({})},expanded:{type:Object,default:()=>({})},selectedPath:{type:String,default:""},level:{type:Number,default:0},allowDelete:{type:Boolean,default:!0}},emits:["toggle","select","delete"],setup(e,{emit:t}){const n=t;return(i,o)=>{const a=Mb("CwdTreeNode",!0);return k(!0),_(ue,null,Ae(e.nodes,c=>(k(),_("div",{key:c.path,class:"cwd-tree-branch"},[d("div",{class:de(["cwd-tree-row",{selected:e.selectedPath===c.path}]),style:St({"--cwd-tree-level":e.level}),onDblclick:u=>n("toggle",c)},[d("button",{type:"button",class:"cwd-tree-toggle","aria-label":e.expanded[c.path]?"收起":"展开",onClick:tt(u=>n("toggle",c),["stop"])},A(e.expanded[c.path]?"▾":"▸"),9,Fv),d("button",{type:"button",class:"cwd-tree-name",title:c.path,onClick:u=>n("select",c)},[o[3]||(o[3]=d("span",{"aria-hidden":"true"},"◇",-1)),d("strong",null,A(c.name),1)],8,zv),e.allowDelete?(k(),_("button",{key:0,type:"button",class:"cwd-tree-delete","aria-label":`删除 ${c.name}`,onClick:tt(u=>n("delete",c),["stop"])},"×",8,Hv)):V("",!0)],46,Uv),e.expanded[c.path]&&e.children[c.path]?(k(),pt(a,{key:0,nodes:e.children[c.path],children:e.children,expanded:e.expanded,"selected-path":e.selectedPath,level:e.level+1,onToggle:o[0]||(o[0]=u=>n("toggle",u)),onSelect:o[1]||(o[1]=u=>n("select",u)),onDelete:o[2]||(o[2]=u=>n("delete",u))},null,8,["nodes","children","expanded","selected-path","level"])):V("",!0)]))),128)}}}),Wv={class:"shell"},Kv={class:"sidebar"},Vv={class:"brand-row logo-only"},Gv=["aria-label","aria-pressed","title"],qv={class:"nav"},Zv=["title"],Qv={class:"session-entry-main"},Yv={key:0,"aria-hidden":"true"},Jv={class:"sidebar-card prompt-stack"},Xv={class:"prompt-stack-head"},e0={class:"prompt-list"},t0={key:0,class:"prompt-list-empty"},n0={key:1,class:"prompt-list-empty"},s0=["onDragstart","onDblclick"],r0={class:"prompt-card-body"},i0={class:"prompt-card-actions"},o0=["onClick"],a0=["onClick"],l0={class:"workspace"},c0={class:"topbar"},u0={class:"top-actions"},d0=["aria-label","aria-pressed","title"],f0={key:0,class:"content-grid chat-grid"},g0={class:"chat-panel"},h0={key:0,class:"runtime-context-bar"},p0={key:0,class:"runtime-context-bar-actions"},m0={key:2,class:"runtime-context-syncing"},b0={key:1,class:"runtime-context-bar project-context-bar"},k0={class:"runtime-context-bar-actions"},y0=["data-index"],_0={class:"tool-group-shell"},v0=["aria-expanded","onClick"],w0={class:"tool-group-label"},x0={class:"tool-group-label-name"},S0={key:0,class:"tool-group-label-count"},E0={key:1,class:"tool-group-label-separator"},T0={key:0,class:"tool-group-purposes"},A0={key:2,class:"tool-group-lines"},C0=["open"],I0={class:"reasoning-reveal"},M0={class:"reasoning-paper"},R0=["innerHTML"],N0={class:"compaction-context-actions"},L0={key:0},O0=["onClick"],D0={class:"tool-result-title-row"},P0={class:"tool-result-name"},$0={key:0,class:"tool-result-failure-mark","aria-label":"执行失败"},B0={class:"tool-result-detail-row"},U0={key:0,class:"tool-result-primary"},F0={key:1,class:"tool-group-shell"},z0=["aria-expanded","onClick"],H0={class:"tool-group-label"},j0={class:"tool-group-label-name"},W0={key:0,class:"tool-group-label-count"},K0={key:1,class:"tool-group-label-separator"},V0={key:0,class:"tool-group-purposes"},G0={key:2,class:"tool-result-primary"},q0={key:0},Z0={key:3,class:"tool-result-previews"},Q0={class:"tool-result-preview kind-list"},Y0={tabindex:"0"},J0={key:4,class:"tool-result-previews"},X0={class:"tool-result-preview kind-code"},ew={tabindex:"0"},tw={key:5,class:"tool-result-previews"},nw={key:0},sw={tabindex:"0"},rw={key:6,class:"tool-result-facts"},iw={key:3},ow={class:"message-head"},aw=["innerHTML"],lw={key:0,class:"message-body compaction-message-body"},cw={class:"compaction-context-actions"},uw={key:0},dw=["onClick"],fw={key:1,class:"message-body reasoning-body"},gw=["open"],hw={key:0,class:"reasoning-elapsed"},pw={class:"reasoning-reveal"},mw={class:"reasoning-paper"},bw=["innerHTML"],kw={key:2,class:"message-body"},yw={key:0,class:"message-head"},_w={key:0},vw={key:1,class:"elapsed-pill"},ww={key:1,class:"image2-result-shell"},xw=["innerHTML"],Sw={key:0,class:"message-image-attachments image2-output-images"},Ew=["data-preview-src","aria-label"],Tw=["src","alt"],Aw={key:1,class:"image-unavailable-placeholder",role:"status"},Cw={class:"image-card-actions"},Iw=["href","download"],Mw=["onClick"],Rw=["onClick"],Nw={class:"tool-result-title-row"},Lw={class:"tool-result-name"},Ow={key:0,class:"tool-result-failure-mark","aria-label":"执行失败"},Dw={class:"tool-result-detail-row"},Pw={key:0,class:"tool-result-primary"},$w={key:1,class:"tool-group-shell"},Bw=["aria-expanded","onClick"],Uw={class:"tool-group-label"},Fw={class:"tool-group-label-name"},zw={key:0,class:"tool-group-label-count"},Hw={key:1,class:"tool-group-label-separator"},jw={key:0,class:"tool-group-purposes"},Ww={key:2,class:"tool-result-primary"},Kw={key:0},Vw={key:3,class:"tool-result-previews"},Gw={class:"tool-result-preview kind-list"},qw={tabindex:"0"},Zw={key:4,class:"tool-result-previews"},Qw={class:"tool-result-preview kind-code"},Yw={tabindex:"0"},Jw={key:5,class:"tool-result-previews"},Xw={key:0},ex={tabindex:"0"},tx={key:6,class:"tool-result-facts"},nx={class:"plugin-resource-stack"},sx=["src","title"],rx=["innerHTML"],ix={key:1,class:"message-text markdown streaming-markdown"},ox=["innerHTML"],ax={key:0,class:"message-image-attachments"},lx=["data-preview-src","aria-label"],cx=["src","alt"],ux={key:1,class:"image-unavailable-placeholder",role:"status"},dx=["href","download"],fx={key:2,class:"message-loading",role:"status","aria-live":"polite"},gx={class:"message-loading-body"},hx={class:"message-loading-label"},px={key:0,class:"queued"},mx={key:0,class:"composer-app-prompt"},bx={key:1,class:"attachments file-attachments"},kx=["onClick"],yx={key:2,class:"attachments image-attachments"},_x=["src","alt"],vx=["onClick"],wx=["title"],xx={class:"mobile-session-options"},Sx={class:"mobile-session-options-body"},Ex={class:"mobile-session-actions"},Tx=["aria-pressed"],Ax={class:"mobile-runtime-info"},Cx={class:"mobile-runtime-grid"},Ix={key:1,class:"mobile-runtime-card"},Mx={key:2,class:"mobile-runtime-card"},Rx={class:"mobile-runtime-card"},Nx={class:"composer-footer"},Lx={class:"composer-metrics","aria-label":"运行状态指标"},Ox={class:"metric-chip model-chip"},Dx=["aria-pressed","title"],Px=["disabled"],$x=["type","disabled","aria-label"],Bx={class:"right-panel"},Ux={class:"background-task-section"},Fx={class:"background-task-head"},zx={key:0,class:"background-task-count"},Hx={key:0,class:"empty-mini"},jx=["title"],Wx={key:0,class:"background-task-more"},Kx={key:0,class:"quota-card"},Vx={class:"quota-card-head"},Gx={class:"quota-card-controls"},qx=["aria-valuenow"],Zx={class:"quota-card-foot"},Qx={class:"quota-card-update"},Yx={class:"quota-card memory-card"},Jx={class:"memory-card-head"},Xx={class:"memory-trend",viewBox:"0 0 260 44",preserveAspectRatio:"none",role:"img","aria-label":"最近一小时 RSS 趋势"},e1=["d"],t1=["cx","cy","r","onFocus"],n1={key:1,class:"memory-trend-empty"},s1={class:"memory-stats"},r1={class:"memory-card-foot"},i1={key:1,class:"content-grid single"},o1={class:"panel-page sessions-page"},a1={class:"session-toolbar"},l1={class:"session-search","aria-label":"搜索会话"},c1={class:"session-count"},u1={key:0,class:"empty-state"},d1={key:1,class:"empty-state"},f1={key:2,class:"empty-state"},g1={key:3,class:"session-list"},h1={class:"session-card-main"},p1={class:"session-card-title"},m1={key:0,class:"current-pill"},b1={key:1,class:"live-pill"},k1={class:"session-card-meta"},y1=["title"],_1=["datetime"],v1={class:"session-actions"},w1=["disabled","onClick"],x1=["disabled","onClick"],S1={key:4,class:"session-pagination","aria-label":"会话分页"},E1=["disabled"],T1=["aria-current","onClick"],A1=["disabled"],C1={key:2,class:"content-grid single"},I1={class:"panel-page prompt-page"},M1={class:"page-head"},R1={class:"page-head-actions"},N1={class:"prompt-workbench"},L1={class:"prompt-library-panel"},O1={class:"prompt-library-head"},D1={class:"prompt-library-list"},P1={key:0,class:"prompt-list-empty"},$1={key:1,class:"prompt-list-empty"},B1=["onClick","onDblclick","onDragstart","onDragover","onDrop"],U1={key:0},F1={class:"prompt-editor-panel"},z1={class:"prompt-editor-toolbar"},H1={class:"prompt-editor-current"},j1={class:"prompt-editor-toolbar-actions"},W1=["disabled"],K1=["disabled"],V1={class:"prompt-editor-grid"},G1={class:"prompt-editor-field"},q1={class:"prompt-editor-field prompt-editor-field-full"},Z1={class:"prompt-editor-field prompt-editor-field-full"},Q1={key:3,class:"content-grid single"},Y1={class:"panel-page settings-page"},J1={class:"page-head settings-page-head"},X1=["disabled"],eS={key:0,class:"empty-state"},tS={class:"settings-card"},nS={class:"settings-field-grid"},sS={class:"settings-field"},rS={key:0,class:"settings-required","aria-label":"必填"},iS=["onUpdate:modelValue","type","placeholder"],oS={class:"settings-card"},aS={class:"settings-field-grid"},lS={class:"settings-field"},cS={class:"settings-field"},uS={class:"settings-card settings-plugin-card"},dS={class:"settings-card-head"},fS=["disabled"],gS={class:"plugin-settings-list"},hS={class:"plugin-toggle"},pS=["onUpdate:modelValue","aria-label"],mS={class:"settings-card settings-plugin-card"},bS={class:"settings-card-head"},kS=["disabled"],yS={class:"plugin-settings-list"},_S={class:"plugin-toggle"},vS=["onUpdate:modelValue","disabled","aria-label"],wS={key:4,class:"content-grid single"},xS={class:"panel-page"},SS={class:"capability-grid"},ES={key:0,class:"toast"},TS=["title","onKeydown"],AS={class:"cwd-picker-modal",role:"dialog","aria-modal":"true","aria-label":"选择工作目录"},CS=["disabled"],IS=["disabled"],MS={class:"cwd-picker-shortcuts"},RS={class:"cwd-picker-browser"},NS={class:"cwd-picker-locations","aria-label":"常用位置"},LS=["title","onClick"],OS={"aria-hidden":"true"},DS={class:"cwd-picker-tree"},PS={key:0,class:"cwd-picker-empty"},$S={key:1,class:"cwd-picker-error"},BS={class:"cwd-picker-actions"},US=["disabled"],FS={class:"runtime-context-modal",role:"dialog","aria-modal":"true","aria-label":"项目上下文"},zS={class:"runtime-context-modal-head"},HS={key:0,class:"runtime-context-kicker"},jS=["aria-label"],WS={class:"runtime-context-modal-content"},KS={key:0,class:"runtime-context-index"},VS=["onClick"],GS={key:1,class:"project-context-document"},qS=["aria-label"],ZS={class:"confirm-dialog-content"},QS={class:"confirm-dialog-actions"},YS={class:"context-window-modal",role:"dialog","aria-modal":"true","aria-label":"调整上下文窗口"},JS={class:"context-window-input-wrap"},XS={key:0,class:"context-window-error",role:"alert"},eE={class:"context-window-actions"},tE=["disabled"],nE=["disabled"],sE=["aria-label"],rE={class:"image-preview-canvas"},iE=["src","alt"],oE={key:0,class:"image-preview-caption"},aE={class:"runtime-context-detail-modal compaction-detail-modal",role:"dialog","aria-modal":"true","aria-label":"压缩上下文详情"},lE={class:"runtime-context-detail-content compaction-detail-content"},cE={class:"compaction-detail-stats"},uE={class:"runtime-context-modal",role:"dialog","aria-modal":"true","aria-label":"运行上下文"},dE={class:"runtime-context-modal-head"},fE={class:"runtime-context-modal-content"},gE={key:0,class:"runtime-context-index"},hE=["onClick"],pE={key:1,class:"runtime-plugin-list"},mE={key:0,class:"runtime-context-empty"},bE={class:"runtime-tool-status"},kE=["disabled","onClick"],yE={key:2,class:"runtime-plugin-list"},_E={key:0,class:"runtime-context-empty"},vE=["aria-label"],wE={class:"runtime-context-modal-head"},xE={key:0,class:"runtime-context-kicker"},SE={class:"runtime-context-detail-content"},EE={key:0},TE={key:1},AE={class:"tool-result-modal background-task-modal",role:"dialog","aria-modal":"true","aria-label":"后台任务"},CE={class:"tool-result-modal-head"},IE={class:"tool-result-modal-title"},ME={class:"background-task-modal-count"},RE={key:0,class:"background-task-index","aria-label":"后台任务列表"},NE=["title","onClick"],LE={class:"background-task-detail"},OE={class:"background-task-detail-head"},DE={class:"background-task-detail-title"},PE={class:"background-task-meta"},$E={key:0},BE={key:1},UE={key:2},FE={key:3},zE={key:4},HE={key:5},jE={key:6},WE={key:7,class:"wide"},KE={key:8,class:"wide"},VE={key:0,class:"background-task-command-section"},GE={class:"background-task-command"},qE={key:1,class:"background-task-output-section"},ZE={class:"background-task-output-head"},QE={key:0,"aria-label":"实时更新"},YE={key:2,class:"background-task-output-section"},JE={class:"background-task-output-head"},XE={key:0,"aria-label":"实时更新"},eT={key:0,class:"background-task-activity"},tT={key:1,class:"background-task-activity"},nT=["aria-label"],sT={class:"tool-result-modal-head"},rT={class:"tool-result-modal-title"},iT={key:0},oT={class:"tool-result-modal-content"},aT=["innerHTML"],lT=2048,cT=18e5,Ca=.62,Ia=10,uT="System hint: if the user is asking you to draw, render, create, generate, or illustrate a new image, you must call the image2 tool with mode=generate instead of replying with text-only description. After the tool returns images, continue the response normally so the UI can display them in the conversation.",dT="System hint: the user attached an image. If this request involves image editing, modification, redraw, background replacement, style transfer, repair, object removal, or localized changes, you must call the image2 tool with mode=edit and use the attached or most recent image as the source image. Image operations may take a while, so wait up to 10 minutes by default unless the tool returns an error or the user interrupts.",fT="System hint from web UI: if your final answer produces, creates, modifies, exports, packages, or identifies local files that the user should receive, you must call the expose_downloads tool with all relevant absolute file paths before your final textual response. Do not paste absolute paths as the primary delivery method; expose them as browser downloads.",gT="<<ATTACHMENT_MANIFEST>>",hT="<</ATTACHMENT_MANIFEST>>",Ci="••••••••••••••••••",Ii="neoctl-web.tabId",hs="neoctl-web.sessionId",Ed="neoctl-web.theme",Ma="neoctl-web.clientRevision",Td="neoctl-web.clientReloadRequest",Ra="__neo_reload",pT=112,Ad=4e4,mT={__name:"App",setup(e){je.registerLanguage("javascript",va),je.registerLanguage("js",va),je.registerLanguage("jsx",va),je.registerLanguage("typescript",wa),je.registerLanguage("ts",wa),je.registerLanguage("tsx",wa),je.registerLanguage("python",kd),je.registerLanguage("py",kd),je.registerLanguage("bash",xa),je.registerLanguage("sh",xa),je.registerLanguage("shell",xa),je.registerLanguage("json",dv),je.registerLanguage("css",_v),je.registerLanguage("html",Sa),je.registerLanguage("xml",Sa),je.registerLanguage("vue",Sa),je.registerLanguage("markdown",yd),je.registerLanguage("md",yd),je.registerLanguage("yaml",_d),je.registerLanguage("yml",_d),je.registerLanguage("diff",vv);const t=[{value:"inherit",label:"跟随全局"},{value:"enabled",label:"启用"},{value:"disabled",label:"关闭"}],n={Assistant:"助手",You:"你",User:"你",System:"系统","Context compaction":"上下文压缩",Config:"配置",Reasoning:"思考","Runtime tool":"运行时工具",multi_tool_use:"并行执行工具",文件下载:"文件下载"},i={pending:"排队中",running:"运行中",completed:"已完成",failed:"失败",killed:"已停止",queued:"排队中",stopped:"已停止"},o={"API key":"API Key","Base URL":"Base URL",Model:"模型","Fallback model":"备用模型",Endpoint:"Endpoint","Reasoning effort":"推理强度","Reasoning summary":"推理摘要","Max output tokens":"最大输出 Token","Timeout ms":"请求超时(ms)","Stream idle timeout ms":"流式空闲超时(ms)","Max retries":"最大重试次数"},a={openai:"OpenAI"},c={INVALID_REQUEST:"请求参数无效",SESSION_ACTIVE:"当前会话不能删除,请先切换到其他会话",SESSION_RUNNING:"运行中的会话不能删除,请等待运行结束",SESSION_NOT_FOUND:"会话不存在或已被删除",SESSION_RESUME_FAILED:"打开会话失败",SESSION_CREATE_FAILED:"新建会话失败",SESSION_DELETE_FAILED:"删除会话失败",PLUGIN_UPDATE_BLOCKED:"模型回答期间不能修改会话插件",PLUGIN_NOT_CONFIGURED:"插件功能未配置",PLUGIN_INVALID:"插件配置无效",PLUGIN_UPDATE_FAILED:"插件配置更新失败",PLUGINS_LOCKED:"插件配置已由环境变量锁定",TOOL_UPDATE_BLOCKED:"模型回答期间不能修改会话工具",TOOL_NOT_CONFIGURED:"工具配置功能未启用",TOOL_INVALID:"工具配置无效",TOOL_UPDATE_FAILED:"工具配置更新失败",PROMPT_UPDATE_FAILED:"提示词更新失败",PROMPT_INVALID:"提示词内容无效",FAST_MODE_UPDATE_FAILED:"快速模式切换失败",CONTEXT_WINDOW_UPDATE_BLOCKED:"回答期间不能调整上下文窗口",CONTEXT_WINDOW_INVALID:"请输入大于 0 的整数",CONTEXT_WINDOW_UPDATE_FAILED:"上下文窗口调整失败",CWD_NOT_CONFIGURED:"当前运行时不支持工作目录切换",CWD_INVALID:"路径不存在或不可访问",CWD_UPDATE_BLOCKED:"模型回答期间不能切换工作目录",CWD_UPDATE_FAILED:"工作目录切换失败",CWD_CREATE_FAILED:"文件夹新建失败",CWD_DELETE_FAILED:"只能删除空文件夹,且不能删除当前目录或其上级目录",LOGIN_INVALID:"模型配置无效",LOGIN_SAVE_FAILED:"模型配置保存失败",API_NOT_FOUND:"当前运行时不支持此功能,请重启服务",WEB_REQUEST_FAILED:"请求处理失败"};let u=P(),f=sessionStorage.getItem(hs)||"",m=!f,p=!1;const y=[];function w(){return{id:"",title:"",content:"",usage:""}}function I(s){if(!s||typeof s!="object")return null;const r=String(s.title||"").trim(),g=String(s.content||"").trim();return!r||!g?null:{id:String(s.id||T()).trim(),title:r,content:g,usage:String(s.usage||"").trim()}}function T(){return`prompt-${Math.random().toString(36).slice(2,10)}`}function P(){let s=sessionStorage.getItem(Ii);return s||(s=U(),sessionStorage.setItem(Ii,s)),s}function U(){var g,h;if((g=globalThis.crypto)!=null&&g.randomUUID)return globalThis.crypto.randomUUID();const s=new Uint8Array(16);if((h=globalThis.crypto)!=null&&h.getRandomValues)globalThis.crypto.getRandomValues(s);else for(let b=0;b<s.length;b+=1)s[b]=Math.floor(Math.random()*256);s[6]=s[6]&15|64,s[8]=s[8]&63|128;const r=[...s].map(b=>b.toString(16).padStart(2,"0"));return`${r.slice(0,4).join("")}-${r.slice(4,6).join("")}-${r.slice(6,8).join("")}-${r.slice(8,10).join("")}-${r.slice(10).join("")}`}function N(s){const r=new URL(s,window.location.origin);return r.searchParams.set("tabId",u),f&&r.searchParams.set("sessionId",f),`${r.pathname}${r.search}${r.hash}`}function B(s,r=!1){const g=(s==null?void 0:s.sessionId)||"";!g||g===f||!r&&!m&&f||(f=g,m=!1,sessionStorage.setItem(hs,g))}const l=_s({connected:!1,connecting:!0,coreVersion:"",coreEasterEgg:!1,lines:[],status:{phase:"ready",streamedOutputTokens:0},appPrompt:{hasActivePrompt:!1,activePrompt:void 0},runtimeContext:void 0,runtimeContextLoading:!0,runtimeContextError:"",runtimeContextModal:"",runtimeContextDetail:void 0,projectContextOpen:!1,projectContextDocument:void 0,globalPlugins:{items:[],locked:!1,restartRequired:!0,loading:!1},sessionPlugins:{items:[],busy:!1,loading:!1},globalTools:{items:[],loading:!1},sessionTools:{items:[],busy:!1,loading:!1},fastMode:!1,fastModeMutating:!1,contextWindowModalOpen:!1,contextWindowDraft:"",contextWindowError:"",contextWindowSaving:!1,busy:!1,queuedInput:void 0,backgroundTaskCount:0,backgroundTasks:[],backgroundSessionRunCount:0,runningSessionIds:[],session:void 0,cwd:"",cwdPicker:{open:!1,cwd:"",parent:"",home:"",entries:[],locations:[],treeRoots:[],treeChildren:{},treeExpanded:{},selectedPath:"",selectionExplicit:!1,input:"",loading:!1,mutating:!1,error:""},sessionsLoading:!1,sessionResumeLoading:!1,pendingResumeSessionId:"",catalog:{commands:[],modelIds:[],reasoning:[]},interactive:{},sessions:[],login:void 0,cpaConfig:{url:"",password:"",hasPassword:!1,loaded:!1},cpaQuotas:[],cpaQuotaIndex:0,memory:{current:null,history:[],sampleMs:6e4,retentionMs:864e5},activePanel:"chat",toolDetailLineId:void 0,expandedToolGroups:{},compactionDetailLineId:void 0,backgroundTaskDetail:void 0,imagePreview:void 0,confirmDialog:{open:!1,title:"",message:"",confirmLabel:"确认",cancelLabel:"取消",tone:"warning"},promptLibrary:[],promptLibraryLoading:!0,promptManagerOpen:!1,selectedPromptId:"",composerDropActive:!1,composerDropMode:"prompt",attachments:[],attachmentCounter:0,uploadingFiles:!1,messageImagePreviews:[],liveToolStartedAt:{},clockTick:Date.now(),composerMetrics:{context:{display:0,target:0,bump:0,initialized:!1},inputTokens:{display:0,target:0,bump:0,initialized:!1},outputTokens:{display:0,target:0,bump:0,initialized:!1}},toast:""}),R=We(""),q=We(""),ee=We(1),re=We(Op()),oe=We(null),ne=We(null),pe=We(null),_e=We(null),te=We(null),we=We(null),Te=We(""),He=_s({}),O=_s(w()),Q=We(""),Z=We(""),fe=We(""),xe=We("before"),Ie=We(-1);let ve,rt,Ye=0,Be=0,dt=0,_t,At=!1,vn,Nt,ss,v=0,E=Promise.resolve(),L=0,F,W=!1,z,$;Gg();const Y=new Map,H=new Map,D=We(0),ae=ye(()=>[...l.lines||[]].reverse().find(s=>Oo(s))||null),X=ye(()=>{var s;return Vh((s=l.status)==null?void 0:s.phase)}),ce=ye(()=>{var s,r;if(ae.value)return wc(ae.value)?"整理图片结果":"图片生成中";if(((s=l.status)==null?void 0:s.phase)==="running_tools"){const g=(r=l.status)==null?void 0:r.currentTool;if(String((g==null?void 0:g.name)||"").toLowerCase()==="image2")return"图片生成中";if(g!=null&&g.name)return`调用 ${g.name}${g.kind?` · ${g.kind}`:""}`}return X.value}),ge=ye(()=>{var s;return hm((s=l.status)==null?void 0:s.phase)}),j=ye(()=>ge.value||l.busy||l.sessionResumeLoading),J=ye(()=>{if(l.sessionResumeLoading)return"正在加载会话";if(ae.value){const s=qs(ae.value),r=wc(ae.value)?"正在载入图片结果":"图片模型正在生成";return s?`${r} · 已用时 ${s}`:r}return`正在${ce.value}`}),se=s=>String(s||"").replace(/设计/g,"").trim(),he=s=>se(s==null?void 0:s.title)||"未命名会话",Ce=ye(()=>{var r;const s=se((r=l.session)==null?void 0:r.title);return s&&s!=="neo"?s:""}),ze=ye(()=>Ce.value||"未命名会话"),st=We(null),jt=We(null),rs=We(!1);let et;const vt=async()=>{await pn();const s=st.value,r=jt.value;rs.value=!!(s&&r&&r.scrollWidth>s.clientWidth+2)},Rs=ye(()=>l.cwd||"—"),Ns=ye(()=>{var s,r;return((r=(s=l.status)==null?void 0:s.metrics)==null?void 0:r.model)||"模型未配置"}),Bl=ye(()=>`${l.composerMetrics.context.display.toFixed(1)}%`),Mg=ye(()=>{var r,g;const s=Number((g=(r=l.status)==null?void 0:r.metrics)==null?void 0:g.contextWindowTokens);return Number.isFinite(s)&&s>0?String(Math.max(1,Math.round(s/1e3))):""}),Ul=ye(()=>rn(l.composerMetrics.inputTokens.display)),Fl=ye(()=>rn(l.composerMetrics.outputTokens.display)),Dn=ye(()=>ge.value||l.busy),Lt=ye(()=>l.backgroundTasks.length),is=ye(()=>l.backgroundTasks[0]),zl=ye(()=>!!(R.value.trim()||l.attachments.length)),Hl=ye(()=>Dn.value?zl.value?"打断并发送":l.queuedInput?"立即发送":"停止":"发送 ↵"),Ls=ye(()=>{const s=q.value.trim().toLocaleLowerCase(),r=l.sessions||[];return s?r.filter(g=>[he(g),g.title,g.sessionId,g.updatedAt,g.createdAt].some(h=>String(h||"").toLocaleLowerCase().includes(s))):r}),Fr=ye(()=>Math.max(1,Math.ceil(Ls.value.length/Ia))),Rg=ye(()=>{const s=(ee.value-1)*Ia;return Ls.value.slice(s,s+Ia)}),Ng=ye(()=>{const s=Fr.value,r=Math.max(1,Math.min(ee.value-2,s-4)),g=Math.min(s,r+4);return Array.from({length:g-r+1},(h,b)=>r+b)}),Pn=ye(()=>l.sessionResumeLoading?[]:Dh((l.lines||[]).filter(s=>!zh(s)))),zr=d_(ye(()=>({count:Pn.value.length,getScrollElement:()=>pe.value,estimateSize:lm,getItemKey:s=>am(Pn.value[s]),rangeExtractor:s=>{const r=new Set(Xf(s));return Pn.value.forEach((g,h)=>{(g==null?void 0:g.live)===!0&&r.add(h)}),[...r].sort((g,h)=>g-h)},overscan:8,scrollMargin:D.value,anchorTo:"end",followOnAppend:!0,scrollEndThreshold:96,useAnimationFrameWithResizeObserver:!0}))),Lg=ye(()=>zr.value.getVirtualItems().filter(s=>Pn.value[s.index])),Og=ye(()=>zr.value.getTotalSize()),jl=ye(()=>{var s,r;return Array.isArray((r=(s=l.runtimeContext)==null?void 0:s.prompt)==null?void 0:r.sections)?l.runtimeContext.prompt.sections:[]}),bo=ye(()=>{var s;return Array.isArray((s=l.runtimeContext)==null?void 0:s.tools)?l.runtimeContext.tools:[]}),Os=ye(()=>{var s,r;return Array.isArray((r=(s=l.runtimeContext)==null?void 0:s.project)==null?void 0:r.documents)?l.runtimeContext.project.documents:[]}),Dg=ye(()=>l.sessionPlugins.items.filter(s=>s.effectiveEnabled).length),Pg=ye(()=>l.sessionTools.items.filter(s=>s.effectiveEnabled).length),wn=ye(()=>l.lines.find(s=>String(s.id)===String(l.toolDetailLineId))||null),nn=ye(()=>l.lines.find(s=>String(s.id)===String(l.compactionDetailLineId))||null),$n=ye(()=>{var s;return((s=l.appPrompt)==null?void 0:s.activePrompt)||void 0}),$g=ye(()=>{var s,r;return((s=$n.value)==null?void 0:s.title)||((r=$n.value)==null?void 0:r.id)||""}),Hr=ye(()=>l.promptLibrary.find(s=>s.id===l.selectedPromptId)||l.promptLibrary[0]||null),jr=ye(()=>re.value==="dark"),Wr=ye(()=>jr.value?"切换到日间模式":"切换到夜间模式"),Ot=ye(()=>l.cpaQuotas.length?l.cpaQuotas[l.cpaQuotaIndex%l.cpaQuotas.length]||l.cpaQuotas[0]:null),Bn=ye(()=>{var s;return((s=l.memory)==null?void 0:s.current)||null}),Kr=ye(()=>{var S;const s=(((S=l.memory)==null?void 0:S.history)||[]).filter(C=>Number.isFinite(Number(C==null?void 0:C.rss))),r=s.map(C=>Number(C.rss));if(!r.length)return[];const g=Math.min(...r),h=Math.max(...r),b=Math.max(1,h-g);return r.map((C,K)=>({entry:s[K],x:r.length===1?130:K/(r.length-1)*260,y:r.length===1?22:40-(C-g)/b*36}))}),Wl=ye(()=>Kr.value.map((s,r)=>`${r?"L":"M"} ${s.x.toFixed(1)} ${s.y.toFixed(1)}`).join(" ")),Ds=ye(()=>Kr.value[Ie.value]||null);ot(re,Pp,{immediate:!0}),ot([Dn,jr],([s,r])=>{const h=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M32 4 50 32 32 60 14 32Z" fill="${s?r?"#bef264":"#a3e635":r?"#38bdf8":"#7dd3fc"}"/></svg>`,b=document.querySelector('link[rel="icon"]');b&&(b.href=`data:image/svg+xml,${encodeURIComponent(h)}`)},{immediate:!0}),ot(Ce,s=>{document.title=s||"对话工作台"},{immediate:!0}),ot(ze,vt,{immediate:!0}),ot(q,()=>{ee.value=1}),ot(Fr,s=>{ee.value>s&&(ee.value=s)}),ot(()=>{var s;return(s=l.backgroundTaskDetail)==null?void 0:s.output},async()=>{await pn();const s=te.value;s&&(s.scrollTop=s.scrollHeight)}),ot(()=>Pn.value.length,async()=>{await pn(),oa(),mi()}),ot(()=>l.activePanel,async s=>{s==="chat"&&(await pn(),oa(),mi())}),Pr(async()=>{typeof ResizeObserver<"u"&&($=new ResizeObserver(mi),oa()),mi(),await Promise.all([os(),Bg(),Vr(),ko(),Gr(),Kl(),xo(),ac()]),qr(),vn=setInterval(()=>{l.clockTick=Date.now()},1e3),Nt=setInterval(xo,6e4),ss=setInterval(ac,6e4),window.addEventListener("keydown",Uc),document.addEventListener("click",hc),document.addEventListener("click",pc),typeof ResizeObserver<"u"&&st.value&&(et=new ResizeObserver(vt),et.observe(st.value)),vt()}),$r(()=>{ve&&ve.close(),Ye&&cancelAnimationFrame(Ye),Be&&cancelAnimationFrame(Be),Zr(),_t=void 0,v&&cancelAnimationFrame(v),vn&&clearInterval(vn),Nt&&clearInterval(Nt),ss&&clearInterval(ss),z&&clearTimeout(z),et&&et.disconnect(),$&&$.disconnect(),document.body.classList.remove("tool-detail-open","image-preview-open","runtime-context-open","context-window-open","cwd-picker-lock"),F&&as(!1),window.removeEventListener("keydown",Uc),document.removeEventListener("click",hc),document.removeEventListener("click",pc)});async function os(s={}){try{const r=await fetch(N("/api/state"));if(!r.ok)throw new Error(`state ${r.status}`);return Jl(await r.json()),!0}catch(r){return s.silent||be(`运行时不可用:${r.message||r}`),!1}}async function Bg(){try{const s=await fetch(N("/api/client-info"),{cache:"no-store"});if(!s.ok)return;Vl(await s.json())}catch{}}async function Vr(){l.runtimeContextLoading=!0;try{const s=await fetch(N("/api/runtime-context")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`runtime-context ${s.status}`);return ql(r),!0}catch(s){return l.runtimeContextError=s.message||String(s),!1}finally{l.runtimeContextLoading=!1}}async function Ug(){l.globalTools.loading=!0;try{const s=await fetch(N("/api/tools")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`tools ${s.status}`);l.globalTools={items:Array.isArray(r.items)?r.items.map(g=>({...g})):[],loading:!1}}catch(s){l.globalTools.loading=!1,be(s.message||String(s))}}async function Fg(){const s=Object.fromEntries(l.globalTools.items.map(r=>[r.name,r.configuredEnabled!==!1]));l.globalTools.loading=!0;try{const r=await Ve("/api/tools/global",{overrides:s});l.globalTools={...r.state,loading:!1},await Promise.all([Gr(),Vr()]),be("全局工具配置已保存,将在下一轮生效")}catch(r){l.globalTools.loading=!1,wt(r,"工具配置保存失败")}}async function Gr(){l.sessionTools.loading=!0;try{const s=await fetch(N("/api/session-tools")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`session-tools ${s.status}`);l.sessionTools={...r,items:Array.isArray(r.items)?r.items:[],loading:!1}}catch(s){l.sessionTools.loading=!1,be(s.message||String(s))}}async function zg(s,r){const g=Object.fromEntries(l.sessionTools.items.map(h=>[h.name,h.name===s.name?r:h.mode]));l.sessionTools.busy=!0;try{const h=await Ve("/api/session-tools",{overrides:g});l.sessionTools={...h.state,loading:!1,busy:!1},be("会话工具已更新,将在下一轮生效")}catch(h){l.sessionTools.busy=!1,wt(h,"会话工具更新失败")}}async function Hg(){l.globalPlugins.loading=!0;try{const s=await fetch(N("/api/plugins")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`plugins ${s.status}`);l.globalPlugins={items:Array.isArray(r.items)?r.items.map(g=>({...g})):[],locked:r.locked===!0,restartRequired:r.restartRequired!==!1,loading:!1}}catch(s){l.globalPlugins.loading=!1,be(s.message||String(s))}}async function jg(){const s=l.globalPlugins.items.filter(r=>r.configuredEnabled!==!1).map(r=>r.id);l.globalPlugins.loading=!0;try{const r=await Ve("/api/plugins/global",{enabledIds:s}),g=new Set(r.enabledIds||s);l.globalPlugins.items=l.globalPlugins.items.map(h=>({...h,configuredEnabled:g.has(h.id)})),be("插件配置已保存,重启后生效")}catch(r){wt(r,"插件配置保存失败")}finally{l.globalPlugins.loading=!1}}async function ko(){l.sessionPlugins.loading=!0;try{const s=await fetch(N("/api/session-plugins")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`session-plugins ${s.status}`);l.sessionPlugins={...r,items:Array.isArray(r.items)?r.items:[],loading:!1}}catch(s){l.sessionPlugins.loading=!1,be(s.message||String(s))}}async function Wg(s,r){const g=Object.fromEntries(l.sessionPlugins.items.map(h=>[h.id,h.id===s.id?r:h.mode]));l.sessionPlugins.busy=!0;try{const h=await Ve("/api/session-plugins",{overrides:g});l.sessionPlugins={...h.state,loading:!1,busy:!1},be("会话插件已更新,将在下一轮生效")}catch(h){l.sessionPlugins.busy=!1,wt(h,"会话插件更新失败")}}async function Kl(){l.promptLibraryLoading=!0;try{const s=await fetch(N("/api/prompt-library")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`prompt-library ${s.status}`);Ps(Array.isArray(r.items)?r.items:y)}catch(s){Ps([]),be(s.message||String(s))}finally{l.promptLibraryLoading=!1}}function qr(){ve&&ve.close(),Be&&cancelAnimationFrame(Be),Be=0,Zr(),_t=void 0,At=!1,l.connecting=!0,ve=new EventSource(N("/events")),ve.addEventListener("open",()=>{At=!1,l.connected=!0,l.connecting=!1}),ve.addEventListener("error",()=>{_o(),l.connected=!1,l.connecting=!1}),ve.addEventListener("sync",s=>{if(!At){At=!0,Ql(s.data);return}qg(s.data)}),ve.addEventListener("delta",s=>{_o(),Zg(s.data)}),ve.addEventListener("terminal.output",s=>{try{_o(),eh(JSON.parse(s.data))}catch{}}),ve.addEventListener("client.version",s=>{try{Vl(JSON.parse(s.data))}catch{}}),ve.addEventListener("client.reload",s=>{try{Kg(JSON.parse(s.data))}catch{}}),ve.addEventListener("runtime.context",s=>{try{ql(JSON.parse(s.data))}catch(r){l.runtimeContextError=r.message||String(r)}}),ve.addEventListener("runtime.context.error",s=>{try{const r=JSON.parse(s.data);l.runtimeContextError=r.message||"运行上下文同步失败"}catch{l.runtimeContextError="运行上下文同步失败"}})}function Vl(s){if(Number(s==null?void 0:s.protocolVersion)!==1)return;l.coreVersion=String(s.coreVersion||"");const r=String(s.revision||"").trim();if(!r)return;const g=localStorage.getItem(Ma);localStorage.setItem(Ma,r),g&&g!==r&&Gl({...s,requestId:`revision:${r}`,clearCache:!0})}async function Kg(s){if(Number(s==null?void 0:s.protocolVersion)!==1)return;const r=String(s.requestId||"").trim();if(!r||sessionStorage.getItem(Td)===r)return;sessionStorage.setItem(Td,r);const g=String(s.revision||"").trim();g&&localStorage.setItem(Ma,g),l.coreVersion=String(s.coreVersion||l.coreVersion||""),await Gl(s)}async function Gl(s){if(W)return;W=!0,s.clearCache!==!1&&await Vg();const r=new URL(window.location.href);r.searchParams.set(Ra,String(s.requestId||s.revision||Date.now())),window.location.replace(r.href)}async function Vg(){const s=[];"caches"in window&&s.push(caches.keys().then(r=>Promise.all(r.map(g=>caches.delete(g))))),"serviceWorker"in navigator&&s.push(navigator.serviceWorker.getRegistrations().then(r=>Promise.all(r.map(g=>g.unregister())))),await Promise.allSettled(s)}function Gg(){const s=new URL(window.location.href);s.searchParams.has(Ra)&&(s.searchParams.delete(Ra),window.history.replaceState(window.history.state,"",s.href))}function yo(){z&&clearTimeout(z),l.coreEasterEgg=!1,requestAnimationFrame(()=>{l.coreEasterEgg=!0,z=setTimeout(()=>{l.coreEasterEgg=!1},1300)})}function ql(s){var b,S;if(![1,2].includes(Number(s==null?void 0:s.protocolVersion)))throw new Error(`不支持的运行上下文协议版本:${(s==null?void 0:s.protocolVersion)??"未知"}`);const r=Number(s.revision||0),g=Number(((b=l.runtimeContext)==null?void 0:b.revision)||0);(!s.sessionId||!((S=l.runtimeContext)!=null&&S.sessionId)||s.sessionId===l.runtimeContext.sessionId)&&r<g||(l.runtimeContext=s,l.projectContextDocument&&!Os.value.some(C=>C.path===l.projectContextDocument.path)&&(l.projectContextDocument=void 0),l.projectContextOpen&&Os.value.length===0&&(l.projectContextOpen=!1,document.body.classList.remove("runtime-context-open")),l.runtimeContextLoading=!1,l.runtimeContextError="")}function qg(s){_t=s,!Be&&(Be=requestAnimationFrame(()=>{Be=0,Zl()}))}function _o(){Be&&cancelAnimationFrame(Be),Be=0,Zl()}function Zl(){const s=_t;_t=void 0,s&&Ql(s)}function Ql(s){try{Jl(JSON.parse(s))}catch(r){be(`运行状态同步失败:${r.message||r}`)}}function Zg(s){try{Xg(JSON.parse(s))}catch(r){be(`流式增量同步失败:${r.message||r}`),os()}}function Qg(s,r){const g=String(r||"");if(!g)return;const h=String(s);H.set(h,`${H.get(h)||""}${g}`),Yl()}function Yl(){dt||(dt=requestAnimationFrame(Yg))}function Yg(){dt=0;const s=ra(),r=[...H];H.clear();for(const[g,h]of r){const b=l.lines.findIndex(C=>String(C.id)===g);if(b<0)continue;const S=l.lines[b];l.lines[b]={...S,text:`${S.text||""}${h}`}}s&&aa(),H.size&&Yl()}function Jg(s){const r=String(s),g=H.get(r);if(!g)return;H.delete(r);const h=l.lines.findIndex(S=>String(S.id)===r);if(h<0)return;const b=l.lines[h];l.lines[h]={...b,text:`${b.text||""}${g}`}}function Zr(){dt&&cancelAnimationFrame(dt),dt=0,H.clear()}function Xg(s){const r=String(s.sessionId||"");if(f&&r&&r!==f&&!m){Mc();return}const g=ra();for(const h of s.operations||[]){if(h.type==="line.append"){l.lines.some(S=>{var C;return String(S.id)===String((C=h.line)==null?void 0:C.id)})||l.lines.push(h.line);continue}const b=l.lines.findIndex(S=>String(S.id)===String(h.id));if(b<0)throw new Error(`找不到增量消息行 ${h.id}`);if(l.lines[b],h.type==="line.text.append")Qg(h.id,h.text);else if(h.type==="line.patch"){Jg(h.id);const S=l.lines[b];l.lines[b]={...S,...h.patch||{}}}}s.status&&(l.status=s.status),Do(),l.connected=!0,l.connecting=!1,g&&aa()}function eh(s){var r;for(const g of(s==null?void 0:s.updates)||[]){const h=String((g==null?void 0:g.sessionId)||"");if(!h)continue;const b=l.backgroundTasks.findIndex(on=>String((on==null?void 0:on.sessionId)||"")===h);if(b<0)continue;const S=String(g.text||"");if(!S)continue;const C=l.backgroundTasks[b],K=String(C.output||""),le=Number(C.outputEnd??K.length),ie=Number(g.outputStart??le),Ee=Number(g.outputEnd??ie+S.length),Ge=ie===le?th(K,S,Ad):S.slice(-Ad);l.backgroundTasks[b]={...C,output:Ge,outputEnd:Ee},String(((r=l.backgroundTaskDetail)==null?void 0:r.sessionId)||"")===h&&(l.backgroundTaskDetail={...l.backgroundTaskDetail,output:Ge,outputEnd:Ee})}}function th(s,r,g){const h=`${s}${r}`;return h.length<=g?h:h.slice(-g)}function Jl(s){var b,S,C;Zr();const r=String(((b=s.session)==null?void 0:b.sessionId)||""),g=String(((S=l.session)==null?void 0:S.sessionId)||"");if(f&&r&&r!==f&&!m){Mc();return}const h=ra();if(r!==g&&(dm(),l.messageImagePreviews=l.messageImagePreviews.filter(K=>K.sessionId===r),l.attachmentCounter=0),l.lines=s.lines||[],l.toolDetailLineId!==void 0&&!l.lines.some(K=>String(K.id)===String(l.toolDetailLineId))&&Ks(),l.compactionDetailLineId!==void 0&&!l.lines.some(K=>String(K.id)===String(l.compactionDetailLineId))&&Xr(),jp(l.lines),Hh(l.lines),l.status=s.status||l.status,Do(),l.busy=!!s.busy,l.queuedInput=s.queuedInput,l.backgroundTaskCount=s.backgroundTaskCount||0,l.backgroundTasks=s.backgroundTasks||[],l.backgroundTaskDetail){const K=l.backgroundTasks.find(le=>Zs(le)===Zs(l.backgroundTaskDetail));K?l.backgroundTaskDetail={...K}:l.backgroundTasks.length?l.backgroundTaskDetail={...l.backgroundTasks[0]}:ii()}if(l.backgroundSessionRunCount=s.backgroundSessionRunCount||0,l.runningSessionIds=s.runningSessionIds||[],l.session=s.session,l.cwd=s.cwd||"",l.fastModeMutating||(l.fastMode=s.fastMode===!0),l.appPrompt=s.appPrompt||{hasActivePrompt:!1,activePrompt:void 0},B(s.session,m),r&&r!==g&&Promise.all([ko(),Gr()]),l.sessionResumeLoading){const K=((C=s.session)==null?void 0:C.sessionId)||"";l.pendingResumeSessionId&&K===l.pendingResumeSessionId&&(l.sessionResumeLoading=!1,l.pendingResumeSessionId="")}s.catalog&&(l.catalog=s.catalog),s.interactive&&(l.interactive=s.interactive),s.tips&&(l.tips=s.tips),s.tipIndex!==void 0&&l.tipIndex===0&&(l.tipIndex=s.tipIndex),l.connected=!0,l.connecting=!1,Wh(l.backgroundTasks),gm(),h&&aa()}function Ps(s,r=l.selectedPromptId){const g=(s||[]).map(I).filter(Boolean);l.promptLibrary=g;const h=g.find(b=>b.id===r)||g[0]||null;l.selectedPromptId=(h==null?void 0:h.id)||"",$s(h||w())}function $s(s){O.id=(s==null?void 0:s.id)||"",O.title=(s==null?void 0:s.title)||"",O.content=(s==null?void 0:s.content)||"",O.usage=(s==null?void 0:s.usage)||""}function vo(s){l.activePanel="prompts",l.promptManagerOpen=!0,s&&(l.selectedPromptId=s);const r=l.promptLibrary.find(g=>g.id===l.selectedPromptId)||l.promptLibrary[0]||w();l.selectedPromptId=r.id||"",$s(r)}function nh(s){l.selectedPromptId=s.id,vo(s.id)}function sh(){l.selectedPromptId="",$s(w()),l.activePanel="prompts",l.promptManagerOpen=!0}function rh(s){l.selectedPromptId=s.id,$s(s)}async function ih(){const s=I({id:O.id||T(),title:O.title,content:O.content,usage:O.usage});if(!s){be("标题和内容不能为空");return}try{const r=await Ve("/api/prompt-library",{item:s});Ps(r.items,s.id)}catch(r){be(r.message||String(r));return}be("已保存提示词")}async function oh(){var h;const s=String(O.id||"").trim();if(!s){$s(w());return}const r=l.promptLibrary.find(b=>b.id===s);if(!(!r||!await Us({title:"删除提示词?",message:`“${r.title}”删除后无法恢复。`,confirmLabel:"确认删除",tone:"danger"}))){try{const b=await Ve("/api/prompt-library/delete",{id:s});Ps(b.items)}catch(b){be(b.message||String(b));return}((h=$n.value)==null?void 0:h.id)===r.id&&Xl({confirm:!1}),be("已删除提示词")}}async function Bs(s){const r=I(s);if(!r){be("提示词无效");return}const g=$n.value;if(g&&(g.id!==r.id||String(g.content||"").trim()!==r.content)){const b=g.id===r.id;if(!await Us({title:b?"更新当前提示词?":"切换当前提示词?",message:b?`“${r.title}”的内容已经变化。重新应用会影响模型对后续问题的理解和回答方式。`:`将从“${g.title||g.id||"当前提示词"}”切换为“${r.title}”。提示词变化会影响模型对后续问题的理解和回答方式。`,confirmLabel:b?"确认更新":"确认切换"}))return}try{const b=await Ve("/api/app-prompt",{id:r.id,title:r.title,usage:r.usage,source:"sidebar-library",content:r.content});(b==null?void 0:b.ok)!==!1&&(l.appPrompt=b.appPrompt||{hasActivePrompt:!0,activePrompt:r},be(`已应用:${r.title}`))}catch(b){wt(b,"应用提示词失败")}}async function Xl(s={}){if($n.value&&!(s.confirm!==!1&&!await Us({title:"清除当前提示词?",message:"清除后,模型将不再遵循当前应用提示词,这会改变它对后续问题的理解和回答方式。",confirmLabel:"确认清除",tone:"danger"})))try{const r=await Ve("/api/app-prompt",{clear:!0});(r==null?void 0:r.ok)!==!1&&(l.appPrompt=r.appPrompt||{hasActivePrompt:!1,activePrompt:void 0},be("已清空应用提示词"))}catch(r){wt(r,"清空提示词失败")}}function Us(s){return F&&as(!1),Object.assign(l.confirmDialog,{open:!0,title:String((s==null?void 0:s.title)||"请确认"),message:String((s==null?void 0:s.message)||""),confirmLabel:String((s==null?void 0:s.confirmLabel)||"确认"),cancelLabel:String((s==null?void 0:s.cancelLabel)||"取消"),tone:(s==null?void 0:s.tone)==="danger"?"danger":"warning"}),new Promise(r=>{F=r})}function as(s){const r=F;F=void 0,l.confirmDialog.open=!1,r==null||r(s===!0)}function ah(s,r){Q.value=r.id,s!=null&&s.dataTransfer&&(s.dataTransfer.effectAllowed="copy",s.dataTransfer.setData("application/x-neoctl-prompt-id",r.id),s.dataTransfer.setData("text/plain",r.title))}function lh(s){var h;const r=Array.from(((h=s==null?void 0:s.dataTransfer)==null?void 0:h.types)||[]),g=dh(s);!r.includes("application/x-neoctl-prompt-id")&&!g||(s.preventDefault(),l.composerDropActive=!0,l.composerDropMode=g?"files":"prompt",s.dataTransfer&&(s.dataTransfer.dropEffect="copy"))}function ch(s){s!=null&&s.currentTarget&&(s!=null&&s.relatedTarget)&&s.currentTarget.contains(s.relatedTarget)||(l.composerDropActive=!1,l.composerDropMode="prompt")}async function uh(s){var b,S;const r=fh(s==null?void 0:s.dataTransfer);if(r.length){s.preventDefault(),l.composerDropActive=!1,l.composerDropMode="prompt",Q.value="",await zc(r),(b=oe.value)==null||b.focus();return}const g=((S=s==null?void 0:s.dataTransfer)==null?void 0:S.getData("application/x-neoctl-prompt-id"))||Q.value;if(l.composerDropActive=!1,l.composerDropMode="prompt",!g)return;s.preventDefault();const h=l.promptLibrary.find(C=>C.id===g);if(Q.value="",!h){be("未找到提示词");return}await Bs(h)}function dh(s){var g,h;return Array.from(((g=s==null?void 0:s.dataTransfer)==null?void 0:g.types)||[]).includes("Files")?!0:Array.from(((h=s==null?void 0:s.dataTransfer)==null?void 0:h.items)||[]).some(b=>b.kind==="file")}function fh(s){const r=Array.from((s==null?void 0:s.files)||[]);return r.length?r:Array.from((s==null?void 0:s.items)||[]).filter(g=>g.kind==="file").map(g=>g.getAsFile()).filter(Boolean)}function gh(){Q.value="",l.composerDropActive=!1,l.composerDropMode="prompt"}function hh(s,r){Z.value=r.id,fe.value="",s!=null&&s.dataTransfer&&(s.dataTransfer.effectAllowed="move",s.dataTransfer.setData("application/x-neoctl-prompt-sort-id",r.id),s.dataTransfer.setData("text/plain",r.title))}function ph(s,r){var b,S,C;const g=Z.value||((b=s==null?void 0:s.dataTransfer)==null?void 0:b.getData("application/x-neoctl-prompt-sort-id"));if(!g||g===r.id)return;s.preventDefault();const h=(C=(S=s.currentTarget)==null?void 0:S.getBoundingClientRect)==null?void 0:C.call(S);fe.value=r.id,xe.value=h&&s.clientY>h.top+h.height/2?"after":"before",s.dataTransfer&&(s.dataTransfer.dropEffect="move")}async function mh(s,r){var le;s.preventDefault();const g=((le=s==null?void 0:s.dataTransfer)==null?void 0:le.getData("application/x-neoctl-prompt-sort-id"))||Z.value,h=xe.value;if(ec(),!g||g===r.id)return;const b=[...l.promptLibrary],S=b.findIndex(ie=>ie.id===g);if(S<0)return;const[C]=b.splice(S,1),K=b.findIndex(ie=>ie.id===r.id);if(!(K<0)){b.splice(K+(h==="after"?1:0),0,C),l.promptLibrary=b;try{const ie=await Ve("/api/prompt-library/reorder",{ids:b.map(Ee=>Ee.id)});Ps(ie.items,l.selectedPromptId),be("提示词顺序已更新")}catch(ie){await Kl(),be(ie.message||String(ie))}}}function ec(){Z.value="",fe.value="",xe.value="before"}async function tc(){const s=R.value;if(!s.trim()&&l.attachments.length===0)return;if(s.trim()==="/sessions"){R.value="",Xs(),await Qr();return}if(s.trim()==="/login"){R.value="",Xs(),await Fs();return}if(s.trim()==="/new"){R.value="",Xs(),await Yr();return}const r=[...l.attachments],g=r.filter(S=>S.kind==="image"),h=r.filter(S=>S.kind==="file"&&S.absolutePath),b=jc(s,g);Wc(g),R.value="",l.attachments=[],Xs();try{const S=await fetch(N("/api/submit"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:b,attachments:[...g,...h]})}),C=await S.json();if(!S.ok||C!=null&&C.error)throw new Error(C.error||`submit ${S.status}`)}catch(S){be(S.message||String(S))}}async function bh(){if(!zl.value){l.queuedInput?await sc():await nc();return}const s=R.value,r=[...l.attachments],g=r.filter(S=>S.kind==="image"),h=r.filter(S=>S.kind==="file"&&S.absolutePath),b=jc(s,g);Wc(g),R.value="",l.attachments=[],Xs();try{await Ve("/api/submit-now",{text:b,attachments:[...g,...h]})}catch(S){be(S.message||String(S))}}async function nc(){try{await Ve("/api/interrupt",{})}catch(s){wt(s,"停止回答失败")}}async function kh(){try{const s=await Ve("/api/queue/cancel",{});be(s.cancelled?"已撤回排队消息":"没有待撤回的消息")}catch(s){wt(s,"撤回排队消息失败")}}async function sc(){try{const s=await Ve("/api/queue/send-now",{});be(s.interrupted?"已打断并发送排队消息":"已发送排队消息")}catch(s){wt(s,"发送排队消息失败")}}async function rc(){try{await Ve("/api/submit",{text:"/compact",attachments:[]}),be("压缩会话将在下一轮生效")}catch(s){wt(s,"压缩上下文失败")}}function ic(){l.contextWindowDraft=Mg.value,l.contextWindowError="",l.contextWindowModalOpen=!0,document.body.classList.add("context-window-open")}function wo(){l.contextWindowSaving||(l.contextWindowModalOpen=!1,l.contextWindowError="",document.body.classList.remove("context-window-open"))}function yh(){l.contextWindowError=""}async function _h(){var r;const s=String(l.contextWindowDraft||"");if(!/^\d+$/.test(s)||s==="0"){l.contextWindowError="请输入大于 0 的整数";return}l.contextWindowSaving=!0,l.contextWindowError="";try{const g=await Ve("/api/context-window",{value:s}),h=((r=l.status)==null?void 0:r.metrics)||{},b=Number(g.contextWindowTokens),S=Number(h.estimatedInputTokens||0);l.status={...l.status,metrics:{...h,contextWindowTokens:b,contextWindowSource:"session",contextUsageRatio:b>0?S/b:void 0}},Do(),l.contextWindowModalOpen=!1,document.body.classList.remove("context-window-open")}catch(g){l.contextWindowError=sn(g,"调整失败")}finally{l.contextWindowSaving=!1}}function oc(){const s=!l.fastMode,r=++L;l.fastMode=s,l.fastModeMutating=!0,E=E.catch(()=>{}).then(()=>Ve("/api/fast-mode",{enabled:s})).then(g=>{r===L&&(l.fastMode=g.fastMode===!0,l.fastModeMutating=!1,be(l.fastMode?"快速模式已开启,将在下一轮生效":"快速模式已关闭,将在下一轮生效"))}).catch(async g=>{r===L&&(l.fastModeMutating=!1,await os(),wt(g,"快速模式切换失败"))})}async function Qr(){l.activePanel="sessions",l.sessionsLoading=!0;try{const s=await fetch(N("/api/sessions")),r=await s.json().catch(()=>({}));if(!s.ok||r!=null&&r.error||(r==null?void 0:r.ok)===!1)throw zs(r,s.status);l.sessions=r.sessions||[],l.runningSessionIds=r.runningSessionIds||[]}catch(s){wt(s,"加载会话失败")}finally{l.sessionsLoading=!1}}async function vh(s){const r=u,g=f;if(l.pendingResumeSessionId=s,l.sessionResumeLoading=!0,await Rc(s))l.activePanel="chat",be("已打开会话");else{const b=await Nc(r,g);be(b?"打开会话失败,已恢复原会话":"打开会话失败,运行时连接已断开")}l.sessionResumeLoading=!1,l.pendingResumeSessionId=""}async function xo(){try{const s=await fetch(N("/api/cpa-quota"));if(!s.ok)throw new Error(`cpa-quota ${s.status}`);const r=await s.json();l.cpaQuotas=Array.isArray(r==null?void 0:r.quotas)?r.quotas:[],l.cpaQuotaIndex>=l.cpaQuotas.length&&(l.cpaQuotaIndex=0),r!=null&&r.config&&(l.cpaConfig.loaded||(l.cpaConfig.url=String(r.config.url||""),l.cpaConfig.password=r.config.hasPassword?Ci:"",l.cpaConfig.loaded=!0),l.cpaConfig.hasPassword=!!r.config.hasPassword)}catch{l.cpaQuotas=[],l.cpaQuotaIndex=0}}async function ac(){try{const s=await fetch(N("/api/memory"));if(!s.ok)throw new Error(`memory ${s.status}`);const r=await s.json();l.memory={current:(r==null?void 0:r.current)||null,history:Array.isArray(r==null?void 0:r.history)?r.history:[],sampleMs:Number(r==null?void 0:r.sampleMs)||6e4,retentionMs:Number(r==null?void 0:r.retentionMs)||864e5}}catch{}}async function Yr(){const s=u,r=f;if(Zo(),u=U(),f="",m=!0,sessionStorage.setItem(Ii,u),sessionStorage.removeItem(hs),l.sessionResumeLoading=!0,l.pendingResumeSessionId="",await os({silent:!0}))l.activePanel="chat",be("已创建新会话"),qr();else{const h=await Nc(s,r);be(h?"新建会话失败,已恢复原会话":"新建会话失败,运行时连接已断开")}l.sessionResumeLoading=!1}function So(s){var r;return!!s&&String(((r=l.session)==null?void 0:r.sessionId)||"")===String(s)}function Eo(s){return l.runningSessionIds.includes(s)}async function wh(s){const r=l.sessions.find(h=>h.sessionId===s);if(So(s)){be(c.SESSION_ACTIVE);return}if(Eo(s)){be(c.SESSION_RUNNING);return}if(await Us({title:"删除会话?",message:`“${(r==null?void 0:r.title)||s||"这个会话"}”删除后无法恢复。`,confirmLabel:"确认删除",tone:"danger"}))try{await Ve("/api/sessions/delete",{sessionId:s}),await Qr(),be("会话已删除")}catch(h){wt(h,"删除会话失败")}}async function Fs(s){l.activePanel="settings";const r=s?`?provider=${encodeURIComponent(s)}`:"";try{const g=await fetch(N(`/api/login${r}`)),h=await g.json().catch(()=>({}));if(!g.ok||h!=null&&h.error||(h==null?void 0:h.ok)===!1)throw zs(h,g.status);l.login=h,Te.value=h.provider,Object.keys(He).forEach(b=>delete He[b]),Object.assign(He,h.values||{}),await Promise.all([xo(),Hg(),Ug()])}catch(g){wt(g,"加载模型配置失败")}}async function xh(){await Fs(Te.value)}async function lc(){var h;const[s,r]=await Promise.allSettled([Ve("/api/login",{provider:Te.value,values:{...He}}),Ve("/api/cpa-config",{url:l.cpaConfig.url,password:l.cpaConfig.password===Ci?"":l.cpaConfig.password,preservePassword:l.cpaConfig.hasPassword&&(!l.cpaConfig.password||l.cpaConfig.password===Ci)})]);if(r.status==="fulfilled"){const b=r.value;l.cpaQuotas=Array.isArray(b==null?void 0:b.quotas)?b.quotas:[],l.cpaQuotaIndex=0,l.cpaConfig.loaded=!0,l.cpaConfig.hasPassword=!!((h=b==null?void 0:b.config)!=null&&h.hasPassword),l.cpaConfig.password=l.cpaConfig.hasPassword?Ci:""}if(s.status==="fulfilled"&&r.status==="fulfilled"){be("模型配置已保存");return}const g=[];s.status==="rejected"&&g.push(sn(s.reason,"模型配置保存失败")),r.status==="rejected"&&g.push(sn(r.reason,"CPA 配置保存失败")),be(g.join(";"))}function To(s){const r=Number.parseFloat(String(s??"").replace("%",""));return Number.isFinite(r)?Math.max(0,Math.min(100,r)):0}function Ao(s){const r=Number.parseFloat(String(s??"").replace("%",""));if(!Number.isFinite(r))return"—";const g=To(r);return`${g.toFixed(g%1?1:0)}%`}function Co(s){const r=new Date(s);return Number.isNaN(r.getTime())?"—":new Intl.DateTimeFormat("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).format(r)}function Io(s){const r=new Date(s);return Number.isNaN(r.getTime())?"—":new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).format(r)}function cc(s){const r=l.cpaQuotas.length;r<2||(l.cpaQuotaIndex=(l.cpaQuotaIndex+s+r)%r)}function Sh(s){const r=String(s||"").trim();if(!r)return"Codex 凭据";const[g,h]=r.split("@");return!h||g.length<=3?r:`${g.slice(0,3)}***@${h}`}function Un(s){const r=Number(s);if(!Number.isFinite(r)||r<0)return"—";const g=r/1024/1024;return`${g.toFixed(g>=100?0:1)} MB`}function Eh(s){const r=new Date(s);return Number.isNaN(r.getTime())?"等待采样":new Intl.DateTimeFormat("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r)}function Th(s){const r=new Date(s);return Number.isNaN(r.getTime())?"—":new Intl.DateTimeFormat("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r)}function Ah(s){const r=Kr.value.length;if(!r)return;const g=s.currentTarget.getBoundingClientRect(),h=Math.min(1,Math.max(0,(s.clientX-g.left)/Math.max(1,g.width)));Ie.value=r===1?0:Math.round(h*(r-1))}function uc(){Ie.value=-1}async function Ve(s,r){const g=await fetch(N(s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),h=await g.json().catch(()=>({}));if(!g.ok||h!=null&&h.error||(h==null?void 0:h.ok)===!1)throw zs(h,g.status);return h}class Ch extends Error{constructor(r,g=""){super(r),this.name="ActionRequestError",this.code=g}}function zs(s,r){const g=String((s==null?void 0:s.errorCode)||(r===404?"API_NOT_FOUND":""));return new Ch((s==null?void 0:s.error)||`请求失败(${r})`,g)}function sn(s,r="操作失败"){const g=String((s==null?void 0:s.code)||"");if(g&&c[g])return c[g];const h=String((s==null?void 0:s.message)||s||"").trim();return h?`${r}:${h}`:r}function wt(s,r){be(sn(s,r))}function Fn(s){const r=Hp(zp(Fp(s.text||"")));return s.kind==="system"||s.kind==="meta"?Ih(r):r}function Ih(s){return String(s||"").replace(/^Interactive web UI enabled\.\s*Type \/help for commands\.\s*/i,"工作台已连接。输入 `/help` 可查看命令说明。").replace(/\bSession:\s*/gi,"会话:").replace(/\bTip:\s*/gi,"提示:").replace(/Start fresh/gi,"重新开始").replace(/\/reset clears the visible conversation and adds a reset marker so you can start a fresh thread in the same session\./gi,"`/reset` 会清空当前可见对话,并插入一个重置标记,方便你在同一会话中重新开始。").replace(/^new session\s+/i,"已新建会话:").replace(/^deleted session\s+/i,"已删除会话:").replace(/^resumed session\s+(.+?):\s+(\d+)\s+messages?\s+from\s+(.+)$/i,"已恢复会话:$1,共载入 $2 条消息,来源:$3").replace(/\((\d+)\s+resumed messages\)/gi,"(已恢复 $1 条消息)").replace(/\bType \/help for commands\./gi,"输入 `/help` 可查看命令说明。")}function zn(s){var r;if(s.kind==="tool"||s.toolName){const g=Jr(s);return(r=s==null?void 0:s.toolPresentation)!=null&&r.label?String(s.toolPresentation.label):Mo(s)?"任务计划":s.title?n[s.title]||n[String(s.title).toLowerCase()]||s.title:n[g]||g}return s.title?n[s.title]||n[String(s.title).toLowerCase()]||s.title:s.kind==="assistant"?"助手":s.kind==="user"?"你":s.kind==="thinking"?"思考":"系统"}function Jr(s){return String((s==null?void 0:s.toolName)||"tool").trim()||"tool"}function Mo(s){return(s==null?void 0:s.kind)==="tool"&&Jr(s)==="plan_update"}function Mh(s){return Mo(s)||Pt(s)||cs(s).length>0}function Rh(s){return(s==null?void 0:s.kind)==="meta"&&String((s==null?void 0:s.title)||"")==="提示词用法"}function Hs(s){return!!(s!=null&&s.compaction&&typeof s.compaction=="object")}function Nh(s){var r;return(r=s==null?void 0:s.compaction)!=null&&r.modelDriven?"模型生成摘要":"确定性摘要"}function dc(s){Hs(s)&&(l.compactionDetailLineId=s.id,document.body.classList.add("runtime-context-open"))}function Xr(){l.compactionDetailLineId=void 0,!l.runtimeContextModal&&!l.runtimeContextDetail&&!l.projectContextOpen&&document.body.classList.remove("runtime-context-open")}function js(s){return((s==null?void 0:s.kind)==="tool"||(s==null?void 0:s.kind)==="error"&&(s==null?void 0:s.toolName))&&!Mh(s)}function Ro(s){return(s==null?void 0:s.kind)==="tool-group"&&Array.isArray(s.lines)}function Lh(s){return!s||s.presentationLevel==="primary"||s.kind==="user"||s.kind==="assistant"?!0:Pt(s)}function Oh(s){return!s||Lh(s)?!1:["thinking","tool","error","meta","system","agent"].includes(String(s.kind||"system"))}function Dh(s){const r=[];let g=[];const h=()=>{if(!g.length)return;const b=g.some(S=>(S==null?void 0:S.kind)!=="thinking");g.length===1||!b?r.push(...g):r.push({id:`tool-group:${g[0].id}`,kind:"tool-group",lines:g,live:g.some(S=>(S==null?void 0:S.live)===!0)}),g=[]};for(const b of s||[])Oh(b)?g.push(b):(h(),r.push(b));return h(),r}function Hn(s){return l.expandedToolGroups[s==null?void 0:s.id]===!0}function Ph(s){Ro(s)&&(l.expandedToolGroups[s.id]=!Hn(s))}function fc(s){const r=new Map;for(const h of(s==null?void 0:s.lines)||[]){const b=(h==null?void 0:h.kind)==="thinking"?"思考":zn(h);b&&r.set(b,(r.get(b)||0)+1)}const g=[...r.entries()].map(([h,b])=>({name:h,count:b}));return g.length?g:[{name:"过程",count:1}]}function Ws(s){return((s==null?void 0:s.lines)||[]).flatMap((r,g)=>{var b;const h=String(((b=r==null?void 0:r.toolDisplay)==null?void 0:b.purpose)||"").trim();return h?[{id:`${r.id}:purpose:${g}`,text:h,live:(r==null?void 0:r.live)===!0}]:[]})}function $h(s){return((s==null?void 0:s.lines)||[]).some(Dt)}function gc(s){!s||!s.text||(l.toolDetailLineId=s.id,document.body.classList.add("tool-detail-open"))}function Ks(){l.toolDetailLineId=void 0,document.body.classList.remove("tool-detail-open")}function hc(s){var h;const r=s.target instanceof HTMLImageElement?s.target:null;if(!r||r.closest(".image-preview-modal"))return;const g=((h=r.closest("[data-preview-src]"))==null?void 0:h.dataset.previewSrc)||r.currentSrc||r.src;g&&(s.preventDefault(),s.stopPropagation(),Bh(g,r.alt))}async function pc(s){const r=s.target instanceof Element?s.target.closest('a[data-resource-download="true"]'):null;if(!(r instanceof HTMLAnchorElement))return;s.preventDefault(),s.stopPropagation();const g=Number(r.dataset.resourceExpiresAt);if(Number.isFinite(g)&&g>0&&Date.now()>=g){be("下载链接已过期,请重新生成");return}try{const h=await fetch(r.href);if(!h.ok){be(h.status===404||h.status===410?"下载链接已过期,请重新生成":`下载失败(${h.status})`);return}const b=URL.createObjectURL(await h.blob()),S=document.createElement("a");S.href=b,S.download=r.download||"download",document.body.appendChild(S),S.click(),S.remove(),setTimeout(()=>URL.revokeObjectURL(b),3e4)}catch{be("下载失败,请稍后重试")}}function Bh(s,r=""){l.imagePreview={src:String(s||""),caption:String(r||"").trim()},document.body.classList.add("image-preview-open")}function No(){l.imagePreview=void 0,document.body.classList.remove("image-preview-open")}function ls(s){return vc(s).status}function mc(s){return vc(s).summary}function ei(s){var g;return(Array.isArray((g=s==null?void 0:s.toolDisplay)==null?void 0:g.facts)?s.toolDisplay.facts:[]).filter(h=>String((h==null?void 0:h.label)||"").trim()!=="状态")}function xn(s){var r;return Array.isArray((r=s==null?void 0:s.toolStream)==null?void 0:r.steps)?s.toolStream.steps:[]}function Dt(s){return Jr(s)==="subagent_run"}function Lo(s){const r=Jr(s).toLowerCase();return r==="terminal_run"||r==="terminal_control"}function bc(s){var r;return Array.isArray((r=s==null?void 0:s.toolDisplay)==null?void 0:r.previews)&&s.toolDisplay.previews.length>0&&!(Lo(s)&&(s==null?void 0:s.live)===!0&&Uh(s))}function Vs(s){var S,C,K,le;const r=Array.isArray((S=s==null?void 0:s.toolStream)==null?void 0:S.chunks)?s.toolStream.chunks:[];if(r.length)return r.map(ie=>String((ie==null?void 0:ie.text)||"")).join("").trimEnd();const g=String(((C=s==null?void 0:s.toolStream)==null?void 0:C.stdout)||""),h=String(((K=s==null?void 0:s.toolStream)==null?void 0:K.stderr)||""),b=String(((le=s==null?void 0:s.toolStream)==null?void 0:le.output)||"");return[g,h,b].filter(Boolean).join(`
112
+ `).trimEnd()}function Gs(s){var h,b,S;const r=String(((h=s==null?void 0:s.toolStream)==null?void 0:h.message)||"").trim(),g=String(((b=s==null?void 0:s.toolDisplay)==null?void 0:b.purpose)||((S=s==null?void 0:s.toolDisplay)==null?void 0:S.subject)||"").trim();return r&&r!==g?r:""}function kc(s){return xn(s).map(r=>`${(r==null?void 0:r.status)==="completed"?"✓":(r==null?void 0:r.status)==="failed"?"×":"•"} ${String((r==null?void 0:r.message)||"").trim()}`.trimEnd()).join(`
113
+ `)}function ti(s){const r=new Map;for(const g of xn(s)){const h=String((g==null?void 0:g.toolName)||"").trim();h&&r.set(h,(r.get(h)||0)+1)}return[...r.entries()].map(([g,h])=>({name:g,label:String((step==null?void 0:step.toolLabel)||g),count:h}))}function yc(s){return xn(s).flatMap((r,g)=>{const h=String((r==null?void 0:r.message)||"").trim();return h?[{key:`${r.key}:${g}`,purpose:h}]:[]})}function ni(s){return l.expandedToolGroups[`agent:${s==null?void 0:s.id}`]===!0}function _c(s){const r=`agent:${s==null?void 0:s.id}`;l.expandedToolGroups[r]=!l.expandedToolGroups[r]}function Uh(s){return!!(Gs(s)||xn(s).length||Vs(s))}function si(s){var b,S,C;const r=Number((b=s==null?void 0:s.toolStream)==null?void 0:b.current),g=Number((S=s==null?void 0:s.toolStream)==null?void 0:S.total);if(!Number.isFinite(r))return"";const h=String(((C=s==null?void 0:s.toolStream)==null?void 0:C.unit)||"").trim();return Number.isFinite(g)&&g>0?`${r}/${g}${h?` ${h}`:""}`:`${r}${h?` ${h}`:""}`}function vc(s){const r=(s==null?void 0:s.live)===!0,g=(s==null?void 0:s.titleStatus)==="failure"||(s==null?void 0:s.kind)==="error",h=r?{key:"running",label:"运行中"}:g?{key:"failed",label:"失败"}:{key:"completed",label:"成功"},b=s!=null&&s.toolDisplay&&typeof s.toolDisplay=="object"?s.toolDisplay:void 0,S=String((b==null?void 0:b.purpose)||(b==null?void 0:b.subject)||(s==null?void 0:s.bodyTitle)||"").trim();return{status:h,summary:S}}function Fh(s,r){const g=String(s||"").replace(/\s+/g," ").trim();return g.length>r?`${g.slice(0,r)}…`:g}function Pt(s){return(s==null?void 0:s.kind)==="tool"&&String((s==null?void 0:s.toolName)||"").toLowerCase()==="image2"}function Oo(s){return(s==null?void 0:s.live)&&Pt(s)}function wc(s){return Pt(s)&&(s==null?void 0:s.pendingReplacement)===!0}function zh(s){var g,h;if(pi(s)&&!Pt(s)||((g=s==null?void 0:s.toolPresentation)==null?void 0:g.visibility)==="hidden"&&(s==null?void 0:s.kind)!=="error")return!0;if((s==null?void 0:s.kind)!=="user")return!1;const r=Vc(s);return Kp(r)?String((h=Vp(r))==null?void 0:h.id)!==String(s==null?void 0:s.id):!Fn(s)&&gi(s).length===0&&di(s==null?void 0:s.text).length===0}function Hh(s){const r=new Set,g=Date.now();for(const h of s||[]){if(!Oo(h))continue;const b=String(h.id);r.add(b),l.liveToolStartedAt[b]||(l.liveToolStartedAt[b]=g)}for(const h of Object.keys(l.liveToolStartedAt))r.has(h)||delete l.liveToolStartedAt[h]}function qs(s){if(!Oo(s))return"";const r=l.liveToolStartedAt[String(s.id)];return r?ui(l.clockTick-r):""}function Do(){var r,g,h,b,S,C,K,le,ie;const s=(g=(r=l.status)==null?void 0:r.metrics)==null?void 0:g.contextUsageRatio;Po("context",s===void 0?0:s*100),Po("inputTokens",Number(((b=(h=l.status)==null?void 0:h.usage)==null?void 0:b.inputTokens)??((C=(S=l.status)==null?void 0:S.metrics)==null?void 0:C.estimatedInputTokens)??0)),Po("outputTokens",Number(((le=(K=l.status)==null?void 0:K.usage)==null?void 0:le.outputTokens)??((ie=l.status)==null?void 0:ie.streamedOutputTokens)??0))}function Po(s,r){const g=l.composerMetrics[s],h=Number.isFinite(r)?Math.max(0,r):0;if(!g.initialized){g.display=h,g.target=h,g.initialized=!0;return}Math.abs(g.target-h)<.001||(g.target=h,g.bump+=1,jh())}function jh(){if(v)return;const s=()=>{let r=!1;for(const g of Object.values(l.composerMetrics)){const h=g.target-g.display;if(Math.abs(h)<.01){g.display=g.target;continue}const b=Math.min(.42,Math.max(.14,Math.abs(h)>1e3?.32:.2)),S=Math.sin(Date.now()/90)*Math.min(Math.abs(h)*.018,g.target*.006+1);g.display+=h*b+S,g.display<0&&(g.display=0),r=!0}r?v=requestAnimationFrame(s):v=0};v=requestAnimationFrame(s)}function $o(s){return`bump-${l.composerMetrics[s].bump%2}`}function Wh(s=[]){return new Map(s.map(r=>[String(r.taskId||r.agentId||r.description||r.type),r.status]))}function Zs(s){return String((s==null?void 0:s.taskId)||(s==null?void 0:s.agentId)||(s==null?void 0:s.sessionId)||"")}function Bo(s){return String((s==null?void 0:s.description)||(s==null?void 0:s.command)||(s==null?void 0:s.type)||"后台任务").replace(/\s+/g," ").trim()||"后台任务"}function ri(s){const r=Bo(s);return r.length>72?`${r.slice(0,72)}…`:r}function xc(s){const r=s==null?void 0:s.createdAt,g=Number(r),h=Number.isFinite(g)&&g>0?g:Date.parse(String(r||""));return!Number.isFinite(h)||h<=0?"":ui(l.clockTick-h)}function Sc(s){return String((s==null?void 0:s.prompt)||(s==null?void 0:s.command)||"").trim()}function Uo(s){var r,g;return String(((r=s==null?void 0:s.progress)==null?void 0:r.currentAction)||((g=s==null?void 0:s.progress)==null?void 0:g.lastText)||"").trim()}function Fo(s){var r;return Array.isArray((r=s==null?void 0:s.progress)==null?void 0:r.steps)?s.progress.steps:[]}function Kh(s){return er(String((s==null?void 0:s.output)||""))}function zo(s){l.backgroundTaskDetail={...s},document.body.classList.add("tool-detail-open")}function ii(){l.backgroundTaskDetail=void 0,document.body.classList.remove("tool-detail-open")}function Vh(s="ready"){return{ready:"就绪",running:"运行中",preparing:"准备中",calling_model:"调用模型",thinking:"推理中",running_tools:"调用工具",injecting_context:"注入上下文",compacting:"压缩上下文",stopped:"已停止",error:"出错"}[s]||s}function Gh(s){return i[s]||s||"未知"}function Ho(s){return o[s]||s}function qh(s){return(s||[]).map(r=>({value:r,label:a[r]||r}))}function Zh(s){return((s==null?void 0:s.options)||[]).map(r=>({value:r,label:r||"默认"}))}function Qh(s){return!["ansi","plain","diff"].includes(s.format)&&["assistant","thinking","system","tool"].includes(s.kind)}function Yh(s){return JSON.stringify((s==null?void 0:s.inputSchema)||{},null,2)}function Ec(s){return s!=null&&s.cacheStable?"稳定缓存段":"动态段"}function jo(s){l.runtimeContextModal=s,l.runtimeContextDetail=void 0,document.body.classList.add("runtime-context-open"),s==="plugins"&&ko(),s==="tools"&&Gr()}function Wo(){l.runtimeContextDetail=void 0,l.runtimeContextModal="",document.body.classList.remove("runtime-context-open")}function Ko(){l.runtimeContextDetail=void 0}function Jh(){l.projectContextOpen=!0,l.projectContextDocument=void 0,document.body.classList.add("runtime-context-open")}function Xh(s){l.projectContextDocument=s}function Vo(){if(l.projectContextDocument){l.projectContextDocument=void 0;return}l.projectContextOpen=!1,document.body.classList.remove("runtime-context-open")}async function ep(){l.cwdPicker.open=!0,l.cwdPicker.input=l.cwd||"",l.cwdPicker.selectionExplicit=!1,l.cwdPicker.error="",document.body.classList.add("cwd-picker-lock"),await ai(l.cwd)}function oi(){l.cwdPicker.mutating||(l.cwdPicker.open=!1,l.cwdPicker.error="",document.body.classList.remove("cwd-picker-lock"))}async function ai(s=l.cwdPicker.input){l.cwdPicker.loading=!0,l.cwdPicker.error="";try{const r=new URL("/api/cwd",window.location.origin);String(s||"").trim()&&r.searchParams.set("path",String(s).trim());const g=await fetch(N(`${r.pathname}${r.search}`)),h=await g.json().catch(()=>({}));if(!g.ok||h!=null&&h.error||(h==null?void 0:h.ok)===!1)throw zs(h,g.status);Go(h)}catch(r){l.cwdPicker.error=sn(r,"无法打开路径")}finally{l.cwdPicker.loading=!1}}function tp(s){return String(s||"").replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean).at(-1)||String(s||"")}function Go(s){const r=String(s.cwd||""),g={name:tp(r),path:r};l.cwdPicker.cwd=r,l.cwdPicker.parent=s.parent||"",l.cwdPicker.home=s.home||"",l.cwdPicker.locations=Array.isArray(s.locations)?s.locations:l.cwdPicker.locations,l.cwdPicker.entries=Array.isArray(s.entries)?s.entries:[],l.cwdPicker.input=r,l.cwdPicker.selectedPath=s.fallback?"":r,l.cwdPicker.selectionExplicit=!1,l.cwdPicker.treeRoots=[g],l.cwdPicker.treeChildren={[r]:l.cwdPicker.entries},l.cwdPicker.treeExpanded={[r]:!0}}async function np(s){const r=new URL("/api/cwd",window.location.origin);r.searchParams.set("path",s);const g=await fetch(N(`${r.pathname}${r.search}`)),h=await g.json().catch(()=>({}));if(!g.ok||h!=null&&h.error||(h==null?void 0:h.ok)===!1)throw zs(h,g.status);return Array.isArray(h.locations)&&(l.cwdPicker.locations=h.locations),h}async function sp(s){const r=s.path;if(l.cwdPicker.treeExpanded[r]){l.cwdPicker.treeExpanded={...l.cwdPicker.treeExpanded,[r]:!1};return}l.cwdPicker.error="";try{if(!l.cwdPicker.treeChildren[r]){const g=await np(r);l.cwdPicker.treeChildren={...l.cwdPicker.treeChildren,[r]:g.entries||[]}}l.cwdPicker.treeExpanded={...l.cwdPicker.treeExpanded,[r]:!0}}catch(g){l.cwdPicker.error=sn(g,"无法展开路径")}}function rp(s){l.cwdPicker.selectedPath=s.path,l.cwdPicker.selectionExplicit=!0,l.cwdPicker.input=s.path}async function ip(){const s=String(l.cwdPicker.input||"").trim();if(s){l.cwdPicker.mutating=!0,l.cwdPicker.error="";try{const r=await Ve("/api/cwd/create",{path:s});Go(r)}catch(r){l.cwdPicker.error=sn(r,"新建失败")}finally{l.cwdPicker.mutating=!1}}}async function op(s){if(await Us({title:"删除文件夹?",message:s.path,confirmLabel:"删除",tone:"danger"})){l.cwdPicker.mutating=!0;try{const g=await Ve("/api/cwd/delete",{path:s.path});Go(g)}catch(g){l.cwdPicker.error=sn(g,"删除失败")}finally{l.cwdPicker.mutating=!1}}}async function ap(){const s=String(l.cwdPicker.selectionExplicit?l.cwdPicker.selectedPath:l.cwdPicker.input).trim();if(s&&!(!l.cwdPicker.selectionExplicit&&s===l.cwdPicker.cwd&&s!==l.cwd)){l.cwdPicker.mutating=!0,l.cwdPicker.error="";try{const r=await Ve("/api/cwd/change",{path:s});l.cwd=r.cwd||s,l.cwdPicker.open=!1,document.body.classList.remove("cwd-picker-lock"),await Vr(),be(r.unchanged?"工作目录未变":"工作目录已切换")}catch(r){l.cwdPicker.error=sn(r,"切换失败")}finally{l.cwdPicker.mutating=!1}}}function lp(s){l.runtimeContextDetail={kind:"prompt",title:s.name,meta:Ec(s),content:s.content}}function cp(){var s,r,g,h;l.runtimeContextDetail={kind:"prompt",title:"完整系统提示词",meta:`${rn(((r=(s=l.runtimeContext)==null?void 0:s.prompt)==null?void 0:r.chars)||0)} 字符`,content:((h=(g=l.runtimeContext)==null?void 0:g.prompt)==null?void 0:h.systemPrompt)||""}}function up(s){s&&(l.runtimeContextDetail={kind:"tool",title:s.name,meta:s.strict?"严格模式":"兼容模式",description:s.description||"",schema:Yh(s)})}function li(s){if(Mo(s))return fp(s);if(ci(s))return Jo(s);if(cs(s).length)return Dc(s);if(pp(s))return yp(s);if(mp(s))return bp(s);const r=Fn(s),g=Pc(s),h=g.map(K=>`${K.kind}:${K.reference||""}:${K.url}:${K.label||K.downloadName||""}:${K.expiresAt||""}`).join("|"),b=[s.id,s.kind,s.format,s.title,s.titleStatus,s.live?"1":"0",h,r].join(""),S=Y.get(b);if(S!==void 0)return S;let C;return s.format==="diff"?C=Ic(r):s.format==="ansi"||!Qh(s)?C=nu(qe(er(r))):C=xp(Ys(Re.parse(r||""),g.map($c)),g),Y.set(b,C),C}function dp(s){if(!s)return"";if(Pt(s))return Ip(s);const r=Fn(s);if(s.format==="diff"||/(?:^|\n)---\s+.+\n\+\+\+\s+/.test(r))return Ic(r);if(s.format==="ansi")return`<pre class="tool-detail-pre">${qe(er(r))}</pre>`;const g=Yo(r);if(g){const h=JSON.stringify(g,null,2);return Ys(Re.parse(`\`\`\`json
114
+ ${h}
115
+ \`\`\``))}return`<pre class="tool-detail-pre">${qe(er(r))}</pre>`}function fp(s){const r=gp(s),g=Array.isArray(r==null?void 0:r.items)?r.items:[];if(!r||!g.length)return Ys(Re.parse(Fn(s)||""));const h=Ac(g),b=Number.isFinite(Number(r.completed))?Number(r.completed):h.completed,S=Number.isFinite(Number(r.total))?Number(r.total):h.total,C=S>0?Math.max(0,Math.min(100,b/S*100)):0,K=qe(r.title||"任务计划"),le=Tc(g),ie=r.note?`<div class="plan-note"><span>说明</span><p>${qe(r.note)}</p></div>`:"";return`<section class="plan-card"><div class="plan-card-head"><div><span class="plan-kicker">执行计划</span><strong>${K}</strong></div><span class="plan-progress-label">${b} / ${S}</span></div><div class="plan-progress-track" aria-label="计划进度 ${Math.round(C)}%"><span style="width:${C.toFixed(2)}%"></span></div><ol class="plan-items">${le}</ol>${ie}</section>`}function Tc(s,r=0){return s.map((g,h)=>{const b=Cc(g==null?void 0:g.status),S=b==="completed"?"✓":b==="in_progress"?"●":b==="failed"?"!":String(h+1),C=Array.isArray(g==null?void 0:g.subitems)?g.subitems:[],K=C.length?`<ol class="plan-subitems" aria-label="${qe((g==null?void 0:g.description)||`步骤 ${h+1}`)}的子步骤">${Tc(C,r+1)}</ol>`:"";return`<li class="plan-item status-${b}" data-plan-depth="${r}"><div class="plan-item-row"><span class="plan-item-marker" aria-hidden="true">${S}</span><span class="plan-item-text">${qe((g==null?void 0:g.description)||`步骤 ${h+1}`)}</span><span class="plan-item-status">${hp(b)}</span></div>${K}</li>`}).join("")}function Ac(s){return s.reduce((r,g)=>{if(r.total+=1,Cc(g==null?void 0:g.status)==="completed"&&(r.completed+=1),Array.isArray(g==null?void 0:g.subitems)&&g.subitems.length){const h=Ac(g.subitems);r.total+=h.total,r.completed+=h.completed}return r},{total:0,completed:0})}function gp(s){const r=String((s==null?void 0:s.text)||""),g=Yo(r),h=g!=null&&g.output&&typeof g.output=="object"?g.output:g;if(Array.isArray(h==null?void 0:h.items))return h;const b=r.split(/\r?\n/).map(ie=>ie.trim()).filter(Boolean),S=/^(\d+)\s*\/\s*(\d+)\s+completed/i.exec(b[0]||""),K=b.filter(ie=>/^[-*]\s+/.test(ie)).map(ie=>{let Ee=ie.replace(/^[-*]\s+/,"").trim(),Ge="pending";return/^~~[\s\S]+~~$/.test(Ee)?(Ge="completed",Ee=Ee.slice(2,-2).trim()):/^[▶►●]\s*/.test(Ee)?(Ge="in_progress",Ee=Ee.replace(/^[▶►●]\s*/,"").trim()):/^[!✗×]\s*/.test(Ee)&&(Ge="failed",Ee=Ee.replace(/^[!✗×]\s*/,"").trim()),{description:Ee,status:Ge}});return{title:"当前执行计划",note:b.slice(S?1:0).filter(ie=>!/^[-*]\s+/.test(ie)).join(" "),items:K,completed:S?Number(S[1]):K.filter(ie=>ie.status==="completed").length,total:S?Number(S[2]):K.length}}function Cc(s){const r=String(s||"pending").toLowerCase().replace(/[\s-]+/g,"_");return r==="complete"||r==="done"?"completed":r==="running"||r==="inprogress"?"in_progress":r==="error"?"failed":["completed","in_progress","failed","pending"].includes(r)?r:"pending"}function hp(s){return{completed:"已完成",in_progress:"进行中",failed:"失败",pending:"待处理"}[s]||"待处理"}function Ic(s){return`<pre class="diff-block">${qe(s)}</pre>`}function ci(s){return Pt(s)&&/\b(ok|failed|generated|edited|image\s+(?:generate|edit)\s+failed)\b/i.test(String((s==null?void 0:s.text)||""))}function pp(s){const r=String((s==null?void 0:s.title)||"").toLowerCase();return(s==null?void 0:s.kind)==="tool"&&r==="image_note"}function mp(s){const r=String((s==null?void 0:s.title)||"").toLowerCase();return(s==null?void 0:s.kind)==="tool"&&r==="skill_read"}function bp(s){return Ys(Re.parse(`技能${kp((s==null?void 0:s.text)||"")}`))}function kp(s){var b,S,C;const r=String(s||""),g=((b=/\bname:\s*([^\s]+)/i.exec(r))==null?void 0:b[1])||((S=/(?:^|\s)skill:\s*([^\s]+)/i.exec(r))==null?void 0:S[1])||((C=/(?:^|\s)id:\s*([^\s]+)/i.exec(r))==null?void 0:C[1]),h=String(g||"").trim();return h||""}function yp(s){return Ys(Re.parse(`图片记录${_p((s==null?void 0:s.text)||"")}`))}function _p(s){const r=vp(s);return r?` ${r}`:""}function vp(s){var K,le,ie,Ee,Ge;const r=String(s||""),g=(K=/(?:^|\s)(?:storagePath|path|file|filename):\s*([^\s]+\.(?:png|jpe?g|webp|gif|bmp|avif|txt))/i.exec(r))==null?void 0:K[1],h=g?qo(g.split(/[\\/]/).pop()||""):"";if(h)return h;const b=(le=/(?:^|\s)imageRef:\s*([^\s]+)/i.exec(r))==null?void 0:le[1],S=qo(b||"");if(S)return S;const C=((ie=/(?:^|\s)tags:\s*(?:[-*]\s*)?([^\n\r,,]+)/i.exec(r))==null?void 0:ie[1])||((Ee=/(?:^|\s)detectedText:\s*(?:[-*]\s*)?([^\n\r,,]+)/i.exec(r))==null?void 0:Ee[1])||((Ge=/(?:^|\s)caption:\s*([^.,,。;\n\r]{2,24})/i.exec(r))==null?void 0:Ge[1]);return qo(C||"")}function qo(s){let r=String(s||"").trim();return r=r.replace(/\.base64\.txt$/i,"").replace(/\.(?:png|jpe?g|webp|gif|bmp|avif|txt)$/i,""),r=r.replace(/^[-*]\s*/,"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim(),!r||/^ok$/i.test(r)?"":r.length>18?`${r.slice(0,18)}...`:r}async function Mc(){if(!(p||!f)){p=!0;try{if(!await Rc(f))throw new Error("无法重新绑定目标会话")}catch(s){be(`会话恢复失败:${s.message||s}`)}finally{p=!1}}}async function Rc(s){var h;const r=String(s||"").trim();return!r||(Zo(),f=r,m=!1,sessionStorage.setItem(hs,r),!await os({silent:!0})||String(((h=l.session)==null?void 0:h.sessionId)||"")!==r)?!1:(qr(),!0)}async function Nc(s,r){Zo(),u=s,f=r,m=!r,sessionStorage.setItem(Ii,s),r?sessionStorage.setItem(hs,r):sessionStorage.removeItem(hs);const g=await os({silent:!0});return g&&qr(),g}function Zo(){ve&&ve.close(),ve=void 0,Be&&cancelAnimationFrame(Be),Be=0,Zr(),_t=void 0,At=!1,l.connected=!1,l.connecting=!0}function cs(s){return Array.isArray(s==null?void 0:s.resources)?s.resources.filter(r=>r&&typeof r=="object"&&typeof r.url=="string"&&r.url):[]}function Qo(s){return cs(s).filter(r=>r.kind==="embed")}function Lc(s){return cs(s).filter(r=>r.kind!=="embed")}function wp(s){const r=new URL(s.url,window.location.origin);return r.searchParams.set("theme",re.value),r.origin===window.location.origin?`${r.pathname}${r.search}${r.hash}`:r.href}function Oc(s){const r=Number(s==null?void 0:s.height);return Number.isFinite(r)?Math.max(240,Math.min(1600,Math.round(r))):640}function Dc(s){const r=Lc(s);return r.length?`<div class="resource-result"><div class="resource-grid">${r.map((h,b)=>{const S=qe(h.label||h.downloadName||`资源 ${b+1}`),C=qe(h.url),K=h.sizeBytes?ta(h.sizeBytes):"",le=h.expiresAt?Ep(h.expiresAt):"",ie=[K,le].filter(Boolean).join(" · "),Ee=h.kind==="download"||h.downloadName,Ge=Ee?"下载":"打开",on=Ee?` download="${qe(h.downloadName||h.label||"")}"`:' target="_blank" rel="noreferrer noopener"';if(Ee){const x=qe(K.replace(/\s+/g,"")),M=Number(h.expiresAt)||0;return`<a class="resource-file-link" href="${C}"${on} data-resource-download="true" data-resource-expires-at="${M}"><span class="resource-file-name">${S}</span>${x?`<span class="resource-file-size">(${x})</span>`:""}</a>`}return`<a class="resource-card resource-${qe(h.kind||"link")}" href="${C}"${on}><span class="resource-icon" aria-hidden="true"></span><span class="resource-main"><strong>${S}</strong><span>${qe(ie||(Ee?"文件已就绪":"资源已就绪"))}</span></span><span class="resource-action"><span>${Ge}</span><i aria-hidden="true">${Ee?"↓":"↗"}</i></span></a>`}).join("")}</div></div>`:nu(qe(er(Fn(s))))}function Pc(s){if((s==null?void 0:s.kind)!=="assistant")return[];const r=l.lines||[],g=r.findIndex(C=>String(C==null?void 0:C.id)===String(s==null?void 0:s.id)),h=g>=0?g:r.length,b=[],S=new Set;for(let C=0;C<h;C+=1){const K=r[C];if(!(K!=null&&K.live))for(const le of cs(K))S.has(le.url)||(S.add(le.url),b.push(le))}return b}function xp(s,r){if(!r.length)return s;const g=new Map(r.map(b=>[$c(b),b]).filter(([b])=>b)),h=document.createElement("template");h.innerHTML=String(s||"");for(const b of h.content.querySelectorAll("a[href]")){const S=b.getAttribute("href")||"",C=g.get(S);C&&(b.classList.add("inline-resource-link",`inline-resource-${C.kind||"link"}`),b.setAttribute("href",C.url),(C.kind==="download"||C.downloadName)&&(b.setAttribute("download",C.downloadName||C.label||""),b.removeAttribute("target"),b.removeAttribute("rel"),b.setAttribute("title",`下载 ${C.label||C.downloadName||"资源"}`),b.dataset.resourceDownload="true",b.dataset.resourceExpiresAt=String(Number(C.expiresAt)||0),C.sizeBytes&&(b.dataset.resourceSize=`(${ta(C.sizeBytes).replace(/\s+/g,"")})`)))}return h.innerHTML}function $c(s){return String((s==null?void 0:s.reference)||"").trim()}function Yo(s){const r=String(s||"");if(!r.includes("{"))return null;const g=Sp(r);g.sort((h,b)=>h.start-b.start||b.end-h.end);for(const{start:h,end:b}of g)try{return JSON.parse(r.slice(h,b+1))}catch{}return null}function Sp(s){const r=[],g=[];let h=!1,b=!1;for(let S=0;S<s.length;S+=1){const C=s[S];if(h){b?b=!1:C==="\\"?b=!0:C==='"'?h=!1:(C===`
116
+ `||C==="\r")&&(h=!1,b=!1);continue}if(g.length&&C==='"'){h=!0;continue}if(C==="{"){g.push(S);continue}C==="}"&&g.length&&r.push({start:g.pop(),end:S})}return r}function Ep(s){const r=Number(s);if(!Number.isFinite(r))return"";const g=r-Date.now();return g<=0?"已过期":`${ui(g)} 后过期`}function Tp(s){return fi(s).length||ci(s)?Jo(s):Ap(s)}function Ap(s){const r=Cp(s),g=r.prompt?`<div class="image2-stage-prompt"><p>${qe(Fh(r.prompt,240))}</p></div>`:"";return`<div class="image2-stage"><div class="image2-diamond-field" aria-hidden="true">${Array.from({length:11},(b,S)=>`<i class="diamond-${S+1}"></i>`).join("")}<b></b></div>${g}</div>`}function Cp(s){const r=Yo((s==null?void 0:s.text)||"")||{},g=r.input||r.arguments||r.args||r;return{mode:String(g.mode||"").toLowerCase(),model:String(g.model||""),size:String(g.size||""),prompt:String(g.prompt||"")}}function Jo(s){const r=Bc(s.text||""),g=String(s.text||""),h=/\bfail(?:ed)?\b|failed/i.test(g)?"生成失败":/^edited\b/i.test(g.trim())?"修改完成":"生成完成",b=[r.count?`${r.count} 张`:"",r.model,r.size,r.quality,r.outputFormat,r.sourceImages?`源图 ${r.sourceImages} 张`:"",r.duration].filter(Boolean);return`<div class="image2-result"><div class="image2-summary"><strong>${qe(h)}</strong>${b.map(S=>`<span>${qe(S)}</span>`).join("")}</div></div>`}function Ip(s){const r=Bc((s==null?void 0:s.text)||""),g=[["模型",r.model],["模式",r.mode],["尺寸",r.size],["质量",r.quality],["格式",r.outputFormat],["背景",r.background],["图片数量",r.count?`${r.count} 张`:""],["源图数量",r.sourceImages?`${r.sourceImages} 张`:""],["耗时",r.duration],["语义名称",r.semanticName],["开始时间",r.startedAt],["完成时间",r.finishedAt]].filter(([,C])=>C),h=g.length?`<dl class="image2-detail-grid">${g.map(([C,K])=>`<div><dt>${qe(C)}</dt><dd>${qe(K)}</dd></div>`).join("")}</dl>`:"",b=r.prompt?`<section class="image2-detail-prompt"><span>调用提示词</span><p>${qe(r.prompt)}</p></section>`:'<section class="image2-detail-prompt empty"><span>调用提示词</span><p>当前历史记录未保存提示词;新执行的 image2 调用会在这里显示。</p></section>',S=r.revisedPrompt&&r.revisedPrompt!==r.prompt?`<section class="image2-detail-prompt"><span>修订提示词</span><p>${qe(r.revisedPrompt)}</p></section>`:"";return`<div class="image2-detail-view">${h}${b}${S}</div>`}function Bc(s){const r=String(s||""),g=r.replace(/\s+/g," ").trim(),h=r.split(/\r?\n/).map(le=>le.trim()).filter(Boolean),b=/^(generated|edited)\s+(\d+)\s+images?/i.exec(h[0]||g),C=(h.find(le=>le.includes(" · "))||"").split(" · ").map(le=>le.trim()).filter(Boolean),K=Mp(g,["duration","durationMs","elapsed","elapsedMs"]);return{provider:ft(g,"provider",["model","prompt"])||C[0]||"",model:ft(g,"model",["prompt"])||C[1]||"",prompt:ft(g,"prompt",["revisedPrompt","mode","semanticName","size","quality","outputFormat","background","returnedImages","startedAt","finishedAt","duration"]),mode:ft(g,"mode",["semanticName","prompt","size","quality"]),semanticName:ft(g,"semanticName",["prompt","size","quality","outputFormat"]),size:ft(g,"size",["quality","outputFormat","background","returnedImages","duration"])||C.find(le=>/^\d+x\d+$/i.test(le))||"",quality:ft(g,"quality",["outputFormat","background","returnedImages","duration"])||C.find(le=>["low","medium","high"].includes(le.toLowerCase()))||"",outputFormat:ft(g,"outputFormat",["background","returnedImages","images","duration"])||C.find(le=>["png","jpeg","jpg","webp"].includes(le.toLowerCase()))||"",background:ft(g,"background",["returnedImages","images","startedAt","finishedAt","duration"]),sourceImages:ft(g,"source images",["prompt","mode","semanticName","duration"]),count:ft(g,"returnedImages",["images","index","duration"])||(b==null?void 0:b[2])||"",revisedPrompt:ft(g,"revisedPrompt",["mode","semanticName","raw","created","data","b64_json","background","output_format","quality","size","usage","startedAt","finishedAt","duration"]),usage:ft(g,"usage",["duration"]),startedAt:ft(g,"startedAt",["finishedAt","duration"]),finishedAt:ft(g,"finishedAt",["duration"]),duration:K===void 0?"":ui(K)}}function ft(s,r,g){var C;const h=g.length?`(?=\\s(?:${g.map(Qs).join("|")}):)`:"$",S=new RegExp(`(?:^|\\s)${Qs(r)}:\\s*([\\s\\S]*?)${h}`,"i").exec(s);return((C=S==null?void 0:S[1])==null?void 0:C.replace(/\[(?:base64 image|data URL) omitted[^\]]*\]/gi,"").trim().replace(/\s{2,}/g," "))||""}function Mp(s,r){for(const g of r){const h=new RegExp(`(?:^|\\s)${Qs(g)}:\\s*(\\d+(?:\\.\\d+)?)\\s*ms?\\b`,"i").exec(s);if(h)return Number(h[1])}}function ui(s){const r=Math.max(0,Number(s)||0);if(r<1e3)return`${Math.round(r)}ms`;if(r<6e4)return`${(r/1e3).toFixed(r<1e4?1:0).replace(/\.0$/,"")}s`;const g=Math.floor(r/6e4),h=Math.round(r%6e4/1e3);return`${g}m ${h}s`}function Qs(s){return String(s).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ys(s,r=[]){const g=new Set(r.map(K=>String(K||"").trim()).filter(Boolean)),h=document.createElement("template");h.innerHTML=String(s);const b=new Set(["A","P","BR","STRONG","B","EM","I","CODE","PRE","BLOCKQUOTE","UL","OL","LI","H1","H2","H3","H4","H5","H6","HR","TABLE","THEAD","TBODY","TR","TH","TD","DEL","S","INPUT"]),S=document.createTreeWalker(h.content,NodeFilter.SHOW_ELEMENT),C=[];for(;S.nextNode();)C.push(S.currentNode);for(const K of C){if(!b.has(K.tagName)){K.replaceWith(document.createTextNode(K.textContent||""));continue}for(const le of Array.from(K.attributes)){const ie=le.name.toLowerCase(),Ee=le.value;K.tagName==="A"&&ie==="href"&&(pm(Ee)||g.has(Ee))||K.tagName==="A"&&ie==="title"||K.tagName==="CODE"&&ie==="class"&&/^language-[\w-]+$/.test(Ee)||K.tagName==="PRE"&&ie==="data-lang"&&/^[\w-]+$/.test(Ee)||K.tagName==="INPUT"&&["type","checked","disabled"].includes(ie)||K.removeAttribute(le.name)}K.tagName==="A"&&!g.has(K.getAttribute("href")||"")&&(K.setAttribute("target","_blank"),K.setAttribute("rel","noreferrer noopener"))}return Rp(h.content),h.innerHTML}function Rp(s){for(const r of s.querySelectorAll("pre > code")){const g=Np(r.className),h=r.textContent||"",b=r.parentElement;b&&g&&b.setAttribute("data-lang",g);try{const S=g&&je.getLanguage(g)?je.highlight(h,{language:g,ignoreIllegals:!0}):h.length<=2e4?je.highlightAuto(h):void 0;if(!S)continue;r.innerHTML=S.value,r.className=["hljs",S.language?`language-${S.language}`:g?`language-${g}`:""].filter(Boolean).join(" "),b&&S.language&&!b.hasAttribute("data-lang")&&b.setAttribute("data-lang",S.language)}catch{r.textContent=h}}}function Np(s){const r=/(?:^|\s)language-([\w-]+)/.exec(s||"")||/(?:^|\s)lang-([\w-]+)/.exec(s||"");if(!r)return"";const g=r[1].toLowerCase();return{cjs:"javascript",mjs:"javascript",node:"javascript",shell:"bash",zsh:"bash",powershell:"bash",ps1:"bash",python3:"python",yml:"yaml",html:"xml",vue:"xml"}[g]||g}function Lp(s){s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),tc())}function Uc(s){var r;if(s.key==="Escape"&&l.confirmDialog.open){s.preventDefault(),as(!1);return}if(s.key==="Escape"&&l.contextWindowModalOpen){s.preventDefault(),wo();return}if(s.key==="Escape"&&l.compactionDetailLineId!==void 0){s.preventDefault(),Xr();return}if(s.key==="Escape"&&l.backgroundTaskDetail){s.preventDefault(),ii();return}if(s.key==="Escape"&&l.projectContextOpen){s.preventDefault(),Vo();return}if(s.key==="Escape"&&l.cwdPicker.open){s.preventDefault(),oi();return}if(s.key==="Escape"&&l.runtimeContextDetail){s.preventDefault(),Ko();return}if(s.key==="Escape"&&l.runtimeContextModal){s.preventDefault(),Wo();return}if(s.key==="Escape"&&l.imagePreview){s.preventDefault(),No();return}if(s.key==="Escape"&&l.toolDetailLineId!==void 0){s.preventDefault(),Ks();return}(s.ctrlKey||s.metaKey)&&s.key.toLowerCase()==="k"&&(s.preventDefault(),(r=oe.value)==null||r.focus()),(s.ctrlKey||s.metaKey)&&s.key.toLowerCase()==="c"&&!R.value&&nc()}function Op(){var s;try{const r=localStorage.getItem(Ed);if(r==="light"||r==="dark")return r}catch{}return(s=window.matchMedia)!=null&&s.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}async function Dp(s){var g,h,b;const r=(b=(h=(g=window.__TAURI__)==null?void 0:g.window)==null?void 0:h.getCurrentWindow)==null?void 0:b.call(h);if(r!=null&&r.setTheme)try{await r.setTheme(s==="dark"?"dark":"light")}catch{}}function Pp(s){var r;document.documentElement.dataset.theme=s,document.documentElement.style.colorScheme=s,(r=document.querySelector('meta[name="theme-color"]'))==null||r.setAttribute("content",s==="dark"?"#0c0c0f":"#ffffff"),Dp(s);try{localStorage.setItem(Ed,s)}catch{}}function Fc(){re.value=re.value==="dark"?"light":"dark"}async function $p(s){var h;const r=Array.from(((h=s.clipboardData)==null?void 0:h.files)||[]).filter(b=>b.type.startsWith("image/"));if(!r.length)return;s.preventDefault();const g=[];for(const b of r){const S=++l.attachmentCounter,C=`[img#${S}]`,K=await Yc(b);K.compressionRate>0&&g.push(K.compressionRate),l.attachments.push({kind:"image",imageId:Hc(),label:C,mimeType:K.mimeType,data:K.data,previewUrl:K.previewUrl,name:b.name||`图片 ${S}`})}be(`已添加 ${r.length} 张图片附件`),g.length&&setTimeout(()=>be(Xc(g)),0)}function Bp(){var s;(s=ne.value)==null||s.click()}async function Up(s){var g;const r=Array.from(((g=s==null?void 0:s.target)==null?void 0:g.files)||[]);r.length&&(await zc(r),s!=null&&s.target&&(s.target.value=""))}async function zc(s){var r;l.uploadingFiles=!0;try{const g=[],h=[];for(const b of s){if(b.type.startsWith("image/")){const K=await Yc(b),le=`[img#${++l.attachmentCounter}]`;K.compressionRate>0&&h.push(K.compressionRate),g.push({kind:"image",imageId:Hc(),label:le,name:b.name||le,mimeType:K.mimeType,data:K.data,previewUrl:K.previewUrl});continue}const S=await em(b),C=await Ve("/api/uploads",{name:b.name,mimeType:b.type||"application/octet-stream",data:S.data});if(!((r=C==null?void 0:C.file)!=null&&r.absolutePath))throw new Error("upload response missing path");g.push({kind:"file",label:`[file#${++l.attachmentCounter}]`,name:C.file.name||b.name||`附件 ${l.attachmentCounter}`,mimeType:C.file.mimeType||b.type||"application/octet-stream",size:Number(C.file.size||b.size||0),absolutePath:C.file.absolutePath,relativePath:C.file.relativePath||""})}l.attachments.push(...g),h.length&&setTimeout(()=>be(Xc(h)),0),be(`已上传 ${g.length} 个附件`)}catch(g){be(g.message||String(g))}finally{l.uploadingFiles=!1}}function Hc(){return typeof(crypto==null?void 0:crypto.randomUUID)=="function"?`image_${crypto.randomUUID()}`:`image_${Date.now().toString(16).slice(-8).padStart(8,"0")}-${Math.random().toString(16).slice(2,6).padEnd(4,"0")}-4${Math.random().toString(16).slice(2,5).padEnd(3,"0")}-a${Math.random().toString(16).slice(2,5).padEnd(3,"0")}-${Math.random().toString(16).slice(2,14).padEnd(12,"0")}`}function jc(s,r){if(!r.length)return s;const g=r.map(h=>h.label).join(" ");return s.trim()?`${s.trim()}
117
+
118
+ ${g}`:g}function Fp(s){return String(s).replace(/\s*\[img#\d+\]\s*/g," ").replace(/[ \t]{2,}/g," ").trim()}function zp(s){return String(s).replace(uT,"").replace(dT,"").replace(fT,"").replace(/[ \t]{2,}/g," ").trim()}function Hp(s){return String(s||"").replace(new RegExp(`${Qs(gT)}[\\s\\S]*?${Qs(hT)}`,"g"),"").replace(/[ \t]{2,}/g," ").replace(/\n{3,}/g,`
119
+
120
+ `).trim()}function di(s){return Array.from(new Set(String(s||"").match(/\[img#\d+\]/g)||[]))}function Wc(s){var h;const r=String(((h=l.session)==null?void 0:h.sessionId)||f||""),g=s.filter(b=>(b==null?void 0:b.kind)==="image"&&b.imageId&&b.previewUrl).map(b=>({sessionId:r,imageId:b.imageId,label:b.label,mimeType:b.mimeType,previewUrl:b.previewUrl,originalUrl:b.previewUrl,name:b.name,available:!0,pending:!0}));Kc(g)}function jp(s){const r=[];for(const g of s||[])hi(g,r);Kc(r.map(Xo).filter(Boolean))}function Js(s){var g;const r=String((s==null?void 0:s.sessionId)||((g=l.session)==null?void 0:g.sessionId)||f||"");return s!=null&&s.imageId?`${r}:image:${s.imageId}`:s!=null&&s.messageId&&Number.isInteger(Number(s==null?void 0:s.blockIndex))?`${r}:block:${s.messageId}:${Number(s.blockIndex)}`:""}function Kc(s){if(!s.length)return;const r=s.map(h=>{var b;return{...h,sessionId:String(h.sessionId||((b=l.session)==null?void 0:b.sessionId)||f||"")}}),g=new Set(r.map(Js).filter(Boolean));l.messageImagePreviews=[...l.messageImagePreviews.filter(h=>{const b=Js(h);return!b||!g.has(b)}),...r].slice(-200)}function fi(s){var h;if(Pt(s))return Wp(s);const r=(s==null?void 0:s.kind)==="user"?Vc(s):[s],g=[];for(const b of r){g.push(...gi(b));for(const S of di(b==null?void 0:b.text)){const C=String(((h=l.session)==null?void 0:h.sessionId)||f||""),K=l.messageImagePreviews.filter(ie=>ie.sessionId===C&&ie.label===S),le=String((b==null?void 0:b.messageId)||"").startsWith("web-user-")?[...K].reverse().find(ie=>ie.pending):K.length===1?K[0]:void 0;le&&g.push(le)}}return ea(g)}function Wp(s){const r=[];hi(s,r);for(const g of Gp(s))hi(g,r);return ea(r.map(Xo).filter(Boolean))}function gi(s){const r=[];return hi(s,r),ea(r.map(g=>Xo(g)).filter(Boolean))}function Vc(s){if((s==null?void 0:s.kind)!=="user")return[s];const r=String((s==null?void 0:s.messageId)||"");return r?(l.lines||[]).filter(h=>(h==null?void 0:h.kind)==="user"&&String((h==null?void 0:h.messageId)||"")===r):[s]}function Kp(s){return s.some(r=>gi(r).length>0||di(r==null?void 0:r.text).length>0)}function Vp(s){return s.find(r=>Fn(r))||s.find(r=>gi(r).length>0||di(r==null?void 0:r.text).length>0)||s[0]}function Gp(s){const r=l.lines||[],g=String((s==null?void 0:s.toolUseId)||"");if(g)return r.filter(S=>pi(S)&&String((S==null?void 0:S.parentToolUseId)||"")===g);const h=r.findIndex(S=>(S==null?void 0:S.id)===(s==null?void 0:s.id));if(h<0)return[];const b=[];for(let S=h+1;S<r.length;S+=1){const C=r[S];if(pi(C)&&!Pt(C)){b.push(C);continue}if((C==null?void 0:C.kind)==="tool"||(C==null?void 0:C.kind)==="user"||(C==null?void 0:C.kind)==="assistant"&&String((C==null?void 0:C.text)||"").trim())break}return b}function hi(s,r){if(!s||typeof s!="object")return;const g=b=>{var S;return r.push({...b,messageId:b.messageId||s.messageId,sessionId:b.sessionId||((S=l.session)==null?void 0:S.sessionId)||f||""})},h=[s.images,s.imageAttachments,s.attachments,s.thumbnails];for(const b of h)if(Array.isArray(b))for(const S of b)!S||S.kind&&S.kind!=="image"||S.type&&S.type!=="image"||g(S);if(Array.isArray(s.blocks))for(const b of s.blocks)(b==null?void 0:b.type)==="image"&&g(b);s.image&&g(s.image)}function Xo(s){var S,C,K,le,ie,Ee;if(!s||typeof s!="object")return;const r=s.mimeType||((S=s.thumbnail)==null?void 0:S.mimeType)||((C=s.original)==null?void 0:C.mimeType)||"image/png",g=s.thumbnailSrc||((K=s.thumbnail)==null?void 0:K.src)||s.previewUrl||s.src||s.originalSrc||((le=s.original)==null?void 0:le.src)||qp(s.data,r);if(!g&&s.available!==!1)return;const h=g?su(g):"",b=s.originalSrc||((ie=s.original)==null?void 0:ie.src)||s.src||s.previewUrl||g;return{sessionId:String(s.sessionId||((Ee=l.session)==null?void 0:Ee.sessionId)||f||""),messageId:s.messageId,blockIndex:Number.isInteger(Number(s.blockIndex??s.index))?Number(s.blockIndex??s.index):void 0,imageId:s.imageId,label:s.label,mimeType:r,available:s.available!==!1&&!!h,error:s.error,previewUrl:h,originalUrl:b?su(b):"",name:s.name||s.filename||s.label,sizeBytes:s.sizeBytes,pending:s.pending===!0}}function qp(s,r){return!s||typeof s!="string"?"":s.startsWith("data:")?s:`data:${r};base64,${s}`}function ea(s){const r=new Set,g=[];for(const[h,b]of s.entries()){const S=Js(b)||(b.previewUrl?`url:${b.previewUrl}`:`position:${b.messageId||"unknown"}:${b.blockIndex??h}`);r.has(S)||(r.add(S),g.push(b))}return g}function us(s,r){return(s==null?void 0:s.label)||(s!=null&&s.name&&!/^\[img#\d+\]$/.test(s.name)?s.name:`图片 ${r+1}`)}function Gc(s,r){const g=Zp(s==null?void 0:s.mimeType),h=((s==null?void 0:s.name)||(s==null?void 0:s.label)||`image-${r+1}`).replace(/[^\p{L}\p{N}._-]+/gu,"-").replace(/^-+|-+$/g,"")||`image-${r+1}`;return/\.[a-z0-9]{2,5}$/i.test(h)?h:`${h}.${g}`}function Zp(s){const r=String(s||"").toLowerCase();return r.includes("jpeg")?"jpg":r.includes("webp")?"webp":r.includes("gif")?"gif":"png"}function pi(s){return(s==null?void 0:s.kind)==="tool"&&String((s==null?void 0:s.parentToolName)||"").toLowerCase()==="image2"}function Qp(s){return pi(s)&&fi(s).length>0}function qc(s){l.attachments=l.attachments.filter(r=>r.label!==s)}function Zc(){return l.attachments.filter(s=>s.kind==="file")}function Qc(){return l.attachments.filter(s=>s.kind==="image")}function Yp(s,r){return(s==null?void 0:s.name)||`附件 ${r+1}`}function Jp(s){return`${Xp(s)} · ${ta(s==null?void 0:s.size)}`}function Xp(s){const r=String((s==null?void 0:s.mimeType)||"").toLowerCase();return r?r.includes("pdf")?"PDF":r.includes("spreadsheet")||r.includes("excel")||r.includes("csv")?"表格":r.includes("word")||r.includes("document")?"文档":r.startsWith("text/")?"文本":r.startsWith("image/")?"图片":"文件":"文件"}function ta(s){const r=Number(s||0);return!Number.isFinite(r)||r<=0?"0 B":r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(r<10*1024?1:0).replace(/\.0$/,"")} KB`:r<1024*1024*1024?`${(r/(1024*1024)).toFixed(r<10*1024*1024?1:0).replace(/\.0$/,"")} MB`:`${(r/(1024*1024*1024)).toFixed(1).replace(/\.0$/,"")} GB`}async function Yc(s){const r=await na(s);return tm(r,s.type||"image/png")}async function em(s){const r=await na(s),g=r.indexOf(",");return{mimeType:s.type||"application/octet-stream",data:g>=0?r.slice(g+1):r}}async function na(s){return new Promise((r,g)=>{const h=new FileReader;h.onload=()=>r(String(h.result||"")),h.onerror=()=>g(h.error||new Error("read failed")),h.readAsDataURL(s)})}async function tm(s,r="image/png"){const g=Jc(s,r),h=nm(g.base64),b=await rm(g.dataUrl).catch(()=>{});if(!b){const Ge=sa(g.base64);if(!Ge)throw new Error("图片格式异常,无法读取为有效图片");return{mimeType:g.mimeType,data:Ge,previewUrl:`data:${g.mimeType};base64,${Ge}`,compressionRate:0}}const S=Math.min(1,lT/Math.max(b.naturalWidth||b.width,b.naturalHeight||b.height));let C=Math.max(1,Math.round((b.naturalWidth||b.width)*S)),K=Math.max(1,Math.round((b.naturalHeight||b.height)*S)),le=.88,ie;for(let Ge=0;Ge<8&&(ie=await im(b,C,K,"image/jpeg",le),!(ie.bytes<=cT||le<=Ca&&Math.max(C,K)<=1280));Ge+=1)le>Ca?le=Math.max(Ca,le-.1):(C=Math.max(1,Math.round(C*.82)),K=Math.max(1,Math.round(K*.82)));const Ee=sa(ie==null?void 0:ie.base64);if(!Ee)throw new Error("图片格式异常,无法转换为有效图片");return{mimeType:ie.mimeType,data:Ee,previewUrl:`data:${ie.mimeType};base64,${Ee}`,compressionRate:sm(h,ie.bytes)}}function Jc(s,r){var C;const g=String(s||"").trim(),h=/^data:([^;,]+);base64,([\s\S]*)$/i.exec(g),b=(C=h==null?void 0:h[1])!=null&&C.startsWith("image/")?h[1]:r,S=h?h[2]:g;return{mimeType:b,base64:S,dataUrl:h?g:`data:${b};base64,${S}`}}function nm(s){const r=sa(s);if(!r)return 0;const g=r.endsWith("==")?2:r.endsWith("=")?1:0;return Math.max(0,Math.floor(r.length*.75)-g)}function sm(s,r){return!s||!r||r>=s?0:Math.round((1-r/s)*100)}function Xc(s){const r=Math.max(...s);return s.length>1?`图片已压缩,最高压缩率为 ${r}%`:`图片已压缩,压缩率为 ${r}%`}function sa(s){let r=String(s||"").trim().replace(/^data:[^;,]+;base64,/i,"").replace(/\s+/g,"");if(!r)return"";r=r.replace(/-/g,"+").replace(/_/g,"/");const g=r.length%4;if(g&&(r+="=".repeat(4-g)),!/^[A-Za-z0-9+/]*={0,2}$/.test(r))return"";try{return atob(r),r}catch{return""}}function rm(s){return new Promise((r,g)=>{const h=new Image;h.onload=()=>r(h),h.onerror=()=>g(new Error("image decode failed")),h.src=s})}async function im(s,r,g,h,b){const S=document.createElement("canvas");S.width=r,S.height=g;const C=S.getContext("2d");if(!C)throw new Error("canvas unavailable");C.fillStyle="#fff",C.fillRect(0,0,r,g),C.drawImage(s,0,0,r,g);const K=await new Promise(Ee=>S.toBlob(Ee,h,b));if(!K)throw new Error("image encode failed");const le=await na(K),ie=Jc(le,h);return{mimeType:ie.mimeType,base64:ie.base64,bytes:K.size}}function eu(){return window.matchMedia("(max-width: 820px)").matches?50:64}function Xs(){const s=oe.value;s&&(s.style.height=`${eu()}px`,s.scrollTop=0)}function om(){const s=oe.value;if(!s)return;s.style.height="auto";const r=window.innerHeight*(window.matchMedia("(max-width: 820px)").matches?.28:.34);s.style.height=`${Math.max(eu(),Math.min(s.scrollHeight,r))}px`}function ra(s=96){const r=pe.value;return r?r.scrollHeight-r.scrollTop-r.clientHeight<=s:!0}function am(s){return String((s==null?void 0:s.id)??"")}function lm(s){const r=Pn.value[s];if(!r)return pT;if(Ro(r))return Hn(r)?Math.min(1200,72+r.lines.reduce((h,b)=>h+ia(b),0)):Math.max(72,52+Ws(r).length*28);if(Hs(r))return 74;if(js(r))return 88;const g=Qo(r);return g.length?64+g.reduce((h,b)=>h+Oc(b),0):Pt(r)||cm(r)?Math.max(560,ia(r)):ia(r)}function ia(s){const r=Fn(s),g=Math.max(1,r.split(`
121
+ `).length),h=Math.ceil(r.length/72);return Math.max(72,Math.min(1200,52+Math.max(g,h)*24))}function cm(s){return s!=null&&s.image||[s==null?void 0:s.images,s==null?void 0:s.imageAttachments,s==null?void 0:s.thumbnails].some(r=>Array.isArray(r)&&r.length)||Array.isArray(s==null?void 0:s.attachments)&&s.attachments.some(r=>(r==null?void 0:r.kind)==="image"||(r==null?void 0:r.type)==="image"||String((r==null?void 0:r.mimeType)||"").startsWith("image/"))?!0:Array.isArray(s==null?void 0:s.blocks)&&s.blocks.some(r=>(r==null?void 0:r.type)==="image")}function mi(){const s=pe.value,r=_e.value;!s||!r||(D.value=Math.max(0,r.getBoundingClientRect().top-s.getBoundingClientRect().top+s.scrollTop))}function oa(){$&&($.disconnect(),pe.value&&$.observe(pe.value),_e.value&&$.observe(_e.value))}function um(s){s instanceof Element&&zr.value.measureElement(s)}function dm(){zr.value.measure()}function aa(){Ye||(Ye=requestAnimationFrame(()=>{Ye=0,fm()}))}function fm(){const s=pe.value;s&&(s.scrollTop=s.scrollHeight)}function gm(){if(Y.size<300)return;const s=new Set(l.lines.map(r=>r.id));for(const r of Y.keys()){const g=Number(String(r).split("",1)[0]);s.has(g)||Y.delete(r)}Y.size>500&&Y.clear()}function be(s){l.toast=s,clearTimeout(rt),rt=setTimeout(()=>{l.toast=""},3600)}function hm(s){return["running","preparing","calling_model","thinking","running_tools","compacting","injecting_context"].includes(s)}function rn(s){if(s==null||!Number.isFinite(Number(s)))return"—";const r=Math.max(0,Math.round(Number(s)));return r>=1e6?`${tu(r/1e6)}m`:r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${tu(r/1e3)}k`:String(r)}function tu(s){return s>=10?s.toFixed(0):s.toFixed(1).replace(/\.0$/,"")}function er(s){return String(s).replace(/\x1b\[[0-9;]*m/g,"")}function pm(s){try{const r=new URL(s,window.location.href);return["http:","https:","mailto:"].includes(r.protocol)}catch{return!1}}function qe(s){return String(s).replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}function nu(s){return s.replace(/(https?:\/\/[^\s<]+)/g,'<a target="_blank" rel="noreferrer noopener" href="$1">$1</a>')}function su(s){const r=String(s||"");return r.startsWith("/api/images/")?N(r):r}function ru(){var s;(s=we.value)==null||s.removeAttribute("open")}function bi(s){if(ru(),s==="sessions")return Qr();if(s==="prompts")return vo();if(s==="settings")return Fs();l.activePanel="chat"}function iu(){return ru(),Yr()}return(s,r)=>{var g,h,b,S,C,K,le,ie,Ee,Ge,on;return k(),_(ue,null,[d("div",Wv,[d("aside",Kv,[d("div",Vv,[d("button",{class:"theme-toggle celestial-theme-toggle",type:"button","aria-label":Wr.value,"aria-pressed":jr.value,title:Wr.value,onClick:Fc},[...r[35]||(r[35]=[Iu('<span class="theme-orbit-scene" aria-hidden="true"><i class="theme-cloud theme-cloud-one"></i><i class="theme-cloud theme-cloud-two"></i><i class="theme-star theme-star-one"></i><i class="theme-star theme-star-two"></i><i class="theme-star theme-star-three"></i><span class="theme-orbit-body"><svg class="theme-sun" viewBox="0 0 28 28"><circle cx="14" cy="14" r="5.2"></circle><path d="M14 2.5v3M14 22.5v3M2.5 14h3M22.5 14h3M5.9 5.9 8 8M20 20l2.1 2.1M22.1 5.9 20 8M8 20l-2.1 2.1"></path></svg><svg class="theme-moon" viewBox="0 0 28 28"><path d="M20.8 18.8A9.2 9.2 0 0 1 9.2 7.2a9.2 9.2 0 1 0 11.6 11.6Z"></path><circle cx="10.2" cy="16.8" r="1"></circle><circle cx="15.4" cy="21" r=".75"></circle></svg></span></span>',1)])],8,Gv)]),d("nav",qv,[d("button",{class:de({active:l.activePanel==="chat"}),onClick:Yr},[...r[36]||(r[36]=[d("span",{class:"nav-button-content"},[d("svg",{class:"ui-icon nav-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M10 4v12M4 10h12"})]),d("span",null,"新建会话")],-1)])],2),d("button",{class:de({active:l.activePanel==="sessions"}),onClick:Qr},[...r[37]||(r[37]=[d("span",{class:"nav-button-content"},[d("svg",{class:"ui-icon nav-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M5 4.5h10a1.5 1.5 0 0 1 1.5 1.5v8A1.5 1.5 0 0 1 15 15.5H8l-3.5 2v-3.5A1.5 1.5 0 0 1 3 12.5V6A1.5 1.5 0 0 1 4.5 4.5Z"}),d("path",{d:"M6.75 8h6.5M6.75 11h4.5"})]),d("span",null,"会话管理")],-1)])],2),d("button",{class:de({active:l.activePanel==="settings"}),onClick:r[0]||(r[0]=x=>Fs())},[...r[38]||(r[38]=[d("span",{class:"nav-button-content"},[d("svg",{class:"ui-icon nav-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M10 3.5v2M10 14.5v2M5.4 5.4l1.4 1.4M13.2 13.2l1.4 1.4M3.5 10h2M14.5 10h2M5.4 14.6l1.4-1.4M13.2 6.8l1.4-1.4"}),d("circle",{cx:"10",cy:"10",r:"2.75"})]),d("span",null,"模型配置")],-1)])],2)]),d("button",{class:de(["sidebar-card","session-entry",{working:Dn.value}]),type:"button",onClick:r[1]||(r[1]=x=>l.activePanel="chat"),title:ze.value},[r[39]||(r[39]=d("span",{class:"session-entry-icon","aria-hidden":"true"},[d("i",{class:"session-diamond"})],-1)),d("span",Qv,[d("span",{ref_key:"sessionTitleViewport",ref:st,class:de(["session-title-line",{marquee:rs.value}])},[d("strong",{ref_key:"sessionTitleText",ref:jt},A(ze.value),513),rs.value?(k(),_("strong",Yv,A(ze.value),1)):V("",!0)],2)])],10,Zv),d("section",Jv,[d("div",Xv,[d("button",{type:"button",class:"mini-button",onClick:r[2]||(r[2]=x=>vo())},"提示词管理")]),d("div",e0,[l.promptLibraryLoading?(k(),_("div",t0,"正在加载…")):l.promptLibrary.length?(k(!0),_(ue,{key:2},Ae(l.promptLibrary,x=>{var M;return k(),_("article",{key:x.id,class:de(["prompt-card",{active:((M=$n.value)==null?void 0:M.id)===x.id}]),draggable:"true",onDragstart:it=>ah(it,x),onDragend:gh,onDblclick:it=>Bs(x)},[d("div",r0,[d("strong",null,A(x.title),1)]),d("div",i0,[d("button",{type:"button",class:"mini-button",onClick:it=>Bs(x)},"应用",8,o0),d("button",{type:"button",class:"mini-button",onClick:it=>nh(x)},"编辑",8,a0)])],42,s0)}),128)):(k(),_("div",n0,"暂无提示词"))])])]),d("main",l0,[d("header",c0,[d("div",u0,[d("details",{ref_key:"mobileMenu",ref:we,class:"mobile-nav-menu"},[r[40]||(r[40]=d("summary",{"aria-label":"打开导航菜单",title:"导航菜单"},[d("svg",{class:"ui-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M4 5.5h12M4 10h12M4 14.5h12"})])],-1)),d("nav",null,[d("button",{type:"button",class:de({active:l.activePanel==="chat"}),onClick:r[3]||(r[3]=x=>bi("chat"))},"对话",2),d("button",{type:"button",class:de({active:l.activePanel==="sessions"}),onClick:r[4]||(r[4]=x=>bi("sessions"))},"会话",2),d("button",{type:"button",class:de({active:l.activePanel==="prompts"}),onClick:r[5]||(r[5]=x=>bi("prompts"))},"提示词",2),d("button",{type:"button",class:de({active:l.activePanel==="settings"}),onClick:r[6]||(r[6]=x=>bi("settings"))},"模型配置",2),d("button",{type:"button",onClick:iu},"新建会话")])],512),d("button",{class:"ghost mobile-theme-toggle celestial-theme-toggle",type:"button","aria-label":Wr.value,"aria-pressed":jr.value,title:Wr.value,onClick:Fc},[...r[41]||(r[41]=[Iu('<span class="theme-orbit-scene" aria-hidden="true"><i class="theme-cloud theme-cloud-one"></i><i class="theme-cloud theme-cloud-two"></i><i class="theme-star theme-star-one"></i><i class="theme-star theme-star-two"></i><i class="theme-star theme-star-three"></i><span class="theme-orbit-body"><svg class="theme-sun" viewBox="0 0 28 28"><circle cx="14" cy="14" r="5.2"></circle><path d="M14 2.5v3M14 22.5v3M2.5 14h3M22.5 14h3M5.9 5.9 8 8M20 20l2.1 2.1M22.1 5.9 20 8M8 20l-2.1 2.1"></path></svg><svg class="theme-moon" viewBox="0 0 28 28"><path d="M20.8 18.8A9.2 9.2 0 0 1 9.2 7.2a9.2 9.2 0 1 0 11.6 11.6Z"></path><circle cx="10.2" cy="16.8" r="1"></circle><circle cx="15.4" cy="21" r=".75"></circle></svg></span></span>',1)])],8,d0),d("button",{class:"ghost desktop-config-button",onClick:r[7]||(r[7]=x=>Fs())},"配置模型"),d("button",{class:"primary new-session-button",onClick:iu},"+ 新建")])]),l.activePanel==="chat"?(k(),_("section",f0,[d("div",g0,[d("div",{ref_key:"transcript",ref:pe,class:"transcript"},[l.runtimeContext||l.runtimeContextLoading||l.runtimeContextError?(k(),_("section",h0,[r[45]||(r[45]=d("div",{class:"runtime-context-bar-title"},[d("strong",null,"运行上下文")],-1)),l.runtimeContext?(k(),_("div",p0,[d("button",{type:"button",onClick:r[8]||(r[8]=x=>jo("prompt"))},[r[42]||(r[42]=d("span",null,"系统提示词",-1)),d("strong",null,A(jl.value.length),1)]),d("button",{type:"button",onClick:r[9]||(r[9]=x=>jo("tools"))},[r[43]||(r[43]=d("span",null,"工具",-1)),d("strong",null,A(bo.value.length),1)]),d("button",{type:"button",onClick:r[10]||(r[10]=x=>jo("plugins"))},[r[44]||(r[44]=d("span",null,"插件",-1)),d("strong",null,A(Dg.value),1)])])):l.runtimeContextError?(k(),_("button",{key:1,type:"button",class:"runtime-context-retry",onClick:Vr},"重试")):(k(),_("span",m0,"同步中"))])):V("",!0),Os.value.length?(k(),_("section",b0,[r[47]||(r[47]=d("div",{class:"runtime-context-bar-title"},[d("strong",null,"项目上下文")],-1)),d("div",k0,[d("button",{type:"button",onClick:Jh},[r[46]||(r[46]=d("span",null,"文档",-1)),d("strong",null,A(Os.value.length),1)])])])):V("",!0),d("div",{ref_key:"messageList",ref:_e,class:"virtual-message-list",style:St({height:`${Og.value}px`})},[(k(!0),_(ue,null,Ae(Lg.value,x=>(k(),_("div",{key:x.key,ref_for:!0,ref:um,class:"virtual-message-row","data-index":x.index,style:St({transform:`translateY(${x.start-D.value}px)`})},[(k(!0),_(ue,null,Ae([Pn.value[x.index]],M=>{var it,Wt,ou,au;return k(),_(ue,{key:M.id},[Ro(M)?(k(),_("article",{key:0,class:de(["message","tool-group-message",{live:M.live,expanded:Hn(M)}])},[d("div",_0,[d("button",{type:"button",class:"tool-group-trigger","aria-expanded":Hn(M),onClick:G=>Ph(M)},[d("span",w0,[(k(!0),_(ue,null,Ae(fc(M),(G,ke)=>(k(),_(ue,{key:G.name},[d("span",x0,A(G.name),1),G.count>1?(k(),_("span",S0,"×"+A(G.count),1)):V("",!0),ke<fc(M).length-1?(k(),_("span",E0,"、")):V("",!0)],64))),128))]),r[48]||(r[48]=d("span",{class:"tool-group-chevron","aria-hidden":"true"},null,-1))],8,v0),!Hn(M)&&$h(M)&&Ws(M).length?(k(),_("div",T0,[(k(!0),_(ue,null,Ae(Ws(M),(G,ke)=>(k(),_("div",{key:G.id,class:de(["tool-group-purpose",{live:G.live}]),style:St({"--purpose-index":ke})},[d("span",null,A(G.text),1)],6))),128))])):!Hn(M)&&Ws(M).length?(k(),pt(Kk,{key:1,name:"tool-purpose",tag:"div",class:"tool-group-purposes"},{default:sf(()=>[(k(!0),_(ue,null,Ae(Ws(M),(G,ke)=>(k(),_("div",{key:G.id,class:de(["tool-group-purpose",{live:G.live}]),style:St({"--purpose-index":ke})},[d("span",null,A(G.text),1)],6))),128))]),_:2},1024)):V("",!0),Hn(M)?(k(),_("div",A0,[(k(!0),_(ue,null,Ae(M.lines,G=>{var ke,gt,la,lu;return k(),_("div",{key:G.id,class:de(["tool-group-result",`kind-${G.kind||"system"}`])},[G.kind==="thinking"?(k(),_("details",{key:0,class:"reasoning-sheet",open:G.live||void 0},[r[49]||(r[49]=d("summary",null,[d("span",{class:"reasoning-title-mark","aria-hidden":"true"},[d("i"),d("i"),d("i")]),d("span",{class:"reasoning-heading"},"思考")],-1)),d("div",I0,[d("div",M0,[d("div",{class:"message-text markdown reasoning-text",innerHTML:li(G)},null,8,R0)])])],8,C0)):Hs(G)?(k(),_("section",{key:1,class:de(["compaction-context-bar",{current:G.compaction.current}])},[r[53]||(r[53]=d("div",{class:"compaction-context-title"},[d("strong",null,"压缩上下文")],-1)),d("div",N0,[d("span",null,[r[50]||(r[50]=d("span",null,"摘要",-1)),d("strong",null,A(rn(String(G.compaction.summary||"").length)),1)]),G.compaction.imageCount?(k(),_("span",L0,[r[51]||(r[51]=d("span",null,"图片",-1)),d("strong",null,A(G.compaction.imageCount),1)])):V("",!0),d("button",{type:"button",onClick:Ze=>dc(G)},[...r[52]||(r[52]=[d("span",null,"详情",-1),d("strong",null,"›",-1)])],8,O0)])],2)):js(G)?(k(),_("div",{key:2,class:de(["tool-result-summary",`status-${ls(G).key}`])},[d("div",D0,[(k(),_("svg",{class:de(["tool-result-diamond",{spinning:G.live}]),viewBox:"0 0 20 20","aria-hidden":"true"},[...r[54]||(r[54]=[d("path",{d:"M10 2.75 17.25 10 10 17.25 2.75 10Z"},null,-1)])],2)),d("strong",P0,A(zn(G)),1),ls(G).key==="failed"?(k(),_("span",$0,"×")):V("",!0)]),d("div",B0,[(ke=G.toolDisplay)!=null&&ke.purpose||(gt=G.toolDisplay)!=null&&gt.subject?(k(),_("p",U0,A(((la=G.toolDisplay)==null?void 0:la.purpose)||((lu=G.toolDisplay)==null?void 0:lu.subject)),1)):V("",!0),Dt(G)&&xn(G).length?(k(),_("div",F0,[d("button",{type:"button",class:"tool-group-trigger","aria-expanded":ni(G),onClick:Ze=>_c(G)},[d("span",H0,[(k(!0),_(ue,null,Ae(ti(G),(Ze,tr)=>(k(),_(ue,{key:Ze.name},[d("span",j0,A(Ze.label),1),Ze.count>1?(k(),_("span",W0,"×"+A(Ze.count),1)):V("",!0),tr<ti(G).length-1?(k(),_("span",K0,"、")):V("",!0)],64))),128))]),r[55]||(r[55]=d("span",{class:"tool-group-chevron","aria-hidden":"true"},null,-1))],8,z0),ni(G)?(k(),_("div",V0,[(k(!0),_(ue,null,Ae(yc(G),(Ze,tr)=>(k(),_("div",{key:Ze.key,class:"tool-group-purpose",style:St({"--purpose-index":tr})},[d("span",null,A(Ze.purpose),1)],4))),128))])):V("",!0)])):Gs(G)?(k(),_("p",G0,[cr(A(Gs(G)),1),si(G)?(k(),_("span",q0,A(si(G)),1)):V("",!0)])):V("",!0),!Dt(G)&&xn(G).length?(k(),_("div",Z0,[d("section",Q0,[d("pre",Y0,A(kc(G)),1)])])):V("",!0),!Dt(G)&&Vs(G)&&(!Lo(G)||G.live===!0)?(k(),_("div",J0,[d("section",X0,[d("pre",ew,A(Vs(G)),1)])])):V("",!0),!Dt(G)&&bc(G)?(k(),_("div",tw,[(k(!0),_(ue,null,Ae(G.toolDisplay.previews,(Ze,tr)=>(k(),_("section",{key:`${Ze.kind}-${tr}`,class:de(["tool-result-preview",`kind-${Ze.kind}`])},[Ze.label?(k(),_("span",nw,A(Ze.label),1)):V("",!0),d("pre",sw,A(Ze.content),1)],2))),128))])):V("",!0),!Dt(G)&&ei(G).length?(k(),_("dl",rw,[(k(!0),_(ue,null,Ae(ei(G),Ze=>(k(),_("div",{key:`${Ze.label}-${Ze.value}`,class:de(["tool-result-fact",`tone-${Ze.tone||"neutral"}`])},[d("dt",null,A(Ze.label),1),d("dd",{class:de({code:Ze.code})},A(Ze.value),3)],2))),128))])):V("",!0)])],2)):(k(),_("div",iw,[d("div",ow,[d("strong",null,A(zn(G)),1)]),d("div",{class:"message-text markdown",innerHTML:li(G)},null,8,aw)]))],2)}),128))])):V("",!0)])],2)):(k(),_("article",{key:1,class:de(["message",M.kind||"system",{live:M.live,"prompt-usage":Rh(M),"context-compaction":Hs(M),"compact-tool":js(M)}])},[d("div",{class:de(["message-marker",{spinning:M.live}])},[...r[56]||(r[56]=[d("svg",{class:"message-marker-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M10 2.75 17.25 10 10 17.25 2.75 10Z"})],-1)])],2),Hs(M)?(k(),_("div",lw,[d("section",{class:de(["compaction-context-bar",{current:M.compaction.current}])},[r[60]||(r[60]=d("div",{class:"compaction-context-title"},[d("strong",null,"压缩上下文")],-1)),d("div",cw,[d("span",null,[r[57]||(r[57]=d("span",null,"摘要",-1)),d("strong",null,A(rn(String(M.compaction.summary||"").length)),1)]),M.compaction.imageCount?(k(),_("span",uw,[r[58]||(r[58]=d("span",null,"图片",-1)),d("strong",null,A(M.compaction.imageCount),1)])):V("",!0),d("button",{type:"button",onClick:G=>dc(M)},[...r[59]||(r[59]=[d("span",null,"详情",-1),d("strong",null,"›",-1)])],8,dw)])],2)])):M.kind==="thinking"?(k(),_("div",fw,[d("details",{class:"reasoning-sheet",open:M.live||void 0},[d("summary",null,[r[61]||(r[61]=d("span",{class:"reasoning-title-mark","aria-hidden":"true"},[d("i"),d("i"),d("i")],-1)),r[62]||(r[62]=d("span",{class:"reasoning-heading"},"思考",-1)),qs(M)?(k(),_("span",hw,A(qs(M)),1)):V("",!0)]),d("div",pw,[d("div",mw,[d("div",{class:"message-text markdown reasoning-text",innerHTML:li(M)},null,8,bw)])])],8,gw)])):(k(),_("div",kw,[(M.kind!=="tool"||cs(M).length)&&!js(M)?(k(),_("div",yw,[d("strong",null,A(zn(M)),1),!M.toolName&&M.titleStatus?(k(),_("span",_w,A(M.titleStatus),1)):V("",!0),qs(M)?(k(),_("span",vw,A(qs(M)),1)):V("",!0)])):V("",!0),Pt(M)?(k(),_("div",ww,[d("div",{class:"message-text markdown image2-stage-wrap",innerHTML:Tp(M)},null,8,xw),(k(!0),_(ue,null,Ae([fi(M)],G=>(k(),_(ue,{key:`${M.id}-image2-images`},[G.length?(k(),_("div",Sw,[(k(!0),_(ue,null,Ae(G,(ke,gt)=>(k(),_("figure",{key:Js(ke)||ke.previewUrl||gt,class:de(["message-image-attachment",{"image-unavailable":!ke.available}])},[ke.available&&ke.previewUrl?(k(),_("button",{key:0,type:"button",class:"image-preview-trigger","data-preview-src":ke.originalUrl||ke.previewUrl,"aria-label":`预览 ${us(ke,gt)}`},[d("img",{src:ke.previewUrl,alt:us(ke,gt),loading:"lazy",decoding:"async"},null,8,Tw)],8,Ew)):(k(),_("div",Aw,"图片不可用")),d("figcaption",null,A(us(ke,gt)),1),d("div",Cw,[ke.available&&ke.previewUrl?(k(),_("a",{key:0,class:"image-download",href:ke.originalUrl||ke.previewUrl,download:Gc(ke,gt)},"下载",8,Iw)):V("",!0),gt===0&&ci(M)?(k(),_("button",{key:1,type:"button",class:"image2-detail-button",onClick:la=>gc(M)},"详情",8,Mw)):V("",!0)])],2))),128))])):ci(M)?(k(),_("button",{key:1,type:"button",class:"image2-detail-button",onClick:ke=>gc(M)},"详情",8,Rw)):V("",!0)],64))),128))])):js(M)?(k(),_("div",{key:2,class:de(["tool-result-summary",`status-${ls(M).key}`])},[d("div",Nw,[(k(),_("svg",{class:de(["tool-result-diamond",{spinning:M.live}]),viewBox:"0 0 20 20","aria-hidden":"true"},[...r[63]||(r[63]=[d("path",{d:"M10 2.75 17.25 10 10 17.25 2.75 10Z"},null,-1)])],2)),d("strong",Lw,A(zn(M)),1),ls(M).key==="failed"?(k(),_("span",Ow,"×")):V("",!0)]),d("div",Dw,[(it=M.toolDisplay)!=null&&it.purpose||(Wt=M.toolDisplay)!=null&&Wt.subject?(k(),_("p",Pw,A(((ou=M.toolDisplay)==null?void 0:ou.purpose)||((au=M.toolDisplay)==null?void 0:au.subject)),1)):V("",!0),Dt(M)&&xn(M).length?(k(),_("div",$w,[d("button",{type:"button",class:"tool-group-trigger","aria-expanded":ni(M),onClick:G=>_c(M)},[d("span",Uw,[(k(!0),_(ue,null,Ae(ti(M),(G,ke)=>(k(),_(ue,{key:G.name},[d("span",Fw,A(G.label),1),G.count>1?(k(),_("span",zw,"×"+A(G.count),1)):V("",!0),ke<ti(M).length-1?(k(),_("span",Hw,"、")):V("",!0)],64))),128))]),r[64]||(r[64]=d("span",{class:"tool-group-chevron","aria-hidden":"true"},null,-1))],8,Bw),ni(M)?(k(),_("div",jw,[(k(!0),_(ue,null,Ae(yc(M),(G,ke)=>(k(),_("div",{key:G.key,class:"tool-group-purpose",style:St({"--purpose-index":ke})},[d("span",null,A(G.purpose),1)],4))),128))])):V("",!0)])):Gs(M)?(k(),_("p",Ww,[cr(A(Gs(M)),1),si(M)?(k(),_("span",Kw,A(si(M)),1)):V("",!0)])):V("",!0),!Dt(M)&&xn(M).length?(k(),_("div",Vw,[d("section",Gw,[d("pre",qw,A(kc(M)),1)])])):V("",!0),!Dt(M)&&Vs(M)&&(!Lo(M)||M.live===!0)?(k(),_("div",Zw,[d("section",Qw,[d("pre",Yw,A(Vs(M)),1)])])):V("",!0),!Dt(M)&&bc(M)?(k(),_("div",Jw,[(k(!0),_(ue,null,Ae(M.toolDisplay.previews,(G,ke)=>(k(),_("section",{key:`${G.kind}-${ke}`,class:de(["tool-result-preview",`kind-${G.kind}`])},[G.label?(k(),_("span",Xw,A(G.label),1)):V("",!0),d("pre",ex,A(G.content),1)],2))),128))])):V("",!0),!Dt(M)&&ei(M).length?(k(),_("dl",tx,[(k(!0),_(ue,null,Ae(ei(M),G=>(k(),_("div",{key:`${G.label}-${G.value}`,class:de(["tool-result-fact",`tone-${G.tone||"neutral"}`])},[d("dt",null,A(G.label),1),d("dd",{class:de({code:G.code})},A(G.value),3)],2))),128))])):V("",!0)])],2)):(k(),_(ue,{key:3},[Qo(M).length?(k(),_(ue,{key:0},[d("div",nx,[(k(!0),_(ue,null,Ae(Qo(M),G=>(k(),_("iframe",{key:G.url,class:"plugin-resource-frame",src:wp(G),title:G.label||"插件资源",style:St({height:`${Oc(G)}px`}),loading:"lazy",allow:"fullscreen",allowfullscreen:""},null,12,sx))),128))]),Lc(M).length?(k(),_("div",{key:0,class:"message-text markdown",innerHTML:Dc(M)},null,8,rx)):V("",!0)],64)):M.kind==="assistant"&&M.live?(k(),_("div",ix,[kt(Bv,{text:M.text||"","exposed-resources":Pc(M)},null,8,["text","exposed-resources"])])):Qp(M)?V("",!0):(k(),_("div",{key:2,class:"message-text markdown",innerHTML:li(M)},null,8,ox)),(k(!0),_(ue,null,Ae([fi(M)],G=>(k(),_(ue,{key:`${M.id}-images`},[G.length?(k(),_("div",ax,[(k(!0),_(ue,null,Ae(G,(ke,gt)=>(k(),_("figure",{key:Js(ke)||ke.previewUrl||gt,class:de(["message-image-attachment",{"image-unavailable":!ke.available}])},[ke.available&&ke.previewUrl?(k(),_("button",{key:0,type:"button",class:"image-preview-trigger","data-preview-src":ke.originalUrl||ke.previewUrl,"aria-label":`预览 ${us(ke,gt)}`},[d("img",{src:ke.previewUrl,alt:us(ke,gt),loading:"lazy",decoding:"async"},null,8,cx)],8,lx)):(k(),_("div",ux,"图片不可用")),d("figcaption",null,A(us(ke,gt)),1),ke.available&&ke.previewUrl?(k(),_("a",{key:2,class:"image-download",href:ke.originalUrl||ke.previewUrl,download:Gc(ke,gt)},"下载",8,dx)):V("",!0)],2))),128))])):V("",!0)],64))),128))],64))]))],2))],64)}),128))],12,y0))),128))],4),j.value?(k(),_("div",fx,[d("div",gx,[d("span",hx,A(J.value),1)]),r[65]||(r[65]=d("span",{class:"message-loading-emblem","aria-hidden":"true"},[d("i"),d("i"),d("i")],-1))])):V("",!0)],512),l.queuedInput?(k(),_("div",px,[d("span",null,"已排队:"+A(l.queuedInput),1),d("div",null,[d("button",{type:"button",onClick:sc},"立即发送"),d("button",{type:"button",onClick:kh},"取消")])])):V("",!0),d("form",{class:de(["composer",{"drop-active":l.composerDropActive}]),onSubmit:tt(tc,["prevent"]),onDragover:lh,onDragleave:ch,onDrop:uh},[(g=l.appPrompt)!=null&&g.hasActivePrompt?(k(),_("div",mx,[r[66]||(r[66]=d("span",{class:"composer-app-prompt-label"},"当前提示词",-1)),d("strong",null,A($g.value),1),d("button",{type:"button",class:"mini-button danger",onClick:Xl},"清空")])):V("",!0),Zc().length?(k(),_("div",bx,[(k(!0),_(ue,null,Ae(Zc(),(x,M)=>(k(),_("figure",{key:x.label,class:"file-attachment"},[d("figcaption",null,[d("strong",null,A(Yp(x,M)),1),d("span",null,A(Jp(x)),1)]),d("button",{type:"button","aria-label":"移除附件",onClick:it=>qc(x.label)},"×",8,kx)]))),128))])):V("",!0),Qc().length?(k(),_("div",yx,[(k(!0),_(ue,null,Ae(Qc(),(x,M)=>(k(),_("figure",{key:x.label,class:"image-attachment"},[d("img",{src:x.previewUrl,alt:x.name||`图片 ${M+1}`},null,8,_x),d("figcaption",null,"图片 "+A(M+1),1),d("button",{type:"button","aria-label":"移除图片",onClick:it=>qc(x.label)},"×",8,vx)]))),128))])):V("",!0),d("input",{ref_key:"fileInput",ref:ne,type:"file",multiple:"",hidden:"",onChange:Up},null,544),Ct(d("textarea",{ref_key:"composer",ref:oe,"onUpdate:modelValue":r[11]||(r[11]=x=>R.value=x),placeholder:"在这里输入你的问题、需求或下一步安排…",onKeydown:Lp,onPaste:$p,onInput:om},null,544),[[$t,R.value]]),d("button",{type:"button",class:"composer-cwd",title:"切换工作目录",onClick:ep},[r[67]||(r[67]=d("strong",null,"CWD",-1)),d("span",{title:Rs.value},A(Rs.value),9,wx)]),d("details",xx,[d("summary",null,[r[68]||(r[68]=d("span",null,"会话选项",-1)),d("small",null,A(ce.value),1),r[69]||(r[69]=d("svg",{class:"mobile-session-chevron",viewBox:"0 0 12 12","aria-hidden":"true"},[d("path",{d:"m3 4.5 3 3 3-3"})],-1))]),d("div",Sx,[d("dl",null,[d("div",null,[r[70]||(r[70]=d("dt",null,"模型",-1)),d("dd",null,A(Ns.value),1)]),d("div",null,[r[71]||(r[71]=d("dt",null,"上下文",-1)),d("dd",null,[d("button",{type:"button",class:"mobile-context-button",onClick:ic},A(Bl.value),1)])]),d("div",null,[r[72]||(r[72]=d("dt",null,"Token",-1)),d("dd",null,"↑ "+A(Ul.value)+" / ↓ "+A(Fl.value),1)])]),d("div",Ex,[d("button",{type:"button",class:de(["fast-mode-button",{active:l.fastMode,syncing:l.fastModeMutating}]),"aria-pressed":l.fastMode,onClick:oc},[...r[73]||(r[73]=[d("span",null,"快速模式",-1)])],10,Tx),d("button",{type:"button",class:"compact-button",onClick:rc},"压缩会话")]),d("details",Ax,[d("summary",null,[r[74]||(r[74]=cr("运行信息 ",-1)),d("span",null,A(Lt.value?`${Lt.value} 个后台任务`:"无后台任务"),1)]),d("div",Cx,[Lt.value?(k(),_("button",{key:0,type:"button",class:"mobile-runtime-card",onClick:r[12]||(r[12]=x=>zo(is.value))},[r[75]||(r[75]=d("span",null,"后台任务",-1)),d("strong",null,A(ri(is.value)),1)])):(k(),_("div",Ix,[...r[76]||(r[76]=[d("span",null,"后台任务",-1),d("strong",null,"暂无",-1)])])),Ot.value?(k(),_("div",Mx,[r[77]||(r[77]=d("span",null,"周额度",-1)),d("strong",null,A(Ao(Ot.value.remainingPercent)),1),d("small",null,"续期 "+A(Co(Ot.value.resetAt)),1)])):V("",!0),d("div",Rx,[r[78]||(r[78]=d("span",null,"服务端内存",-1)),d("strong",null,A(Un((h=Bn.value)==null?void 0:h.rss)),1),d("small",null,"堆 "+A(Un((b=Bn.value)==null?void 0:b.heapUsed))+" · 外部 "+A(Un((S=Bn.value)==null?void 0:S.external)),1)])])])])]),d("div",Nx,[d("div",Lx,[d("span",Ox,[r[79]||(r[79]=d("em",null,"模型",-1)),d("strong",null,A(Ns.value),1)]),(k(),_("button",{type:"button",class:de(["metric-chip","numeric","context-window-trigger",$o("context")]),key:`context-${l.composerMetrics.context.bump}`,onClick:ic},[r[80]||(r[80]=d("em",null,"上下文",-1)),d("strong",null,A(Bl.value),1)],2)),(k(),_("span",{class:de(["metric-chip numeric",$o("inputTokens")]),key:`input-${l.composerMetrics.inputTokens.bump}`},[r[81]||(r[81]=d("em",null,"输入",-1)),d("strong",null,A(Ul.value),1)],2)),(k(),_("span",{class:de(["metric-chip numeric",$o("outputTokens")]),key:`output-${l.composerMetrics.outputTokens.bump}`},[r[82]||(r[82]=d("em",null,"输出",-1)),d("strong",null,A(Fl.value),1)],2)),d("button",{type:"button",class:de(["fast-mode-button",{active:l.fastMode,syncing:l.fastModeMutating}]),"aria-pressed":l.fastMode,title:l.fastMode?"关闭当前会话的快速模式":"为当前会话启动快速模式",onClick:oc},[...r[83]||(r[83]=[d("span",null,"快速模式",-1)])],10,Dx),d("span",{class:"compress-wrap"},[d("button",{type:"button",class:"compact-button",onClick:rc},"压缩会话")])]),d("div",null,[d("button",{type:"button",class:"ghost",disabled:l.uploadingFiles,onClick:Bp},A(l.uploadingFiles?"上传中…":"上传附件"),9,Px),d("button",{type:Dn.value?"button":"submit",class:de(["primary","composer-action",{stop:Dn.value}]),disabled:!Dn.value&&(l.uploadingFiles||!R.value.trim()&&!l.attachments.length),"aria-label":Hl.value,onClick:r[13]||(r[13]=x=>Dn.value?bh():void 0)},A(Hl.value),11,$x)])])],34)]),d("aside",Bx,[d("section",Ux,[d("div",Fx,[r[84]||(r[84]=d("div",{class:"panel-title"},"后台任务",-1)),Lt.value?(k(),_("strong",zx,A(Lt.value),1)):V("",!0)]),Lt.value?(k(),_("button",{key:1,type:"button",class:"background-task-summary",title:Bo(is.value),onClick:r[14]||(r[14]=x=>zo(is.value))},[d("span",{class:de(["background-task-dot",`status-${is.value.status}`])},null,2),d("strong",null,A(ri(is.value)),1),Lt.value>1?(k(),_("span",Wx,"+"+A(Lt.value-1),1)):V("",!0),r[85]||(r[85]=d("b",{"aria-hidden":"true"},"›",-1))],8,jx)):(k(),_("div",Hx,"暂无后台任务"))]),Ot.value?(k(),_("section",Kx,[d("div",Vx,[d("div",null,[d("span",null,"周额度 · "+A(Sh(Ot.value.account)),1),d("strong",null,A(Ao(Ot.value.remainingPercent)),1)]),d("div",Gx,[l.cpaQuotas.length>1?(k(),_("button",{key:0,type:"button","aria-label":"上一个凭据",onClick:r[15]||(r[15]=x=>cc(-1))},"‹")):V("",!0),d("small",null,A(l.cpaQuotas.length>1?`${l.cpaQuotaIndex+1}/${l.cpaQuotas.length}`:"剩余"),1),l.cpaQuotas.length>1?(k(),_("button",{key:1,type:"button","aria-label":"下一个凭据",onClick:r[16]||(r[16]=x=>cc(1))},"›")):V("",!0)])]),d("div",{class:"quota-progress",role:"progressbar","aria-label":"周额度剩余","aria-valuenow":To(Ot.value.remainingPercent),"aria-valuemin":"0","aria-valuemax":"100"},[d("span",{class:"quota-progress-fill",style:St({width:`${To(Ot.value.remainingPercent)}%`})},null,4)],8,qx),d("div",Zx,[d("span",null,"已使用 "+A(Ao(Ot.value.usedPercent)),1),d("span",null,"续期时间 "+A(Co(Ot.value.resetAt)),1)]),d("div",Qx,"更新于 "+A(Co(Ot.value.updatedAt)),1)])):V("",!0),d("section",Yx,[d("div",Jx,[d("div",null,[r[86]||(r[86]=d("span",null,"服务端内存",-1)),d("strong",null,A(Un((C=Bn.value)==null?void 0:C.rss)),1)]),r[87]||(r[87]=d("small",null,"RSS",-1))]),Wl.value?(k(),_("div",{key:0,class:"memory-chart",onMousemove:Ah,onMouseleave:uc},[(k(),_("svg",Xx,[d("path",{d:Wl.value},null,8,e1),(k(!0),_(ue,null,Ae(Kr.value,(x,M)=>(k(),_("circle",{key:x.entry.at,class:de(["memory-trend-point",{active:M===Ie.value}]),cx:x.x,cy:x.y,r:M===Ie.value?3.2:1.5,tabindex:"0",onFocus:it=>Ie.value=M,onBlur:uc},null,42,t1))),128))])),Ds.value?(k(),_("div",{key:0,class:"memory-tooltip",style:St({left:`clamp(58px, ${Ds.value.x/260*100}%, calc(100% - 58px))`,top:`${Ds.value.y/44*100}%`})},[d("strong",null,A(Un(Ds.value.entry.rss)),1),d("span",null,A(Th(Ds.value.entry.at)),1)],4)):V("",!0)],32)):(k(),_("div",n1,"—")),d("div",s1,[d("div",null,[r[88]||(r[88]=d("span",null,"V8 堆",-1)),d("strong",null,A(Un((K=Bn.value)==null?void 0:K.heapUsed)),1)]),d("div",null,[r[89]||(r[89]=d("span",null,"外部内存",-1)),d("strong",null,A(Un((le=Bn.value)==null?void 0:le.external)),1)])]),d("div",r1,[d("span",null,"更新于 "+A(Eh((ie=Bn.value)==null?void 0:ie.at)),1)])])])])):l.activePanel==="sessions"?(k(),_("section",i1,[d("div",o1,[d("div",{class:"page-head sessions-page-head"},[r[90]||(r[90]=d("div",null,[d("h2",null,"会话管理"),d("p",null,"查找、继续或整理历史会话")],-1)),d("button",{class:"primary",onClick:Yr},"+ 新建会话")]),d("div",a1,[d("label",l1,[Ct(d("input",{"onUpdate:modelValue":r[17]||(r[17]=x=>q.value=x),type:"search",placeholder:"搜索标题或 ID",autocomplete:"off"},null,512),[[$t,q.value]])]),d("span",c1,A(q.value.trim()?`${Ls.value.length} / ${l.sessions.length}`:`${l.sessions.length} 个会话`),1)]),l.sessionsLoading?(k(),_("div",u1,"正在加载会话…")):l.sessions.length?Ls.value.length?(k(),_("div",g1,[(k(!0),_(ue,null,Ae(Rg.value,x=>(k(),_("article",{key:x.sessionId,class:de(["session-card",{current:So(x.sessionId),running:Eo(x.sessionId)}])},[d("div",h1,[d("div",p1,[d("strong",null,A(he(x)),1),So(x.sessionId)?(k(),_("span",m1,"当前")):Eo(x.sessionId)?(k(),_("span",b1,"运行中")):V("",!0)]),d("div",k1,[d("code",{title:x.sessionId},"ID · "+A(x.sessionId),9,y1),d("time",{datetime:x.updatedAt||x.createdAt},"更新于 "+A(Io(x.updatedAt||x.createdAt)),9,_1)])]),d("div",v1,[d("button",{disabled:l.sessionResumeLoading||l.sessionsLoading,onClick:M=>vh(x.sessionId)},A(l.pendingResumeSessionId===x.sessionId&&l.sessionResumeLoading?"打开中…":"打开"),9,w1),d("button",{class:"danger",disabled:l.sessionResumeLoading||l.sessionsLoading,onClick:M=>wh(x.sessionId)},"删除",8,x1)])],2))),128))])):(k(),_("div",f1,"没有匹配的会话")):(k(),_("div",d1,"暂无会话")),!l.sessionsLoading&&Ls.value.length&&Fr.value>1?(k(),_("nav",S1,[d("button",{type:"button",disabled:ee.value===1,onClick:r[18]||(r[18]=x=>ee.value-=1)},"上一页",8,E1),(k(!0),_(ue,null,Ae(Ng.value,x=>(k(),_("button",{key:x,type:"button",class:de({active:x===ee.value}),"aria-current":x===ee.value?"page":void 0,onClick:M=>ee.value=x},A(x),11,T1))),128)),d("button",{type:"button",disabled:ee.value===Fr.value,onClick:r[19]||(r[19]=x=>ee.value+=1)},"下一页",8,A1)])):V("",!0)])])):l.activePanel==="prompts"?(k(),_("section",C1,[d("div",I1,[d("div",M1,[r[91]||(r[91]=d("h2",null,"提示词",-1)),d("div",R1,[d("button",{class:"ghost",onClick:r[20]||(r[20]=x=>l.activePanel="chat")},"回到对话"),d("button",{class:"primary",onClick:sh},"+ 新建提示词")])]),d("div",N1,[d("aside",L1,[d("div",O1,[d("strong",null,A(l.promptLibrary.length)+" 个提示词",1)]),d("div",D1,[l.promptLibraryLoading?(k(),_("div",P1,"正在加载…")):l.promptLibrary.length?(k(!0),_(ue,{key:2},Ae(l.promptLibrary,x=>{var M,it;return k(),_("button",{key:x.id,class:de(["prompt-library-item",{active:((M=Hr.value)==null?void 0:M.id)===x.id,applied:((it=$n.value)==null?void 0:it.id)===x.id,dragging:Z.value===x.id,"drop-before":fe.value===x.id&&xe.value==="before","drop-after":fe.value===x.id&&xe.value==="after"}]),type:"button",draggable:"true",onClick:Wt=>rh(x),onDblclick:Wt=>Bs(x),onDragstart:Wt=>hh(Wt,x),onDragover:Wt=>ph(Wt,x),onDrop:Wt=>mh(Wt,x),onDragend:ec},[d("strong",null,A(x.title),1),x.usage?(k(),_("span",U1,"用法:"+A(x.usage),1)):V("",!0)],42,B1)}),128)):(k(),_("div",$1,"暂无提示词"))])]),d("section",F1,[d("div",z1,[d("strong",H1,A(O.title||"新提示词"),1),d("div",j1,[d("button",{class:"mini-button",type:"button",disabled:!Hr.value,onClick:r[21]||(r[21]=x=>Hr.value&&Bs(Hr.value))},"应用",8,W1),d("button",{class:"mini-button",type:"button",onClick:ih},"保存"),d("button",{class:"mini-button danger",type:"button",disabled:!O.id,onClick:oh},"删除",8,K1)])]),d("div",V1,[d("label",G1,[r[92]||(r[92]=d("span",null,"名称",-1)),Ct(d("input",{"onUpdate:modelValue":r[22]||(r[22]=x=>O.title=x),type:"text",placeholder:"例如:代码评审"},null,512),[[$t,O.title]])]),d("label",q1,[r[93]||(r[93]=d("span",null,"提示词内容",-1)),Ct(d("textarea",{"onUpdate:modelValue":r[23]||(r[23]=x=>O.content=x),rows:"14",placeholder:"输入提示词内容"},null,512),[[$t,O.content]])]),d("label",Z1,[r[94]||(r[94]=d("span",null,"用法(选填)",-1)),Ct(d("textarea",{"onUpdate:modelValue":r[24]||(r[24]=x=>O.usage=x),rows:"4",placeholder:"输入适用场景"},null,512),[[$t,O.usage]])])])])])])])):l.activePanel==="settings"?(k(),_("section",Q1,[d("div",Y1,[d("div",J1,[r[95]||(r[95]=d("h2",null,"模型配置",-1)),d("button",{class:"primary",onClick:lc,disabled:!l.login},"保存",8,X1)]),l.login?(k(),_("form",{key:1,class:"settings-form",onSubmit:tt(lc,["prevent"])},[d("section",tS,[r[97]||(r[97]=d("header",{class:"settings-card-head"},[d("strong",null,"模型")],-1)),d("div",nS,[d("label",sS,[r[96]||(r[96]=d("span",null,"供应商",-1)),kt(Ei,{modelValue:Te.value,"onUpdate:modelValue":r[25]||(r[25]=x=>Te.value=x),options:qh(l.login.providers),"aria-label":"供应商",onChange:xh},null,8,["modelValue","options"])]),(k(!0),_(ue,null,Ae(l.login.fields,x=>(k(),_("label",{key:x.key,class:"settings-field"},[d("span",null,[cr(A(Ho(x.label)),1),x.required?(k(),_("i",rS)):V("",!0)]),x.options?(k(),pt(Ei,{key:0,modelValue:He[x.key],"onUpdate:modelValue":M=>He[x.key]=M,options:Zh(x),"aria-label":Ho(x.label)},null,8,["modelValue","onUpdate:modelValue","options","aria-label"])):Ct((k(),_("input",{key:1,"onUpdate:modelValue":M=>He[x.key]=M,type:x.secret?"password":"text",placeholder:x.placeholder||`请输入${Ho(x.label)}`},null,8,iS)),[[Xk,He[x.key]]])]))),128))])]),d("section",oS,[r[100]||(r[100]=d("header",{class:"settings-card-head"},[d("strong",null,"CPA")],-1)),d("div",aS,[d("label",lS,[r[98]||(r[98]=d("span",null,"URL",-1)),Ct(d("input",{"onUpdate:modelValue":r[26]||(r[26]=x=>l.cpaConfig.url=x),type:"text",placeholder:"http://127.0.0.1:8317",autocomplete:"off"},null,512),[[$t,l.cpaConfig.url]])]),d("label",cS,[r[99]||(r[99]=d("span",null,"管理密码",-1)),Ct(d("input",{"onUpdate:modelValue":r[27]||(r[27]=x=>l.cpaConfig.password=x),type:"password",placeholder:"请输入管理密码",autocomplete:"new-password"},null,512),[[$t,l.cpaConfig.password]])])])]),d("section",uS,[d("header",dS,[r[101]||(r[101]=d("div",null,[d("strong",null,"工具"),d("small",null,"内置与插件工具默认开启,关闭后立即对当前会话生效。")],-1)),d("button",{type:"button",class:"mini-button",disabled:l.busy||l.globalTools.loading,onClick:Fg},"保存",8,fS)]),d("div",gS,[(k(!0),_(ue,null,Ae(l.globalTools.items,x=>(k(),_("label",{key:x.name,class:"plugin-settings-row"},[d("span",null,[d("strong",null,[d("code",null,A(x.name),1)]),d("small",null,A(x.source==="plugin"?`插件 · ${x.pluginName||x.pluginId}`:x.source==="external"?"外部工具":"内置工具"),1)]),d("span",hS,[Ct(d("input",{"onUpdate:modelValue":M=>x.configuredEnabled=M,type:"checkbox","aria-label":x.name},null,8,pS),[[Ga,x.configuredEnabled]]),r[102]||(r[102]=d("span",{"aria-hidden":"true"},null,-1))])]))),128))])]),d("section",mS,[d("header",bS,[r[103]||(r[103]=d("strong",null,"插件",-1)),d("button",{type:"button",class:"mini-button",disabled:l.globalPlugins.locked||l.globalPlugins.loading,onClick:jg},"保存",8,kS)]),d("div",yS,[(k(!0),_(ue,null,Ae(l.globalPlugins.items,x=>(k(),_("label",{key:x.id,class:"plugin-settings-row"},[d("span",null,[d("strong",null,A(x.name),1),d("small",null,A(x.tools.length)+" 个工具",1)]),d("span",_S,[Ct(d("input",{"onUpdate:modelValue":M=>x.configuredEnabled=M,type:"checkbox",disabled:l.globalPlugins.locked,"aria-label":x.name},null,8,vS),[[Ga,x.configuredEnabled]]),r[104]||(r[104]=d("span",{"aria-hidden":"true"},null,-1))])]))),128))])])],32)):(k(),_("div",eS,"正在加载配置…"))])])):(k(),_("section",wS,[d("div",xS,[r[105]||(r[105]=d("h2",null,"运行时能力",-1)),d("div",SS,[(k(),_(ue,null,Ae(["流式模型循环","工具执行","上下文指标","会话恢复","后台代理","登录配置","图片附件","Markdown 输出"],x=>d("div",{key:x,class:"capability-card"},A(x),1)),64))])])]))]),l.toast?(k(),_("div",ES,A(l.toast),1)):V("",!0)]),(k(),pt(Kt,{to:"body"},[l.coreVersion?(k(),_("div",{key:0,class:de(["core-version",{celebrating:l.coreEasterEgg}]),role:"button",tabindex:"0",title:`内核版本 ${l.coreVersion} · 点击试试`,onClick:yo,onKeydown:[Xu(tt(yo,["prevent"]),["enter"]),Xu(tt(yo,["prevent"]),["space"])]},[r[106]||(r[106]=d("span",{class:"core-version-spark spark-a","aria-hidden":"true"},null,-1)),r[107]||(r[107]=d("span",{class:"core-version-spark spark-b","aria-hidden":"true"},null,-1)),r[108]||(r[108]=d("span",{class:"core-version-spark spark-c","aria-hidden":"true"},null,-1)),d("span",null,"内核版本 "+A(l.coreVersion),1)],42,TS)):V("",!0)])),(k(),pt(Kt,{to:"body"},[l.cwdPicker.open?(k(),_("div",{key:0,class:"cwd-picker-backdrop",onClick:tt(oi,["self"])},[d("section",AS,[d("header",{class:"cwd-picker-head"},[r[109]||(r[109]=d("strong",null,"CWD",-1)),d("button",{type:"button","aria-label":"关闭",onClick:oi},"×")]),d("form",{class:"cwd-picker-path",onSubmit:r[29]||(r[29]=tt(x=>ai(),["prevent"]))},[Ct(d("input",{"onUpdate:modelValue":r[28]||(r[28]=x=>l.cwdPicker.input=x),autocomplete:"off",spellcheck:"false","aria-label":"工作目录路径"},null,512),[[$t,l.cwdPicker.input]]),d("button",{type:"submit",disabled:l.cwdPicker.loading},"前往",8,CS),d("button",{type:"button",disabled:l.cwdPicker.mutating,onClick:ip},"新建",8,IS)],32),d("div",MS,[l.cwdPicker.parent?(k(),_("button",{key:0,type:"button",onClick:r[30]||(r[30]=x=>ai(l.cwdPicker.parent))},"← 上级")):V("",!0),d("span",null,A(l.cwdPicker.selectedPath||l.cwdPicker.cwd),1)]),d("div",RS,[d("nav",NS,[(k(!0),_(ue,null,Ae(l.cwdPicker.locations,x=>(k(),_("button",{key:`${x.id}-${x.path}`,type:"button",class:de({active:l.cwdPicker.cwd===x.path}),title:x.path,onClick:M=>ai(x.path)},[d("span",OS,A(x.kind==="drive"||x.kind==="volume"?"▣":x.kind==="home"?"◆":"◇"),1),d("strong",null,A(x.label),1)],10,LS))),128))]),d("div",DS,[l.cwdPicker.loading?(k(),_("div",PS,"读取中")):l.cwdPicker.error?(k(),_("div",$S,A(l.cwdPicker.error),1)):(k(),pt(jv,{key:2,nodes:l.cwdPicker.treeRoots,children:l.cwdPicker.treeChildren,expanded:l.cwdPicker.treeExpanded,"selected-path":l.cwdPicker.selectedPath,"allow-delete":!1,onToggle:sp,onSelect:rp,onDelete:op},null,8,["nodes","children","expanded","selected-path"]))])]),d("footer",BS,[d("button",{type:"button",onClick:oi},"取消"),d("button",{type:"button",class:"primary",disabled:l.cwdPicker.mutating||l.cwdPicker.loading,onClick:ap},"选择",8,US)])])])):V("",!0)])),(k(),pt(Kt,{to:"body"},[l.projectContextOpen?(k(),_("div",{key:0,class:"runtime-context-modal-backdrop",onClick:tt(Vo,["self"])},[d("section",FS,[d("header",zS,[d("div",null,[l.projectContextDocument?(k(),_("span",HS,A(l.projectContextDocument.path),1)):V("",!0),d("strong",null,A(((Ee=l.projectContextDocument)==null?void 0:Ee.name)||"项目上下文"),1)]),d("button",{type:"button","aria-label":l.projectContextDocument?"返回":"关闭",onClick:Vo},"×",8,jS)]),d("div",WS,[l.projectContextDocument?(k(),_("pre",GS,A(l.projectContextDocument.content),1)):(k(),_("div",KS,[(k(!0),_(ue,null,Ae(Os.value,x=>(k(),_("button",{key:x.path,type:"button",class:"runtime-context-index-item",onClick:M=>Xh(x)},[d("span",null,[d("strong",null,A(x.name),1),d("small",null,A(rn(x.chars||0))+" 字符",1)]),r[110]||(r[110]=d("b",null,"›",-1))],8,VS))),128))]))])])])):V("",!0)])),(k(),pt(Kt,{to:"body"},[l.confirmDialog.open?(k(),_("div",{key:0,class:"confirm-dialog-backdrop",onClick:r[33]||(r[33]=tt(x=>as(!1),["self"]))},[d("section",{class:"confirm-dialog",role:"alertdialog","aria-modal":"true","aria-label":l.confirmDialog.title},[d("div",{class:de(["confirm-dialog-icon",`tone-${l.confirmDialog.tone}`]),"aria-hidden":"true"},"!",2),d("div",ZS,[d("h3",null,A(l.confirmDialog.title),1),d("p",null,A(l.confirmDialog.message),1)]),d("div",QS,[d("button",{type:"button",class:"ghost",onClick:r[31]||(r[31]=x=>as(!1))},A(l.confirmDialog.cancelLabel),1),d("button",{type:"button",class:de(["primary",{danger:l.confirmDialog.tone==="danger"}]),onClick:r[32]||(r[32]=x=>as(!0))},A(l.confirmDialog.confirmLabel),3)])],8,qS)])):V("",!0)])),(k(),pt(Kt,{to:"body"},[l.contextWindowModalOpen?(k(),_("div",{key:0,class:"context-window-backdrop",onClick:tt(wo,["self"])},[d("section",YS,[d("form",{onSubmit:tt(_h,["prevent"])},[r[112]||(r[112]=d("label",{for:"context-window-input"},"调整本次会话上下文窗口大小:",-1)),d("div",JS,[Ct(d("input",{id:"context-window-input","onUpdate:modelValue":r[34]||(r[34]=x=>l.contextWindowDraft=x),type:"text",inputmode:"numeric",autocomplete:"off",autofocus:"","aria-describedby":"context-window-unit",onInput:yh},null,544),[[$t,l.contextWindowDraft]]),r[111]||(r[111]=d("span",{id:"context-window-unit"},"k",-1))]),l.contextWindowError?(k(),_("p",XS,A(l.contextWindowError),1)):V("",!0),d("div",eE,[d("button",{type:"button",class:"ghost",disabled:l.contextWindowSaving,onClick:wo},"取消",8,tE),d("button",{type:"submit",class:"primary",disabled:l.contextWindowSaving},A(l.contextWindowSaving?"保存中…":"确认"),9,nE)])],32)])])):V("",!0)])),(k(),pt(Kt,{to:"body"},[l.imagePreview?(k(),_("div",{key:0,class:"image-preview-backdrop",onClick:tt(No,["self"])},[d("section",{class:"image-preview-modal",role:"dialog","aria-modal":"true","aria-label":l.imagePreview.caption||"图片预览"},[d("button",{type:"button",class:"image-preview-close","aria-label":"关闭图片预览",onClick:No},"×"),d("div",rE,[d("img",{src:l.imagePreview.src,alt:l.imagePreview.caption||"图片预览"},null,8,iE)]),l.imagePreview.caption?(k(),_("footer",oE,A(l.imagePreview.caption),1)):V("",!0)],8,sE)])):V("",!0)])),(k(),pt(Kt,{to:"body"},[nn.value?(k(),_("div",{key:0,class:"runtime-context-detail-backdrop",onClick:tt(Xr,["self"])},[d("section",aE,[d("header",{class:"runtime-context-modal-head"},[r[113]||(r[113]=d("div",null,[d("strong",null,"压缩上下文详情")],-1)),d("button",{type:"button","aria-label":"关闭",onClick:Xr},"×")]),d("div",lE,[d("dl",cE,[d("div",null,[r[114]||(r[114]=d("dt",null,"压缩方式",-1)),d("dd",null,A(Nh(nn.value)),1)]),d("div",null,[r[115]||(r[115]=d("dt",null,"发生时间",-1)),d("dd",null,A(Io(nn.value.compaction.createdAt)),1)]),d("div",null,[r[116]||(r[116]=d("dt",null,"新窗口消息",-1)),d("dd",null,A(nn.value.compaction.newWindowMessages),1)]),d("div",null,[r[117]||(r[117]=d("dt",null,"保留用户消息",-1)),d("dd",null,A(nn.value.compaction.preservedUserMessages),1)]),d("div",null,[r[118]||(r[118]=d("dt",null,"释放字符",-1)),d("dd",null,A(rn(nn.value.compaction.charsFreed)),1)]),d("div",null,[r[119]||(r[119]=d("dt",null,"图片引用",-1)),d("dd",null,A(nn.value.compaction.imageCount||0),1)])]),r[120]||(r[120]=d("h3",null,"实际续接上下文",-1)),d("pre",null,A(nn.value.compaction.continuationState||nn.value.compaction.summary||"未提供续接上下文"),1)])])])):V("",!0)])),(k(),pt(Kt,{to:"body"},[l.runtimeContextModal?(k(),_("div",{key:0,class:"runtime-context-modal-backdrop",onClick:tt(Wo,["self"])},[d("section",uE,[d("header",dE,[d("div",null,[d("strong",null,A(l.runtimeContextModal==="prompt"?"系统提示词":l.runtimeContextModal==="tools"?"可用工具":"会话插件"),1)]),d("button",{type:"button","aria-label":"关闭",onClick:Wo},"×")]),d("div",fE,[l.runtimeContextModal==="prompt"?(k(),_("div",gE,[d("button",{type:"button",class:"runtime-context-index-item featured",onClick:cp},[d("span",null,[r[121]||(r[121]=d("strong",null,"完整系统提示词",-1)),d("small",null,A(rn(((on=(Ge=l.runtimeContext)==null?void 0:Ge.prompt)==null?void 0:on.chars)||0))+" 字符",1)]),r[122]||(r[122]=d("b",null,"›",-1))]),(k(!0),_(ue,null,Ae(jl.value,(x,M)=>(k(),_("button",{key:`${x.name}-${M}`,type:"button",class:"runtime-context-index-item",onClick:it=>lp(x)},[d("span",null,[d("strong",null,A(x.name),1),d("small",null,A(Ec(x))+" · "+A(rn(x.chars||0))+" 字符",1)]),r[123]||(r[123]=d("b",null,"›",-1))],8,hE))),128))])):l.runtimeContextModal==="tools"?(k(),_("div",pE,[l.sessionTools.loading?(k(),_("div",mE,"同步中")):(k(),_(ue,{key:1},[d("div",bE,[d("span",null,"可用 "+A(Pg.value)+" / "+A(l.sessionTools.items.length),1)]),(k(!0),_(ue,null,Ae(l.sessionTools.items,x=>(k(),_("div",{key:x.name,class:"runtime-plugin-row"},[d("button",{type:"button",class:"runtime-tool-detail-button",disabled:!bo.value.some(M=>M.name===x.name),onClick:M=>up(bo.value.find(it=>it.name===x.name))},[d("code",null,A(x.name),1),d("small",null,A(x.available===!1?`插件未启用 · ${x.pluginName||x.pluginId}`:x.source==="plugin"?`插件 · ${x.pluginName||x.pluginId}`:x.source==="external"?"外部工具":"内置工具"),1)],8,kE),kt(Ei,{class:"runtime-plugin-control","model-value":x.mode,options:t,disabled:l.sessionTools.busy||x.available===!1,"aria-label":`${x.name}状态`,"data-mode":x.mode,"onUpdate:modelValue":M=>zg(x,M)},null,8,["model-value","disabled","aria-label","data-mode","onUpdate:modelValue"])]))),128))],64))])):(k(),_("div",yE,[l.sessionPlugins.loading?(k(),_("div",_E,"同步中")):(k(!0),_(ue,{key:1},Ae(l.sessionPlugins.items,x=>(k(),_("div",{key:x.id,class:"runtime-plugin-row"},[d("span",null,[d("strong",null,A(x.name),1),d("small",null,A(x.tools.length)+" 个工具",1)]),kt(Ei,{class:"runtime-plugin-control","model-value":x.mode,options:t,disabled:l.sessionPlugins.busy||!x.globallyEnabled,"aria-label":`${x.name}状态`,"data-mode":x.mode,"onUpdate:modelValue":M=>Wg(x,M)},null,8,["model-value","disabled","aria-label","data-mode","onUpdate:modelValue"])]))),128))]))])])])):V("",!0)])),(k(),pt(Kt,{to:"body"},[l.runtimeContextDetail?(k(),_("div",{key:0,class:"runtime-context-detail-backdrop",onClick:tt(Ko,["self"])},[d("section",{class:"runtime-context-detail-modal",role:"dialog","aria-modal":"true","aria-label":l.runtimeContextDetail.title},[d("header",wE,[d("div",null,[l.runtimeContextDetail.meta?(k(),_("span",xE,A(l.runtimeContextDetail.meta),1)):V("",!0),d("strong",null,A(l.runtimeContextDetail.title),1)]),d("button",{type:"button","aria-label":"返回",onClick:Ko},"×")]),d("div",SE,[l.runtimeContextDetail.kind==="tool"?(k(),_(ue,{key:0},[l.runtimeContextDetail.description?(k(),_("p",EE,A(l.runtimeContextDetail.description),1)):V("",!0),d("pre",null,A(l.runtimeContextDetail.schema),1)],64)):(k(),_("pre",TE,A(l.runtimeContextDetail.content),1))])],8,vE)])):V("",!0)])),(k(),pt(Kt,{to:"body"},[l.backgroundTaskDetail?(k(),_("div",{key:0,class:"tool-result-modal-backdrop",onClick:tt(ii,["self"])},[d("section",AE,[d("header",CE,[d("div",IE,[r[124]||(r[124]=d("strong",null,"后台任务",-1)),d("span",ME,A(Lt.value),1)]),d("button",{type:"button",class:"tool-result-modal-close","aria-label":"关闭",onClick:ii},"×")]),d("div",{class:de(["tool-result-modal-content","background-task-page",{single:Lt.value<=1}])},[Lt.value>1?(k(),_("nav",RE,[(k(!0),_(ue,null,Ae(l.backgroundTasks,x=>(k(),_("button",{key:Zs(x),type:"button",class:de(["background-task-index-item",{active:Zs(x)===Zs(l.backgroundTaskDetail)}]),title:Bo(x),onClick:M=>zo(x)},[d("span",{class:de(["background-task-dot",`status-${x.status}`])},null,2),d("strong",null,A(ri(x)),1)],10,NE))),128))])):V("",!0),d("article",LE,[d("header",OE,[d("div",DE,[d("span",{class:de(["background-task-dot",`status-${l.backgroundTaskDetail.status}`])},null,2),d("strong",null,A(ri(l.backgroundTaskDetail)),1)]),d("span",{class:de(["tool-result-modal-status",`status-${l.backgroundTaskDetail.status}`])},A(Gh(l.backgroundTaskDetail.status)),3)]),d("dl",PE,[xc(l.backgroundTaskDetail)?(k(),_("div",$E,[r[125]||(r[125]=d("dt",null,"时长",-1)),d("dd",null,A(xc(l.backgroundTaskDetail)),1)])):V("",!0),d("div",null,[r[126]||(r[126]=d("dt",null,"开始",-1)),d("dd",null,A(Io(l.backgroundTaskDetail.createdAt)),1)]),l.backgroundTaskDetail.processId?(k(),_("div",BE,[r[127]||(r[127]=d("dt",null,"PID",-1)),d("dd",null,A(l.backgroundTaskDetail.processId),1)])):V("",!0),l.backgroundTaskDetail.shell?(k(),_("div",UE,[r[128]||(r[128]=d("dt",null,"Shell",-1)),d("dd",null,A(l.backgroundTaskDetail.shell)+A(l.backgroundTaskDetail.tty?" · TTY":""),1)])):V("",!0),l.backgroundTaskDetail.sessionId?(k(),_("div",FE,[r[129]||(r[129]=d("dt",null,"会话",-1)),d("dd",null,A(l.backgroundTaskDetail.sessionId),1)])):V("",!0),l.backgroundTaskDetail.agentId?(k(),_("div",zE,[r[130]||(r[130]=d("dt",null,"代理",-1)),d("dd",null,A(l.backgroundTaskDetail.agentId),1)])):V("",!0),l.backgroundTaskDetail.taskId&&l.backgroundTaskDetail.kind==="agent"?(k(),_("div",HE,[r[131]||(r[131]=d("dt",null,"任务",-1)),d("dd",null,A(l.backgroundTaskDetail.taskId),1)])):V("",!0),l.backgroundTaskDetail.progress?(k(),_("div",jE,[r[132]||(r[132]=d("dt",null,"工具",-1)),d("dd",null,A(l.backgroundTaskDetail.progress.totalToolUseCount||0),1)])):V("",!0),l.backgroundTaskDetail.cwd?(k(),_("div",WE,[r[133]||(r[133]=d("dt",null,"目录",-1)),d("dd",null,A(l.backgroundTaskDetail.cwd),1)])):V("",!0),l.backgroundTaskDetail.outputFile?(k(),_("div",KE,[r[134]||(r[134]=d("dt",null,"输出",-1)),d("dd",null,A(l.backgroundTaskDetail.outputFile),1)])):V("",!0)]),Sc(l.backgroundTaskDetail)?(k(),_("section",VE,[r[135]||(r[135]=d("header",null,"命令",-1)),d("pre",GE,A(Sc(l.backgroundTaskDetail)),1)])):V("",!0),l.backgroundTaskDetail.kind==="terminal"?(k(),_("section",qE,[d("div",ZE,[r[136]||(r[136]=d("strong",null,"输出",-1)),l.backgroundTaskDetail.status==="running"?(k(),_("i",QE)):V("",!0)]),d("pre",{ref_key:"backgroundTaskOutput",ref:te,class:"background-task-live-output"},A(Kh(l.backgroundTaskDetail)||"等待输出…"),513)])):Uo(l.backgroundTaskDetail)||Fo(l.backgroundTaskDetail).length?(k(),_("section",YE,[d("div",JE,[r[137]||(r[137]=d("strong",null,"进度",-1)),l.backgroundTaskDetail.status==="running"?(k(),_("i",XE)):V("",!0)]),Uo(l.backgroundTaskDetail)?(k(),_("pre",eT,A(Uo(l.backgroundTaskDetail)),1)):V("",!0),Fo(l.backgroundTaskDetail).length?(k(),_("pre",tT,A(Fo(l.backgroundTaskDetail).map(x=>`${x.status==="completed"?"✓":x.status==="failed"?"×":"•"} ${x.title}`).join(`
122
+ `)),1)):V("",!0)])):V("",!0)])],2)])])):V("",!0),wn.value?(k(),_("div",{key:1,class:"tool-result-modal-backdrop",onClick:tt(Ks,["self"])},[d("section",{class:"tool-result-modal",role:"dialog","aria-modal":"true","aria-label":`${zn(wn.value)}详情`},[d("header",sT,[d("div",null,[d("div",rT,[d("strong",null,A(zn(wn.value)),1),d("span",{class:de(["tool-result-modal-status",`status-${ls(wn.value).key}`])},A(ls(wn.value).label),3)]),mc(wn.value)?(k(),_("p",iT,A(mc(wn.value)),1)):V("",!0)]),d("button",{type:"button",class:"tool-result-modal-close","aria-label":"关闭工具结果",onClick:Ks},"×")]),d("div",oT,[d("div",{class:"message-text markdown tool-detail-markdown",innerHTML:dp(wn.value)},null,8,aT)]),d("footer",{class:"tool-result-modal-footer"},[d("button",{type:"button",class:"primary",onClick:Ks},"关闭")])],8,nT)])):V("",!0)]))],64)}}};oy(mT).mount("#app");