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
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var Lu=Object.defineProperty;var Mu=(e,t,n)=>t in e?Lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>Mu(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 ni(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Me={},Kn=[],Ot=()=>{},ua=()=>!1,Lr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Mr=e=>e.startsWith("onUpdate:"),Je=Object.assign,si=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Nu=Object.prototype.hasOwnProperty,Se=(e,t)=>Nu.call(e,t),ue=Array.isArray,Zn=e=>Ds(e)==="[object Map]",Nr=e=>Ds(e)==="[object Set]",qi=e=>Ds(e)==="[object Date]",me=e=>typeof e=="function",Be=e=>typeof e=="string",Bt=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",fa=e=>(Te(e)||me(e))&&me(e.then)&&me(e.catch),da=Object.prototype.toString,Ds=e=>da.call(e),Ou=e=>Ds(e).slice(8,-1),ha=e=>Ds(e)==="[object Object]",ri=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ms=ni(",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)))},Du=/-\w/g,yt=Or(e=>e.replace(Du,t=>t.slice(1).toUpperCase())),Bu=/\B([A-Z])/g,_n=Or(e=>e.replace(Bu,"-$1").toLowerCase()),Dr=Or(e=>e.charAt(0).toUpperCase()+e.slice(1)),so=Or(e=>e?`on${Dr(e)}`:""),Zt=(e,t)=>!Object.is(e,t),nr=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},pa=(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},Gu=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Wi;const Gr=()=>Wi||(Wi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function cn(e){if(ue(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Be(s)?Fu(s):cn(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(Be(e)||Te(e))return e}const ju=/;(?![^(]*\))/g,zu=/:([^]+)/,Uu=/\/\*[^]*?\*\//g;function Fu(e){const t={};return e.replace(Uu,"").split(ju).forEach(n=>{if(n){const s=n.split(zu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function be(e){let t="";if(Be(e))t=e;else if(ue(e))for(let n=0;n<e.length;n++){const s=be(e[n]);s&&(t+=s+" ")}else if(Te(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Hu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",qu=ni(Hu);function ga(e){return!!e||e===""}function Wu(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=Bt(e),s=Bt(t),n||s)return e===t;if(n=ue(e),s=ue(t),n||s)return n&&s?Wu(e,t):!1;if(n=Te(e),s=Te(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 Vu(e,t){return e.findIndex(n=>Bs(n,t))}const ma=e=>!!(e&&e.__v_isRef===!0),E=e=>Be(e)?e:e==null?"":ue(e)||Te(e)&&(e.toString===da||!me(e.toString))?ma(e)?E(e.value):JSON.stringify(e,va,2):String(e),va=(e,t)=>ma(t)?va(e,t.value):Zn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[ro(s,o)+" =>"]=r,n),{})}:Nr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ro(n))}:Bt(t)?ro(t):Te(t)&&!ue(t)&&!ha(t)?String(t):t,ro=(e,t="")=>{var n;return Bt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Ku(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 st;class Zu{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&&st&&(st.active?(this.parent=st,this.index=(st.scopes||(st.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=st;try{return st=this,t()}finally{st=n}}}on(){++this._on===1&&(this.prevScope=st,st=this)}off(){if(this._on>0&&--this._on===0){if(st===this)st=this.prevScope;else{let t=st;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 Yu(){return st}let Ne;const oo=new WeakSet;class ya{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,st&&(st.active?st.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,oo.has(this)&&(oo.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ka(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Vi(this),wa(this);const t=Ne,n=Dt;Ne=this,Dt=!0;try{return this.fn()}finally{_a(this),Ne=t,Dt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)li(t);this.deps=this.depsTail=void 0,Vi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?oo.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){To(this)&&this.run()}get dirty(){return To(this)}}let ba=0,vs,ys;function ka(e,t=!1){if(e.flags|=8,t){e.next=ys,ys=e;return}e.next=vs,vs=e}function oi(){ba++}function ii(){if(--ba>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 wa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function _a(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),li(s),Ju(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function To(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Sa(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Sa(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||!To(e))))return;e.flags|=2;const t=e.dep,n=Ne,s=Dt;Ne=e,Dt=!0;try{wa(e);const r=e.fn(e._value);(t.version===0||Zt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ne=n,Dt=s,_a(e),e.flags&=-3}}function li(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)li(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ju(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Dt=!0;const xa=[];function fn(){xa.push(Dt),Dt=!1}function dn(){const e=xa.pop();Dt=e===void 0?!0:e}function Vi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ne;Ne=void 0;try{t()}finally{Ne=n}}}let xs=0;class Xu{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 ai{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(!Ne||!Dt||Ne===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ne)n=this.activeLink=new Xu(Ne,this),Ne.deps?(n.prevDep=Ne.depsTail,Ne.depsTail.nextDep=n,Ne.depsTail=n):Ne.deps=Ne.depsTail=n,Ca(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=Ne.depsTail,n.nextDep=void 0,Ne.depsTail.nextDep=n,Ne.depsTail=n,Ne.deps===n&&(Ne.deps=s)}return n}trigger(t){this.version++,xs++,this.notify(t)}notify(t){oi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ii()}}}function Ca(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)Ca(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const $o=new WeakMap,Nn=Symbol(""),Ro=Symbol(""),Cs=Symbol("");function lt(e,t,n){if(Dt&&Ne){let s=$o.get(e);s||$o.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new ai),r.map=s,r.key=n),r.track()}}function nn(e,t,n,s,r,o){const i=$o.get(e);if(!i){xs++;return}const l=a=>{a&&a.trigger()};if(oi(),t==="clear")i.forEach(l);else{const a=ue(e),c=a&&ri(n);if(a&&n==="length"){const u=Number(s);i.forEach((d,p)=>{(p==="length"||p===Cs||!Bt(p)&&p>=u)&&l(d)})}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)),Zn(e)&&l(i.get(Ro)));break;case"delete":a||(l(i.get(Nn)),Zn(e)&&l(i.get(Ro)));break;case"set":Zn(e)&&l(i.get(Nn));break}}ii()}function Hn(e){const t=we(e);return t===e?t:(lt(t,"iterate",Cs),Lt(e)?t:t.map(Gt))}function jr(e){return lt(e=we(e),"iterate",Cs),e}function Vt(e,t){return hn(e)?ts(On(e)?Gt(t):t):Gt(t)}const Qu={__proto__:null,[Symbol.iterator](){return io(this,Symbol.iterator,e=>Vt(this,e))},concat(...e){return Hn(this).concat(...e.map(t=>ue(t)?Hn(t):t))},entries(){return io(this,"entries",e=>(e[1]=Vt(this,e[1]),e))},every(e,t){return Qt(this,"every",e,t,void 0,arguments)},filter(e,t){return Qt(this,"filter",e,t,n=>n.map(s=>Vt(this,s)),arguments)},find(e,t){return Qt(this,"find",e,t,n=>Vt(this,n),arguments)},findIndex(e,t){return Qt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Qt(this,"findLast",e,t,n=>Vt(this,n),arguments)},findLastIndex(e,t){return Qt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Qt(this,"forEach",e,t,void 0,arguments)},includes(...e){return lo(this,"includes",e)},indexOf(...e){return lo(this,"indexOf",e)},join(e){return Hn(this).join(e)},lastIndexOf(...e){return lo(this,"lastIndexOf",e)},map(e,t){return Qt(this,"map",e,t,void 0,arguments)},pop(){return is(this,"pop")},push(...e){return is(this,"push",e)},reduce(e,...t){return Ki(this,"reduce",e,t)},reduceRight(e,...t){return Ki(this,"reduceRight",e,t)},shift(){return is(this,"shift")},some(e,t){return Qt(this,"some",e,t,void 0,arguments)},splice(...e){return is(this,"splice",e)},toReversed(){return Hn(this).toReversed()},toSorted(e){return Hn(this).toSorted(e)},toSpliced(...e){return Hn(this).toSpliced(...e)},unshift(...e){return is(this,"unshift",e)},values(){return io(this,"values",e=>Vt(this,e))}};function io(e,t,n){const s=jr(e),r=s[t]();return s!==e&&!Lt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const ef=Array.prototype;function Qt(e,t,n,s,r,o){const i=jr(e),l=i!==e&&!Lt(e),a=i[t];if(a!==ef[t]){const d=a.apply(e,o);return l?Gt(d):d}let c=n;i!==e&&(l?c=function(d,p){return n.call(this,Vt(e,d),p,e)}:n.length>2&&(c=function(d,p){return n.call(this,d,p,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function Ki(e,t,n,s){const r=jr(e),o=r!==e&&!Lt(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,d){return l&&(l=!1,c=Vt(e,c)),n.call(this,c,Vt(e,u),d,e)}):n.length>3&&(i=function(c,u,d){return n.call(this,c,u,d,e)}));const a=r[t](i,...s);return l?Vt(e,a):a}function lo(e,t,n){const s=we(e);lt(s,"iterate",Cs);const r=s[t](...n);return(r===-1||r===!1)&&di(n[0])?(n[0]=we(n[0]),s[t](...n)):r}function is(e,t,n=[]){fn(),oi();const s=we(e)[t].apply(e,n);return ii(),dn(),s}const tf=ni("__proto__,__v_isRef,__isVue"),Ta=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Bt));function nf(e){Bt(e)||(e=String(e));const t=we(this);return lt(t,"has",e),t.hasOwnProperty(e)}class $a{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?hf:Ia:o?Ea:Aa).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=ue(t);if(!r){let a;if(i&&(a=Qu[n]))return a;if(n==="hasOwnProperty")return nf}const l=Reflect.get(t,n,ft(t)?t:s);if((Bt(n)?Ta.has(n):tf(n))||(r||lt(t,"get",n),o))return l;if(ft(l)){const a=i&&ri(n)?l:l.value;return r&&Te(a)?Eo(a):a}return Te(l)?r?Eo(l):ui(l):l}}class Ra extends $a{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=ue(t)&&ri(n);if(!this._isShallow){const c=hn(o);if(!Lt(s)&&!hn(s)&&(o=we(o),s=we(s)),!i&&ft(o)&&!ft(s))return c||(o.value=s),!0}const l=i?Number(n)<t.length:Se(t,n),a=Reflect.set(t,n,s,ft(t)?t:r);return t===we(r)&&a&&(l?Zt(s,o)&&nn(t,"set",n,s):nn(t,"add",n,s)),a}deleteProperty(t,n){const s=Se(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&nn(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Bt(n)||!Ta.has(n))&<(t,"has",n),s}ownKeys(t){return lt(t,"iterate",ue(t)?"length":Nn),Reflect.ownKeys(t)}}class sf extends $a{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const rf=new Ra,of=new sf,lf=new Ra(!0);const Ao=e=>e,qs=e=>Reflect.getPrototypeOf(e);function af(e,t,n){return function(...s){const r=this.__v_raw,o=we(r),i=Zn(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?Ao:t?ts:Gt;return!t&<(o,"iterate",a?Ro:Nn),Je(Object.create(c),{next(){const{value:d,done:p}=c.next();return p?{value:d,done:p}:{value:l?[u(d[0]),u(d[1])]:u(d),done:p}}})}}function Ws(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function cf(e,t){const n={get(r){const o=this.__v_raw,i=we(o),l=we(r);e||(Zt(r,l)&<(i,"get",r),lt(i,"get",l));const{has:a}=qs(i),c=t?Ao:e?ts:Gt;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&<(we(r),"iterate",Nn),r.size},has(r){const o=this.__v_raw,i=we(o),l=we(r);return e||(Zt(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=we(l),c=t?Ao:e?ts:Gt;return!e&<(a,"iterate",Nn),l.forEach((u,d)=>r.call(o,c(u),c(d),i))}};return Je(n,e?{add:Ws("add"),set:Ws("set"),delete:Ws("delete"),clear:Ws("clear")}:{add(r){const o=we(this),i=qs(o),l=we(r),a=!t&&!Lt(r)&&!hn(r)?l:r;return i.has.call(o,a)||Zt(r,a)&&i.has.call(o,r)||Zt(l,a)&&i.has.call(o,l)||(o.add(a),nn(o,"add",a,a)),this},set(r,o){!t&&!Lt(o)&&!hn(o)&&(o=we(o));const i=we(this),{has:l,get:a}=qs(i);let c=l.call(i,r);c||(r=we(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?Zt(o,u)&&nn(i,"set",r,o):nn(i,"add",r,o),this},delete(r){const o=we(this),{has:i,get:l}=qs(o);let a=i.call(o,r);a||(r=we(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&nn(o,"delete",r,void 0),c},clear(){const r=we(this),o=r.size!==0,i=r.clear();return o&&nn(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=af(r,e,t)}),n}function ci(e,t){const n=cf(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Se(n,r)&&r in s?n:s,r,o)}const uf={get:ci(!1,!1)},ff={get:ci(!1,!0)},df={get:ci(!0,!1)};const Aa=new WeakMap,Ea=new WeakMap,Ia=new WeakMap,hf=new WeakMap;function pf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ui(e){return hn(e)?e:fi(e,!1,rf,uf,Aa)}function gf(e){return fi(e,!1,lf,ff,Ea)}function Eo(e){return fi(e,!0,of,df,Ia)}function fi(e,t,n,s,r){if(!Te(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=pf(Ou(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 hn(e)?On(e.__v_raw):!!(e&&e.__v_isReactive)}function hn(e){return!!(e&&e.__v_isReadonly)}function Lt(e){return!!(e&&e.__v_isShallow)}function di(e){return e?!!e.__v_raw:!1}function we(e){const t=e&&e.__v_raw;return t?we(t):e}function mf(e){return!Se(e,"__v_skip")&&Object.isExtensible(e)&&pa(e,"__v_skip",!0),e}const Gt=e=>Te(e)?ui(e):e,ts=e=>Te(e)?Eo(e):e;function ft(e){return e?e.__v_isRef===!0:!1}function q(e){return vf(e,!1)}function vf(e,t){return ft(e)?e:new yf(e,t)}class yf{constructor(t,n){this.dep=new ai,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:we(t),this._value=n?t:Gt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Lt(t)||hn(t);t=s?t:we(t),Zt(t,n)&&(this._rawValue=t,this._value=s?t:Gt(t),this.dep.trigger())}}function X(e){return ft(e)?e.value:e}function bf(e){return me(e)?e():X(e)}const kf={get:(e,t,n)=>t==="__v_raw"?e:X(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,kf)}class wf{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ai(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)&&Ne!==this)return ka(this,!0),!0}get value(){const t=this.dep.track();return Sa(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function _f(e,t,n=!1){let s,r;return me(e)?s=e:(s=e.get,r=e.set),new wf(s,r,n)}const Vs={},ar=new WeakMap;let En;function Sf(e,t=!1,n=En){if(n){let s=ar.get(n);s||ar.set(n,s=[]),s.push(e)}}function xf(e,t,n=Me){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=T=>r?T:Lt(T)||r===!1||r===0?sn(T,1):sn(T);let u,d,p,g,f=!1,m=!1;if(ft(e)?(d=()=>e.value,f=Lt(e)):On(e)?(d=()=>c(e),f=!0):ue(e)?(m=!0,f=e.some(T=>On(T)||Lt(T)),d=()=>e.map(T=>{if(ft(T))return T.value;if(On(T))return c(T);if(me(T))return a?a(T,2):T()})):me(e)?t?d=a?()=>a(e,2):e:d=()=>{if(p){fn();try{p()}finally{dn()}}const T=En;En=u;try{return a?a(e,3,[g]):e(g)}finally{En=T}}:d=Ot,t&&r){const T=d,W=r===!0?1/0:r;d=()=>sn(T(),W)}const b=Yu(),v=()=>{u.stop(),b&&b.active&&si(b.effects,u)};if(o&&t){const T=t;t=(...W)=>{const ee=T(...W);return v(),ee}}let S=m?new Array(e.length).fill(Vs):Vs;const C=T=>{if(!(!(u.flags&1)||!u.dirty&&!T))if(t){const W=u.run();if(T||r||f||(m?W.some((ee,G)=>Zt(ee,S[G])):Zt(W,S))){p&&p();const ee=En;En=u;try{const G=[W,S===Vs?void 0:m&&S[0]===Vs?[]:S,g];S=W,a?a(t,3,G):t(...G)}finally{En=ee}}}else u.run()};return l&&l(C),u=new ya(d),u.scheduler=i?()=>i(C,!1):C,g=T=>Sf(T,!1,u),p=u.onStop=()=>{const T=ar.get(u);if(T){if(a)a(T,4);else for(const W of T)W();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 sn(e,t=1/0,n){if(t<=0||!Te(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ft(e))sn(e.value,t,n);else if(ue(e))for(let s=0;s<e.length;s++)sn(e[s],t,n);else if(Nr(e)||Zn(e))e.forEach(s=>{sn(s,t,n)});else if(ha(e)){for(const s in e)sn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&sn(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 Nt(e,t,n,s){if(me(e)){const r=Gs(e,t,n,s);return r&&fa(r)&&r.catch(o=>{zr(o,t,n)}),r}if(ue(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Nt(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||Me;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 d=0;d<u.length;d++)if(u[d](e,a,c)===!1)return}l=l.parent}if(o){fn(),Gs(o,null,10,[e,a,c]),dn();return}}Cf(e,n,r,s,i)}function Cf(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const mt=[];let Wt=-1;const Yn=[];let bn=null,qn=0;const La=Promise.resolve();let cr=null;function It(e){const t=cr||La;return e?t.then(this?e.bind(this):e):t}function Tf(e){let t=Wt+1,n=mt.length;for(;t<n;){const s=t+n>>>1,r=mt[s],o=Ts(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function hi(e){if(!(e.flags&1)){const t=Ts(e),n=mt[mt.length-1];!n||!(e.flags&2)&&t>=Ts(n)?mt.push(e):mt.splice(Tf(t),0,e),e.flags|=1,Ma()}}function Ma(){cr||(cr=La.then(Da))}function Na(e){ue(e)?Yn.push(...e):bn&&e.id===-1?bn.splice(qn+1,0,e):e.flags&1||(Yn.push(e),e.flags|=1),Ma()}function Zi(e,t,n=Wt+1){for(;n<mt.length;n++){const s=mt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;mt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Oa(e){if(Yn.length){const t=[...new Set(Yn)].sort((n,s)=>Ts(n)-Ts(s));if(Yn.length=0,bn){bn.push(...t);return}for(bn=t,qn=0;qn<bn.length;qn++){const n=bn[qn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}bn=null,qn=0}}const Ts=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Da(e){try{for(Wt=0;Wt<mt.length;Wt++){const t=mt[Wt];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(;Wt<mt.length;Wt++){const t=mt[Wt];t&&(t.flags&=-2)}Wt=-1,mt.length=0,Oa(),cr=null,(mt.length||Yn.length)&&Da()}}let rt=null,Ba=null;function ur(e){const t=rt;return rt=e,Ba=e&&e.type.__scopeId||null,t}function nt(e,t=rt,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&hr(-1);const o=ur(t),i=un.length;let l;try{l=e(...r)}finally{for(let a=un.length;a>i;a--)bi();ur(o),s._d&&hr(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function it(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=Me]=t[r];o&&(me(o)&&(o={mounted:o,updated:o}),o.deep&&sn(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&&(fn(),Nt(a,n,8,[e.el,l,e,t]),dn())}}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 Mt(e,t,n=!1){const s=Vr();if(s||Xn){let r=Xn?Xn._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&&me(t)?t.call(s&&s.proxy):t}}const $f=Symbol.for("v-scx"),Rf=()=>Mt($f);function Ge(e,t,n){return Ga(e,t,n)}function Ga(e,t,n=Me){const{immediate:s,deep:r,flush:o,once:i}=n,l=Je({},n),a=t&&s||!t&&o!=="post";let c;if(Es){if(o==="sync"){const g=Rf();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!a){const g=()=>{};return g.stop=Ot,g.resume=Ot,g.pause=Ot,g}}const u=ct;l.call=(g,f,m)=>Nt(g,u,f,m);let d=!1;o==="post"?l.scheduler=g=>{gt(g,u&&u.suspense)}:o!=="sync"&&(d=!0,l.scheduler=(g,f)=>{f?g():hi(g)}),l.augmentJob=g=>{t&&(g.flags|=4),d&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const p=xf(e,t,l);return Es&&(c?c.push(p):a&&p()),p}function Af(e,t,n){const s=this.proxy,r=Be(e)?e.includes(".")?ja(s,e):()=>s[e]:e.bind(s,s);let o;me(t)?o=t:(o=t.handler,n=t);const i=js(this),l=Ga(r,o.bind(s),n);return i(),l}function ja(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 vn=new WeakMap,za=Symbol("_vte"),Ua=e=>e.__isTeleport,In=e=>e&&(e.disabled||e.disabled===""),Ef=e=>e&&(e.defer||e.defer===""),Yi=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ji=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Io=(e,t)=>{const n=e&&e.to;return Be(n)?t?t(n):null:n},If={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,a,c){const{mc:u,pc:d,pbc:p,o:{insert:g,querySelector:f,createText:m,createComment:b,parentNode:v}}=c,S=In(t.props);let{dynamicChildren:C}=t;const T=(G,fe,U)=>{G.shapeFlag&16&&u(G.children,fe,U,r,o,i,l,a)},W=(G=t)=>{const fe=In(G.props),U=G.target=Io(G.props,f),ne=Po(U,G,m,g);U&&(i!=="svg"&&Yi(U)?i="svg":i!=="mathml"&&Ji(U)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(U),fe||(T(G,U,ne),ds(G,!1)))},ee=G=>{const fe=()=>{if(vn.get(G)===fe){if(vn.delete(G),In(G.props)){const U=v(G.el)||n;T(G,U,G.anchor),ds(G,!0)}W(G)}};vn.set(G,fe),gt(fe,o)};if(e==null){const G=t.el=m(""),fe=t.anchor=m("");if(g(G,n,s),g(fe,n,s),Ef(t.props)||o&&o.pendingBranch){ee(t);return}S&&(T(t,n,fe),ds(t,!0)),W()}else{t.el=e.el;const G=t.anchor=e.anchor,fe=vn.get(e);if(fe){fe.flags|=8,vn.delete(e),ee(t);return}t.targetStart=e.targetStart;const U=t.target=e.target,ne=t.targetAnchor=e.targetAnchor,pe=In(e.props),D=pe?n:U,de=pe?G:ne;if(i==="svg"||Yi(U)?i="svg":(i==="mathml"||Ji(U))&&(i="mathml"),C?(p(e.dynamicChildren,C,D,r,o,i,l),yi(e,t,!0)):a||d(e,t,D,de,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=Io(t.props,f);I&&(t.target=I,Ks(t,I,null,c,0))}else pe&&Ks(t,U,ne,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:d,props:p}=e,g=In(p),f=o||!g,m=vn.get(e);if(m&&(m.flags|=8,vn.delete(e)),d&&(r(c),r(u)),o&&r(a),!m&&(g||d)&&i&16)for(let b=0;b<l.length;b++){const v=l[b];s(v,t,n,f,!!v.dynamicChildren)}},move:Ks,hydrate:Pf};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,d=o===2;if(d&&s(i,t,n),!vn.has(e)&&(!d||In(u))&&a&16)for(let p=0;p<c.length;p++)r(c[p],t,n,2);d&&s(l,t,n)}function Pf(e,t,n,s,r,o,{o:{nextSibling:i,parentNode:l,querySelector:a,insert:c,createText:u}},d){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=d(i(b),v,l(b),n,s,r,o)}const f=t.target=Io(t.props,a),m=In(t.props);if(f){const b=f._lpa||f.firstChild;t.shapeFlag&16&&(m?(g(e,t),p(f,b),t.targetAnchor||Po(f,t,u,c,l(e)===f?e:null)):(t.anchor=i(e),p(f,b),t.targetAnchor||Po(f,t,u,c),d(b&&i(b),t,f,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 pi=If;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[za]=i,e&&(s(o,e,r),s(i,e,r)),i}const Et=Symbol("_leaveCb"),ls=Symbol("_enterCb");function Fa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Jt(()=>{e.isMounted=!0}),Sn(()=>{e.isUnmounting=!0}),e}const Rt=[Function,Array],Ha={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},Lf={name:"BaseTransition",props:Ha,setup(e,{slots:t}){const n=Vr(),s=Fa();return()=>{const r=t.default&&gi(t.default(),!0),o=r&&r.length?Wa(r):n.subTree?K():void 0;if(!o)return;const i=we(e),{mode:l}=i;if(s.isLeaving)return ao(o);const a=Xi(o);if(!a)return ao(o);let c=$s(a,i,s,n,d=>c=d);a.type!==at&&Gn(a,c);let u=n.subTree&&Xi(n.subTree);if(u&&u.type!==at&&!Pn(u,a)&&qa(n).type!==at){let d=$s(u,i,s,n);if(Gn(u,d),l==="out-in"&&a.type!==at)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},ao(o);l==="in-out"&&a.type!==at?d.delayLeave=(p,g,f)=>{const m=Va(s,u);m[String(u.key)]=u,p[Et]=()=>{g(),p[Et]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{f(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Wa(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==at){t=n;break}}return t}const Mf=Lf;function Va(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:d,onBeforeLeave:p,onLeave:g,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:b,onAppear:v,onAfterAppear:S,onAppearCancelled:C}=t,T=String(e.key),W=Va(n,e),ee=(U,ne)=>{U&&Nt(U,s,9,ne)},G=(U,ne)=>{const pe=ne[1];ee(U,ne),ue(U)?U.every(D=>D.length<=1)&&pe():U.length<=1&&pe()},fe={mode:i,persisted:l,beforeEnter(U){let ne=a;if(!n.isMounted)if(o)ne=b||a;else return;U[Et]&&U[Et](!0);const pe=W[T];pe&&Pn(e,pe)&&pe.el[Et]&&pe.el[Et](),ee(ne,[U])},enter(U){if(W[T]===e)return;let ne=c,pe=u,D=d;if(!n.isMounted)if(o)ne=v||c,pe=S||u,D=C||d;else return;let de=!1;U[ls]=R=>{de||(de=!0,R?ee(D,[U]):ee(pe,[U]),fe.delayedLeave&&fe.delayedLeave(),U[ls]=void 0)};const I=U[ls].bind(null,!1);ne?G(ne,[U,I]):I()},leave(U,ne){const pe=String(e.key);if(U[ls]&&U[ls](!0),n.isUnmounting)return ne();ee(p,[U]);let D=!1;U[Et]=I=>{D||(D=!0,ne(),I?ee(m,[U]):ee(f,[U]),U[Et]=void 0,W[pe]===e&&delete W[pe])};const de=U[Et].bind(null,!1);W[pe]=e,g?G(g,[U,de]):de()},clone(U){const ne=$s(U,t,n,s,r);return r&&r(ne),ne}};return fe}function ao(e){if(Ur(e))return e=wn(e),e.children=null,e}function Xi(e){if(!Ur(e))return Ua(e.type)&&e.children?Wa(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&&me(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 gi(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===ie?(i.patchFlag&128&&r++,s=s.concat(gi(i.children,t,l))):(t||i.type!==at)&&s.push(l!=null?wn(i,{key:l}):i)}if(r>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function Re(e,t){return me(e)?Je({name:e.name},t,{setup:e}):e}function Ka(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Qi(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(ue(e)){e.forEach((m,b)=>bs(m,t&&(ue(t)?t[b]:t),n,s,r));return}if(Jn(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===Me?l.refs={}:l.refs,d=l.setupState,p=we(d),g=d===Me?ua:m=>Qi(u,m)?!1:Se(p,m),f=(m,b)=>!(b&&Qi(u,b));if(c!=null&&c!==a){if(el(t),Be(c))u[c]=null,g(c)&&(d[c]=null);else if(ft(c)){const m=t;f(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(me(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)?d[a]:u[a]:f()||!e.k?a.value:u[e.k];if(r)ue(S)&&si(S,o);else if(ue(S))S.includes(o)||S.push(o);else if(m)u[a]=[o],g(a)&&(d[a]=u[a]);else{const C=[o];f(a,e.k)&&(a.value=C),e.k&&(u[e.k]=C)}}else m?(u[a]=i,g(a)&&(d[a]=i)):b&&(f(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 el(e),v()}}}function el(e){const t=fr.get(e);t&&(t.flags|=8,fr.delete(e))}Gr().requestIdleCallback;Gr().cancelIdleCallback;const Jn=e=>!!e.type.__asyncLoader,Ur=e=>e.type.__isKeepAlive;function Nf(e,t){Za(e,"a",t)}function Of(e,t){Za(e,"da",t)}function Za(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)&&Df(s,t,n,r),r=r.parent}}function Df(e,t,n,s){const r=Fr(t,e,s,!0);Hr(()=>{si(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)=>{fn();const l=js(n),a=Nt(t,n,e,i);return l(),dn(),a});return s?r.unshift(o):r.push(o),o}}const pn=e=>(t,n=ct)=>{(!Es||e==="sp")&&Fr(e,(...s)=>t(...s),n)},Bf=pn("bm"),Jt=pn("m"),Ya=pn("bu"),Ja=pn("u"),Sn=pn("bum"),Hr=pn("um"),Gf=pn("sp"),jf=pn("rtg"),zf=pn("rtc");function Uf(e,t=ct){Fr("ec",e,t)}const Ff="components",Xa=Symbol.for("v-ndc");function Hf(e){return Be(e)?qf(Ff,e,!1)||e:e||Xa}function qf(e,t,n=!0,s=!1){const r=rt||ct;if(r){const o=r.type;{const l=Ad(o,!1);if(l&&(l===t||l===yt(t)||l===Dr(yt(t))))return o}const i=tl(r[e]||o[e],t)||tl(r.appContext[e],t);return!i&&s?o:i}}function tl(e,t){return e&&(e[t]||e[yt(t)]||e[Dr(yt(t))])}function Ye(e,t,n,s){let r;const o=n,i=ue(e);if(i||Be(e)){const l=i&&On(e);let a=!1,c=!1;l&&(a=!Lt(e),c=hn(e),e=jr(e)),r=new Array(e.length);for(let u=0,d=e.length;u<d;u++)r[u]=t(a?c?ts(Gt(e[u])):Gt(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(Te(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&&Jn(rt.parent)&&rt.parent.ce){const c=n,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),k(),je(ie,null,[H("slot",c,s&&s())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=un.length;k();let a;try{const c=i&&Qa(i(n)),u=n.key||o||c&&c.key;a=je(ie,{key:(u&&!Bt(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=un.length;u>l;u--)bi();throw c}finally{i&&i._c&&(i._d=!0)}return a}function Qa(e){return e.some(t=>As(t)?!(t.type===at||t.type===ie&&!Qa(t.children)):!0)?e:null}const Lo=e=>e?yc(e)?Kr(e):Lo(e.parent):null,ks=Je(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=>Lo(e.parent),$root:e=>Lo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>tc(e),$forceUpdate:e=>e.f||(e.f=()=>{hi(e.update)}),$nextTick:e=>e.n||(e.n=It.bind(e.proxy)),$watch:e=>Af.bind(e)}),co=(e,t)=>e!==Me&&!e.__isScriptSetup&&Se(e,t),Wf={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(co(s,t))return i[t]=1,s[t];if(r!==Me&&Se(r,t))return i[t]=2,r[t];if(Se(o,t))return i[t]=3,o[t];if(n!==Me&&Se(n,t))return i[t]=4,n[t];Mo&&(i[t]=0)}}const c=ks[t];let u,d;if(c)return t==="$attrs"&<(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==Me&&Se(n,t))return i[t]=4,n[t];if(d=a.config.globalProperties,Se(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return co(r,t)?(r[t]=n,!0):s!==Me&&Se(s,t)?(s[t]=n,!0):Se(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!==Me&&l[0]!=="$"&&Se(e,l)||co(t,l)||Se(o,l)||Se(s,l)||Se(ks,l)||Se(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Se(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function nl(e){return ue(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Mo=!0;function Vf(e){const t=tc(e),n=e.proxy,s=e.ctx;Mo=!1,t.beforeCreate&&sl(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:g,updated:f,activated:m,deactivated:b,beforeDestroy:v,beforeUnmount:S,destroyed:C,unmounted:T,render:W,renderTracked:ee,renderTriggered:G,errorCaptured:fe,serverPrefetch:U,expose:ne,inheritAttrs:pe,components:D,directives:de,filters:I}=t;if(c&&Kf(c,s,null),i)for(const ae in i){const oe=i[ae];me(oe)&&(s[ae]=oe.bind(n))}if(r){const ae=r.call(n,n);Te(ae)&&(e.data=ui(ae))}if(Mo=!0,o)for(const ae in o){const oe=o[ae],He=me(oe)?oe.bind(n,n):me(oe.get)?oe.get.bind(n,n):Ot,qe=!me(oe)&&me(oe.set)?oe.set.bind(n):Ot,Ee=Q({get:He,set:qe});Object.defineProperty(s,ae,{enumerable:!0,configurable:!0,get:()=>Ee.value,set:ze=>Ee.value=ze})}if(l)for(const ae in l)ec(l[ae],s,n,ae);if(a){const ae=me(a)?a.call(n):a;Reflect.ownKeys(ae).forEach(oe=>{Dn(oe,ae[oe])})}u&&sl(u,e,"c");function Z(ae,oe){ue(oe)?oe.forEach(He=>ae(He.bind(n))):oe&&ae(oe.bind(n))}if(Z(Bf,d),Z(Jt,p),Z(Ya,g),Z(Ja,f),Z(Nf,m),Z(Of,b),Z(Uf,fe),Z(zf,ee),Z(jf,G),Z(Sn,S),Z(Hr,T),Z(Gf,U),ue(ne))if(ne.length){const ae=e.exposed||(e.exposed={});ne.forEach(oe=>{Object.defineProperty(ae,oe,{get:()=>n[oe],set:He=>n[oe]=He,enumerable:!0})})}else e.exposed||(e.exposed={});W&&e.render===Ot&&(e.render=W),pe!=null&&(e.inheritAttrs=pe),D&&(e.components=D),de&&(e.directives=de),U&&Ka(e)}function Kf(e,t,n=Ot){ue(e)&&(e=No(e));for(const s in e){const r=e[s];let o;Te(r)?"default"in r?o=Mt(r.from||s,r.default,!0):o=Mt(r.from||s):o=Mt(r),ft(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function sl(e,t,n){Nt(ue(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ec(e,t,n,s){let r=s.includes(".")?ja(n,s):()=>n[s];if(Be(e)){const o=t[e];me(o)&&Ge(r,o)}else if(me(e))Ge(r,e.bind(n));else if(Te(e))if(ue(e))e.forEach(o=>ec(o,t,n,s));else{const o=me(e.handler)?e.handler.bind(n):t[e.handler];me(o)&&Ge(r,o,e)}}function tc(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)),Te(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=Zf[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Zf={data:rl,props:ol,emits:ol,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:Jf,provide:rl,inject:Yf};function rl(e,t){return t?e?function(){return Je(me(e)?e.call(this,this):e,me(t)?t.call(this,this):t)}:t:e}function Yf(e,t){return hs(No(e),No(t))}function No(e){if(ue(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?Je(Object.create(null),e,t):t}function ol(e,t){return e?ue(e)&&ue(t)?[...new Set([...e,...t])]:Je(Object.create(null),nl(e),nl(t??{})):t}function Jf(e,t){if(!e)return t;if(!t)return e;const n=Je(Object.create(null),e);for(const s in t)n[s]=pt(e[s],t[s]);return n}function nc(){return{app:null,config:{isNativeTag:ua,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 Xf=0;function Qf(e,t){return function(s,r=null){me(s)||(s=Je({},s)),r!=null&&!Te(r)&&(r=null);const o=nc(),i=new WeakSet,l=[];let a=!1;const c=o.app={_uid:Xf++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:Id,get config(){return o.config},set config(u){},use(u,...d){return i.has(u)||(u&&me(u.install)?(i.add(u),u.install(c,...d)):me(u)&&(i.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,p){if(!a){const g=c._ceVNode||H(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&&(Nt(l,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=Xn;Xn=c;try{return u()}finally{Xn=d}}};return c}}let Xn=null;const ed=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yt(t)}Modifiers`]||e[`${_n(t)}Modifiers`];function td(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Me;let r=n;const o=t.startsWith("update:"),i=o&&ed(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=so(t)]||s[l=so(yt(t))];!a&&o&&(a=s[l=so(_n(t))]),a&&Nt(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,Nt(c,e,6,r)}}const nd=new WeakMap;function sc(e,t,n=!1){const s=n?nd:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!me(e)){const a=c=>{const u=sc(c,t,!0);u&&(l=!0,Je(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(Te(e)&&s.set(e,null),null):(ue(o)?o.forEach(a=>i[a]=null):Je(i,o),Te(e)&&s.set(e,i),i)}function qr(e,t){return!e||!Lr(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Se(e,t[0].toLowerCase()+t.slice(1))||Se(e,_n(t))||Se(e,t))}function il(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:d,data:p,setupState:g,ctx:f,inheritAttrs:m}=e,b=ur(e);let v,S;try{if(n.shapeFlag&4){const T=r||s,W=T;v=Kt(c.call(W,T,u,d,g,p,f)),S=l}else{const T=t;v=Kt(T.length>1?T(d,{attrs:l,slots:i,emit:a}):T(d,null)),S=t.props?l:sd(l)}}catch(T){un.length=0,zr(T,e,1),v=H(at)}let C=v;if(S&&m!==!1){const T=Object.keys(S),{shapeFlag:W}=C;T.length&&W&7&&(o&&T.some(Mr)&&(S=rd(S,o)),C=wn(C,S,!1,!0))}return n.dirs&&(C=wn(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 sd=e=>{let t;for(const n in e)(n==="class"||n==="style"||Lr(n))&&((t||(t={}))[n]=e[n]);return t},rd=(e,t)=>{const n={};for(const s in e)(!Mr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function od(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?ll(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const p=u[d];if(rc(i,s,p)&&!qr(c,p))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?ll(s,i,c):!0:!!i;return!1}function ll(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(rc(t,e,o)&&!qr(n,o))return!0}return!1}function rc(e,t,n){const s=e[n],r=t[n];return n==="style"&&Te(s)&&Te(r)?!Bs(s,r):s!==r}function id({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 oc={},ic=()=>Object.create(oc),lc=e=>Object.getPrototypeOf(e)===oc;function ld(e,t,n,s=!1){const r={},o=ic();e.propsDefaults=Object.create(null),ac(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:gf(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function ad(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=we(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let p=u[d];if(qr(e.emitsOptions,p))continue;const g=t[p];if(a)if(Se(o,p))g!==o[p]&&(o[p]=g,c=!0);else{const f=yt(p);r[f]=Oo(a,l,f,g,e,!1)}else g!==o[p]&&(o[p]=g,c=!0)}}}else{ac(e,t,r,o)&&(c=!0);let u;for(const d in l)(!t||!Se(t,d)&&((u=_n(d))===d||!Se(t,u)))&&(a?n&&(n[d]!==void 0||n[u]!==void 0)&&(r[d]=Oo(a,l,d,void 0,e,!0)):delete r[d]);if(o!==l)for(const d in o)(!t||!Se(t,d))&&(delete o[d],c=!0)}c&&nn(e.attrs,"set","")}function ac(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&&Se(r,u=yt(a))?!o||!o.includes(u)?n[u]=c:(l||(l={}))[u]=c:qr(e.emitsOptions,a)||(!(a in s)||c!==s[a])&&(s[a]=c,i=!0)}if(o){const a=we(n),c=l||Me;for(let u=0;u<o.length;u++){const d=o[u];n[d]=Oo(r,a,d,c[d],e,!Se(c,d))}}return i}function Oo(e,t,n,s,r,o){const i=e[n];if(i!=null){const l=Se(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&me(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===_n(n))&&(s=!0))}return s}const cd=new WeakMap;function cc(e,t,n=!1){const s=n?cd:t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!me(e)){const u=d=>{a=!0;const[p,g]=cc(d,t,!0);Je(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 Te(e)&&s.set(e,Kn),Kn;if(ue(o))for(let u=0;u<o.length;u++){const d=yt(o[u]);al(d)&&(i[d]=Me)}else if(o)for(const u in o){const d=yt(u);if(al(d)){const p=o[u],g=i[d]=ue(p)||me(p)?{type:p}:Je({},p),f=g.type;let m=!1,b=!0;if(ue(f))for(let v=0;v<f.length;++v){const S=f[v],C=me(S)&&S.name;if(C==="Boolean"){m=!0;break}else C==="String"&&(b=!1)}else m=me(f)&&f.name==="Boolean";g[0]=m,g[1]=b,(m||Se(g,"default"))&&l.push(d)}}const c=[i,l];return Te(e)&&s.set(e,c),c}function al(e){return e[0]!=="$"&&!ms(e)}const mi=e=>e==="_"||e==="_ctx"||e==="$stable",vi=e=>ue(e)?e.map(Kt):[Kt(e)],ud=(e,t,n)=>{if(t._n)return t;const s=nt((...r)=>vi(t(...r)),n);return s._c=!1,s},uc=(e,t,n)=>{const s=e._ctx;for(const r in e){if(mi(r))continue;const o=e[r];if(me(o))t[r]=ud(r,o,s);else if(o!=null){const i=vi(o);t[r]=()=>i}}},fc=(e,t)=>{const n=vi(t);e.slots.default=()=>n},dc=(e,t,n)=>{for(const s in t)(n||!mi(s))&&(e[s]=t[s])},fd=(e,t,n)=>{const s=e.slots=ic();if(e.vnode.shapeFlag&32){const r=t._;r?(dc(s,t,n),n&&pa(s,"_",r,!0)):uc(t,s)}else t&&fc(e,t)},dd=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=Me;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:dc(r,t,n):(o=!t.$stable,uc(t,r)),i=t}else t&&(fc(e,t),i={default:1});if(o)for(const l in r)!mi(l)&&i[l]==null&&delete r[l]},gt=vd;function hd(e){return pd(e)}function pd(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:d,nextSibling:p,setScopeId:g=Ot,insertStaticContent:f}=e,m=(y,w,A,P=null,N=null,L=null,V=void 0,F=null,B=!!w.dynamicChildren)=>{if(y===w)return;y&&!Pn(y,w)&&(P=Ve(y),ze(y,N,L,!0),y=null),w.patchFlag===-2&&(B=!1,w.dynamicChildren=null);const{type:M,ref:le,shapeFlag:Y}=w;switch(M){case Wr:b(y,w,A,P);break;case at:v(y,w,A,P);break;case ws:y==null&&S(w,A,P,V);break;case ie:D(y,w,A,P,N,L,V,F,B);break;default:Y&1?W(y,w,A,P,N,L,V,F,B):Y&6?de(y,w,A,P,N,L,V,F,B):(Y&64||Y&128)&&M.process(y,w,A,P,N,L,V,F,B,ke)}le!=null&&N?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,P)=>{if(y==null)s(w.el=l(w.children),A,P);else{const N=w.el=y.el;w.children!==y.children&&c(N,w.children)}},v=(y,w,A,P)=>{y==null?s(w.el=a(w.children||""),A,P):w.el=y.el},S=(y,w,A,P)=>{[y.el,y.anchor]=f(y.children,w,A,P,y.el,y.anchor)},C=({el:y,anchor:w},A,P)=>{let N;for(;y&&y!==w;)N=p(y),s(y,A,P),y=N;s(w,A,P)},T=({el:y,anchor:w})=>{let A;for(;y&&y!==w;)A=p(y),r(y),y=A;r(w)},W=(y,w,A,P,N,L,V,F,B)=>{if(w.type==="svg"?V="svg":w.type==="math"&&(V="mathml"),y==null)ee(w,A,P,N,L,V,F,B);else{const M=y.el&&y.el._isVueCE?y.el:null;try{M&&M._beginPatch(),U(y,w,N,L,V,F,B)}finally{M&&M._endPatch()}}},ee=(y,w,A,P,N,L,V,F)=>{let B,M;const{props:le,shapeFlag:Y,transition:re,dirs:J}=y;if(B=y.el=i(y.type,L,le&&le.is,le),Y&8?u(B,y.children):Y&16&&fe(y.children,B,null,P,N,uo(y,L),V,F),J&&$n(y,null,P,"created"),G(B,y,y.scopeId,V,P),le){for(const ve in le)ve!=="value"&&!ms(ve)&&o(B,ve,null,le[ve],L,P);"value"in le&&o(B,"value",null,le.value,L),(M=le.onVnodeBeforeMount)&&jt(M,P,y)}J&&$n(y,null,P,"beforeMount");const se=gd(N,re);se&&re.beforeEnter(B),s(B,w,A),((M=le&&le.onVnodeMounted)||se||J)&>(()=>{try{M&&jt(M,P,y),se&&re.enter(B),J&&$n(y,null,P,"mounted")}finally{}},N)},G=(y,w,A,P,N)=>{if(A&&g(y,A),P)for(let L=0;L<P.length;L++)g(y,P[L]);if(N){let L=N.subTree;if(w===L||gc(L.type)&&(L.ssContent===w||L.ssFallback===w)){const V=N.vnode;G(y,V,V.scopeId,V.slotScopeIds,N.parent)}}},fe=(y,w,A,P,N,L,V,F,B=0)=>{for(let M=B;M<y.length;M++){const le=y[M]=F?tn(y[M]):Kt(y[M]);m(null,le,w,A,P,N,L,V,F)}},U=(y,w,A,P,N,L,V)=>{const F=w.el=y.el;let{patchFlag:B,dynamicChildren:M,dirs:le}=w;B|=y.patchFlag&16;const Y=y.props||Me,re=w.props||Me;let J;if(A&&Rn(A,!1),(J=re.onVnodeBeforeUpdate)&&jt(J,A,w,y),le&&$n(w,y,A,"beforeUpdate"),A&&Rn(A,!0),M&&(!y.dynamicChildren||y.dynamicChildren.length!==M.length)&&(B=0,V=!1,M=null),(Y.innerHTML&&re.innerHTML==null||Y.textContent&&re.textContent==null)&&u(F,""),M?ne(y.dynamicChildren,M,F,A,P,uo(w,N),L):V||oe(y,w,F,null,A,P,uo(w,N),L,!1),B>0){if(B&16)pe(F,Y,re,A,N);else if(B&2&&Y.class!==re.class&&o(F,"class",null,re.class,N),B&4&&o(F,"style",Y.style,re.style,N),B&8){const se=w.dynamicProps;for(let ve=0;ve<se.length;ve++){const _e=se[ve],De=Y[_e],Ke=re[_e];(Ke!==De||_e==="value")&&o(F,_e,De,Ke,N,A)}}B&1&&y.children!==w.children&&u(F,w.children)}else!V&&M==null&&pe(F,Y,re,A,N);((J=re.onVnodeUpdated)||le)&>(()=>{J&&jt(J,A,w,y),le&&$n(w,y,A,"updated")},P)},ne=(y,w,A,P,N,L,V)=>{for(let F=0;F<w.length;F++){const B=y[F],M=w[F],le=B.el&&(B.type===ie||!Pn(B,M)||B.shapeFlag&198)?d(B.el):A;m(B,M,le,null,P,N,L,V,!0)}},pe=(y,w,A,P,N)=>{if(w!==A){if(w!==Me)for(const L in w)!ms(L)&&!(L in A)&&o(y,L,w[L],null,N,P);for(const L in A){if(ms(L))continue;const V=A[L],F=w[L];V!==F&&L!=="value"&&o(y,L,F,V,N,P)}"value"in A&&o(y,"value",w.value,A.value,N)}},D=(y,w,A,P,N,L,V,F,B)=>{const M=w.el=y?y.el:l(""),le=w.anchor=y?y.anchor:l("");let{patchFlag:Y,dynamicChildren:re,slotScopeIds:J}=w;J&&(F=F?F.concat(J):J),y==null?(s(M,A,P),s(le,A,P),fe(w.children||[],A,le,N,L,V,F,B)):Y>0&&Y&64&&re&&y.dynamicChildren&&y.dynamicChildren.length===re.length?(ne(y.dynamicChildren,re,A,N,L,V,F),(w.key!=null||N&&w===N.subTree)&&yi(y,w,!0)):oe(y,w,A,le,N,L,V,F,B)},de=(y,w,A,P,N,L,V,F,B)=>{w.slotScopeIds=F,y==null?w.shapeFlag&512?N.ctx.activate(w,A,P,V,B):I(w,A,P,N,L,V,B):R(y,w,B)},I=(y,w,A,P,N,L,V)=>{const F=y.component=xd(y,P,N);if(Ur(y)&&(F.ctx.renderer=ke),Cd(F,!1,V),F.asyncDep){if(N&&N.registerDep(F,Z,V),!y.el){const B=F.subTree=H(at);v(null,B,w,A),y.placeholder=B.el}}else Z(F,y,w,A,N,L,V)},R=(y,w,A)=>{const P=w.component=y.component;if(od(y,w,A))if(P.asyncDep&&!P.asyncResolved){ae(P,w,A);return}else P.next=w,P.update();else w.el=y.el,P.vnode=w},Z=(y,w,A,P,N,L,V)=>{const F=()=>{if(y.isMounted){let{next:Y,bu:re,u:J,parent:se,vnode:ve}=y;{const Tt=hc(y);if(Tt){Y&&(Y.el=ve.el,ae(y,Y,V)),Tt.asyncDep.then(()=>{gt(()=>{y.isUnmounted||M()},N)});return}}let _e=Y,De;Rn(y,!1),Y?(Y.el=ve.el,ae(y,Y,V)):Y=ve,re&&nr(re),(De=Y.props&&Y.props.onVnodeBeforeUpdate)&&jt(De,se,Y,ve),Rn(y,!0);const Ke=il(y),_t=y.subTree;y.subTree=Ke,m(_t,Ke,d(_t.el),Ve(_t),y,N,L),Y.el=Ke.el,_e===null&&id(y,Ke.el),J&>(J,N),(De=Y.props&&Y.props.onVnodeUpdated)&>(()=>jt(De,se,Y,ve),N)}else{let Y;const{el:re,props:J}=w,{bm:se,m:ve,parent:_e,root:De,type:Ke}=y,_t=Jn(w);Rn(y,!1),se&&nr(se),!_t&&(Y=J&&J.onVnodeBeforeMount)&&jt(Y,_e,w),Rn(y,!0);{De.ce&&De.ce._hasShadowRoot()&&De.ce._injectChildStyle(Ke,y.parent?y.parent.type:void 0);const Tt=y.subTree=il(y);m(null,Tt,A,P,y,N,L),w.el=Tt.el}if(ve&>(ve,N),!_t&&(Y=J&&J.onVnodeMounted)){const Tt=w;gt(()=>jt(Y,_e,Tt),N)}(w.shapeFlag&256||_e&&Jn(_e.vnode)&&_e.vnode.shapeFlag&256)&&y.a&>(y.a,N),y.isMounted=!0,w=A=P=null}};y.scope.on();const B=y.effect=new ya(F);y.scope.off();const M=y.update=B.run.bind(B),le=y.job=B.runIfDirty.bind(B);le.i=y,le.id=y.uid,B.scheduler=()=>hi(le),Rn(y,!0),M()},ae=(y,w,A)=>{w.component=y;const P=y.vnode.props;y.vnode=w,y.next=null,ad(y,w.props,P,A),dd(y,w.children,A),fn(),Zi(y),dn()},oe=(y,w,A,P,N,L,V,F,B=!1)=>{const M=y&&y.children,le=y?y.shapeFlag:0,Y=w.children,{patchFlag:re,shapeFlag:J}=w;if(re>0){if(re&128){qe(M,Y,A,P,N,L,V,F,B);return}else if(re&256){He(M,Y,A,P,N,L,V,F,B);return}}J&8?(le&16&&Ue(M,N,L),Y!==M&&u(A,Y)):le&16?J&16?qe(M,Y,A,P,N,L,V,F,B):Ue(M,N,L,!0):(le&8&&u(A,""),J&16&&fe(Y,A,P,N,L,V,F,B))},He=(y,w,A,P,N,L,V,F,B)=>{y=y||Kn,w=w||Kn;const M=y.length,le=w.length,Y=Math.min(M,le);let re;for(re=0;re<Y;re++){const J=w[re]=B?tn(w[re]):Kt(w[re]);m(y[re],J,A,null,N,L,V,F,B)}M>le?Ue(y,N,L,!0,!1,Y):fe(w,A,P,N,L,V,F,B,Y)},qe=(y,w,A,P,N,L,V,F,B)=>{let M=0;const le=w.length;let Y=y.length-1,re=le-1;for(;M<=Y&&M<=re;){const J=y[M],se=w[M]=B?tn(w[M]):Kt(w[M]);if(Pn(J,se))m(J,se,A,null,N,L,V,F,B);else break;M++}for(;M<=Y&&M<=re;){const J=y[Y],se=w[re]=B?tn(w[re]):Kt(w[re]);if(Pn(J,se))m(J,se,A,null,N,L,V,F,B);else break;Y--,re--}if(M>Y){if(M<=re){const J=re+1,se=J<le?w[J].el:P;for(;M<=re;)m(null,w[M]=B?tn(w[M]):Kt(w[M]),A,se,N,L,V,F,B),M++}}else if(M>re)for(;M<=Y;)ze(y[M],N,L,!0),M++;else{const J=M,se=M,ve=new Map;for(M=se;M<=re;M++){const dt=w[M]=B?tn(w[M]):Kt(w[M]);dt.key!=null&&ve.set(dt.key,M)}let _e,De=0;const Ke=re-se+1;let _t=!1,Tt=0;const Cn=new Array(Ke);for(M=0;M<Ke;M++)Cn[M]=0;for(M=J;M<=Y;M++){const dt=y[M];if(De>=Ke){ze(dt,N,L,!0);continue}let $t;if(dt.key!=null)$t=ve.get(dt.key);else for(_e=se;_e<=re;_e++)if(Cn[_e-se]===0&&Pn(dt,w[_e])){$t=_e;break}$t===void 0?ze(dt,N,L,!0):(Cn[$t-se]=M+1,$t>=Tt?Tt=$t:_t=!0,m(dt,w[$t],A,null,N,L,V,F,B),De++)}const Tn=_t?md(Cn):Kn;for(_e=Tn.length-1,M=Ke-1;M>=0;M--){const dt=se+M,$t=w[dt],Hs=w[dt+1],Fn=dt+1<le?Hs.el||pc(Hs):P;Cn[M]===0?m(null,$t,A,Fn,N,L,V,F,B):_t&&(_e<0||M!==Tn[_e]?Ee($t,A,Fn,2):_e--)}}},Ee=(y,w,A,P,N=null)=>{const{el:L,type:V,transition:F,children:B,shapeFlag:M}=y;if(M&6){Ee(y.component.subTree,w,A,P);return}if(M&128){y.suspense.move(w,A,P);return}if(M&64){V.move(y,w,A,ke);return}if(V===ie){s(L,w,A);for(let Y=0;Y<B.length;Y++)Ee(B[Y],w,A,P);s(y.anchor,w,A);return}if(V===ws){C(y,w,A);return}if(P!==2&&M&1&&F)if(P===0)F.persisted&&!L[Et]?s(L,w,A):(F.beforeEnter(L),s(L,w,A),gt(()=>F.enter(L),N));else{const{leave:Y,delayLeave:re,afterLeave:J}=F,se=()=>{y.ctx.isUnmounted?r(L):s(L,w,A)},ve=()=>{const _e=L._isLeaving||!!L[Et];L._isLeaving&&L[Et](!0),F.persisted&&!_e?se():Y(L,()=>{se(),J&&J()})};re?re(L,se,ve):ve()}else s(L,w,A)},ze=(y,w,A,P=!1,N=!1)=>{const{type:L,props:V,ref:F,children:B,dynamicChildren:M,shapeFlag:le,patchFlag:Y,dirs:re,cacheIndex:J,memo:se}=y;if(Y===-2&&(N=!1),F!=null&&(fn(),bs(F,null,A,y,!0),dn()),J!=null&&(w.renderCache[J]=void 0),le&256){w.ctx.deactivate(y);return}const ve=le&1&&re,_e=!Jn(y);let De;if(_e&&(De=V&&V.onVnodeBeforeUnmount)&&jt(De,w,y),le&6)bt(y.component,A,P);else{if(le&128){y.suspense.unmount(A,P);return}ve&&$n(y,null,w,"beforeUnmount"),le&64?y.type.remove(y,w,A,ke,P):M&&!M.hasOnce&&(L!==ie||Y>0&&Y&64)?Ue(M,w,A,!1,!0):(L===ie&&Y&384||!N&&le&16)&&Ue(B,w,A),P&&Oe(y)}const Ke=se!=null&&J==null;(_e&&(De=V&&V.onVnodeUnmounted)||ve||Ke)&>(()=>{De&&jt(De,w,y),ve&&$n(y,null,w,"unmounted"),Ke&&(y.el=null)},A)},Oe=y=>{const{type:w,el:A,anchor:P,transition:N}=y;if(w===ie){xn(A,P);return}if(w===ws){T(y);return}const L=()=>{r(A),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(y.shapeFlag&1&&N&&!N.persisted){const{leave:V,delayLeave:F}=N,B=()=>V(A,L);F?F(y.el,L,B):B()}else L()},xn=(y,w)=>{let A;for(;y!==w;)A=p(y),r(y),y=A;r(w)},bt=(y,w,A)=>{const{bum:P,scope:N,job:L,subTree:V,um:F,m:B,a:M}=y;cl(B),cl(M),P&&nr(P),N.stop(),L&&(L.flags|=8,ze(V,y,w,A)),F&>(F,w),gt(()=>{y.isUnmounted=!0},w)},Ue=(y,w,A,P=!1,N=!1,L=0)=>{for(let V=L;V<y.length;V++)ze(y[V],w,A,P,N)},Ve=y=>{if(y.shapeFlag&6)return Ve(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const w=p(y.anchor||y.el),A=w&&w[za];return A?p(A):w};let O=!1;const ce=(y,w,A)=>{let P;y==null?w._vnode&&(ze(w._vnode,null,null,!0),P=w._vnode.component):m(w._vnode||null,y,w,null,null,null,A),w._vnode=y,O||(O=!0,Zi(P),Oa(),O=!1)},ke={p:m,um:ze,m:Ee,r:Oe,mt:I,mc:fe,pc:oe,pbc:ne,n:Ve,o:e};return{render:ce,hydrate:void 0,createApp:Qf(ce)}}function uo({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 gd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yi(e,t,n=!1){const s=e.children,r=t.children;if(ue(s)&&ue(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]=tn(r[o]),l.el=i.el),!n&&l.patchFlag!==-2&&yi(i,l)),l.type===Wr&&(l.patchFlag===-1&&(l=r[o]=tn(l)),l.el=i.el),l.type===at&&!l.el&&(l.el=i.el)}}function md(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 hc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hc(t)}function cl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function pc(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?pc(t.subTree):null}const gc=e=>e.__isSuspense;function vd(e,t){t&&t.pendingBranch?ue(e)?t.effects.push(...e):t.effects.push(e):Na(e)}const ie=Symbol.for("v-fgt"),Wr=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),ws=Symbol.for("v-stc"),un=[];let Ct=null;function k(e=!1){un.push(Ct=e?null:[])}function bi(){un.pop(),Ct=un[un.length-1]||null}let Rs=1;function hr(e,t=!1){Rs+=e,e<0&&Ct&&t&&(Ct.hasOnce=!0)}function mc(e){return e.dynamicChildren=Rs>0?Ct||Kn:null,bi(),Rs>0&&Ct&&Ct.push(e),e}function _(e,t,n,s,r,o){return mc(h(e,t,n,s,r,o,!0))}function je(e,t,n,s,r){return mc(H(e,t,n,s,r,!0))}function As(e){return e?e.__v_isVNode===!0:!1}function Pn(e,t){return e.type===t.type&&e.key===t.key}const vc=({key:e})=>e??null,rr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||ft(e)||me(e)?{i:rt,r:e,k:t,f:!!n}:e:null);function h(e,t=null,n=null,s=0,r=null,o=e===ie?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vc(t),ref:t&&rr(t),scopeId:Ba,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 H=yd;function yd(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Xa)&&(e=at),As(e)){const l=wn(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(Ed(e)&&(e=e.__vccOpts),t){t=bd(t);let{class:l,style:a}=t;l&&!Be(l)&&(t.class=be(l)),Te(a)&&(di(a)&&!ue(a)&&(a=Je({},a)),t.style=cn(a))}const i=Be(e)?1:gc(e)?128:Ua(e)?64:Te(e)?4:me(e)?2:0;return h(e,t,n,s,r,i,o,!0)}function bd(e){return e?di(e)||lc(e)?Je({},e):e:null}function wn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?wd(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&vc(c),ref:t&&t.ref?n&&o?ue(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!==ie?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&&wn(e.ssContent),ssFallback:e.ssFallback&&wn(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 Ie(e=" ",t=0){return H(Wr,null,e,t)}function kd(e,t){const n=H(ws,null,e);return n.staticCount=t,n}function K(e="",t=!1){return t?(k(),je(at,null,e)):H(at,null,e)}function Kt(e){return e==null||typeof e=="boolean"?H(at):ue(e)?H(ie,null,e.slice()):As(e)?tn(e):H(Wr,null,String(e))}function tn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:wn(e)}function pr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ue(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&&!lc(t)?t._ctx=rt:r===3&&rt&&(rt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(me(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=[Ie(t)]):n=8;e.children=t,e.shapeFlag|=n}function wd(...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=be([t.class,s.class]));else if(r==="style")t.style=cn([t.style,s.style]);else if(Lr(r)){const o=t[r],i=s[r];i&&o!==i&&!(ue(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 jt(e,t,n,s=null){Nt(e,t,7,[n,s])}const _d=nc();let Sd=0;function xd(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||_d,o={uid:Sd++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Zu(!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:cc(s,r),emitsOptions:sc(s,r),emit:null,emitted:null,propsDefaults:Me,inheritAttrs:s.inheritAttrs,ctx:Me,data:Me,props:Me,attrs:Me,slots:Me,refs:Me,setupState:Me,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=td.bind(null,o),e.ce&&e.ce(o),o}let ct=null;const Vr=()=>ct||rt;let gr,Do;{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),Do=t("__VUE_SSR_SETTERS__",n=>Es=n)}const js=e=>{const t=ct;return gr(e),e.scope.on(),()=>{e.scope.off(),gr(t)}},ul=()=>{ct&&ct.scope.off(),gr(null)};function yc(e){return e.vnode.shapeFlag&4}let Es=!1;function Cd(e,t=!1,n=!1){t&&Do(t);const{props:s,children:r}=e.vnode,o=yc(e);ld(e,s,o,t),fd(e,r,n||t);const i=o?Td(e,t):void 0;return t&&Do(!1),i}function Td(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Wf);const{setup:s}=n;if(s){fn();const r=e.setupContext=s.length>1?Rd(e):null,o=js(e),i=Gs(s,e,0,[e.props,r]),l=fa(i);if(dn(),o(),(l||e.sp)&&!Jn(e)&&Ka(e),l){if(i.then(ul,ul),t)return i.then(a=>{fl(e,a)}).catch(a=>{zr(a,e,0)});e.asyncDep=i}else fl(e,i)}else bc(e)}function fl(e,t,n){me(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)&&(e.setupState=Pa(t)),bc(e)}function bc(e,t,n){const s=e.type;e.render||(e.render=s.render||Ot);{const r=js(e);fn();try{Vf(e)}finally{dn(),r()}}}const $d={get(e,t){return lt(e,"get",""),e[t]}};function Rd(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,$d),slots:e.slots,emit:e.emit,expose:t}}function Kr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Pa(mf(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 Ad(e,t=!0){return me(e)?e.displayName||e.name:e.name||t&&e.__name}function Ed(e){return me(e)&&"__vccOpts"in e}const Q=(e,t)=>_f(e,t,Es);function xe(e,t,n){try{hr(-1);const s=arguments.length;return s===2?Te(t)&&!ue(t)?As(t)?H(e,null,[t]):H(e,t):H(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&As(n)&&(n=[n]),H(e,t,n))}finally{hr(1)}}const Id="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 Bo;const dl=typeof window<"u"&&window.trustedTypes;if(dl)try{Bo=dl.createPolicy("vue",{createHTML:e=>e})}catch{}const kc=Bo?e=>Bo.createHTML(e):e=>e,Pd="http://www.w3.org/2000/svg",Ld="http://www.w3.org/1998/Math/MathML",en=typeof document<"u"?document:null,hl=en&&en.createElement("template"),Md={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"?en.createElementNS(Pd,e):t==="mathml"?en.createElementNS(Ld,e):n?en.createElement(e,{is:n}):en.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>en.createTextNode(e),createComment:e=>en.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>en.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{hl.innerHTML=kc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=hl.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]}},mn="transition",as="animation",ns=Symbol("_vtc"),wc={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},_c=Je({},Ha,wc),Nd=e=>(e.displayName="Transition",e.props=_c,e),ki=Nd((e,{slots:t})=>xe(Mf,Sc(e),t)),An=(e,t=[])=>{ue(e)?e.forEach(n=>n(...t)):e&&e(...t)},pl=e=>e?ue(e)?e.some(t=>t.length>1):e.length>1:!1;function Sc(e){const t={};for(const D in e)D in wc||(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:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,f=Od(r),m=f&&f[0],b=f&&f[1],{onBeforeEnter:v,onEnter:S,onEnterCancelled:C,onLeave:T,onLeaveCancelled:W,onBeforeAppear:ee=v,onAppear:G=S,onAppearCancelled:fe=C}=t,U=(D,de,I,R)=>{D._enterCancelled=R,yn(D,de?u:l),yn(D,de?c:i),I&&I()},ne=(D,de)=>{D._isLeaving=!1,yn(D,d),yn(D,g),yn(D,p),de&&de()},pe=D=>(de,I)=>{const R=D?G:S,Z=()=>U(de,D,I);An(R,[de,Z]),gl(()=>{yn(de,D?a:o),Ut(de,D?u:l),pl(R)||ml(de,s,m,Z)})};return Je(t,{onBeforeEnter(D){An(v,[D]),Ut(D,o),Ut(D,i)},onBeforeAppear(D){An(ee,[D]),Ut(D,a),Ut(D,c)},onEnter:pe(!1),onAppear:pe(!0),onLeave(D,de){D._isLeaving=!0;const I=()=>ne(D,de);Ut(D,d),D._enterCancelled?(Ut(D,p),Go(D)):(Go(D),Ut(D,p)),gl(()=>{D._isLeaving&&(yn(D,d),Ut(D,g),pl(T)||ml(D,s,b,I))}),An(T,[D,I])},onEnterCancelled(D){U(D,!1,void 0,!0),An(C,[D])},onAppearCancelled(D){U(D,!0,void 0,!0),An(fe,[D])},onLeaveCancelled(D){ne(D),An(W,[D])}})}function Od(e){if(e==null)return null;if(Te(e))return[fo(e.enter),fo(e.leave)];{const t=fo(e);return[t,t]}}function fo(e){return Gu(e)}function Ut(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ns]||(e[ns]=new Set)).add(t)}function yn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[ns];n&&(n.delete(t),n.size||(e[ns]=void 0))}function gl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Dd=0;function ml(e,t,n,s){const r=e._endId=++Dd,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:a}=xc(e,t);if(!i)return s();const c=i+"end";let u=0;const d=()=>{e.removeEventListener(c,p),o()},p=g=>{g.target===e&&++u>=a&&d()};setTimeout(()=>{u<a&&d()},l+1),e.addEventListener(c,p)}function xc(e,t){const n=window.getComputedStyle(e),s=f=>(n[f]||"").split(", "),r=s(`${mn}Delay`),o=s(`${mn}Duration`),i=vl(r,o),l=s(`${as}Delay`),a=s(`${as}Duration`),c=vl(l,a);let u=null,d=0,p=0;t===mn?i>0&&(u=mn,d=i,p=o.length):t===as?c>0&&(u=as,d=c,p=a.length):(d=Math.max(i,c),u=d>0?i>c?mn:as:null,p=u?u===mn?o.length:a.length:0);const g=u===mn&&/\b(?:transform|all)(?:,|$)/.test(s(`${mn}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:g}}function vl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>yl(n)+yl(e[s])))}function yl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Go(e){return(e?e.ownerDocument:document).body.offsetHeight}function Bd(e,t,n){const s=e[ns];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const bl=Symbol("_vod"),Cc=Symbol("_vsh"),Tc=Symbol("");function Gd(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):jo(t.subTree,r),n(r)};Ya(()=>{Na(s)}),Jt(()=>{Ge(s,Ot,{flush:"post"});const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),Hr(()=>r.disconnect())})}function jo(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{jo(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)mr(e.el,t);else if(e.type===ie)e.children.forEach(n=>jo(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=Ku(t[r]);n.setProperty(`--${r}`,o),s+=`--${r}: ${o};`}n[Tc]=s}}const jd=/(?:^|;)\s*display\s*:/;function zd(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?Fd(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[Tc];i&&(n+=";"+i),s.cssText=n,o=jd.test(n)}}else t&&e.removeAttribute("style");bl in e&&(e[bl]=o?s.display:"",e[Cc]&&(s.display="none"))}const kl=/\s*!important$/;function ps(e,t,n){if(ue(n))n.forEach(s=>ps(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Ud(e,t);kl.test(n)?e.setProperty(_n(s),n.replace(kl,""),"important"):e[s]=n}}const wl=["Webkit","Moz","ms"],ho={};function Ud(e,t){const n=ho[t];if(n)return n;let s=yt(t);if(s!=="filter"&&s in e)return ho[t]=s;s=Dr(s);for(let r=0;r<wl.length;r++){const o=wl[r]+s;if(o in e)return ho[t]=o}return t}function Fd(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Be(s)&&n===s}const _l="http://www.w3.org/1999/xlink";function Sl(e,t,n,s,r,o=qu(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(_l,t.slice(6,t.length)):e.setAttributeNS(_l,t,n):n==null||o&&!ga(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Bt(n)?String(n):n)}function xl(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?kc(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=ga(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 Ln(e,t,n,s){e.addEventListener(t,n,s)}function Hd(e,t,n,s){e.removeEventListener(t,n,s)}const Cl=Symbol("_vei");function qd(e,t,n,s,r=null){const o=e[Cl]||(e[Cl]={}),i=o[t];if(s&&i)i.value=s;else{const[l,a]=Kd(t);if(s){const c=o[t]=Jd(s,r);Ln(e,l,c,a)}else i&&(Hd(e,l,i,a),o[t]=void 0)}}const Wd=/(Once|Passive|Capture)$/,Vd=/^on:?(?:Once|Passive|Capture)$/;function Kd(e){let t,n;for(;(n=e.match(Wd))&&!Vd.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):_n(e.slice(2)),t]}let po=0;const Zd=Promise.resolve(),Yd=()=>po||(Zd.then(()=>po=0),po=Date.now());function Jd(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(ue(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&&Nt(c,t,5,l)}}else Nt(r,t,5,[s])};return n.value=e,n.attached=Yd(),n}const Tl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Xd=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?Bd(e,s,i):t==="style"?zd(e,n,s):Lr(t)?Mr(t)||qd(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Qd(e,t,s,i))?(xl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Sl(e,t,s,i,o,t!=="value")):e._isVueCE&&(eh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Be(s)))?xl(e,yt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Sl(e,t,s,i))};function Qd(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Tl(t)&&me(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 Tl(t)&&Be(n)?!1:t in e}function eh(e,t){const n=e._def.props;if(!n)return!1;const s=yt(t);return Array.isArray(n)?n.some(r=>yt(r)===s):Object.keys(n).some(r=>yt(r)===s)}const $c=new WeakMap,Rc=new WeakMap,vr=Symbol("_moveCb"),$l=Symbol("_enterCb"),th=e=>(delete e.props.mode,e),nh=th({name:"TransitionGroup",props:Je({},_c,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Vr(),s=Fa();let r,o;return Ja(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!lh(r[0].el,n.vnode.el,i)){r=[];return}r.forEach(rh),r.forEach(oh);const l=r.filter(ih);Go(n.vnode.el),l.forEach(a=>{const c=a.el,u=c.style;Ut(c,i),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[vr]=p=>{p&&p.target!==c||(!p||p.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[vr]=null,yn(c,i))};c.addEventListener("transitionend",d)}),r=[]}),()=>{const i=we(e),l=Sc(i);let a=i.tag||ie;if(r=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&!u.el[Cc]&&(r.push(u),Gn(u,$s(u,l,s,n)),$c.set(u,Ac(u.el)))}o=t.default?gi(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 H(a,null,o)}}}),sh=nh;function rh(e){const t=e.el;t[vr]&&t[vr](),t[$l]&&t[$l]()}function oh(e){Rc.set(e,Ac(e.el))}function ih(e){const t=$c.get(e),n=Rc.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 Ac(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function lh(e,t,n){const s=e.cloneNode(),r=e[ns];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}=xc(s);return o.removeChild(s),i}const yr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ue(t)?n=>nr(t,n):t};function ah(e){e.target.composing=!0}function Rl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Qn=Symbol("_assign");function Al(e,t,n){return t&&(e=e.trim()),n&&(e=Br(e)),e}const kt={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Qn]=yr(r);const o=s||r.props&&r.props.type==="number";Ln(e,t?"change":"input",i=>{i.target.composing||e[Qn](Al(e.value,n,o))}),(n||o)&&Ln(e,"change",()=>{e.value=Al(e.value,n,o)}),t||(Ln(e,"compositionstart",ah),Ln(e,"compositionend",Rl),Ln(e,"change",Rl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Qn]=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)}},El={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Ln(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Br(br(o)):br(o));e[Qn](e.multiple?Nr(e._modelValue)?new Set(r):r:r[0]),e._assigning=!0,It(()=>{e._assigning=!1})}),e[Qn]=yr(s)},mounted(e,{value:t}){Il(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Qn]=yr(n)},updated(e,{value:t}){e._assigning||Il(e,t)}};function Il(e,t){const n=e.multiple,s=ue(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=Vu(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 ch=["ctrl","shift","alt","meta"],uh={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)=>ch.some(n=>e[`${n}Key`]&&!t.includes(n))},Yt=(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=uh[t[i]];if(l&&l(r,t))return}return e(r,...o)}))},fh={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=_n(r.key);if(t.some(i=>i===o||fh[i]===o))return e(r)}))},dh=Je({patchProp:Xd},Md);let Pl;function hh(){return Pl||(Pl=hd(dh))}const ph=((...e)=>{const t=hh().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=mh(s);if(!r)return;const o=t._component;!me(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,gh(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function gh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mh(e){return Be(e)?document.querySelector(e):e}function Zs(e,t,n,s){return e===n&&t===s}function vh(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 yh(e){return{objective:e.objective,completionCriterion:e.completionCriterion,replace:e.replace,budgets:e.budgets}}function bh(e){return{objective:e.objective,budgets:e.budgets}}function kh(e,t,n){return e!==0&&n.epoch!==e?"resync":n.seq<=t?"duplicate":"apply"}function wh(e,t){return t.type==="goal.updated"?{...e,goal:t.snapshot}:t.type==="todo.updated"?{...e,todos:t.todos}:e}function _h(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 Ps=q([]);let Sh=0;function xh(e,t="info",n=3500){const s=`toast_${++Sh}`;Ps.value=[...Ps.value,{id:s,type:t,message:e}],n>0&&window.setTimeout(()=>Ec(s),n)}function Ec(e){Ps.value=Ps.value.filter(t=>t.id!==e)}function Ic(){return{toasts:Ps,showToast:xh,removeToast:Ec}}const zt="/api/v1",Ch=2*3e4;function Th(){const{showToast:e}=Ic(),t=q("connecting"),n=q([]),s=q([]),r=q({busy:!1}),o=q(null),i=q([]),l=q(!1),a=q(null),c=q(!1),u=q(null),d=q(null),p=q(null),g=Q(()=>r.value.busy||c.value),f=q([]),m=q(null),b=q(!1),v=Q(()=>d.value!==null&&!b.value),S=q(null),C=q([]);let T=null,W=null,ee=null,G=null,fe=Date.now(),U=0,ne=0,pe=0,D=0,de=0,I=0,R=0,Z=0,ae=0,oe=null,He=!1,qe=null,Ee=!1,ze=!1;const Oe=new Map;function xn(){const z=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws`;return m.value?`${z}?sessionId=${encodeURIComponent(m.value)}`:z}function bt(x){t.value=x}function Ue(x){(T==null?void 0:T.readyState)===WebSocket.OPEN&&T.send(JSON.stringify(x))}function Ve(){l.value=He||oe!==null}function O(){ae++,oe=null,He=!1,qe=null,l.value=!1,a.value=null}function ce(x,z){if(x!==null&&typeof x=="object"){const te=x.message;if(typeof te=="string")return te}return z}function ke(){ze||G!==null||(G=window.setTimeout(()=>{G=null;const x=qe;qe=null,We(x??void 0)},250))}async function We(x){const z=d.value;if(!z)return;const te=D,ye=de,Pe=I,St=R;try{const ht=await fetch(`${zt}/sessions/${z}/snapshot`);if(!ht.ok){x!==void 0&&(oe==null?void 0:oe.generation)===x&&(qe=x,ke());return}const Fe=await ht.json();if(!vh({snapshot:Fe,targetSessionId:z,currentSessionId:d.value,targetSessionGeneration:te,currentSessionGeneration:D,targetConnectionGeneration:ye,currentConnectionGeneration:de,targetPromptGeneration:Pe,currentPromptGeneration:I,targetLiveGeneration:St,currentLiveGeneration:R,currentEpoch:ne,currentSeq:U})){x!==void 0&&(qe=x),ke();return}y(Fe,x)}catch{x!==void 0&&(oe==null?void 0:oe.generation)===x&&(qe=x,ke())}}function y(x,z){const te=n.value.filter(gn=>gn.local),ye=Oe.keys().next().value,Pe=ye?Oe.get(ye):void 0,St=Pe?n.value.find(gn=>gn.id===Pe.messageId):void 0,ht=!!(ye&&x.messages.some(gn=>gn.clientMessageId===ye)),Fe=!!(Pe&&!ht&&Pe.connectionGeneration<de);Fe&&St&&(St.isError=!0);const Xt=St&&!ht?[St]:[];n.value=[...x.messages.map(gn=>({...gn,id:gn.id??w()})),...te,...Xt],s.value=x.pendingApprovals,r.value={...x.status,busy:x.busy},o.value=x.goal,i.value=x.todos,z!==void 0&&oe!==null&&oe.generation===z&&ae===z&&(oe=null,Ve()),(ht||Fe)&&(c.value=!1,Ee=!1,Oe.clear(),Fe&&e("消息未送达,已恢复连接。","error")),U=x.seq,ne=x.epoch,p.value=x.workDir}function w(){return`msg_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function A(x){P(),fe=Date.now(),W=window.setInterval(()=>{if(Date.now()-fe>Ch){T==null||T.close();return}Ue({type:"ping"})},x)}function P(){W!==null&&(clearInterval(W),W=null)}function N(){if(ze||ee!==null)return;bt("reconnecting"),pe++;const x=Math.min(1e3*2**pe,3e4);ee=window.setTimeout(()=>{ee=null,B()},x)}function L(x){switch(x.type){case"server_hello":{const z=x;d.value=z.sessionId,p.value=z.workDir,m.value=z.sessionId,b.value=z.active;const te=ne;ne=z.epoch,A(z.heartbeat_ms),Ue({type:"client_hello",lastSeq:U,epoch:te}),te!==0&&te!==z.epoch&&(U=0),bt("connected"),pe=0,z.active?(We(),ve(),De()):_e(z.sessionId).then(ye=>{ye&&d.value===z.sessionId&&(b.value=!0),We(),ve(),De()});break}case"event":{const z=kh(ne,U,x);if(z==="resync"){ne=x.epoch,U=0,We();break}if(z==="duplicate")break;U=x.seq,ne=x.epoch,R++,V(x.payload);break}case"user_message":{if(R++,x.clientMessageId&&Oe.has(x.clientMessageId)){Ee=!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(te=>te.id===x.pendingMsgId):-1;if(z>=0){const te=n.value[z];n.value[z]={...te,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")&&ve(),x.ok&&x.command==="compact"&&We();break}case"resync_required":{U=0,We();break}case"status":{R++,r.value={...r.value,...x.status};break}case"error":{if(u.value=x.message,x.clientMessageId){const z=Oe.get(x.clientMessageId);if(z){Oe.delete(x.clientMessageId),c.value=!1,Ee=!1;const te=n.value.find(ye=>ye.id===z.messageId);te&&(te.isError=!0),e(`消息未发送:${x.message}`,"error")}}break}case"server_empty":{bt("idle");break}}}function V(x){const z=wh({goal:o.value,todos:i.value},x);switch(o.value=z.goal,i.value=z.todos,x.type==="goal.updated"&&oe!==null&&oe.generation===ae&&(oe=null,qe=null,Ve()),x.type){case"turn.started":{Ee&&(c.value=!1,Ee=!1,Oe.clear()),r.value={...r.value,busy:!0},n.value.push({id:w(),role:"assistant",content:"",tools:[],ts:Date.now()});break}case"assistant.delta":{const te=F();te&&(te.content+=String(x.delta));break}case"thinking.delta":{const te=F();if(te){const ye=te.tools.find(Pe=>Pe.name==="thinking");ye?ye.output=(ye.output??"")+String(x.delta):te.tools.push({toolCallId:"thinking",name:"thinking",output:String(x.delta)})}break}case"tool.call.started":{const te=F();te&&te.tools.push({toolCallId:String(x.toolCallId),name:String(x.name),args:x.args});break}case"tool.result":{const te=F();if(te){const ye=te.tools.find(Pe=>Pe.toolCallId===x.toolCallId);ye&&(ye.output=String(x.output),ye.isError=!!x.isError)}break}case"tool.progress":{const te=F();if(te){const ye=te.tools.find(Pe=>Pe.toolCallId===x.toolCallId);ye&&(ye.output=String(x.message??x.output))}break}case"turn.ended":{if(r.value={...r.value,busy:!1},x.reason==="failed"){const te=F();te&&(te.isError=!0),u.value=ce(x.error,"Turn failed")}ve(),De();break}case"session.meta.updated":{const te={};x.model!==void 0&&(te.model=x.model),x.contextTokens!==void 0&&(te.contextTokens=x.contextTokens),x.maxContextTokens!==void 0&&(te.maxContextTokens=x.maxContextTokens),x.contextUsage!==void 0&&(te.contextUsage=x.contextUsage),r.value={...r.value,...te};break}case"error":{u.value=ce(x.error,"Unknown error");break}}}function F(){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(ze||T&&(T.readyState===WebSocket.CONNECTING||T.readyState===WebSocket.OPEN))return;bt("connecting"),u.value=null,O(),de++;const x=new WebSocket(xn());T=x,x.onclose=z=>{if(T===x&&(T=null,P(),t.value!=="idle")){if(z.code===1008){D++,O(),d.value=null,m.value=null,b.value=!1,o.value=null,i.value=[],bt("idle");return}bt("disconnected"),N()}},x.onerror=()=>{T===x&&bt("reconnecting")},x.onmessage=z=>{if(T!==x)return;fe=Date.now();let te;try{te=JSON.parse(z.data)}catch{return}L(te)}}function M(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)}`,te=w();Oe.set(z,{messageId:te,connectionGeneration:de}),I++,Ee=!1,c.value=!0,n.value.push({id:te,role:"user",content:x,clientMessageId:z,tools:[],ts:Date.now()}),Ue({type:"prompt",text:x,clientMessageId:z})}function le(){Ue({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 te=["compact","plan","auto","yes","fork","title"];let ye=null;te.includes(x)&&(ye=w(),n.value.push({id:ye,role:"system",content:`正在执行 /${x}${z?` ${z}`:""}...`,tools:[],pending:!0,ts:Date.now(),local:!0})),Ue({type:"command",command:x,...z?{args:z}:{},...ye?{pendingMsgId:ye}:{}})}function re(){n.value=[],s.value=[]}function J(x){n.value.push({id:w(),role:"system",content:x,tools:[],ts:Date.now(),local:!0})}function se(x,z,te,ye){if(t.value!=="connected"){e("连接已断开,审批结果未发送。","error"),B();return}s.value=s.value.filter(Pe=>Pe.id!==x),Ue({type:"approval_response",id:x,decision:z,...te?{feedback:te}:{},...ye?{scope:ye}:{}})}async function ve(){try{const x=await fetch(`${zt}/sessions`);if(!x.ok)return;f.value=await x.json()}catch{}}async function _e(x){const z=D,te=de;try{return(await fetch(`${zt}/sessions/${x}/activate`,{method:"POST"})).ok&&de===te&&Zs(d.value,D,x,z)}catch{return!1}}async function De(){try{const x=await fetch(`${zt}/git/status`);if(!x.ok)return;const z=await x.json();S.value=z.isRepo?z:null}catch{}}async function Ke(){try{const x=await fetch(`${zt}/models`);if(!x.ok)return;const z=await x.json();C.value=z.models}catch{}}async function _t(x,z,te){const ye=d.value;if(!ye)return;const Pe=D,St=de,ht=++Z;try{const Fe=await fetch(`${zt}/sessions/${ye}/${x}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)}),Xt=await Fe.json();if(d.value!==ye||D!==Pe||de!==St||Z!==ht)return;if(!Fe.ok){e(Xt.message??`请求失败(HTTP ${Fe.status})`,"error");return}Xt.status&&(r.value={...r.value,...Xt.status}),J(te)}catch(Fe){if(d.value!==ye||D!==Pe||de!==St||Z!==ht)return;e(`请求失败:${Fe instanceof Error?Fe.message:String(Fe)}`,"error")}}async function Tt(x){x!==r.value.model&&await _t("model",{model:x},`已切换模型:${x}`)}async function Cn(x){x!==r.value.thinkingLevel&&await _t("thinking",{level:x},`思考强度已切换为 ${x}`)}async function Tn(x,z,te,ye){const Pe=d.value;if(!Pe)return a.value="暂无可操作的会话。",null;if(t.value!=="connected")return a.value="连接已断开,请等待重连后再试。",null;if(v.value)return a.value="当前会话已归档,无法修改 Goal。",null;if(He)return a.value="正在处理上一个请求,请稍候。",null;oe!==null&&(oe=null,Ve());const St=D,ht=++ae;He=!0,Ve(),a.value=null;try{const Fe=await fetch(`${zt}/sessions/${Pe}/goal${x}`,{method:z,headers:{"Content-Type":"application/json"},body:JSON.stringify(te)}),Xt=await Fe.json().catch(()=>({}));return!Zs(d.value,D,Pe,St)||ae!==ht?null:Fe.ok?(ye&&(oe={generation:ht},qe=ht),Xt):(a.value=typeof Xt.message=="string"?Xt.message:`请求失败(HTTP ${Fe.status})`,null)}catch(Fe){return Zs(d.value,D,Pe,St)&&ae===ht&&(a.value=`请求失败:${Fe instanceof Error?Fe.message:String(Fe)}`),null}finally{Zs(d.value,D,Pe,St)&&ae===ht&&(He=!1,Ve())}}async function dt(x){const z=await Tn("/refine","POST",{description:x},!1);return typeof(z==null?void 0:z.objective)=="string"?z.objective:null}async function $t(x){return await Tn("","POST",yh(x),!0)===null?!1:(oe!==null&&We(oe.generation),!0)}async function Hs(x){return await Tn("","PATCH",bh(x),!0)===null?!1:(oe!==null&&We(oe.generation),!0)}async function Fn(x){return await Tn(x,"POST",{},!0)===null?!1:(oe!==null&&We(oe.generation),!0)}function $u(){return Fn("/pause")}function Ru(){return Fn("/resume")}function Au(){return Fn("/cancel")}async function Eu(){try{const x=await fetch(`${zt}/sessions`,{method:"POST"});if(!x.ok){e(`新建会话失败(HTTP ${x.status})`,"error");return}const z=await x.json();f.value=[z,...f.value],await no(z.sessionId)}catch(x){e(`新建会话失败:${x instanceof Error?x.message:String(x)}`,"error")}}async function no(x){m.value===x&&t.value==="connected"||(m.value=x,d.value=x,D++,O(),U=0,ne=0,n.value=[],s.value=[],r.value={busy:!1},o.value=null,i.value=[],b.value=!1,c.value=!1,Ee=!1,Oe.clear(),ee!==null&&(clearTimeout(ee),ee=null),G!==null&&(clearTimeout(G),G=null),T&&(T.onclose=null,T.close(),T=null),P(),B())}async function Iu(x){try{const z=await fetch(`${zt}/sessions/${x}`,{method:"DELETE"});if(!z.ok){e(`删除会话失败(HTTP ${z.status})`,"error");return}if(f.value=f.value.filter(te=>te.sessionId!==x),m.value===x){const te=f.value[0];te?await no(te.sessionId):(D++,O(),d.value=null,m.value=null,b.value=!1,U=0,ne=0,n.value=[],s.value=[],r.value={busy:!1},o.value=null,i.value=[],c.value=!1,Ee=!1,Oe.clear(),T&&(T.onclose=null,T.close(),T=null),P(),bt("idle"))}}catch(z){e(`删除会话失败:${z instanceof Error?z.message:String(z)}`,"error")}}async function Pu(x){try{const z=await fetch(`${zt}/sessions/${x}/export`);if(!z.ok){e(`导出会话失败(HTTP ${z.status})`,"error");return}const te=await z.blob(),ye=URL.createObjectURL(te),Pe=document.createElement("a");Pe.href=ye,Pe.download=`${x}.md`,Pe.click(),URL.revokeObjectURL(ye)}catch(z){e(`导出会话失败:${z instanceof Error?z.message:String(z)}`,"error")}}B(),ve(),Ke();const Fi=()=>{B()},Hi=()=>{!document.hidden&&t.value!=="connected"&&B()};return window.addEventListener("online",Fi),document.addEventListener("visibilitychange",Hi),Sn(()=>{ze=!0,window.removeEventListener("online",Fi),document.removeEventListener("visibilitychange",Hi),P(),ee!==null&&(clearTimeout(ee),ee=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:d,workDir:p,isBusy:g,isArchived:v,sessions:f,currentSessionId:m,gitStatus:S,models:C,sendPrompt:M,sendCommand:Y,clearMessages:re,appendSystemMessage:J,abort:le,resolveApproval:se,fetchSessions:ve,fetchGitStatus:De,fetchModels:Ke,switchModel:Tt,switchThinking:Cn,refineGoal:dt,createGoal:$t,updateGoal:Hs,pauseGoal:$u,resumeGoal:Ru,cancelGoal:Au,createSession:Eu,switchSession:no,deleteSession:Iu,exportSession:Pu,fetchSnapshot:We}}function $h(e){const{storageKey:t,defaultWidth:n,min:s,max:r}=e;function o(S){return Number.isFinite(S)?Math.min(bf(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=q(i()),c=q(!1);function u(S){const C=o(S);a.value=C,l(C)}let d=0,p=0,g=null,f=-1;function m(S){if(!c.value)return;const C=S.clientX-d;u(p+C)}function b(){if(c.value){if(c.value=!1,document.body.style.userSelect="",document.body.style.cursor="",g){try{g.releasePointerCapture(f)}catch{}g.removeEventListener("pointermove",m),g.removeEventListener("pointerup",b),g.removeEventListener("pointercancel",b)}g=null,f=-1}}function v(S){S.preventDefault(),c.value=!0,d=S.clientX,p=o(a.value),g=S.currentTarget,f=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 Sn(b),{width:a,dragging:c,clamp:o,setWidth:u,onPointerDown:v}}const wi=[{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 Rh(e){const t=e.toLowerCase();return wi.filter(n=>{var s;return n.name.startsWith(t)||((s=n.aliases)==null?void 0:s.some(r=>r.startsWith(t)))})}function Ah(e){const t=e.toLowerCase(),n=wi.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 Eh(){return["可用命令:",...wi.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 Ih=["title","aria-label"],Ph=["width","height","viewBox"],Lh=["cx","cy","r"],Mh=["cx","cy","r","stroke-dasharray","stroke-dashoffset","transform"],go=2,Nh=Re({__name:"ContextRing",props:{usage:{default:void 0},size:{default:16}},setup(e){Gd(a=>({v1d95ffa8:l.value}));const t=e,n=Q(()=>{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=Q(()=>Math.round(n.value*100)),r=Q(()=>(t.size-go)/2),o=Q(()=>2*Math.PI*r.value),i=Q(()=>o.value*(1-n.value)),l=Q(()=>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":go,fill:"none"},null,8,Lh),h("circle",{class:"ring-value",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":go,fill:"none","stroke-linecap":"round","stroke-dasharray":o.value,"stroke-dashoffset":i.value,transform:`rotate(-90 ${e.size/2} ${e.size/2})`},null,8,Mh)],8,Ph))],8,Ih))}}),Ae=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Pc=Ae(Nh,[["__scopeId","data-v-3ffc343b"]]),Oh={key:0,class:"ui-dialog-header"},Dh={class:"ui-dialog-title"},Bh={class:"ui-dialog-body"},Gh={key:1,class:"ui-dialog-footer"},jh=Re({__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)),Sn(()=>window.removeEventListener("keydown",r,!0)),(o,i)=>(k(),je(pi,{to:"body"},[H(ki,{name:"dialog"},{default:nt(()=>[e.open?(k(),_("div",{key:0,class:"ui-dialog-overlay",onClick:i[1]||(i[1]=Yt(l=>e.closable!==!1&&s("close"),["self"]))},[h("div",{class:"ui-dialog",style:cn(e.maxWidth?{maxWidth:e.maxWidth}:void 0),role:"dialog","aria-modal":"true"},[e.title||o.$slots.header?(k(),_("div",Oh,[sr(o.$slots,"header",{},()=>[h("span",Dh,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"))},"✕")):K("",!0)])):K("",!0),h("div",Bh,[sr(o.$slots,"default",{},void 0,!0)]),o.$slots.footer?(k(),_("div",Gh,[sr(o.$slots,"footer",{},void 0,!0)])):K("",!0)],4)])):K("",!0)]),_:3})]))}}),Zr=Ae(jh,[["__scopeId","data-v-4562f775"]]),zh=["width","height"],Uh={key:0,d:"M4 7h16M4 12h16M4 17h16"},Fh={key:1,d:"M12 5v14M5 12h14"},Hh={key:5,d:"M4 6h16M7 12h10M10 18h4"},qh={key:6,d:"M12 3v12m0 0 4-4m-4 4-4-4M5 20h14"},Wh={key:7,d:"M4 7h16M9 7V4h6v3m3 0-1 13H7L6 7m4 4v5m4-5v5"},Vh={key:8,d:"M3 12h4l2-7 4 14 2-7h6"},Kh={key:10,d:"m15 18-6-6 6-6"},Zh={key:11,d:"m9 18 6-6-6-6"},Yh={key:12,d:"m6 9 6 6 6-6"},Jh={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"},Xh={key:18,d:"M5 9a11 11 0 0 1 14 0M8.5 12.5a6 6 0 0 1 7 0M12 17h.01"},Qh={key:19,d:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z"},ep={key:20,d:"M12 16V4m0 0-4 4m4-4 4 4M5 20h14"},tp={key:21,d:"m15 4 5 5M17.5 6.5 10 14m-2-2 4 4-3 4H3l1-6Z"},np={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"},sp={key:24,d:"m22 2-7 20-4-9-9-4ZM22 2 11 13"},rp={key:25,x:"6",y:"6",width:"12",height:"12",rx:"2"},op={key:26,d:"m8 3 4 4 4-4M8 21l4-4 4 4M12 7v10"},ip={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"},lp={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"},ap={key:31,d:"M20 13 13 20l-9-9V4h7ZM8.5 8.5h.01"},cp={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"},up={key:34,d:"M3 6h7l2 2h9v11H3Z"},fp={key:35,d:"m5 12 4 4L19 6"},dp=Re({__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",Uh)):e.name==="plus"?(k(),_("path",Fh)):e.name==="panel-left"?(k(),_(ie,{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(),_(ie,{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(),_(ie,{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",Hh)):e.name==="download"?(k(),_("path",qh)):e.name==="trash"?(k(),_("path",Wh)):e.name==="activity"?(k(),_("path",Vh)):e.name==="help"?(k(),_(ie,{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",Kh)):e.name==="chevron-right"?(k(),_("path",Zh)):e.name==="chevron-down"?(k(),_("path",Yh)):e.name==="bot"?(k(),_(ie,{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(),_(ie,{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(),_(ie,{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",Jh)):e.name==="monitor"?(k(),_(ie,{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",Xh)):e.name==="edit"?(k(),_("path",Qh)):e.name==="upload"?(k(),_("path",ep)):e.name==="broom"?(k(),_("path",tp)):e.name==="command"?(k(),_("path",np)):e.name==="at"?(k(),_(ie,{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",sp)):e.name==="stop"?(k(),_("rect",rp)):e.name==="compact"?(k(),_("path",op)):e.name==="brain"?(k(),_("path",ip)):e.name==="clipboard"?(k(),_(ie,{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(),_(ie,{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",lp)):e.name==="tag"?(k(),_("path",ap)):e.name==="sparkles"?(k(),_("path",cp)):e.name==="terminal"?(k(),_(ie,{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",up)):e.name==="check"?(k(),_("path",fp)):e.name==="copy"?(k(),_(ie,{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)):K("",!0)],8,zh))}}),he=Ae(dp,[["__scopeId","data-v-0a0ac222"]]),hp={class:"topbar"},pp={class:"agent-heading"},gp={class:"agent-mark"},mp={class:"agent-copy"},vp={class:"actions"},yp={key:0,class:"status-chip"},bp=["title"],kp={class:"truncate"},wp={key:0},_p={key:1},Sp=["disabled","title"],xp={class:"truncate"},Cp=["title"],Tp={class:"theme-toggle",role:"group","aria-label":"主题切换"},$p=["title","aria-pressed","onClick"],Rp=["title"],Ap={key:0,class:"diff-body"},Ep={key:1,class:"diff-empty"},Ip=Re({__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=Mt("theme",q("system")),o=Mt("setTheme",()=>{}),i=[{value:"light",icon:"sun",label:"浅色主题"},{value:"dark",icon:"moon",label:"深色主题"},{value:"system",icon:"monitor",label:"跟随系统"}],l={connecting:"连接中",connected:"已连接",reconnecting:"重连中",disconnected:"已断开",idle:"空闲"},a=Mt("modelSwitchable",q(!1)),c=q(!1),u=Q(()=>{const f=n.status.contextUsage;return f===void 0?null:Math.round((f>1?f/100:f)*100)}),d=Q(()=>{var f,m;return`Tokens: ${((f=n.status.contextTokens)==null?void 0:f.toLocaleString())??"-"} / ${((m=n.status.maxContextTokens)==null?void 0:m.toLocaleString())??"-"}`}),p=Q(()=>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(f,m)=>{var b;return k(),_("header",hp,[h("div",pp,[h("button",{class:"mobile-menu","aria-label":"打开会话列表",title:"打开会话列表",onClick:m[0]||(m[0]=v=>s("toggle-sidebar"))},[H(he,{name:"menu"})]),h("span",gp,[H(he,{name:"bot",size:22})]),h("div",mp,[m[3]||(m[3]=h("strong",null,"Scream Code Agent",-1)),h("span",null,[h("i",{class:be({busy:e.busy})},null,2),Ie(E(e.busy?"正在处理会话":"已就绪,等待任务"),1)])])]),h("div",vp,[e.status.planMode?(k(),_("span",yp,[H(he,{name:"clipboard",size:16}),m[4]||(m[4]=Ie("计划模式",-1))])):K("",!0),e.gitStatus?(k(),_("button",{key:1,class:"action-chip git",title:`分支:${e.gitStatus.branch??"detached"},点击查看变更统计`,onClick:g},[H(he,{name:"git-branch",size:17}),h("span",kp,E(e.gitStatus.branch??"detached"),1),p.value?(k(),_("span",wp,E(p.value),1)):K("",!0),e.gitStatus.changed?(k(),_("span",_p,E(e.gitStatus.changed)+" 项变更",1)):K("",!0)],8,bp)):K("",!0),e.status.model?(k(),_("button",{key:2,class:"action-chip model",disabled:!X(a),title:e.status.model,onClick:m[1]||(m[1]=v=>s("open-model-picker"))},[H(he,{name:"brain",size:17}),h("span",xp,E(e.status.model),1)],8,Sp)):K("",!0),u.value!==null?(k(),_("span",{key:3,class:"action-chip context",title:d.value},[H(Pc,{usage:e.status.contextUsage,size:18},null,8,["usage"]),Ie(E(u.value)+"%",1)],8,Cp)):K("",!0),h("div",Tp,[(k(),_(ie,null,Ye(i,v=>h("button",{key:v.value,class:be({active:X(r)===v.value}),title:v.label,"aria-pressed":X(r)===v.value,onClick:S=>X(o)(v.value)},[H(he,{name:v.icon,size:17},null,8,["name"])],10,$p)),64))]),h("div",{class:be(["connection",e.connectionStatus]),title:l[e.connectionStatus]},[H(he,{name:"wifi",size:18}),h("span",null,E(l[e.connectionStatus]),1)],10,Rp)]),H(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:nt(()=>{var v;return[(v=e.gitStatus)!=null&&v.diffStat?(k(),_("pre",Ap,E(e.gitStatus.diffStat),1)):(k(),_("div",Ep,"工作区干净,没有变更。"))]}),_:1},8,["open","title"])])}}}),Pp=Ae(Ip,[["__scopeId","data-v-6c220d1f"]]),Lp={class:"chat-header"},Mp={class:"title-area"},Np=["onKeydown"],Op={key:1,class:"title-copy"},Dp={class:"title-line"},Bp=["title"],Gp={class:"status-line"},jp={class:"header-actions"},zp=["title"],Up=["title"],Fp=Re({__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=q(!1),o=q(""),i=q(null);Ge(()=>n.title,()=>{r.value||(o.value=n.title??"")},{immediate:!0});function l(){o.value=n.title??"",r.value=!0,It(()=>{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=Mt("showThinking",q(!0)),d=Mt("showTools",q(!0));return(p,g)=>(k(),_("div",Lp,[h("div",Mp,[r.value?it((k(),_("input",{key:0,id:"session-title-input",ref_key:"inputRef",ref:i,"onUpdate:modelValue":g[0]||(g[0]=f=>o.value=f),name:"session-title",class:"title-input",maxlength:"80",onKeydown:[Is(Yt(a,["prevent"]),["enter"]),Is(Yt(c,["prevent"]),["esc"])],onBlur:a},null,40,Np)),[[kt,o.value]]):(k(),_("div",Op,[h("div",Dp,[h("h1",{title:e.title??void 0},E(e.title||"新会话"),9,Bp),h("button",{class:"icon-action edit",title:"重命名会话","aria-label":"重命名会话",onClick:l},[H(he,{name:"edit",size:17})])]),h("div",Gp,[h("span",{class:be(["status-dot",{busy:e.busy}])},null,2),Ie(E(e.busy?"Agent 正在运行并处理工具调用":"Agent 已就绪"),1)])]))]),h("div",jp,[h("button",{class:"text-action",title:"导出会话为 Markdown",onClick:g[1]||(g[1]=f=>s("export"))},[H(he,{name:"upload",size:18}),g[6]||(g[6]=h("span",null,"导出",-1))]),h("button",{class:"text-action",title:"清空本地消息列表",onClick:g[2]||(g[2]=f=>s("clear"))},[H(he,{name:"broom",size:18}),g[7]||(g[7]=h("span",null,"清空",-1))]),h("button",{class:be(["text-action",{dimmed:!X(u)}]),title:X(u)?"隐藏思考链":"显示思考链",onClick:g[3]||(g[3]=f=>u.value=!X(u))},[H(he,{name:"brain",size:18}),g[8]||(g[8]=h("span",null,"思考",-1))],10,zp),h("button",{class:be(["text-action",{dimmed:!X(d)}]),title:X(d)?"隐藏工具链":"显示工具链",onClick:g[4]||(g[4]=f=>d.value=!X(d))},[H(he,{name:"terminal",size:18}),g[9]||(g[9]=h("span",null,"工具",-1))],10,Up),h("button",{class:"icon-action",title:"显示或隐藏右侧面板","aria-label":"显示或隐藏右侧面板",onClick:g[5]||(g[5]=f=>s("toggle-rightbar"))},[H(he,{name:"panel-right",size:19})])])]))}}),Hp=Ae(Fp,[["__scopeId","data-v-5addc6d6"]]),_i=""+new URL("../icon.ico",import.meta.url).href;function Si(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zn=Si();function Lc(e){zn=e}var _s={exec:()=>null};function $e(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(vt.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,t)};return s}var vt={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")},qp=/^(?:[ \t]*(?:\n|$))+/,Wp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Vp=/^ {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+|$)/,Kp=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xi=/(?:[*+-]|\d{1,9}[.)])/,Mc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Nc=$e(Mc).replace(/bull/g,xi).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(),Zp=$e(Mc).replace(/bull/g,xi).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(),Ci=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yp=/^[^\n]+/,Ti=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Jp=$e(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ti).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xp=$e(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xi).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",$i=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qp=$e("^ {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",$i).replace("tag",Yr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Oc=$e(Ci).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(),eg=$e(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Oc).getRegex(),Ri={blockquote:eg,code:Wp,def:Jp,fences:Vp,heading:Kp,hr:zs,html:Qp,lheading:Nc,list:Xp,newline:qp,paragraph:Oc,table:_s,text:Yp},Ll=$e("^ *([^\\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(),tg={...Ri,lheading:Zp,table:Ll,paragraph:$e(Ci).replace("hr",zs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ll).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()},ng={...Ri,html:$e(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$i).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:$e(Ci).replace("hr",zs).replace("heading",` *#{1,6} *[^
|
|
19
|
-
]`).replace("lheading",Nc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},sg=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rg=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Dc=/^( {2,}|\\)\n(?!\s*$)/,og=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Jr=/[\p{P}\p{S}]/u,Ai=/[\s\p{P}\p{S}]/u,Bc=/[^\s\p{P}\p{S}]/u,ig=$e(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ai).getRegex(),Gc=/(?!~)[\p{P}\p{S}]/u,lg=/(?!~)[\s\p{P}\p{S}]/u,ag=/(?:[^\s\p{P}\p{S}]|~)/u,cg=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,jc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ug=$e(jc,"u").replace(/punct/g,Jr).getRegex(),fg=$e(jc,"u").replace(/punct/g,Gc).getRegex(),zc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",dg=$e(zc,"gu").replace(/notPunctSpace/g,Bc).replace(/punctSpace/g,Ai).replace(/punct/g,Jr).getRegex(),hg=$e(zc,"gu").replace(/notPunctSpace/g,ag).replace(/punctSpace/g,lg).replace(/punct/g,Gc).getRegex(),pg=$e("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Bc).replace(/punctSpace/g,Ai).replace(/punct/g,Jr).getRegex(),gg=$e(/\\(punct)/,"gu").replace(/punct/g,Jr).getRegex(),mg=$e(/^<(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(),vg=$e($i).replace("(?:-->|$)","-->").getRegex(),yg=$e("^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",vg).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),kr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,bg=$e(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",kr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Uc=$e(/^!?\[(label)\]\[(ref)\]/).replace("label",kr).replace("ref",Ti).getRegex(),Fc=$e(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ti).getRegex(),kg=$e("reflink|nolink(?!\\()","g").replace("reflink",Uc).replace("nolink",Fc).getRegex(),Ei={_backpedal:_s,anyPunctuation:gg,autolink:mg,blockSkip:cg,br:Dc,code:rg,del:_s,emStrongLDelim:ug,emStrongRDelimAst:dg,emStrongRDelimUnd:pg,escape:sg,link:bg,nolink:Fc,punctuation:ig,reflink:Uc,reflinkSearch:kg,tag:yg,text:og,url:_s},wg={...Ei,link:$e(/^!?\[(label)\]\((.*?)\)/).replace("label",kr).getRegex(),reflink:$e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kr).getRegex()},zo={...Ei,emStrongRDelimAst:hg,emStrongLDelim:fg,url:$e(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},_g={...zo,br:$e(Dc).replace("{2,}","*").getRegex(),text:$e(zo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ys={normal:Ri,gfm:tg,pedantic:ng},cs={normal:Ei,gfm:zo,breaks:_g,pedantic:wg},Sg={"&":"&","<":"<",">":">",'"':""","'":"'"},Ml=e=>Sg[e];function Ft(e,t){if(t){if(vt.escapeTest.test(e))return e.replace(vt.escapeReplace,Ml)}else if(vt.escapeTestNoEncode.test(e))return e.replace(vt.escapeReplaceNoEncode,Ml);return e}function Nl(e){try{e=encodeURI(e).replace(vt.percentDecode,"%")}catch{return null}return e}function Ol(e,t){var o;const n=e.replace(vt.findPipe,(i,l,a)=>{let c=!1,u=l;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(vt.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(vt.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 xg(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 Dl(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 Cg(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=Cg(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 d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=d,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,f=g.raw+`
|
|
30
|
-
`+n.join(`
|
|
31
|
-
`),m=this.blockquote(f);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,f=g.raw+`
|
|
32
|
-
`+n.join(`
|
|
33
|
-
`),m=this.list(f);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=f.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 d=t[2].split(`
|
|
35
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),p=e.split(`
|
|
36
|
-
`,1)[0],g=!d.trim(),f=0;if(this.options.pedantic?(f=2,u=d.trimStart()):g?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,u=d.slice(f),f+=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(f),S=this.rules.other.hrRegex(f),C=this.rules.other.fencesBeginRegex(f),T=this.rules.other.headingBeginRegex(f),W=this.rules.other.htmlBeginRegex(f);for(;e;){const ee=e.split(`
|
|
38
|
-
`,1)[0];let G;if(p=ee,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)||W.test(p)||v.test(p)||S.test(p))break;if(G.search(this.rules.other.nonSpaceChar)>=f||!p.trim())u+=`
|
|
39
|
-
`+G.slice(f);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(d)||T.test(d)||S.test(d))break;u+=`
|
|
40
|
-
`+p}!g&&!p.trim()&&(g=!0),c+=ee+`
|
|
41
|
-
`,e=e.substring(ee.length+1),d=G.slice(f)}}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(d=>d.type==="space"),u=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.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=Ol(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(Ol(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=xg(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)),Dl(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 Dl(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 d=[...s[0]][0].length,p=e.slice(0,o+s.index+d+l);if(Math.min(o,l)%2){const f=p.slice(1,-1);return{type:"em",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}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}}}},on=class Uo{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:vt,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 Uo(n).lex(t)}static lexInline(t,n){return new Uo(n).inlineTokens(t)}lex(t){t=t.replace(vt.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(vt.tabCharGlobal," ").replace(vt.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 d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},u),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),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 d=t;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0;const g=t.slice(1);let f;this.options.extensions.startInline.forEach(m=>{f=m.call({lexer:this},g),typeof f=="number"&&f>=0&&(p=Math.min(p,f))}),p<1/0&&p>=0&&(d=t.substring(0,p+1))}if(u=this.tokenizer.inlineText(d)){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(vt.notSpaceStart))==null?void 0:o[0],r=e.replace(vt.endingNewline,"")+`
|
|
54
|
-
`;return s?'<pre><code class="language-'+Ft(s)+'">'+(n?r:Ft(r,!0))+`</code></pre>
|
|
55
|
-
`:"<pre><code>"+(n?r:Ft(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+" "+Ft(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>${Ft(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=Nl(e);if(r===null)return s;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+Ft(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=Nl(e);if(r===null)return Ft(n);e=r;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${Ft(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ft(e.text)}},Ii=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""}},ln=class Fo{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 Ii}static parse(t,n){return new Fo(n).parse(t)}static parseInline(t,n){return new Fo(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}},Co,or=(Co=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?on.lex:on.lexInline}provideParser(){return this.block?ln.parse:ln.parseInline}},$(Co,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Co),Tg=class{constructor(...e){$(this,"defaults",Si());$(this,"options",this.setOptions);$(this,"parse",this.parseMarkdown(!0));$(this,"parseInline",this.parseMarkdown(!1));$(this,"Parser",ln);$(this,"Renderer",_r);$(this,"TextRenderer",Ii);$(this,"Lexer",on);$(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(d=>a.call(r,d));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 on.lex(e,t??this.defaults)}parser(e,t){return ln.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?on.lex:on.lexInline,a=o.hooks?o.hooks.provideParser():e?ln.parse:ln.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>"+Ft(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},jn=new Tg;function Ce(e,t){return jn.parse(e,t)}Ce.options=Ce.setOptions=function(e){return jn.setOptions(e),Ce.defaults=jn.defaults,Lc(Ce.defaults),Ce};Ce.getDefaults=Si;Ce.defaults=zn;Ce.use=function(...e){return jn.use(...e),Ce.defaults=jn.defaults,Lc(Ce.defaults),Ce};Ce.walkTokens=function(e,t){return jn.walkTokens(e,t)};Ce.parseInline=jn.parseInline;Ce.Parser=ln;Ce.parser=ln.parse;Ce.Renderer=_r;Ce.TextRenderer=Ii;Ce.Lexer=on;Ce.lexer=on.lex;Ce.Tokenizer=wr;Ce.Hooks=or;Ce.parse=Ce;Ce.options;Ce.setOptions;Ce.use;Ce.walkTokens;Ce.parseInline;ln.parse;on.lex;const $g="modulepreload",Rg=function(e,t){return new URL(e,t).href},Bl={},Js=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(d=>Promise.resolve(d).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=Rg(u,s),u in Bl)return;Bl[u]=!0;const d=u.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!s)for(let m=l.length-1;m>=0;m--){const b=l[m];if(b.href===u&&(!d||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${p}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":$g,d||(f.as="script"),f.crossOrigin="",f.href=u,c&&f.setAttribute("nonce",c),document.head.appendChild(f),d)return new Promise((m,b)=>{f.addEventListener("load",m),f.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 tt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Ag(e){return Pi(e)}function Pi(e){return Array.isArray(e)?Eg(e):e instanceof RegExp?e:typeof e=="object"?Ig(e):e}function Eg(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=Pi(e[n]);return t}function Ig(e){let t={};for(let n in e)t[n]=Pi(e[n]);return t}function Hc(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 mo=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xs=class{static hasCaptures(e){return e===null?!1:(mo.lastIndex=0,mo.test(e))}static replaceCaptures(e,t,n){return e.replace(mo,(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 Wc(e,t){return e<t?-1:e>t?1:0}function Vc(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=Wc(e[r],t[r]);if(o!==0)return o}return 0}return n-s}function Gl(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 Kc(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Zc=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 Zc(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Mg(e),t)}static createFromParsedTheme(e,t){return Og(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=>Pg(e.parent,r.parentScopes));return s?new Yc(s.fontStyle,s.foreground,s.background):null}},vo=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 Pg(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&&!Lg(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Lg(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Yc=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Mg(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 d=i.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),l=d.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let d=i.settings.fontStyle.split(" ");for(let p=0,g=d.length;p<g;p++)switch(d[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"&&Gl(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&Gl(i.settings.background)&&(u=i.settings.background);for(let d=0,p=l.length;d<p;d++){let f=l[d].trim().split(" "),m=f[f.length-1],b=null;f.length>1&&(b=f.slice(0,f.length-1),b.reverse()),n[s++]=new Ng(m,b,r,a,c,u)}}return n}var Ng=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 Og(e,t){e.sort((a,c)=>{let u=Wc(a.scope,c.scope);return u!==0||(u=Vc(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 Dg(t),i=new Yc(n,o.getId(s),o.getId(r)),l=new Gg(new Ho(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 Dg=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)}},Bg=Object.freeze([]),Ho=class Jc{constructor(t,n,s,r,o){$(this,"scopeDepth");$(this,"parentScopes");$(this,"fontStyle");$(this,"foreground");$(this,"background");this.scopeDepth=t,this.parentScopes=n||Bg,this.fontStyle=s,this.foreground=r,this.background=o}clone(){return new Jc(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)}},Gg=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(),Ho.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(Vc(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 Ho(t,n,s,r,o))}},ss=class At{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=At.getLanguageId(t),s=At.getTokenType(t),r=At.getFontStyle(t),o=At.getForeground(t),i=At.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=At.getLanguageId(t),c=At.getTokenType(t),u=At.containsBalancedBrackets(t)?1:0,d=At.getFontStyle(t),p=At.getForeground(t),g=At.getBackground(t);return n!==0&&(a=n),s!==8&&(c=s),r!==null&&(u=r?1:0),o!==-1&&(d=o),i!==0&&(p=i),l!==0&&(g=l),(a<<0|c<<8|u<<10|d<<11|p<<15|g<<24)>>>0}};function xr(e,t){const n=[],s=jg(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(jl(r)){const a=[];do a.push(r),r=s.next();while(jl(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(d=>d(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(d=>d(u))}}function jl(e){return!!e&&!!e.match(/[\w\.:]+/)}function jg(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 Xc(e){typeof e.dispose=="function"&&e.dispose()}var Ls=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},zg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ug=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))}},Fg=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 Ls(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new Ug;for(const n of e)Hg(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ls){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 Hg(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 Ls?lr({baseGrammar:o,selfGrammar:r},s):Wo(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 Ls(l))}function Wo(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?Hc({},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=Qc(o);switch(i.kind){case 0:lr({...t,selfGrammar:t.baseGrammar},n);break;case 1:lr(t,n);break;case 2:Wo(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?Wo(i.ruleName,a,n):lr(a,n)}else i.kind===4?n.add(new zg(i.scopeName,i.ruleName)):n.add(new Ls(i.scopeName));break}}}var qg=class{constructor(){$(this,"kind",0)}},Wg=class{constructor(){$(this,"kind",1)}},Vg=class{constructor(e){$(this,"kind",2);this.ruleName=e}},Kg=class{constructor(e){$(this,"kind",3);this.scopeName=e}},Zg=class{constructor(e,t){$(this,"kind",4);this.scopeName=e,this.ruleName=t}};function Qc(e){if(e==="$base")return new qg;if(e==="$self")return new Wg;const t=e.indexOf("#");if(t===-1)return new Kg(e);if(t===0)return new Vg(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new Zg(n,s)}}var Yg=/\\(\d+)/,zl=/\\(\d+)/g,Jg=-1,eu=-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)}},Xg=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!")}},Qg=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}},Ul=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}},Vo=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,eu),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}},tu=class ot{static createCaptureRule(t,n,s,r,o){return t.registerRule(i=>new Xg(n,i,s,r,o))}static getCompiledRuleId(t,n,s){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new Qg(t.$vscodeTextmateLocation,t.id,t.name,t.match,ot._compileCaptures(t.captures,n,s));if(typeof t.begin>"u"){t.repository&&(s=Hc({},s,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Ul(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,ot._compilePatterns(o,n,s))}return t.while?new Tr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ot._compileCaptures(t.beginCaptures||t.captures,n,s),t.while,ot._compileCaptures(t.whileCaptures||t.captures,n,s),ot._compilePatterns(t.patterns,n,s)):new Vo(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ot._compileCaptures(t.beginCaptures||t.captures,n,s),t.end,ot._compileCaptures(t.endCaptures||t.captures,n,s),t.applyEndPatternLast,ot._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=ot.getCompiledRuleId(t[i],n,s)),r[l]=ot.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=Qc(l.include);switch(c.kind){case 0:case 1:a=ot.getCompiledRuleId(s[l.include],n,s);break;case 2:let u=s[c.ruleName];u&&(a=ot.getCompiledRuleId(u,n,s));break;case 3:case 4:const d=c.scopeName,p=c.kind===4?c.ruleName:null,g=n.getExternalGrammar(d,s);if(g)if(p){let f=g.repository[p];f&&(a=ot.getCompiledRuleId(f,n,g.repository))}else a=ot.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else a=ot.getCompiledRuleId(l,n,s);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof Ul||c instanceof Vo||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 nu{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=Yg.test(this.source):this.hasBackReferences=!1}clone(){return new nu(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 zl.lastIndex=0,this.source.replace(zl,(r,o)=>Kc(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 Fl(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 Fl(e,s,this._items.map(r=>r.ruleId))}},Fl=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}},yo=class{constructor(e,t){this.languageId=e,this.tokenType=t}},rn,em=(rn=class{constructor(t,n){$(this,"_defaultAttributes");$(this,"_embeddedLanguagesMatcher");$(this,"_getBasicScopeAttributes",new Zc(t=>{const n=this._scopeToLanguage(t),s=this._toStandardTokenType(t);return new yo(n,s)}));this._defaultAttributes=new yo(t,8),this._embeddedLanguagesMatcher=new tm(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?rn._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(rn.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!")}},$(rn,"_NULL_SCOPE_METADATA",new yo(0,0)),$(rn,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),rn),tm=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])=>Kc(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])}},Hl=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function su(e,t,n,s,r,o,i,l){const a=t.content.length;let c=!1,u=-1;if(i){const g=nm(e,t,n,s,r,o);r=g.stack,s=g.linePos,n=g.isFirstLine,u=g.anchorPosition}const d=Date.now();for(;!c;){if(l!==0&&Date.now()-d>l)return new Hl(r,!0);p()}return new Hl(r,!1);function p(){const g=sm(e,t,n,s,r,u);if(!g){o.produce(r,a),c=!0;return}const f=g.captureIndices,m=g.matchedRuleId,b=f&&f.length>0?f[0].end>s:!1;if(m===Jg){const v=r.getRule(e);o.produce(r,f[0].start),r=r.withContentNameScopesList(r.nameScopesList),gs(e,t,n,r,o,v.endCaptures,f),o.produce(r,f[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,f[0].start);const S=r,C=v.getName(t.content,f),T=r.contentNameScopesList.pushAttributed(C,e);if(r=r.push(m,s,u,f[0].end===a,null,T,T),v instanceof Vo){const W=v;gs(e,t,n,r,o,W.beginCaptures,f),o.produce(r,f[0].end),u=f[0].end;const ee=W.getContentName(t.content,f),G=T.pushAttributed(ee,e);if(r=r.withContentNameScopesList(G),W.endHasBackReferences&&(r=r.withEndRule(W.getEndWithResolvedBackReferences(t.content,f))),!b&&S.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(v instanceof Tr){const W=v;gs(e,t,n,r,o,W.beginCaptures,f),o.produce(r,f[0].end),u=f[0].end;const ee=W.getContentName(t.content,f),G=T.pushAttributed(ee,e);if(r=r.withContentNameScopesList(G),W.whileHasBackReferences&&(r=r.withEndRule(W.getWhileWithResolvedBackReferences(t.content,f))),!b&&S.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(gs(e,t,n,r,o,v.captures,f),o.produce(r,f[0].end),r=r.pop(),!b){r=r.safePop(),o.produce(r,a),c=!0;return}}f[0].end>s&&(s=f[0].end,n=!1)}}function nm(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}=im(a.rule,e,a.stack.endRule,n,s===i),d=c.findNextMatchSync(t,s,u);if(d){if(d.ruleId!==eu){r=a.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(a.stack,d.captureIndices[0].start),gs(e,t,n,a.stack,o,a.rule.whileCaptures,d.captureIndices),o.produce(a.stack,d.captureIndices[0].end),i=d.captureIndices[0].end,d.captureIndices[0].end>s&&(s=d.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}function sm(e,t,n,s,r,o){const i=rm(e,t,n,s,r,o),l=e.getInjections();if(l.length===0)return i;const a=om(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 rm(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:l,findOptions:a}=ru(i,e,r.endRule,n,s===o),c=l.findNextMatchSync(t,s,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function om(e,t,n,s,r,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const d=o.contentNameScopesList.getScopeNames();for(let p=0,g=e.length;p<g;p++){const f=e[p];if(!f.matcher(d))continue;const m=t.getRule(f.ruleId),{ruleScanner:b,findOptions:v}=ru(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=f.priority,l===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function ru(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function im(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 d=0;d<a;d++){const p=o[d];if(p===null)continue;const g=i[d];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));su(e,T,n&&g.start===0,g.start,C,r,!1,0),Xc(T);continue}const f=p.getName(l,i);if(f!==null){const b=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(f,e);c.push(new lm(b,g.end))}}for(;c.length>0;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var lm=class{constructor(e,t){$(this,"scopes");$(this,"endPos");this.scopes=e,this.endPos=t}};function am(e,t,n,s,r,o,i,l){return new um(e,t,n,s,r,o,i,l)}function ql(e,t,n,s,r){const o=xr(t,$r),i=tu.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(cm(t[r],s))return n=r+1,!0;return!1})}function cm(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 um=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 em(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=Wl(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]=Wl(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=tu.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!t||t===Ko.NULL){r=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=ss.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,d,this):g=Ss.createRoot("unknown",d),t=new Ko(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 dm(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=su(this,o,r,0,t,l,!0,s);return Xc(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Wl(e,t){return e=Ag(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 Ht{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=vo.push(r,o.scopeNames),s=new Ht(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new Ht(null,new vo(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new vo(null,t),i=s.themeProvider.themeMatch(o),l=Ht.mergeAttributes(n,r,i);return new Ht(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Ht.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),ss.set(t,n.languageId,n.tokenType,null,r,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Ht._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=Ht._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=Ht.mergeAttributes(t.tokenAttributes,r,i);return new Ht(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,Ko=(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),fm=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}},dm=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=ss.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=ss.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}},hm=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,am(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},pm=class{constructor(t){$(this,"_options");$(this,"_syncRegistry");$(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new hm(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 fm(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,s,r,o){const i=new Fg(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)}},Zo=Ko.NULL;const gm=["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 ou(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 Yo(e){return e.toLowerCase()}class wt{constructor(t,n){this.attribute=n,this.property=t}}wt.prototype.attribute="";wt.prototype.booleanish=!1;wt.prototype.boolean=!1;wt.prototype.commaOrSpaceSeparated=!1;wt.prototype.commaSeparated=!1;wt.prototype.defined=!1;wt.prototype.mustUseProperty=!1;wt.prototype.number=!1;wt.prototype.overloadedBoolean=!1;wt.prototype.property="";wt.prototype.spaceSeparated=!1;wt.prototype.space=void 0;let mm=0;const ge=Un(),Ze=Un(),Jo=Un(),j=Un(),Le=Un(),Bn=Un(),xt=Un();function Un(){return 2**++mm}const Xo=Object.freeze(Object.defineProperty({__proto__:null,boolean:ge,booleanish:Ze,commaOrSpaceSeparated:xt,commaSeparated:Bn,number:j,overloadedBoolean:Jo,spaceSeparated:Le},Symbol.toStringTag,{value:"Module"})),bo=Object.keys(Xo);class Li extends wt{constructor(t,n,s,r){let o=-1;if(super(t,n),Vl(this,"space",r),typeof s=="number")for(;++o<bo.length;){const i=bo[o];Vl(this,bo[o],(s&Xo[i])===Xo[i])}}}Li.prototype.defined=!0;function Vl(e,t,n){n&&(e[t]=n)}function rs(e){const t={},n={};for(const[s,r]of Object.entries(e.properties)){const o=new Li(s,e.transform(e.attributes||{},s),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Yo(s)]=s,n[Yo(o.attribute)]=s}return new Fs(t,n,e.space)}const iu=rs({properties:{ariaActiveDescendant:null,ariaAtomic:Ze,ariaAutoComplete:null,ariaBusy:Ze,ariaChecked:Ze,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:Le,ariaCurrent:null,ariaDescribedBy:Le,ariaDetails:null,ariaDisabled:Ze,ariaDropEffect:Le,ariaErrorMessage:null,ariaExpanded:Ze,ariaFlowTo:Le,ariaGrabbed:Ze,ariaHasPopup:null,ariaHidden:Ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Le,ariaLevel:j,ariaLive:null,ariaModal:Ze,ariaMultiLine:Ze,ariaMultiSelectable:Ze,ariaOrientation:null,ariaOwns:Le,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Ze,ariaReadOnly:Ze,ariaRelevant:null,ariaRequired:Ze,ariaRoleDescription:Le,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Ze,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 lu(e,t){return t in e?e[t]:t}function au(e,t){return lu(e,t.toLowerCase())}const vm=rs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Bn,acceptCharset:Le,accessKey:Le,action:null,allow:null,allowFullScreen:ge,allowPaymentRequest:ge,allowUserMedia:ge,alpha:ge,alt:null,as:null,async:ge,autoCapitalize:null,autoComplete:Le,autoFocus:ge,autoPlay:ge,blocking:Le,capture:null,charSet:null,checked:ge,cite:null,className:Le,closedBy:null,colorSpace:null,cols:j,colSpan:j,command:null,commandFor:null,content:null,contentEditable:Ze,controls:ge,controlsList:Le,coords:j|Bn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ge,defer:ge,dir:null,dirName:null,disabled:ge,download:Jo,draggable:Ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ge,formTarget:null,headers:Le,height:j,hidden:Jo,high:j,href:null,hrefLang:null,htmlFor:Le,httpEquiv:Le,id:null,imageSizes:null,imageSrcSet:null,inert:ge,inputMode:null,integrity:null,is:null,isMap:ge,itemId:null,itemProp:Le,itemRef:Le,itemScope:ge,itemType:Le,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:Le,placeholder:null,playsInline:ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ge,referrerPolicy:null,rel:Le,required:ge,reversed:ge,rows:j,rowSpan:j,sandbox:Le,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:Ze,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:Ze,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Le,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:Ze,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:Le,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:au}),ym=rs({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:Le,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:Le,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:lu}),cu=rs({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()}}),uu=rs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:au}),fu=rs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bm=/[A-Z]/g,Kl=/-[a-z]/g,km=/^data[-\w.:]+$/i;function wm(e,t){const n=Yo(t);let s=t,r=wt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&km.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Kl,Sm);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Kl.test(o)){let i=o.replace(bm,_m);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}r=Li}return new r(s,t)}function _m(e){return"-"+e.toLowerCase()}function Sm(e){return e.charAt(1).toUpperCase()}const xm=ou([iu,vm,cu,uu,fu],"html"),du=ou([iu,ym,cu,uu,fu],"svg"),Zl={}.hasOwnProperty;function Cm(e,t){const n=t||{};function s(r,...o){let i=s.invalid;const l=s.handlers;if(r&&Zl.call(r,e)){const a=String(r[e]);i=Zl.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 Tm=/["&'<>`]/g,$m=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rm=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Am=/[|\\{}()[\]^$+*?.]/g,Yl=new WeakMap;function Em(e,t){if(e=e.replace(t.subset?Im(t.subset):Tm,s),t.subset||t.escapeOnly)return e;return e.replace($m,n).replace(Rm,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 Im(e){let t=Yl.get(e);return t||(t=Pm(e),Yl.set(e,t)),t}function Pm(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Am,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Lm=/[\dA-Fa-f]/;function Mm(e,t,n){const s="&#x"+e.toString(16).toUpperCase();return n&&t&&!Lm.test(String.fromCharCode(t))?s:s+";"}const Nm=/\d/;function Om(e,t,n){const s="&#"+String(e);return n&&t&&!Nm.test(String.fromCharCode(t))?s:s+";"}const Dm=["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"],ko={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:"€"},Bm=["cent","copy","divide","gt","lt","not","para","times"],hu={}.hasOwnProperty,Qo={};let Qs;for(Qs in ko)hu.call(ko,Qs)&&(Qo[ko[Qs]]=Qs);const Gm=/[^\dA-Za-z]/;function jm(e,t,n,s){const r=String.fromCharCode(e);if(hu.call(Qo,r)){const o=Qo[r],i="&"+o;return n&&Dm.includes(o)&&!Bm.includes(o)&&(!s||t&&t!==61&&Gm.test(String.fromCharCode(t)))?i:i+";"}return""}function zm(e,t,n){let s=Mm(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=jm(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=Om(e,t,n.omitOptionalSemicolons);o.length<s.length&&(s=o)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function es(e,t){return Em(e,Object.assign({format:zm},t))}const Um=/^>|^->|<!--|-->|--!>|<!-$/g,Fm=[">"],Hm=["<",">"];function qm(e,t,n,s){return s.settings.bogusComments?"<?"+es(e.value,Object.assign({},s.settings.characterReferences,{subset:Fm}))+">":"<!--"+e.value.replace(Um,r)+"-->";function r(o){return es(o,Object.assign({},s.settings.characterReferences,{subset:Hm}))}}function Wm(e,t,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function Jl(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 Vm(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Km(e){return e.join(" ").trim()}const Zm=/[ \t\n\f\r]/g;function Mi(e){return typeof e=="object"?e.type==="text"?Xl(e.value):!1:Xl(e)}function Xl(e){return e.replace(Zm,"")===""}const Qe=gu(1),pu=gu(-1),Ym=[];function gu(e){return t;function t(n,s,r){const o=n?n.children:Ym;let i=(s||0)+e,l=o[i];if(!r)for(;l&&Mi(l);)i+=e,l=o[i];return l}}const Jm={}.hasOwnProperty;function mu(e){return t;function t(n,s,r){return Jm.call(e,n.tagName)&&e[n.tagName](n,s,r)}}const Ni=mu({body:Qm,caption:wo,colgroup:wo,dd:sv,dt:nv,head:wo,html:Xm,li:tv,optgroup:rv,option:ov,p:ev,rp:Ql,rt:Ql,tbody:lv,td:ea,tfoot:av,th:ea,thead:iv,tr:cv});function wo(e,t,n){const s=Qe(n,t,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&Mi(s.value.charAt(0)))}function Xm(e,t,n){const s=Qe(n,t);return!s||s.type!=="comment"}function Qm(e,t,n){const s=Qe(n,t);return!s||s.type!=="comment"}function ev(e,t,n){const s=Qe(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 tv(e,t,n){const s=Qe(n,t);return!s||s.type==="element"&&s.tagName==="li"}function nv(e,t,n){const s=Qe(n,t);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function sv(e,t,n){const s=Qe(n,t);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function Ql(e,t,n){const s=Qe(n,t);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function rv(e,t,n){const s=Qe(n,t);return!s||s.type==="element"&&s.tagName==="optgroup"}function ov(e,t,n){const s=Qe(n,t);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function iv(e,t,n){const s=Qe(n,t);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function lv(e,t,n){const s=Qe(n,t);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function av(e,t,n){return!Qe(n,t)}function cv(e,t,n){const s=Qe(n,t);return!s||s.type==="element"&&s.tagName==="tr"}function ea(e,t,n){const s=Qe(n,t);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const uv=mu({body:hv,colgroup:pv,head:dv,html:fv,tbody:gv});function fv(e){const t=Qe(e,-1);return!t||t.type!=="comment"}function dv(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 hv(e){const t=Qe(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Mi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function pv(e,t,n){const s=pu(n,t),r=Qe(e,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&Ni(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function gv(e,t,n){const s=pu(n,t),r=Qe(e,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&Ni(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 mv(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=du);const c=vv(s,e.properties),u=s.all(r.space==="html"&&e.tagName==="template"?e.content:e);return s.schema=r,u&&(i=!1),(c||!o||!uv(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||!Ni(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function vv(e,t){const n=[];let s=-1,r;if(t){for(r in t)if(t[r]!==null&&t[r]!==void 0){const o=yv(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 yv(e,t,n){const s=wm(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=es(s.attribute,Object.assign({},e.settings.characterReferences,{subset:er.name[r][o]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?Vm:Km)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(l=es(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:er.unquoted[r][o]}))),l!==n&&(e.settings.quoteSmart&&Jl(n,i)>Jl(n,e.alternative)&&(i=e.alternative),l=i+es(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?er.single:er.double)[r][o],attribute:!0}))+i),a+(l&&"="+l))}const bv=["<","&"];function vu(e,t,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:es(e.value,Object.assign({},s.settings.characterReferences,{subset:bv}))}function kv(e,t,n,s){return s.settings.allowDangerousHtml?e.value:vu(e,t,n,s)}function wv(e,t,n,s){return s.all(e)}const _v=Cm("type",{invalid:Sv,unknown:xv,handlers:{comment:qm,doctype:Wm,element:mv,raw:kv,root:wv,text:vu}});function Sv(e){throw new Error("Expected node, not `"+e+"`")}function xv(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Cv={},Tv={},$v=[];function Rv(e,t){const n=t||Cv,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:Av,all:Ev,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||gm,characterReferences:n.characterReferences||Tv,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?du:xm,quote:s,alternative:r}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Av(e,t,n){return _v(e,t,n,this)}function Ev(e){const t=[],n=e&&e.children||$v;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 kn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function Iv(e){return Array.isArray(e)?e:[e]}async function yu(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Oi(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Pv(e){return e==="ansi"||Oi(e)}function Di(e){return e==="none"}function Lv(e){return Di(e)}function bu(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 Mv(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 Bi="light-dark()",Nv=["color","background-color"];function Ov(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 Dv(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?Ov(r,o):r})):e}function Bv(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,d)=>{const p=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[u]+(d==="color"?"":p)};return i.forEach((u,d)=>{for(const p of l){const g=u[p]||"inherit";if(d===0&&s&&Nv.includes(p))if(s===Bi&&i.length>1){const f=t.findIndex(S=>S==="light"),m=t.findIndex(S=>S==="dark");if(f===-1||m===-1)throw new tt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=i[f][p]||"inherit",v=i[m][p]||"inherit";a[p]=`light-dark(${b}, ${v})`,r==="css-vars"&&(a[c(d,p)]=g)}else a[p]=g;else r==="css-vars"&&(a[c(d,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 ei(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const ku=new WeakMap;function Qr(e,t){ku.set(e,t)}function Os(e){return ku.get(e)}class os{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 os(Object.fromEntries(Iv(n).map(s=>[s,Zo])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Gv(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Gv(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 jv(e,t){if(!(e instanceof os))throw new tt("Invalid grammar state");return e.getInternalStack(t)}function zv(){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 tt(`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 tt(`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 tt(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${l.length}`);return{...i,character:a,offset:r.posToIndex(i.line,a)}}};const r=Mv(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));Uv(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 Dv(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(d=>d.type==="element"&&d.tagName==="span");if(r.length!==s.converter.lines.length)throw new tt(`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(d,p,g,f){const m=r[d];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+=wu(m.children[T]),v===-1&&b.length===p&&(v=T+1),S===-1&&b.length===g&&(S=T+1);if(v===-1)throw new tt(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(S===-1)throw new tt(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const C=m.children.slice(v,S);if(!f.alwaysWrap&&C.length===m.children.length)l(m,f,"line");else if(!f.alwaysWrap&&C.length===1&&C[0].type==="element")l(C[0],f,"token");else{const T={type:"element",tagName:"span",properties:{},children:C};l(T,f,"wrapper"),m.children.splice(v,C.length,T)}}function i(d,p){r[d]=l(r[d],p,"line")}function l(d,p,g){var b;const f=p.properties||{},m=p.transform||(v=>v);return d.tagName=p.tagName||"span",d.properties={...d.properties,...f,class:d.properties.class},(b=p.properties)!=null&&b.class&&bu(d,p.properties.class),d=m(d,g)||d,d}const a=[],c=s.decorations.sort((d,p)=>p.start.offset-d.start.offset||d.end.offset-p.end.offset);for(const d of c){const{start:p,end:g}=d;if(p.line===g.line)o(p.line,p.character,g.character,d);else if(p.line<g.line){o(p.line,p.character,Number.POSITIVE_INFINITY,d);for(let f=p.line+1;f<g.line;f++)a.unshift(()=>i(f,d));o(g.line,0,g.character,d)}}a.forEach(d=>d())}}}function Uv(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new tt(`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 tt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function wu(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(wu).join(""):""}const Fv=[zv()];function Er(e){const t=Hv(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Fv]}function Hv(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"],_o={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function qv(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 ta(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 Wv(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)_o[s]&&t.push({type:"setDecoration",value:_o[s]});else if(s<=29){const r=_o[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=ta(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=ta(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 Vv(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let o=0;do{const i=qv(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=Wv(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 Kv={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 Zv(e=Kv){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 d=0;d<6;d++)s.push(n([l[c],l[u],l[d]]));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 Yv={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 Jv(e,t,n){const s=Rr(e,n),r=Xr(t),o=Object.fromEntries(Mn.map(a=>{var d;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=(d=e.colors)==null?void 0:d[c];return[a,u||Yv[a]]})),i=Zv(o),l=Vv();return r.map(a=>l.parse(a[0]).map(c=>{let u,d;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,d=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,d=c.background?i.value(c.background):void 0),u=kn(u,s),d=kn(d,s),c.decorations.has("dim")&&(u=Xv(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:d,fontStyle:p}}))}function Xv(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 Gi(e,t,n={}){const{theme:s=e.getLoadedThemes()[0]}=n,r=e.resolveLangAlias(n.lang||"text");if(Oi(r)||Di(s))return Xr(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:i}=e.setTheme(s);if(r==="ansi")return Jv(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new tt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new tt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return ey(t,l,o,i,n)}function Qv(...e){if(e.length===2)return Os(e[1]);const[t,n,s={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=s;if(Oi(r)||Di(o))throw new tt("Plain language does not have grammar state");if(r==="ansi")throw new tt("ANSI language does not have grammar state");const{theme:i,colorMap:l}=t.setTheme(o),a=t.getLanguage(r);return new os(ji(n,a,i,l,s).stateStack,a.name,i.name)}function ey(e,t,n,s,r){const o=ji(e,t,n,s,r),i=new os(o.stateStack,t.name,n.name);return Qr(o.tokens,i),o.tokens}function ji(e,t,n,s,r){const o=Rr(n,r),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500}=r,a=Xr(e);let c=r.grammarState?jv(r.grammarState,n.name)??Zo:r.grammarContextCode!=null?ji(r.grammarContextCode,t,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Zo,u=[];const d=[];for(let p=0,g=a.length;p<g;p++){const[f,m]=a[p];if(f===""){u=[],d.push([]);continue}if(i>0&&f.length>=i){u=[],d.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}let b,v,S;r.includeExplanation&&(b=t.tokenizeLine(f,c,l),v=b.tokens,S=0);const C=t.tokenizeLine2(f,c,l),T=C.tokens.length/2;for(let W=0;W<T;W++){const ee=C.tokens[2*W],G=W+1<T?C.tokens[2*W+2]:f.length;if(ee===G)continue;const fe=C.tokens[2*W+1],U=kn(s[ss.getForeground(fe)],o),ne=ss.getFontStyle(fe),pe={content:f.substring(ee,G),offset:m+ee,color:U,fontStyle:ne};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 de=0;for(;ee+de<G;){const I=v[S],R=f.substring(I.startIndex,I.endIndex);de+=R.length,pe.explanation.push({content:R,scopes:r.includeExplanation==="scopeName"?ty(I.scopes):ny(D,I.scopes)}),S+=1}}u.push(pe)}d.push(u),u=[],c=C.ruleStack}return{tokens:d,stateStack:c}}function ty(e){return e.map(t=>({scopeName:t}))}function ny(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]={scopeName:o,themeMatches:ry(e,o,t.slice(0,s))}}return n}function na(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function sy(e,t,n){if(!na(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)na(e[s],n[r])&&(s-=1),r-=1;return s===-1}function ry(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const i of r)if(sy(i,t,n)){s.push(o);break}return s}function _u(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=Gi(e,t,{...n,theme:a.theme}),u=Os(c),d=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:d}}),o=oy(...r.map(a=>a.tokens)),i=o[0].map((a,c)=>a.map((u,d)=>{const p={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(p.explanation=u.explanation),o.forEach((g,f)=>{const{content:m,explanation:b,offset:v,...S}=g[c][d];p.variants[s[f].color]=S}),p})),l=r[0].state?new os(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 oy(...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:d="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 tt("`themes` option must not be empty");const g=_u(e,t,n);if(a=Os(g),c&&Bi!==c&&!p.find(v=>v.color===c))throw new tt(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=p.map(v=>e.getTheme(v.theme)),m=p.map(v=>v.color);o=g.map(v=>v.map(S=>Bv(S,m,u,c,d))),a&&Qr(o,a);const b=p.map(v=>Rr(v.theme,n));r=sa(p,f,b,u,c,"fg",d),s=sa(p,f,b,u,c,"bg",d),i=`shiki-themes ${f.map(v=>v.name).join(" ")}`,l=c?void 0:[r,s].join(";")}else if("theme"in n){const c=Rr(n.theme,n);o=Gi(e,t,n);const u=e.getTheme(n.theme);s=kn(u.bg,c),r=kn(u.fg,c),i=u.name,a=Os(o)}else throw new tt("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:s,themeName:i,rootStyle:l,grammarState:a}}function sa(e,t,n,s,r,o,i){return e.map((l,a)=>{const c=kn(t[a][o],n[a])||"inherit",u=`${s+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&r){if(r===Bi&&e.length>1){const d=e.findIndex(m=>m.color==="light"),p=e.findIndex(m=>m.color==="dark");if(d===-1||p===-1)throw new tt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=kn(t[d][o],n[d])||"inherit",f=kn(t[p][o],n[p])||"inherit";return`light-dark(${g}, ${f});${u}`}return c}return i==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Pr(e,t,n,s={meta:{},options:n,codeToHast:(r,o)=>Pr(e,r,o),codeToTokens:(r,o)=>Ir(e,r,o)}){var f,m;let r=t;for(const b of Er(n))r=((f=b.preprocess)==null?void 0:f.call(s,r,n))||r;let{tokens:o,fg:i,bg:l,themeName:a,rootStyle:c,grammarState:u}=Ir(e,r,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:p=!1}=n;d===!0?o=ly(o):d==="never"&&(o=ay(o)),p&&(o=cy(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 iy(o,{...n,fg:i,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},g,u)}function iy(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},d={type:"element",tagName:"code",properties:{},children:o};const p=[],g={...n,structure:l,addClassToHast:bu,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return d},get lines(){return p}};if(e.forEach((C,T)=>{var G,fe;T&&(l==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
|
|
84
|
-
`}));let W={type:"element",tagName:"span",properties:{class:"line"},children:[]},ee=0;for(const U of C){let ne={type:"element",tagName:"span",properties:{...U.htmlAttrs},children:[{type:"text",value:U.content}]};const pe=ei(U.htmlStyle||Ar(U));pe&&(ne.properties.style=pe);for(const D of r)ne=((G=D==null?void 0:D.span)==null?void 0:G.call(g,ne,T+1,ee,W,U))||ne;l==="inline"?i.children.push(ne):l==="classic"&&W.children.push(ne),ee+=U.content.length}if(l==="classic"){for(const U of r)W=((fe=U==null?void 0:U.line)==null?void 0:fe.call(g,W,T+1))||W;p.push(W),o.push(W)}else l==="inline"&&p.push(W)}),l==="classic"){for(const C of r)d=((m=C==null?void 0:C.code)==null?void 0:m.call(g,d))||d;u.children.push(d);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 ee={type:"element",tagName:"code",properties:{},children:C};for(const G of r)ee=((v=G==null?void 0:G.code)==null?void 0:v.call(g,ee))||ee;i.children=[];for(let G=0;G<ee.children.length;G++){G>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const fe=ee.children[G];fe.type==="element"&&i.children.push(...fe.children)}}let f=i;for(const C of r)f=((S=C==null?void 0:C.root)==null?void 0:S.call(g,f))||f;return s&&Qr(f,s),f}function ly(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 ay(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 cy(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=ei(r.htmlStyle||Ar(r)),i=ei(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 uy=Rv;function fy(e,t,n){var o;const s={meta:{},options:n,codeToHast:(i,l)=>Pr(e,i,l),codeToTokens:(i,l)=>Ir(e,i,l)};let r=uy(Pr(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 ra={light:"#333333",dark:"#bbbbbb"},oa={light:"#fffffe",dark:"#1e1e1e"},ia="__shiki_resolved";function zi(e){var l,a,c,u,d;if(e!=null&&e[ia])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"?ra.light:ra.dark),n||(n=t.type==="light"?oa.light:oa.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 f;if(o.has(p))return o.get(p);r+=1;const g=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(f=t.colorReplacements)!=null&&f[`#${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("#"),f=((v=p.settings)==null?void 0:v.background)&&!p.settings.background.startsWith("#");if(!g&&!f)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(f){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"))&&!((d=t.colors[p])!=null&&d.startsWith("#"))){const g=i(t.colors[p]);t.colorReplacements[g]=t.colors[p],t.colors[p]=g}return Object.defineProperty(t,ia,{enumerable:!1,writable:!1,value:!0}),t}async function Su(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Pv(t)).map(async t=>await yu(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function xu(e){return(await Promise.all(e.map(async n=>Lv(n)?null:zi(await yu(n))))).filter(n=>!!n)}let dy=3;function hy(e,t=3){t>dy||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Wn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Cu(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 py extends pm{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=zi(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=Cu(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 d;return(d=u.embeddedLangsLazy)==null?void 0:d.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 gy{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 my(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(zi),r=new gy(e.engine,n),o=new py(r,s,n,e.langAlias);let i;function l(C){return Cu(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 W=o.getColorMap();return{theme:T,colorMap:W}}function d(){return v(),o.getLoadedThemes()}function p(){return v(),o.getLoadedLanguages()}function g(...C){v(),o.loadLanguages(C.flat(1))}async function f(...C){return g(await Su(C))}function m(...C){v();for(const T of C.flat(1))o.loadTheme(T)}async function b(...C){return v(),m(await xu(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:d,getLoadedLanguages:p,resolveLangAlias:l,loadLanguage:f,loadLanguageSync:g,loadTheme:b,loadThemeSync:m,dispose:S,[Symbol.dispose]:S}}async function vy(e){e.engine||hy("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([xu(e.themes||[]),Su(e.langs||[]),e.engine]);return my({...e,themes:t,langs:n,engine:s})}async function yy(e){const t=await vy(e);return{getLastGrammarState:(...n)=>Qv(t,...n),codeToTokensBase:(n,s)=>Gi(t,n,s),codeToTokensWithThemes:(n,s)=>_u(t,n,s),codeToTokens:(n,s)=>Ir(t,n,s),codeToHast:(n,s)=>Pr(t,n,s),codeToHtml:(n,s)=>fy(t,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}class Ui extends Error{constructor(t){super(t),this.name="ShikiError"}}function by(){return 2147483648}function ky(){return typeof performance<"u"?performance.now():Date.now()}const wy=(e,t)=>e+(t-e%t)%t;async function _y(e){let t,n;const s={};function r(g){n=g,s.HEAPU8=new Uint8Array(g),s.HEAPU32=new Uint32Array(g)}function o(g,f,m){s.HEAPU8.copyWithin(g,f,f+m)}function i(g){try{return t.grow(g-n.byteLength+65535>>>16),r(t.buffer),1}catch{}}function l(g){const f=s.HEAPU8.length;g=g>>>0;const m=by();if(g>m)return!1;for(let b=1;b<=4;b*=2){let v=f*(1+.2/b);v=Math.min(v,g+100663296);const S=Math.min(m,wy(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,f,m=1024){const b=f+m;let v=f;for(;g[v]&&!(v>=b);)++v;if(v-f>16&&g.buffer&&a)return a.decode(g.subarray(f,v));let S="";for(;f<v;){let C=g[f++];if(!(C&128)){S+=String.fromCharCode(C);continue}const T=g[f++]&63;if((C&224)===192){S+=String.fromCharCode((C&31)<<6|T);continue}const W=g[f++]&63;if((C&240)===224?C=(C&15)<<12|T<<6|W:C=(C&7)<<18|T<<12|W<<6|g[f++]&63,C<65536)S+=String.fromCharCode(C);else{const ee=C-65536;S+=String.fromCharCode(55296|ee>>10,56320|ee&1023)}}return S}function u(g,f){return g?c(s.HEAPU8,g,f):""}const d={emscripten_get_now:ky,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function p(){const f=await e({env:d,wasi_snapshot_preview1:d});t=f.memory,r(t.buffer),Object.assign(s,f),s.UTF8ToString=u}return await p(),s}var Sy=Object.defineProperty,xy=(e,t,n)=>t in e?Sy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xe=(e,t,n)=>xy(e,typeof t!="symbol"?t+"":t,n);let et=null;function Cy(e){throw new Ui(e.UTF8ToString(e.getLastOnigError()))}class eo{constructor(t){Xe(this,"utf16Length"),Xe(this,"utf8Length"),Xe(this,"utf16Value"),Xe(this,"utf8Value"),Xe(this,"utf16OffsetToUtf8"),Xe(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 d=u,p=!1;if(u>=55296&&u<=56319&&c+1<n){const g=t.charCodeAt(c+1);g>=56320&&g<=57343&&(d=(u-55296<<10)+65536|g-56320,p=!0)}r&&(o[c]=a,p&&(o[c+1]=a),d<=127?i[a+0]=c:d<=2047?(i[a+0]=c,i[a+1]=c):d<=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)),d<=127?l[a++]=d:d<=2047?(l[a++]=192|(d&1984)>>>6,l[a++]=128|(d&63)>>>0):d<=65535?(l[a++]=224|(d&61440)>>>12,l[a++]=128|(d&4032)>>>6,l[a++]=128|(d&63)>>>0):(l[a++]=240|(d&1835008)>>>18,l[a++]=128|(d&258048)>>>12,l[a++]=128|(d&4032)>>>6,l[a++]=128|(d&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(Xe(this,"id",++qt.LAST_ID),Xe(this,"_onigBinding"),Xe(this,"content"),Xe(this,"utf16Length"),Xe(this,"utf8Length"),Xe(this,"utf16OffsetToUtf8"),Xe(this,"utf8OffsetToUtf16"),Xe(this,"ptr"),!et)throw new Ui("Must invoke loadWasm first.");this._onigBinding=et,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=et.omalloc(1e4)),qt._sharedPtrInUse=!0,et.HEAPU8.set(n.utf8Value,qt._sharedPtr),this.ptr=qt._sharedPtr):this.ptr=n.createString(et)}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)}};Xe(to,"LAST_ID",0);Xe(to,"_sharedPtr",0);Xe(to,"_sharedPtrInUse",!1);let Tu=to;class Ty{constructor(t){if(Xe(this,"_onigBinding"),Xe(this,"_ptr"),!et)throw new Ui("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(et),s[l]=c.utf8Length}const r=et.omalloc(4*t.length);et.HEAPU32.set(n,r/4);const o=et.omalloc(4*t.length);et.HEAPU32.set(s,o/4);const i=et.createOnigScanner(r,o,t.length);for(let l=0,a=t.length;l<a;l++)et.ofree(n[l]);et.ofree(o),et.ofree(r),i===0&&Cy(et),this._onigBinding=et,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 Tu(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++],d=[];for(let p=0;p<u;p++){const g=t.convertUtf8OffsetToUtf16(l[a++]),f=t.convertUtf8OffsetToUtf16(l[a++]);d[p]={start:g,end:f,length:f-g}}return{index:c,captureIndices:d}}}function $y(e){return typeof e.instantiator=="function"}function Ry(e){return typeof e.default=="function"}function Ay(e){return typeof e.data<"u"}function Ey(e){return typeof Response<"u"&&e instanceof Response}function Iy(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 Py(e){if(tr)return tr;async function t(){et=await _y(async n=>{let s=e;return s=await s,typeof s=="function"&&(s=await s(n)),typeof s=="function"&&(s=await s(n)),$y(s)?s=await s.instantiator(n):Ry(s)?s=await s.default(n):(Ay(s)&&(s=s.data),Ey(s)?typeof WebAssembly.instantiateStreaming=="function"?s=await Ly(s)(n):s=await My(s)(n):Iy(s)?s=await So(s)(n):s instanceof WebAssembly.Module?s=await So(s)(n):"default"in s&&s.default instanceof WebAssembly.Module&&(s=await So(s.default)(n))),"instance"in s&&(s=s.instance),"exports"in s&&(s=s.exports),s})}return tr=t(),tr}function So(e){return t=>WebAssembly.instantiate(e,t)}function Ly(e){return t=>WebAssembly.instantiateStreaming(e,t)}function My(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function Ny(e){return e&&await Py(e),{createScanner(t){return new Ty(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Tu(t)}}}const Oy={class:"code-block"},Dy={class:"code-header"},By={class:"code-lang"},Gy=["innerHTML"],jy=Re({__name:"CodeBlock",props:{code:{},lang:{}},setup(e){const t=e,n=Mt("effectiveTheme",q("dark")),s=q(""),r=q(!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 yy({themes:[m.default,b.default],langs:[],engine:Ny(()=>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 d(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=d(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 f(){navigator.clipboard.writeText(t.code).then(()=>{r.value=!0,setTimeout(()=>r.value=!1,1500)})}return Ge(()=>[t.code,t.lang,n.value],()=>p(),{immediate:!0}),(m,b)=>(k(),_("div",Oy,[h("div",Dy,[h("span",By,E(e.lang||"text"),1),h("button",{class:"code-copy",onClick:f},E(r.value?"已复制":"复制"),1)]),h("div",{class:"code-content",innerHTML:s.value},null,8,Gy)]))}}),zy=Ae(jy,[["__scopeId","data-v-c1bb01df"]]);Ce.setOptions({gfm:!0,breaks:!1});const Uy=Re({props:{content:{type:String,required:!0}},setup(e){const t=Q(()=>{const n=Fy(e.content);return Ce.lexer(n).flatMap(r=>ti(r))});return()=>xe("div",{class:"markdown-body"},t.value)}});function Fy(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 ti(e){switch(e.type){case"paragraph":return[xe("p",{class:"md-p"},an(e.tokens))];case"heading":return[xe(`h${e.depth}`,{class:`md-h${e.depth}`},an(e.tokens))];case"code":return[xe(zy,{code:e.text,lang:e.lang??"text"})];case"blockquote":return[xe("blockquote",{class:"md-blockquote"},e.tokens.flatMap(t=>ti(t)))];case"list":{const t=e.items.map(n=>{const s=[];return n.task&&s.push(xe("input",{type:"checkbox",checked:n.checked,disabled:!0,class:"md-checkbox"})),s.push(...n.tokens.flatMap(r=>ti(r))),xe("li",{class:["md-li",n.task?"md-task":""]},s)});return[xe(e.ordered?"ol":"ul",{class:e.ordered?"md-ol":"md-ul"},t)]}case"hr":return[xe("hr",{class:"md-hr"})];case"space":return[];case"html":return[xe("div",{class:"md-html",innerHTML:e.text})];case"table":return[xe("div",{class:"md-table-wrap",style:"overflow-x:auto"},[Hy(e)])];case"br":return[xe("br")];case"text":return[xe("span",{class:"md-text"},e.tokens?an(e.tokens):e.text)];case"def":return[];default:return[xe("p",{class:"md-p"},e.raw??"")]}}function Hy(e){const t=e,n=(t.header??[]).map((r,o)=>{var l;const i=(l=t.align)==null?void 0:l[o];return xe("th",{class:"md-th",style:i?`text-align:${i}`:""},r.tokens?an(r.tokens):String(r.text??""))}),s=(t.rows??[]).map(r=>xe("tr",{},r.map((o,i)=>{var a;const l=(a=t.align)==null?void 0:a[i];return xe("td",{class:"md-td",style:l?`text-align:${l}`:""},o.tokens?an(o.tokens):String(o.text??""))})));return xe("table",{class:"md-table"},[xe("thead",{},[xe("tr",{},n)]),xe("tbody",{},s)])}function an(e){return e.map(t=>{switch(t.type){case"text":return t.text;case"codespan":return xe("code",{class:"md-code"},t.text);case"strong":return xe("strong",{class:"md-strong"},an(t.tokens));case"em":return xe("em",{class:"md-em"},an(t.tokens));case"del":return xe("del",{class:"md-del"},an(t.tokens));case"link":{const n=t.href;return n&&!/^(https?:|mailto:|#|\/)/i.test(n)?t.raw??"":xe("a",{class:"md-a",href:n,target:"_blank",rel:"noopener"},an(t.tokens))}case"image":return xe("img",{class:"md-img",src:t.href,alt:t.text??"",loading:"lazy"});case"br":return xe("br");case"html":return xe("span",{innerHTML:t.text});case"escape":return t.text;default:return t.raw??""}})}const qy=Ae(Uy,[["__scopeId","data-v-ab83c5f2"]]),Wy=new Set(["edit","str_replace","replace","write","multi_edit","create_file","edit_file","apply_patch"]);function Vy(e){return Wy.has(e.toLowerCase())}function la(e){return e.suspended?"suspended":e.isError?"error":e.output===void 0?"running":"ok"}function Ky(e){return e.some(t=>la(t)==="running")?"running":e.some(t=>la(t)==="error")?"error":"ok"}const Zy=["onKeydown"],Yy={class:"tool-name"},Jy=["title"],Xy={class:"tool-collapse-inner"},Qy={class:"tool-body"},eb={key:0,class:"tool-args"},tb={key:1,class:"tool-result"},nb={key:2,class:"tool-running-hint"},sb=Re({__name:"GenericToolCard",props:{tool:{}},setup(e){const t=e,n=Q(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=Q(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=q(!1);let o=!1;Ge(n,u=>{o||(r.value=u==="running")},{immediate:!0});function i(){o=!0,r.value=!r.value}const l=Q(()=>{const u=t.tool.args;if(!u||typeof u!="object")return u===void 0?"":String(u);const d=[];for(const[p,g]of Object.entries(u)){let f;if(typeof g=="string")f=g.length>40?`${g.slice(0,40)}…`:g;else{try{f=JSON.stringify(g)}catch{f=String(g)}f.length>40&&(f=`${f.slice(0,40)}…`)}if(d.push(`${p}=${f}`),d.length>=3)break}return d.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,d)=>(k(),_("div",{class:be(["tool-card",`is-${n.value}`])},[h("div",{class:"tool-header",role:"button",tabindex:"0",onClick:i,onKeydown:Is(Yt(i,["prevent"]),["enter"])},[h("span",{class:be(["status-dot",n.value])},[s.value?(k(),_(ie,{key:0},[Ie(E(s.value),1)],64)):K("",!0)],2),h("span",Yy,E(e.tool.name),1),l.value?(k(),_("span",{key:0,class:"tool-params",title:l.value},E(l.value),9,Jy)):K("",!0),h("span",{class:be(["tool-chevron",{open:r.value}])},"▸",2)],40,Zy),h("div",{class:be(["tool-collapse",{open:r.value}])},[h("div",Xy,[h("div",Qy,[a()?(k(),_("pre",eb,[h("code",null,E(a()),1)])):K("",!0),e.tool.output!==void 0?(k(),_("pre",tb,[h("code",null,E(c(e.tool.output)||"(无输出)"),1)])):(k(),_("div",nb,"执行中…"))])])],2)],2))}}),rb=Ae(sb,[["__scopeId","data-v-5d0f42c5"]]),ob=500;function ib(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 lb(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 ab(e,t){const n=e.split(`
|
|
85
|
-
`),s=t.split(`
|
|
86
|
-
`);if(n.length+s.length>ob){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=ib(n,s);return lb(r,n,s,n.length,s.length)}function cb(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 ub=["old_string","oldString","old_str","old_text","oldText","old","search"],fb=["new_string","newString","new_str","new_text","newText","new","replace","content"],db=["path","file_path","filePath","file","filename"];function xo(e,t){for(const n of t){const s=e[n];if(typeof s=="string"&&s.length>0)return s}}function hb(e){if(!e||typeof e!="object")return null;const t=e,n=xo(t,db),s=xo(t,ub),r=xo(t,fb);if(!r&&!s)return null;const o=ab(s??"",r??""),i=cb(o);return{path:n,diff:o,stats:i}}const pb={class:"diff-lines"},gb={class:"dl-gutter old"},mb={class:"dl-gutter new"},vb={class:"dl-sign"},yb={class:"dl-text"},bb=Re({__name:"DiffLines",props:{lines:{}},setup(e){return(t,n)=>(k(),_("div",pb,[(k(!0),_(ie,null,Ye(e.lines,(s,r)=>(k(),_("div",{key:r,class:be(["dl",`dl-${s.type}`])},[h("span",gb,E(s.oldNo??""),1),h("span",mb,E(s.newNo??""),1),h("span",vb,E(s.type==="add"?"+":s.type==="del"?"−":" "),1),h("span",yb,E(s.text),1)],2))),128))]))}}),kb=Ae(bb,[["__scopeId","data-v-147edc06"]]),wb=["onKeydown"],_b={class:"tool-name"},Sb=["title"],xb={key:1,class:"diff-chip"},Cb={class:"tool-collapse-inner"},Tb={class:"tool-body"},$b={key:1,class:"tool-result"},Rb={key:2,class:"tool-running-hint"},Ab=Re({__name:"EditToolCard",props:{tool:{}},setup(e){const t=e,n=Q(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=Q(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=Q(()=>hb(t.tool.args)),o=Q(()=>{const p=r.value;if(!p||n.value==="error")return"";const{added:g,removed:f}=p.stats;return!g&&!f?"":`+${g} −${f}`}),i=Q(()=>{var p;return(p=r.value)==null?void 0:p.path}),l=q(!1);let a=!1;Ge(n,p=>{a||(l.value=p==="running")},{immediate:!0});function c(){a=!0,l.value=!l.value}const u=Q(()=>{var p;return((p=r.value)==null?void 0:p.diff)??[]}),d=Q(()=>u.value.length>0);return(p,g)=>(k(),_("div",{class:be(["tool-card",`is-${n.value}`,"edit-tool-card"])},[h("div",{class:"tool-header",role:"button",tabindex:"0",onClick:c,onKeydown:Is(Yt(c,["prevent"]),["enter"])},[h("span",{class:be(["status-dot",n.value])},[s.value?(k(),_(ie,{key:0},[Ie(E(s.value),1)],64)):K("",!0)],2),h("span",_b,E(e.tool.name),1),i.value?(k(),_("span",{key:0,class:"tool-filepath",title:i.value},E(i.value),9,Sb)):K("",!0),o.value?(k(),_("span",xb,E(o.value),1)):K("",!0),h("span",{class:be(["tool-chevron",{open:l.value}])},"▸",2)],40,wb),h("div",{class:be(["tool-collapse",{open:l.value}])},[h("div",Cb,[h("div",Tb,[d.value?(k(),je(kb,{key:0,lines:u.value},null,8,["lines"])):K("",!0),e.tool.output!==void 0?(k(),_("pre",$b,[h("code",null,E(e.tool.output||"(无输出)"),1)])):(k(),_("div",Rb,"执行中…"))])])],2)],2))}}),Eb=Ae(Ab,[["__scopeId","data-v-95ab1624"]]),Ib=["aria-expanded"],Pb={class:"process-copy"},Lb=["title"],Mb={class:"count"},Nb={class:"process-collapse"},Ob={class:"process-inner"},Db=Re({__name:"ToolGroup",props:{name:{},tools:{}},setup(e){const t=e,n=q(!1),s=q(!1),r=Q(()=>Ky(t.tools)),o=Q(()=>t.tools.filter(l=>l.output!==void 0&&!l.isError).length);Ge(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:be(["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:be(["process-icon",r.value])},[H(he,{name:r.value==="ok"?"check":"terminal",size:18},null,8,["name"])],2),h("span",Pb,[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,Lb),h("span",Mb,E(e.tools.length),1),H(he,{name:"chevron-down",size:17,class:"chevron"})],8,Ib),h("div",Nb,[h("div",Ob,[(k(!0),_(ie,null,Ye(e.tools,c=>(k(),je(Hf(X(Vy)(c.name)?Eb:rb),{key:c.toolCallId,tool:c},null,8,["tool"]))),128))])])],2))}}),Bb=Ae(Db,[["__scopeId","data-v-a044c3b3"]]),Gb={class:"thinking-block"},jb={class:"teaser-text"},zb={key:1,class:"thinking-stream"},Ub={class:"thinking-panel",role:"dialog","aria-label":"思考过程"},Fb={class:"panel-body"},Hb=Re({__name:"ThinkingBlock",props:{tool:{},active:{type:Boolean,default:!1}},setup(e){const t=e,n=q(!1),s=q(null),r=Q(()=>t.tool.output??""),o=Q(()=>r.value.split(/\n+/).map(c=>c.trim()).filter(Boolean).at(-1)??"");Ge(r,()=>{t.active&&It(()=>{const a=s.value;a&&(a.scrollTop=a.scrollHeight)})});function i(){n.value=!0}function l(){n.value=!1}return(a,c)=>(k(),_("div",Gb,[e.active?(k(),_("div",zb,[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",jb,E(o.value||"思考过程"),1),c[1]||(c[1]=h("span",{class:"teaser-open"},"展开",-1))])),(k(),je(pi,{to:"body"},[n.value?(k(),_("div",{key:0,class:"thinking-overlay",onClick:Yt(l,["self"])},[h("aside",Ub,[h("header",{class:"panel-header"},[c[3]||(c[3]=h("span",null,"💭 思考过程",-1)),h("button",{class:"panel-close","aria-label":"关闭",onClick:l},"✕")]),h("div",Fb,E(r.value||"(空)"),1)])])):K("",!0)]))]))}}),qb=Ae(Hb,[["__scopeId","data-v-890e0460"]]),Wb={key:0,class:"user-wrap"},Vb={class:"user-bubble"},Kb={class:"message-meta user-meta"},Zb={key:0},Yb={key:1,class:"assistant-wrap"},Jb={key:0,class:"assistant-brand"},Xb={class:"assistant-avatar"},Qb={key:0},e1={class:"assistant-body"},t1={key:3,class:"streaming-cursor","aria-label":"正在生成"},n1={key:4,class:"message-meta"},s1=["title"],r1=Re({__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=q(!1);let o=null;const i=Q(()=>n.message.role==="user"),l=Q(()=>n.message.role==="assistant"),a=Q(()=>n.message.tools.filter(m=>m.name==="thinking")),c=Q(()=>n.message.tools.filter(m=>m.name!=="thinking")),u=Q(()=>n.message.ts?new Date(n.message.ts).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):""),d=Q(()=>i.value&&n.isLatestUser&&n.idle),p=Mt("showThinking",q(!0)),g=Mt("showTools",q(!0));async function f(){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:be(["message",e.message.role,{error:e.message.isError}])},[i.value?(k(),_("div",Wb,[h("div",Vb,E(e.message.content),1),h("div",Kb,[u.value?(k(),_("span",Zb,E(u.value),1)):K("",!0),d.value?(k(),_("button",{key:1,title:"编辑并重新发送",onClick:b[0]||(b[0]=v=>s("edit",e.message.content))},[H(he,{name:"edit",size:14}),b[3]||(b[3]=Ie("编辑重发",-1))])):K("",!0)])])):(k(),_("div",Yb,[l.value?(k(),_("div",Jb,[h("span",Xb,[h("img",{src:_i,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:be({streaming:e.streaming})},null,2),Ie(E(e.streaming?"正在生成回复":"Agent 回复"),1)])]),u.value?(k(),_("time",Qb,E(u.value),1)):K("",!0)])):K("",!0),h("div",e1,[X(p)?(k(!0),_(ie,{key:0},Ye(a.value,v=>(k(),je(qb,{key:v.toolCallId,tool:v,active:e.streaming},null,8,["tool","active"]))),128)):K("",!0),c.value.length&&X(g)?(k(),je(Bb,{key:1,name:"工具调用过程",tools:c.value},null,8,["tools"])):K("",!0),e.message.content?(k(),je(qy,{key:2,class:"assistant-content",content:e.message.content},null,8,["content"])):e.streaming?(k(),_("span",t1)):K("",!0),e.message.content?(k(),_("div",n1,[h("button",{title:r.value?"已复制":"复制内容",onClick:f},[H(he,{name:r.value?"check":"copy",size:14},null,8,["name"]),Ie(E(r.value?"已复制":"复制"),1)],8,s1)])):K("",!0)])]))],2))}}),o1=Ae(r1,[["__scopeId","data-v-0268f952"]]),i1={class:"empty-state"},l1={class:"suggestions"},a1=["onClick"],c1={class:"suggestion-icon"},u1={class:"suggestion-title"},f1=["title"],d1={class:"workdir-path"},h1=Re({__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",i1,[o[1]||(o[1]=h("div",{class:"empty-logo"},[h("img",{src:_i,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",l1,[(k(),_(ie,null,Ye(s,i=>h("button",{key:i.title,class:"suggestion-card",onClick:l=>n("pick",i.prompt)},[h("span",c1,[H(he,{name:i.icon,size:22},null,8,["name"])]),h("span",u1,E(i.title),1)],8,a1)),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",d1,E(e.workDir),1)],8,f1)):K("",!0)]))}}),p1=Ae(h1,[["__scopeId","data-v-e4fea2d2"]]),g1={class:"message-list-wrapper"},m1={key:1,class:"message-skeleton","aria-hidden":"true"},v1=Re({__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=q(null),o=Q(()=>{for(let m=n.messages.length-1;m>=0;m--)if(n.messages[m].role==="user")return n.messages[m].id;return null}),i=Q(()=>{var m;return((m=n.messages.at(-1))==null?void 0:m.id)??null}),l=Q(()=>{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=q(!1);function u(){const m=r.value;return m?m.scrollHeight-m.scrollTop-m.clientHeight<80:!0}function d(m){It(()=>{const b=r.value;b&&b.scrollTo({top:b.scrollHeight,behavior:m})})}function p(){c.value=!u()}Ge(()=>[n.messages.length,l.value],([m],[b])=>{if(m!==b){a=!0,c.value=!1,d("smooth");return}!a&&!u()||d("auto")}),Ge(()=>n.busy,m=>{m||(a=!1)});function g(){a=!0,c.value=!1,d("smooth")}const f=Q(()=>!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",g1,[h("div",{ref_key:"listRef",ref:r,class:"message-list"},[e.messages.length===0?(k(),je(p1,{key:0,"work-dir":e.workDir,onPick:b[0]||(b[0]=v=>s("pick",v))},null,8,["work-dir"])):K("",!0),(k(!0),_(ie,null,Ye(e.messages,v=>(k(),je(o1,{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)),f.value?(k(),_("div",m1,[...b[2]||(b[2]=[kd('<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)])])):K("",!0)],512),H(ki,{name:"scroll-btn"},{default:nt(()=>[c.value?(k(),_("button",{key:0,class:"scroll-to-bottom",title:"滚动到最新消息",onClick:g},[H(he,{name:"chevron-down",size:18})])):K("",!0)]),_:1})]))}}),y1=Ae(v1,[["__scopeId","data-v-4c7d81fb"]]),b1={class:"model-picker-root"},k1={class:"picker-list"},w1={key:0,class:"picker-empty"},_1={class:"picker-group-title"},S1=["onClick"],x1={class:"row-main"},C1={class:"row-name"},T1={class:"row-alias"},$1={class:"row-meta"},R1={key:0,class:"row-check"},A1={class:"picker-thinking"},E1={class:"thinking-options"},I1=["onClick"],P1=Re({__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=q(""),l=q(null);Jt(()=>{var v;(v=l.value)==null||v.focus()});const a=Q(()=>{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=Q(()=>{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=Q(()=>n.models.find(v=>v.alias===n.currentModel)),d=Q(()=>{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 f(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",b1,[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"]))},[it(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),[[kt,i.value]]),h("div",k1,[c.value.length===0?(k(),_("div",w1,"无匹配模型")):K("",!0),(k(!0),_(ie,null,Ye(c.value,C=>(k(),_("div",{key:C.provider,class:"picker-group"},[h("div",_1,E(C.provider),1),(k(!0),_(ie,null,Ye(C.models,T=>(k(),_("button",{key:T.alias,class:be(["picker-row",{active:T.alias===e.currentModel}]),onClick:W=>m(T.alias)},[h("span",x1,[h("span",C1,E(f(T)),1),h("span",T1,E(T.alias),1)]),h("span",$1,E(g(T.maxContextSize)),1),T.alias===e.currentModel?(k(),_("span",R1,"✓")):K("",!0)],10,S1))),128))]))),128))]),h("div",A1,[S[3]||(S[3]=h("span",{class:"thinking-label"},"思考强度",-1)),h("div",E1,[(k(!0),_(ie,null,Ye(d.value,C=>(k(),_("button",{key:C,class:be(["thinking-btn",{active:C===e.currentThinking}]),onClick:T=>b(C)},E(p(C)),11,I1))),128))])])],32)]))}}),L1=Ae(P1,[["__scopeId","data-v-af964b7d"]]),M1={class:"slash-menu",role:"listbox","aria-label":"斜杠命令"},N1=["aria-selected","onMousedown","onMouseenter"],O1={class:"slash-name"},D1={key:0,class:"slash-aliases"},B1={class:"slash-desc"},G1={key:0,class:"slash-badge slash-badge-input"},j1={key:1,class:"slash-badge"},z1=Re({__name:"SlashMenu",props:{commands:{},activeIndex:{}},emits:["select","hover"],setup(e,{emit:t}){const n=t;return(s,r)=>(k(),_("div",M1,[(k(!0),_(ie,null,Ye(e.commands,(o,i)=>{var l;return k(),_("button",{key:o.name,class:be(["slash-item",{active:i===e.activeIndex}]),role:"option","aria-selected":i===e.activeIndex,onMousedown:Yt(a=>n("select",o),["prevent"]),onMouseenter:a=>n("hover",i)},[h("span",O1,[Ie("/"+E(o.name),1),(l=o.aliases)!=null&&l.length?(k(),_("span",D1,E(o.aliases.map(a=>`/${a}`).join(" ")),1)):K("",!0)]),h("span",B1,E(o.description),1),o.acceptsInput?(k(),_("span",G1,"输入参数")):K("",!0),o.target==="backend"?(k(),_("span",j1,"服务端")):K("",!0)],42,N1)}),128)),r[0]||(r[0]=h("div",{class:"slash-hint"},"↑↓ 选择 · Enter/Tab 执行 · Esc 关闭",-1))]))}}),U1=Ae(z1,[["__scopeId","data-v-54d5c512"]]),F1={class:"composer"},H1=["placeholder"],q1={class:"composer-footer"},W1={class:"composer-quick-actions"},V1=["title"],K1={key:1,class:"queue-label",title:"运行结束后自动发送"},Z1={class:"composer-actions"},Y1=["disabled","title"],J1={key:1,class:"context-label",title:"上下文使用率"},X1=["disabled"],Q1=Re({__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=q(""),i=q(null),l=q(0),a=q(!1),c=Q(()=>{const O=o.value;return!O.startsWith("/")||O.includes(`
|
|
87
|
-
`)||/\s/.test(O.slice(1))?null:O.slice(1)}),u=Q(()=>c.value===null?[]:Rh(c.value)),d=Q(()=>c.value!==null&&u.value.length>0&&!a.value);Ge(c,()=>{l.value=0,a.value=!1});function p(O){const ce=O??u.value[l.value];if(ce){if(ce.acceptsInput){o.value=`/${ce.name} `,a.value=!0,It(()=>{var ke;(ke=i.value)==null||ke.focus(),ee()});return}C(`/${ce.name}`),G(),r("command",ce.name)}}const g=q([]);Ge(()=>s.sessionId,()=>{g.value=[]}),Ge(()=>s.busy,O=>{if(!O&&g.value.length>0){const[ce,...ke]=g.value;g.value=ke,ce&&r("send",ce)}});const f=q([]),m=q(-1),b=q("");function v(){return`scream-history:${s.sessionId??"default"}`}function S(){try{const O=localStorage.getItem(v());f.value=O?JSON.parse(O):[]}catch{f.value=[]}m.value=-1}function C(O){if(f.value.at(-1)!==O){f.value=[...f.value,O].slice(-50);try{localStorage.setItem(v(),JSON.stringify(f.value))}catch{}}m.value=-1,b.value=""}function T(O,ce){const ke=i.value;if(!ke)return;const We=ke.value.slice(0,ke.selectionStart??0),y=ke.value.slice(ke.selectionEnd??0);if(!(O===-1&&We.includes(`
|
|
88
|
-
`))&&!(O===1&&y.includes(`
|
|
89
|
-
`))){if(O===-1){if(f.value.length===0)return;ce.preventDefault(),m.value===-1?(b.value=o.value,m.value=f.value.length-1):m.value>0&&m.value--,o.value=f.value[m.value]??""}else{if(m.value===-1)return;ce.preventDefault(),m.value<f.value.length-1?(m.value++,o.value=f.value[m.value]??""):(m.value=-1,o.value=b.value)}It(()=>{ke.selectionStart=ke.selectionEnd=ke.value.length})}}function W(){return`scream-draft:${s.sessionId??"default"}`}Ge(o,()=>{ee();try{o.value?localStorage.setItem(W(),o.value):localStorage.removeItem(W())}catch{}}),Ge(()=>s.sessionId,()=>{S();let O="";try{O=localStorage.getItem(W())??""}catch{O=""}o.value=O,It(ee)},{immediate:!0});function ee(){const O=i.value;if(!O)return;O.style.height="auto";const ce=Math.round(window.innerHeight*.25);O.style.height=`${Math.min(Math.max(O.scrollHeight,36),ce)}px`}function G(){o.value="",It(()=>{i.value&&(i.value.style.height="auto")})}function fe(){const O=o.value.trim();if(O){if(O.startsWith("/")){const ce=O.indexOf(" "),ke=(ce===-1?O.slice(1):O.slice(1,ce)).toLowerCase(),We=Ah(ke),y=ce===-1?"":O.slice(ce+1).trim();C(O),r("command",We,y),G();return}if(s.busy){U();return}C(O),r("send",O),G()}}function U(){const O=o.value.trim();O&&(g.value=[...g.value,O],G())}function ne(O){if(d.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(),U();return}if(O.key==="Enter"&&!O.shiftKey){if(O.isComposing)return;O.preventDefault(),fe();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,It(()=>{var ce;ee(),(ce=i.value)==null||ce.focus()})}function de(O){o.value+=O,It(()=>{var ce;ee(),(ce=i.value)==null||ce.focus()})}t({insertText:D,openModelPicker:ze});const I=Q(()=>{var O;return(O=s.status)==null?void 0:O.model}),R=Q(()=>{var O;return(O=s.status)==null?void 0:O.permission}),Z=Q(()=>{var O;return(O=s.status)==null?void 0:O.contextUsage}),ae=q(!1),oe={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},He=Q(()=>{var O;return(O=s.status)==null?void 0:O.thinkingLevel}),qe=Q(()=>{const O=He.value;return!O||O==="none"?"":oe[O]??O}),Ee=Q(()=>s.models.length>0);function ze(){return Ee.value?(ae.value=!0,!0):!1}function Oe(){Ee.value&&(ae.value=!ae.value)}function xn(O){r("switch-model",O)}function bt(O){r("switch-thinking",O)}const Ue=Q(()=>{switch(R.value){case"auto":return"perm-auto";case"yolo":return"perm-yolo";default:return"perm-manual"}}),Ve=Q(()=>{switch(R.value){case"auto":return"自动";case"yolo":return"YOLO";default:return"手动"}});return(O,ce)=>(k(),_("div",F1,[H(ki,{name:"picker"},{default:nt(()=>[ae.value?(k(),je(L1,{key:0,models:e.models,"current-model":I.value,"current-thinking":He.value,onApplyModel:xn,onApplyThinking:bt,onClose:ce[0]||(ce[0]=ke=>ae.value=!1)},null,8,["models","current-model","current-thinking"])):K("",!0)]),_:1}),d.value?(k(),je(U1,{key:0,commands:u.value,"active-index":l.value,onSelect:p,onHover:ce[1]||(ce[1]=ke=>l.value=ke)},null,8,["commands","active-index"])):K("",!0),it(h("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":ce[2]||(ce[2]=ke=>o.value=ke),id:"composer-input",name:"message",class:"composer-input",rows:"1",placeholder:e.busy?"回合进行中:Enter/Ctrl+S 排队消息,随下一轮注入":"输入消息,@ 提及,/ 触发指令",onKeydown:ne},null,40,H1),[[kt,o.value]]),h("div",q1,[h("div",W1,[h("button",{class:"quick-action",title:"插入 @ 提及",onClick:ce[3]||(ce[3]=ke=>de("@"))},[H(he,{name:"at",size:18}),ce[5]||(ce[5]=h("span",null,"提及",-1))]),h("button",{class:"quick-action",title:"插入 / 触发指令",onClick:ce[4]||(ce[4]=ke=>de("/"))},[H(he,{name:"command",size:18}),ce[6]||(ce[6]=h("span",null,"指令",-1))]),R.value?(k(),_("span",{key:0,class:be(["permission-label",Ue.value]),title:`权限模式:${R.value}`},E(Ve.value),11,V1)):K("",!0),g.value.length?(k(),_("span",K1,"已排队 "+E(g.value.length)+" 条",1)):K("",!0)]),h("div",Z1,[I.value?(k(),_("button",{key:0,class:be(["model-select",{clickable:Ee.value}]),disabled:!Ee.value,title:`当前模型:${I.value}`,onClick:Oe},[H(he,{name:"brain",size:17}),h("span",null,E(I.value),1),qe.value?(k(),_(ie,{key:0},[Ie(" · "+E(qe.value),1)],64)):K("",!0),Ee.value?(k(),je(he,{key:1,name:"chevron-down",size:14})):K("",!0)],10,Y1)):K("",!0),Z.value!==void 0?(k(),_("span",J1,[H(Pc,{usage:Z.value,size:17},null,8,["usage"])])):K("",!0),e.busy?(k(),_("button",{key:2,class:"stop-btn",title:"停止当前回合",onClick:pe},[H(he,{name:"stop",size:17}),ce[7]||(ce[7]=h("span",null,"停止",-1))])):(k(),_("button",{key:3,class:"send-btn",disabled:!o.value.trim(),title:"发送 (Enter)","aria-label":"发送",onClick:fe},[H(he,{name:"send",size:19})],8,X1))])])]))}}),e0=Ae(Q1,[["__scopeId","data-v-e1e7e9dd"]]),t0=["type","disabled"],n0=Re({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(k(),_("button",{class:be(["ui-btn",[`ui-btn--${e.variant}`,`ui-btn--${e.size}`]]),type:e.type,disabled:e.disabled},[sr(t.$slots,"default",{},void 0)],10,t0))}}),Vn=Ae(n0,[["__scopeId","data-v-e28e57b8"]]),s0={key:0,class:"approval-card"},r0={class:"approval-header"},o0={class:"approval-title"},i0={class:"tool-name"},l0={class:"action-summary"},a0={key:0,class:"approval-count"},c0={class:"approval-action"},u0={key:0,class:"feedback-area"},f0={class:"approval-buttons"},d0={key:0,class:"busy-indicator","aria-label":"处理中"},h0=Re({__name:"ApprovalCard",props:{approvals:{}},emits:["resolve"],setup(e,{emit:t}){const n=e,s=t,r=q(!1),o=q(!1),i=q(""),l=q(new Set),a=Q(()=>n.approvals[0]);Ge(()=>n.approvals.map(f=>f.id).join(","),()=>{o.value=!1,i.value="";const f=new Set(n.approvals.map(m=>m.id));l.value=new Set([...l.value].filter(m=>f.has(m)))});function c(f){return typeof f.display=="string"?f.display:f.display&&typeof f.display=="object"&&"description"in f.display?String(f.display.description??""):f.action??"执行该操作"}function u(f){return l.value.has(f)}function d(f,m,b){const v=a.value;!v||u(v.id)||(l.value=new Set([...l.value,v.id]),s("resolve",v.id,f,m,b))}function p(){const f=i.value.trim();f&&d("rejected",f)}function g(f){if(!a.value||r.value)return;const b=f.target;if(b&&(b.tagName==="TEXTAREA"||b.tagName==="INPUT")){o.value&&f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),p());return}switch(f.key){case"1":f.preventDefault(),d("approved",void 0,"once");break;case"2":f.preventDefault(),d("approved",void 0,"session");break;case"3":f.preventDefault(),d("rejected");break;case"4":f.preventDefault(),o.value=!o.value;break}}return Jt(()=>window.addEventListener("keydown",g)),Sn(()=>window.removeEventListener("keydown",g)),(f,m)=>e.approvals.length?(k(),_("div",s0,[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(),_(ie,{key:1},[h("div",r0,[m[7]||(m[7]=h("span",{class:"approval-icon"},"⚠",-1)),h("span",o0,[h("span",i0,E(a.value.toolName),1),h("span",l0,E(c(a.value)),1)]),e.approvals.length>1?(k(),_("span",a0,"+"+E(e.approvals.length-1),1)):K("",!0),h("button",{class:"icon-btn",title:"最小化","aria-label":"最小化",onClick:m[1]||(m[1]=b=>r.value=!0)},"—")]),h("pre",c0,E(c(a.value)),1),o.value?(k(),_("div",u0,[it(h("textarea",{"onUpdate:modelValue":m[2]||(m[2]=b=>i.value=b),class:"feedback-input",rows:"2",placeholder:"输入反馈,Enter 提交(将作为拒绝原因反馈给 Agent)"},null,512),[[kt,i.value]])])):K("",!0),h("div",f0,[H(Vn,{variant:"primary",disabled:u(a.value.id),onClick:m[3]||(m[3]=b=>d("approved",void 0,"once"))},{default:nt(()=>[...m[8]||(m[8]=[h("kbd",null,"1",-1),Ie(" 批准 ",-1)])]),_:1},8,["disabled"]),H(Vn,{variant:"secondary",disabled:u(a.value.id),onClick:m[4]||(m[4]=b=>d("approved",void 0,"session"))},{default:nt(()=>[...m[9]||(m[9]=[h("kbd",null,"2",-1),Ie(" 会话批准 ",-1)])]),_:1},8,["disabled"]),H(Vn,{variant:"danger",disabled:u(a.value.id),onClick:m[5]||(m[5]=b=>d("rejected"))},{default:nt(()=>[...m[10]||(m[10]=[h("kbd",null,"3",-1),Ie(" 拒绝 ",-1)])]),_:1},8,["disabled"]),H(Vn,{variant:"secondary",class:be({"feedback-active":o.value}),disabled:u(a.value.id),onClick:m[6]||(m[6]=b=>o.value=!o.value)},{default:nt(()=>[...m[11]||(m[11]=[h("kbd",null,"4",-1),Ie(" 反馈 ",-1)])]),_:1},8,["class","disabled"]),u(a.value.id)?(k(),_("span",d0,[...m[12]||(m[12]=[h("span",{class:"spinner"},null,-1),Ie(" 处理中… ",-1)])])):K("",!0)])],64)):K("",!0)])):K("",!0)}}),p0=Ae(h0,[["__scopeId","data-v-b031b650"]]),g0={class:"brand-head"},m0=["title","aria-label"],v0={class:"primary-actions"},y0={class:"search-row"},b0={class:"list-heading"},k0={class:"session-list"},w0={class:"group-label"},_0=["title","onClick"],S0={class:"session-icon"},x0={class:"session-info"},C0={class:"session-title-row"},T0={class:"session-meta"},$0={key:0,class:"live"},R0=["onClick"],A0=["onClick"],E0={key:0,class:"empty"},I0={class:"agent-card"},P0={class:"agent-card-head"},L0={class:"agent-avatar"},M0={key:0},N0=["title"],O0={key:1},D0=["title"],B0={key:0,class:"usage-track"},G0={class:"sidebar-footer","aria-label":"辅助导航"},j0=Re({__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=q(null),o=Q(()=>{const g=new Date,f=new Date(g.getFullYear(),g.getMonth(),g.getDate()).getTime(),m=f-864e5,b=new Map;for(const v of n.sessions){const S=new Date(v.createdAt),C=v.createdAt>=f?"今天":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 f=new Date(g);return f.toDateString()===new Date().toDateString()?f.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):f.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}const l=Q(()=>{var f;const g=(f=n.status)==null?void 0:f.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=Q(()=>{var g,f;return a((f=(g=n.status)==null?void 0:g.usage)==null?void 0:f.total)});function u(g){return g>=1e6?`${(g/1e6).toFixed(1)}M`:g>=1e3?`${(g/1e3).toFixed(1)}k`:String(g)}const d=Q(()=>{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,f)=>{var m;return k(),_("aside",{class:be(["sidebar",{collapsed:e.collapsed,"mobile-open":e.mobileOpen}])},[h("div",g0,[f[12]||(f[12]=h("div",{class:"brand-symbol"},[h("img",{src:_i,alt:""})],-1)),f[13]||(f[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:f[0]||(f[0]=b=>s("toggle"))},[H(he,{name:e.collapsed?"chevron-right":"chevron-left",size:19},null,8,["name"])],8,m0)]),h("div",v0,[h("button",{class:"new-session",title:"新建会话",onClick:f[1]||(f[1]=b=>s("create"))},[H(he,{name:"plus",size:21}),f[14]||(f[14]=h("span",null,"新建会话",-1))]),h("button",{class:"square-action",title:"搜索会话","aria-label":"搜索会话",onClick:f[2]||(f[2]=b=>s("open-search"))},[H(he,{name:"search"})])]),h("div",y0,[h("button",{class:"search-box",title:"搜索会话 (⌘K)",onClick:f[3]||(f[3]=b=>s("open-search"))},[H(he,{name:"search",size:18}),f[15]||(f[15]=h("span",null,"搜索会话",-1)),f[16]||(f[16]=h("kbd",null,"⌘K",-1))]),h("button",{class:"filter-btn",title:"筛选和搜索会话","aria-label":"筛选和搜索会话",onClick:f[4]||(f[4]=b=>s("open-search"))},[H(he,{name:"filter",size:18})])]),h("div",b0,[f[17]||(f[17]=h("span",null,"最近会话",-1)),h("span",null,E(e.sessions.length),1)]),h("div",k0,[(k(!0),_(ie,null,Ye(o.value,b=>(k(),_(ie,{key:b.label},[h("div",w0,E(b.label),1),(k(!0),_(ie,null,Ye(b.items,v=>(k(),_("article",{key:v.sessionId,class:be(["session-item",{active:v.sessionId===e.currentSessionId}]),title:v.title||"新会话",onClick:S=>s("switch",v.sessionId)},[h("span",S0,[H(he,{name:"message-circle",size:18})]),h("div",x0,[h("div",C0,[h("strong",null,E(v.title||"新会话"),1),h("time",null,E(i(v.createdAt)),1)]),h("div",T0,[h("span",null,E(v.messageCount)+" 条消息",1),v.active?(k(),_("span",$0,[...f[18]||(f[18]=[h("i",null,null,-1),Ie("活跃",-1)])])):K("",!0)])]),h("div",{class:"session-actions",onClick:f[5]||(f[5]=Yt(()=>{},["stop"]))},[h("button",{title:"导出 Markdown","aria-label":"导出 Markdown",onClick:S=>s("export",v.sessionId)},[H(he,{name:"download",size:16})],8,R0),h("button",{class:"danger",title:"删除会话","aria-label":"删除会话",onClick:S=>r.value=v.sessionId},[H(he,{name:"trash",size:16})],8,A0)])],10,_0))),128))],64))),128)),e.sessions.length===0?(k(),_("div",E0,[H(he,{name:"message-circle",size:28}),f[19]||(f[19]=h("strong",null,"暂无会话",-1)),f[20]||(f[20]=h("span",null,"新建会话后将在这里显示",-1))])):K("",!0),e.sessions.length?(k(),_("button",{key:1,class:"view-all",onClick:f[6]||(f[6]=b=>s("open-search"))},[f[21]||(f[21]=Ie("查看全部会话 ",-1)),H(he,{name:"chevron-right",size:16})])):K("",!0)]),h("section",I0,[h("div",P0,[h("span",L0,[H(he,{name:"bot",size:20})]),h("div",null,[f[22]||(f[22]=h("strong",null,"Scream Agent",-1)),h("span",null,[h("i",{class:be({busy:e.busy})},null,2),Ie(E(e.busy?"正在运行":"当前空闲"),1)])])]),h("dl",null,[(m=e.status)!=null&&m.model?(k(),_("div",M0,[f[23]||(f[23]=h("dt",null,"当前模型",-1)),h("dd",{title:e.status.model},E(e.status.model),9,N0)])):K("",!0),l.value!==null?(k(),_("div",O0,[f[24]||(f[24]=h("dt",null,"上下文",-1)),h("dd",{title:d.value||void 0},E(l.value)+"%",9,D0)])):K("",!0),h("div",null,[f[25]||(f[25]=h("dt",null,"Token 消耗",-1)),h("dd",null,E(c.value?u(c.value):"-"),1)])]),l.value!==null?(k(),_("div",B0,[h("i",{style:cn({width:`${l.value}%`})},null,4)])):K("",!0),h("button",{onClick:f[7]||(f[7]=b=>s("show-info","status"))},[H(he,{name:"activity",size:17}),f[26]||(f[26]=Ie("查看详细状态",-1))])]),h("nav",G0,[h("button",{onClick:f[8]||(f[8]=b=>s("show-info","usage"))},[H(he,{name:"activity",size:19}),f[27]||(f[27]=h("span",null,"用量",-1))]),h("button",{onClick:f[9]||(f[9]=b=>s("help"))},[H(he,{name:"help",size:19}),f[28]||(f[28]=h("span",null,"帮助",-1))])]),H(Zr,{open:r.value!==null,title:"删除会话",onClose:f[11]||(f[11]=b=>r.value=null)},{footer:nt(()=>[H(Vn,{variant:"ghost",size:"sm",onClick:f[10]||(f[10]=b=>r.value=null)},{default:nt(()=>[...f[29]||(f[29]=[Ie("取消",-1)])]),_:1}),H(Vn,{variant:"danger",size:"sm",onClick:p},{default:nt(()=>[...f[30]||(f[30]=[Ie("删除",-1)])]),_:1})]),default:nt(()=>[f[31]||(f[31]=h("p",{class:"dialog-copy"},"确定删除这个会话吗?此操作不可恢复。",-1))]),_:1},8,["open"])],2)}}}),z0=Ae(j0,[["__scopeId","data-v-a4c1783b"]]),U0={class:"goal-panel panel-section"},F0={class:"section-heading"},H0={key:0,class:"empty-state"},q0=["disabled"],W0={class:"refine-row"},V0=["disabled"],K0={key:0},Z0=["disabled"],Y0={class:"budget-grid"},J0=["disabled"],X0=["disabled"],Q0={class:"time-budget"},ek=["disabled"],tk=["disabled"],nk=["disabled"],sk={key:0,class:"goal-summary"},rk={class:"objective"},ok={class:"criterion"},ik={key:0,class:"reason"},lk={class:"metrics"},ak={class:"metric"},ck={key:0},uk={class:"metric"},fk={key:0},dk={class:"metric"},hk={key:0},pk={key:1,class:"budget-warning"},gk={key:2,class:"notes"},mk={class:"actions"},vk=["disabled"],yk=["disabled"],bk=["disabled"],kk=["disabled"],wk=["disabled"],_k={class:"budget-grid"},Sk=["disabled"],xk=["disabled"],Ck={class:"time-budget"},Tk=["disabled"],$k=["disabled"],Rk={class:"edit-actions"},Ak=["disabled"],Ek=["disabled"],Ik={key:3,class:"form-error"},Pk={key:4,class:"pending-copy"},Lk=Re({__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=q(""),s=q(""),r=q(""),o=q(""),i=q(""),l=q("minutes"),a=q(!1),c=q(null),u=q(!1),d=Q(()=>t.connectionStatus==="connected"),p=Q(()=>!t.sessionId||!d.value||t.archived||t.pending),g=Q(()=>p.value),f=Q(()=>{var I;return{active:"进行中",paused:"已暂停",blocked:"受阻",complete:"已完成"}[((I=t.goal)==null?void 0:I.status)??"active"]}),m=Q(()=>t.sessionId?t.archived?"归档会话为只读状态":d.value?t.pending?"正在提交请求…":t.goal?"状态由核心事件实时同步":"创建后 Agent 将自动开始执行":"连接恢复后可继续管理":"选择或新建会话后即可配置");Ge(()=>t.sessionId,()=>{a.value=!1,b()}),Ge(()=>{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 ae=Number(Z);if(!Number.isSafeInteger(ae)||ae<=0){c.value=`${R}必须是正整数。`;return}return ae}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 ae=[];return I!==null&&ae.push({value:I,unit:"turns"}),R!==null&&ae.push({value:R,unit:"tokens"}),Z!==null&&ae.push({value:Z,unit:l.value}),ae}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 W(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 ee(){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),W(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 fe(){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 ae=v(r.value,"轮次预算"),oe=v(o.value,"Token 预算"),He=v(i.value,"时间预算");if(ae===void 0||oe===void 0||He===void 0)return;if(I.budget.turnBudget!==null&&ae===null){c.value="当前协议不支持清除已有轮次预算,请填写新的正整数。";return}if(I.budget.tokenBudget!==null&&oe===null){c.value="当前协议不支持清除已有 Token 预算,请填写新的正整数。";return}if(I.budget.wallClockBudgetMs!==null&&He===null){c.value="当前协议不支持清除已有时间预算,请填写新的正整数。";return}const qe=Z.filter(Oe=>Oe.unit==="turns"?Oe.value!==I.budget.turnBudget:Oe.unit==="tokens"?Oe.value!==I.budget.tokenBudget:G(Oe.value,Oe.unit)!==I.budget.wallClockBudgetMs),Ee=R===I.objective?void 0:R;if(Ee===void 0&&qe.length===0){c.value="目标与预算没有变化。";return}await t.updateGoal({objective:Ee,budgets:qe})&&(a.value=!1)}async function U(I){c.value=null,!(I==="cancel"&&!window.confirm("确定取消当前 Goal?当前 Goal 状态将被清除。"))&&(I==="pause"?await t.pauseGoal():I==="resume"?await t.resumeGoal():await t.cancelGoal())}function ne(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),ae=Math.floor(R%3600/60);return Z>0?`${Z} 小时 ${ae} 分钟`:`${ae} 分钟`}function D(I,R){return R===null||R<=0?0:Math.min(100,Math.round(I/R*100))}function de(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",U0,[h("div",F0,[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:be(["status-pill",`is-${e.goal.status}`])},E(f.value),3)):(k(),je(he,{key:1,name:"activity",size:19}))]),e.sessionId?e.goal?(k(),_(ie,{key:2},[a.value?(k(),_("form",{key:1,class:"goal-form edit-form",onSubmit:Yt(fe,["prevent"])},[h("label",null,[R[31]||(R[31]=h("span",null,"目标内容",-1)),it(h("textarea",{"onUpdate:modelValue":R[9]||(R[9]=Z=>n.value=Z),rows:"3",maxlength:"4000",disabled:p.value||e.busy},null,8,wk),[[kt,n.value]])]),R[36]||(R[36]=h("div",{class:"budget-title"},[Ie("更新预算 "),h("small",null,"仅提交发生变化的预算")],-1)),h("div",_k,[h("label",null,[R[32]||(R[32]=h("span",null,"轮次",-1)),it(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,Sk),[[kt,r.value]])]),h("label",null,[R[33]||(R[33]=h("span",null,"Token",-1)),it(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,xk),[[kt,o.value]])])]),h("div",Ck,[h("label",null,[R[34]||(R[34]=h("span",null,"时间",-1)),it(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,Tk),[[kt,i.value]])]),it(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,$k),[[El,l.value]])]),h("div",Rk,[h("button",{type:"button",class:"secondary",disabled:e.pending,onClick:R[14]||(R[14]=Z=>a.value=!1)},"返回",8,Ak),h("button",{class:"primary small",type:"submit",disabled:p.value||e.busy},"保存修改",8,Ek)])],32)):(k(),_("div",sk,[h("div",rk,[R[24]||(R[24]=h("small",null,"目标",-1)),h("p",null,E(e.goal.objective),1)]),h("div",ok,[R[25]||(R[25]=h("small",null,"完成标准",-1)),h("p",null,E(e.goal.completionCriterion??"未设置,由 Agent 根据目标判断完成。"),1)]),e.goal.terminalReason?(k(),_("div",ik,[R[26]||(R[26]=h("strong",null,"状态原因",-1)),h("span",null,E(e.goal.terminalReason),1)])):K("",!0),h("div",lk,[h("div",ak,[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",ck,[h("b",{style:cn({width:`${D(e.goal.turnsUsed,e.goal.budget.turnBudget)}%`})},null,4)])):K("",!0)]),h("div",uk,[h("div",null,[R[28]||(R[28]=h("span",null,"Token",-1)),h("strong",null,E(ne(e.goal.tokensUsed))+" / "+E(e.goal.budget.tokenBudget===null?"不限":ne(e.goal.budget.tokenBudget)),1)]),e.goal.budget.tokenBudget!==null?(k(),_("i",fk,[h("b",{style:cn({width:`${D(e.goal.tokensUsed,e.goal.budget.tokenBudget)}%`})},null,4)])):K("",!0)]),h("div",dk,[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",hk,[h("b",{style:cn({width:`${D(e.goal.wallClockMs,e.goal.budget.wallClockBudgetMs)}%`})},null,4)])):K("",!0)])]),e.goal.budget.overBudget?(k(),_("div",pk,"已达到或超过执行预算。")):K("",!0),e.goal.notes.length?(k(),_("details",gk,[h("summary",null,"工作记录("+E(e.goal.notes.length)+")",1),h("ol",null,[(k(!0),_(ie,null,Ye(e.goal.notes,Z=>(k(),_("li",{key:`${Z.time}-${Z.content}`},[h("time",null,E(de(Z.time)),1),h("span",null,E(Z.content),1)]))),128))])])):K("",!0),h("div",mk,[e.goal.status!=="complete"?(k(),_("button",{key:0,class:"secondary",disabled:p.value||e.busy,onClick:ee},[H(he,{name:"edit",size:15}),R[30]||(R[30]=Ie("编辑",-1))],8,vk)):K("",!0),e.goal.status==="active"?(k(),_("button",{key:1,class:"secondary",disabled:p.value,onClick:R[6]||(R[6]=Z=>U("pause"))},"暂停",8,yk)):K("",!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=>U("resume"))},"继续",8,bk)):K("",!0),h("button",{class:"danger",disabled:p.value,onClick:R[8]||(R[8]=Z=>U("cancel"))},"取消 Goal",8,kk)])]))],64)):(k(),_("form",{key:1,class:"goal-form",onSubmit:Yt(T,["prevent"])},[h("label",null,[R[16]||(R[16]=h("span",null,"目标内容",-1)),it(h("textarea",{"onUpdate:modelValue":R[0]||(R[0]=Z=>n.value=Z),rows:"3",maxlength:"4000",placeholder:"描述希望 Agent 持续完成的目标",disabled:g.value},null,8,q0),[[kt,n.value]])]),h("div",W0,[h("button",{type:"button",class:"secondary",disabled:g.value||!n.value.trim(),onClick:C},[H(he,{name:"sparkles",size:15}),R[17]||(R[17]=Ie(" AI 优化 ",-1))],8,V0),u.value?(k(),_("small",K0,"已优化,请确认或继续编辑后再创建。")):K("",!0)]),h("label",null,[R[18]||(R[18]=h("span",null,[Ie("完成标准 "),h("small",null,"可选")],-1)),it(h("textarea",{"onUpdate:modelValue":R[1]||(R[1]=Z=>s.value=Z),rows:"2",placeholder:"例如:聚焦测试、类型检查与 Web 构建全部通过",disabled:g.value},null,8,Z0),[[kt,s.value]])]),R[23]||(R[23]=h("div",{class:"budget-title"},[Ie("执行预算 "),h("small",null,"留空表示不限制")],-1)),h("div",Y0,[h("label",null,[R[19]||(R[19]=h("span",null,"轮次",-1)),it(h("input",{"onUpdate:modelValue":R[2]||(R[2]=Z=>r.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value},null,8,J0),[[kt,r.value]])]),h("label",null,[R[20]||(R[20]=h("span",null,"Token",-1)),it(h("input",{"onUpdate:modelValue":R[3]||(R[3]=Z=>o.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value},null,8,X0),[[kt,o.value]])])]),h("div",Q0,[h("label",null,[R[21]||(R[21]=h("span",null,"时间",-1)),it(h("input",{"onUpdate:modelValue":R[4]||(R[4]=Z=>i.value=Z),type:"number",min:"1",step:"1",placeholder:"不限",disabled:g.value},null,8,ek),[[kt,i.value]])]),it(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,tk),[[El,l.value]])]),h("button",{class:"primary",type:"submit",disabled:g.value||!n.value.trim()},E(e.pending?"正在创建…":"创建并开始执行"),9,nk)],32)):(k(),_("div",H0,"暂无会话,Goal 管理暂不可用。")),c.value||e.error?(k(),_("p",Ik,E(c.value??e.error),1)):e.pending?(k(),_("p",Pk,"请求处理中,状态将在核心事件到达后同步。")):K("",!0)]))}}),Mk=Ae(Lk,[["__scopeId","data-v-de9e6346"]]),Nk={class:"todo-panel panel-section"},Ok={class:"section-heading"},Dk={class:"count-pill"},Bk={key:0,class:"empty-state"},Gk={key:1,class:"todo-groups"},jk=["title"],zk={class:"todo-title"},Uk=Re({__name:"TodoPanel",props:{todos:{}},setup(e){const t=e,n=Q(()=>_h(t.todos)),s=Q(()=>t.todos.filter(o=>o.status==="done").length),r={pending:{label:"待处理",symbol:"○"},in_progress:{label:"进行中",symbol:"●"},done:{label:"已完成",symbol:"✓"}};return(o,i)=>(k(),_("section",Nk,[h("div",Ok,[i[0]||(i[0]=h("div",null,[h("span",null,"核心 Todo"),h("small",null,"直接来自 Agent 核心状态")],-1)),h("span",Dk,E(s.value)+"/"+E(e.todos.length),1)]),e.todos.length===0?(k(),_("div",Bk,[H(he,{name:"check",size:18}),i[1]||(i[1]=h("span",null,"暂无 Todo",-1)),i[2]||(i[2]=h("small",null,"Agent 创建任务清单后会在这里实时显示。",-1))])):(k(),_("div",Gk,[(k(!0),_(ie,null,Ye(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),_(ie,null,Ye(l.items,(c,u)=>(k(),_("li",{key:`${a}-${u}-${c.title}`,class:be(`is-${c.status}`)},[h("span",{class:"status-symbol",title:r[c.status].label},E(r[c.status].symbol),9,jk),h("span",zk,E(c.title),1),h("small",null,E(r[c.status].label),1)],2))),128))])]))),128))]))]))}}),Fk=Ae(Uk,[["__scopeId","data-v-e8a85d5d"]]),Hk={class:"rightbar"},qk={class:"panel-section quick-section"},Wk={class:"section-heading"},Vk={class:"tool-grid"},Kk=["title","onClick"],Zk={class:"more-tools"},Yk=["title","onClick"],Jk=Re({__name:"RightPanel",props:{busy:{type:Boolean,default:!1},sessionId:{default:null},connectionStatus:{},archived:{type:Boolean,default:!1},goal:{},todos:{},goalRequestPending:{type:Boolean,default:!1},goalRequestError:{default:null},refineGoal:{},createGoal:{},updateGoal:{},pauseGoal:{},resumeGoal:{},cancelGoal:{}},emits:["quick-command","insert"],setup(e,{emit:t}){const n=t,s=[{icon:"compact",label:"压缩上下文",hint:"/compact",command:"compact"},{icon:"brain",label:"切换模型",hint:"/model",command:"model"},{icon:"clipboard",label:"计划模式",hint:"/plan",command:"plan"},{icon:"fork",label:"会话分支",hint:"/fork",command:"fork"}],r=[{icon:"message-circle",label:"快速侧问",hint:"/btw",insert:"/btw "},{icon:"tag",label:"重命名",hint:"/title",insert:"/title "},{icon:"broom",label:"清空",hint:"/clear",command:"clear"},{icon:"plus",label:"新会话",hint:"/new",command:"new"}];function o(i){i.command?n("quick-command",i.command):i.insert&&n("insert",i.insert)}return(i,l)=>(k(),_("aside",Hk,[h("section",qk,[h("div",Wk,[l[0]||(l[0]=h("div",null,[h("span",null,"快捷工具"),h("small",null,"真实命令入口")],-1)),H(he,{name:"command",size:19})]),h("div",Vk,[(k(),_(ie,null,Ye(s,a=>h("button",{key:a.label,class:"tool-card",title:`${a.label} ${a.hint}`,onClick:c=>o(a)},[h("span",null,[H(he,{name:a.icon,size:22},null,8,["name"])]),h("strong",null,E(a.label),1),h("small",null,E(a.hint),1)],8,Kk)),64))]),h("div",Zk,[(k(),_(ie,null,Ye(r,a=>h("button",{key:a.label,title:`${a.label} ${a.hint}`,onClick:c=>o(a)},[H(he,{name:a.icon,size:17},null,8,["name"]),h("span",null,E(a.label),1)],8,Yk)),64))])]),H(Mk,{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"]),H(Fk,{todos:e.todos},null,8,["todos"])]))}}),Xk=Ae(Jk,[["__scopeId","data-v-a2ce5a5d"]]),Qk={class:"info-row"},ew={class:"info-val mono"},tw={class:"info-row"},nw={class:"info-val mono"},sw={class:"info-row"},rw={class:"info-val"},ow={class:"info-row"},iw={class:"info-val"},lw={class:"info-row"},aw={class:"info-val"},cw={class:"info-row"},uw={class:"info-val"},fw={class:"info-row"},dw={class:"info-val"},hw={class:"info-row"},pw={class:"info-val"},gw={class:"info-row"},mw={class:"info-val"},vw={class:"info-row"},yw={class:"info-val"},bw={key:0,class:"info-row"},kw={class:"info-val"},ww={key:1,class:"info-row"},_w={class:"info-val"},Sw={class:"info-val mono"},xw={class:"info-val"},Cw={key:3,class:"info-empty"},Tw=Re({__name:"InfoPanel",props:{mode:{},status:{},sessionId:{},workDir:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,r=Q(()=>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 d(g){return g!=null&&g.byModel?Object.entries(g.byModel).map(([f,m])=>({model:f,tokens:u(m),output:m.output,cacheRead:m.inputCacheRead})):[]}const p=Q(()=>l(n.status.usage)||l(n.status.contextTokens));return(g,f)=>(k(),je(Zr,{open:!0,title:r.value,onClose:f[0]||(f[0]=m=>s("close"))},{default:nt(()=>{var m,b;return[e.mode==="status"?(k(),_(ie,{key:0},[h("div",Qk,[f[1]||(f[1]=h("span",{class:"info-key"},"会话 ID",-1)),h("span",ew,E(e.sessionId??"-"),1)]),h("div",tw,[f[2]||(f[2]=h("span",{class:"info-key"},"工作目录",-1)),h("span",nw,E(e.workDir??"-"),1)]),h("div",sw,[f[3]||(f[3]=h("span",{class:"info-key"},"模型",-1)),h("span",rw,E(e.status.model??"-"),1)]),h("div",ow,[f[4]||(f[4]=h("span",{class:"info-key"},"权限模式",-1)),h("span",iw,E(o(e.status.permission)),1)]),h("div",lw,[f[5]||(f[5]=h("span",{class:"info-key"},"思考级别",-1)),h("span",aw,E(e.status.thinkingLevel??"-"),1)]),h("div",cw,[f[6]||(f[6]=h("span",{class:"info-key"},"计划模式",-1)),h("span",uw,E(i(e.status.planMode)),1)]),h("div",fw,[f[7]||(f[7]=h("span",{class:"info-key"},"WolfPack 模式",-1)),h("span",dw,E(i(e.status.wolfpackMode)),1)]),h("div",hw,[f[8]||(f[8]=h("span",{class:"info-key"},"上下文",-1)),h("span",pw,E(a(e.status.contextTokens))+" / "+E(a(e.status.maxContextTokens))+" ("+E(c(e.status.contextUsage))+")",1)])],64)):(k(),_(ie,{key:1},[h("div",gw,[f[9]||(f[9]=h("span",{class:"info-key"},"上下文 Token",-1)),h("span",mw,E(a(e.status.contextTokens))+" / "+E(a(e.status.maxContextTokens)),1)]),h("div",vw,[f[10]||(f[10]=h("span",{class:"info-key"},"上下文占比",-1)),h("span",yw,E(c(e.status.contextUsage)),1)]),(m=e.status.usage)!=null&&m.total?(k(),_("div",bw,[f[11]||(f[11]=h("span",{class:"info-key"},"累计 Token",-1)),h("span",kw,E(a(u(e.status.usage.total))),1)])):K("",!0),(b=e.status.usage)!=null&&b.currentTurn?(k(),_("div",ww,[f[12]||(f[12]=h("span",{class:"info-key"},"当前回合",-1)),h("span",_w,E(a(u(e.status.usage.currentTurn))),1)])):K("",!0),d(e.status.usage).length?(k(),_(ie,{key:2},[f[13]||(f[13]=h("div",{class:"info-subhead"},"按模型",-1)),(k(!0),_(ie,null,Ye(d(e.status.usage),v=>(k(),_("div",{key:v.model,class:"info-row info-row-model"},[h("span",Sw,E(v.model),1),h("span",xw,E(a(v.tokens))+"(输出 "+E(a(v.output))+" · 缓存读 "+E(a(v.cacheRead))+")",1)]))),128))],64)):K("",!0),p.value?K("",!0):(k(),_("div",Cw,"暂无用量数据"))],64))]}),_:1},8,["title"]))}}),$w=Ae(Tw,[["__scopeId","data-v-407030a3"]]),Rw={class:"sd-search-wrap"},Aw={class:"sd-icon"},Ew=["aria-selected","onClick","onMousemove"],Iw={class:"sd-title"},Pw={class:"sd-meta"},Lw={class:"sd-time"},Mw={class:"sd-count"},Nw={key:0,class:"sd-active"},Ow={key:0,class:"sd-empty"},Dw=Re({__name:"SearchSessionsDialog",props:{sessions:{},activeId:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,s=t,r=q(""),o=q(null),i=q(null),l=Q(()=>{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=q(0);Ge(r,()=>{a.value=0}),Ge(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 It();const m=(b=i.value)==null?void 0:b.querySelector('[aria-selected="true"]');m==null||m.scrollIntoView({block:"nearest"})}function d(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(),d(1)):m.key==="ArrowUp"?(m.preventDefault(),d(-1)):m.key==="Enter"&&(m.preventDefault(),p())}function f(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(),je(Zr,{open:!0,onClose:b[1]||(b[1]=v=>s("close"))},{header:nt(()=>[h("div",Rw,[h("span",Aw,[H(he,{name:"search",size:19})]),it(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),[[kt,r.value]])])]),footer:nt(()=>[...b[2]||(b[2]=[h("span",{class:"sd-hint"},"↑↓ 导航 · Enter 切换 · Esc 关闭",-1)])]),default:nt(()=>[h("div",{ref_key:"listRef",ref:i,class:"sd-list",role:"listbox"},[(k(!0),_(ie,null,Ye(l.value,(v,S)=>(k(),_("button",{key:v.sessionId,class:be(["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",Iw,E(v.title||"New Session"),1),h("span",Pw,[h("span",Lw,E(f(v.createdAt)),1),h("span",Mw,E(v.messageCount)+" 条",1),v.active?(k(),_("span",Nw,"●")):K("",!0)])],42,Ew))),128)),l.value.length===0?(k(),_("div",Ow,"没有匹配的会话")):K("",!0)],512)]),_:1}))}}),Bw=Ae(Dw,[["__scopeId","data-v-62760c4c"]]),Gw=Re({__name:"ResizeHandle",props:{dragging:{type:Boolean}},setup(e){return(t,n)=>(k(),_("div",{class:be(["resize-handle",{dragging:e.dragging}]),role:"separator","aria-orientation":"vertical","aria-label":"拖拽调整宽度"},null,2))}}),jw=Ae(Gw,[["__scopeId","data-v-11060aea"]]),zw={class:"workbench-body"},Uw={class:"chat-main chat-inset"},Fw={class:"composer-dock"},aa="scream-sidebar-collapsed-v2",ca="scream-rightbar-open",Hw=Re({__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:d,isArchived:p,sessions:g,currentSessionId:f,gitStatus:m,models:b,sendPrompt:v,sendCommand:S,clearMessages:C,appendSystemMessage:T,abort:W,resolveApproval:ee,createSession:G,switchSession:fe,deleteSession:U,exportSession:ne,fetchGitStatus:pe,fetchSnapshot:D,switchModel:de,switchThinking:I,refineGoal:R,createGoal:Z,updateGoal:ae,pauseGoal:oe,resumeGoal:He,cancelGoal:qe}=Th(),Ee=q(null),ze=q(!1),Oe=q("status"),xn=Q(()=>b.value.length>0);Dn("modelSwitchable",xn);const bt=Q(()=>{const J=g.value.find(se=>se.sessionId===f.value);return(J==null?void 0:J.title)??null}),Ue=q(!1),Ve=q(!1);try{Ue.value=localStorage.getItem(aa)==="1"}catch{}function O(){return window.innerWidth<=640}function ce(){if(O()){Ve.value=!Ve.value;return}Ue.value=!Ue.value;try{localStorage.setItem(aa,Ue.value?"1":"0")}catch{}}function ke(J){Ve.value=!1,fe(J)}const We=q(!0);try{We.value=localStorage.getItem(ca)!=="0"}catch{}function y(){We.value=!We.value;try{localStorage.setItem(ca,We.value?"1":"0")}catch{}}const w=q(!0),A=q(!0);Dn("showThinking",w),Dn("showTools",A);const P=q(!1);function N(J){(J.metaKey||J.ctrlKey)&&J.key==="k"&&(J.preventDefault(),P.value=!P.value)}Jt(()=>window.addEventListener("keydown",N)),Sn(()=>window.removeEventListener("keydown",N));const{width:L,dragging:V,onPointerDown:F}=$h({storageKey:"scream-sidebar-width",defaultWidth:360,min:300,max:440});function B(){Ve.value=!1,G()}function M(J){var se;(se=Ee.value)==null||se.insertText(J)}function le(J){D(),Oe.value=J,ze.value=!0}function Y(){var se;(((se=Ee.value)==null?void 0:se.openModelPicker())??!1)||T(`当前模型:${r.value.model??"unknown"}`)}function re(J,se){switch(J){case"compact":S("compact");break;case"model":Y();break;case"clear":C();break;case"new":G();break;case"help":T(Eh());break;case"auto":case"yes":case"plan":case"fork":case"title":case"btw":S(J,se);break;case"status":le("status");break;case"usage":le("usage");break;default:T(`未知命令:/${J}`)}}return(J,se)=>(k(),_("div",{class:be(["workbench",{"sidebar-is-collapsed":Ue.value}]),style:cn({"--sidebar-width":X(L)+"px"})},[H(z0,{sessions:X(g),"current-session-id":X(f),status:X(r),busy:X(d),collapsed:Ue.value,"mobile-open":Ve.value,onCreate:B,onSwitch:ke,onDelete:X(U),onExport:X(ne),onToggle:ce,onOpenSearch:se[0]||(se[0]=ve=>P.value=!0),onShowInfo:le,onHelp:se[1]||(se[1]=ve=>re("help"))},null,8,["sessions","current-session-id","status","busy","collapsed","mobile-open","onDelete","onExport"]),Ue.value?K("",!0):(k(),je(jw,{key:0,class:"sidebar-resize",dragging:X(V),onPointerdown:X(F)},null,8,["dragging","onPointerdown"])),Ve.value?(k(),_("div",{key:1,class:"sidebar-backdrop","aria-hidden":"true",onClick:se[2]||(se[2]=ve=>Ve.value=!1)})):K("",!0),H(Pp,{"connection-status":X(t),status:X(r),busy:X(d),"git-status":X(m),onRefreshGit:X(pe),onToggleSidebar:ce,onOpenModelPicker:Y},null,8,["connection-status","status","busy","git-status","onRefreshGit"]),h("main",zw,[h("div",Uw,[H(Hp,{title:bt.value,busy:X(d),onRename:se[3]||(se[3]=ve=>X(S)("title",ve)),onExport:se[4]||(se[4]=ve=>X(f)&&X(ne)(X(f))),onClear:X(C),onToggleRightbar:y},null,8,["title","busy","onClear"]),H(y1,{messages:X(n),busy:X(d),"work-dir":X(u),onEdit:M,onPick:X(v)},null,8,["messages","busy","work-dir","onPick"]),h("div",Fw,[H(p0,{approvals:X(s),onResolve:X(ee)},null,8,["approvals","onResolve"]),H(e0,{ref_key:"composerRef",ref:Ee,busy:X(d),status:X(r),"session-id":X(c),models:X(b),onSend:X(v),onAbort:X(W),onCommand:re,onSwitchModel:X(de),onSwitchThinking:X(I)},null,8,["busy","status","session-id","models","onSend","onAbort","onSwitchModel","onSwitchThinking"])])]),We.value?(k(),je(Xk,{key:0,class:"rightbar-host",busy:X(d),"session-id":X(c),"connection-status":X(t),archived:X(p),goal:X(o),todos:X(i),"goal-request-pending":X(l),"goal-request-error":X(a),"refine-goal":X(R),"create-goal":X(Z),"update-goal":X(ae),"pause-goal":X(oe),"resume-goal":X(He),"cancel-goal":X(qe),onQuickCommand:re,onInsert:M},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"])):K("",!0)]),ze.value?(k(),je($w,{key:2,mode:Oe.value,status:X(r),"session-id":X(c),"work-dir":X(u),onClose:se[5]||(se[5]=ve=>ze.value=!1)},null,8,["mode","status","session-id","work-dir"])):K("",!0),P.value?(k(),je(Bw,{key:3,sessions:X(g),"active-id":X(f),onSelect:ke,onClose:se[6]||(se[6]=ve=>P.value=!1)},null,8,["sessions","active-id"])):K("",!0)],6))}}),qw=Ae(Hw,[["__scopeId","data-v-9db10bb3"]]),Ww={class:"toast-container"},Vw=["onClick"],Kw={class:"toast-icon"},Zw={class:"toast-msg"},Yw=Re({__name:"Toast",setup(e){const{toasts:t,removeToast:n}=Ic(),s={info:"ℹ",success:"✓",error:"✗",warning:"⚠"};return(r,o)=>(k(),je(pi,{to:"body"},[h("div",Ww,[H(sh,{name:"toast"},{default:nt(()=>[(k(!0),_(ie,null,Ye(X(t),i=>(k(),_("div",{key:i.id,class:be(["toast",`toast--${i.type}`]),onClick:l=>X(n)(i.id)},[h("span",Kw,E(s[i.type]),1),h("span",Zw,E(i.message),1)],10,Vw))),128))]),_:1})])]))}}),Jw=Ae(Yw,[["__scopeId","data-v-7200727f"]]),Xw={class:"app"},Qw=Re({__name:"App",setup(e){const t=q("system"),n=q("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 d=document.querySelector('meta[name="theme-color"]');d&&d.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()}),Ge(t,r);const l=window.matchMedia("(prefers-color-scheme: dark)");return l.addEventListener("change",r),Sn(()=>{l.removeEventListener("change",r),o!==null&&clearTimeout(o),document.documentElement.classList.remove("theme-transition")}),(a,c)=>(k(),_("div",Xw,[H(qw),H(Jw)]))}}),e_=Ae(Qw,[["__scopeId","data-v-ba168d5b"]]);function t_(){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})}t_();ph(e_).mount("#app");
|
|
90
|
-
//# sourceMappingURL=index-mUEA7L6U.js.map
|