scream-code 0.11.10 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{app-T1SUMT1T.mjs → app-DZPgQXq3.mjs} +370 -87
- package/dist/main.mjs +1 -1
- package/dist/public/assets/index-Ct3-d8xR.js +90 -0
- package/dist/public/assets/index-Ct3-d8xR.js.map +1 -0
- package/dist/public/assets/{index-BJI4roHX.css → index-DXbFhUFY.css} +1 -1
- package/dist/public/index.html +2 -2
- package/dist/{text-input-dialog-COl6Uu7m.mjs → text-input-dialog-DHhRrX3G.mjs} +12 -0
- package/dist/{text-input-dialog-xqTCBHZF.mjs → text-input-dialog-K1S_ir1m.mjs} +1 -1
- package/package.json +2 -2
- package/dist/public/assets/index-mUEA7L6U.js +0 -90
- package/dist/public/assets/index-mUEA7L6U.js.map +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
var Ou=Object.defineProperty;var Du=(e,t,n)=>t in e?Ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>Du(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/**
|
|
2
|
+
* @vue/shared v3.5.40
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function si(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Oe={},Vn=[],Dt=()=>{},fa=()=>!1,Pr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Mr=e=>e.startsWith("onUpdate:"),Ke=Object.assign,ri=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Bu=Object.prototype.hasOwnProperty,Te=(e,t)=>Bu.call(e,t),fe=Array.isArray,Kn=e=>Ds(e)==="[object Map]",Nr=e=>Ds(e)==="[object Set]",qi=e=>Ds(e)==="[object Date]",ve=e=>typeof e=="function",Be=e=>typeof e=="string",Gt=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",da=e=>(Ae(e)||ve(e))&&ve(e.then)&&ve(e.catch),ha=Object.prototype.toString,Ds=e=>ha.call(e),Gu=e=>Ds(e).slice(8,-1),pa=e=>Ds(e)==="[object Object]",oi=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ms=si(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Or=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ju=/-\w/g,bt=Or(e=>e.replace(ju,t=>t.slice(1).toUpperCase())),zu=/\B([A-Z])/g,Sn=Or(e=>e.replace(zu,"-$1").toLowerCase()),Dr=Or(e=>e.charAt(0).toUpperCase()+e.slice(1)),ro=Or(e=>e?`on${Dr(e)}`:""),Yt=(e,t)=>!Object.is(e,t),nr=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ga=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Br=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Uu=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Vi;const Gr=()=>Vi||(Vi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function un(e){if(fe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Be(s)?qu(s):un(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(Be(e)||Ae(e))return e}const Fu=/;(?![^(]*\))/g,Hu=/:([^]+)/,Wu=/\/\*[^]*?\*\//g;function qu(e){const t={};return e.replace(Wu,"").split(Fu).forEach(n=>{if(n){const s=n.split(Hu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function we(e){let t="";if(Be(e))t=e;else if(fe(e))for(let n=0;n<e.length;n++){const s=we(e[n]);s&&(t+=s+" ")}else if(Ae(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Vu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ku=si(Vu);function ma(e){return!!e||e===""}function Zu(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Bs(e[s],t[s]);return n}function Bs(e,t){if(e===t)return!0;let n=qi(e),s=qi(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Gt(e),s=Gt(t),n||s)return e===t;if(n=fe(e),s=fe(t),n||s)return n&&s?Zu(e,t):!1;if(n=Ae(e),s=Ae(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!Bs(e[i],t[i]))return!1}}return String(e)===String(t)}function Yu(e,t){return e.findIndex(n=>Bs(n,t))}const va=e=>!!(e&&e.__v_isRef===!0),E=e=>Be(e)?e:e==null?"":fe(e)||Ae(e)&&(e.toString===ha||!ve(e.toString))?va(e)?E(e.value):JSON.stringify(e,ya,2):String(e),ya=(e,t)=>va(t)?ya(e,t.value):Kn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[oo(s,o)+" =>"]=r,n),{})}:Nr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>oo(n))}:Gt(t)?oo(t):Ae(t)&&!fe(t)&&!pa(t)?String(t):t,oo=(e,t="")=>{var n;return Gt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Ju(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/**
|
|
6
|
+
* @vue/reactivity v3.5.40
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let nt;class Xu{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&&nt&&(nt.active?(this.parent=nt,this.index=(nt.scopes||(nt.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){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[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){const r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=nt;try{return nt=this,t()}finally{nt=n}}}on(){++this._on===1&&(this.prevScope=nt,nt=this)}off(){if(this._on>0&&--this._on===0){if(nt===this)nt=this.prevScope;else{let t=nt;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,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const r=this.scopes.slice();for(n=0,s=r.length;n<s;n++)r[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Qu(){return nt}let De;const io=new WeakSet;class ba{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,nt&&(nt.active?nt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,io.has(this)&&(io.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||wa(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ki(this),_a(this);const t=De,n=Bt;De=this,Bt=!0;try{return this.fn()}finally{Sa(this),De=t,Bt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ai(t);this.deps=this.depsTail=void 0,Ki(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?io.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){$o(this)&&this.run()}get dirty(){return $o(this)}}let ka=0,vs,ys;function wa(e,t=!1){if(e.flags|=8,t){e.next=ys,ys=e;return}e.next=vs,vs=e}function ii(){ka++}function li(){if(--ka>0)return;if(ys){let t=ys;for(ys=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;vs;){let t=vs;for(vs=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function _a(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Sa(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),ai(s),ef(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function $o(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(xa(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function xa(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===xs)||(e.globalVersion=xs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!$o(e))))return;e.flags|=2;const t=e.dep,n=De,s=Bt;De=e,Bt=!0;try{_a(e);const r=e.fn(e._value);(t.version===0||Yt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{De=n,Bt=s,Sa(e),e.flags&=-3}}function ai(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)ai(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ef(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Bt=!0;const Ca=[];function dn(){Ca.push(Bt),Bt=!1}function hn(){const e=Ca.pop();Bt=e===void 0?!0:e}function Ki(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=De;De=void 0;try{t()}finally{De=n}}}let xs=0;class tf{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 ci{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(!De||!Bt||De===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==De)n=this.activeLink=new tf(De,this),De.deps?(n.prevDep=De.depsTail,De.depsTail.nextDep=n,De.depsTail=n):De.deps=De.depsTail=n,Ta(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=De.depsTail,n.nextDep=void 0,De.depsTail.nextDep=n,De.depsTail=n,De.deps===n&&(De.deps=s)}return n}trigger(t){this.version++,xs++,this.notify(t)}notify(t){ii();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{li()}}}function Ta(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ta(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ro=new WeakMap,Nn=Symbol(""),Ao=Symbol(""),Cs=Symbol("");function lt(e,t,n){if(Bt&&De){let s=Ro.get(e);s||Ro.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new ci),r.map=s,r.key=n),r.track()}}function sn(e,t,n,s,r,o){const i=Ro.get(e);if(!i){xs++;return}const l=a=>{a&&a.trigger()};if(ii(),t==="clear")i.forEach(l);else{const a=fe(e),c=a&&oi(n);if(a&&n==="length"){const u=Number(s);i.forEach((f,p)=>{(p==="length"||p===Cs||!Gt(p)&&p>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get(Cs)),t){case"add":a?c&&l(i.get("length")):(l(i.get(Nn)),Kn(e)&&l(i.get(Ao)));break;case"delete":a||(l(i.get(Nn)),Kn(e)&&l(i.get(Ao)));break;case"set":Kn(e)&&l(i.get(Nn));break}}li()}function Fn(e){const t=Se(e);return t===e?t:(lt(t,"iterate",Cs),Mt(e)?t:t.map(jt))}function jr(e){return lt(e=Se(e),"iterate",Cs),e}function Kt(e,t){return pn(e)?es(On(e)?jt(t):t):jt(t)}const nf={__proto__:null,[Symbol.iterator](){return lo(this,Symbol.iterator,e=>Kt(this,e))},concat(...e){return Fn(this).concat(...e.map(t=>fe(t)?Fn(t):t))},entries(){return lo(this,"entries",e=>(e[1]=Kt(this,e[1]),e))},every(e,t){return en(this,"every",e,t,void 0,arguments)},filter(e,t){return en(this,"filter",e,t,n=>n.map(s=>Kt(this,s)),arguments)},find(e,t){return en(this,"find",e,t,n=>Kt(this,n),arguments)},findIndex(e,t){return en(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return en(this,"findLast",e,t,n=>Kt(this,n),arguments)},findLastIndex(e,t){return en(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return en(this,"forEach",e,t,void 0,arguments)},includes(...e){return ao(this,"includes",e)},indexOf(...e){return ao(this,"indexOf",e)},join(e){return Fn(this).join(e)},lastIndexOf(...e){return ao(this,"lastIndexOf",e)},map(e,t){return en(this,"map",e,t,void 0,arguments)},pop(){return is(this,"pop")},push(...e){return is(this,"push",e)},reduce(e,...t){return Zi(this,"reduce",e,t)},reduceRight(e,...t){return Zi(this,"reduceRight",e,t)},shift(){return is(this,"shift")},some(e,t){return en(this,"some",e,t,void 0,arguments)},splice(...e){return is(this,"splice",e)},toReversed(){return Fn(this).toReversed()},toSorted(e){return Fn(this).toSorted(e)},toSpliced(...e){return Fn(this).toSpliced(...e)},unshift(...e){return is(this,"unshift",e)},values(){return lo(this,"values",e=>Kt(this,e))}};function lo(e,t,n){const s=jr(e),r=s[t]();return s!==e&&!Mt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const sf=Array.prototype;function en(e,t,n,s,r,o){const i=jr(e),l=i!==e&&!Mt(e),a=i[t];if(a!==sf[t]){const f=a.apply(e,o);return l?jt(f):f}let c=n;i!==e&&(l?c=function(f,p){return n.call(this,Kt(e,f),p,e)}:n.length>2&&(c=function(f,p){return n.call(this,f,p,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function Zi(e,t,n,s){const r=jr(e),o=r!==e&&!Mt(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,f){return l&&(l=!1,c=Kt(e,c)),n.call(this,c,Kt(e,u),f,e)}):n.length>3&&(i=function(c,u,f){return n.call(this,c,u,f,e)}));const a=r[t](i,...s);return l?Kt(e,a):a}function ao(e,t,n){const s=Se(e);lt(s,"iterate",Cs);const r=s[t](...n);return(r===-1||r===!1)&&hi(n[0])?(n[0]=Se(n[0]),s[t](...n)):r}function is(e,t,n=[]){dn(),ii();const s=Se(e)[t].apply(e,n);return li(),hn(),s}const rf=si("__proto__,__v_isRef,__isVue"),$a=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Gt));function of(e){Gt(e)||(e=String(e));const t=Se(this);return lt(t,"has",e),t.hasOwnProperty(e)}class Ra{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?mf:La:o?Ia:Ea).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=fe(t);if(!r){let a;if(i&&(a=nf[n]))return a;if(n==="hasOwnProperty")return of}const l=Reflect.get(t,n,ft(t)?t:s);if((Gt(n)?$a.has(n):rf(n))||(r||lt(t,"get",n),o))return l;if(ft(l)){const a=i&&oi(n)?l:l.value;return r&&Ae(a)?Io(a):a}return Ae(l)?r?Io(l):fi(l):l}}class Aa extends Ra{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=fe(t)&&oi(n);if(!this._isShallow){const c=pn(o);if(!Mt(s)&&!pn(s)&&(o=Se(o),s=Se(s)),!i&&ft(o)&&!ft(s))return c||(o.value=s),!0}const l=i?Number(n)<t.length:Te(t,n),a=Reflect.set(t,n,s,ft(t)?t:r);return t===Se(r)&&a&&(l?Yt(s,o)&&sn(t,"set",n,s):sn(t,"add",n,s)),a}deleteProperty(t,n){const s=Te(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&sn(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Gt(n)||!$a.has(n))&<(t,"has",n),s}ownKeys(t){return lt(t,"iterate",fe(t)?"length":Nn),Reflect.ownKeys(t)}}class lf extends Ra{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const af=new Aa,cf=new lf,uf=new Aa(!0);const Eo=e=>e,Ws=e=>Reflect.getPrototypeOf(e);function ff(e,t,n){return function(...s){const r=this.__v_raw,o=Se(r),i=Kn(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?Eo:t?es:jt;return!t&<(o,"iterate",a?Ao:Nn),Ke(Object.create(c),{next(){const{value:f,done:p}=c.next();return p?{value:f,done:p}:{value:l?[u(f[0]),u(f[1])]:u(f),done:p}}})}}function qs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function df(e,t){const n={get(r){const o=this.__v_raw,i=Se(o),l=Se(r);e||(Yt(r,l)&<(i,"get",r),lt(i,"get",l));const{has:a}=Ws(i),c=t?Eo:e?es:jt;if(a.call(i,r))return c(o.get(r));if(a.call(i,l))return c(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&<(Se(r),"iterate",Nn),r.size},has(r){const o=this.__v_raw,i=Se(o),l=Se(r);return e||(Yt(r,l)&<(i,"has",r),lt(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=Se(l),c=t?Eo:e?es:jt;return!e&<(a,"iterate",Nn),l.forEach((u,f)=>r.call(o,c(u),c(f),i))}};return Ke(n,e?{add:qs("add"),set:qs("set"),delete:qs("delete"),clear:qs("clear")}:{add(r){const o=Se(this),i=Ws(o),l=Se(r),a=!t&&!Mt(r)&&!pn(r)?l:r;return i.has.call(o,a)||Yt(r,a)&&i.has.call(o,r)||Yt(l,a)&&i.has.call(o,l)||(o.add(a),sn(o,"add",a,a)),this},set(r,o){!t&&!Mt(o)&&!pn(o)&&(o=Se(o));const i=Se(this),{has:l,get:a}=Ws(i);let c=l.call(i,r);c||(r=Se(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?Yt(o,u)&&sn(i,"set",r,o):sn(i,"add",r,o),this},delete(r){const o=Se(this),{has:i,get:l}=Ws(o);let a=i.call(o,r);a||(r=Se(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&sn(o,"delete",r,void 0),c},clear(){const r=Se(this),o=r.size!==0,i=r.clear();return o&&sn(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=ff(r,e,t)}),n}function ui(e,t){const n=df(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Te(n,r)&&r in s?n:s,r,o)}const hf={get:ui(!1,!1)},pf={get:ui(!1,!0)},gf={get:ui(!0,!1)};const Ea=new WeakMap,Ia=new WeakMap,La=new WeakMap,mf=new WeakMap;function vf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function fi(e){return pn(e)?e:di(e,!1,af,hf,Ea)}function yf(e){return di(e,!1,uf,pf,Ia)}function Io(e){return di(e,!0,cf,gf,La)}function di(e,t,n,s,r){if(!Ae(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=r.get(e);if(o)return o;const i=vf(Gu(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function On(e){return pn(e)?On(e.__v_raw):!!(e&&e.__v_isReactive)}function pn(e){return!!(e&&e.__v_isReadonly)}function Mt(e){return!!(e&&e.__v_isShallow)}function hi(e){return e?!!e.__v_raw:!1}function Se(e){const t=e&&e.__v_raw;return t?Se(t):e}function bf(e){return!Te(e,"__v_skip")&&Object.isExtensible(e)&&ga(e,"__v_skip",!0),e}const jt=e=>Ae(e)?fi(e):e,es=e=>Ae(e)?Io(e):e;function ft(e){return e?e.__v_isRef===!0:!1}function H(e){return kf(e,!1)}function kf(e,t){return ft(e)?e:new wf(e,t)}class wf{constructor(t,n){this.dep=new ci,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Se(t),this._value=n?t:jt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Mt(t)||pn(t);t=s?t:Se(t),Yt(t,n)&&(this._rawValue=t,this._value=s?t:jt(t),this.dep.trigger())}}function J(e){return ft(e)?e.value:e}function _f(e){return ve(e)?e():J(e)}const Sf={get:(e,t,n)=>t==="__v_raw"?e:J(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ft(r)&&!ft(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Pa(e){return On(e)?e:new Proxy(e,Sf)}class xf{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ci(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=xs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&De!==this)return wa(this,!0),!0}get value(){const t=this.dep.track();return xa(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Cf(e,t,n=!1){let s,r;return ve(e)?s=e:(s=e.get,r=e.set),new xf(s,r,n)}const Vs={},ar=new WeakMap;let En;function Tf(e,t=!1,n=En){if(n){let s=ar.get(n);s||ar.set(n,s=[]),s.push(e)}}function $f(e,t,n=Oe){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=T=>r?T:Mt(T)||r===!1||r===0?rn(T,1):rn(T);let u,f,p,g,d=!1,m=!1;if(ft(e)?(f=()=>e.value,d=Mt(e)):On(e)?(f=()=>c(e),d=!0):fe(e)?(m=!0,d=e.some(T=>On(T)||Mt(T)),f=()=>e.map(T=>{if(ft(T))return T.value;if(On(T))return c(T);if(ve(T))return a?a(T,2):T()})):ve(e)?t?f=a?()=>a(e,2):e:f=()=>{if(p){dn();try{p()}finally{hn()}}const T=En;En=u;try{return a?a(e,3,[g]):e(g)}finally{En=T}}:f=Dt,t&&r){const T=f,K=r===!0?1/0:r;f=()=>rn(T(),K)}const b=Qu(),v=()=>{u.stop(),b&&b.active&&ri(b.effects,u)};if(o&&t){const T=t;t=(...K)=>{const Q=T(...K);return v(),Q}}let S=m?new Array(e.length).fill(Vs):Vs;const C=T=>{if(!(!(u.flags&1)||!u.dirty&&!T))if(t){const K=u.run();if(T||r||d||(m?K.some((Q,G)=>Yt(Q,S[G])):Yt(K,S))){p&&p();const Q=En;En=u;try{const G=[K,S===Vs?void 0:m&&S[0]===Vs?[]:S,g];S=K,a?a(t,3,G):t(...G)}finally{En=Q}}}else u.run()};return l&&l(C),u=new ba(f),u.scheduler=i?()=>i(C,!1):C,g=T=>Tf(T,!1,u),p=u.onStop=()=>{const T=ar.get(u);if(T){if(a)a(T,4);else for(const K of T)K();ar.delete(u)}},t?s?C(!0):S=u.run():i?i(C.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function rn(e,t=1/0,n){if(t<=0||!Ae(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ft(e))rn(e.value,t,n);else if(fe(e))for(let s=0;s<e.length;s++)rn(e[s],t,n);else if(Nr(e)||Kn(e))e.forEach(s=>{rn(s,t,n)});else if(pa(e)){for(const s in e)rn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&rn(e[s],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.40
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function Gs(e,t,n,s){try{return s?e(...s):e()}catch(r){zr(r,t,n)}}function Ot(e,t,n,s){if(ve(e)){const r=Gs(e,t,n,s);return r&&da(r)&&r.catch(o=>{zr(o,t,n)}),r}if(fe(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Ot(e[o],t,n,s));return r}}function zr(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Oe;if(t){let l=t.parent;const a=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const u=l.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,a,c)===!1)return}l=l.parent}if(o){dn(),Gs(o,null,10,[e,a,c]),hn();return}}Rf(e,n,r,s,i)}function Rf(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const vt=[];let Vt=-1;const Zn=[];let kn=null,Hn=0;const Ma=Promise.resolve();let cr=null;function Lt(e){const t=cr||Ma;return e?t.then(this?e.bind(this):e):t}function Af(e){let t=Vt+1,n=vt.length;for(;t<n;){const s=t+n>>>1,r=vt[s],o=Ts(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function pi(e){if(!(e.flags&1)){const t=Ts(e),n=vt[vt.length-1];!n||!(e.flags&2)&&t>=Ts(n)?vt.push(e):vt.splice(Af(t),0,e),e.flags|=1,Na()}}function Na(){cr||(cr=Ma.then(Ba))}function Oa(e){fe(e)?Zn.push(...e):kn&&e.id===-1?kn.splice(Hn+1,0,e):e.flags&1||(Zn.push(e),e.flags|=1),Na()}function Yi(e,t,n=Vt+1){for(;n<vt.length;n++){const s=vt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;vt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Da(e){if(Zn.length){const t=[...new Set(Zn)].sort((n,s)=>Ts(n)-Ts(s));if(Zn.length=0,kn){kn.push(...t);return}for(kn=t,Hn=0;Hn<kn.length;Hn++){const n=kn[Hn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}kn=null,Hn=0}}const Ts=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ba(e){try{for(Vt=0;Vt<vt.length;Vt++){const t=vt[Vt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Gs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Vt<vt.length;Vt++){const t=vt[Vt];t&&(t.flags&=-2)}Vt=-1,vt.length=0,Da(),cr=null,(vt.length||Zn.length)&&Ba()}}let rt=null,Ga=null;function ur(e){const t=rt;return rt=e,Ga=e&&e.type.__scopeId||null,t}function Qe(e,t=rt,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&hr(-1);const o=ur(t),i=fn.length;let l;try{l=e(...r)}finally{for(let a=fn.length;a>i;a--)ki();ur(o),s._d&&hr(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function st(e,t){if(rt===null)return e;const n=Kr(rt),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=Oe]=t[r];o&&(ve(o)&&(o={mounted:o,updated:o}),o.deep&&rn(i),s.push({dir:o,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function $n(e,t,n,s){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];o&&(l.oldValue=o[i].value);let a=l.dir[s];a&&(dn(),Ot(a,n,8,[e.el,l,e,t]),hn())}}function Dn(e,t){if(ct){let n=ct.provides;const s=ct.parent&&ct.parent.provides;s===n&&(n=ct.provides=Object.create(s)),n[e]=t}}function Nt(e,t,n=!1){const s=Vr();if(s||Jn){let r=Jn?Jn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&ve(t)?t.call(s&&s.proxy):t}}const Ef=Symbol.for("v-scx"),If=()=>Nt(Ef);function je(e,t,n){return ja(e,t,n)}function ja(e,t,n=Oe){const{immediate:s,deep:r,flush:o,once:i}=n,l=Ke({},n),a=t&&s||!t&&o!=="post";let c;if(Es){if(o==="sync"){const g=If();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!a){const g=()=>{};return g.stop=Dt,g.resume=Dt,g.pause=Dt,g}}const u=ct;l.call=(g,d,m)=>Ot(g,u,d,m);let f=!1;o==="post"?l.scheduler=g=>{gt(g,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(g,d)=>{d?g():pi(g)}),l.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const p=$f(e,t,l);return Es&&(c?c.push(p):a&&p()),p}function Lf(e,t,n){const s=this.proxy,r=Be(e)?e.includes(".")?za(s,e):()=>s[e]:e.bind(s,s);let o;ve(t)?o=t:(o=t.handler,n=t);const i=js(this),l=ja(r,o.bind(s),n);return i(),l}function za(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const yn=new WeakMap,Ua=Symbol("_vte"),Fa=e=>e.__isTeleport,In=e=>e&&(e.disabled||e.disabled===""),Pf=e=>e&&(e.defer||e.defer===""),Ji=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Xi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Lo=(e,t)=>{const n=e&&e.to;return Be(n)?t?t(n):null:n},Mf={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,a,c){const{mc:u,pc:f,pbc:p,o:{insert:g,querySelector:d,createText:m,createComment:b,parentNode:v}}=c,S=In(t.props);let{dynamicChildren:C}=t;const T=(G,de,F)=>{G.shapeFlag&16&&u(G.children,de,F,r,o,i,l,a)},K=(G=t)=>{const de=In(G.props),F=G.target=Lo(G.props,d),te=Po(F,G,m,g);F&&(i!=="svg"&&Ji(F)?i="svg":i!=="mathml"&&Xi(F)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(F),de||(T(G,F,te),ds(G,!1)))},Q=G=>{const de=()=>{if(yn.get(G)===de){if(yn.delete(G),In(G.props)){const F=v(G.el)||n;T(G,F,G.anchor),ds(G,!0)}K(G)}};yn.set(G,de),gt(de,o)};if(e==null){const G=t.el=m(""),de=t.anchor=m("");if(g(G,n,s),g(de,n,s),Pf(t.props)||o&&o.pendingBranch){Q(t);return}S&&(T(t,n,de),ds(t,!0)),K()}else{t.el=e.el;const G=t.anchor=e.anchor,de=yn.get(e);if(de){de.flags|=8,yn.delete(e),Q(t);return}t.targetStart=e.targetStart;const F=t.target=e.target,te=t.targetAnchor=e.targetAnchor,pe=In(e.props),D=pe?n:F,he=pe?G:te;if(i==="svg"||Ji(F)?i="svg":(i==="mathml"||Xi(F))&&(i="mathml"),C?(p(e.dynamicChildren,C,D,r,o,i,l),bi(e,t,!0)):a||f(e,t,D,he,r,o,i,l,!1),S)pe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ks(t,n,G,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const I=Lo(t.props,d);I&&(t.target=I,Ks(t,I,null,c,0))}else pe&&Ks(t,F,te,c,1);ds(t,S)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:a,targetStart:c,targetAnchor:u,target:f,props:p}=e,g=In(p),d=o||!g,m=yn.get(e);if(m&&(m.flags|=8,yn.delete(e)),f&&(r(c),r(u)),o&&r(a),!m&&(g||f)&&i&16)for(let b=0;b<l.length;b++){const v=l[b];s(v,t,n,d,!!v.dynamicChildren)}},move:Ks,hydrate:Nf};function Ks(e,t,n,{o:{insert:s},m:r},o=2){o===0&&s(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:a,children:c,props:u}=e,f=o===2;if(f&&s(i,t,n),!yn.has(e)&&(!f||In(u))&&a&16)for(let p=0;p<c.length;p++)r(c[p],t,n,2);f&&s(l,t,n)}function Nf(e,t,n,s,r,o,{o:{nextSibling:i,parentNode:l,querySelector:a,insert:c,createText:u}},f){function p(b,v){let S=v;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,b._lpa=t.targetAnchor&&i(t.targetAnchor);break}}S=i(S)}}function g(b,v){v.anchor=f(i(b),v,l(b),n,s,r,o)}const d=t.target=Lo(t.props,a),m=In(t.props);if(d){const b=d._lpa||d.firstChild;t.shapeFlag&16&&(m?(g(e,t),p(d,b),t.targetAnchor||Po(d,t,u,c,l(e)===d?e:null)):(t.anchor=i(e),p(d,b),t.targetAnchor||Po(d,t,u,c),f(b&&i(b),t,d,n,s,r,o))),ds(t,m)}else m&&t.shapeFlag&16&&(g(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const gi=Mf;function ds(e,t){const n=e.ctx;if(n&&n.ut){let s,r;for(t?(s=e.el,r=e.anchor):(s=e.targetStart,r=e.targetAnchor);s&&s!==r;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function Po(e,t,n,s,r=null){const o=t.targetStart=n(""),i=t.targetAnchor=n("");return o[Ua]=i,e&&(s(o,e,r),s(i,e,r)),i}const It=Symbol("_leaveCb"),ls=Symbol("_enterCb");function Ha(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Jt(()=>{e.isMounted=!0}),xn(()=>{e.isUnmounting=!0}),e}const Rt=[Function,Array],Wa={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Rt,onEnter:Rt,onAfterEnter:Rt,onEnterCancelled:Rt,onBeforeLeave:Rt,onLeave:Rt,onAfterLeave:Rt,onLeaveCancelled:Rt,onBeforeAppear:Rt,onAppear:Rt,onAfterAppear:Rt,onAppearCancelled:Rt},qa=e=>{const t=e.subTree;return t.component?qa(t.component):t},Of={name:"BaseTransition",props:Wa,setup(e,{slots:t}){const n=Vr(),s=Ha();return()=>{const r=t.default&&mi(t.default(),!0),o=r&&r.length?Va(r):n.subTree?V():void 0;if(!o)return;const i=Se(e),{mode:l}=i;if(s.isLeaving)return co(o);const a=Qi(o);if(!a)return co(o);let c=$s(a,i,s,n,f=>c=f);a.type!==at&&Gn(a,c);let u=n.subTree&&Qi(n.subTree);if(u&&u.type!==at&&!Ln(u,a)&&qa(n).type!==at){let f=$s(u,i,s,n);if(Gn(u,f),l==="out-in"&&a.type!==at)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},co(o);l==="in-out"&&a.type!==at?f.delayLeave=(p,g,d)=>{const m=Ka(s,u);m[String(u.key)]=u,p[It]=()=>{g(),p[It]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{d(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Va(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==at){t=n;break}}return t}const Df=Of;function Ka(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function $s(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:g,onAfterLeave:d,onLeaveCancelled:m,onBeforeAppear:b,onAppear:v,onAfterAppear:S,onAppearCancelled:C}=t,T=String(e.key),K=Ka(n,e),Q=(F,te)=>{F&&Ot(F,s,9,te)},G=(F,te)=>{const pe=te[1];Q(F,te),fe(F)?F.every(D=>D.length<=1)&&pe():F.length<=1&&pe()},de={mode:i,persisted:l,beforeEnter(F){let te=a;if(!n.isMounted)if(o)te=b||a;else return;F[It]&&F[It](!0);const pe=K[T];pe&&Ln(e,pe)&&pe.el[It]&&pe.el[It](),Q(te,[F])},enter(F){if(K[T]===e)return;let te=c,pe=u,D=f;if(!n.isMounted)if(o)te=v||c,pe=S||u,D=C||f;else return;let he=!1;F[ls]=R=>{he||(he=!0,R?Q(D,[F]):Q(pe,[F]),de.delayedLeave&&de.delayedLeave(),F[ls]=void 0)};const I=F[ls].bind(null,!1);te?G(te,[F,I]):I()},leave(F,te){const pe=String(e.key);if(F[ls]&&F[ls](!0),n.isUnmounting)return te();Q(p,[F]);let D=!1;F[It]=I=>{D||(D=!0,te(),I?Q(m,[F]):Q(d,[F]),F[It]=void 0,K[pe]===e&&delete K[pe])};const he=F[It].bind(null,!1);K[pe]=e,g?G(g,[F,he]):he()},clone(F){const te=$s(F,t,n,s,r);return r&&r(te),te}};return de}function co(e){if(Ur(e))return e=_n(e),e.children=null,e}function Qi(e){if(!Ur(e))return Fa(e.type)&&e.children?Va(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ve(n.default))return n.default()}}function Gn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Gn(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 mi(e,t=!1,n){let s=[],r=0;for(let o=0;o<e.length;o++){let i=e[o];const l=n==null?i.key:String(n)+String(i.key!=null?i.key:o);i.type===re?(i.patchFlag&128&&r++,s=s.concat(mi(i.children,t,l))):(t||i.type!==at)&&s.push(l!=null?_n(i,{key:l}):i)}if(r>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function xe(e,t){return ve(e)?Ke({name:e.name},t,{setup:e}):e}function Za(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function el(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const fr=new WeakMap;function bs(e,t,n,s,r=!1){if(fe(e)){e.forEach((m,b)=>bs(m,t&&(fe(t)?t[b]:t),n,s,r));return}if(Yn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&bs(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Kr(s.component):s.el,i=r?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===Oe?l.refs={}:l.refs,f=l.setupState,p=Se(f),g=f===Oe?fa:m=>el(u,m)?!1:Te(p,m),d=(m,b)=>!(b&&el(u,b));if(c!=null&&c!==a){if(tl(t),Be(c))u[c]=null,g(c)&&(f[c]=null);else if(ft(c)){const m=t;d(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(ve(a))Gs(a,l,12,[i,u]);else{const m=Be(a),b=ft(a);if(m||b){const v=()=>{if(e.f){const S=m?g(a)?f[a]:u[a]:d()||!e.k?a.value:u[e.k];if(r)fe(S)&&ri(S,o);else if(fe(S))S.includes(o)||S.push(o);else if(m)u[a]=[o],g(a)&&(f[a]=u[a]);else{const C=[o];d(a,e.k)&&(a.value=C),e.k&&(u[e.k]=C)}}else m?(u[a]=i,g(a)&&(f[a]=i)):b&&(d(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const S=()=>{v(),fr.delete(e)};S.id=-1,fr.set(e,S),gt(S,n)}else tl(e),v()}}}function tl(e){const t=fr.get(e);t&&(t.flags|=8,fr.delete(e))}Gr().requestIdleCallback;Gr().cancelIdleCallback;const Yn=e=>!!e.type.__asyncLoader,Ur=e=>e.type.__isKeepAlive;function Bf(e,t){Ya(e,"a",t)}function Gf(e,t){Ya(e,"da",t)}function Ya(e,t,n=ct){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Fr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Ur(r.parent.vnode)&&jf(s,t,n,r),r=r.parent}}function jf(e,t,n,s){const r=Fr(t,e,s,!0);Hr(()=>{ri(s[t],r)},n)}function Fr(e,t,n=ct,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{dn();const l=js(n),a=Ot(t,n,e,i);return l(),hn(),a});return s?r.unshift(o):r.push(o),o}}const gn=e=>(t,n=ct)=>{(!Es||e==="sp")&&Fr(e,(...s)=>t(...s),n)},zf=gn("bm"),Jt=gn("m"),Ja=gn("bu"),Xa=gn("u"),xn=gn("bum"),Hr=gn("um"),Uf=gn("sp"),Ff=gn("rtg"),Hf=gn("rtc");function Wf(e,t=ct){Fr("ec",e,t)}const qf="components",Qa=Symbol.for("v-ndc");function Vf(e){return Be(e)?Kf(qf,e,!1)||e:e||Qa}function Kf(e,t,n=!0,s=!1){const r=rt||ct;if(r){const o=r.type;{const l=Ld(o,!1);if(l&&(l===t||l===bt(t)||l===Dr(bt(t))))return o}const i=nl(r[e]||o[e],t)||nl(r.appContext[e],t);return!i&&s?o:i}}function nl(e,t){return e&&(e[t]||e[bt(t)]||e[Dr(bt(t))])}function Ve(e,t,n,s){let r;const o=n,i=fe(e);if(i||Be(e)){const l=i&&On(e);let a=!1,c=!1;l&&(a=!Mt(e),c=pn(e),e=jr(e)),r=new Array(e.length);for(let u=0,f=e.length;u<f;u++)r[u]=t(a?c?es(jt(e[u])):jt(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,o)}else if(Ae(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,c=l.length;a<c;a++){const u=l[a];r[a]=t(e[u],u,a,o)}}else r=[];return r}function sr(e,t,n={},s,r,o){if(rt.ce||rt.parent&&Yn(rt.parent)&&rt.parent.ce){const c=n,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),k(),ze(re,null,[W("slot",c,s&&s())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=fn.length;k();let a;try{const c=i&&ec(i(n)),u=n.key||o||c&&c.key;a=ze(re,{key:(u&&!Gt(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=fn.length;u>l;u--)ki();throw c}finally{i&&i._c&&(i._d=!0)}return a}function ec(e){return e.some(t=>As(t)?!(t.type===at||t.type===re&&!ec(t.children)):!0)?e:null}const Mo=e=>e?bc(e)?Kr(e):Mo(e.parent):null,ks=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Mo(e.parent),$root:e=>Mo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>nc(e),$forceUpdate:e=>e.f||(e.f=()=>{pi(e.update)}),$nextTick:e=>e.n||(e.n=Lt.bind(e.proxy)),$watch:e=>Lf.bind(e)}),uo=(e,t)=>e!==Oe&&!e.__isScriptSetup&&Te(e,t),Zf={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(uo(s,t))return i[t]=1,s[t];if(r!==Oe&&Te(r,t))return i[t]=2,r[t];if(Te(o,t))return i[t]=3,o[t];if(n!==Oe&&Te(n,t))return i[t]=4,n[t];No&&(i[t]=0)}}const c=ks[t];let u,f;if(c)return t==="$attrs"&<(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==Oe&&Te(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,Te(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return uo(r,t)?(r[t]=n,!0):s!==Oe&&Te(s,t)?(s[t]=n,!0):Te(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let a;return!!(n[l]||e!==Oe&&l[0]!=="$"&&Te(e,l)||uo(t,l)||Te(o,l)||Te(s,l)||Te(ks,l)||Te(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function sl(e){return fe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let No=!0;function Yf(e){const t=nc(e),n=e.proxy,s=e.ctx;No=!1,t.beforeCreate&&rl(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:f,mounted:p,beforeUpdate:g,updated:d,activated:m,deactivated:b,beforeDestroy:v,beforeUnmount:S,destroyed:C,unmounted:T,render:K,renderTracked:Q,renderTriggered:G,errorCaptured:de,serverPrefetch:F,expose:te,inheritAttrs:pe,components:D,directives:he,filters:I}=t;if(c&&Jf(c,s,null),i)for(const ie in i){const se=i[ie];ve(se)&&(s[ie]=se.bind(n))}if(r){const ie=r.call(n,n);Ae(ie)&&(e.data=fi(ie))}if(No=!0,o)for(const ie in o){const se=o[ie],Fe=ve(se)?se.bind(n,n):ve(se.get)?se.get.bind(n,n):Dt,He=!ve(se)&&ve(se.set)?se.set.bind(n):Dt,Pe=X({get:Fe,set:He});Object.defineProperty(s,ie,{enumerable:!0,configurable:!0,get:()=>Pe.value,set:We=>Pe.value=We})}if(l)for(const ie in l)tc(l[ie],s,n,ie);if(a){const ie=ve(a)?a.call(n):a;Reflect.ownKeys(ie).forEach(se=>{Dn(se,ie[se])})}u&&rl(u,e,"c");function Z(ie,se){fe(se)?se.forEach(Fe=>ie(Fe.bind(n))):se&&ie(se.bind(n))}if(Z(zf,f),Z(Jt,p),Z(Ja,g),Z(Xa,d),Z(Bf,m),Z(Gf,b),Z(Wf,de),Z(Hf,Q),Z(Ff,G),Z(xn,S),Z(Hr,T),Z(Uf,F),fe(te))if(te.length){const ie=e.exposed||(e.exposed={});te.forEach(se=>{Object.defineProperty(ie,se,{get:()=>n[se],set:Fe=>n[se]=Fe,enumerable:!0})})}else e.exposed||(e.exposed={});K&&e.render===Dt&&(e.render=K),pe!=null&&(e.inheritAttrs=pe),D&&(e.components=D),he&&(e.directives=he),F&&Za(e)}function Jf(e,t,n=Dt){fe(e)&&(e=Oo(e));for(const s in e){const r=e[s];let o;Ae(r)?"default"in r?o=Nt(r.from||s,r.default,!0):o=Nt(r.from||s):o=Nt(r),ft(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function rl(e,t,n){Ot(fe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function tc(e,t,n,s){let r=s.includes(".")?za(n,s):()=>n[s];if(Be(e)){const o=t[e];ve(o)&&je(r,o)}else if(ve(e))je(r,e.bind(n));else if(Ae(e))if(fe(e))e.forEach(o=>tc(o,t,n,s));else{const o=ve(e.handler)?e.handler.bind(n):t[e.handler];ve(o)&&je(r,o,e)}}function nc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(c=>dr(a,c,i,!0)),dr(a,t,i)),Ae(t)&&o.set(t,a),a}function dr(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&dr(e,o,n,!0),r&&r.forEach(i=>dr(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Xf[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Xf={data:ol,props:il,emits:il,methods:hs,computed:hs,beforeCreate:pt,created:pt,beforeMount:pt,mounted:pt,beforeUpdate:pt,updated:pt,beforeDestroy:pt,beforeUnmount:pt,destroyed:pt,unmounted:pt,activated:pt,deactivated:pt,errorCaptured:pt,serverPrefetch:pt,components:hs,directives:hs,watch:ed,provide:ol,inject:Qf};function ol(e,t){return t?e?function(){return Ke(ve(e)?e.call(this,this):e,ve(t)?t.call(this,this):t)}:t:e}function Qf(e,t){return hs(Oo(e),Oo(t))}function Oo(e){if(fe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function pt(e,t){return e?[...new Set([].concat(e,t))]:t}function hs(e,t){return e?Ke(Object.create(null),e,t):t}function il(e,t){return e?fe(e)&&fe(t)?[...new Set([...e,...t])]:Ke(Object.create(null),sl(e),sl(t??{})):t}function ed(e,t){if(!e)return t;if(!t)return e;const n=Ke(Object.create(null),e);for(const s in t)n[s]=pt(e[s],t[s]);return n}function sc(){return{app:null,config:{isNativeTag:fa,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 td=0;function nd(e,t){return function(s,r=null){ve(s)||(s=Ke({},s)),r!=null&&!Ae(r)&&(r=null);const o=sc(),i=new WeakSet,l=[];let a=!1;const c=o.app={_uid:td++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:Md,get config(){return o.config},set config(u){},use(u,...f){return i.has(u)||(u&&ve(u.install)?(i.add(u),u.install(c,...f)):ve(u)&&(i.add(u),u(c,...f))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,f){return f?(o.components[u]=f,c):o.components[u]},directive(u,f){return f?(o.directives[u]=f,c):o.directives[u]},mount(u,f,p){if(!a){const g=c._ceVNode||W(s,r);return g.appContext=o,p===!0?p="svg":p===!1&&(p=void 0),e(g,u,p),a=!0,c._container=u,u.__vue_app__=c,Kr(g.component)}},onUnmount(u){l.push(u)},unmount(){a&&(Ot(l,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,f){return o.provides[u]=f,c},runWithContext(u){const f=Jn;Jn=c;try{return u()}finally{Jn=f}}};return c}}let Jn=null;const sd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${bt(t)}Modifiers`]||e[`${Sn(t)}Modifiers`];function rd(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Oe;let r=n;const o=t.startsWith("update:"),i=o&&sd(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>Be(u)?u.trim():u)),i.number&&(r=n.map(Br)));let l,a=s[l=ro(t)]||s[l=ro(bt(t))];!a&&o&&(a=s[l=ro(Sn(t))]),a&&Ot(a,e,6,r);const c=s[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ot(c,e,6,r)}}const od=new WeakMap;function rc(e,t,n=!1){const s=n?od:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!ve(e)){const a=c=>{const u=rc(c,t,!0);u&&(l=!0,Ke(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(Ae(e)&&s.set(e,null),null):(fe(o)?o.forEach(a=>i[a]=null):Ke(i,o),Ae(e)&&s.set(e,i),i)}function Wr(e,t){return!e||!Pr(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Te(e,t[0].toLowerCase()+t.slice(1))||Te(e,Sn(t))||Te(e,t))}function ll(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:f,data:p,setupState:g,ctx:d,inheritAttrs:m}=e,b=ur(e);let v,S;try{if(n.shapeFlag&4){const T=r||s,K=T;v=Zt(c.call(K,T,u,f,g,p,d)),S=l}else{const T=t;v=Zt(T.length>1?T(f,{attrs:l,slots:i,emit:a}):T(f,null)),S=t.props?l:id(l)}}catch(T){fn.length=0,zr(T,e,1),v=W(at)}let C=v;if(S&&m!==!1){const T=Object.keys(S),{shapeFlag:K}=C;T.length&&K&7&&(o&&T.some(Mr)&&(S=ld(S,o)),C=_n(C,S,!1,!0))}return n.dirs&&(C=_n(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&Gn(C,n.transition),v=C,ur(b),v}const id=e=>{let t;for(const n in e)(n==="class"||n==="style"||Pr(n))&&((t||(t={}))[n]=e[n]);return t},ld=(e,t)=>{const n={};for(const s in e)(!Mr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function ad(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:a}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?al(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const p=u[f];if(oc(i,s,p)&&!Wr(c,p))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?al(s,i,c):!0:!!i;return!1}function al(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const o=s[r];if(oc(t,e,o)&&!Wr(n,o))return!0}return!1}function oc(e,t,n){const s=e[n],r=t[n];return n==="style"&&Ae(s)&&Ae(r)?!Bs(s,r):s!==r}function cd({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const ic={},lc=()=>Object.create(ic),ac=e=>Object.getPrototypeOf(e)===ic;function ud(e,t,n,s=!1){const r={},o=lc();e.propsDefaults=Object.create(null),cc(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:yf(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function fd(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=Se(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let p=u[f];if(Wr(e.emitsOptions,p))continue;const g=t[p];if(a)if(Te(o,p))g!==o[p]&&(o[p]=g,c=!0);else{const d=bt(p);r[d]=Do(a,l,d,g,e,!1)}else g!==o[p]&&(o[p]=g,c=!0)}}}else{cc(e,t,r,o)&&(c=!0);let u;for(const f in l)(!t||!Te(t,f)&&((u=Sn(f))===f||!Te(t,u)))&&(a?n&&(n[f]!==void 0||n[u]!==void 0)&&(r[f]=Do(a,l,f,void 0,e,!0)):delete r[f]);if(o!==l)for(const f in o)(!t||!Te(t,f))&&(delete o[f],c=!0)}c&&sn(e.attrs,"set","")}function cc(e,t,n,s){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(ms(a))continue;const c=t[a];let u;r&&Te(r,u=bt(a))?!o||!o.includes(u)?n[u]=c:(l||(l={}))[u]=c:Wr(e.emitsOptions,a)||(!(a in s)||c!==s[a])&&(s[a]=c,i=!0)}if(o){const a=Se(n),c=l||Oe;for(let u=0;u<o.length;u++){const f=o[u];n[f]=Do(r,a,f,c[f],e,!Te(c,f))}}return i}function Do(e,t,n,s,r,o){const i=e[n];if(i!=null){const l=Te(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&ve(a)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=js(r);s=c[n]=a.call(null,t),u()}}else s=a;r.ce&&r.ce._setProp(n,s)}i[0]&&(o&&!l?s=!1:i[1]&&(s===""||s===Sn(n))&&(s=!0))}return s}const dd=new WeakMap;function uc(e,t,n=!1){const s=n?dd:t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!ve(e)){const u=f=>{a=!0;const[p,g]=uc(f,t,!0);Ke(i,p),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return Ae(e)&&s.set(e,Vn),Vn;if(fe(o))for(let u=0;u<o.length;u++){const f=bt(o[u]);cl(f)&&(i[f]=Oe)}else if(o)for(const u in o){const f=bt(u);if(cl(f)){const p=o[u],g=i[f]=fe(p)||ve(p)?{type:p}:Ke({},p),d=g.type;let m=!1,b=!0;if(fe(d))for(let v=0;v<d.length;++v){const S=d[v],C=ve(S)&&S.name;if(C==="Boolean"){m=!0;break}else C==="String"&&(b=!1)}else m=ve(d)&&d.name==="Boolean";g[0]=m,g[1]=b,(m||Te(g,"default"))&&l.push(f)}}const c=[i,l];return Ae(e)&&s.set(e,c),c}function cl(e){return e[0]!=="$"&&!ms(e)}const vi=e=>e==="_"||e==="_ctx"||e==="$stable",yi=e=>fe(e)?e.map(Zt):[Zt(e)],hd=(e,t,n)=>{if(t._n)return t;const s=Qe((...r)=>yi(t(...r)),n);return s._c=!1,s},fc=(e,t,n)=>{const s=e._ctx;for(const r in e){if(vi(r))continue;const o=e[r];if(ve(o))t[r]=hd(r,o,s);else if(o!=null){const i=yi(o);t[r]=()=>i}}},dc=(e,t)=>{const n=yi(t);e.slots.default=()=>n},hc=(e,t,n)=>{for(const s in t)(n||!vi(s))&&(e[s]=t[s])},pd=(e,t,n)=>{const s=e.slots=lc();if(e.vnode.shapeFlag&32){const r=t._;r?(hc(s,t,n),n&&ga(s,"_",r,!0)):fc(t,s)}else t&&dc(e,t)},gd=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=Oe;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:hc(r,t,n):(o=!t.$stable,fc(t,r)),i=t}else t&&(dc(e,t),i={default:1});if(o)for(const l in r)!vi(l)&&i[l]==null&&delete r[l]},gt=kd;function md(e){return vd(e)}function vd(e,t){const n=Gr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:p,setScopeId:g=Dt,insertStaticContent:d}=e,m=(y,w,A,N=null,M=null,L=null,q=void 0,U=null,B=!!w.dynamicChildren)=>{if(y===w)return;y&&!Ln(y,w)&&(N=kt(y),We(y,M,L,!0),y=null),w.patchFlag===-2&&(B=!1,w.dynamicChildren=null);const{type:P,ref:le,shapeFlag:Y}=w;switch(P){case qr:b(y,w,A,N);break;case at:v(y,w,A,N);break;case ws:y==null&&S(w,A,N,q);break;case re:D(y,w,A,N,M,L,q,U,B);break;default:Y&1?K(y,w,A,N,M,L,q,U,B):Y&6?he(y,w,A,N,M,L,q,U,B):(Y&64||Y&128)&&P.process(y,w,A,N,M,L,q,U,B,ye)}le!=null&&M?bs(le,y&&y.ref,L,w||y,!w):le==null&&y&&y.ref!=null&&bs(y.ref,null,L,y,!0)},b=(y,w,A,N)=>{if(y==null)s(w.el=l(w.children),A,N);else{const M=w.el=y.el;w.children!==y.children&&c(M,w.children)}},v=(y,w,A,N)=>{y==null?s(w.el=a(w.children||""),A,N):w.el=y.el},S=(y,w,A,N)=>{[y.el,y.anchor]=d(y.children,w,A,N,y.el,y.anchor)},C=({el:y,anchor:w},A,N)=>{let M;for(;y&&y!==w;)M=p(y),s(y,A,N),y=M;s(w,A,N)},T=({el:y,anchor:w})=>{let A;for(;y&&y!==w;)A=p(y),r(y),y=A;r(w)},K=(y,w,A,N,M,L,q,U,B)=>{if(w.type==="svg"?q="svg":w.type==="math"&&(q="mathml"),y==null)Q(w,A,N,M,L,q,U,B);else{const P=y.el&&y.el._isVueCE?y.el:null;try{P&&P._beginPatch(),F(y,w,M,L,q,U,B)}finally{P&&P._endPatch()}}},Q=(y,w,A,N,M,L,q,U)=>{let B,P;const{props:le,shapeFlag:Y,transition:ne,dirs:ae}=y;if(B=y.el=i(y.type,L,le&&le.is,le),Y&8?u(B,y.children):Y&16&&de(y.children,B,null,N,M,fo(y,L),q,U),ae&&$n(y,null,N,"created"),G(B,y,y.scopeId,q,N),le){for(const _e in le)_e!=="value"&&!ms(_e)&&o(B,_e,null,le[_e],L,N);"value"in le&&o(B,"value",null,le.value,L),(P=le.onVnodeBeforeMount)&&Ut(P,N,y)}ae&&$n(y,null,N,"beforeMount");const ke=yd(M,ne);ke&&ne.beforeEnter(B),s(B,w,A),((P=le&&le.onVnodeMounted)||ke||ae)&>(()=>{try{P&&Ut(P,N,y),ke&&ne.enter(B),ae&&$n(y,null,N,"mounted")}finally{}},M)},G=(y,w,A,N,M)=>{if(A&&g(y,A),N)for(let L=0;L<N.length;L++)g(y,N[L]);if(M){let L=M.subTree;if(w===L||mc(L.type)&&(L.ssContent===w||L.ssFallback===w)){const q=M.vnode;G(y,q,q.scopeId,q.slotScopeIds,M.parent)}}},de=(y,w,A,N,M,L,q,U,B=0)=>{for(let P=B;P<y.length;P++){const le=y[P]=U?nn(y[P]):Zt(y[P]);m(null,le,w,A,N,M,L,q,U)}},F=(y,w,A,N,M,L,q)=>{const U=w.el=y.el;let{patchFlag:B,dynamicChildren:P,dirs:le}=w;B|=y.patchFlag&16;const Y=y.props||Oe,ne=w.props||Oe;let ae;if(A&&Rn(A,!1),(ae=ne.onVnodeBeforeUpdate)&&Ut(ae,A,w,y),le&&$n(w,y,A,"beforeUpdate"),A&&Rn(A,!0),P&&(!y.dynamicChildren||y.dynamicChildren.length!==P.length)&&(B=0,q=!1,P=null),(Y.innerHTML&&ne.innerHTML==null||Y.textContent&&ne.textContent==null)&&u(U,""),P?te(y.dynamicChildren,P,U,A,N,fo(w,M),L):q||se(y,w,U,null,A,N,fo(w,M),L,!1),B>0){if(B&16)pe(U,Y,ne,A,M);else if(B&2&&Y.class!==ne.class&&o(U,"class",null,ne.class,M),B&4&&o(U,"style",Y.style,ne.style,M),B&8){const ke=w.dynamicProps;for(let _e=0;_e<ke.length;_e++){const ce=ke[_e],ue=Y[ce],Ie=ne[ce];(Ie!==ue||ce==="value")&&o(U,ce,ue,Ie,M,A)}}B&1&&y.children!==w.children&&u(U,w.children)}else!q&&P==null&&pe(U,Y,ne,A,M);((ae=ne.onVnodeUpdated)||le)&>(()=>{ae&&Ut(ae,A,w,y),le&&$n(w,y,A,"updated")},N)},te=(y,w,A,N,M,L,q)=>{for(let U=0;U<w.length;U++){const B=y[U],P=w[U],le=B.el&&(B.type===re||!Ln(B,P)||B.shapeFlag&198)?f(B.el):A;m(B,P,le,null,N,M,L,q,!0)}},pe=(y,w,A,N,M)=>{if(w!==A){if(w!==Oe)for(const L in w)!ms(L)&&!(L in A)&&o(y,L,w[L],null,M,N);for(const L in A){if(ms(L))continue;const q=A[L],U=w[L];q!==U&&L!=="value"&&o(y,L,U,q,M,N)}"value"in A&&o(y,"value",w.value,A.value,M)}},D=(y,w,A,N,M,L,q,U,B)=>{const P=w.el=y?y.el:l(""),le=w.anchor=y?y.anchor:l("");let{patchFlag:Y,dynamicChildren:ne,slotScopeIds:ae}=w;ae&&(U=U?U.concat(ae):ae),y==null?(s(P,A,N),s(le,A,N),de(w.children||[],A,le,M,L,q,U,B)):Y>0&&Y&64&&ne&&y.dynamicChildren&&y.dynamicChildren.length===ne.length?(te(y.dynamicChildren,ne,A,M,L,q,U),(w.key!=null||M&&w===M.subTree)&&bi(y,w,!0)):se(y,w,A,le,M,L,q,U,B)},he=(y,w,A,N,M,L,q,U,B)=>{w.slotScopeIds=U,y==null?w.shapeFlag&512?M.ctx.activate(w,A,N,q,B):I(w,A,N,M,L,q,B):R(y,w,B)},I=(y,w,A,N,M,L,q)=>{const U=y.component=$d(y,N,M);if(Ur(y)&&(U.ctx.renderer=ye),Rd(U,!1,q),U.asyncDep){if(M&&M.registerDep(U,Z,q),!y.el){const B=U.subTree=W(at);v(null,B,w,A),y.placeholder=B.el}}else Z(U,y,w,A,M,L,q)},R=(y,w,A)=>{const N=w.component=y.component;if(ad(y,w,A))if(N.asyncDep&&!N.asyncResolved){ie(N,w,A);return}else N.next=w,N.update();else w.el=y.el,N.vnode=w},Z=(y,w,A,N,M,L,q)=>{const U=()=>{if(y.isMounted){let{next:Y,bu:ne,u:ae,parent:ke,vnode:_e}=y;{const Tt=pc(y);if(Tt){Y&&(Y.el=_e.el,ie(y,Y,q)),Tt.asyncDep.then(()=>{gt(()=>{y.isUnmounted||P()},M)});return}}let ce=Y,ue;Rn(y,!1),Y?(Y.el=_e.el,ie(y,Y,q)):Y=_e,ne&&nr(ne),(ue=Y.props&&Y.props.onVnodeBeforeUpdate)&&Ut(ue,ke,Y,_e),Rn(y,!0);const Ie=ll(y),wt=y.subTree;y.subTree=Ie,m(wt,Ie,f(wt.el),kt(wt),y,M,L),Y.el=Ie.el,ce===null&&cd(y,Ie.el),ae&>(ae,M),(ue=Y.props&&Y.props.onVnodeUpdated)&>(()=>Ut(ue,ke,Y,_e),M)}else{let Y;const{el:ne,props:ae}=w,{bm:ke,m:_e,parent:ce,root:ue,type:Ie}=y,wt=Yn(w);Rn(y,!1),ke&&nr(ke),!wt&&(Y=ae&&ae.onVnodeBeforeMount)&&Ut(Y,ce,w),Rn(y,!0);{ue.ce&&ue.ce._hasShadowRoot()&&ue.ce._injectChildStyle(Ie,y.parent?y.parent.type:void 0);const Tt=y.subTree=ll(y);m(null,Tt,A,N,y,M,L),w.el=Tt.el}if(_e&>(_e,M),!wt&&(Y=ae&&ae.onVnodeMounted)){const Tt=w;gt(()=>Ut(Y,ce,Tt),M)}(w.shapeFlag&256||ce&&Yn(ce.vnode)&&ce.vnode.shapeFlag&256)&&y.a&>(y.a,M),y.isMounted=!0,w=A=N=null}};y.scope.on();const B=y.effect=new ba(U);y.scope.off();const P=y.update=B.run.bind(B),le=y.job=B.runIfDirty.bind(B);le.i=y,le.id=y.uid,B.scheduler=()=>pi(le),Rn(y,!0),P()},ie=(y,w,A)=>{w.component=y;const N=y.vnode.props;y.vnode=w,y.next=null,fd(y,w.props,N,A),gd(y,w.children,A),dn(),Yi(y),hn()},se=(y,w,A,N,M,L,q,U,B=!1)=>{const P=y&&y.children,le=y?y.shapeFlag:0,Y=w.children,{patchFlag:ne,shapeFlag:ae}=w;if(ne>0){if(ne&128){He(P,Y,A,N,M,L,q,U,B);return}else if(ne&256){Fe(P,Y,A,N,M,L,q,U,B);return}}ae&8?(le&16&&et(P,M,L),Y!==P&&u(A,Y)):le&16?ae&16?He(P,Y,A,N,M,L,q,U,B):et(P,M,L,!0):(le&8&&u(A,""),ae&16&&de(Y,A,N,M,L,q,U,B))},Fe=(y,w,A,N,M,L,q,U,B)=>{y=y||Vn,w=w||Vn;const P=y.length,le=w.length,Y=Math.min(P,le);let ne;for(ne=0;ne<Y;ne++){const ae=w[ne]=B?nn(w[ne]):Zt(w[ne]);m(y[ne],ae,A,null,M,L,q,U,B)}P>le?et(y,M,L,!0,!1,Y):de(w,A,N,M,L,q,U,B,Y)},He=(y,w,A,N,M,L,q,U,B)=>{let P=0;const le=w.length;let Y=y.length-1,ne=le-1;for(;P<=Y&&P<=ne;){const ae=y[P],ke=w[P]=B?nn(w[P]):Zt(w[P]);if(Ln(ae,ke))m(ae,ke,A,null,M,L,q,U,B);else break;P++}for(;P<=Y&&P<=ne;){const ae=y[Y],ke=w[ne]=B?nn(w[ne]):Zt(w[ne]);if(Ln(ae,ke))m(ae,ke,A,null,M,L,q,U,B);else break;Y--,ne--}if(P>Y){if(P<=ne){const ae=ne+1,ke=ae<le?w[ae].el:N;for(;P<=ne;)m(null,w[P]=B?nn(w[P]):Zt(w[P]),A,ke,M,L,q,U,B),P++}}else if(P>ne)for(;P<=Y;)We(y[P],M,L,!0),P++;else{const ae=P,ke=P,_e=new Map;for(P=ke;P<=ne;P++){const dt=w[P]=B?nn(w[P]):Zt(w[P]);dt.key!=null&&_e.set(dt.key,P)}let ce,ue=0;const Ie=ne-ke+1;let wt=!1,Tt=0;const Cn=new Array(Ie);for(P=0;P<Ie;P++)Cn[P]=0;for(P=ae;P<=Y;P++){const dt=y[P];if(ue>=Ie){We(dt,M,L,!0);continue}let $t;if(dt.key!=null)$t=_e.get(dt.key);else for(ce=ke;ce<=ne;ce++)if(Cn[ce-ke]===0&&Ln(dt,w[ce])){$t=ce;break}$t===void 0?We(dt,M,L,!0):(Cn[$t-ke]=P+1,$t>=Tt?Tt=$t:wt=!0,m(dt,w[$t],A,null,M,L,q,U,B),ue++)}const os=wt?bd(Cn):Vn;for(ce=os.length-1,P=Ie-1;P>=0;P--){const dt=ke+P,$t=w[dt],Tn=w[dt+1],Hs=dt+1<le?Tn.el||gc(Tn):N;Cn[P]===0?m(null,$t,A,Hs,M,L,q,U,B):wt&&(ce<0||P!==os[ce]?Pe($t,A,Hs,2):ce--)}}},Pe=(y,w,A,N,M=null)=>{const{el:L,type:q,transition:U,children:B,shapeFlag:P}=y;if(P&6){Pe(y.component.subTree,w,A,N);return}if(P&128){y.suspense.move(w,A,N);return}if(P&64){q.move(y,w,A,ye);return}if(q===re){s(L,w,A);for(let Y=0;Y<B.length;Y++)Pe(B[Y],w,A,N);s(y.anchor,w,A);return}if(q===ws){C(y,w,A);return}if(N!==2&&P&1&&U)if(N===0)U.persisted&&!L[It]?s(L,w,A):(U.beforeEnter(L),s(L,w,A),gt(()=>U.enter(L),M));else{const{leave:Y,delayLeave:ne,afterLeave:ae}=U,ke=()=>{y.ctx.isUnmounted?r(L):s(L,w,A)},_e=()=>{const ce=L._isLeaving||!!L[It];L._isLeaving&&L[It](!0),U.persisted&&!ce?ke():Y(L,()=>{ke(),ae&&ae()})};ne?ne(L,ke,_e):_e()}else s(L,w,A)},We=(y,w,A,N=!1,M=!1)=>{const{type:L,props:q,ref:U,children:B,dynamicChildren:P,shapeFlag:le,patchFlag:Y,dirs:ne,cacheIndex:ae,memo:ke}=y;if(Y===-2&&(M=!1),U!=null&&(dn(),bs(U,null,A,y,!0),hn()),ae!=null&&(w.renderCache[ae]=void 0),le&256){w.ctx.deactivate(y);return}const _e=le&1&&ne,ce=!Yn(y);let ue;if(ce&&(ue=q&&q.onVnodeBeforeUnmount)&&Ut(ue,w,y),le&6)ot(y.component,A,N);else{if(le&128){y.suspense.unmount(A,N);return}_e&&$n(y,null,w,"beforeUnmount"),le&64?y.type.remove(y,w,A,ye,N):P&&!P.hasOnce&&(L!==re||Y>0&&Y&64)?et(P,w,A,!1,!0):(L===re&&Y&384||!M&&le&16)&&et(B,w,A),N&&Ge(y)}const Ie=ke!=null&&ae==null;(ce&&(ue=q&&q.onVnodeUnmounted)||_e||Ie)&>(()=>{ue&&Ut(ue,w,y),_e&&$n(y,null,w,"unmounted"),Ie&&(y.el=null)},A)},Ge=y=>{const{type:w,el:A,anchor:N,transition:M}=y;if(w===re){Xt(A,N);return}if(w===ws){T(y);return}const L=()=>{r(A),M&&!M.persisted&&M.afterLeave&&M.afterLeave()};if(y.shapeFlag&1&&M&&!M.persisted){const{leave:q,delayLeave:U}=M,B=()=>q(A,L);U?U(y.el,L,B):B()}else L()},Xt=(y,w)=>{let A;for(;y!==w;)A=p(y),r(y),y=A;r(w)},ot=(y,w,A)=>{const{bum:N,scope:M,job:L,subTree:q,um:U,m:B,a:P}=y;ul(B),ul(P),N&&nr(N),M.stop(),L&&(L.flags|=8,We(q,y,w,A)),U&>(U,w),gt(()=>{y.isUnmounted=!0},w)},et=(y,w,A,N=!1,M=!1,L=0)=>{for(let q=L;q<y.length;q++)We(y[q],w,A,N,M)},kt=y=>{if(y.shapeFlag&6)return kt(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const w=p(y.anchor||y.el),A=w&&w[Ua];return A?p(A):w};let O=!1;const oe=(y,w,A)=>{let N;y==null?w._vnode&&(We(w._vnode,null,null,!0),N=w._vnode.component):m(w._vnode||null,y,w,null,null,null,A),w._vnode=y,O||(O=!0,Yi(N),Da(),O=!1)},ye={p:m,um:We,m:Pe,r:Ge,mt:I,mc:de,pc:se,pbc:te,n:kt,o:e};return{render:oe,hydrate:void 0,createApp:nd(oe)}}function fo({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 Rn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function yd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function bi(e,t,n=!1){const s=e.children,r=t.children;if(fe(s)&&fe(r))for(let o=0;o<s.length;o++){const i=s[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=nn(r[o]),l.el=i.el),!n&&l.patchFlag!==-2&&bi(i,l)),l.type===qr&&(l.patchFlag===-1&&(l=r[o]=nn(l)),l.el=i.el),l.type===at&&!l.el&&(l.el=i.el)}}function bd(e){const t=e.slice(),n=[0];let s,r,o,i,l;const a=e.length;for(s=0;s<a;s++){const c=e[s];if(c!==0){if(r=n[n.length-1],e[r]<c){t[s]=r,n.push(s);continue}for(o=0,i=n.length-1;o<i;)l=o+i>>1,e[n[l]]<c?o=l+1:i=l;c<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function pc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pc(t)}function ul(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function gc(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?gc(t.subTree):null}const mc=e=>e.__isSuspense;function kd(e,t){t&&t.pendingBranch?fe(e)?t.effects.push(...e):t.effects.push(e):Oa(e)}const re=Symbol.for("v-fgt"),qr=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),ws=Symbol.for("v-stc"),fn=[];let Ct=null;function k(e=!1){fn.push(Ct=e?null:[])}function ki(){fn.pop(),Ct=fn[fn.length-1]||null}let Rs=1;function hr(e,t=!1){Rs+=e,e<0&&Ct&&t&&(Ct.hasOnce=!0)}function vc(e){return e.dynamicChildren=Rs>0?Ct||Vn:null,ki(),Rs>0&&Ct&&Ct.push(e),e}function _(e,t,n,s,r,o){return vc(h(e,t,n,s,r,o,!0))}function ze(e,t,n,s,r){return vc(W(e,t,n,s,r,!0))}function As(e){return e?e.__v_isVNode===!0:!1}function Ln(e,t){return e.type===t.type&&e.key===t.key}const yc=({key:e})=>e??null,rr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||ft(e)||ve(e)?{i:rt,r:e,k:t,f:!!n}:e:null);function h(e,t=null,n=null,s=0,r=null,o=e===re?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yc(t),ref:t&&rr(t),scopeId:Ga,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:rt};return l?(pr(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Be(n)?8:16),Rs>0&&!i&&Ct&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&Ct.push(a),a}const W=wd;function wd(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Qa)&&(e=at),As(e)){const l=_n(e,t,!0);return n&&pr(l,n),Rs>0&&!o&&Ct&&(l.shapeFlag&6?Ct[Ct.indexOf(e)]=l:Ct.push(l)),l.patchFlag=-2,l}if(Pd(e)&&(e=e.__vccOpts),t){t=_d(t);let{class:l,style:a}=t;l&&!Be(l)&&(t.class=we(l)),Ae(a)&&(hi(a)&&!fe(a)&&(a=Ke({},a)),t.style=un(a))}const i=Be(e)?1:mc(e)?128:Fa(e)?64:Ae(e)?4:ve(e)?2:0;return h(e,t,n,s,r,i,o,!0)}function _d(e){return e?hi(e)||ac(e)?Ke({},e):e:null}function _n(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?xd(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&yc(c),ref:t&&t.ref?n&&o?fe(o)?o.concat(rr(t)):[o,rr(t)]:rr(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==re?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_n(e.ssContent),ssFallback:e.ssFallback&&_n(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&Gn(u,a.clone(u)),u}function Le(e=" ",t=0){return W(qr,null,e,t)}function Sd(e,t){const n=W(ws,null,e);return n.staticCount=t,n}function V(e="",t=!1){return t?(k(),ze(at,null,e)):W(at,null,e)}function Zt(e){return e==null||typeof e=="boolean"?W(at):fe(e)?W(re,null,e.slice()):As(e)?nn(e):W(qr,null,String(e))}function nn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_n(e)}function pr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(fe(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),pr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ac(t)?t._ctx=rt:r===3&&rt&&(rt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ve(t)){if(s&65){pr(e,{default:t});return}t={default:t,_ctx:rt},n=32}else t=String(t),s&64?(n=16,t=[Le(t)]):n=8;e.children=t,e.shapeFlag|=n}function xd(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=we([t.class,s.class]));else if(r==="style")t.style=un([t.style,s.style]);else if(Pr(r)){const o=t[r],i=s[r];i&&o!==i&&!(fe(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!Mr(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}function Ut(e,t,n,s=null){Ot(e,t,7,[n,s])}const Cd=sc();let Td=0;function $d(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Cd,o={uid:Td++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Xu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:uc(s,r),emitsOptions:rc(s,r),emit:null,emitted:null,propsDefaults:Oe,inheritAttrs:s.inheritAttrs,ctx:Oe,data:Oe,props:Oe,attrs:Oe,slots:Oe,refs:Oe,setupState:Oe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=rd.bind(null,o),e.ce&&e.ce(o),o}let ct=null;const Vr=()=>ct||rt;let gr,Bo;{const e=Gr(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};gr=t("__VUE_INSTANCE_SETTERS__",n=>ct=n),Bo=t("__VUE_SSR_SETTERS__",n=>Es=n)}const js=e=>{const t=ct;return gr(e),e.scope.on(),()=>{e.scope.off(),gr(t)}},fl=()=>{ct&&ct.scope.off(),gr(null)};function bc(e){return e.vnode.shapeFlag&4}let Es=!1;function Rd(e,t=!1,n=!1){t&&Bo(t);const{props:s,children:r}=e.vnode,o=bc(e);ud(e,s,o,t),pd(e,r,n||t);const i=o?Ad(e,t):void 0;return t&&Bo(!1),i}function Ad(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Zf);const{setup:s}=n;if(s){dn();const r=e.setupContext=s.length>1?Id(e):null,o=js(e),i=Gs(s,e,0,[e.props,r]),l=da(i);if(hn(),o(),(l||e.sp)&&!Yn(e)&&Za(e),l){if(i.then(fl,fl),t)return i.then(a=>{dl(e,a)}).catch(a=>{zr(a,e,0)});e.asyncDep=i}else dl(e,i)}else kc(e)}function dl(e,t,n){ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ae(t)&&(e.setupState=Pa(t)),kc(e)}function kc(e,t,n){const s=e.type;e.render||(e.render=s.render||Dt);{const r=js(e);dn();try{Yf(e)}finally{hn(),r()}}}const Ed={get(e,t){return lt(e,"get",""),e[t]}};function Id(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ed),slots:e.slots,emit:e.emit,expose:t}}function Kr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Pa(bf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ks)return ks[n](e)},has(t,n){return n in t||n in ks}})):e.proxy}function Ld(e,t=!0){return ve(e)?e.displayName||e.name:e.name||t&&e.__name}function Pd(e){return ve(e)&&"__vccOpts"in e}const X=(e,t)=>Cf(e,t,Es);function $e(e,t,n){try{hr(-1);const s=arguments.length;return s===2?Ae(t)&&!fe(t)?As(t)?W(e,null,[t]):W(e,t):W(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&As(n)&&(n=[n]),W(e,t,n))}finally{hr(1)}}const Md="3.5.40";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.40
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let Go;const hl=typeof window<"u"&&window.trustedTypes;if(hl)try{Go=hl.createPolicy("vue",{createHTML:e=>e})}catch{}const wc=Go?e=>Go.createHTML(e):e=>e,Nd="http://www.w3.org/2000/svg",Od="http://www.w3.org/1998/Math/MathML",tn=typeof document<"u"?document:null,pl=tn&&tn.createElement("template"),Dd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?tn.createElementNS(Nd,e):t==="mathml"?tn.createElementNS(Od,e):n?tn.createElement(e,{is:n}):tn.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>tn.createTextNode(e),createComment:e=>tn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>tn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{pl.innerHTML=wc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=pl.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},vn="transition",as="animation",ts=Symbol("_vtc"),_c={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},Sc=Ke({},Wa,_c),Bd=e=>(e.displayName="Transition",e.props=Sc,e),wi=Bd((e,{slots:t})=>$e(Df,xc(e),t)),An=(e,t=[])=>{fe(e)?e.forEach(n=>n(...t)):e&&e(...t)},gl=e=>e?fe(e)?e.some(t=>t.length>1):e.length>1:!1;function xc(e){const t={};for(const D in e)D in _c||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:c=i,appearToClass:u=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,d=Gd(r),m=d&&d[0],b=d&&d[1],{onBeforeEnter:v,onEnter:S,onEnterCancelled:C,onLeave:T,onLeaveCancelled:K,onBeforeAppear:Q=v,onAppear:G=S,onAppearCancelled:de=C}=t,F=(D,he,I,R)=>{D._enterCancelled=R,bn(D,he?u:l),bn(D,he?c:i),I&&I()},te=(D,he)=>{D._isLeaving=!1,bn(D,f),bn(D,g),bn(D,p),he&&he()},pe=D=>(he,I)=>{const R=D?G:S,Z=()=>F(he,D,I);An(R,[he,Z]),ml(()=>{bn(he,D?a:o),Ft(he,D?u:l),gl(R)||vl(he,s,m,Z)})};return Ke(t,{onBeforeEnter(D){An(v,[D]),Ft(D,o),Ft(D,i)},onBeforeAppear(D){An(Q,[D]),Ft(D,a),Ft(D,c)},onEnter:pe(!1),onAppear:pe(!0),onLeave(D,he){D._isLeaving=!0;const I=()=>te(D,he);Ft(D,f),D._enterCancelled?(Ft(D,p),jo(D)):(jo(D),Ft(D,p)),ml(()=>{D._isLeaving&&(bn(D,f),Ft(D,g),gl(T)||vl(D,s,b,I))}),An(T,[D,I])},onEnterCancelled(D){F(D,!1,void 0,!0),An(C,[D])},onAppearCancelled(D){F(D,!0,void 0,!0),An(de,[D])},onLeaveCancelled(D){te(D),An(K,[D])}})}function Gd(e){if(e==null)return null;if(Ae(e))return[ho(e.enter),ho(e.leave)];{const t=ho(e);return[t,t]}}function ho(e){return Uu(e)}function Ft(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ts]||(e[ts]=new Set)).add(t)}function bn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[ts];n&&(n.delete(t),n.size||(e[ts]=void 0))}function ml(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let jd=0;function vl(e,t,n,s){const r=e._endId=++jd,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:a}=Cc(e,t);if(!i)return s();const c=i+"end";let u=0;const f=()=>{e.removeEventListener(c,p),o()},p=g=>{g.target===e&&++u>=a&&f()};setTimeout(()=>{u<a&&f()},l+1),e.addEventListener(c,p)}function Cc(e,t){const n=window.getComputedStyle(e),s=d=>(n[d]||"").split(", "),r=s(`${vn}Delay`),o=s(`${vn}Duration`),i=yl(r,o),l=s(`${as}Delay`),a=s(`${as}Duration`),c=yl(l,a);let u=null,f=0,p=0;t===vn?i>0&&(u=vn,f=i,p=o.length):t===as?c>0&&(u=as,f=c,p=a.length):(f=Math.max(i,c),u=f>0?i>c?vn:as:null,p=u?u===vn?o.length:a.length:0);const g=u===vn&&/\b(?:transform|all)(?:,|$)/.test(s(`${vn}Property`).toString());return{type:u,timeout:f,propCount:p,hasTransform:g}}function yl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>bl(n)+bl(e[s])))}function bl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function jo(e){return(e?e.ownerDocument:document).body.offsetHeight}function zd(e,t,n){const s=e[ts];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const kl=Symbol("_vod"),Tc=Symbol("_vsh"),$c=Symbol("");function Ud(e){const t=Vr();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>mr(o,r))},s=()=>{const r=e(t.proxy);t.ce?mr(t.ce,r):zo(t.subTree,r),n(r)};Ja(()=>{Oa(s)}),Jt(()=>{je(s,Dt,{flush:"post"});const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),Hr(()=>r.disconnect())})}function zo(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{zo(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)mr(e.el,t);else if(e.type===re)e.children.forEach(n=>zo(n,t));else if(e.type===ws){let{el:n,anchor:s}=e;for(;n&&(mr(n,t),n!==s);)n=n.nextSibling}}function mr(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const r in t){const o=Ju(t[r]);n.setProperty(`--${r}`,o),s+=`--${r}: ${o};`}n[$c]=s}}const Fd=/(?:^|;)\s*display\s*:/;function Hd(e,t,n){const s=e.style,r=Be(n);let o=!1;if(n&&!r){if(t)if(Be(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&ps(s,l,"")}else for(const i in t)n[i]==null&&ps(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?qd(e,i,!Be(t)&&t?t[i]:void 0,l)||ps(s,i,l):ps(s,i,"")}}else if(r){if(t!==n){const i=s[$c];i&&(n+=";"+i),s.cssText=n,o=Fd.test(n)}}else t&&e.removeAttribute("style");kl in e&&(e[kl]=o?s.display:"",e[Tc]&&(s.display="none"))}const wl=/\s*!important$/;function ps(e,t,n){if(fe(n))n.forEach(s=>ps(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Wd(e,t);wl.test(n)?e.setProperty(Sn(s),n.replace(wl,""),"important"):e[s]=n}}const _l=["Webkit","Moz","ms"],po={};function Wd(e,t){const n=po[t];if(n)return n;let s=bt(t);if(s!=="filter"&&s in e)return po[t]=s;s=Dr(s);for(let r=0;r<_l.length;r++){const o=_l[r]+s;if(o in e)return po[t]=o}return t}function qd(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Be(s)&&n===s}const Sl="http://www.w3.org/1999/xlink";function xl(e,t,n,s,r,o=Ku(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Sl,t.slice(6,t.length)):e.setAttributeNS(Sl,t,n):n==null||o&&!ma(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Gt(n)?String(n):n)}function Cl(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?wc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=ma(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(r||t)}function Pn(e,t,n,s){e.addEventListener(t,n,s)}function Vd(e,t,n,s){e.removeEventListener(t,n,s)}const Tl=Symbol("_vei");function Kd(e,t,n,s,r=null){const o=e[Tl]||(e[Tl]={}),i=o[t];if(s&&i)i.value=s;else{const[l,a]=Jd(t);if(s){const c=o[t]=eh(s,r);Pn(e,l,c,a)}else i&&(Vd(e,l,i,a),o[t]=void 0)}}const Zd=/(Once|Passive|Capture)$/,Yd=/^on:?(?:Once|Passive|Capture)$/;function Jd(e){let t,n;for(;(n=e.match(Zd))&&!Yd.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Sn(e.slice(2)),t]}let go=0;const Xd=Promise.resolve(),Qd=()=>go||(Xd.then(()=>go=0),go=Date.now());function eh(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(fe(r)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const i=r.slice(),l=[s];for(let a=0;a<i.length&&!s._stopped;a++){const c=i[a];c&&Ot(c,t,5,l)}}else Ot(r,t,5,[s])};return n.value=e,n.attached=Qd(),n}const $l=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,th=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?zd(e,s,i):t==="style"?Hd(e,n,s):Pr(t)?Mr(t)||Kd(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):nh(e,t,s,i))?(Cl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xl(e,t,s,i,o,t!=="value")):e._isVueCE&&(sh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Be(s)))?Cl(e,bt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),xl(e,t,s,i))};function nh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&$l(t)&&ve(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 r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return $l(t)&&Be(n)?!1:t in e}function sh(e,t){const n=e._def.props;if(!n)return!1;const s=bt(t);return Array.isArray(n)?n.some(r=>bt(r)===s):Object.keys(n).some(r=>bt(r)===s)}const Rc=new WeakMap,Ac=new WeakMap,vr=Symbol("_moveCb"),Rl=Symbol("_enterCb"),rh=e=>(delete e.props.mode,e),oh=rh({name:"TransitionGroup",props:Ke({},Sc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Vr(),s=Ha();let r,o;return Xa(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!uh(r[0].el,n.vnode.el,i)){r=[];return}r.forEach(lh),r.forEach(ah);const l=r.filter(ch);jo(n.vnode.el),l.forEach(a=>{const c=a.el,u=c.style;Ft(c,i),u.transform=u.webkitTransform=u.transitionDuration="";const f=c[vr]=p=>{p&&p.target!==c||(!p||p.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",f),c[vr]=null,bn(c,i))};c.addEventListener("transitionend",f)}),r=[]}),()=>{const i=Se(e),l=xc(i);let a=i.tag||re;if(r=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&!u.el[Tc]&&(r.push(u),Gn(u,$s(u,l,s,n)),Rc.set(u,Ec(u.el)))}o=t.default?mi(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&Gn(u,$s(u,l,s,n))}return W(a,null,o)}}}),ih=oh;function lh(e){const t=e.el;t[vr]&&t[vr](),t[Rl]&&t[Rl]()}function ah(e){Ac.set(e,Ec(e.el))}function ch(e){const t=Rc.get(e),n=Ac.get(e),s=t.left-n.left,r=t.top-n.top;if(s||r){const o=e.el,i=o.style,l=o.getBoundingClientRect();let a=1,c=1;return o.offsetWidth&&(a=l.width/o.offsetWidth),o.offsetHeight&&(c=l.height/o.offsetHeight),(!Number.isFinite(a)||a===0)&&(a=1),(!Number.isFinite(c)||c===0)&&(c=1),Math.abs(a-1)<.01&&(a=1),Math.abs(c-1)<.01&&(c=1),i.transform=i.webkitTransform=`translate(${s/a}px,${r/c}px)`,i.transitionDuration="0s",e}}function Ec(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function uh(e,t,n){const s=e.cloneNode(),r=e[ts];r&&r.forEach(l=>{l.split(/\s+/).forEach(a=>a&&s.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:i}=Cc(s);return o.removeChild(s),i}const yr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return fe(t)?n=>nr(t,n):t};function fh(e){e.target.composing=!0}function Al(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Xn=Symbol("_assign");function El(e,t,n){return t&&(e=e.trim()),n&&(e=Br(e)),e}const mt={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Xn]=yr(r);const o=s||r.props&&r.props.type==="number";Pn(e,t?"change":"input",i=>{i.target.composing||e[Xn](El(e.value,n,o))}),(n||o)&&Pn(e,"change",()=>{e.value=El(e.value,n,o)}),t||(Pn(e,"compositionstart",fh),Pn(e,"compositionend",Al),Pn(e,"change",Al))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Xn]=yr(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Br(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===a)||(e.value=a)}},Il={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Pn(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Br(br(o)):br(o));e[Xn](e.multiple?Nr(e._modelValue)?new Set(r):r:r[0]),e._assigning=!0,Lt(()=>{e._assigning=!1})}),e[Xn]=yr(s)},mounted(e,{value:t}){Ll(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Xn]=yr(n)},updated(e,{value:t}){e._assigning||Ll(e,t)}};function Ll(e,t){const n=e.multiple,s=fe(t);if(!(n&&!s&&!Nr(t))){for(let r=0,o=e.options.length;r<o;r++){const i=e.options[r],l=br(i);if(n)if(s){const a=typeof l;a==="string"||a==="number"?i.selected=t.some(c=>String(c)===String(l)):i.selected=Yu(t,l)>-1}else i.selected=t.has(l);else if(Bs(br(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function br(e){return"_value"in e?e._value:e.value}const dh=["ctrl","shift","alt","meta"],hh={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)=>dh.some(n=>e[`${n}Key`]&&!t.includes(n))},zt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i<t.length;i++){const l=hh[t[i]];if(l&&l(r,t))return}return e(r,...o)}))},ph={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Is=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const o=Sn(r.key);if(t.some(i=>i===o||ph[i]===o))return e(r)}))},gh=Ke({patchProp:th},Dd);let Pl;function mh(){return Pl||(Pl=md(gh))}const vh=((...e)=>{const t=mh().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=bh(s);if(!r)return;const o=t._component;!ve(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,yh(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function yh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bh(e){return Be(e)?document.querySelector(e):e}function Zs(e,t,n,s){return e===n&&t===s}function kh(e){return e.currentSessionId===e.targetSessionId&&e.snapshot.sessionId===e.targetSessionId&&e.currentSessionGeneration===e.targetSessionGeneration&&e.currentConnectionGeneration===e.targetConnectionGeneration&&e.currentPromptGeneration===e.targetPromptGeneration&&e.currentLiveGeneration===e.targetLiveGeneration&&(e.currentEpoch===0||e.snapshot.epoch===e.currentEpoch)&&(e.snapshot.epoch!==e.currentEpoch||e.snapshot.seq>=e.currentSeq)}function wh(e){return{objective:e.objective,completionCriterion:e.completionCriterion,replace:e.replace,budgets:e.budgets}}function _h(e){return{objective:e.objective,budgets:e.budgets}}function Sh(e,t,n){return e!==0&&n.epoch!==e?"resync":n.seq<=t?"duplicate":"apply"}function xh(e,t){return t.type==="goal.updated"?{...e,goal:t.snapshot}:t.type==="todo.updated"?{...e,todos:t.todos}:e}function Ch(e){const t=[],n=new Map;for(const s of e){const r=s.phase??null;let o=n.get(r);o===void 0&&(o=t.length,n.set(r,o),t.push({phase:r,items:[]})),t[o].items.push(s)}return t}const Ls=H([]);let Th=0;function $h(e,t="info",n=3500){const s=`toast_${++Th}`;Ls.value=[...Ls.value,{id:s,type:t,message:e}],n>0&&window.setTimeout(()=>Ic(s),n)}function Ic(e){Ls.value=Ls.value.filter(t=>t.id!==e)}function Lc(){return{toasts:Ls,showToast:$h,removeToast:Ic}}const At="/api/v1",Rh=2*3e4;function Ah(){const{showToast:e}=Lc(),t=H("connecting"),n=H([]),s=H([]),r=H({busy:!1}),o=H(null),i=H([]),l=H(!1),a=H(null),c=H(!1),u=H(null),f=H(null),p=H(null),g=X(()=>r.value.busy||c.value),d=H([]),m=H(null),b=H(!1),v=X(()=>f.value!==null&&!b.value),S=H(null),C=H([]);let T=null,K=null,Q=null,G=null,de=Date.now(),F=0,te=0,pe=0,D=0,he=0,I=0,R=0,Z=0,ie=0,se=null,Fe=!1,He=null,Pe=!1,We=!1;const Ge=new Map;function Xt(){const z=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws`;return m.value?`${z}?sessionId=${encodeURIComponent(m.value)}`:z}function ot(x){t.value=x}function et(x){(T==null?void 0:T.readyState)===WebSocket.OPEN&&T.send(JSON.stringify(x))}function kt(){l.value=Fe||se!==null}function O(){ie++,se=null,Fe=!1,He=null,l.value=!1,a.value=null}function oe(x,z){if(x!==null&&typeof x=="object"){const ee=x.message;if(typeof ee=="string")return ee}return z}function ye(){We||G!==null||(G=window.setTimeout(()=>{G=null;const x=He;He=null,tt(x??void 0)},250))}async function tt(x){const z=f.value;if(!z)return;const ee=D,be=he,Me=I,St=R;try{const ht=await fetch(`${At}/sessions/${z}/snapshot`);if(!ht.ok){x!==void 0&&(se==null?void 0:se.generation)===x&&(He=x,ye());return}const Ue=await ht.json();if(!kh({snapshot:Ue,targetSessionId:z,currentSessionId:f.value,targetSessionGeneration:ee,currentSessionGeneration:D,targetConnectionGeneration:be,currentConnectionGeneration:he,targetPromptGeneration:Me,currentPromptGeneration:I,targetLiveGeneration:St,currentLiveGeneration:R,currentEpoch:te,currentSeq:F})){x!==void 0&&(He=x),ye();return}y(Ue,x)}catch{x!==void 0&&(se==null?void 0:se.generation)===x&&(He=x,ye())}}function y(x,z){const ee=n.value.filter(mn=>mn.local),be=Ge.keys().next().value,Me=be?Ge.get(be):void 0,St=Me?n.value.find(mn=>mn.id===Me.messageId):void 0,ht=!!(be&&x.messages.some(mn=>mn.clientMessageId===be)),Ue=!!(Me&&!ht&&Me.connectionGeneration<he);Ue&&St&&(St.isError=!0);const Qt=St&&!ht?[St]:[];n.value=[...x.messages.map(mn=>({...mn,id:mn.id??w()})),...ee,...Qt],s.value=x.pendingApprovals,r.value={...x.status,busy:x.busy},o.value=x.goal,i.value=x.todos,z!==void 0&&se!==null&&se.generation===z&&ie===z&&(se=null,kt()),(ht||Ue)&&(c.value=!1,Pe=!1,Ge.clear(),Ue&&e("消息未送达,已恢复连接。","error")),F=x.seq,te=x.epoch,p.value=x.workDir}function w(){return`msg_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function A(x){N(),de=Date.now(),K=window.setInterval(()=>{if(Date.now()-de>Rh){T==null||T.close();return}et({type:"ping"})},x)}function N(){K!==null&&(clearInterval(K),K=null)}function M(){if(We||Q!==null)return;ot("reconnecting"),pe++;const x=Math.min(1e3*2**pe,3e4);Q=window.setTimeout(()=>{Q=null,B()},x)}function L(x){switch(x.type){case"server_hello":{const z=x;f.value=z.sessionId,p.value=z.workDir,m.value=z.sessionId,b.value=z.active;const ee=te;te=z.epoch,A(z.heartbeat_ms),et({type:"client_hello",lastSeq:F,epoch:ee}),ee!==0&&ee!==z.epoch&&(F=0),ot("connected"),pe=0,z.active?(tt(),_e(),ue()):ce(z.sessionId).then(be=>{be&&f.value===z.sessionId&&(b.value=!0),tt(),_e(),ue()});break}case"event":{const z=Sh(te,F,x);if(z==="resync"){te=x.epoch,F=0,tt();break}if(z==="duplicate")break;F=x.seq,te=x.epoch,R++,q(x.payload);break}case"user_message":{if(R++,x.clientMessageId&&Ge.has(x.clientMessageId)){Pe=!0;break}n.value.push({id:w(),role:"user",content:x.text,clientMessageId:x.clientMessageId,tools:[],ts:Date.now()});break}case"approval_request":{R++,s.value=[...s.value,{id:x.id,toolName:x.toolName,action:x.action,display:x.display}];break}case"approval_resolved":{R++,s.value=s.value.filter(z=>z.id!==x.id);break}case"command_result":{const z=x.pendingMsgId?n.value.findIndex(ee=>ee.id===x.pendingMsgId):-1;if(z>=0){const ee=n.value[z];n.value[z]={...ee,content:x.message,isError:!x.ok,pending:!1}}else n.value.push({id:w(),role:"system",content:x.message,tools:[],isError:!x.ok,ts:Date.now(),local:!0});(x.command==="fork"||x.command==="title")&&_e(),x.ok&&x.command==="compact"&&tt();break}case"resync_required":{F=0,tt();break}case"status":{R++,r.value={...r.value,...x.status};break}case"error":{if(u.value=x.message,x.clientMessageId){const z=Ge.get(x.clientMessageId);if(z){Ge.delete(x.clientMessageId),c.value=!1,Pe=!1;const ee=n.value.find(be=>be.id===z.messageId);ee&&(ee.isError=!0),e(`消息未发送:${x.message}`,"error")}}break}case"server_empty":{ot("idle");break}}}function q(x){const z=xh({goal:o.value,todos:i.value},x);switch(o.value=z.goal,i.value=z.todos,x.type==="goal.updated"&&se!==null&&se.generation===ie&&(se=null,He=null,kt()),x.type){case"turn.started":{Pe&&(c.value=!1,Pe=!1,Ge.clear()),r.value={...r.value,busy:!0},n.value.push({id:w(),role:"assistant",content:"",tools:[],ts:Date.now()});break}case"assistant.delta":{const ee=U();ee&&(ee.content+=String(x.delta));break}case"thinking.delta":{const ee=U();if(ee){const be=ee.tools.find(Me=>Me.name==="thinking");be?be.output=(be.output??"")+String(x.delta):ee.tools.push({toolCallId:"thinking",name:"thinking",output:String(x.delta)})}break}case"tool.call.started":{const ee=U();ee&&ee.tools.push({toolCallId:String(x.toolCallId),name:String(x.name),args:x.args});break}case"tool.result":{const ee=U();if(ee){const be=ee.tools.find(Me=>Me.toolCallId===x.toolCallId);be&&(be.output=String(x.output),be.isError=!!x.isError)}break}case"tool.progress":{const ee=U();if(ee){const be=ee.tools.find(Me=>Me.toolCallId===x.toolCallId);be&&(be.output=String(x.message??x.output))}break}case"turn.ended":{if(r.value={...r.value,busy:!1},x.reason==="failed"){const ee=U();ee&&(ee.isError=!0),u.value=oe(x.error,"Turn failed")}_e(),ue();break}case"session.meta.updated":{const ee={};x.model!==void 0&&(ee.model=x.model),x.contextTokens!==void 0&&(ee.contextTokens=x.contextTokens),x.maxContextTokens!==void 0&&(ee.maxContextTokens=x.maxContextTokens),x.contextUsage!==void 0&&(ee.contextUsage=x.contextUsage),r.value={...r.value,...ee};break}case"error":{u.value=oe(x.error,"Unknown error");break}}}function U(){for(let x=n.value.length-1;x>=0;x--)if(n.value[x].role==="assistant")return n.value[x];return null}function B(){if(We||T&&(T.readyState===WebSocket.CONNECTING||T.readyState===WebSocket.OPEN))return;ot("connecting"),u.value=null,O(),he++;const x=new WebSocket(Xt());T=x,x.onclose=z=>{if(T===x&&(T=null,N(),t.value!=="idle")){if(z.code===1008){D++,O(),f.value=null,m.value=null,b.value=!1,o.value=null,i.value=[],ot("idle");return}ot("disconnected"),M()}},x.onerror=()=>{T===x&&ot("reconnecting")},x.onmessage=z=>{if(T!==x)return;de=Date.now();let ee;try{ee=JSON.parse(z.data)}catch{return}L(ee)}}function P(x){if(!x||g.value)return;if(t.value==="idle"){e("暂无会话,请先新建会话。","warning");return}if(t.value!=="connected"){e("连接已断开,正在尝试重连...","error"),B();return}const z=`client_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,ee=w();Ge.set(z,{messageId:ee,connectionGeneration:he}),I++,Pe=!1,c.value=!0,n.value.push({id:ee,role:"user",content:x,clientMessageId:z,tools:[],ts:Date.now()}),et({type:"prompt",text:x,clientMessageId:z})}function le(){et({type:"abort"})}function Y(x,z){if(t.value==="idle"){e("暂无会话,请先新建会话。","warning");return}if(t.value!=="connected"){e("连接已断开,命令未发送。","error"),B();return}if(g.value&&x!=="btw"){e(`会话忙碌中,无法执行 /${x},请稍后再试。`,"warning");return}const ee=["compact","plan","auto","yes","fork","title"];let be=null;ee.includes(x)&&(be=w(),n.value.push({id:be,role:"system",content:`正在执行 /${x}${z?` ${z}`:""}...`,tools:[],pending:!0,ts:Date.now(),local:!0})),et({type:"command",command:x,...z?{args:z}:{},...be?{pendingMsgId:be}:{}})}function ne(){n.value=[],s.value=[]}function ae(x){n.value.push({id:w(),role:"system",content:x,tools:[],ts:Date.now(),local:!0})}function ke(x,z,ee,be){if(t.value!=="connected"){e("连接已断开,审批结果未发送。","error"),B();return}s.value=s.value.filter(Me=>Me.id!==x),et({type:"approval_response",id:x,decision:z,...ee?{feedback:ee}:{},...be?{scope:be}:{}})}async function _e(){try{const x=await fetch(`${At}/sessions`);if(!x.ok)return;d.value=await x.json()}catch{}}async function ce(x){const z=D,ee=he;try{return(await fetch(`${At}/sessions/${x}/activate`,{method:"POST"})).ok&&he===ee&&Zs(f.value,D,x,z)}catch{return!1}}async function ue(){try{const x=await fetch(`${At}/git/status`);if(!x.ok)return;const z=await x.json();S.value=z.isRepo?z:null}catch{}}async function Ie(){try{const x=await fetch(`${At}/models`);if(!x.ok)return;const z=await x.json();C.value=z.models}catch{}}const wt=H({});async function Tt(){try{const x=await fetch(`${At}/like`);if(!x.ok)return;wt.value=await x.json()}catch{}}async function Cn(x){try{return(await fetch(`${At}/like`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)})).ok?(wt.value=x,!0):!1}catch{return!1}}async function os(x,z,ee){const be=f.value;if(!be)return;const Me=D,St=he,ht=++Z;try{const Ue=await fetch(`${At}/sessions/${be}/${x}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)}),Qt=await Ue.json();if(f.value!==be||D!==Me||he!==St||Z!==ht)return;if(!Ue.ok){e(Qt.message??`请求失败(HTTP ${Ue.status})`,"error");return}Qt.status&&(r.value={...r.value,...Qt.status}),ae(ee)}catch(Ue){if(f.value!==be||D!==Me||he!==St||Z!==ht)return;e(`请求失败:${Ue instanceof Error?Ue.message:String(Ue)}`,"error")}}async function dt(x){x!==r.value.model&&await os("model",{model:x},`已切换模型:${x}`)}async function $t(x){x!==r.value.thinkingLevel&&await os("thinking",{level:x},`思考强度已切换为 ${x}`)}async function Tn(x,z,ee,be){const Me=f.value;if(!Me)return a.value="暂无可操作的会话。",null;if(t.value!=="connected")return a.value="连接已断开,请等待重连后再试。",null;if(v.value)return a.value="当前会话已归档,无法修改 Goal。",null;if(Fe)return a.value="正在处理上一个请求,请稍候。",null;se!==null&&(se=null,kt());const St=D,ht=++ie;Fe=!0,kt(),a.value=null;try{const Ue=await fetch(`${At}/sessions/${Me}/goal${x}`,{method:z,headers:{"Content-Type":"application/json"},body:JSON.stringify(ee)}),Qt=await Ue.json().catch(()=>({}));return!Zs(f.value,D,Me,St)||ie!==ht?null:Ue.ok?(be&&(se={generation:ht},He=ht),Qt):(a.value=typeof Qt.message=="string"?Qt.message:`请求失败(HTTP ${Ue.status})`,null)}catch(Ue){return Zs(f.value,D,Me,St)&&ie===ht&&(a.value=`请求失败:${Ue instanceof Error?Ue.message:String(Ue)}`),null}finally{Zs(f.value,D,Me,St)&&ie===ht&&(Fe=!1,kt())}}async function Hs(x){const z=await Tn("/refine","POST",{description:x},!1);return typeof(z==null?void 0:z.objective)=="string"?z.objective:null}async function Ru(x){return await Tn("","POST",wh(x),!0)===null?!1:(se!==null&&tt(se.generation),!0)}async function Au(x){return await Tn("","PATCH",_h(x),!0)===null?!1:(se!==null&&tt(se.generation),!0)}async function no(x){return await Tn(x,"POST",{},!0)===null?!1:(se!==null&&tt(se.generation),!0)}function Eu(){return no("/pause")}function Iu(){return no("/resume")}function Lu(){return no("/cancel")}async function Pu(){try{const x=await fetch(`${At}/sessions`,{method:"POST"});if(!x.ok){e(`新建会话失败(HTTP ${x.status})`,"error");return}const z=await x.json();d.value=[z,...d.value],await so(z.sessionId)}catch(x){e(`新建会话失败:${x instanceof Error?x.message:String(x)}`,"error")}}async function so(x){m.value===x&&t.value==="connected"||(m.value=x,f.value=x,D++,O(),F=0,te=0,n.value=[],s.value=[],r.value={busy:!1},o.value=null,i.value=[],b.value=!1,c.value=!1,Pe=!1,Ge.clear(),Q!==null&&(clearTimeout(Q),Q=null),G!==null&&(clearTimeout(G),G=null),T&&(T.onclose=null,T.close(),T=null),N(),B())}async function Mu(x){try{const z=await fetch(`${At}/sessions/${x}`,{method:"DELETE"});if(!z.ok){e(`删除会话失败(HTTP ${z.status})`,"error");return}if(d.value=d.value.filter(ee=>ee.sessionId!==x),m.value===x){const ee=d.value[0];ee?await so(ee.sessionId):(D++,O(),f.value=null,m.value=null,b.value=!1,F=0,te=0,n.value=[],s.value=[],r.value={busy:!1},o.value=null,i.value=[],c.value=!1,Pe=!1,Ge.clear(),T&&(T.onclose=null,T.close(),T=null),N(),ot("idle"))}}catch(z){e(`删除会话失败:${z instanceof Error?z.message:String(z)}`,"error")}}async function Nu(x){try{const z=await fetch(`${At}/sessions/${x}/export`);if(!z.ok){e(`导出会话失败(HTTP ${z.status})`,"error");return}const ee=await z.blob(),be=URL.createObjectURL(ee),Me=document.createElement("a");Me.href=be,Me.download=`${x}.md`,Me.click(),URL.revokeObjectURL(be)}catch(z){e(`导出会话失败:${z instanceof Error?z.message:String(z)}`,"error")}}B(),_e(),Ie();const Hi=()=>{B()},Wi=()=>{!document.hidden&&t.value!=="connected"&&B()};return window.addEventListener("online",Hi),document.addEventListener("visibilitychange",Wi),xn(()=>{We=!0,window.removeEventListener("online",Hi),document.removeEventListener("visibilitychange",Wi),N(),Q!==null&&(clearTimeout(Q),Q=null),G!==null&&(clearTimeout(G),G=null),T&&(T.onclose=null,T.close(),T=null)}),{connectionStatus:t,messages:n,pendingApprovals:s,status:r,goal:o,todos:i,goalRequestPending:l,goalRequestError:a,error:u,sessionId:f,workDir:p,isBusy:g,isArchived:v,sessions:d,currentSessionId:m,gitStatus:S,models:C,like:wt,fetchLike:Tt,updateLike:Cn,sendPrompt:P,sendCommand:Y,clearMessages:ne,appendSystemMessage:ae,abort:le,resolveApproval:ke,fetchSessions:_e,fetchGitStatus:ue,fetchModels:Ie,switchModel:dt,switchThinking:$t,refineGoal:Hs,createGoal:Ru,updateGoal:Au,pauseGoal:Eu,resumeGoal:Iu,cancelGoal:Lu,createSession:Pu,switchSession:so,deleteSession:Mu,exportSession:Nu,fetchSnapshot:tt}}function Eh(e){const{storageKey:t,defaultWidth:n,min:s,max:r}=e;function o(S){return Number.isFinite(S)?Math.min(_f(r),Math.max(s,Math.round(S))):n}function i(){try{const S=localStorage.getItem(t);if(S===null)return n;const C=Number(S);return Number.isFinite(C)?o(C):n}catch{return n}}function l(S){try{localStorage.setItem(t,String(S))}catch{}}const a=H(i()),c=H(!1);function u(S){const C=o(S);a.value=C,l(C)}let f=0,p=0,g=null,d=-1;function m(S){if(!c.value)return;const C=S.clientX-f;u(p+C)}function b(){if(c.value){if(c.value=!1,document.body.style.userSelect="",document.body.style.cursor="",g){try{g.releasePointerCapture(d)}catch{}g.removeEventListener("pointermove",m),g.removeEventListener("pointerup",b),g.removeEventListener("pointercancel",b)}g=null,d=-1}}function v(S){S.preventDefault(),c.value=!0,f=S.clientX,p=o(a.value),g=S.currentTarget,d=S.pointerId,document.body.style.userSelect="none",document.body.style.cursor="col-resize";try{g.setPointerCapture(S.pointerId)}catch{}g.addEventListener("pointermove",m),g.addEventListener("pointerup",b),g.addEventListener("pointercancel",b)}return xn(b),{width:a,dragging:c,clamp:o,setWidth:u,onPointerDown:v}}const _i=[{name:"compact",description:"压缩会话上下文",target:"backend"},{name:"model",description:"切换模型 / 思考强度",target:"local"},{name:"clear",description:"清空本地消息列表",target:"local"},{name:"new",description:"新建会话",target:"local"},{name:"help",description:"显示可用命令",target:"local"},{name:"auto",description:"切换为 auto 权限模式",target:"backend"},{name:"yes",description:"切换为 yolo 权限模式",target:"backend",aliases:["yolo"]},{name:"plan",description:"切换计划模式",target:"backend"},{name:"fork",description:"复制当前会话为新分支",target:"backend"},{name:"title",description:"重命名当前会话",target:"backend",aliases:["rename"],acceptsInput:!0},{name:"status",description:"查看会话状态",target:"local"},{name:"usage",description:"查看 Token 用量",target:"local"},{name:"btw",description:"快速侧问(不打断当前回合)",target:"backend",acceptsInput:!0}];function Ih(e){const t=e.toLowerCase();return _i.filter(n=>{var s;return n.name.startsWith(t)||((s=n.aliases)==null?void 0:s.some(r=>r.startsWith(t)))})}function Lh(e){const t=e.toLowerCase(),n=_i.find(s=>{var r;return s.name===t||((r=s.aliases)==null?void 0:r.includes(t))});return(n==null?void 0:n.name)??t}function Ph(){return["可用命令:",..._i.map(t=>{var s;return`${(s=t.aliases)!=null&&s.length?[t.name,...t.aliases].map(r=>`/${r}`).join(", "):`/${t.name}`} - ${t.description}`})].join(`
|
|
18
|
+
`)}const Mh=["title","aria-label"],Nh=["width","height","viewBox"],Oh=["cx","cy","r"],Dh=["cx","cy","r","stroke-dasharray","stroke-dashoffset","transform"],mo=2,Bh=xe({__name:"ContextRing",props:{usage:{default:void 0},size:{default:16}},setup(e){Ud(a=>({v1d95ffa8:l.value}));const t=e,n=X(()=>{if(t.usage===void 0||Number.isNaN(t.usage))return 0;const a=t.usage>1?t.usage/100:t.usage;return Math.min(1,Math.max(0,a))}),s=X(()=>Math.round(n.value*100)),r=X(()=>(t.size-mo)/2),o=X(()=>2*Math.PI*r.value),i=X(()=>o.value*(1-n.value)),l=X(()=>n.value>=.9?"var(--color-danger)":n.value>=.7?"var(--color-warning)":"var(--color-accent)");return(a,c)=>(k(),_("span",{class:"context-ring",role:"img",title:`上下文占用 ${s.value}%`,"aria-label":`上下文占用 ${s.value}%`},[(k(),_("svg",{width:e.size,height:e.size,viewBox:`0 0 ${e.size} ${e.size}`},[h("circle",{class:"ring-track",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":mo,fill:"none"},null,8,Oh),h("circle",{class:"ring-value",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":mo,fill:"none","stroke-linecap":"round","stroke-dasharray":o.value,"stroke-dashoffset":i.value,transform:`rotate(-90 ${e.size/2} ${e.size/2})`},null,8,Dh)],8,Nh))],8,Mh))}}),Ce=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Pc=Ce(Bh,[["__scopeId","data-v-3ffc343b"]]),Gh={key:0,class:"ui-dialog-header"},jh={class:"ui-dialog-title"},zh={class:"ui-dialog-body"},Uh={key:1,class:"ui-dialog-footer"},Fh=xe({__name:"Dialog",props:{open:{type:Boolean},title:{default:void 0},closable:{type:Boolean,default:!0},maxWidth:{default:void 0}},emits:["close"],setup(e,{emit:t}){const n=e,s=t;function r(o){o.key==="Escape"&&n.open&&n.closable!==!1&&(o.stopPropagation(),s("close"))}return Jt(()=>window.addEventListener("keydown",r,!0)),xn(()=>window.removeEventListener("keydown",r,!0)),(o,i)=>(k(),ze(gi,{to:"body"},[W(wi,{name:"dialog"},{default:Qe(()=>[e.open?(k(),_("div",{key:0,class:"ui-dialog-overlay",onClick:i[1]||(i[1]=zt(l=>e.closable!==!1&&s("close"),["self"]))},[h("div",{class:"ui-dialog",style:un(e.maxWidth?{maxWidth:e.maxWidth}:void 0),role:"dialog","aria-modal":"true"},[e.title||o.$slots.header?(k(),_("div",Gh,[sr(o.$slots,"header",{},()=>[h("span",jh,E(e.title),1)],!0),e.closable!==!1?(k(),_("button",{key:0,class:"ui-dialog-close","aria-label":"关闭",onClick:i[0]||(i[0]=l=>s("close"))},"✕")):V("",!0)])):V("",!0),h("div",zh,[sr(o.$slots,"default",{},void 0,!0)]),o.$slots.footer?(k(),_("div",Uh,[sr(o.$slots,"footer",{},void 0,!0)])):V("",!0)],4)])):V("",!0)]),_:3})]))}}),Zr=Ce(Fh,[["__scopeId","data-v-4562f775"]]),Hh=["width","height"],Wh={key:0,d:"M4 7h16M4 12h16M4 17h16"},qh={key:1,d:"M12 5v14M5 12h14"},Vh={key:5,d:"M4 6h16M7 12h10M10 18h4"},Kh={key:6,d:"M12 3v12m0 0 4-4m-4 4-4-4M5 20h14"},Zh={key:7,d:"M4 7h16M9 7V4h6v3m3 0-1 13H7L6 7m4 4v5m4-5v5"},Yh={key:8,d:"M3 12h4l2-7 4 14 2-7h6"},Jh={key:10,d:"m15 18-6-6 6-6"},Xh={key:11,d:"m9 18 6-6-6-6"},Qh={key:12,d:"m6 9 6 6 6-6"},ep={key:16,d:"M20 15.5A8.5 8.5 0 0 1 8.5 4 8.5 8.5 0 1 0 20 15.5Z"},tp={key:18,d:"M5 9a11 11 0 0 1 14 0M8.5 12.5a6 6 0 0 1 7 0M12 17h.01"},np={key:19,d:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z"},sp={key:20,d:"M12 16V4m0 0-4 4m4-4 4 4M5 20h14"},rp={key:21,d:"m15 4 5 5M17.5 6.5 10 14m-2-2 4 4-3 4H3l1-6Z"},op={key:22,d:"M9 6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3Z"},ip={key:24,d:"m22 2-7 20-4-9-9-4ZM22 2 11 13"},lp={key:25,x:"6",y:"6",width:"12",height:"12",rx:"2"},ap={key:26,d:"m8 3 4 4 4-4M8 21l4-4 4 4M12 7v10"},cp={key:27,d:"M9.5 4.5A3 3 0 0 0 5 7a3 3 0 0 0 .5 5.5A3 3 0 0 0 9 17v2a2 2 0 0 0 4 0V5a2.5 2.5 0 0 0-3.5-.5ZM13 6a3 3 0 0 1 5 2 3 3 0 0 1 .5 5.5A3 3 0 0 1 15 18"},up={key:30,d:"M21 12a8 8 0 0 1-9 8 9 9 0 0 1-4-.9L3 21l1.7-4A9 9 0 1 1 21 12Z"},fp={key:31,d:"M20 13 13 20l-9-9V4h7ZM8.5 8.5h.01"},dp={key:32,d:"m12 3 1.3 3.7L17 8l-3.7 1.3L12 13l-1.3-3.7L7 8l3.7-1.3ZM5 15l.8 2.2L8 18l-2.2.8L5 21l-.8-2.2L2 18l2.2-.8ZM19 14l.7 1.8 1.8.7-1.8.7L19 19l-.7-1.8-1.8-.7 1.8-.7Z"},hp={key:34,d:"M3 6h7l2 2h9v11H3Z"},pp={key:35,d:"m5 12 4 4L19 6"},gp=xe({__name:"SvgIcon",props:{name:{},size:{default:20}},setup(e){return(t,n)=>(k(),_("svg",{class:"svg-icon",width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e.name==="menu"?(k(),_("path",Wh)):e.name==="plus"?(k(),_("path",qh)):e.name==="panel-left"?(k(),_(re,{key:2},[n[0]||(n[0]=h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[1]||(n[1]=h("path",{d:"M9 4v16"},null,-1))],64)):e.name==="panel-right"?(k(),_(re,{key:3},[n[2]||(n[2]=h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[3]||(n[3]=h("path",{d:"M15 4v16"},null,-1))],64)):e.name==="search"?(k(),_(re,{key:4},[n[4]||(n[4]=h("circle",{cx:"11",cy:"11",r:"7"},null,-1)),n[5]||(n[5]=h("path",{d:"m20 20-4-4"},null,-1))],64)):e.name==="filter"?(k(),_("path",Vh)):e.name==="download"?(k(),_("path",Kh)):e.name==="trash"?(k(),_("path",Zh)):e.name==="activity"?(k(),_("path",Yh)):e.name==="help"?(k(),_(re,{key:9},[n[6]||(n[6]=h("circle",{cx:"12",cy:"12",r:"9"},null,-1)),n[7]||(n[7]=h("path",{d:"M9.7 9a2.5 2.5 0 1 1 3.5 2.3c-.8.4-1.2 1-1.2 1.7M12 17h.01"},null,-1))],64)):e.name==="chevron-left"?(k(),_("path",Jh)):e.name==="chevron-right"?(k(),_("path",Xh)):e.name==="chevron-down"?(k(),_("path",Qh)):e.name==="bot"?(k(),_(re,{key:13},[n[8]||(n[8]=h("rect",{x:"4",y:"7",width:"16",height:"12",rx:"3"},null,-1)),n[9]||(n[9]=h("path",{d:"M12 3v4M8 12h.01M16 12h.01M9 16h6"},null,-1))],64)):e.name==="git-branch"?(k(),_(re,{key:14},[n[10]||(n[10]=h("circle",{cx:"6",cy:"5",r:"2"},null,-1)),n[11]||(n[11]=h("circle",{cx:"18",cy:"7",r:"2"},null,-1)),n[12]||(n[12]=h("circle",{cx:"6",cy:"19",r:"2"},null,-1)),n[13]||(n[13]=h("path",{d:"M6 7v10M8 10c5 0 3-3 8-3"},null,-1))],64)):e.name==="sun"?(k(),_(re,{key:15},[n[14]||(n[14]=h("circle",{cx:"12",cy:"12",r:"4"},null,-1)),n[15]||(n[15]=h("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42"},null,-1))],64)):e.name==="moon"?(k(),_("path",ep)):e.name==="monitor"?(k(),_(re,{key:17},[n[16]||(n[16]=h("rect",{x:"3",y:"4",width:"18",height:"13",rx:"2"},null,-1)),n[17]||(n[17]=h("path",{d:"M8 21h8M12 17v4"},null,-1))],64)):e.name==="wifi"?(k(),_("path",tp)):e.name==="edit"?(k(),_("path",np)):e.name==="upload"?(k(),_("path",sp)):e.name==="broom"?(k(),_("path",rp)):e.name==="command"?(k(),_("path",op)):e.name==="at"?(k(),_(re,{key:23},[n[18]||(n[18]=h("circle",{cx:"12",cy:"12",r:"4"},null,-1)),n[19]||(n[19]=h("path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7"},null,-1))],64)):e.name==="send"?(k(),_("path",ip)):e.name==="stop"?(k(),_("rect",lp)):e.name==="compact"?(k(),_("path",ap)):e.name==="brain"?(k(),_("path",cp)):e.name==="clipboard"?(k(),_(re,{key:28},[n[20]||(n[20]=h("rect",{x:"5",y:"4",width:"14",height:"17",rx:"2"},null,-1)),n[21]||(n[21]=h("path",{d:"M9 4V2h6v2M9 10h6M9 14h6"},null,-1))],64)):e.name==="fork"?(k(),_(re,{key:29},[n[22]||(n[22]=h("circle",{cx:"6",cy:"4",r:"2"},null,-1)),n[23]||(n[23]=h("circle",{cx:"18",cy:"6",r:"2"},null,-1)),n[24]||(n[24]=h("circle",{cx:"6",cy:"20",r:"2"},null,-1)),n[25]||(n[25]=h("path",{d:"M6 6v12M8 10c6 0 4-4 8-4"},null,-1))],64)):e.name==="message-circle"?(k(),_("path",up)):e.name==="tag"?(k(),_("path",fp)):e.name==="sparkles"?(k(),_("path",dp)):e.name==="terminal"?(k(),_(re,{key:33},[n[26]||(n[26]=h("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[27]||(n[27]=h("path",{d:"m7 9 3 3-3 3m5 0h5"},null,-1))],64)):e.name==="folder"?(k(),_("path",hp)):e.name==="check"?(k(),_("path",pp)):e.name==="copy"?(k(),_(re,{key:36},[n[28]||(n[28]=h("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1)),n[29]||(n[29]=h("path",{d:"M16 8V4H4v12h4"},null,-1))],64)):V("",!0)],8,Hh))}}),me=Ce(gp,[["__scopeId","data-v-0a0ac222"]]),mp={class:"topbar"},vp={class:"agent-heading"},yp={class:"agent-mark"},bp={class:"agent-copy"},kp={class:"actions"},wp={key:0,class:"status-chip"},_p=["title"],Sp={class:"truncate"},xp={key:0},Cp={key:1},Tp=["disabled","title"],$p={class:"truncate"},Rp=["title"],Ap={class:"theme-toggle",role:"group","aria-label":"主题切换"},Ep=["title","aria-pressed","onClick"],Ip=["title"],Lp={key:0,class:"diff-body"},Pp={key:1,class:"diff-empty"},Mp=xe({__name:"TopBar",props:{connectionStatus:{},status:{},busy:{type:Boolean,default:!1},gitStatus:{default:null}},emits:["refresh-git","toggle-sidebar","open-model-picker"],setup(e,{emit:t}){const n=e,s=t,r=Nt("theme",H("system")),o=Nt("setTheme",()=>{}),i=[{value:"light",icon:"sun",label:"浅色主题"},{value:"dark",icon:"moon",label:"深色主题"},{value:"system",icon:"monitor",label:"跟随系统"}],l={connecting:"连接中",connected:"已连接",reconnecting:"重连中",disconnected:"已断开",idle:"空闲"},a=Nt("modelSwitchable",H(!1)),c=H(!1),u=X(()=>{const d=n.status.contextUsage;return d===void 0?null:Math.round((d>1?d/100:d)*100)}),f=X(()=>{var d,m;return`Tokens: ${((d=n.status.contextTokens)==null?void 0:d.toLocaleString())??"-"} / ${((m=n.status.maxContextTokens)==null?void 0:m.toLocaleString())??"-"}`}),p=X(()=>n.gitStatus?[n.gitStatus.ahead?`↑${n.gitStatus.ahead}`:"",n.gitStatus.behind?`↓${n.gitStatus.behind}`:""].filter(Boolean).join(" "):"");function g(){c.value=!c.value,c.value&&s("refresh-git")}return(d,m)=>{var b;return k(),_("header",mp,[h("div",vp,[h("button",{class:"mobile-menu","aria-label":"打开会话列表",title:"打开会话列表",onClick:m[0]||(m[0]=v=>s("toggle-sidebar"))},[W(me,{name:"menu"})]),h("span",yp,[W(me,{name:"bot",size:22})]),h("div",bp,[m[3]||(m[3]=h("strong",null,"Scream Code Agent",-1)),h("span",null,[h("i",{class:we({busy:e.busy})},null,2),Le(E(e.busy?"正在处理会话":"已就绪,等待任务"),1)])])]),h("div",kp,[e.status.planMode?(k(),_("span",wp,[W(me,{name:"clipboard",size:16}),m[4]||(m[4]=Le("计划模式",-1))])):V("",!0),e.gitStatus?(k(),_("button",{key:1,class:"action-chip git",title:`分支:${e.gitStatus.branch??"detached"},点击查看变更统计`,onClick:g},[W(me,{name:"git-branch",size:17}),h("span",Sp,E(e.gitStatus.branch??"detached"),1),p.value?(k(),_("span",xp,E(p.value),1)):V("",!0),e.gitStatus.changed?(k(),_("span",Cp,E(e.gitStatus.changed)+" 项变更",1)):V("",!0)],8,_p)):V("",!0),e.status.model?(k(),_("button",{key:2,class:"action-chip model",disabled:!J(a),title:e.status.model,onClick:m[1]||(m[1]=v=>s("open-model-picker"))},[W(me,{name:"brain",size:17}),h("span",$p,E(e.status.model),1)],8,Tp)):V("",!0),u.value!==null?(k(),_("span",{key:3,class:"action-chip context",title:f.value},[W(Pc,{usage:e.status.contextUsage,size:18},null,8,["usage"]),Le(E(u.value)+"%",1)],8,Rp)):V("",!0),h("div",Ap,[(k(),_(re,null,Ve(i,v=>h("button",{key:v.value,class:we({active:J(r)===v.value}),title:v.label,"aria-pressed":J(r)===v.value,onClick:S=>J(o)(v.value)},[W(me,{name:v.icon,size:17},null,8,["name"])],10,Ep)),64))]),h("div",{class:we(["connection",e.connectionStatus]),title:l[e.connectionStatus]},[W(me,{name:"wifi",size:18}),h("span",null,E(l[e.connectionStatus]),1)],10,Ip)]),W(Zr,{open:c.value&&!!e.gitStatus,title:`${((b=e.gitStatus)==null?void 0:b.branch)??"detached"} · diff 统计`,onClose:m[2]||(m[2]=v=>c.value=!1)},{default:Qe(()=>{var v;return[(v=e.gitStatus)!=null&&v.diffStat?(k(),_("pre",Lp,E(e.gitStatus.diffStat),1)):(k(),_("div",Pp,"工作区干净,没有变更。"))]}),_:1},8,["open","title"])])}}}),Np=Ce(Mp,[["__scopeId","data-v-6c220d1f"]]),Op={class:"chat-header"},Dp={class:"title-area"},Bp=["onKeydown"],Gp={key:1,class:"title-copy"},jp={class:"title-line"},zp=["title"],Up={class:"status-line"},Fp={class:"header-actions"},Hp=["title"],Wp=["title"],qp=xe({__name:"ChatHeader",props:{title:{default:null},busy:{type:Boolean,default:!1}},emits:["rename","export","clear","toggle-rightbar"],setup(e,{emit:t}){const n=e,s=t,r=H(!1),o=H(""),i=H(null);je(()=>n.title,()=>{r.value||(o.value=n.title??"")},{immediate:!0});function l(){o.value=n.title??"",r.value=!0,Lt(()=>{var p,g;(p=i.value)==null||p.focus(),(g=i.value)==null||g.select()})}function a(){r.value=!1;const p=o.value.trim();p&&p!==n.title?s("rename",p):o.value=n.title??""}function c(){r.value=!1,o.value=n.title??""}const u=Nt("showThinking",H(!0)),f=Nt("showTools",H(!0));return(p,g)=>(k(),_("div",Op,[h("div",Dp,[r.value?st((k(),_("input",{key:0,id:"session-title-input",ref_key:"inputRef",ref:i,"onUpdate:modelValue":g[0]||(g[0]=d=>o.value=d),name:"session-title",class:"title-input",maxlength:"80",onKeydown:[Is(zt(a,["prevent"]),["enter"]),Is(zt(c,["prevent"]),["esc"])],onBlur:a},null,40,Bp)),[[mt,o.value]]):(k(),_("div",Gp,[h("div",jp,[h("h1",{title:e.title??void 0},E(e.title||"新会话"),9,zp),h("button",{class:"icon-action edit",title:"重命名会话","aria-label":"重命名会话",onClick:l},[W(me,{name:"edit",size:17})])]),h("div",Up,[h("span",{class:we(["status-dot",{busy:e.busy}])},null,2),Le(E(e.busy?"Agent 正在运行并处理工具调用":"Agent 已就绪"),1)])]))]),h("div",Fp,[h("button",{class:"text-action",title:"导出会话为 Markdown",onClick:g[1]||(g[1]=d=>s("export"))},[W(me,{name:"upload",size:18}),g[6]||(g[6]=h("span",null,"导出",-1))]),h("button",{class:"text-action",title:"清空本地消息列表",onClick:g[2]||(g[2]=d=>s("clear"))},[W(me,{name:"broom",size:18}),g[7]||(g[7]=h("span",null,"清空",-1))]),h("button",{class:we(["text-action",{dimmed:!J(u)}]),title:J(u)?"隐藏思考链":"显示思考链",onClick:g[3]||(g[3]=d=>u.value=!J(u))},[W(me,{name:"brain",size:18}),g[8]||(g[8]=h("span",null,"思考",-1))],10,Hp),h("button",{class:we(["text-action",{dimmed:!J(f)}]),title:J(f)?"隐藏工具链":"显示工具链",onClick:g[4]||(g[4]=d=>f.value=!J(f))},[W(me,{name:"terminal",size:18}),g[9]||(g[9]=h("span",null,"工具",-1))],10,Wp),h("button",{class:"icon-action",title:"显示或隐藏右侧面板","aria-label":"显示或隐藏右侧面板",onClick:g[5]||(g[5]=d=>s("toggle-rightbar"))},[W(me,{name:"panel-right",size:19})])])]))}}),Vp=Ce(qp,[["__scopeId","data-v-5addc6d6"]]),Si=""+new URL("../icon.ico",import.meta.url).href;function xi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zn=xi();function Mc(e){zn=e}var _s={exec:()=>null};function Ee(e,t=""){let n=typeof e=="string"?e:e.source;const s={replace:(r,o)=>{let i=typeof o=="string"?o:o.source;return i=i.replace(yt.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,t)};return s}var yt={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,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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")},Kp=/^(?:[ \t]*(?:\n|$))+/,Zp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Jp=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ci=/(?:[*+-]|\d{1,9}[.)])/,Nc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Oc=Ee(Nc).replace(/bull/g,Ci).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(),Xp=Ee(Nc).replace(/bull/g,Ci).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(),Ti=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Qp=/^[^\n]+/,$i=/(?!\s*\])(?:\\.|[^\[\]\\])+/,eg=Ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",$i).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tg=Ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ci).getRegex(),Yr="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",Ri=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ng=Ee("^ {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",Ri).replace("tag",Yr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Dc=Ee(Ti).replace("hr",zs).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yr).getRegex(),sg=Ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Dc).getRegex(),Ai={blockquote:sg,code:Zp,def:eg,fences:Yp,heading:Jp,hr:zs,html:ng,lheading:Oc,list:tg,newline:Kp,paragraph:Dc,table:_s,text:Qp},Ml=Ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zs).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yr).getRegex(),rg={...Ai,lheading:Xp,table:Ml,paragraph:Ee(Ti).replace("hr",zs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ml).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yr).getRegex()},og={...Ai,html:Ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ri).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:_s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ee(Ti).replace("hr",zs).replace("heading",` *#{1,6} *[^
|
|
19
|
+
]`).replace("lheading",Oc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ig=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,lg=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Bc=/^( {2,}|\\)\n(?!\s*$)/,ag=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jr=/[\p{P}\p{S}]/u,Ei=/[\s\p{P}\p{S}]/u,Gc=/[^\s\p{P}\p{S}]/u,cg=Ee(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ei).getRegex(),jc=/(?!~)[\p{P}\p{S}]/u,ug=/(?!~)[\s\p{P}\p{S}]/u,fg=/(?:[^\s\p{P}\p{S}]|~)/u,dg=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,zc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,hg=Ee(zc,"u").replace(/punct/g,Jr).getRegex(),pg=Ee(zc,"u").replace(/punct/g,jc).getRegex(),Uc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gg=Ee(Uc,"gu").replace(/notPunctSpace/g,Gc).replace(/punctSpace/g,Ei).replace(/punct/g,Jr).getRegex(),mg=Ee(Uc,"gu").replace(/notPunctSpace/g,fg).replace(/punctSpace/g,ug).replace(/punct/g,jc).getRegex(),vg=Ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Gc).replace(/punctSpace/g,Ei).replace(/punct/g,Jr).getRegex(),yg=Ee(/\\(punct)/,"gu").replace(/punct/g,Jr).getRegex(),bg=Ee(/^<(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(),kg=Ee(Ri).replace("(?:-->|$)","-->").getRegex(),wg=Ee("^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",kg).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),kr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_g=Ee(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",kr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fc=Ee(/^!?\[(label)\]\[(ref)\]/).replace("label",kr).replace("ref",$i).getRegex(),Hc=Ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",$i).getRegex(),Sg=Ee("reflink|nolink(?!\\()","g").replace("reflink",Fc).replace("nolink",Hc).getRegex(),Ii={_backpedal:_s,anyPunctuation:yg,autolink:bg,blockSkip:dg,br:Bc,code:lg,del:_s,emStrongLDelim:hg,emStrongRDelimAst:gg,emStrongRDelimUnd:vg,escape:ig,link:_g,nolink:Hc,punctuation:cg,reflink:Fc,reflinkSearch:Sg,tag:wg,text:ag,url:_s},xg={...Ii,link:Ee(/^!?\[(label)\]\((.*?)\)/).replace("label",kr).getRegex(),reflink:Ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kr).getRegex()},Uo={...Ii,emStrongRDelimAst:mg,emStrongLDelim:pg,url:Ee(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Cg={...Uo,br:Ee(Bc).replace("{2,}","*").getRegex(),text:Ee(Uo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ys={normal:Ai,gfm:rg,pedantic:og},cs={normal:Ii,gfm:Uo,breaks:Cg,pedantic:xg},Tg={"&":"&","<":"<",">":">",'"':""","'":"'"},Nl=e=>Tg[e];function Ht(e,t){if(t){if(yt.escapeTest.test(e))return e.replace(yt.escapeReplace,Nl)}else if(yt.escapeTestNoEncode.test(e))return e.replace(yt.escapeReplaceNoEncode,Nl);return e}function Ol(e){try{e=encodeURI(e).replace(yt.percentDecode,"%")}catch{return null}return e}function Dl(e,t){var o;const n=e.replace(yt.findPipe,(i,l,a)=>{let c=!1,u=l;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(yt.splitPipe);let r=0;if(s[0].trim()||s.shift(),s.length>0&&!((o=s.at(-1))!=null&&o.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(yt.slashPipe,"|");return s}function us(e,t,n){const s=e.length;if(s===0)return"";let r=0;for(;r<s&&e.charAt(s-r-1)===t;)r++;return e.slice(0,s-r)}function $g(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return n>0?-2:-1}function Bl(e,t,n,s,r){const o=t.href,i=t.title||null,l=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;const a={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,a}function Rg(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(s===null)return t;const r=s[1];return t.split(`
|
|
20
|
+
`).map(o=>{const i=o.match(n.other.beginningSpace);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`
|
|
21
|
+
`)}var wr=class{constructor(e){$(this,"options");$(this,"rules");$(this,"lexer");this.options=e||zn}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:us(n,`
|
|
22
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=Rg(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:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const s=us(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:us(t[0],`
|
|
23
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=us(t[0],`
|
|
24
|
+
`).split(`
|
|
25
|
+
`),s="",r="";const o=[];for(;n.length>0;){let i=!1;const l=[];let a;for(a=0;a<n.length;a++)if(this.rules.other.blockquoteStart.test(n[a]))l.push(n[a]),i=!0;else if(!i)l.push(n[a]);else break;n=n.slice(a);const c=l.join(`
|
|
26
|
+
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
27
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
28
|
+
${c}`:c,r=r?`${r}
|
|
29
|
+
${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,n.length===0)break;const p=o.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const g=p,d=g.raw+`
|
|
30
|
+
`+n.join(`
|
|
31
|
+
`),m=this.blockquote(d);o[o.length-1]=m,s=s.substring(0,s.length-g.raw.length)+m.raw,r=r.substring(0,r.length-g.text.length)+m.text;break}else if((p==null?void 0:p.type)==="list"){const g=p,d=g.raw+`
|
|
32
|
+
`+n.join(`
|
|
33
|
+
`),m=this.list(d);o[o.length-1]=m,s=s.substring(0,s.length-p.raw.length)+m.raw,r=r.substring(0,r.length-g.raw.length)+m.raw,n=d.substring(o.at(-1).raw.length).split(`
|
|
34
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let i=!1;for(;e;){let a=!1,c="",u="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let f=t[2].split(`
|
|
35
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),p=e.split(`
|
|
36
|
+
`,1)[0],g=!f.trim(),d=0;if(this.options.pedantic?(d=2,u=f.trimStart()):g?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,u=f.slice(d),d+=t[1].length),g&&this.rules.other.blankLine.test(p)&&(c+=p+`
|
|
37
|
+
`,e=e.substring(p.length+1),a=!0),!a){const v=this.rules.other.nextBulletRegex(d),S=this.rules.other.hrRegex(d),C=this.rules.other.fencesBeginRegex(d),T=this.rules.other.headingBeginRegex(d),K=this.rules.other.htmlBeginRegex(d);for(;e;){const Q=e.split(`
|
|
38
|
+
`,1)[0];let G;if(p=Q,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),G=p):G=p.replace(this.rules.other.tabCharGlobal," "),C.test(p)||T.test(p)||K.test(p)||v.test(p)||S.test(p))break;if(G.search(this.rules.other.nonSpaceChar)>=d||!p.trim())u+=`
|
|
39
|
+
`+G.slice(d);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(f)||T.test(f)||S.test(f))break;u+=`
|
|
40
|
+
`+p}!g&&!p.trim()&&(g=!0),c+=Q+`
|
|
41
|
+
`,e=e.substring(Q.length+1),f=G.slice(d)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let m=null,b;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(b=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!m,checked:b,loose:!1,text:u,tokens:[]}),r.raw+=c}const l=r.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let a=0;a<r.items.length;a++)if(this.lexer.state.top=!1,r.items[a].tokens=this.lexer.blockTokens(r.items[a].text,[]),!r.loose){const c=r.items[a].tokens.filter(f=>f.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));r.loose=u}if(r.loose)for(let a=0;a<r.items.length;a++)r.items[a].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:r}}}table(e){var i;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=Dl(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(i=t[3])!=null&&i.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
42
|
+
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<n.length;l++)o.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:o.align[l]});for(const l of r)o.rows.push(Dl(l,o.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[c]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
|
|
43
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const 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){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const 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){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const o=us(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=$g(t[2],"()");if(o===-2)return;if(o>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),Bl(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.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))){const s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return Bl(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...s[0]].length-1;let i,l,a=o,c=0;const u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);(s=u.exec(t))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){a+=l;continue}else if((s[5]||s[6])&&o%3&&!((o+l)%3)){c+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+c);const f=[...s[0]][0].length,p=e.slice(0,o+s.index+f+l);if(Math.min(o,l)%2){const d=p.slice(1,-1);return{type:"em",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}const g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let s,r;if(t[2]==="@")s=t[0],r="mailto:"+s;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);s=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},ln=class Fo{constructor(t){$(this,"tokens");$(this,"options");$(this,"state");$(this,"tokenizer");$(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||zn,this.options.tokenizer=this.options.tokenizer||new wr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:yt,block:Ys.normal,inline:cs.normal};this.options.pedantic?(n.block=Ys.pedantic,n.inline=cs.pedantic):this.options.gfm&&(n.block=Ys.gfm,this.options.breaks?n.inline=cs.breaks:n.inline=cs.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ys,inline:cs}}static lex(t,n){return new Fo(n).lex(t)}static lexInline(t,n){return new Fo(n).inlineTokens(t)}lex(t){t=t.replace(yt.carriageReturn,`
|
|
44
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],s=!1){var r,o,i;for(this.options.pedantic&&(t=t.replace(yt.tabCharGlobal," ").replace(yt.spaceLine,""));t;){let l;if((o=(r=this.options.extensions)==null?void 0:r.block)!=null&&o.some(c=>(l=c.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const c=n.at(-1);l.raw.length===1&&c!==void 0?c.raw+=`
|
|
45
|
+
`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
46
|
+
`+l.raw,c.text+=`
|
|
47
|
+
`+l.text,this.inlineQueue.at(-1).src=c.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
48
|
+
`+l.raw,c.text+=`
|
|
49
|
+
`+l.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let a=t;if((i=this.options.extensions)!=null&&i.startBlock){let c=1/0;const u=t.slice(1);let f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(a=t.substring(0,c+1))}if(this.state.top&&(l=this.tokenizer.paragraph(a))){const c=n.at(-1);s&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
|
|
50
|
+
`+l.raw,c.text+=`
|
|
51
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(l),s=a.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
52
|
+
`+l.raw,c.text+=`
|
|
53
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(l);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,a,c;let s=t,r=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,i="";for(;t;){o||(i=""),o=!1;let u;if((a=(l=this.options.extensions)==null?void 0:l.inline)!=null&&a.some(p=>(u=p.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);const p=n.at(-1);u.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,s,i)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let f=t;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0;const g=t.slice(1);let d;this.options.extensions.startInline.forEach(m=>{d=m.call({lexer:this},g),typeof d=="number"&&d>=0&&(p=Math.min(p,d))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(u=this.tokenizer.inlineText(f)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(i=u.raw.slice(-1)),o=!0;const p=n.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):n.push(u);continue}if(t){const p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}},_r=class{constructor(e){$(this,"options");$(this,"parser");this.options=e||zn}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const s=(o=(t||"").match(yt.notSpaceStart))==null?void 0:o[0],r=e.replace(yt.endingNewline,"")+`
|
|
54
|
+
`;return s?'<pre><code class="language-'+Ht(s)+'">'+(n?r:Ht(r,!0))+`</code></pre>
|
|
55
|
+
`:"<pre><code>"+(n?r:Ht(r,!0))+`</code></pre>
|
|
56
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
57
|
+
${this.parser.parse(e)}</blockquote>
|
|
58
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
59
|
+
`}hr(e){return`<hr>
|
|
60
|
+
`}list(e){const t=e.ordered,n=e.start;let s="";for(let i=0;i<e.items.length;i++){const l=e.items[i];s+=this.listitem(l)}const r=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+r+o+`>
|
|
61
|
+
`+s+"</"+r+`>
|
|
62
|
+
`}listitem(e){var n;let t="";if(e.task){const s=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=s+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=s+" "+Ht(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):t+=s+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
63
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
64
|
+
`}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s="";for(let r=0;r<e.rows.length;r++){const o=e.rows[r];n="";for(let i=0;i<o.length;i++)n+=this.tablecell(o[i]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
65
|
+
<thead>
|
|
66
|
+
`+t+`</thead>
|
|
67
|
+
`+s+`</table>
|
|
68
|
+
`}tablerow({text:e}){return`<tr>
|
|
69
|
+
${e}</tr>
|
|
70
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
71
|
+
`}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>${Ht(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=Ol(e);if(r===null)return s;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+Ht(t)+'"'),o+=">"+s+"</a>",o}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));const r=Ol(e);if(r===null)return Ht(n);e=r;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${Ht(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ht(e.text)}},Li=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""}},an=class Ho{constructor(t){$(this,"options");$(this,"renderer");$(this,"textRenderer");this.options=t||zn,this.options.renderer=this.options.renderer||new _r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Li}static parse(t,n){return new Ho(n).parse(t)}static parseInline(t,n){return new Ho(n).parseInline(t)}parse(t,n=!0){var r,o;let s="";for(let i=0;i<t.length;i++){const l=t[i];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[l.type]){const c=l,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){s+=u||"";continue}}const a=l;switch(a.type){case"space":{s+=this.renderer.space(a);continue}case"hr":{s+=this.renderer.hr(a);continue}case"heading":{s+=this.renderer.heading(a);continue}case"code":{s+=this.renderer.code(a);continue}case"table":{s+=this.renderer.table(a);continue}case"blockquote":{s+=this.renderer.blockquote(a);continue}case"list":{s+=this.renderer.list(a);continue}case"html":{s+=this.renderer.html(a);continue}case"paragraph":{s+=this.renderer.paragraph(a);continue}case"text":{let c=a,u=this.renderer.text(c);for(;i+1<t.length&&t[i+1].type==="text";)c=t[++i],u+=`
|
|
72
|
+
`+this.renderer.text(c);n?s+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):s+=u;continue}default:{const c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}parseInline(t,n=this.renderer){var r,o;let s="";for(let i=0;i<t.length;i++){const l=t[i];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[l.type]){const c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=c||"";continue}}const a=l;switch(a.type){case"escape":{s+=n.text(a);break}case"html":{s+=n.html(a);break}case"link":{s+=n.link(a);break}case"image":{s+=n.image(a);break}case"strong":{s+=n.strong(a);break}case"em":{s+=n.em(a);break}case"codespan":{s+=n.codespan(a);break}case"br":{s+=n.br(a);break}case"del":{s+=n.del(a);break}case"text":{s+=n.text(a);break}default:{const c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}},To,or=(To=class{constructor(e){$(this,"options");$(this,"block");this.options=e||zn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ln.lex:ln.lexInline}provideParser(){return this.block?an.parse:an.parseInline}},$(To,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),To),Ag=class{constructor(...e){$(this,"defaults",xi());$(this,"options",this.setOptions);$(this,"parse",this.parseMarkdown(!0));$(this,"parseInline",this.parseMarkdown(!1));$(this,"Parser",an);$(this,"Renderer",_r);$(this,"TextRenderer",Li);$(this,"Lexer",ln);$(this,"Tokenizer",wr);$(this,"Hooks",or);this.use(...e)}walkTokens(e,t){var s,r;let n=[];for(const o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{const i=o;for(const l of i.header)n=n.concat(this.walkTokens(l.tokens,t));for(const l of i.rows)for(const a of l)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{const i=o;n=n.concat(this.walkTokens(i.items,t));break}default:{const i=o;(r=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&r[i.type]?this.defaults.extensions.childTokens[i.type].forEach(l=>{const a=i[l].flat(1/0);n=n.concat(this.walkTokens(a,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const o=t.renderers[r.name];o?t.renderers[r.name]=function(...i){let l=r.renderer.apply(this,i);return l===!1&&(l=o.apply(this,i)),l}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){const r=this.defaults.renderer||new _r(this.defaults);for(const o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const i=o,l=n.renderer[i],a=r[i];r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u||""}}s.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new wr(this.defaults);for(const o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const i=o,l=n.tokenizer[i],a=r[i];r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u}}s.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new or;for(const o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const i=o,l=n.hooks[i],a=r[i];or.passThroughHooks.has(o)?r[i]=c=>{if(this.defaults.async)return Promise.resolve(l.call(r,c)).then(f=>a.call(r,f));const u=l.call(r,c);return a.call(r,u)}:r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u}}s.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(i){let l=[];return l.push(o.call(this,i)),r&&(l=l.concat(r.call(this,i))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ln.lex(e,t??this.defaults)}parser(e,t){return an.parse(e,t??this.defaults)}parseMarkdown(e){return(n,s)=>{const r={...s},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return i(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 n>"u"||n===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?ln.lex:ln.lexInline,a=o.hooks?o.hooks.provideParser():e?an.parse:an.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>a(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(i);try{o.hooks&&(n=o.hooks.preprocess(n));let c=l(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=a(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return i(c)}}}onError(e,t){return n=>{if(n.message+=`
|
|
73
|
+
Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An error occurred:</p><pre>"+Ht(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},jn=new Ag;function Re(e,t){return jn.parse(e,t)}Re.options=Re.setOptions=function(e){return jn.setOptions(e),Re.defaults=jn.defaults,Mc(Re.defaults),Re};Re.getDefaults=xi;Re.defaults=zn;Re.use=function(...e){return jn.use(...e),Re.defaults=jn.defaults,Mc(Re.defaults),Re};Re.walkTokens=function(e,t){return jn.walkTokens(e,t)};Re.parseInline=jn.parseInline;Re.Parser=an;Re.parser=an.parse;Re.Renderer=_r;Re.TextRenderer=Li;Re.Lexer=ln;Re.lexer=ln.lex;Re.Tokenizer=wr;Re.Hooks=or;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;an.parse;ln.lex;const Eg="modulepreload",Ig=function(e,t){return new URL(e,t).href},Gl={},Js=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const l=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=Ig(u,s),u in Gl)return;Gl[u]=!0;const f=u.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(!!s)for(let m=l.length-1;m>=0;m--){const b=l[m];if(b.href===u&&(!f||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${p}`))return;const d=document.createElement("link");if(d.rel=f?"stylesheet":Eg,f||(d.as="script"),d.crossOrigin="",d.href=u,c&&d.setAttribute("nonce",c),document.head.appendChild(d),f)return new Promise((m,b)=>{d.addEventListener("load",m),d.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};let Xe=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Lg(e){return Pi(e)}function Pi(e){return Array.isArray(e)?Pg(e):e instanceof RegExp?e:typeof e=="object"?Mg(e):e}function Pg(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=Pi(e[n]);return t}function Mg(e){let t={};for(let n in e)t[n]=Pi(e[n]);return t}function Wc(e,...t){return t.forEach(n=>{for(let s in n)e[s]=n[s]}),e}function qc(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?qc(e.substring(0,e.length-1)):e.substr(~t+1)}var vo=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xs=class{static hasCaptures(e){return e===null?!1:(vo.lastIndex=0,vo.test(e))}static replaceCaptures(e,t,n){return e.replace(vo,(s,r,o,i)=>{let l=n[parseInt(r||o,10)];if(l){let a=t.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return s})}};function Vc(e,t){return e<t?-1:e>t?1:0}function Kc(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let r=0;r<n;r++){let o=Vc(e[r],t[r]);if(o!==0)return o}return 0}return n-s}function jl(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Zc(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Yc=class{constructor(e){$(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Sr=class{constructor(e,t,n){$(this,"_cachedMatchRoot",new Yc(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Dg(e),t)}static createFromParsedTheme(e,t){return Gg(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,s=this._cachedMatchRoot.get(t).find(r=>Ng(e.parent,r.parentScopes));return s?new Jc(s.fontStyle,s.foreground,s.background):null}},yo=class ir{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const s of n)t=new ir(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new ir(n,t[s]);return n}push(t){return new ir(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let s=this;for(;s&&s!==t;)n.push(s.scopeName),s=s.parent;return s===t?n.reverse():void 0}};function Ng(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(s===">"){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!Og(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Og(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Jc=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Dg(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let i=t[r];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let f=i.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),l=f.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let f=i.settings.fontStyle.split(" ");for(let p=0,g=f.length;p<g;p++)switch(f[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&jl(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&jl(i.settings.background)&&(u=i.settings.background);for(let f=0,p=l.length;f<p;f++){let d=l[f].trim().split(" "),m=d[d.length-1],b=null;d.length>1&&(b=d.slice(0,d.length-1),b.reverse()),n[s++]=new Bg(m,b,r,a,c,u)}}return n}var Bg=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},ut=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(ut||{});function Gg(e,t){e.sort((a,c)=>{let u=Vc(a.scope,c.scope);return u!==0||(u=Kc(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(s=a.foreground),a.background!==null&&(r=a.background)}let o=new jg(t),i=new Jc(n,o.getId(s),o.getId(r)),l=new Ug(new Wo(0,null,-1,0,0),[]);for(let a=0,c=e.length;a<c;a++){let u=e[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new Sr(o,i,l)}var jg=class{constructor(e){$(this,"_isFrozen");$(this,"_lastColorId");$(this,"_id2color");$(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},zg=Object.freeze([]),Wo=class Xc{constructor(t,n,s,r,o){$(this,"scopeDepth");$(this,"parentScopes");$(this,"fontStyle");$(this,"foreground");$(this,"background");this.scopeDepth=t,this.parentScopes=n||zg,this.fontStyle=s,this.foreground=r,this.background=o}clone(){return new Xc(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let s=0,r=t.length;s<r;s++)n[s]=t[s].clone();return n}acceptOverwrite(t,n,s,r){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},Ug=class qo{constructor(t,n=[],s={}){$(this,"_rulesWithParentScopes");this._mainRule=t,this._children=s,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let s=0,r=0;for(;t.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[s].length;if(o!==0)return o;s++,r++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let s=t.indexOf("."),r,o;if(s===-1?(r=t,o=""):(r=t.substring(0,s),o=t.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(qo._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(n===""){this._doInsertHere(t,s,r,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new qo(this._mainRule.clone(),Wo.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,c,s,r,o,i)}_doInsertHere(t,n,s,r,o){if(n===null){this._mainRule.acceptOverwrite(t,s,r,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Kc(a.parentScopes,n)===0){a.acceptOverwrite(t,s,r,o);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Wo(t,n,s,r,o))}},ns=class Et{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Et.getLanguageId(t),s=Et.getTokenType(t),r=Et.getFontStyle(t),o=Et.getForeground(t),i=Et.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,s,r,o,i,l){let a=Et.getLanguageId(t),c=Et.getTokenType(t),u=Et.containsBalancedBrackets(t)?1:0,f=Et.getFontStyle(t),p=Et.getForeground(t),g=Et.getBackground(t);return n!==0&&(a=n),s!==8&&(c=s),r!==null&&(u=r?1:0),o!==-1&&(f=o),i!==0&&(p=i),l!==0&&(g=l),(a<<0|c<<8|u<<10|f<<11|p<<15|g<<24)>>>0}};function xr(e,t){const n=[],s=Fg(e);let r=s.next();for(;r!==null;){let a=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let c=i();if(n.push({matcher:c,priority:a}),r!==",")break;r=s.next()}return n;function o(){if(r==="-"){r=s.next();const a=o();return c=>!!a&&!a(c)}if(r==="("){r=s.next();const a=l();return r===")"&&(r=s.next()),a}if(zl(r)){const a=[];do a.push(r),r=s.next();while(zl(r));return c=>t(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(f=>f(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");c=i()}return u=>a.some(f=>f(u))}}function zl(e){return!!e&&!!e.match(/[\w\.:]+/)}function Fg(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}function Qc(e){typeof e.dispose=="function"&&e.dispose()}var Ps=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Hg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Wg=class{constructor(){$(this,"_references",[]);$(this,"_seenReferenceKeys",new Set);$(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},qg=class{constructor(e,t){$(this,"seenFullScopeRequests",new Set);$(this,"seenPartialScopeRequests",new Set);$(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ps(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Wg;for(const n of e)Vg(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ps){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Vg(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Ps?lr({baseGrammar:o,selfGrammar:r},s):Vo(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const i=n.injections(e.scopeName);if(i)for(const l of i)s.add(new Ps(l))}function Vo(e,t,n){if(t.repository&&t.repository[e]){const s=t.repository[e];Cr([s],t,n)}}function lr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Cr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Cr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Cr(e,t,n){for(const s of e){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?Wc({},t.repository,s.repository):t.repository;Array.isArray(s.patterns)&&Cr(s.patterns,{...t,repository:r},n);const o=s.include;if(!o)continue;const i=eu(o);switch(i.kind){case 0:lr({...t,selfGrammar:t.baseGrammar},n);break;case 1:lr(t,n);break;case 2:Vo(i.ruleName,{...t,repository:r},n);break;case 3:case 4:const l=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const a={baseGrammar:t.baseGrammar,selfGrammar:l,repository:r};i.kind===4?Vo(i.ruleName,a,n):lr(a,n)}else i.kind===4?n.add(new Hg(i.scopeName,i.ruleName)):n.add(new Ps(i.scopeName));break}}}var Kg=class{constructor(){$(this,"kind",0)}},Zg=class{constructor(){$(this,"kind",1)}},Yg=class{constructor(e){$(this,"kind",2);this.ruleName=e}},Jg=class{constructor(e){$(this,"kind",3);this.scopeName=e}},Xg=class{constructor(e,t){$(this,"kind",4);this.scopeName=e,this.ruleName=t}};function eu(e){if(e==="$base")return new Kg;if(e==="$self")return new Zg;const t=e.indexOf("#");if(t===-1)return new Jg(e);if(t===0)return new Yg(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new Xg(n,s)}}var Qg=/\\(\d+)/,Ul=/\\(\d+)/g,em=-1,tu=-2;var Us=class{constructor(e,t,n,s){$(this,"$location");$(this,"id");$(this,"_nameIsCapturing");$(this,"_name");$(this,"_contentNameIsCapturing");$(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Xs.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Xs.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${qc(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Xs.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xs.replaceCaptures(this._contentName,e,t)}},tm=class extends Us{constructor(t,n,s,r,o){super(t,n,s,r);$(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,s,r){throw new Error("Not supported!")}},nm=class extends Us{constructor(t,n,s,r,o){super(t,n,s,null);$(this,"_match");$(this,"captures");$(this,"_cachedCompiledPatterns");this._match=new Ms(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ns,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Fl=class extends Us{constructor(t,n,s,r,o){super(t,n,s,r);$(this,"hasMissingPatterns");$(this,"patterns");$(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const s of this.patterns)t.getRule(s).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ns,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ko=class extends Us{constructor(t,n,s,r,o,i,l,a,c,u){super(t,n,s,r);$(this,"_begin");$(this,"beginCaptures");$(this,"_end");$(this,"endHasBackReferences");$(this,"endCaptures");$(this,"applyEndPatternLast");$(this,"hasMissingPatterns");$(this,"patterns");$(this,"_cachedCompiledPatterns");this._begin=new Ms(o,this.id),this.beginCaptures=i,this._end=new Ms(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t,n).compileAG(t,s,r)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ns;for(const s of this.patterns)t.getRule(s).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Tr=class extends Us{constructor(t,n,s,r,o,i,l,a,c){super(t,n,s,r);$(this,"_begin");$(this,"beginCaptures");$(this,"whileCaptures");$(this,"_while");$(this,"whileHasBackReferences");$(this,"hasMissingPatterns");$(this,"patterns");$(this,"_cachedCompiledPatterns");$(this,"_cachedCompiledWhilePatterns");this._begin=new Ms(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new Ms(l,tu),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ns;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,s,r){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,s,r)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ns,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},nu=class it{static createCaptureRule(t,n,s,r,o){return t.registerRule(i=>new tm(n,i,s,r,o))}static getCompiledRuleId(t,n,s){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new nm(t.$vscodeTextmateLocation,t.id,t.name,t.match,it._compileCaptures(t.captures,n,s));if(typeof t.begin>"u"){t.repository&&(s=Wc({},s,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Fl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,it._compilePatterns(o,n,s))}return t.while?new Tr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,it._compileCaptures(t.beginCaptures||t.captures,n,s),t.while,it._compileCaptures(t.whileCaptures||t.captures,n,s),it._compilePatterns(t.patterns,n,s)):new Ko(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,it._compileCaptures(t.beginCaptures||t.captures,n,s),t.end,it._compileCaptures(t.endCaptures||t.captures,n,s),t.applyEndPatternLast,it._compilePatterns(t.patterns,n,s))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)r[i]=null;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;t[i].patterns&&(a=it.getCompiledRuleId(t[i],n,s)),r[l]=it.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,i=t.length;o<i;o++){const l=t[o];let a=-1;if(l.include){const c=eu(l.include);switch(c.kind){case 0:case 1:a=it.getCompiledRuleId(s[l.include],n,s);break;case 2:let u=s[c.ruleName];u&&(a=it.getCompiledRuleId(u,n,s));break;case 3:case 4:const f=c.scopeName,p=c.kind===4?c.ruleName:null,g=n.getExternalGrammar(f,s);if(g)if(p){let d=g.repository[p];d&&(a=it.getCompiledRuleId(d,n,g.repository))}else a=it.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else a=it.getCompiledRuleId(l,n,s);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof Fl||c instanceof Ko||c instanceof Tr)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},Ms=class su{constructor(t,n){$(this,"source");$(this,"ruleId");$(this,"hasAnchor");$(this,"hasBackReferences");$(this,"_anchorCache");if(t&&typeof t=="string"){const s=t.length;let r=0,o=[],i=!1;for(let l=0;l<s;l++)if(t.charAt(l)==="\\"&&l+1<s){const c=t.charAt(l+1);c==="z"?(o.push(t.substring(r,l)),o.push("$(?!\\n)(?<!\\n)"),r=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,r===0?this.source=t:(o.push(t.substring(r,s)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Qg.test(this.source):this.hasBackReferences=!1}clone(){return new su(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let s=n.map(r=>t.substring(r.start,r.end));return Ul.lastIndex=0,this.source.replace(Ul,(r,o)=>Zc(s[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],s=[],r=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),t[o]=l,n[o]=l,s[o]=l,r[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(t[o+1]="",n[o+1]="",s[o+1]="A",r[o+1]="A"):a==="G"?(t[o+1]="",n[o+1]="G",s[o+1]="",r[o+1]="G"):(t[o+1]=a,n[o+1]=a,s[o+1]=a,r[o+1]=a),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ns=class{constructor(){$(this,"_items");$(this,"_hasAnchors");$(this,"_cached");$(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Hl(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(r=>r.resolveAnchors(t,n));return new Hl(e,s,this._items.map(r=>r.ruleId))}},Hl=class{constructor(e,t,n){$(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
74
|
+
`)}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},bo=class{constructor(e,t){this.languageId=e,this.tokenType=t}},on,sm=(on=class{constructor(t,n){$(this,"_defaultAttributes");$(this,"_embeddedLanguagesMatcher");$(this,"_getBasicScopeAttributes",new Yc(t=>{const n=this._scopeToLanguage(t),s=this._toStandardTokenType(t);return new bo(n,s)}));this._defaultAttributes=new bo(t,8),this._embeddedLanguagesMatcher=new rm(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?on._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(on.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},$(on,"_NULL_SCOPE_METADATA",new bo(0,0)),$(on,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),on),rm=class{constructor(e){$(this,"values");$(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,s])=>Zc(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Wl=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function ru(e,t,n,s,r,o,i,l){const a=t.content.length;let c=!1,u=-1;if(i){const g=om(e,t,n,s,r,o);r=g.stack,s=g.linePos,n=g.isFirstLine,u=g.anchorPosition}const f=Date.now();for(;!c;){if(l!==0&&Date.now()-f>l)return new Wl(r,!0);p()}return new Wl(r,!1);function p(){const g=im(e,t,n,s,r,u);if(!g){o.produce(r,a),c=!0;return}const d=g.captureIndices,m=g.matchedRuleId,b=d&&d.length>0?d[0].end>s:!1;if(m===em){const v=r.getRule(e);o.produce(r,d[0].start),r=r.withContentNameScopesList(r.nameScopesList),gs(e,t,n,r,o,v.endCaptures,d),o.produce(r,d[0].end);const S=r;if(r=r.parent,u=S.getAnchorPos(),!b&&S.getEnterPos()===s){r=S,o.produce(r,a),c=!0;return}}else{const v=e.getRule(m);o.produce(r,d[0].start);const S=r,C=v.getName(t.content,d),T=r.contentNameScopesList.pushAttributed(C,e);if(r=r.push(m,s,u,d[0].end===a,null,T,T),v instanceof Ko){const K=v;gs(e,t,n,r,o,K.beginCaptures,d),o.produce(r,d[0].end),u=d[0].end;const Q=K.getContentName(t.content,d),G=T.pushAttributed(Q,e);if(r=r.withContentNameScopesList(G),K.endHasBackReferences&&(r=r.withEndRule(K.getEndWithResolvedBackReferences(t.content,d))),!b&&S.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(v instanceof Tr){const K=v;gs(e,t,n,r,o,K.beginCaptures,d),o.produce(r,d[0].end),u=d[0].end;const Q=K.getContentName(t.content,d),G=T.pushAttributed(Q,e);if(r=r.withContentNameScopesList(G),K.whileHasBackReferences&&(r=r.withEndRule(K.getWhileWithResolvedBackReferences(t.content,d))),!b&&S.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(gs(e,t,n,r,o,v.captures,d),o.produce(r,d[0].end),r=r.pop(),!b){r=r.safePop(),o.produce(r,a),c=!0;return}}d[0].end>s&&(s=d[0].end,n=!1)}}function om(e,t,n,s,r,o){let i=r.beginRuleCapturedEOL?0:-1;const l=[];for(let a=r;a;a=a.pop()){const c=a.getRule(e);c instanceof Tr&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=cm(a.rule,e,a.stack.endRule,n,s===i),f=c.findNextMatchSync(t,s,u);if(f){if(f.ruleId!==tu){r=a.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(o.produce(a.stack,f.captureIndices[0].start),gs(e,t,n,a.stack,o,a.rule.whileCaptures,f.captureIndices),o.produce(a.stack,f.captureIndices[0].end),i=f.captureIndices[0].end,f.captureIndices[0].end>s&&(s=f.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}function im(e,t,n,s,r,o){const i=lm(e,t,n,s,r,o),l=e.getInjections();if(l.length===0)return i;const a=am(l,e,t,n,s,r,o);if(!a)return i;if(!i)return a;const c=i.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:i}function lm(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:l,findOptions:a}=ou(i,e,r.endRule,n,s===o),c=l.findNextMatchSync(t,s,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function am(e,t,n,s,r,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const f=o.contentNameScopesList.getScopeNames();for(let p=0,g=e.length;p<g;p++){const d=e[p];if(!d.matcher(f))continue;const m=t.getRule(d.ruleId),{ruleScanner:b,findOptions:v}=ou(m,t,null,s,r===i),S=b.findNextMatchSync(n,r,v);if(!S)continue;const C=S.captureIndices[0].start;if(!(C>=l)&&(l=C,a=S.captureIndices,c=S.ruleId,u=d.priority,l===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function ou(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function cm(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function gs(e,t,n,s,r,o,i){if(o.length===0)return;const l=t.content,a=Math.min(o.length,i.length),c=[],u=i[0].end;for(let f=0;f<a;f++){const p=o[f];if(p===null)continue;const g=i[f];if(g.length===0)continue;if(g.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=g.start;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?r.produceFromScopes(c[c.length-1].scopes,g.start):r.produce(s,g.start),p.retokenizeCapturedWithRuleId){const m=p.getName(l,i),b=s.contentNameScopesList.pushAttributed(m,e),v=p.getContentName(l,i),S=b.pushAttributed(v,e),C=s.push(p.retokenizeCapturedWithRuleId,g.start,-1,!1,null,b,S),T=e.createOnigString(l.substring(0,g.end));ru(e,T,n&&g.start===0,g.start,C,r,!1,0),Qc(T);continue}const d=p.getName(l,i);if(d!==null){const b=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(d,e);c.push(new um(b,g.end))}}for(;c.length>0;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var um=class{constructor(e,t){$(this,"scopes");$(this,"endPos");this.scopes=e,this.endPos=t}};function fm(e,t,n,s,r,o,i,l){return new hm(e,t,n,s,r,o,i,l)}function ql(e,t,n,s,r){const o=xr(t,$r),i=nu.getCompiledRuleId(n,s,r.repository);for(const l of o)e.push({debugSelector:t,matcher:l.matcher,ruleId:i,grammar:r,priority:l.priority})}function $r(e,t){if(t.length<e.length)return!1;let n=0;return e.every(s=>{for(let r=n;r<t.length;r++)if(dm(t[r],s))return n=r+1,!0;return!1})}function dm(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var hm=class{constructor(e,t,n,s,r,o,i,l){$(this,"_rootId");$(this,"_lastRuleId");$(this,"_ruleId2desc");$(this,"_includedGrammars");$(this,"_grammarRepository");$(this,"_grammar");$(this,"_injections");$(this,"_basicScopeAttributesProvider");$(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new sm(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=Vl(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const a of Object.keys(r)){const c=xr(a,$r);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},t=[],n=this._rootScopeName,s=e.lookup(n);if(s){const r=s.injections;if(r)for(let i in r)ql(t,i,r[i],this,s);const o=this._grammarRepository.injections(n);o&&o.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&ql(t,a,l,this,l)}})}return t.sort((r,o)=>r.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Vl(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){this._rootId===-1&&(this._rootId=nu.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!t||t===Zo.NULL){r=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),f=ns.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),p=this.getRule(this._rootId).getName(null,null);let g;p?g=Ss.createRootAndLookUpScopeName(p,f,this):g=Ss.createRoot("unknown",f),t=new Zo(null,this._rootId,-1,-1,!1,null,g,g)}else r=!1,t.reset();e=e+`
|
|
75
|
+
`;const o=this.createOnigString(e),i=o.content.length,l=new gm(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=ru(this,o,r,0,t,l,!0,s);return Qc(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Vl(e,t){return e=Lg(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ss=class Wt{constructor(t,n,s){this.parent=t,this.scopePath=n,this.tokenAttributes=s}static fromExtension(t,n){let s=t,r=(t==null?void 0:t.scopePath)??null;for(const o of n)r=yo.push(r,o.scopeNames),s=new Wt(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new Wt(null,new yo(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new yo(null,t),i=s.themeProvider.themeMatch(o),l=Wt.mergeAttributes(n,r,i);return new Wt(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Wt.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,s){let r=-1,o=0,i=0;return s!==null&&(r=s.fontStyle,o=s.foregroundId,i=s.backgroundId),ns.set(t,n.languageId,n.tokenType,null,r,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Wt._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=Wt._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),i=s.themeProvider.themeMatch(o),l=Wt.mergeAttributes(t.tokenAttributes,r,i);return new Wt(t,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var r;const n=[];let s=this;for(;s&&s!==t;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(((r=s.parent)==null?void 0:r.scopePath)??null)}),s=s.parent;return s===t?n.reverse():void 0}},Pt,Zo=(Pt=class{constructor(t,n,s,r,o,i,l,a){$(this,"_stackElementBrand");$(this,"_enterPos");$(this,"_anchorPos");$(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(t){return t===null?!1:Pt._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ss.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Pt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,l){return new Pt(this,t,n,s,r,o,i,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var s,r;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(s=this.nameScopesList)==null?void 0:s.toString()}, ${(r=this.contentNameScopesList)==null?void 0:r.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Pt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,s;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((s=this.contentNameScopesList)==null?void 0:s.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const s=Ss.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Pt(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,Ss.fromExtension(s,n.contentNameScopesList))}},$(Pt,"NULL",new Pt(null,0,0,0,!1,null,null,null)),Pt),pm=class{constructor(e,t){$(this,"balancedBracketScopes");$(this,"unbalancedBracketScopes");$(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):xr(n,$r).map(s=>s.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>xr(n,$r).map(s=>s.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},gm=class{constructor(e,t,n,s){$(this,"_emitBinaryTokens");$(this,"_lineText");$(this,"_tokens");$(this,"_binaryTokens");$(this,"_lastTokenEndIndex");$(this,"_tokenTypeOverrides");this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var s;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((s=this.balancedBracketSelectors)!=null&&s.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=(e==null?void 0:e.getScopeNames())??[];for(const l of this._tokenTypeOverrides)l.matcher(i)&&(r=ns.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=ns.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},mm=class{constructor(e,t){$(this,"_grammars",new Map);$(this,"_rawGrammars",new Map);$(this,"_injectionGrammars",new Map);$(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,fm(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},vm=class{constructor(t){$(this,"_options");$(this,"_syncRegistry");$(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new mm(Sr.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Sr.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,s){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(t,n,s){return this._loadGrammar(t,n,s.embeddedLanguages,s.tokenTypes,new pm(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,s,r,o){const i=new qg(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(t,n,s,r,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const s=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(t,n=[],s=0,r=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,s,r)}_grammarForScopeName(t,n=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,s,r,o)}},Yo=Zo.NULL;const ym=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Fs{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Fs.prototype.normal={};Fs.prototype.property={};Fs.prototype.space=void 0;function iu(e,t){const n={},s={};for(const r of e)Object.assign(n,r.property),Object.assign(s,r.normal);return new Fs(n,s,t)}function Jo(e){return e.toLowerCase()}class _t{constructor(t,n){this.attribute=n,this.property=t}}_t.prototype.attribute="";_t.prototype.booleanish=!1;_t.prototype.boolean=!1;_t.prototype.commaOrSpaceSeparated=!1;_t.prototype.commaSeparated=!1;_t.prototype.defined=!1;_t.prototype.mustUseProperty=!1;_t.prototype.number=!1;_t.prototype.overloadedBoolean=!1;_t.prototype.property="";_t.prototype.spaceSeparated=!1;_t.prototype.space=void 0;let bm=0;const ge=Un(),qe=Un(),Xo=Un(),j=Un(),Ne=Un(),Bn=Un(),xt=Un();function Un(){return 2**++bm}const Qo=Object.freeze(Object.defineProperty({__proto__:null,boolean:ge,booleanish:qe,commaOrSpaceSeparated:xt,commaSeparated:Bn,number:j,overloadedBoolean:Xo,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),ko=Object.keys(Qo);class Mi extends _t{constructor(t,n,s,r){let o=-1;if(super(t,n),Kl(this,"space",r),typeof s=="number")for(;++o<ko.length;){const i=ko[o];Kl(this,ko[o],(s&Qo[i])===Qo[i])}}}Mi.prototype.defined=!0;function Kl(e,t,n){n&&(e[t]=n)}function ss(e){const t={},n={};for(const[s,r]of Object.entries(e.properties)){const o=new Mi(s,e.transform(e.attributes||{},s),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Jo(s)]=s,n[Jo(o.attribute)]=s}return new Fs(t,n,e.space)}const lu=ss({properties:{ariaActiveDescendant:null,ariaAtomic:qe,ariaAutoComplete:null,ariaBusy:qe,ariaChecked:qe,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:qe,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:qe,ariaFlowTo:Ne,ariaGrabbed:qe,ariaHasPopup:null,ariaHidden:qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:j,ariaLive:null,ariaModal:qe,ariaMultiLine:qe,ariaMultiSelectable:qe,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:qe,ariaReadOnly:qe,ariaRelevant:null,ariaRequired:qe,ariaRoleDescription:Ne,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:qe,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function au(e,t){return t in e?e[t]:t}function cu(e,t){return au(e,t.toLowerCase())}const km=ss({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Bn,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:ge,allowPaymentRequest:ge,allowUserMedia:ge,alpha:ge,alt:null,as:null,async:ge,autoCapitalize:null,autoComplete:Ne,autoFocus:ge,autoPlay:ge,blocking:Ne,capture:null,charSet:null,checked:ge,cite:null,className:Ne,closedBy:null,colorSpace:null,cols:j,colSpan:j,command:null,commandFor:null,content:null,contentEditable:qe,controls:ge,controlsList:Ne,coords:j|Bn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ge,defer:ge,dir:null,dirName:null,disabled:ge,download:Xo,draggable:qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ge,formTarget:null,headers:Ne,height:j,hidden:Xo,high:j,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:ge,inputMode:null,integrity:null,is:null,isMap:ge,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:ge,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ge,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ge,muted:ge,name:null,nonce:null,noModule:ge,noValidate:ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ge,optimum:j,pattern:null,ping:Ne,placeholder:null,playsInline:ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ge,referrerPolicy:null,rel:Ne,required:ge,reversed:ge,rows:j,rowSpan:j,sandbox:Ne,scope:null,scoped:ge,seamless:ge,selected:ge,shadowRootClonable:ge,shadowRootCustomElementRegistry:ge,shadowRootDelegatesFocus:ge,shadowRootMode:null,shadowRootSerializable:ge,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ge,useMap:null,value:qe,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ge,declare:ge,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ge,noHref:ge,noShade:ge,noWrap:ge,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:qe,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ge,disablePictureInPicture:ge,disableRemotePlayback:ge,exportParts:Bn,part:Ne,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:cu}),wm=ss({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:xt,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:Ne,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Bn,g2:Bn,glyphName:Bn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:j,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xt,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:au}),uu=ss({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fu=ss({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cu}),du=ss({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_m=/[A-Z]/g,Zl=/-[a-z]/g,Sm=/^data[-\w.:]+$/i;function xm(e,t){const n=Jo(t);let s=t,r=_t;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Sm.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Zl,Tm);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Zl.test(o)){let i=o.replace(_m,Cm);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}r=Mi}return new r(s,t)}function Cm(e){return"-"+e.toLowerCase()}function Tm(e){return e.charAt(1).toUpperCase()}const $m=iu([lu,km,uu,fu,du],"html"),hu=iu([lu,wm,uu,fu,du],"svg"),Yl={}.hasOwnProperty;function Rm(e,t){const n=t||{};function s(r,...o){let i=s.invalid;const l=s.handlers;if(r&&Yl.call(r,e)){const a=String(r[e]);i=Yl.call(l,a)?l[a]:s.unknown}if(i)return i.call(this,r,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}const Am=/["&'<>`]/g,Em=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Im=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Lm=/[|\\{}()[\]^$+*?.]/g,Jl=new WeakMap;function Pm(e,t){if(e=e.replace(t.subset?Mm(t.subset):Am,s),t.subset||t.escapeOnly)return e;return e.replace(Em,n).replace(Im,s);function n(r,o,i){return t.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),t)}function s(r,o,i){return t.format(r.charCodeAt(0),i.charCodeAt(o+1),t)}}function Mm(e){let t=Jl.get(e);return t||(t=Nm(e),Jl.set(e,t)),t}function Nm(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Lm,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Om=/[\dA-Fa-f]/;function Dm(e,t,n){const s="&#x"+e.toString(16).toUpperCase();return n&&t&&!Om.test(String.fromCharCode(t))?s:s+";"}const Bm=/\d/;function Gm(e,t,n){const s="&#"+String(e);return n&&t&&!Bm.test(String.fromCharCode(t))?s:s+";"}const jm=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],wo={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},zm=["cent","copy","divide","gt","lt","not","para","times"],pu={}.hasOwnProperty,ei={};let Qs;for(Qs in wo)pu.call(wo,Qs)&&(ei[wo[Qs]]=Qs);const Um=/[^\dA-Za-z]/;function Fm(e,t,n,s){const r=String.fromCharCode(e);if(pu.call(ei,r)){const o=ei[r],i="&"+o;return n&&jm.includes(o)&&!zm.includes(o)&&(!s||t&&t!==61&&Um.test(String.fromCharCode(t)))?i:i+";"}return""}function Hm(e,t,n){let s=Dm(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=Fm(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=Gm(e,t,n.omitOptionalSemicolons);o.length<s.length&&(s=o)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function Qn(e,t){return Pm(e,Object.assign({format:Hm},t))}const Wm=/^>|^->|<!--|-->|--!>|<!-$/g,qm=[">"],Vm=["<",">"];function Km(e,t,n,s){return s.settings.bogusComments?"<?"+Qn(e.value,Object.assign({},s.settings.characterReferences,{subset:qm}))+">":"<!--"+e.value.replace(Wm,r)+"-->";function r(o){return Qn(o,Object.assign({},s.settings.characterReferences,{subset:Vm}))}}function Zm(e,t,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function Xl(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,r=n.indexOf(t);for(;r!==-1;)s++,r=n.indexOf(t,r+t.length);return s}function Ym(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Jm(e){return e.join(" ").trim()}const Xm=/[ \t\n\f\r]/g;function Ni(e){return typeof e=="object"?e.type==="text"?Ql(e.value):!1:Ql(e)}function Ql(e){return e.replace(Xm,"")===""}const Ye=mu(1),gu=mu(-1),Qm=[];function mu(e){return t;function t(n,s,r){const o=n?n.children:Qm;let i=(s||0)+e,l=o[i];if(!r)for(;l&&Ni(l);)i+=e,l=o[i];return l}}const ev={}.hasOwnProperty;function vu(e){return t;function t(n,s,r){return ev.call(e,n.tagName)&&e[n.tagName](n,s,r)}}const Oi=vu({body:nv,caption:_o,colgroup:_o,dd:iv,dt:ov,head:_o,html:tv,li:rv,optgroup:lv,option:av,p:sv,rp:ea,rt:ea,tbody:uv,td:ta,tfoot:fv,th:ta,thead:cv,tr:dv});function _o(e,t,n){const s=Ye(n,t,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&Ni(s.value.charAt(0)))}function tv(e,t,n){const s=Ye(n,t);return!s||s.type!=="comment"}function nv(e,t,n){const s=Ye(n,t);return!s||s.type!=="comment"}function sv(e,t,n){const s=Ye(n,t);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function rv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&s.tagName==="li"}function ov(e,t,n){const s=Ye(n,t);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function iv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function ea(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function lv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&s.tagName==="optgroup"}function av(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function cv(e,t,n){const s=Ye(n,t);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function uv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function fv(e,t,n){return!Ye(n,t)}function dv(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&s.tagName==="tr"}function ta(e,t,n){const s=Ye(n,t);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const hv=vu({body:mv,colgroup:vv,head:gv,html:pv,tbody:yv});function pv(e){const t=Ye(e,-1);return!t||t.type!=="comment"}function gv(e){const t=new Set;for(const s of e.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(t.has(s.tagName))return!1;t.add(s.tagName)}const n=e.children[0];return!n||n.type==="element"}function mv(e){const t=Ye(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Ni(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function vv(e,t,n){const s=gu(n,t),r=Ye(e,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&Oi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function yv(e,t,n){const s=gu(n,t),r=Ye(e,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&Oi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const er={name:[[`
|
|
76
|
+
\f\r &/=>`.split(""),`
|
|
77
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
78
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
79
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
80
|
+
\f\r &>`.split(""),`\0
|
|
81
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
82
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
83
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function bv(e,t,n,s){const r=s.schema,o=r.space==="svg"?!1:s.settings.omitOptionalTags;let i=r.space==="svg"?s.settings.closeEmptyElements:s.settings.voids.includes(e.tagName.toLowerCase());const l=[];let a;r.space==="html"&&e.tagName==="svg"&&(s.schema=hu);const c=kv(s,e.properties),u=s.all(r.space==="html"&&e.tagName==="template"?e.content:e);return s.schema=r,u&&(i=!1),(c||!o||!hv(e,t,n))&&(l.push("<",e.tagName,c?" "+c:""),i&&(r.space==="svg"||s.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!s.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!i&&(!o||!Oi(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function kv(e,t){const n=[];let s=-1,r;if(t){for(r in t)if(t[r]!==null&&t[r]!==void 0){const o=wv(e,r,t[r]);o&&n.push(o)}}for(;++s<n.length;){const o=e.settings.tightAttributes?n[s].charAt(n[s].length-1):void 0;s!==n.length-1&&o!=='"'&&o!=="'"&&(n[s]+=" ")}return n.join("")}function wv(e,t,n){const s=xm(e.schema,t),r=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let i=e.quote,l;if(s.overloadedBoolean&&(n===s.attribute||n==="")?n=!0:(s.boolean||s.overloadedBoolean)&&(typeof n!="string"||n===s.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=Qn(s.attribute,Object.assign({},e.settings.characterReferences,{subset:er.name[r][o]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?Ym:Jm)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(l=Qn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:er.unquoted[r][o]}))),l!==n&&(e.settings.quoteSmart&&Xl(n,i)>Xl(n,e.alternative)&&(i=e.alternative),l=i+Qn(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?er.single:er.double)[r][o],attribute:!0}))+i),a+(l&&"="+l))}const _v=["<","&"];function yu(e,t,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Qn(e.value,Object.assign({},s.settings.characterReferences,{subset:_v}))}function Sv(e,t,n,s){return s.settings.allowDangerousHtml?e.value:yu(e,t,n,s)}function xv(e,t,n,s){return s.all(e)}const Cv=Rm("type",{invalid:Tv,unknown:$v,handlers:{comment:Km,doctype:Zm,element:bv,raw:Sv,root:xv,text:yu}});function Tv(e){throw new Error("Expected node, not `"+e+"`")}function $v(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Rv={},Av={},Ev=[];function Iv(e,t){const n=t||Rv,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:Lv,all:Pv,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ym,characterReferences:n.characterReferences||Av,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?hu:$m,quote:s,alternative:r}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Lv(e,t,n){return Cv(e,t,n,this)}function Pv(e){const t=[],n=e&&e.children||Ev;let s=-1;for(;++s<n.length;)t[s]=this.one(n[s],s,e);return t.join("")}function Rr(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},s=typeof e=="string"?e:e.name;for(const[r,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[r]=o:r===s&&Object.assign(n,o);return n}function wn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function Mv(e){return Array.isArray(e)?e:[e]}async function bu(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Di(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Nv(e){return e==="ansi"||Di(e)}function Bi(e){return e==="none"}function Ov(e){return Bi(e)}function ku(e,t){var s;if(!t)return e;e.properties||(e.properties={}),(s=e.properties).class||(s.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function Xr(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let i=0;i<n.length;i+=2){const l=t?n[i]+(n[i+1]||""):n[i];r.push([l,s]),s+=n[i].length,s+=((o=n[i+1])==null?void 0:o.length)||0}return r}function Dv(e){const t=Xr(e,!0).map(([r])=>r);function n(r){if(r===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=r,i=0;for(const l of t){if(o<l.length)break;o-=l.length,i++}return{line:i,character:o}}function s(r,o){let i=0;for(let l=0;l<r;l++)i+=t[l].length;return i+=o,i}return{lines:t,indexToPos:n,posToIndex:s}}const Gi="light-dark()",Bv=["color","background-color"];function Gv(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function jv(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((s,r)=>s-r);return n.length?e.map(s=>s.flatMap(r=>{const o=n.filter(i=>r.offset<i&&i<r.offset+r.content.length).map(i=>i-r.offset).sort((i,l)=>i-l);return o.length?Gv(r,o):r})):e}function zv(e,t,n,s,r="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(u=>Ar(e.variants[u])),l=new Set(i.flatMap(u=>Object.keys(u))),a={},c=(u,f)=>{const p=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+t[u]+(f==="color"?"":p)};return i.forEach((u,f)=>{for(const p of l){const g=u[p]||"inherit";if(f===0&&s&&Bv.includes(p))if(s===Gi&&i.length>1){const d=t.findIndex(S=>S==="light"),m=t.findIndex(S=>S==="dark");if(d===-1||m===-1)throw new Xe('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=i[d][p]||"inherit",v=i[m][p]||"inherit";a[p]=`light-dark(${b}, ${v})`,r==="css-vars"&&(a[c(f,p)]=g)}else a[p]=g;else r==="css-vars"&&(a[c(f,p)]=g)}}),o.htmlStyle=a,o}function Ar(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&ut.Italic&&(t["font-style"]="italic"),e.fontStyle&ut.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&ut.Underline&&n.push("underline"),e.fontStyle&ut.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function ti(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const wu=new WeakMap;function Qr(e,t){wu.set(e,t)}function Os(e){return wu.get(e)}class rs{constructor(...t){$(this,"_stacks",{});$(this,"lang");if(t.length===2){const[n,s]=t;this.lang=s,this._stacks=n}else{const[n,s,r]=t;this.lang=s,this._stacks={[r]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new rs(Object.fromEntries(Mv(n).map(s=>[s,Yo])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Uv(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Uv(e){const t=[],n=new Set;function s(r){var i;if(n.has(r))return;n.add(r);const o=(i=r==null?void 0:r.nameScopesList)==null?void 0:i.scopeName;o&&t.push(o),r.parent&&s(r.parent)}return s(e),t}function Fv(e,t){if(!(e instanceof rs))throw new Xe("Invalid grammar state");return e.getInternalStack(t)}function Hv(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let s=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new Xe(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...r.indexToPos(i),offset:i}}else{const l=r.lines[i.line];if(l===void 0)throw new Xe(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${r.lines.length}`);let a=i.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new Xe(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${l.length}`);return{...i,character:a,offset:r.posToIndex(i.line,a)}}};const r=Dv(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));Wv(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var i;if(!((i=this.options.decorations)!=null&&i.length))return;const r=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return jv(n,r)},code(n){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const s=t(this),r=Array.from(n.children).filter(f=>f.type==="element"&&f.tagName==="span");if(r.length!==s.converter.lines.length)throw new Xe(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(f,p,g,d){const m=r[f];let b="",v=-1,S=-1;if(p===0&&(v=0),g===0&&(S=0),g===Number.POSITIVE_INFINITY&&(S=m.children.length),v===-1||S===-1)for(let T=0;T<m.children.length;T++)b+=_u(m.children[T]),v===-1&&b.length===p&&(v=T+1),S===-1&&b.length===g&&(S=T+1);if(v===-1)throw new Xe(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);if(S===-1)throw new Xe(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);const C=m.children.slice(v,S);if(!d.alwaysWrap&&C.length===m.children.length)l(m,d,"line");else if(!d.alwaysWrap&&C.length===1&&C[0].type==="element")l(C[0],d,"token");else{const T={type:"element",tagName:"span",properties:{},children:C};l(T,d,"wrapper"),m.children.splice(v,C.length,T)}}function i(f,p){r[f]=l(r[f],p,"line")}function l(f,p,g){var b;const d=p.properties||{},m=p.transform||(v=>v);return f.tagName=p.tagName||"span",f.properties={...f.properties,...d,class:f.properties.class},(b=p.properties)!=null&&b.class&&ku(f,p.properties.class),f=m(f,g)||f,f}const a=[],c=s.decorations.sort((f,p)=>p.start.offset-f.start.offset||f.end.offset-p.end.offset);for(const f of c){const{start:p,end:g}=f;if(p.line===g.line)o(p.line,p.character,g.character,f);else if(p.line<g.line){o(p.line,p.character,Number.POSITIVE_INFINITY,f);for(let d=p.line+1;d<g.line;d++)a.unshift(()=>i(d,f));o(g.line,0,g.character,f)}}a.forEach(f=>f())}}}function Wv(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Xe(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let s=t+1;s<e.length;s++){const r=e[s],o=n.start.offset<=r.start.offset&&r.start.offset<n.end.offset,i=n.start.offset<r.end.offset&&r.end.offset<=n.end.offset,l=r.start.offset<=n.start.offset&&n.start.offset<r.end.offset,a=r.start.offset<n.end.offset&&n.end.offset<=r.end.offset;if(o||i||l||a){if(o&&i||l&&a||l&&n.start.offset===n.end.offset||i&&r.start.offset===r.end.offset)continue;throw new Xe(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function _u(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(_u).join(""):""}const qv=[Hv()];function Er(e){const t=Vv(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...qv]}function Vv(e){const t=[],n=[],s=[];for(const r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:s.push(r)}return{pre:t,post:n,normal:s}}var Mn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],So={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Kv(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const s=e.indexOf("m",n);if(s!==-1)return{sequence:e.substring(n+2,s).split(";"),startPosition:n,position:s+1}}return{position:e.length}}function na(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(s=>Number.parseInt(s));return n.length!==3||n.some(s=>Number.isNaN(s))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function Zv(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(s===0)t.push({type:"resetAll"});else if(s<=9)So[s]&&t.push({type:"setDecoration",value:So[s]});else if(s<=29){const r=So[s-20];r&&(t.push({type:"resetDecoration",value:r}),r==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Mn[s-30]}});else if(s===38){const r=na(e);r&&t.push({type:"setForegroundColor",value:r})}else if(s===39)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Mn[s-40]}});else if(s===48){const r=na(e);r&&t.push({type:"setBackgroundColor",value:r})}else s===49?t.push({type:"resetBackgroundColor"}):s===53?t.push({type:"setDecoration",value:"overline"}):s===55?t.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Mn[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Mn[s-100+8]}})}return t}function Yv(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let o=0;do{const i=Kv(s,o),l=i.sequence?s.substring(o,i.startPosition):s.substring(o);if(l.length>0&&r.push({value:l,foreground:e,background:t,decorations:new Set(n)}),i.sequence){const a=Zv(i.sequence);for(const c of a)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}o=i.position}while(o<s.length);return r}}}var Jv={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Xv(e=Jv){function t(l){return e[l]}function n(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let s;function r(){if(s)return s;s=[];for(let c=0;c<Mn.length;c++)s.push(t(Mn[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let f=0;f<6;f++)s.push(n([l[c],l[u],l[f]]));let a=8;for(let c=0;c<24;c++,a+=10)s.push(n([a,a,a]));return s}function o(l){return r()[l]}function i(l){switch(l.type){case"named":return t(l.name);case"rgb":return n(l.rgb);case"table":return o(l.index)}}return{value:i}}const Qv={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function ey(e,t,n){const s=Rr(e,n),r=Xr(t),o=Object.fromEntries(Mn.map(a=>{var f;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=(f=e.colors)==null?void 0:f[c];return[a,u||Qv[a]]})),i=Xv(o),l=Yv();return r.map(a=>l.parse(a[0]).map(c=>{let u,f;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,f=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,f=c.background?i.value(c.background):void 0),u=wn(u,s),f=wn(f,s),c.decorations.has("dim")&&(u=ty(u));let p=ut.None;return c.decorations.has("bold")&&(p|=ut.Bold),c.decorations.has("italic")&&(p|=ut.Italic),c.decorations.has("underline")&&(p|=ut.Underline),c.decorations.has("strikethrough")&&(p|=ut.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:f,fontStyle:p}}))}function ty(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const s=t[1];if(s.length===8){const r=Math.round(Number.parseInt(s.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${s.slice(0,6)}${r}`}else{if(s.length===6)return`#${s}80`;if(s.length===4){const r=s[0],o=s[1],i=s[2],l=s[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${r}${r}${o}${o}${i}${i}${a}`}else if(s.length===3){const r=s[0],o=s[1],i=s[2];return`#${r}${r}${o}${o}${i}${i}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function ji(e,t,n={}){const{theme:s=e.getLoadedThemes()[0]}=n,r=e.resolveLangAlias(n.lang||"text");if(Di(r)||Bi(s))return Xr(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:i}=e.setTheme(s);if(r==="ansi")return ey(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new Xe(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Xe(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return sy(t,l,o,i,n)}function ny(...e){if(e.length===2)return Os(e[1]);const[t,n,s={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=s;if(Di(r)||Bi(o))throw new Xe("Plain language does not have grammar state");if(r==="ansi")throw new Xe("ANSI language does not have grammar state");const{theme:i,colorMap:l}=t.setTheme(o),a=t.getLanguage(r);return new rs(zi(n,a,i,l,s).stateStack,a.name,i.name)}function sy(e,t,n,s,r){const o=zi(e,t,n,s,r),i=new rs(o.stateStack,t.name,n.name);return Qr(o.tokens,i),o.tokens}function zi(e,t,n,s,r){const o=Rr(n,r),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500}=r,a=Xr(e);let c=r.grammarState?Fv(r.grammarState,n.name)??Yo:r.grammarContextCode!=null?zi(r.grammarContextCode,t,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Yo,u=[];const f=[];for(let p=0,g=a.length;p<g;p++){const[d,m]=a[p];if(d===""){u=[],f.push([]);continue}if(i>0&&d.length>=i){u=[],f.push([{content:d,offset:m,color:"",fontStyle:0}]);continue}let b,v,S;r.includeExplanation&&(b=t.tokenizeLine(d,c,l),v=b.tokens,S=0);const C=t.tokenizeLine2(d,c,l),T=C.tokens.length/2;for(let K=0;K<T;K++){const Q=C.tokens[2*K],G=K+1<T?C.tokens[2*K+2]:d.length;if(Q===G)continue;const de=C.tokens[2*K+1],F=wn(s[ns.getForeground(de)],o),te=ns.getFontStyle(de),pe={content:d.substring(Q,G),offset:m+Q,color:F,fontStyle:te};if(r.includeExplanation){const D=[];if(r.includeExplanation!=="scopeName")for(const I of n.settings){let R;switch(typeof I.scope){case"string":R=I.scope.split(/,/).map(Z=>Z.trim());break;case"object":R=I.scope;break;default:continue}D.push({settings:I,selectors:R.map(Z=>Z.split(/ /))})}pe.explanation=[];let he=0;for(;Q+he<G;){const I=v[S],R=d.substring(I.startIndex,I.endIndex);he+=R.length,pe.explanation.push({content:R,scopes:r.includeExplanation==="scopeName"?ry(I.scopes):oy(D,I.scopes)}),S+=1}}u.push(pe)}f.push(u),u=[],c=C.ruleStack}return{tokens:f,stateStack:c}}function ry(e){return e.map(t=>({scopeName:t}))}function oy(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]={scopeName:o,themeMatches:ly(e,o,t.slice(0,s))}}return n}function sa(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function iy(e,t,n){if(!sa(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)sa(e[s],n[r])&&(s-=1),r-=1;return s===-1}function ly(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const i of r)if(iy(i,t,n)){s.push(o);break}return s}function Su(e,t,n){const s=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),r=s.map(a=>{const c=ji(e,t,{...n,theme:a.theme}),u=Os(c),f=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:f}}),o=ay(...r.map(a=>a.tokens)),i=o[0].map((a,c)=>a.map((u,f)=>{const p={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(p.explanation=u.explanation),o.forEach((g,d)=>{const{content:m,explanation:b,offset:v,...S}=g[c][f];p.variants[s[d].color]=S}),p})),l=r[0].state?new rs(Object.fromEntries(r.map(a=>{var c;return[a.theme,(c=a.state)==null?void 0:c.getInternalStack(a.theme)]})),r[0].state.lang):void 0;return l&&Qr(i,l),i}function ay(...e){const t=e.map(()=>[]),n=e.length;for(let s=0;s<e[0].length;s++){const r=e.map(a=>a[s]),o=t.map(()=>[]);t.forEach((a,c)=>a.push(o[c]));const i=r.map(()=>0),l=r.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),i[c]+=1,l[c]=r[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return t}function Ir(e,t,n){let s,r,o,i,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,p=Object.entries(n.themes).filter(v=>v[1]).map(v=>({color:v[0],theme:v[1]})).sort((v,S)=>v.color===c?-1:S.color===c?1:0);if(p.length===0)throw new Xe("`themes` option must not be empty");const g=Su(e,t,n);if(a=Os(g),c&&Gi!==c&&!p.find(v=>v.color===c))throw new Xe(`\`themes\` option must contain the defaultColor key \`${c}\``);const d=p.map(v=>e.getTheme(v.theme)),m=p.map(v=>v.color);o=g.map(v=>v.map(S=>zv(S,m,u,c,f))),a&&Qr(o,a);const b=p.map(v=>Rr(v.theme,n));r=ra(p,d,b,u,c,"fg",f),s=ra(p,d,b,u,c,"bg",f),i=`shiki-themes ${d.map(v=>v.name).join(" ")}`,l=c?void 0:[r,s].join(";")}else if("theme"in n){const c=Rr(n.theme,n);o=ji(e,t,n);const u=e.getTheme(n.theme);s=wn(u.bg,c),r=wn(u.fg,c),i=u.name,a=Os(o)}else throw new Xe("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:s,themeName:i,rootStyle:l,grammarState:a}}function ra(e,t,n,s,r,o,i){return e.map((l,a)=>{const c=wn(t[a][o],n[a])||"inherit",u=`${s+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&r){if(r===Gi&&e.length>1){const f=e.findIndex(m=>m.color==="light"),p=e.findIndex(m=>m.color==="dark");if(f===-1||p===-1)throw new Xe('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=wn(t[f][o],n[f])||"inherit",d=wn(t[p][o],n[p])||"inherit";return`light-dark(${g}, ${d});${u}`}return c}return i==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Lr(e,t,n,s={meta:{},options:n,codeToHast:(r,o)=>Lr(e,r,o),codeToTokens:(r,o)=>Ir(e,r,o)}){var d,m;let r=t;for(const b of Er(n))r=((d=b.preprocess)==null?void 0:d.call(s,r,n))||r;let{tokens:o,fg:i,bg:l,themeName:a,rootStyle:c,grammarState:u}=Ir(e,r,n);const{mergeWhitespaces:f=!0,mergeSameStyleTokens:p=!1}=n;f===!0?o=uy(o):f==="never"&&(o=fy(o)),p&&(o=dy(o));const g={...s,get source(){return r}};for(const b of Er(n))o=((m=b.tokens)==null?void 0:m.call(g,o))||o;return cy(o,{...n,fg:i,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},g,u)}function cy(e,t,n,s=Os(e)){var m,b,v,S;const r=Er(t),o=[],i={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[C,T]of Object.entries(t.meta||{}))C.startsWith("_")||(c[C]=T);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},f={type:"element",tagName:"code",properties:{},children:o};const p=[],g={...n,structure:l,addClassToHast:ku,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return f},get lines(){return p}};if(e.forEach((C,T)=>{var G,de;T&&(l==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
|
|
84
|
+
`}));let K={type:"element",tagName:"span",properties:{class:"line"},children:[]},Q=0;for(const F of C){let te={type:"element",tagName:"span",properties:{...F.htmlAttrs},children:[{type:"text",value:F.content}]};const pe=ti(F.htmlStyle||Ar(F));pe&&(te.properties.style=pe);for(const D of r)te=((G=D==null?void 0:D.span)==null?void 0:G.call(g,te,T+1,Q,K,F))||te;l==="inline"?i.children.push(te):l==="classic"&&K.children.push(te),Q+=F.content.length}if(l==="classic"){for(const F of r)K=((de=F==null?void 0:F.line)==null?void 0:de.call(g,K,T+1))||K;p.push(K),o.push(K)}else l==="inline"&&p.push(K)}),l==="classic"){for(const C of r)f=((m=C==null?void 0:C.code)==null?void 0:m.call(g,f))||f;u.children.push(f);for(const C of r)u=((b=C==null?void 0:C.pre)==null?void 0:b.call(g,u))||u;i.children.push(u)}else if(l==="inline"){const C=[];let T={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const G of i.children)G.type==="element"&&G.tagName==="br"?(C.push(T),T={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(G.type==="element"||G.type==="text")&&T.children.push(G);C.push(T);let Q={type:"element",tagName:"code",properties:{},children:C};for(const G of r)Q=((v=G==null?void 0:G.code)==null?void 0:v.call(g,Q))||Q;i.children=[];for(let G=0;G<Q.children.length;G++){G>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const de=Q.children[G];de.type==="element"&&i.children.push(...de.children)}}let d=i;for(const C of r)d=((S=C==null?void 0:C.root)==null?void 0:S.call(g,d))||d;return s&&Qr(d,s),d}function uy(e){return e.map(t=>{const n=[];let s="",r;return t.forEach((o,i)=>{const a=!(o.fontStyle&&(o.fontStyle&ut.Underline||o.fontStyle&ut.Strikethrough));a&&o.content.match(/^\s+$/)&&t[i+1]?(r===void 0&&(r=o.offset),s+=o.content):s?(a?n.push({...o,offset:r,content:s+o.content}):n.push({content:s,offset:r},o),r=void 0,s=""):n.push(o)}),n})}function fy(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const s=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!s)return n;const[,r,o,i]=s;if(!r&&!i)return n;const l=[{...n,offset:n.offset+r.length,content:o}];return r&&l.unshift({content:r,offset:n.offset}),i&&l.push({content:i,offset:n.offset+r.length+o.length}),l}))}function dy(e){return e.map(t=>{const n=[];for(const s of t){if(n.length===0){n.push({...s});continue}const r=n[n.length-1],o=ti(r.htmlStyle||Ar(r)),i=ti(s.htmlStyle||Ar(s)),l=r.fontStyle&&(r.fontStyle&ut.Underline||r.fontStyle&ut.Strikethrough),a=s.fontStyle&&(s.fontStyle&ut.Underline||s.fontStyle&ut.Strikethrough);!l&&!a&&o===i?r.content+=s.content:n.push({...s})}return n})}const hy=Iv;function py(e,t,n){var o;const s={meta:{},options:n,codeToHast:(i,l)=>Lr(e,i,l),codeToTokens:(i,l)=>Ir(e,i,l)};let r=hy(Lr(e,t,n,s));for(const i of Er(n))r=((o=i.postprocess)==null?void 0:o.call(s,r,n))||r;return r}const oa={light:"#333333",dark:"#bbbbbb"},ia={light:"#fffffe",dark:"#1e1e1e"},la="__shiki_resolved";function Ui(e){var l,a,c,u,f;if(e!=null&&e[la])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:s}=t;if(!n||!s){const p=t.settings?t.settings.find(g=>!g.name&&!g.scope):void 0;(l=p==null?void 0:p.settings)!=null&&l.foreground&&(s=p.settings.foreground),(a=p==null?void 0:p.settings)!=null&&a.background&&(n=p.settings.background),!s&&((c=t==null?void 0:t.colors)!=null&&c["editor.foreground"])&&(s=t.colors["editor.foreground"]),!n&&((u=t==null?void 0:t.colors)!=null&&u["editor.background"])&&(n=t.colors["editor.background"]),s||(s=t.type==="light"?oa.light:oa.dark),n||(n=t.type==="light"?ia.light:ia.dark),t.fg=s,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0;const o=new Map;function i(p){var d;if(o.has(p))return o.get(p);r+=1;const g=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(d=t.colorReplacements)!=null&&d[`#${g}`]?i(p):(o.set(p,g),g)}t.settings=t.settings.map(p=>{var b,v;const g=((b=p.settings)==null?void 0:b.foreground)&&!p.settings.foreground.startsWith("#"),d=((v=p.settings)==null?void 0:v.background)&&!p.settings.background.startsWith("#");if(!g&&!d)return p;const m={...p,settings:{...p.settings}};if(g){const S=i(p.settings.foreground);t.colorReplacements[S]=p.settings.foreground,m.settings.foreground=S}if(d){const S=i(p.settings.background);t.colorReplacements[S]=p.settings.background,m.settings.background=S}return m});for(const p of Object.keys(t.colors||{}))if((p==="editor.foreground"||p==="editor.background"||p.startsWith("terminal.ansi"))&&!((f=t.colors[p])!=null&&f.startsWith("#"))){const g=i(t.colors[p]);t.colorReplacements[g]=t.colors[p],t.colors[p]=g}return Object.defineProperty(t,la,{enumerable:!1,writable:!1,value:!0}),t}async function xu(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Nv(t)).map(async t=>await bu(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Cu(e){return(await Promise.all(e.map(async n=>Ov(n)?null:Ui(await bu(n))))).filter(n=>!!n)}let gy=3;function my(e,t=3){t>gy||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Wn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Tu(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Wn(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class vy extends vm{constructor(n,s,r,o={}){super(n);$(this,"_resolvedThemes",new Map);$(this,"_resolvedGrammars",new Map);$(this,"_langMap",new Map);$(this,"_langGraph",new Map);$(this,"_textmateThemeCache",new WeakMap);$(this,"_loadedThemesCache",null);$(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=s,this._langs=r,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const s=Ui(n);return s.name&&(this._resolvedThemes.set(s.name,s),this._loadedThemesCache=null),s}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let s=this._textmateThemeCache.get(n);s||(s=Sr.createFromRawTheme(n),this._textmateThemeCache.set(n,s)),this._syncRegistry.setTheme(s)}getGrammar(n){return n=Tu(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var i,l,a,c;if(this.getGrammar(n.name))return;const s=new Set([...this._langMap.values()].filter(u=>{var f;return(f=u.embeddedLangsLazy)==null?void 0:f.includes(n.name)}));this._resolver.addLanguage(n);const r={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,r);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(u=>{this._alias[u]=n.name}),this._loadedLanguagesCache=null,s.size)for(const u of s)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(l=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||l.delete(u.scopeName),(c=(a=this._syncRegistry)==null?void 0:a._grammars)==null||c.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const s=Array.from(this._langGraph.entries()),r=s.filter(([o,i])=>!i);if(r.length){const o=s.filter(([i,l])=>{if(!l)return!1;const a=l.embeddedLanguages||l.embeddedLangs;return a==null?void 0:a.some(c=>r.map(([u])=>u).includes(c))}).filter(i=>!r.includes(i));throw new Wn(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of s)this._resolver.addLanguage(i);for(const[o,i]of s)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const s=n.embeddedLanguages??n.embeddedLangs;if(s)for(const r of s)this._langGraph.set(r,this._langMap.get(r))}}class yy{constructor(t,n){$(this,"_langs",new Map);$(this,"_scopeToLang",new Map);$(this,"_injections",new Map);$(this,"_onigLib");this._onigLib={createOnigScanner:s=>t.createScanner(s),createOnigString:s=>t.createString(s)},n.forEach(s=>this.addLanguage(s))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let s=[];for(let r=1;r<=n.length;r++){const o=n.slice(0,r).join(".");s=[...s,...this._injections.get(o)||[]]}return s}}let fs=0;function by(e){fs+=1,e.warnings!==!1&&fs>=10&&fs%10===0&&console.warn(`[Shiki] ${fs} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Wn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(Ui),r=new yy(e.engine,n),o=new vy(r,s,n,e.langAlias);let i;function l(C){return Tu(C,e.langAlias)}function a(C){v();const T=o.getGrammar(typeof C=="string"?C:C.name);if(!T)throw new Wn(`Language \`${C}\` not found, you may need to load it first`);return T}function c(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};v();const T=o.getTheme(C);if(!T)throw new Wn(`Theme \`${C}\` not found, you may need to load it first`);return T}function u(C){v();const T=c(C);i!==C&&(o.setTheme(T),i=C);const K=o.getColorMap();return{theme:T,colorMap:K}}function f(){return v(),o.getLoadedThemes()}function p(){return v(),o.getLoadedLanguages()}function g(...C){v(),o.loadLanguages(C.flat(1))}async function d(...C){return g(await xu(C))}function m(...C){v();for(const T of C.flat(1))o.loadTheme(T)}async function b(...C){return v(),m(await Cu(C))}function v(){if(t)throw new Wn("Shiki instance has been disposed")}function S(){t||(t=!0,o.dispose(),fs-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:f,getLoadedLanguages:p,resolveLangAlias:l,loadLanguage:d,loadLanguageSync:g,loadTheme:b,loadThemeSync:m,dispose:S,[Symbol.dispose]:S}}async function ky(e){e.engine||my("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([Cu(e.themes||[]),xu(e.langs||[]),e.engine]);return by({...e,themes:t,langs:n,engine:s})}async function wy(e){const t=await ky(e);return{getLastGrammarState:(...n)=>ny(t,...n),codeToTokensBase:(n,s)=>ji(t,n,s),codeToTokensWithThemes:(n,s)=>Su(t,n,s),codeToTokens:(n,s)=>Ir(t,n,s),codeToHast:(n,s)=>Lr(t,n,s),codeToHtml:(n,s)=>py(t,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}class Fi extends Error{constructor(t){super(t),this.name="ShikiError"}}function _y(){return 2147483648}function Sy(){return typeof performance<"u"?performance.now():Date.now()}const xy=(e,t)=>e+(t-e%t)%t;async function Cy(e){let t,n;const s={};function r(g){n=g,s.HEAPU8=new Uint8Array(g),s.HEAPU32=new Uint32Array(g)}function o(g,d,m){s.HEAPU8.copyWithin(g,d,d+m)}function i(g){try{return t.grow(g-n.byteLength+65535>>>16),r(t.buffer),1}catch{}}function l(g){const d=s.HEAPU8.length;g=g>>>0;const m=_y();if(g>m)return!1;for(let b=1;b<=4;b*=2){let v=d*(1+.2/b);v=Math.min(v,g+100663296);const S=Math.min(m,xy(Math.max(g,v),65536));if(i(S))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(g,d,m=1024){const b=d+m;let v=d;for(;g[v]&&!(v>=b);)++v;if(v-d>16&&g.buffer&&a)return a.decode(g.subarray(d,v));let S="";for(;d<v;){let C=g[d++];if(!(C&128)){S+=String.fromCharCode(C);continue}const T=g[d++]&63;if((C&224)===192){S+=String.fromCharCode((C&31)<<6|T);continue}const K=g[d++]&63;if((C&240)===224?C=(C&15)<<12|T<<6|K:C=(C&7)<<18|T<<12|K<<6|g[d++]&63,C<65536)S+=String.fromCharCode(C);else{const Q=C-65536;S+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}}return S}function u(g,d){return g?c(s.HEAPU8,g,d):""}const f={emscripten_get_now:Sy,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function p(){const d=await e({env:f,wasi_snapshot_preview1:f});t=d.memory,r(t.buffer),Object.assign(s,d),s.UTF8ToString=u}return await p(),s}var Ty=Object.defineProperty,$y=(e,t,n)=>t in e?Ty(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ze=(e,t,n)=>$y(e,typeof t!="symbol"?t+"":t,n);let Je=null;function Ry(e){throw new Fi(e.UTF8ToString(e.getLastOnigError()))}class eo{constructor(t){Ze(this,"utf16Length"),Ze(this,"utf8Length"),Ze(this,"utf16Value"),Ze(this,"utf8Value"),Ze(this,"utf16OffsetToUtf8"),Ze(this,"utf8OffsetToUtf16");const n=t.length,s=eo._utf8ByteLength(t),r=s!==n,o=r?new Uint32Array(n+1):null;r&&(o[n]=s);const i=r?new Uint32Array(s+1):null;r&&(i[s]=n);const l=new Uint8Array(s);let a=0;for(let c=0;c<n;c++){const u=t.charCodeAt(c);let f=u,p=!1;if(u>=55296&&u<=56319&&c+1<n){const g=t.charCodeAt(c+1);g>=56320&&g<=57343&&(f=(u-55296<<10)+65536|g-56320,p=!0)}r&&(o[c]=a,p&&(o[c+1]=a),f<=127?i[a+0]=c:f<=2047?(i[a+0]=c,i[a+1]=c):f<=65535?(i[a+0]=c,i[a+1]=c,i[a+2]=c):(i[a+0]=c,i[a+1]=c,i[a+2]=c,i[a+3]=c)),f<=127?l[a++]=f:f<=2047?(l[a++]=192|(f&1984)>>>6,l[a++]=128|(f&63)>>>0):f<=65535?(l[a++]=224|(f&61440)>>>12,l[a++]=128|(f&4032)>>>6,l[a++]=128|(f&63)>>>0):(l[a++]=240|(f&1835008)>>>18,l[a++]=128|(f&258048)>>>12,l[a++]=128|(f&4032)>>>6,l[a++]=128|(f&63)>>>0),p&&c++}this.utf16Length=n,this.utf8Length=s,this.utf16Value=t,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let s=0,r=t.length;s<r;s++){const o=t.charCodeAt(s);let i=o,l=!1;if(o>=55296&&o<=56319&&s+1<r){const a=t.charCodeAt(s+1);a>=56320&&a<=57343&&(i=(o-55296<<10)+65536|a-56320,l=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,l&&s++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const to=class qt{constructor(t){if(Ze(this,"id",++qt.LAST_ID),Ze(this,"_onigBinding"),Ze(this,"content"),Ze(this,"utf16Length"),Ze(this,"utf8Length"),Ze(this,"utf16OffsetToUtf8"),Ze(this,"utf8OffsetToUtf16"),Ze(this,"ptr"),!Je)throw new Fi("Must invoke loadWasm first.");this._onigBinding=Je,this.content=t;const n=new eo(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!qt._sharedPtrInUse?(qt._sharedPtr||(qt._sharedPtr=Je.omalloc(1e4)),qt._sharedPtrInUse=!0,Je.HEAPU8.set(n.utf8Value,qt._sharedPtr),this.ptr=qt._sharedPtr):this.ptr=n.createString(Je)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===qt._sharedPtr?qt._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ze(to,"LAST_ID",0);Ze(to,"_sharedPtr",0);Ze(to,"_sharedPtrInUse",!1);let $u=to;class Ay{constructor(t){if(Ze(this,"_onigBinding"),Ze(this,"_ptr"),!Je)throw new Fi("Must invoke loadWasm first.");const n=[],s=[];for(let l=0,a=t.length;l<a;l++){const c=new eo(t[l]);n[l]=c.createString(Je),s[l]=c.utf8Length}const r=Je.omalloc(4*t.length);Je.HEAPU32.set(n,r/4);const o=Je.omalloc(4*t.length);Je.HEAPU32.set(s,o/4);const i=Je.createOnigScanner(r,o,t.length);for(let l=0,a=t.length;l<a;l++)Je.ofree(n[l]);Je.ofree(o),Je.ofree(r),i===0&&Ry(Je),this._onigBinding=Je,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,s){let r=0;if(typeof s=="number"&&(r=s),typeof t=="string"){t=new $u(t);const o=this._findNextMatchSync(t,n,!1,r);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,r)}_findNextMatchSync(t,n,s,r){const o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),r);if(i===0)return null;const l=o.HEAPU32;let a=i/4;const c=l[a++],u=l[a++],f=[];for(let p=0;p<u;p++){const g=t.convertUtf8OffsetToUtf16(l[a++]),d=t.convertUtf8OffsetToUtf16(l[a++]);f[p]={start:g,end:d,length:d-g}}return{index:c,captureIndices:f}}}function Ey(e){return typeof e.instantiator=="function"}function Iy(e){return typeof e.default=="function"}function Ly(e){return typeof e.data<"u"}function Py(e){return typeof Response<"u"&&e instanceof Response}function My(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let tr;function Ny(e){if(tr)return tr;async function t(){Je=await Cy(async n=>{let s=e;return s=await s,typeof s=="function"&&(s=await s(n)),typeof s=="function"&&(s=await s(n)),Ey(s)?s=await s.instantiator(n):Iy(s)?s=await s.default(n):(Ly(s)&&(s=s.data),Py(s)?typeof WebAssembly.instantiateStreaming=="function"?s=await Oy(s)(n):s=await Dy(s)(n):My(s)?s=await xo(s)(n):s instanceof WebAssembly.Module?s=await xo(s)(n):"default"in s&&s.default instanceof WebAssembly.Module&&(s=await xo(s.default)(n))),"instance"in s&&(s=s.instance),"exports"in s&&(s=s.exports),s})}return tr=t(),tr}function xo(e){return t=>WebAssembly.instantiate(e,t)}function Oy(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Dy(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function By(e){return e&&await Ny(e),{createScanner(t){return new Ay(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new $u(t)}}}const Gy={class:"code-block"},jy={class:"code-header"},zy={class:"code-lang"},Uy=["innerHTML"],Fy=xe({__name:"CodeBlock",props:{code:{},lang:{}},setup(e){const t=e,n=Nt("effectiveTheme",H("dark")),s=H(""),r=H(!1);let o=null;const i=new Set,l=new Map,a={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",shscript:"bash","shell-script":"bash",yml:"yaml",md:"markdown",rs:"rust",rb:"ruby",go:"go",java:"java",c:"c",cpp:"cpp","c++":"cpp",cs:"csharp","c#":"csharp",kt:"kotlin",kts:"kotlin",scala:"scala",swift:"swift",dart:"dart",lua:"lua",r:"r",sql:"sql",toml:"toml",ini:"ini",xml:"xml",svelte:"svelte",astro:"astro",dockerfile:"docker",makefile:"make",graphql:"graphql",proto:"protobuf",pl:"perl",pm:"perl"};async function c(){if(o)return o;const[m,b]=await Promise.all([Js(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url),Js(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url)]);return o=await wy({themes:[m.default,b.default],langs:[],engine:By(()=>Js(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))}),o}async function u(m){if(i.has(m))return!0;if(l.has(m))return await l.get(m),i.has(m);const b=(async()=>{try{const v=await c(),S=await Js(()=>import(`shiki/langs/${m}.mjs`),[],import.meta.url);await v.loadLanguage(S.default),i.add(m)}catch{}})();return l.set(m,b),await b,l.delete(m),i.has(m)}function f(m){const b=m.toLowerCase();return a[b]??b}async function p(){var S;const m=((S=t.lang)==null?void 0:S.toLowerCase())??"text",b=f(m),v=n.value==="light"?"github-light":"github-dark";try{const C=await c();await u(b)?s.value=C.codeToHtml(t.code,{lang:b,theme:v}):s.value=`<pre class="shiki-fallback"><code>${g(t.code)}</code></pre>`}catch{s.value=`<pre class="shiki-fallback"><code>${g(t.code)}</code></pre>`}}function g(m){return m.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}function d(){navigator.clipboard.writeText(t.code).then(()=>{r.value=!0,setTimeout(()=>r.value=!1,1500)})}return je(()=>[t.code,t.lang,n.value],()=>p(),{immediate:!0}),(m,b)=>(k(),_("div",Gy,[h("div",jy,[h("span",zy,E(e.lang||"text"),1),h("button",{class:"code-copy",onClick:d},E(r.value?"已复制":"复制"),1)]),h("div",{class:"code-content",innerHTML:s.value},null,8,Uy)]))}}),Hy=Ce(Fy,[["__scopeId","data-v-c1bb01df"]]);Re.setOptions({gfm:!0,breaks:!1});const Wy=xe({props:{content:{type:String,required:!0}},setup(e){const t=X(()=>{const n=qy(e.content);return Re.lexer(n).flatMap(r=>ni(r))});return()=>$e("div",{class:"markdown-body"},t.value)}});function qy(e){const t=/^(`{3,})/gm;let n=null,s=-1,r=0,o;for(;(o=t.exec(e))!==null;){const i=o[1];n===null?(n=i,s=o.index,r=i.length):i.length>=r&&(n=null)}return n!==null?e.substring(0,s).trimEnd():e}function ni(e){switch(e.type){case"paragraph":return[$e("p",{class:"md-p"},cn(e.tokens))];case"heading":return[$e(`h${e.depth}`,{class:`md-h${e.depth}`},cn(e.tokens))];case"code":return[$e(Hy,{code:e.text,lang:e.lang??"text"})];case"blockquote":return[$e("blockquote",{class:"md-blockquote"},e.tokens.flatMap(t=>ni(t)))];case"list":{const t=e.items.map(n=>{const s=[];return n.task&&s.push($e("input",{type:"checkbox",checked:n.checked,disabled:!0,class:"md-checkbox"})),s.push(...n.tokens.flatMap(r=>ni(r))),$e("li",{class:["md-li",n.task?"md-task":""]},s)});return[$e(e.ordered?"ol":"ul",{class:e.ordered?"md-ol":"md-ul"},t)]}case"hr":return[$e("hr",{class:"md-hr"})];case"space":return[];case"html":return[$e("div",{class:"md-html",innerHTML:e.text})];case"table":return[$e("div",{class:"md-table-wrap",style:"overflow-x:auto"},[Vy(e)])];case"br":return[$e("br")];case"text":return[$e("span",{class:"md-text"},e.tokens?cn(e.tokens):e.text)];case"def":return[];default:return[$e("p",{class:"md-p"},e.raw??"")]}}function Vy(e){const t=e,n=(t.header??[]).map((r,o)=>{var l;const i=(l=t.align)==null?void 0:l[o];return $e("th",{class:"md-th",style:i?`text-align:${i}`:""},r.tokens?cn(r.tokens):String(r.text??""))}),s=(t.rows??[]).map(r=>$e("tr",{},r.map((o,i)=>{var a;const l=(a=t.align)==null?void 0:a[i];return $e("td",{class:"md-td",style:l?`text-align:${l}`:""},o.tokens?cn(o.tokens):String(o.text??""))})));return $e("table",{class:"md-table"},[$e("thead",{},[$e("tr",{},n)]),$e("tbody",{},s)])}function cn(e){return e.map(t=>{switch(t.type){case"text":return t.text;case"codespan":return $e("code",{class:"md-code"},t.text);case"strong":return $e("strong",{class:"md-strong"},cn(t.tokens));case"em":return $e("em",{class:"md-em"},cn(t.tokens));case"del":return $e("del",{class:"md-del"},cn(t.tokens));case"link":{const n=t.href;return n&&!/^(https?:|mailto:|#|\/)/i.test(n)?t.raw??"":$e("a",{class:"md-a",href:n,target:"_blank",rel:"noopener"},cn(t.tokens))}case"image":return $e("img",{class:"md-img",src:t.href,alt:t.text??"",loading:"lazy"});case"br":return $e("br");case"html":return $e("span",{innerHTML:t.text});case"escape":return t.text;default:return t.raw??""}})}const Ky=Ce(Wy,[["__scopeId","data-v-ab83c5f2"]]),Zy=new Set(["edit","str_replace","replace","write","multi_edit","create_file","edit_file","apply_patch"]);function Yy(e){return Zy.has(e.toLowerCase())}function aa(e){return e.suspended?"suspended":e.isError?"error":e.output===void 0?"running":"ok"}function Jy(e){return e.some(t=>aa(t)==="running")?"running":e.some(t=>aa(t)==="error")?"error":"ok"}const Xy=["onKeydown"],Qy={class:"tool-name"},eb=["title"],tb={class:"tool-collapse-inner"},nb={class:"tool-body"},sb={key:0,class:"tool-args"},rb={key:1,class:"tool-result"},ob={key:2,class:"tool-running-hint"},ib=xe({__name:"GenericToolCard",props:{tool:{}},setup(e){const t=e,n=X(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=X(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=H(!1);let o=!1;je(n,u=>{o||(r.value=u==="running")},{immediate:!0});function i(){o=!0,r.value=!r.value}const l=X(()=>{const u=t.tool.args;if(!u||typeof u!="object")return u===void 0?"":String(u);const f=[];for(const[p,g]of Object.entries(u)){let d;if(typeof g=="string")d=g.length>40?`${g.slice(0,40)}…`:g;else{try{d=JSON.stringify(g)}catch{d=String(g)}d.length>40&&(d=`${d.slice(0,40)}…`)}if(f.push(`${p}=${d}`),f.length>=3)break}return f.join(" ")});function a(){if(!t.tool.args)return"";try{return JSON.stringify(t.tool.args,null,2)}catch{return String(t.tool.args)}}function c(u){return u??""}return(u,f)=>(k(),_("div",{class:we(["tool-card",`is-${n.value}`])},[h("div",{class:"tool-header",role:"button",tabindex:"0",onClick:i,onKeydown:Is(zt(i,["prevent"]),["enter"])},[h("span",{class:we(["status-dot",n.value])},[s.value?(k(),_(re,{key:0},[Le(E(s.value),1)],64)):V("",!0)],2),h("span",Qy,E(e.tool.name),1),l.value?(k(),_("span",{key:0,class:"tool-params",title:l.value},E(l.value),9,eb)):V("",!0),h("span",{class:we(["tool-chevron",{open:r.value}])},"▸",2)],40,Xy),h("div",{class:we(["tool-collapse",{open:r.value}])},[h("div",tb,[h("div",nb,[a()?(k(),_("pre",sb,[h("code",null,E(a()),1)])):V("",!0),e.tool.output!==void 0?(k(),_("pre",rb,[h("code",null,E(c(e.tool.output)||"(无输出)"),1)])):(k(),_("div",ob,"执行中…"))])])],2)],2))}}),lb=Ce(ib,[["__scopeId","data-v-5d0f42c5"]]),ab=500;function cb(e,t){const n=e.length,s=t.length,r=Array.from({length:n+1},()=>new Array(s+1).fill(0));for(let o=1;o<=n;o++)for(let i=1;i<=s;i++)r[o][i]=e[o-1]===t[i-1]?r[o-1][i-1]+1:Math.max(r[o-1][i],r[o][i-1]);return r}function ub(e,t,n,s,r){const o=[];for(;s>0||r>0;)s>0&&r>0&&t[s-1]===n[r-1]?(o.unshift({type:"context",text:t[s-1],oldNo:s,newNo:r}),s--,r--):r>0&&(s===0||e[s][r-1]>=e[s-1][r])?(o.unshift({type:"add",text:n[r-1],newNo:r}),r--):(o.unshift({type:"del",text:t[s-1],oldNo:s}),s--);return o}function fb(e,t){const n=e.split(`
|
|
85
|
+
`),s=t.split(`
|
|
86
|
+
`);if(n.length+s.length>ab){const o=[];return n.forEach((i,l)=>o.push({type:"del",text:i,oldNo:l+1})),s.forEach((i,l)=>o.push({type:"add",text:i,newNo:l+1})),o}const r=cb(n,s);return ub(r,n,s,n.length,s.length)}function db(e){let t=0,n=0;for(const s of e)s.type==="add"?t++:s.type==="del"&&n++;return{added:t,removed:n}}const hb=["old_string","oldString","old_str","old_text","oldText","old","search"],pb=["new_string","newString","new_str","new_text","newText","new","replace","content"],gb=["path","file_path","filePath","file","filename"];function Co(e,t){for(const n of t){const s=e[n];if(typeof s=="string"&&s.length>0)return s}}function mb(e){if(!e||typeof e!="object")return null;const t=e,n=Co(t,gb),s=Co(t,hb),r=Co(t,pb);if(!r&&!s)return null;const o=fb(s??"",r??""),i=db(o);return{path:n,diff:o,stats:i}}const vb={class:"diff-lines"},yb={class:"dl-gutter old"},bb={class:"dl-gutter new"},kb={class:"dl-sign"},wb={class:"dl-text"},_b=xe({__name:"DiffLines",props:{lines:{}},setup(e){return(t,n)=>(k(),_("div",vb,[(k(!0),_(re,null,Ve(e.lines,(s,r)=>(k(),_("div",{key:r,class:we(["dl",`dl-${s.type}`])},[h("span",yb,E(s.oldNo??""),1),h("span",bb,E(s.newNo??""),1),h("span",kb,E(s.type==="add"?"+":s.type==="del"?"−":" "),1),h("span",wb,E(s.text),1)],2))),128))]))}}),Sb=Ce(_b,[["__scopeId","data-v-147edc06"]]),xb=["onKeydown"],Cb={class:"tool-name"},Tb=["title"],$b={key:1,class:"diff-chip"},Rb={class:"tool-collapse-inner"},Ab={class:"tool-body"},Eb={key:1,class:"tool-result"},Ib={key:2,class:"tool-running-hint"},Lb=xe({__name:"EditToolCard",props:{tool:{}},setup(e){const t=e,n=X(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=X(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=X(()=>mb(t.tool.args)),o=X(()=>{const p=r.value;if(!p||n.value==="error")return"";const{added:g,removed:d}=p.stats;return!g&&!d?"":`+${g} −${d}`}),i=X(()=>{var p;return(p=r.value)==null?void 0:p.path}),l=H(!1);let a=!1;je(n,p=>{a||(l.value=p==="running")},{immediate:!0});function c(){a=!0,l.value=!l.value}const u=X(()=>{var p;return((p=r.value)==null?void 0:p.diff)??[]}),f=X(()=>u.value.length>0);return(p,g)=>(k(),_("div",{class:we(["tool-card",`is-${n.value}`,"edit-tool-card"])},[h("div",{class:"tool-header",role:"button",tabindex:"0",onClick:c,onKeydown:Is(zt(c,["prevent"]),["enter"])},[h("span",{class:we(["status-dot",n.value])},[s.value?(k(),_(re,{key:0},[Le(E(s.value),1)],64)):V("",!0)],2),h("span",Cb,E(e.tool.name),1),i.value?(k(),_("span",{key:0,class:"tool-filepath",title:i.value},E(i.value),9,Tb)):V("",!0),o.value?(k(),_("span",$b,E(o.value),1)):V("",!0),h("span",{class:we(["tool-chevron",{open:l.value}])},"▸",2)],40,xb),h("div",{class:we(["tool-collapse",{open:l.value}])},[h("div",Rb,[h("div",Ab,[f.value?(k(),ze(Sb,{key:0,lines:u.value},null,8,["lines"])):V("",!0),e.tool.output!==void 0?(k(),_("pre",Eb,[h("code",null,E(e.tool.output||"(无输出)"),1)])):(k(),_("div",Ib,"执行中…"))])])],2)],2))}}),Pb=Ce(Lb,[["__scopeId","data-v-95ab1624"]]),Mb=["aria-expanded"],Nb={class:"process-copy"},Ob=["title"],Db={class:"count"},Bb={class:"process-collapse"},Gb={class:"process-inner"},jb=xe({__name:"ToolGroup",props:{name:{},tools:{}},setup(e){const t=e,n=H(!1),s=H(!1),r=X(()=>Jy(t.tools)),o=X(()=>t.tools.filter(l=>l.output!==void 0&&!l.isError).length);je(r,l=>{!s.value&&l==="running"&&(n.value=!0)},{immediate:!0});function i(){s.value=!0,n.value=!n.value}return(l,a)=>(k(),_("section",{class:we(["tool-process",{open:n.value,error:r.value==="error"}])},[h("button",{class:"process-head",type:"button","aria-expanded":n.value,onClick:i},[h("span",{class:we(["process-icon",r.value])},[W(me,{name:r.value==="ok"?"check":"terminal",size:18},null,8,["name"])],2),h("span",Nb,[a[0]||(a[0]=h("strong",null,"工具调用过程",-1)),h("small",null,E(r.value==="running"?"正在执行":r.value==="error"?"包含失败调用":`已完成 ${o.value} 项`),1)]),h("span",{class:"tool-names",title:e.tools.map(c=>c.name).join("、")},E(e.tools.map(c=>c.name).join(" · ")),9,Ob),h("span",Db,E(e.tools.length),1),W(me,{name:"chevron-down",size:17,class:"chevron"})],8,Mb),h("div",Bb,[h("div",Gb,[(k(!0),_(re,null,Ve(e.tools,c=>(k(),ze(Vf(J(Yy)(c.name)?Pb:lb),{key:c.toolCallId,tool:c},null,8,["tool"]))),128))])])],2))}}),zb=Ce(jb,[["__scopeId","data-v-a044c3b3"]]),Ub={class:"thinking-block"},Fb={class:"teaser-text"},Hb={key:1,class:"thinking-stream"},Wb={class:"thinking-panel",role:"dialog","aria-label":"思考过程"},qb={class:"panel-body"},Vb=xe({__name:"ThinkingBlock",props:{tool:{},active:{type:Boolean,default:!1}},setup(e){const t=e,n=H(!1),s=H(null),r=X(()=>t.tool.output??""),o=X(()=>r.value.split(/\n+/).map(c=>c.trim()).filter(Boolean).at(-1)??"");je(r,()=>{t.active&&Lt(()=>{const a=s.value;a&&(a.scrollTop=a.scrollHeight)})});function i(){n.value=!0}function l(){n.value=!1}return(a,c)=>(k(),_("div",Ub,[e.active?(k(),_("div",Hb,[c[2]||(c[2]=h("div",{class:"stream-header"},[h("span",{class:"stream-icon"},"💭"),h("span",{class:"stream-title"},"思考中…"),h("span",{class:"stream-dot"})],-1)),h("div",{ref_key:"streamRef",ref:s,class:"stream-body"},E(r.value),513)])):(k(),_("button",{key:0,class:"thinking-teaser",title:"点击查看完整思考过程",onClick:i},[c[0]||(c[0]=h("span",{class:"teaser-icon"},"💭",-1)),h("span",Fb,E(o.value||"思考过程"),1),c[1]||(c[1]=h("span",{class:"teaser-open"},"展开",-1))])),(k(),ze(gi,{to:"body"},[n.value?(k(),_("div",{key:0,class:"thinking-overlay",onClick:zt(l,["self"])},[h("aside",Wb,[h("header",{class:"panel-header"},[c[3]||(c[3]=h("span",null,"💭 思考过程",-1)),h("button",{class:"panel-close","aria-label":"关闭",onClick:l},"✕")]),h("div",qb,E(r.value||"(空)"),1)])])):V("",!0)]))]))}}),Kb=Ce(Vb,[["__scopeId","data-v-890e0460"]]),Zb={key:0,class:"user-wrap"},Yb={class:"user-bubble"},Jb={class:"message-meta user-meta"},Xb={key:0},Qb={key:1,class:"assistant-wrap"},e1={key:0,class:"assistant-brand"},t1={class:"assistant-avatar"},n1={key:0},s1={class:"assistant-body"},r1={key:3,class:"streaming-cursor","aria-label":"正在生成"},o1={key:4,class:"message-meta"},i1=["title"],l1=xe({__name:"MessageItem",props:{message:{},isLatestUser:{type:Boolean,default:!1},idle:{type:Boolean,default:!0},streaming:{type:Boolean,default:!1}},emits:["edit"],setup(e,{emit:t}){const n=e,s=t,r=H(!1);let o=null;const i=X(()=>n.message.role==="user"),l=X(()=>n.message.role==="assistant"),a=X(()=>n.message.tools.filter(m=>m.name==="thinking")),c=X(()=>n.message.tools.filter(m=>m.name!=="thinking")),u=X(()=>n.message.ts?new Date(n.message.ts).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):""),f=X(()=>i.value&&n.isLatestUser&&n.idle),p=Nt("showThinking",H(!0)),g=Nt("showTools",H(!0));async function d(){try{await navigator.clipboard.writeText(n.message.content)}catch{const m=document.createElement("textarea");m.value=n.message.content,document.body.append(m),m.select(),document.execCommand("copy"),m.remove()}r.value=!0,o!==null&&clearTimeout(o),o=window.setTimeout(()=>{r.value=!1},1500)}return(m,b)=>(k(),_("article",{class:we(["message",e.message.role,{error:e.message.isError}])},[i.value?(k(),_("div",Zb,[h("div",Yb,E(e.message.content),1),h("div",Jb,[u.value?(k(),_("span",Xb,E(u.value),1)):V("",!0),f.value?(k(),_("button",{key:1,title:"编辑并重新发送",onClick:b[0]||(b[0]=v=>s("edit",e.message.content))},[W(me,{name:"edit",size:14}),b[3]||(b[3]=Le("编辑重发",-1))])):V("",!0)])])):(k(),_("div",Qb,[l.value?(k(),_("div",e1,[h("span",t1,[h("img",{src:Si,alt:"",draggable:"false",onError:b[1]||(b[1]=v=>v.target.style.visibility="hidden"),onLoad:b[2]||(b[2]=v=>v.target.style.visibility="visible"),style:{visibility:"hidden"}},null,32)]),h("div",null,[b[4]||(b[4]=h("strong",null,"Scream Code",-1)),h("span",null,[h("i",{class:we({streaming:e.streaming})},null,2),Le(E(e.streaming?"正在生成回复":"Agent 回复"),1)])]),u.value?(k(),_("time",n1,E(u.value),1)):V("",!0)])):V("",!0),h("div",s1,[J(p)?(k(!0),_(re,{key:0},Ve(a.value,v=>(k(),ze(Kb,{key:v.toolCallId,tool:v,active:e.streaming},null,8,["tool","active"]))),128)):V("",!0),c.value.length&&J(g)?(k(),ze(zb,{key:1,name:"工具调用过程",tools:c.value},null,8,["tools"])):V("",!0),e.message.content?(k(),ze(Ky,{key:2,class:"assistant-content",content:e.message.content},null,8,["content"])):e.streaming?(k(),_("span",r1)):V("",!0),e.message.content?(k(),_("div",o1,[h("button",{title:r.value?"已复制":"复制内容",onClick:d},[W(me,{name:r.value?"check":"copy",size:14},null,8,["name"]),Le(E(r.value?"已复制":"复制"),1)],8,i1)])):V("",!0)])]))],2))}}),a1=Ce(l1,[["__scopeId","data-v-0268f952"]]),c1={class:"empty-state"},u1={class:"suggestions"},f1=["onClick"],d1={class:"suggestion-icon"},h1={class:"suggestion-title"},p1=["title"],g1={class:"workdir-path"},m1=xe({__name:"EmptyState",props:{workDir:{default:null}},emits:["pick"],setup(e,{emit:t}){const n=t,s=[{icon:"edit",title:"帮我写一个函数",prompt:"帮我写一个函数"},{icon:"clipboard",title:"解释这段代码",prompt:"解释这段代码"},{icon:"activity",title:"调试这个问题",prompt:"调试这个问题"}];return(r,o)=>(k(),_("div",c1,[o[1]||(o[1]=h("div",{class:"empty-logo"},[h("img",{src:Si,alt:"Scream",class:"logo-img"})],-1)),o[2]||(o[2]=h("h1",{class:"empty-title"},"Scream Web UI",-1)),o[3]||(o[3]=h("p",{class:"empty-subtitle"},"给 Scream 发消息,开始处理你的任务",-1)),h("div",u1,[(k(),_(re,null,Ve(s,i=>h("button",{key:i.title,class:"suggestion-card",onClick:l=>n("pick",i.prompt)},[h("span",d1,[W(me,{name:i.icon,size:22},null,8,["name"])]),h("span",h1,E(i.title),1)],8,f1)),64))]),e.workDir?(k(),_("div",{key:0,class:"empty-workdir",title:e.workDir},[o[0]||(o[0]=h("span",{class:"workdir-label"},"工作目录",-1)),h("span",g1,E(e.workDir),1)],8,p1)):V("",!0)]))}}),v1=Ce(m1,[["__scopeId","data-v-e4fea2d2"]]),y1={class:"message-list-wrapper"},b1={key:1,class:"message-skeleton","aria-hidden":"true"},k1=xe({__name:"MessageList",props:{messages:{},busy:{type:Boolean,default:!1},workDir:{default:null}},emits:["edit","pick"],setup(e,{emit:t}){const n=e,s=t,r=H(null),o=X(()=>{for(let m=n.messages.length-1;m>=0;m--)if(n.messages[m].role==="user")return n.messages[m].id;return null}),i=X(()=>{var m;return((m=n.messages.at(-1))==null?void 0:m.id)??null}),l=X(()=>{var v;const m=n.messages.at(-1);if(!m)return 0;let b=m.content.length;for(const S of m.tools)b+=((v=S.output)==null?void 0:v.length)??0;return b});let a=!1;const c=H(!1);function u(){const m=r.value;return m?m.scrollHeight-m.scrollTop-m.clientHeight<80:!0}function f(m){Lt(()=>{const b=r.value;b&&b.scrollTo({top:b.scrollHeight,behavior:m})})}function p(){c.value=!u()}je(()=>[n.messages.length,l.value],([m],[b])=>{if(m!==b){a=!0,c.value=!1,f("smooth");return}!a&&!u()||f("auto")}),je(()=>n.busy,m=>{m||(a=!1)});function g(){a=!0,c.value=!1,f("smooth")}const d=X(()=>!n.busy||n.messages.length===0?!1:n.messages.at(-1).role==="user");return Jt(()=>{var m;(m=r.value)==null||m.addEventListener("scroll",p,{passive:!0})}),Hr(()=>{var m;(m=r.value)==null||m.removeEventListener("scroll",p)}),(m,b)=>(k(),_("div",y1,[h("div",{ref_key:"listRef",ref:r,class:"message-list"},[e.messages.length===0?(k(),ze(v1,{key:0,"work-dir":e.workDir,onPick:b[0]||(b[0]=v=>s("pick",v))},null,8,["work-dir"])):V("",!0),(k(!0),_(re,null,Ve(e.messages,v=>(k(),ze(a1,{key:v.id,message:v,"is-latest-user":v.id===o.value,idle:!e.busy,streaming:e.busy&&v.id===i.value&&v.role==="assistant",onEdit:b[1]||(b[1]=S=>s("edit",S))},null,8,["message","is-latest-user","idle","streaming"]))),128)),d.value?(k(),_("div",b1,[...b[2]||(b[2]=[Sd('<div class="sk-avatar" data-v-4c7d81fb></div><div class="sk-body" data-v-4c7d81fb><div class="sk-line sk-w-60" data-v-4c7d81fb></div><div class="sk-line sk-w-90" data-v-4c7d81fb></div><div class="sk-line sk-w-40" data-v-4c7d81fb></div></div>',2)])])):V("",!0)],512),W(wi,{name:"scroll-btn"},{default:Qe(()=>[c.value?(k(),_("button",{key:0,class:"scroll-to-bottom",title:"滚动到最新消息",onClick:g},[W(me,{name:"chevron-down",size:18})])):V("",!0)]),_:1})]))}}),w1=Ce(k1,[["__scopeId","data-v-4c7d81fb"]]),_1={class:"model-picker-root"},S1={class:"picker-list"},x1={key:0,class:"picker-empty"},C1={class:"picker-group-title"},T1=["onClick"],$1={class:"row-main"},R1={class:"row-name"},A1={class:"row-alias"},E1={class:"row-meta"},I1={key:0,class:"row-check"},L1={class:"picker-thinking"},P1={class:"thinking-options"},M1=["onClick"],N1=xe({__name:"ModelPicker",props:{models:{},currentModel:{},currentThinking:{}},emits:["apply-model","apply-thinking","close"],setup(e,{emit:t}){const n=e,s=t,r=["off","low","medium","high"],o={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},i=H(""),l=H(null);Jt(()=>{var v;(v=l.value)==null||v.focus()});const a=X(()=>{const v=i.value.trim().toLowerCase();return v?n.models.filter(S=>S.alias.toLowerCase().includes(v)||S.provider.toLowerCase().includes(v)||(S.displayName??"").toLowerCase().includes(v)):n.models}),c=X(()=>{const v=new Map;for(const S of a.value){const C=v.get(S.provider)??[];C.push(S),v.set(S.provider,C)}return[...v.entries()].map(([S,C])=>({provider:S,models:C}))}),u=X(()=>n.models.find(v=>v.alias===n.currentModel)),f=X(()=>{var v;return((v=u.value)==null?void 0:v.thinkingLevels)??r});function p(v){return o[v]??v}function g(v){return v>=1e3?`${Math.round(v/1e3)}k`:String(v)}function d(v){return v.displayName??v.model}function m(v){v!==n.currentModel&&s("apply-model",v),s("close")}function b(v){v!==n.currentThinking&&s("apply-thinking",v)}return(v,S)=>(k(),_("div",_1,[h("div",{class:"picker-backdrop",onClick:S[0]||(S[0]=C=>s("close"))}),h("div",{class:"model-picker",role:"dialog","aria-label":"模型选择",onKeydown:S[2]||(S[2]=Is(C=>s("close"),["esc"]))},[st(h("input",{ref_key:"searchRef",ref:l,"onUpdate:modelValue":S[1]||(S[1]=C=>i.value=C),class:"picker-search",type:"text",placeholder:"搜索模型…"},null,512),[[mt,i.value]]),h("div",S1,[c.value.length===0?(k(),_("div",x1,"无匹配模型")):V("",!0),(k(!0),_(re,null,Ve(c.value,C=>(k(),_("div",{key:C.provider,class:"picker-group"},[h("div",C1,E(C.provider),1),(k(!0),_(re,null,Ve(C.models,T=>(k(),_("button",{key:T.alias,class:we(["picker-row",{active:T.alias===e.currentModel}]),onClick:K=>m(T.alias)},[h("span",$1,[h("span",R1,E(d(T)),1),h("span",A1,E(T.alias),1)]),h("span",E1,E(g(T.maxContextSize)),1),T.alias===e.currentModel?(k(),_("span",I1,"✓")):V("",!0)],10,T1))),128))]))),128))]),h("div",L1,[S[3]||(S[3]=h("span",{class:"thinking-label"},"思考强度",-1)),h("div",P1,[(k(!0),_(re,null,Ve(f.value,C=>(k(),_("button",{key:C,class:we(["thinking-btn",{active:C===e.currentThinking}]),onClick:T=>b(C)},E(p(C)),11,M1))),128))])])],32)]))}}),O1=Ce(N1,[["__scopeId","data-v-af964b7d"]]),D1={class:"slash-menu",role:"listbox","aria-label":"斜杠命令"},B1=["aria-selected","onMousedown","onMouseenter"],G1={class:"slash-name"},j1={key:0,class:"slash-aliases"},z1={class:"slash-desc"},U1={key:0,class:"slash-badge slash-badge-input"},F1={key:1,class:"slash-badge"},H1=xe({__name:"SlashMenu",props:{commands:{},activeIndex:{}},emits:["select","hover"],setup(e,{emit:t}){const n=t;return(s,r)=>(k(),_("div",D1,[(k(!0),_(re,null,Ve(e.commands,(o,i)=>{var l;return k(),_("button",{key:o.name,class:we(["slash-item",{active:i===e.activeIndex}]),role:"option","aria-selected":i===e.activeIndex,onMousedown:zt(a=>n("select",o),["prevent"]),onMouseenter:a=>n("hover",i)},[h("span",G1,[Le("/"+E(o.name),1),(l=o.aliases)!=null&&l.length?(k(),_("span",j1,E(o.aliases.map(a=>`/${a}`).join(" ")),1)):V("",!0)]),h("span",z1,E(o.description),1),o.acceptsInput?(k(),_("span",U1,"输入参数")):V("",!0),o.target==="backend"?(k(),_("span",F1,"服务端")):V("",!0)],42,B1)}),128)),r[0]||(r[0]=h("div",{class:"slash-hint"},"↑↓ 选择 · Enter/Tab 执行 · Esc 关闭",-1))]))}}),W1=Ce(H1,[["__scopeId","data-v-54d5c512"]]),q1={class:"composer"},V1=["placeholder"],K1={class:"composer-footer"},Z1={class:"composer-quick-actions"},Y1=["title"],J1={key:1,class:"queue-label",title:"运行结束后自动发送"},X1={class:"composer-actions"},Q1=["disabled","title"],ek={key:1,class:"context-label",title:"上下文使用率"},tk=["disabled"],nk=xe({__name:"Composer",props:{busy:{type:Boolean},status:{default:void 0},sessionId:{default:null},models:{default:()=>[]}},emits:["send","abort","command","switch-model","switch-thinking"],setup(e,{expose:t,emit:n}){const s=e,r=n,o=H(""),i=H(null),l=H(0),a=H(!1),c=X(()=>{const O=o.value;return!O.startsWith("/")||O.includes(`
|
|
87
|
+
`)||/\s/.test(O.slice(1))?null:O.slice(1)}),u=X(()=>c.value===null?[]:Ih(c.value)),f=X(()=>c.value!==null&&u.value.length>0&&!a.value);je(c,()=>{l.value=0,a.value=!1});function p(O){const oe=O??u.value[l.value];if(oe){if(oe.acceptsInput){o.value=`/${oe.name} `,a.value=!0,Lt(()=>{var ye;(ye=i.value)==null||ye.focus(),Q()});return}C(`/${oe.name}`),G(),r("command",oe.name)}}const g=H([]);je(()=>s.sessionId,()=>{g.value=[]}),je(()=>s.busy,O=>{if(!O&&g.value.length>0){const[oe,...ye]=g.value;g.value=ye,oe&&r("send",oe)}});const d=H([]),m=H(-1),b=H("");function v(){return`scream-history:${s.sessionId??"default"}`}function S(){try{const O=localStorage.getItem(v());d.value=O?JSON.parse(O):[]}catch{d.value=[]}m.value=-1}function C(O){if(d.value.at(-1)!==O){d.value=[...d.value,O].slice(-50);try{localStorage.setItem(v(),JSON.stringify(d.value))}catch{}}m.value=-1,b.value=""}function T(O,oe){const ye=i.value;if(!ye)return;const tt=ye.value.slice(0,ye.selectionStart??0),y=ye.value.slice(ye.selectionEnd??0);if(!(O===-1&&tt.includes(`
|
|
88
|
+
`))&&!(O===1&&y.includes(`
|
|
89
|
+
`))){if(O===-1){if(d.value.length===0)return;oe.preventDefault(),m.value===-1?(b.value=o.value,m.value=d.value.length-1):m.value>0&&m.value--,o.value=d.value[m.value]??""}else{if(m.value===-1)return;oe.preventDefault(),m.value<d.value.length-1?(m.value++,o.value=d.value[m.value]??""):(m.value=-1,o.value=b.value)}Lt(()=>{ye.selectionStart=ye.selectionEnd=ye.value.length})}}function K(){return`scream-draft:${s.sessionId??"default"}`}je(o,()=>{Q();try{o.value?localStorage.setItem(K(),o.value):localStorage.removeItem(K())}catch{}}),je(()=>s.sessionId,()=>{S();let O="";try{O=localStorage.getItem(K())??""}catch{O=""}o.value=O,Lt(Q)},{immediate:!0});function Q(){const O=i.value;if(!O)return;O.style.height="auto";const oe=Math.round(window.innerHeight*.25);O.style.height=`${Math.min(Math.max(O.scrollHeight,36),oe)}px`}function G(){o.value="",Lt(()=>{i.value&&(i.value.style.height="auto")})}function de(){const O=o.value.trim();if(O){if(O.startsWith("/")){const oe=O.indexOf(" "),ye=(oe===-1?O.slice(1):O.slice(1,oe)).toLowerCase(),tt=Lh(ye),y=oe===-1?"":O.slice(oe+1).trim();C(O),r("command",tt,y),G();return}if(s.busy){F();return}C(O),r("send",O),G()}}function F(){const O=o.value.trim();O&&(g.value=[...g.value,O],G())}function te(O){if(f.value){if(O.key==="ArrowUp"){O.preventDefault(),l.value=(l.value-1+u.value.length)%u.value.length;return}if(O.key==="ArrowDown"){O.preventDefault(),l.value=(l.value+1)%u.value.length;return}if(O.key==="Tab"||O.key==="Enter"&&!O.shiftKey){if(O.key==="Enter"&&O.isComposing)return;O.preventDefault(),p();return}if(O.key==="Escape"){O.preventDefault(),a.value=!0;return}}if((O.ctrlKey||O.metaKey)&&O.key.toLowerCase()==="s"){O.preventDefault(),F();return}if(O.key==="Enter"&&!O.shiftKey){if(O.isComposing)return;O.preventDefault(),de();return}O.key==="ArrowUp"?T(-1,O):O.key==="ArrowDown"&&T(1,O)}function pe(){g.value=[],r("abort")}function D(O){o.value=O,Lt(()=>{var oe;Q(),(oe=i.value)==null||oe.focus()})}function he(O){o.value+=O,Lt(()=>{var oe;Q(),(oe=i.value)==null||oe.focus()})}t({insertText:D,openModelPicker:We});const I=X(()=>{var O;return(O=s.status)==null?void 0:O.model}),R=X(()=>{var O;return(O=s.status)==null?void 0:O.permission}),Z=X(()=>{var O;return(O=s.status)==null?void 0:O.contextUsage}),ie=H(!1),se={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},Fe=X(()=>{var O;return(O=s.status)==null?void 0:O.thinkingLevel}),He=X(()=>{const O=Fe.value;return!O||O==="none"?"":se[O]??O}),Pe=X(()=>s.models.length>0);function We(){return Pe.value?(ie.value=!0,!0):!1}function Ge(){Pe.value&&(ie.value=!ie.value)}function Xt(O){r("switch-model",O)}function ot(O){r("switch-thinking",O)}const et=X(()=>{switch(R.value){case"auto":return"perm-auto";case"yolo":return"perm-yolo";default:return"perm-manual"}}),kt=X(()=>{switch(R.value){case"auto":return"自动";case"yolo":return"YOLO";default:return"手动"}});return(O,oe)=>(k(),_("div",q1,[W(wi,{name:"picker"},{default:Qe(()=>[ie.value?(k(),ze(O1,{key:0,models:e.models,"current-model":I.value,"current-thinking":Fe.value,onApplyModel:Xt,onApplyThinking:ot,onClose:oe[0]||(oe[0]=ye=>ie.value=!1)},null,8,["models","current-model","current-thinking"])):V("",!0)]),_:1}),f.value?(k(),ze(W1,{key:0,commands:u.value,"active-index":l.value,onSelect:p,onHover:oe[1]||(oe[1]=ye=>l.value=ye)},null,8,["commands","active-index"])):V("",!0),st(h("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":oe[2]||(oe[2]=ye=>o.value=ye),id:"composer-input",name:"message",class:"composer-input",rows:"1",placeholder:e.busy?"回合进行中:Enter/Ctrl+S 排队消息,随下一轮注入":"输入消息,@ 提及,/ 触发指令",onKeydown:te},null,40,V1),[[mt,o.value]]),h("div",K1,[h("div",Z1,[h("button",{class:"quick-action",title:"插入 @ 提及",onClick:oe[3]||(oe[3]=ye=>he("@"))},[W(me,{name:"at",size:18}),oe[5]||(oe[5]=h("span",null,"提及",-1))]),h("button",{class:"quick-action",title:"插入 / 触发指令",onClick:oe[4]||(oe[4]=ye=>he("/"))},[W(me,{name:"command",size:18}),oe[6]||(oe[6]=h("span",null,"指令",-1))]),R.value?(k(),_("span",{key:0,class:we(["permission-label",et.value]),title:`权限模式:${R.value}`},E(kt.value),11,Y1)):V("",!0),g.value.length?(k(),_("span",J1,"已排队 "+E(g.value.length)+" 条",1)):V("",!0)]),h("div",X1,[I.value?(k(),_("button",{key:0,class:we(["model-select",{clickable:Pe.value}]),disabled:!Pe.value,title:`当前模型:${I.value}`,onClick:Ge},[W(me,{name:"brain",size:17}),h("span",null,E(I.value),1),He.value?(k(),_(re,{key:0},[Le(" · "+E(He.value),1)],64)):V("",!0),Pe.value?(k(),ze(me,{key:1,name:"chevron-down",size:14})):V("",!0)],10,Q1)):V("",!0),Z.value!==void 0?(k(),_("span",ek,[W(Pc,{usage:Z.value,size:17},null,8,["usage"])])):V("",!0),e.busy?(k(),_("button",{key:2,class:"stop-btn",title:"停止当前回合",onClick:pe},[W(me,{name:"stop",size:17}),oe[7]||(oe[7]=h("span",null,"停止",-1))])):(k(),_("button",{key:3,class:"send-btn",disabled:!o.value.trim(),title:"发送 (Enter)","aria-label":"发送",onClick:de},[W(me,{name:"send",size:19})],8,tk))])])]))}}),sk=Ce(nk,[["__scopeId","data-v-e1e7e9dd"]]),rk=["type","disabled"],ok=xe({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(k(),_("button",{class:we(["ui-btn",[`ui-btn--${e.variant}`,`ui-btn--${e.size}`]]),type:e.type,disabled:e.disabled},[sr(t.$slots,"default",{},void 0)],10,rk))}}),qn=Ce(ok,[["__scopeId","data-v-e28e57b8"]]),ik={key:0,class:"approval-card"},lk={class:"approval-header"},ak={class:"approval-title"},ck={class:"tool-name"},uk={class:"action-summary"},fk={key:0,class:"approval-count"},dk={class:"approval-action"},hk={key:0,class:"feedback-area"},pk={class:"approval-buttons"},gk={key:0,class:"busy-indicator","aria-label":"处理中"},mk=xe({__name:"ApprovalCard",props:{approvals:{}},emits:["resolve"],setup(e,{emit:t}){const n=e,s=t,r=H(!1),o=H(!1),i=H(""),l=H(new Set),a=X(()=>n.approvals[0]);je(()=>n.approvals.map(d=>d.id).join(","),()=>{o.value=!1,i.value="";const d=new Set(n.approvals.map(m=>m.id));l.value=new Set([...l.value].filter(m=>d.has(m)))});function c(d){return typeof d.display=="string"?d.display:d.display&&typeof d.display=="object"&&"description"in d.display?String(d.display.description??""):d.action??"执行该操作"}function u(d){return l.value.has(d)}function f(d,m,b){const v=a.value;!v||u(v.id)||(l.value=new Set([...l.value,v.id]),s("resolve",v.id,d,m,b))}function p(){const d=i.value.trim();d&&f("rejected",d)}function g(d){if(!a.value||r.value)return;const b=d.target;if(b&&(b.tagName==="TEXTAREA"||b.tagName==="INPUT")){o.value&&d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),p());return}switch(d.key){case"1":d.preventDefault(),f("approved",void 0,"once");break;case"2":d.preventDefault(),f("approved",void 0,"session");break;case"3":d.preventDefault(),f("rejected");break;case"4":d.preventDefault(),o.value=!o.value;break}}return Jt(()=>window.addEventListener("keydown",g)),xn(()=>window.removeEventListener("keydown",g)),(d,m)=>e.approvals.length?(k(),_("div",ik,[r.value?(k(),_("button",{key:0,class:"approval-minibar",onClick:m[0]||(m[0]=b=>r.value=!1)}," ⚠ "+E(e.approvals.length)+" 个待审批请求 — 点击展开 ",1)):a.value?(k(),_(re,{key:1},[h("div",lk,[m[7]||(m[7]=h("span",{class:"approval-icon"},"⚠",-1)),h("span",ak,[h("span",ck,E(a.value.toolName),1),h("span",uk,E(c(a.value)),1)]),e.approvals.length>1?(k(),_("span",fk,"+"+E(e.approvals.length-1),1)):V("",!0),h("button",{class:"icon-btn",title:"最小化","aria-label":"最小化",onClick:m[1]||(m[1]=b=>r.value=!0)},"—")]),h("pre",dk,E(c(a.value)),1),o.value?(k(),_("div",hk,[st(h("textarea",{"onUpdate:modelValue":m[2]||(m[2]=b=>i.value=b),class:"feedback-input",rows:"2",placeholder:"输入反馈,Enter 提交(将作为拒绝原因反馈给 Agent)"},null,512),[[mt,i.value]])])):V("",!0),h("div",pk,[W(qn,{variant:"primary",disabled:u(a.value.id),onClick:m[3]||(m[3]=b=>f("approved",void 0,"once"))},{default:Qe(()=>[...m[8]||(m[8]=[h("kbd",null,"1",-1),Le(" 批准 ",-1)])]),_:1},8,["disabled"]),W(qn,{variant:"secondary",disabled:u(a.value.id),onClick:m[4]||(m[4]=b=>f("approved",void 0,"session"))},{default:Qe(()=>[...m[9]||(m[9]=[h("kbd",null,"2",-1),Le(" 会话批准 ",-1)])]),_:1},8,["disabled"]),W(qn,{variant:"danger",disabled:u(a.value.id),onClick:m[5]||(m[5]=b=>f("rejected"))},{default:Qe(()=>[...m[10]||(m[10]=[h("kbd",null,"3",-1),Le(" 拒绝 ",-1)])]),_:1},8,["disabled"]),W(qn,{variant:"secondary",class:we({"feedback-active":o.value}),disabled:u(a.value.id),onClick:m[6]||(m[6]=b=>o.value=!o.value)},{default:Qe(()=>[...m[11]||(m[11]=[h("kbd",null,"4",-1),Le(" 反馈 ",-1)])]),_:1},8,["class","disabled"]),u(a.value.id)?(k(),_("span",gk,[...m[12]||(m[12]=[h("span",{class:"spinner"},null,-1),Le(" 处理中… ",-1)])])):V("",!0)])],64)):V("",!0)])):V("",!0)}}),vk=Ce(mk,[["__scopeId","data-v-b031b650"]]),yk={class:"brand-head"},bk=["title","aria-label"],kk={class:"primary-actions"},wk={class:"search-row"},_k={class:"list-heading"},Sk={class:"session-list"},xk={class:"group-label"},Ck=["title","onClick"],Tk={class:"session-icon"},$k={class:"session-info"},Rk={class:"session-title-row"},Ak={class:"session-meta"},Ek={key:0,class:"live"},Ik=["onClick"],Lk=["onClick"],Pk={key:0,class:"empty"},Mk={class:"agent-card"},Nk={class:"agent-card-head"},Ok={class:"agent-avatar"},Dk={key:0},Bk=["title"],Gk={key:1},jk=["title"],zk={key:0,class:"usage-track"},Uk={class:"sidebar-footer","aria-label":"辅助导航"},Fk=xe({__name:"SessionSidebar",props:{sessions:{},currentSessionId:{},status:{default:void 0},busy:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!1},mobileOpen:{type:Boolean,default:!1}},emits:["create","switch","delete","export","toggle","open-search","show-info","help"],setup(e,{emit:t}){const n=e,s=t,r=H(null),o=X(()=>{const g=new Date,d=new Date(g.getFullYear(),g.getMonth(),g.getDate()).getTime(),m=d-864e5,b=new Map;for(const v of n.sessions){const S=new Date(v.createdAt),C=v.createdAt>=d?"今天":v.createdAt>=m?"昨天":`${String(S.getMonth()+1).padStart(2,"0")}-${String(S.getDate()).padStart(2,"0")}`;b.set(C,[...b.get(C)??[],v])}return[...b].map(([v,S])=>({label:v,items:S}))});function i(g){const d=new Date(g);return d.toDateString()===new Date().toDateString()?d.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):d.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}const l=X(()=>{var d;const g=(d=n.status)==null?void 0:d.contextUsage;return g===void 0?null:Math.round((g>1?g/100:g)*100)});function a(g){return g?g.inputOther+g.output+g.inputCacheRead+g.inputCacheCreation:0}const c=X(()=>{var g,d;return a((d=(g=n.status)==null?void 0:g.usage)==null?void 0:d.total)});function u(g){return g>=1e6?`${(g/1e6).toFixed(1)}M`:g>=1e3?`${(g/1e3).toFixed(1)}k`:String(g)}const f=X(()=>{var g;return((g=n.status)==null?void 0:g.contextTokens)!==void 0&&n.status.maxContextTokens!==void 0?`${u(n.status.contextTokens)} / ${u(n.status.maxContextTokens)}`:""});function p(){r.value&&(s("delete",r.value),r.value=null)}return(g,d)=>{var m;return k(),_("aside",{class:we(["sidebar",{collapsed:e.collapsed,"mobile-open":e.mobileOpen}])},[h("div",yk,[d[12]||(d[12]=h("div",{class:"brand-symbol"},[h("img",{src:Si,alt:""})],-1)),d[13]||(d[13]=h("div",{class:"brand-copy"},[h("strong",null,"Scream Code"),h("span",null,"智能开发工作台")],-1)),h("button",{class:"collapse-btn",title:e.collapsed?"展开侧栏":"收起侧栏","aria-label":e.collapsed?"展开侧栏":"收起侧栏",onClick:d[0]||(d[0]=b=>s("toggle"))},[W(me,{name:e.collapsed?"chevron-right":"chevron-left",size:19},null,8,["name"])],8,bk)]),h("div",kk,[h("button",{class:"new-session",title:"新建会话",onClick:d[1]||(d[1]=b=>s("create"))},[W(me,{name:"plus",size:21}),d[14]||(d[14]=h("span",null,"新建会话",-1))]),h("button",{class:"square-action",title:"搜索会话","aria-label":"搜索会话",onClick:d[2]||(d[2]=b=>s("open-search"))},[W(me,{name:"search"})])]),h("div",wk,[h("button",{class:"search-box",title:"搜索会话 (⌘K)",onClick:d[3]||(d[3]=b=>s("open-search"))},[W(me,{name:"search",size:18}),d[15]||(d[15]=h("span",null,"搜索会话",-1)),d[16]||(d[16]=h("kbd",null,"⌘K",-1))]),h("button",{class:"filter-btn",title:"筛选和搜索会话","aria-label":"筛选和搜索会话",onClick:d[4]||(d[4]=b=>s("open-search"))},[W(me,{name:"filter",size:18})])]),h("div",_k,[d[17]||(d[17]=h("span",null,"最近会话",-1)),h("span",null,E(e.sessions.length),1)]),h("div",Sk,[(k(!0),_(re,null,Ve(o.value,b=>(k(),_(re,{key:b.label},[h("div",xk,E(b.label),1),(k(!0),_(re,null,Ve(b.items,v=>(k(),_("article",{key:v.sessionId,class:we(["session-item",{active:v.sessionId===e.currentSessionId}]),title:v.title||"新会话",onClick:S=>s("switch",v.sessionId)},[h("span",Tk,[W(me,{name:"message-circle",size:18})]),h("div",$k,[h("div",Rk,[h("strong",null,E(v.title||"新会话"),1),h("time",null,E(i(v.createdAt)),1)]),h("div",Ak,[h("span",null,E(v.messageCount)+" 条消息",1),v.active?(k(),_("span",Ek,[...d[18]||(d[18]=[h("i",null,null,-1),Le("活跃",-1)])])):V("",!0)])]),h("div",{class:"session-actions",onClick:d[5]||(d[5]=zt(()=>{},["stop"]))},[h("button",{title:"导出 Markdown","aria-label":"导出 Markdown",onClick:S=>s("export",v.sessionId)},[W(me,{name:"download",size:16})],8,Ik),h("button",{class:"danger",title:"删除会话","aria-label":"删除会话",onClick:S=>r.value=v.sessionId},[W(me,{name:"trash",size:16})],8,Lk)])],10,Ck))),128))],64))),128)),e.sessions.length===0?(k(),_("div",Pk,[W(me,{name:"message-circle",size:28}),d[19]||(d[19]=h("strong",null,"暂无会话",-1)),d[20]||(d[20]=h("span",null,"新建会话后将在这里显示",-1))])):V("",!0),e.sessions.length?(k(),_("button",{key:1,class:"view-all",onClick:d[6]||(d[6]=b=>s("open-search"))},[d[21]||(d[21]=Le("查看全部会话 ",-1)),W(me,{name:"chevron-right",size:16})])):V("",!0)]),h("section",Mk,[h("div",Nk,[h("span",Ok,[W(me,{name:"bot",size:20})]),h("div",null,[d[22]||(d[22]=h("strong",null,"Scream Agent",-1)),h("span",null,[h("i",{class:we({busy:e.busy})},null,2),Le(E(e.busy?"正在运行":"当前空闲"),1)])])]),h("dl",null,[(m=e.status)!=null&&m.model?(k(),_("div",Dk,[d[23]||(d[23]=h("dt",null,"当前模型",-1)),h("dd",{title:e.status.model},E(e.status.model),9,Bk)])):V("",!0),l.value!==null?(k(),_("div",Gk,[d[24]||(d[24]=h("dt",null,"上下文",-1)),h("dd",{title:f.value||void 0},E(l.value)+"%",9,jk)])):V("",!0),h("div",null,[d[25]||(d[25]=h("dt",null,"Token 消耗",-1)),h("dd",null,E(c.value?u(c.value):"-"),1)])]),l.value!==null?(k(),_("div",zk,[h("i",{style:un({width:`${l.value}%`})},null,4)])):V("",!0),h("button",{onClick:d[7]||(d[7]=b=>s("show-info","status"))},[W(me,{name:"activity",size:17}),d[26]||(d[26]=Le("查看详细状态",-1))])]),h("nav",Uk,[h("button",{onClick:d[8]||(d[8]=b=>s("show-info","usage"))},[W(me,{name:"activity",size:19}),d[27]||(d[27]=h("span",null,"用量",-1))]),h("button",{onClick:d[9]||(d[9]=b=>s("help"))},[W(me,{name:"help",size:19}),d[28]||(d[28]=h("span",null,"帮助",-1))])]),W(Zr,{open:r.value!==null,title:"删除会话",onClose:d[11]||(d[11]=b=>r.value=null)},{footer:Qe(()=>[W(qn,{variant:"ghost",size:"sm",onClick:d[10]||(d[10]=b=>r.value=null)},{default:Qe(()=>[...d[29]||(d[29]=[Le("取消",-1)])]),_:1}),W(qn,{variant:"danger",size:"sm",onClick:p},{default:Qe(()=>[...d[30]||(d[30]=[Le("删除",-1)])]),_:1})]),default:Qe(()=>[d[31]||(d[31]=h("p",{class:"dialog-copy"},"确定删除这个会话吗?此操作不可恢复。",-1))]),_:1},8,["open"])],2)}}}),Hk=Ce(Fk,[["__scopeId","data-v-a4c1783b"]]),Wk={class:"goal-panel panel-section"},qk={class:"section-heading"},Vk={key:0,class:"empty-state"},Kk=["disabled"],Zk={class:"refine-row"},Yk=["disabled"],Jk={key:0},Xk=["disabled"],Qk={class:"budget-grid"},e0=["disabled"],t0=["disabled"],n0={class:"time-budget"},s0=["disabled"],r0=["disabled"],o0=["disabled"],i0={key:0,class:"goal-summary"},l0={class:"objective"},a0={class:"criterion"},c0={key:0,class:"reason"},u0={class:"metrics"},f0={class:"metric"},d0={key:0},h0={class:"metric"},p0={key:0},g0={class:"metric"},m0={key:0},v0={key:1,class:"budget-warning"},y0={key:2,class:"notes"},b0={class:"actions"},k0=["disabled"],w0=["disabled"],_0=["disabled"],S0=["disabled"],x0=["disabled"],C0={class:"budget-grid"},T0=["disabled"],$0=["disabled"],R0={class:"time-budget"},A0=["disabled"],E0=["disabled"],I0={class:"edit-actions"},L0=["disabled"],P0=["disabled"],M0={key:3,class:"form-error"},N0={key:4,class:"pending-copy"},O0=xe({__name:"GoalPanel",props:{goal:{},sessionId:{default:null},connectionStatus:{},busy:{type:Boolean,default:!1},archived:{type:Boolean,default:!1},pending:{type:Boolean,default:!1},error:{default:null},refineGoal:{},createGoal:{},updateGoal:{},pauseGoal:{},resumeGoal:{},cancelGoal:{}},setup(e){const t=e,n=H(""),s=H(""),r=H(""),o=H(""),i=H(""),l=H("minutes"),a=H(!1),c=H(null),u=H(!1),f=X(()=>t.connectionStatus==="connected"),p=X(()=>!t.sessionId||!f.value||t.archived||t.pending),g=X(()=>p.value),d=X(()=>{var I;return{active:"进行中",paused:"已暂停",blocked:"受阻",complete:"已完成"}[((I=t.goal)==null?void 0:I.status)??"active"]}),m=X(()=>t.sessionId?t.archived?"归档会话为只读状态":f.value?t.pending?"正在提交请求…":t.goal?"状态由核心事件实时同步":"创建后 Agent 将自动开始执行":"连接恢复后可继续管理":"选择或新建会话后即可配置");je(()=>t.sessionId,()=>{a.value=!1,b()}),je(()=>{var I;return(I=t.goal)==null?void 0:I.goalId},(I,R)=>{a.value=!1,I!==R&&b()});function b(){n.value="",s.value="",r.value="",o.value="",i.value="",l.value="minutes",u.value=!1,c.value=null}function v(I,R){const Z=I.trim();if(!Z)return null;const ie=Number(Z);if(!Number.isSafeInteger(ie)||ie<=0){c.value=`${R}必须是正整数。`;return}return ie}function S(){c.value=null;const I=v(r.value,"轮次预算");if(I===void 0)return null;const R=v(o.value,"Token 预算");if(R===void 0)return null;const Z=v(i.value,"时间预算");if(Z===void 0)return null;const ie=[];return I!==null&&ie.push({value:I,unit:"turns"}),R!==null&&ie.push({value:R,unit:"tokens"}),Z!==null&&ie.push({value:Z,unit:l.value}),ie}async function C(){const I=n.value.trim();if(!I){c.value="请先输入需要优化的目标描述。";return}c.value=null,u.value=!1;const R=await t.refineGoal(I);R!==null&&(n.value=R,u.value=!0)}async function T(){const I=n.value.trim();if(!I){c.value="目标内容不能为空。";return}const R=S();if(R===null)return;await t.createGoal({objective:I,completionCriterion:s.value.trim()||void 0,replace:!1,budgets:R})&&(u.value=!1)}function K(I){I===null?(i.value="",l.value="minutes"):I%36e5===0?(i.value=String(I/36e5),l.value="hours"):I%6e4===0?(i.value=String(I/6e4),l.value="minutes"):I%1e3===0?(i.value=String(I/1e3),l.value="seconds"):(i.value=String(I),l.value="milliseconds")}function Q(){const I=t.goal;I&&(n.value=I.objective,r.value=I.budget.turnBudget===null?"":String(I.budget.turnBudget),o.value=I.budget.tokenBudget===null?"":String(I.budget.tokenBudget),K(I.budget.wallClockBudgetMs),c.value=null,a.value=!0)}function G(I,R){return R==="hours"?I*36e5:R==="minutes"?I*6e4:R==="seconds"?I*1e3:I}async function de(){const I=t.goal;if(!I)return;const R=n.value.trim();if(!R){c.value="目标内容不能为空。";return}const Z=S();if(Z===null)return;const ie=v(r.value,"轮次预算"),se=v(o.value,"Token 预算"),Fe=v(i.value,"时间预算");if(ie===void 0||se===void 0||Fe===void 0)return;if(I.budget.turnBudget!==null&&ie===null){c.value="当前协议不支持清除已有轮次预算,请填写新的正整数。";return}if(I.budget.tokenBudget!==null&&se===null){c.value="当前协议不支持清除已有 Token 预算,请填写新的正整数。";return}if(I.budget.wallClockBudgetMs!==null&&Fe===null){c.value="当前协议不支持清除已有时间预算,请填写新的正整数。";return}const He=Z.filter(Ge=>Ge.unit==="turns"?Ge.value!==I.budget.turnBudget:Ge.unit==="tokens"?Ge.value!==I.budget.tokenBudget:G(Ge.value,Ge.unit)!==I.budget.wallClockBudgetMs),Pe=R===I.objective?void 0:R;if(Pe===void 0&&He.length===0){c.value="目标与预算没有变化。";return}await t.updateGoal({objective:Pe,budgets:He})&&(a.value=!1)}async function F(I){c.value=null,!(I==="cancel"&&!window.confirm("确定取消当前 Goal?当前 Goal 状态将被清除。"))&&(I==="pause"?await t.pauseGoal():I==="resume"?await t.resumeGoal():await t.cancelGoal())}function te(I){return I.toLocaleString("zh-CN")}function pe(I){if(I<1e3)return`${I} 毫秒`;const R=Math.floor(I/1e3);if(R<60)return`${R} 秒`;const Z=Math.floor(R/3600),ie=Math.floor(R%3600/60);return Z>0?`${Z} 小时 ${ie} 分钟`:`${ie} 分钟`}function D(I,R){return R===null||R<=0?0:Math.min(100,Math.round(I/R*100))}function he(I){return new Date(I).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}return(I,R)=>(k(),_("section",Wk,[h("div",qk,[h("div",null,[R[15]||(R[15]=h("span",null,"Goal 管理",-1)),h("small",null,E(m.value),1)]),e.goal?(k(),_("span",{key:0,class:we(["status-pill",`is-${e.goal.status}`])},E(d.value),3)):(k(),ze(me,{key:1,name:"activity",size:19}))]),e.sessionId?e.goal?(k(),_(re,{key:2},[a.value?(k(),_("form",{key:1,class:"goal-form edit-form",onSubmit:zt(de,["prevent"])},[h("label",null,[R[31]||(R[31]=h("span",null,"目标内容",-1)),st(h("textarea",{"onUpdate:modelValue":R[9]||(R[9]=Z=>n.value=Z),rows:"3",maxlength:"4000",disabled:p.value||e.busy},null,8,x0),[[mt,n.value]])]),R[36]||(R[36]=h("div",{class:"budget-title"},[Le("更新预算 "),h("small",null,"仅提交发生变化的预算")],-1)),h("div",C0,[h("label",null,[R[32]||(R[32]=h("span",null,"轮次",-1)),st(h("input",{"onUpdate:modelValue":R[10]||(R[10]=Z=>r.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value||e.busy},null,8,T0),[[mt,r.value]])]),h("label",null,[R[33]||(R[33]=h("span",null,"Token",-1)),st(h("input",{"onUpdate:modelValue":R[11]||(R[11]=Z=>o.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value||e.busy},null,8,$0),[[mt,o.value]])])]),h("div",R0,[h("label",null,[R[34]||(R[34]=h("span",null,"时间",-1)),st(h("input",{"onUpdate:modelValue":R[12]||(R[12]=Z=>i.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:p.value||e.busy},null,8,A0),[[mt,i.value]])]),st(h("select",{"onUpdate:modelValue":R[13]||(R[13]=Z=>l.value=Z),"aria-label":"时间预算单位",disabled:p.value||e.busy},[...R[35]||(R[35]=[h("option",{value:"minutes"},"分钟",-1),h("option",{value:"hours"},"小时",-1),h("option",{value:"seconds"},"秒",-1),h("option",{value:"milliseconds"},"毫秒",-1)])],8,E0),[[Il,l.value]])]),h("div",I0,[h("button",{type:"button",class:"secondary",disabled:e.pending,onClick:R[14]||(R[14]=Z=>a.value=!1)},"返回",8,L0),h("button",{class:"primary small",type:"submit",disabled:p.value||e.busy},"保存修改",8,P0)])],32)):(k(),_("div",i0,[h("div",l0,[R[24]||(R[24]=h("small",null,"目标",-1)),h("p",null,E(e.goal.objective),1)]),h("div",a0,[R[25]||(R[25]=h("small",null,"完成标准",-1)),h("p",null,E(e.goal.completionCriterion??"未设置,由 Agent 根据目标判断完成。"),1)]),e.goal.terminalReason?(k(),_("div",c0,[R[26]||(R[26]=h("strong",null,"状态原因",-1)),h("span",null,E(e.goal.terminalReason),1)])):V("",!0),h("div",u0,[h("div",f0,[h("div",null,[R[27]||(R[27]=h("span",null,"轮次",-1)),h("strong",null,E(e.goal.turnsUsed)+" / "+E(e.goal.budget.turnBudget??"不限"),1)]),e.goal.budget.turnBudget!==null?(k(),_("i",d0,[h("b",{style:un({width:`${D(e.goal.turnsUsed,e.goal.budget.turnBudget)}%`})},null,4)])):V("",!0)]),h("div",h0,[h("div",null,[R[28]||(R[28]=h("span",null,"Token",-1)),h("strong",null,E(te(e.goal.tokensUsed))+" / "+E(e.goal.budget.tokenBudget===null?"不限":te(e.goal.budget.tokenBudget)),1)]),e.goal.budget.tokenBudget!==null?(k(),_("i",p0,[h("b",{style:un({width:`${D(e.goal.tokensUsed,e.goal.budget.tokenBudget)}%`})},null,4)])):V("",!0)]),h("div",g0,[h("div",null,[R[29]||(R[29]=h("span",null,"时间",-1)),h("strong",null,E(pe(e.goal.wallClockMs))+" / "+E(e.goal.budget.wallClockBudgetMs===null?"不限":pe(e.goal.budget.wallClockBudgetMs)),1)]),e.goal.budget.wallClockBudgetMs!==null?(k(),_("i",m0,[h("b",{style:un({width:`${D(e.goal.wallClockMs,e.goal.budget.wallClockBudgetMs)}%`})},null,4)])):V("",!0)])]),e.goal.budget.overBudget?(k(),_("div",v0,"已达到或超过执行预算。")):V("",!0),e.goal.notes.length?(k(),_("details",y0,[h("summary",null,"工作记录("+E(e.goal.notes.length)+")",1),h("ol",null,[(k(!0),_(re,null,Ve(e.goal.notes,Z=>(k(),_("li",{key:`${Z.time}-${Z.content}`},[h("time",null,E(he(Z.time)),1),h("span",null,E(Z.content),1)]))),128))])])):V("",!0),h("div",b0,[e.goal.status!=="complete"?(k(),_("button",{key:0,class:"secondary",disabled:p.value||e.busy,onClick:Q},[W(me,{name:"edit",size:15}),R[30]||(R[30]=Le("编辑",-1))],8,k0)):V("",!0),e.goal.status==="active"?(k(),_("button",{key:1,class:"secondary",disabled:p.value,onClick:R[6]||(R[6]=Z=>F("pause"))},"暂停",8,w0)):V("",!0),e.goal.status==="paused"||e.goal.status==="blocked"?(k(),_("button",{key:2,class:"primary small",disabled:p.value||e.busy,onClick:R[7]||(R[7]=Z=>F("resume"))},"继续",8,_0)):V("",!0),h("button",{class:"danger",disabled:p.value,onClick:R[8]||(R[8]=Z=>F("cancel"))},"取消 Goal",8,S0)])]))],64)):(k(),_("form",{key:1,class:"goal-form",onSubmit:zt(T,["prevent"])},[h("label",null,[R[16]||(R[16]=h("span",null,"目标内容",-1)),st(h("textarea",{"onUpdate:modelValue":R[0]||(R[0]=Z=>n.value=Z),rows:"3",maxlength:"4000",placeholder:"描述希望 Agent 持续完成的目标",disabled:g.value},null,8,Kk),[[mt,n.value]])]),h("div",Zk,[h("button",{type:"button",class:"secondary",disabled:g.value||!n.value.trim(),onClick:C},[W(me,{name:"sparkles",size:15}),R[17]||(R[17]=Le(" AI 优化 ",-1))],8,Yk),u.value?(k(),_("small",Jk,"已优化,请确认或继续编辑后再创建。")):V("",!0)]),h("label",null,[R[18]||(R[18]=h("span",null,[Le("完成标准 "),h("small",null,"可选")],-1)),st(h("textarea",{"onUpdate:modelValue":R[1]||(R[1]=Z=>s.value=Z),rows:"2",placeholder:"例如:聚焦测试、类型检查与 Web 构建全部通过",disabled:g.value},null,8,Xk),[[mt,s.value]])]),R[23]||(R[23]=h("div",{class:"budget-title"},[Le("执行预算 "),h("small",null,"留空表示不限制")],-1)),h("div",Qk,[h("label",null,[R[19]||(R[19]=h("span",null,"轮次",-1)),st(h("input",{"onUpdate:modelValue":R[2]||(R[2]=Z=>r.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value},null,8,e0),[[mt,r.value]])]),h("label",null,[R[20]||(R[20]=h("span",null,"Token",-1)),st(h("input",{"onUpdate:modelValue":R[3]||(R[3]=Z=>o.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value},null,8,t0),[[mt,o.value]])])]),h("div",n0,[h("label",null,[R[21]||(R[21]=h("span",null,"时间",-1)),st(h("input",{"onUpdate:modelValue":R[4]||(R[4]=Z=>i.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value},null,8,s0),[[mt,i.value]])]),st(h("select",{"onUpdate:modelValue":R[5]||(R[5]=Z=>l.value=Z),"aria-label":"时间预算单位",disabled:g.value},[...R[22]||(R[22]=[h("option",{value:"minutes"},"分钟",-1),h("option",{value:"hours"},"小时",-1),h("option",{value:"seconds"},"秒",-1),h("option",{value:"milliseconds"},"毫秒",-1)])],8,r0),[[Il,l.value]])]),h("button",{class:"primary",type:"submit",disabled:g.value||!n.value.trim()},E(e.pending?"正在创建…":"创建并开始执行"),9,o0)],32)):(k(),_("div",Vk,"暂无会话,Goal 管理暂不可用。")),c.value||e.error?(k(),_("p",M0,E(c.value??e.error),1)):e.pending?(k(),_("p",N0,"请求处理中,状态将在核心事件到达后同步。")):V("",!0)]))}}),D0=Ce(O0,[["__scopeId","data-v-de9e6346"]]),B0={class:"todo-panel panel-section"},G0={class:"section-heading"},j0={class:"count-pill"},z0={key:0,class:"empty-state"},U0={key:1,class:"todo-groups"},F0=["title"],H0={class:"todo-title"},W0=xe({__name:"TodoPanel",props:{todos:{}},setup(e){const t=e,n=X(()=>Ch(t.todos)),s=X(()=>t.todos.filter(o=>o.status==="done").length),r={pending:{label:"待处理",symbol:"○"},in_progress:{label:"进行中",symbol:"●"},done:{label:"已完成",symbol:"✓"}};return(o,i)=>(k(),_("section",B0,[h("div",G0,[i[0]||(i[0]=h("div",null,[h("span",null,"核心 Todo"),h("small",null,"直接来自 Agent 核心状态")],-1)),h("span",j0,E(s.value)+"/"+E(e.todos.length),1)]),e.todos.length===0?(k(),_("div",z0,[W(me,{name:"check",size:18}),i[1]||(i[1]=h("span",null,"暂无 Todo",-1)),i[2]||(i[2]=h("small",null,"Agent 创建任务清单后会在这里实时显示。",-1))])):(k(),_("div",U0,[(k(!0),_(re,null,Ve(n.value,(l,a)=>(k(),_("section",{key:l.phase??`unphased-${a}`,class:"todo-group"},[h("h4",null,E(l.phase??"未分阶段"),1),h("ol",null,[(k(!0),_(re,null,Ve(l.items,(c,u)=>(k(),_("li",{key:`${a}-${u}-${c.title}`,class:we(`is-${c.status}`)},[h("span",{class:"status-symbol",title:r[c.status].label},E(r[c.status].symbol),9,F0),h("span",H0,E(c.title),1),h("small",null,E(r[c.status].label),1)],2))),128))])]))),128))]))]))}}),q0=Ce(W0,[["__scopeId","data-v-e8a85d5d"]]),V0={class:"panel-section like-section"},K0={class:"section-heading"},Z0={class:"like-fields"},Y0={class:"like-label"},J0={class:"like-value"},X0={class:"dialog"},Q0=["onUpdate:modelValue","placeholder"],ew={key:0,class:"dialog-error"},tw={class:"dialog-actions"},nw=["disabled"],sw=xe({__name:"LikePanel",props:{like:{},updateLike:{type:Function}},setup(e){const t=e,n=H(!1),s=H(!1),r=H(""),o=H({}),i=[{key:"nickname",label:"昵称",placeholder:"用户称呼,如:老板"},{key:"tone",label:"语气",placeholder:"AI 风格,如:专业不拖沓"},{key:"other",label:"偏好",placeholder:"其他用户偏好"},{key:"doNot",label:"禁止",placeholder:"用户明确不让做的事"}];function l(){o.value={...t.like},r.value="",n.value=!0}async function a(){s.value=!0,r.value="";const c=await t.updateLike(o.value);s.value=!1,c?n.value=!1:r.value="保存失败"}return(c,u)=>(k(),_("section",V0,[h("div",K0,[u[2]||(u[2]=h("div",null,[h("span",null,"偏好设置"),h("small",null,"/like 用户偏好")],-1)),W(me,{name:"heart",size:19})]),h("div",Z0,[(k(),_(re,null,Ve(i,f=>h("div",{key:f.key,class:"like-field"},[h("span",Y0,E(f.label),1),h("span",J0,E((e.like[f.key]??"").trim()||"未设置"),1)])),64))]),h("button",{class:"like-edit",onClick:l},"编辑偏好"),n.value?(k(),_("div",{key:0,class:"dialog-overlay",onClick:u[1]||(u[1]=zt(f=>n.value=!1,["self"]))},[h("div",X0,[u[3]||(u[3]=h("div",{class:"dialog-title"},"编辑用户偏好",-1)),(k(),_(re,null,Ve(i,f=>h("label",{key:f.key,class:"dialog-field"},[h("span",null,E(f.label),1),st(h("input",{"onUpdate:modelValue":p=>o.value[f.key]=p,placeholder:f.placeholder},null,8,Q0),[[mt,o.value[f.key]]])])),64)),r.value?(k(),_("div",ew,E(r.value),1)):V("",!0),h("div",tw,[h("button",{onClick:u[0]||(u[0]=f=>n.value=!1)},"取消"),h("button",{disabled:s.value,onClick:a},E(s.value?"保存中…":"确认"),9,nw)])])])):V("",!0)]))}}),rw=Ce(sw,[["__scopeId","data-v-a384266d"]]),ow={class:"rightbar"},iw=xe({__name:"RightPanel",props:{busy:{type:Boolean,default:!1},sessionId:{default:null},connectionStatus:{},archived:{type:Boolean,default:!1},goal:{},todos:{},like:{},updateLike:{},goalRequestPending:{type:Boolean,default:!1},goalRequestError:{default:null},refineGoal:{},createGoal:{},updateGoal:{},pauseGoal:{},resumeGoal:{},cancelGoal:{}},emits:["insert"],setup(e,{emit:t}){return(n,s)=>(k(),_("aside",ow,[W(q0,{todos:e.todos},null,8,["todos"]),W(rw,{like:e.like,"update-like":e.updateLike},null,8,["like","update-like"]),W(D0,{goal:e.goal,"session-id":e.sessionId,"connection-status":e.connectionStatus,busy:e.busy,archived:e.archived,pending:e.goalRequestPending,error:e.goalRequestError,"refine-goal":e.refineGoal,"create-goal":e.createGoal,"update-goal":e.updateGoal,"pause-goal":e.pauseGoal,"resume-goal":e.resumeGoal,"cancel-goal":e.cancelGoal},null,8,["goal","session-id","connection-status","busy","archived","pending","error","refine-goal","create-goal","update-goal","pause-goal","resume-goal","cancel-goal"])]))}}),lw=Ce(iw,[["__scopeId","data-v-8e2d795e"]]),aw={class:"info-row"},cw={class:"info-val mono"},uw={class:"info-row"},fw={class:"info-val mono"},dw={class:"info-row"},hw={class:"info-val"},pw={class:"info-row"},gw={class:"info-val"},mw={class:"info-row"},vw={class:"info-val"},yw={class:"info-row"},bw={class:"info-val"},kw={class:"info-row"},ww={class:"info-val"},_w={class:"info-row"},Sw={class:"info-val"},xw={class:"info-row"},Cw={class:"info-val"},Tw={class:"info-row"},$w={class:"info-val"},Rw={key:0,class:"info-row"},Aw={class:"info-val"},Ew={key:1,class:"info-row"},Iw={class:"info-val"},Lw={class:"info-val mono"},Pw={class:"info-val"},Mw={key:3,class:"info-empty"},Nw=xe({__name:"InfoPanel",props:{mode:{},status:{},sessionId:{},workDir:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,r=X(()=>n.mode==="status"?"会话状态":"Token 用量");function o(g){switch(g){case"auto":return"自动 (auto)";case"yolo":return"YOLO";case"manual":return"手动 (manual)";default:return g??"-"}}function i(g){return g?"开启":"关闭"}function l(g){return g!=null}function a(g){return l(g)?g.toLocaleString():"-"}function c(g){return l(g)?`${(g>1?g:g*100).toFixed(1)}%`:"-"}function u(g){return g?g.inputOther+g.output+g.inputCacheRead+g.inputCacheCreation:0}function f(g){return g!=null&&g.byModel?Object.entries(g.byModel).map(([d,m])=>({model:d,tokens:u(m),output:m.output,cacheRead:m.inputCacheRead})):[]}const p=X(()=>l(n.status.usage)||l(n.status.contextTokens));return(g,d)=>(k(),ze(Zr,{open:!0,title:r.value,onClose:d[0]||(d[0]=m=>s("close"))},{default:Qe(()=>{var m,b;return[e.mode==="status"?(k(),_(re,{key:0},[h("div",aw,[d[1]||(d[1]=h("span",{class:"info-key"},"会话 ID",-1)),h("span",cw,E(e.sessionId??"-"),1)]),h("div",uw,[d[2]||(d[2]=h("span",{class:"info-key"},"工作目录",-1)),h("span",fw,E(e.workDir??"-"),1)]),h("div",dw,[d[3]||(d[3]=h("span",{class:"info-key"},"模型",-1)),h("span",hw,E(e.status.model??"-"),1)]),h("div",pw,[d[4]||(d[4]=h("span",{class:"info-key"},"权限模式",-1)),h("span",gw,E(o(e.status.permission)),1)]),h("div",mw,[d[5]||(d[5]=h("span",{class:"info-key"},"思考级别",-1)),h("span",vw,E(e.status.thinkingLevel??"-"),1)]),h("div",yw,[d[6]||(d[6]=h("span",{class:"info-key"},"计划模式",-1)),h("span",bw,E(i(e.status.planMode)),1)]),h("div",kw,[d[7]||(d[7]=h("span",{class:"info-key"},"WolfPack 模式",-1)),h("span",ww,E(i(e.status.wolfpackMode)),1)]),h("div",_w,[d[8]||(d[8]=h("span",{class:"info-key"},"上下文",-1)),h("span",Sw,E(a(e.status.contextTokens))+" / "+E(a(e.status.maxContextTokens))+" ("+E(c(e.status.contextUsage))+")",1)])],64)):(k(),_(re,{key:1},[h("div",xw,[d[9]||(d[9]=h("span",{class:"info-key"},"上下文 Token",-1)),h("span",Cw,E(a(e.status.contextTokens))+" / "+E(a(e.status.maxContextTokens)),1)]),h("div",Tw,[d[10]||(d[10]=h("span",{class:"info-key"},"上下文占比",-1)),h("span",$w,E(c(e.status.contextUsage)),1)]),(m=e.status.usage)!=null&&m.total?(k(),_("div",Rw,[d[11]||(d[11]=h("span",{class:"info-key"},"累计 Token",-1)),h("span",Aw,E(a(u(e.status.usage.total))),1)])):V("",!0),(b=e.status.usage)!=null&&b.currentTurn?(k(),_("div",Ew,[d[12]||(d[12]=h("span",{class:"info-key"},"当前回合",-1)),h("span",Iw,E(a(u(e.status.usage.currentTurn))),1)])):V("",!0),f(e.status.usage).length?(k(),_(re,{key:2},[d[13]||(d[13]=h("div",{class:"info-subhead"},"按模型",-1)),(k(!0),_(re,null,Ve(f(e.status.usage),v=>(k(),_("div",{key:v.model,class:"info-row info-row-model"},[h("span",Lw,E(v.model),1),h("span",Pw,E(a(v.tokens))+"(输出 "+E(a(v.output))+" · 缓存读 "+E(a(v.cacheRead))+")",1)]))),128))],64)):V("",!0),p.value?V("",!0):(k(),_("div",Mw,"暂无用量数据"))],64))]}),_:1},8,["title"]))}}),Ow=Ce(Nw,[["__scopeId","data-v-407030a3"]]),Dw={class:"sd-search-wrap"},Bw={class:"sd-icon"},Gw=["aria-selected","onClick","onMousemove"],jw={class:"sd-title"},zw={class:"sd-meta"},Uw={class:"sd-time"},Fw={class:"sd-count"},Hw={key:0,class:"sd-active"},Ww={key:0,class:"sd-empty"},qw=xe({__name:"SearchSessionsDialog",props:{sessions:{},activeId:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,s=t,r=H(""),o=H(null),i=H(null),l=X(()=>{const m=r.value.trim().toLowerCase();return m?n.sessions.filter(b=>b.title.toLowerCase().includes(m)||b.sessionId.toLowerCase().includes(m)):n.sessions}),a=H(0);je(r,()=>{a.value=0}),je(l,()=>{a.value=0});function c(m){const b=l.value.length;return b===0?0:Math.max(0,Math.min(b-1,m))}async function u(){var b;await Lt();const m=(b=i.value)==null?void 0:b.querySelector('[aria-selected="true"]');m==null||m.scrollIntoView({block:"nearest"})}function f(m){a.value=c(a.value+m),u()}function p(){const m=l.value[a.value];m&&(s("select",m.sessionId),s("close"))}function g(m){m.key==="ArrowDown"?(m.preventDefault(),f(1)):m.key==="ArrowUp"?(m.preventDefault(),f(-1)):m.key==="Enter"&&(m.preventDefault(),p())}function d(m){const b=new Date(m),v=new Date;return b.toDateString()===v.toDateString()?b.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):b.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}return Jt(()=>{var m;(m=o.value)==null||m.focus()}),(m,b)=>(k(),ze(Zr,{open:!0,onClose:b[1]||(b[1]=v=>s("close"))},{header:Qe(()=>[h("div",Dw,[h("span",Bw,[W(me,{name:"search",size:19})]),st(h("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":b[0]||(b[0]=v=>r.value=v),class:"sd-input",type:"text",placeholder:"搜索会话...",id:"session-search-input",name:"session-search",autocomplete:"off",spellcheck:"false",onKeydown:g},null,544),[[mt,r.value]])])]),footer:Qe(()=>[...b[2]||(b[2]=[h("span",{class:"sd-hint"},"↑↓ 导航 · Enter 切换 · Esc 关闭",-1)])]),default:Qe(()=>[h("div",{ref_key:"listRef",ref:i,class:"sd-list",role:"listbox"},[(k(!0),_(re,null,Ve(l.value,(v,S)=>(k(),_("button",{key:v.sessionId,class:we(["sd-row",{on:S===a.value,active:v.sessionId===e.activeId}]),role:"option","aria-selected":S===a.value,onClick:C=>{s("select",v.sessionId),s("close")},onMousemove:C=>a.value=S},[h("span",jw,E(v.title||"New Session"),1),h("span",zw,[h("span",Uw,E(d(v.createdAt)),1),h("span",Fw,E(v.messageCount)+" 条",1),v.active?(k(),_("span",Hw,"●")):V("",!0)])],42,Gw))),128)),l.value.length===0?(k(),_("div",Ww,"没有匹配的会话")):V("",!0)],512)]),_:1}))}}),Vw=Ce(qw,[["__scopeId","data-v-62760c4c"]]),Kw=xe({__name:"ResizeHandle",props:{dragging:{type:Boolean}},setup(e){return(t,n)=>(k(),_("div",{class:we(["resize-handle",{dragging:e.dragging}]),role:"separator","aria-orientation":"vertical","aria-label":"拖拽调整宽度"},null,2))}}),Zw=Ce(Kw,[["__scopeId","data-v-11060aea"]]),Yw={class:"workbench-body"},Jw={class:"chat-main chat-inset"},Xw={class:"composer-dock"},ca="scream-sidebar-collapsed-v2",ua="scream-rightbar-open",Qw=xe({__name:"ChatView",setup(e){const{connectionStatus:t,messages:n,pendingApprovals:s,status:r,goal:o,todos:i,goalRequestPending:l,goalRequestError:a,sessionId:c,workDir:u,isBusy:f,isArchived:p,sessions:g,currentSessionId:d,gitStatus:m,models:b,sendPrompt:v,sendCommand:S,clearMessages:C,appendSystemMessage:T,abort:K,resolveApproval:Q,createSession:G,switchSession:de,deleteSession:F,exportSession:te,fetchGitStatus:pe,fetchSnapshot:D,switchModel:he,switchThinking:I,refineGoal:R,createGoal:Z,updateGoal:ie,pauseGoal:se,resumeGoal:Fe,cancelGoal:He,like:Pe,fetchLike:We,updateLike:Ge}=Ah(),Xt=H(null),ot=H(!1),et=H("status"),kt=X(()=>b.value.length>0);Dn("modelSwitchable",kt);const O=X(()=>{const ce=g.value.find(ue=>ue.sessionId===d.value);return(ce==null?void 0:ce.title)??null}),oe=H(!1),ye=H(!1);try{oe.value=localStorage.getItem(ca)==="1"}catch{}function tt(){return window.innerWidth<=640}function y(){if(tt()){ye.value=!ye.value;return}oe.value=!oe.value;try{localStorage.setItem(ca,oe.value?"1":"0")}catch{}}function w(ce){ye.value=!1,de(ce)}const A=H(!0);try{A.value=localStorage.getItem(ua)!=="0"}catch{}function N(){A.value=!A.value;try{localStorage.setItem(ua,A.value?"1":"0")}catch{}}const M=H(!0),L=H(!0);Dn("showThinking",M),Dn("showTools",L);const q=H(!1);function U(ce){(ce.metaKey||ce.ctrlKey)&&ce.key==="k"&&(ce.preventDefault(),q.value=!q.value)}Jt(()=>{window.addEventListener("keydown",U),We()}),xn(()=>window.removeEventListener("keydown",U));const{width:B,dragging:P,onPointerDown:le}=Eh({storageKey:"scream-sidebar-width",defaultWidth:360,min:300,max:440});function Y(){ye.value=!1,G()}function ne(ce){var ue;(ue=Xt.value)==null||ue.insertText(ce)}function ae(ce){D(),et.value=ce,ot.value=!0}function ke(){var ue;(((ue=Xt.value)==null?void 0:ue.openModelPicker())??!1)||T(`当前模型:${r.value.model??"unknown"}`)}function _e(ce,ue){switch(ce){case"compact":S("compact");break;case"model":ke();break;case"clear":C();break;case"new":G();break;case"help":T(Ph());break;case"auto":case"yes":case"plan":case"fork":case"title":case"btw":S(ce,ue);break;case"status":ae("status");break;case"usage":ae("usage");break;default:T(`未知命令:/${ce}`)}}return(ce,ue)=>(k(),_("div",{class:we(["workbench",{"sidebar-is-collapsed":oe.value}]),style:un({"--sidebar-width":J(B)+"px"})},[W(Hk,{sessions:J(g),"current-session-id":J(d),status:J(r),busy:J(f),collapsed:oe.value,"mobile-open":ye.value,onCreate:Y,onSwitch:w,onDelete:J(F),onExport:J(te),onToggle:y,onOpenSearch:ue[0]||(ue[0]=Ie=>q.value=!0),onShowInfo:ae,onHelp:ue[1]||(ue[1]=Ie=>_e("help"))},null,8,["sessions","current-session-id","status","busy","collapsed","mobile-open","onDelete","onExport"]),oe.value?V("",!0):(k(),ze(Zw,{key:0,class:"sidebar-resize",dragging:J(P),onPointerdown:J(le)},null,8,["dragging","onPointerdown"])),ye.value?(k(),_("div",{key:1,class:"sidebar-backdrop","aria-hidden":"true",onClick:ue[2]||(ue[2]=Ie=>ye.value=!1)})):V("",!0),W(Np,{"connection-status":J(t),status:J(r),busy:J(f),"git-status":J(m),onRefreshGit:J(pe),onToggleSidebar:y,onOpenModelPicker:ke},null,8,["connection-status","status","busy","git-status","onRefreshGit"]),h("main",Yw,[h("div",Jw,[W(Vp,{title:O.value,busy:J(f),onRename:ue[3]||(ue[3]=Ie=>J(S)("title",Ie)),onExport:ue[4]||(ue[4]=Ie=>J(d)&&J(te)(J(d))),onClear:J(C),onToggleRightbar:N},null,8,["title","busy","onClear"]),W(w1,{messages:J(n),busy:J(f),"work-dir":J(u),onEdit:ne,onPick:J(v)},null,8,["messages","busy","work-dir","onPick"]),h("div",Xw,[W(vk,{approvals:J(s),onResolve:J(Q)},null,8,["approvals","onResolve"]),W(sk,{ref_key:"composerRef",ref:Xt,busy:J(f),status:J(r),"session-id":J(c),models:J(b),onSend:J(v),onAbort:J(K),onCommand:_e,onSwitchModel:J(he),onSwitchThinking:J(I)},null,8,["busy","status","session-id","models","onSend","onAbort","onSwitchModel","onSwitchThinking"])])]),A.value?(k(),ze(lw,{key:0,class:"rightbar-host",busy:J(f),"session-id":J(c),"connection-status":J(t),archived:J(p),goal:J(o),todos:J(i),"goal-request-pending":J(l),"goal-request-error":J(a),"refine-goal":J(R),"create-goal":J(Z),"update-goal":J(ie),"pause-goal":J(se),"resume-goal":J(Fe),"cancel-goal":J(He),like:J(Pe),"update-like":J(Ge),onInsert:ne},null,8,["busy","session-id","connection-status","archived","goal","todos","goal-request-pending","goal-request-error","refine-goal","create-goal","update-goal","pause-goal","resume-goal","cancel-goal","like","update-like"])):V("",!0)]),ot.value?(k(),ze(Ow,{key:2,mode:et.value,status:J(r),"session-id":J(c),"work-dir":J(u),onClose:ue[5]||(ue[5]=Ie=>ot.value=!1)},null,8,["mode","status","session-id","work-dir"])):V("",!0),q.value?(k(),ze(Vw,{key:3,sessions:J(g),"active-id":J(d),onSelect:w,onClose:ue[6]||(ue[6]=Ie=>q.value=!1)},null,8,["sessions","active-id"])):V("",!0)],6))}}),e_=Ce(Qw,[["__scopeId","data-v-b18794b9"]]),t_={class:"toast-container"},n_=["onClick"],s_={class:"toast-icon"},r_={class:"toast-msg"},o_=xe({__name:"Toast",setup(e){const{toasts:t,removeToast:n}=Lc(),s={info:"ℹ",success:"✓",error:"✗",warning:"⚠"};return(r,o)=>(k(),ze(gi,{to:"body"},[h("div",t_,[W(ih,{name:"toast"},{default:Qe(()=>[(k(!0),_(re,null,Ve(J(t),i=>(k(),_("div",{key:i.id,class:we(["toast",`toast--${i.type}`]),onClick:l=>J(n)(i.id)},[h("span",s_,E(s[i.type]),1),h("span",r_,E(i.message),1)],10,n_))),128))]),_:1})])]))}}),i_=Ce(o_,[["__scopeId","data-v-7200727f"]]),l_={class:"app"},a_=xe({__name:"App",setup(e){const t=H("system"),n=H("dark");Dn("effectiveTheme",n),Dn("theme",t);const s={light:"#f7f8f7",dark:"#0d1117"};function r(){const a=document.documentElement,c=window.matchMedia("(prefers-color-scheme: dark)").matches,u=t.value==="system"?c?"dark":"light":t.value;n.value=u,a.dataset.theme=u;const f=document.querySelector('meta[name="theme-color"]');f&&f.setAttribute("content",s[u])}let o=null;function i(a){t.value=a;try{localStorage.setItem("scream-theme",a)}catch{}const c=document.documentElement;c.classList.add("theme-transition"),r(),o!==null&&clearTimeout(o),o=window.setTimeout(()=>c.classList.remove("theme-transition"),320)}Dn("setTheme",i),Jt(()=>{try{const a=localStorage.getItem("scream-theme");(a==="light"||a==="dark"||a==="system")&&(t.value=a)}catch{}r()}),je(t,r);const l=window.matchMedia("(prefers-color-scheme: dark)");return l.addEventListener("change",r),xn(()=>{l.removeEventListener("change",r),o!==null&&clearTimeout(o),document.documentElement.classList.remove("theme-transition")}),(a,c)=>(k(),_("div",l_,[W(e_),W(i_)]))}}),c_=Ce(a_,[["__scopeId","data-v-ba168d5b"]]);function u_(){const e=window.matchMedia("(prefers-reduced-motion: reduce)");document.addEventListener("pointerdown",t=>{if(e.matches||t.button!==0)return;const n=t.target instanceof Element?t.target:null,s=n==null?void 0:n.closest('button:not(:disabled), [role="button"]');if(!(s instanceof HTMLElement))return;const r=s.getBoundingClientRect();if(r.width===0||r.height===0)return;const o=Math.max(r.width,r.height)*2,i=document.createElement("span");i.className="ripple-ink",i.style.width=i.style.height=`${o}px`,i.style.left=`${t.clientX-r.left-o/2}px`,i.style.top=`${t.clientY-r.top-o/2}px`,s.classList.add("ripple-host"),s.append(i),i.addEventListener("animationend",()=>i.remove(),{once:!0})},{passive:!0})}u_();vh(c_).mount("#app");
|
|
90
|
+
//# sourceMappingURL=index-Ct3-d8xR.js.map
|