MindMap/frontend/dist/assets/index-7802977e.js

607 lines
578 KiB
JavaScript
Raw Normal View History

var Id=Object.defineProperty;var _d=(t,e,r)=>e in t?Id(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ge=(t,e,r)=>(_d(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();/**
* @vue/shared v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function wa(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const Ye={},Cn=[],tr=()=>{},Rc=()=>!1,Rs=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),xa=t=>t.startsWith("onUpdate:"),yt=Object.assign,ka=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Od=Object.prototype.hasOwnProperty,He=(t,e)=>Od.call(t,e),Ce=Array.isArray,Mn=t=>Is(t)==="[object Map]",Ic=t=>Is(t)==="[object Set]",De=t=>typeof t=="function",ut=t=>typeof t=="string",Zr=t=>typeof t=="symbol",it=t=>t!==null&&typeof t=="object",_c=t=>(it(t)||De(t))&&De(t.then)&&De(t.catch),Oc=Object.prototype.toString,Is=t=>Oc.call(t),Ld=t=>Is(t).slice(8,-1),Lc=t=>Is(t)==="[object Object]",Sa=t=>ut(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Qn=wa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_s=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},zd=/-(\w)/g,Wr=_s(t=>t.replace(zd,(e,r)=>r?r.toUpperCase():"")),Fd=/\B([A-Z])/g,Qr=_s(t=>t.replace(Fd,"-$1").toLowerCase()),zc=_s(t=>t.charAt(0).toUpperCase()+t.slice(1)),ii=_s(t=>t?`on${zc(t)}`:""),Vr=(t,e)=>!Object.is(t,e),K0=(t,...e)=>{for(let r=0;r<t.length;r++)t[r](...e)},Fc=(t,e,r,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:r})},$i=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let zo;const Os=()=>zo||(zo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function On(t){if(Ce(t)){const e={};for(let r=0;r<t.length;r++){const n=t[r],s=ut(n)?Hd(n):On(n);if(s)for(const i in s)e[i]=s[i]}return e}else if(ut(t)||it(t))return t}const $d=/;(?![^(]*\))/g,Bd=/:([^]+)/,Pd=/\/\*[^]*?\*\//g;function Hd(t){const e={};return t.replace(Pd,"").split($d).forEach(r=>{if(r){const n=r.split(Bd);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Ln(t){let e="";if(ut(t))e=t;else if(Ce(t))for(let r=0;r<t.length;r++){const n=Ln(t[r]);n&&(e+=n+" ")}else if(it(t))for(const r in t)t[r]&&(e+=r+" ");return e.trim()}const qd="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",jd=wa(qd);function $c(t){return!!t||t===""}const Bc=t=>!!(t&&t.__v_isRef===!0),ur=t=>ut(t)?t:t==null?"":Ce(t)||it(t)&&(t.toString===Oc||!De(t.toString))?Bc(t)?ur(t.value):JSON.stringify(t,Pc,2):String(t),Pc=(t,e)=>Bc(e)?Pc(t,e.value):Mn(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,s],i)=>(r[ai(n,i)+" =>"]=s,r),{})}:Ic(e)?{[`Set(${e.size})`]:[...e.values()].map(r=>ai(r))}:Zr(e)?ai(e):it(e)&&!Ce(e)&&!Lc(e)?String(e):e,ai=(t,e="")=>{var r;return Zr(t)?`Symbol(${(r=t.description)!=null?r:e})`:t};/**
* @vue/reactivity v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let It;class Ud{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=It,!e&&It&&(this.index=(It.scopes||(It.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].pause();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,r;if(this.scopes)for(e=0,r=this.scopes.length;e<r;e++)this.scopes[e].resume();for(e=0,r=this.effects.length;e<r;e++)this.effects[e].resume()}}run(e){if(this._active){const r=It;try{return It=this,e()}finally{It=r}}}on(){++this._on===1&&(this.prevScope=It,It=this)}off(){this._on>0&&--this._on===0&&(It=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(this.effects.length=0,r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.cleanups.length=0,this.scopes){for(r=0,n=this.scopes.length;r<n;r++)this.scopes[r].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Vd(){return It}let Ze;const oi=new WeakSet;class Hc{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,It&&It.active&&It.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,oi.has(this)&&(oi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||jc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Fo(this),Uc(this);const e=Ze,r=rr;Ze=this,rr=!0;try{return this.fn()}finally{Vc(this),Ze=e,rr=r,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ea(e);this.deps=this.depsTail=void 0,Fo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?oi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Bi(this)&&this.run()}get dirty(){return Bi(this)}}let qc=0,e0,t0;function jc(t,e=!1){if(t.flags|=8,e){t.next=t0,t0=t;return}t.next=e0,e0=t}function Ta(){qc++}function Aa(){if(--qc>0)return;if(t0){let e=t0;for(t0=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;e0;){let e=e0;for(e0=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function Uc(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Vc(t){let e,r=t.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),Ea(n),Wd(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}t.deps=e,t.depsTail=r}function Bi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Wc(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Wc(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===c0)||(t.globalVersion=c0,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Bi(t))))return;t.flags|=2;const e=t.dep,r=Ze,n=rr;Ze=t,rr=!0;try{Uc(t);const s=t.fn(t._value);(e.version===0||Vr(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Ze=r,rr=n,Vc(t),t.flags&=-3}}function Ea(t,e=!1){const{dep:r,prevSub:n,nextSub:s}=t;if(n&&(n.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)Ea(i,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function Wd(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let rr=!0;const Gc=[];function Rr(){Gc.push(rr),rr=!1}function Ir(){const t=Gc.pop();rr=t===void 0?!0:t}function Fo(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=Ze;Ze=void 0;try{e()}finally{Ze=r}}}let c0=0;class Gd{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=t
* @vue/runtime-core v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function v0(t,e,r,n){try{return n?t(...n):t()}catch(s){zs(s,e,r)}}function mr(t,e,r,n){if(De(t)){const s=v0(t,e,r,n);return s&&_c(s)&&s.catch(i=>{zs(i,e,r)}),s}if(Ce(t)){const s=[];for(let i=0;i<t.length;i++)s.push(mr(t[i],e,r,n));return s}}function zs(t,e,r,n=!0){const s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:a}=e&&e.appContext.config||Ye;if(e){let o=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${r}`;for(;o;){const d=o.ec;if(d){for(let f=0;f<d.length;f++)if(d[f](t,l,c)===!1)return}o=o.parent}if(i){Rr(),v0(i,null,10,[t,l,c]),Ir();return}}wh(t,r,s,n,a)}function wh(t,e,r,n=!0,s=!1){if(s)throw t;console.error(t)}const Et=[];let cr=-1;const Dn=[];let qr=null,Tn=0;const nu=Promise.resolve();let cs=null;function Y0(t){const e=cs||nu;return t?e.then(this?t.bind(this):t):e}function xh(t){let e=cr+1,r=Et.length;for(;e<r;){const n=e+r>>>1,s=Et[n],i=d0(s);i<t||i===t&&s.flags&2?e=n+1:r=n}return e}function Ia(t){if(!(t.flags&1)){const e=d0(t),r=Et[Et.length-1];!r||!(t.flags&2)&&e>=d0(r)?Et.push(t):Et.splice(xh(e),0,t),t.flags|=1,su()}}function su(){cs||(cs=nu.then(au))}function kh(t){Ce(t)?Dn.push(...t):qr&&t.id===-1?qr.splice(Tn+1,0,t):t.flags&1||(Dn.push(t),t.flags|=1),su()}function Bo(t,e,r=cr+1){for(;r<Et.length;r++){const n=Et[r];if(n&&n.flags&2){if(t&&n.id!==t.uid)continue;Et.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function iu(t){if(Dn.length){const e=[...new Set(Dn)].sort((r,n)=>d0(r)-d0(n));if(Dn.length=0,qr){qr.push(...e);return}for(qr=e,Tn=0;Tn<qr.length;Tn++){const r=qr[Tn];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}qr=null,Tn=0}}const d0=t=>t.id==null?t.flags&2?-1:1/0:t.id;function au(t){const e=tr;try{for(cr=0;cr<Et.length;cr++){const r=Et[cr];r&&!(r.flags&8)&&(r.flags&4&&(r.flags&=-2),v0(r,r.i,r.i?15:14),r.flags&4||(r.flags&=-2))}}finally{for(;cr<Et.length;cr++){const r=Et[cr];r&&(r.flags&=-2)}cr=-1,Et.length=0,iu(),cs=null,(Et.length||Dn.length)&&au()}}let Ut=null,ou=null;function us(t){const e=Ut;return Ut=t,ou=t&&t.type.__scopeId||null,e}function Sh(t,e=Ut,r){if(!e||t._n)return t;const n=(...s)=>{n._d&&Go(-1);const i=us(e);let a;try{a=t(...s)}finally{us(i),n._d&&Go(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function ds(t,e){if(Ut===null)return t;const r=Ps(Ut),n=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[i,a,o,l=Ye]=e[s];i&&(De(i)&&(i={mounted:i,updated:i}),i.deep&&Er(a),n.push({dir:i,instance:r,value:a,oldValue:void 0,arg:o,modifiers:l}))}return t}function nn(t,e,r,n){const s=t.dirs,i=e&&e.dirs;for(let a=0;a<s.length;a++){const o=s[a];i&&(o.oldValue=i[a].value);let l=o.dir[n];l&&(Rr(),mr(l,r,8,[t.el,o,t,e]),Ir())}}const Th=Symbol("_vte"),Ah=t=>t.__isTeleport,Eh=Symbol("_leaveCb");function _a(t,e){t.shapeFlag&6&&t.component?(t.transition=e,_a(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function lu(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function r0(t,e,r,n,s=!1){if(Ce(t)){t.forEach((v,x)=>r0(v,e&&(Ce(e)?e[x]:e),r,n,s));return}if(n0(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&r0(t,e,r,n.component.subTree);return}const i=n.shapeFlag&4?Ps(n.component):n.el,a=s?null:i,{i:o,r:l}=t,c=e&&e.r,d=o.refs===Ye?o.refs={}:o.refs,f=o.setupState,p=Pe(f),b=f===Ye?Rc:v=>He(p,v);if(c!=null&&c!==l){if(ut(c))d[c]=null,b(c)&&(f[c]=null);else if(kt(c)){c.value=null;const v=e;v.k&&(d[v.k]=null)}}if(De(l))v0(l,o,12,[a,d]);else{const v=ut(l),x=kt(l);if(v||x){const y=()=>{if(t.f){const M=v?b(l)?f[l]:d[l]:l.value;if(s)Ce(M)&&ka(M,i);else if(Ce(M))M.includes(i)||M.push(i);else if(v)d[l]=[i],b(l)&&(f[l]=d[l]);else{const k=[i];l.value=k,t.k&&(d[t.k]=k)}}else v?(d[l]=a,b(l)&&(f[l]=a)):x&&(l.value=a,t.k&&(d[t.k]=a))};a?(y.id=-1,zt(y,r)):y()}}}Os().requestIdleCallback;Os().cancelIdleCallback;const n0=t=>!!t.type.__asyncLoader,cu=t=>t.type.__isKeepAlive;function Ch(t,e){uu(t,"a",e)}function Mh(t,e){uu(t,"da",e)}function uu(t,e,r=Ct){const n=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.p
* @vue/runtime-dom v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ki;const Zo=typeof window<"u"&&window.trustedTypes;if(Zo)try{Ki=Zo.createPolicy("vue",{createHTML:t=>t})}catch{}const Lu=Ki?t=>Ki.createHTML(t):t=>t,Df="http://www.w3.org/2000/svg",Rf="http://www.w3.org/1998/Math/MathML",kr=typeof document<"u"?document:null,Qo=kr&&kr.createElement("template"),If={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const s=e==="svg"?kr.createElementNS(Df,t):e==="mathml"?kr.createElementNS(Rf,t):r?kr.createElement(t,{is:r}):kr.createElement(t);return t==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:t=>kr.createTextNode(t),createComment:t=>kr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>kr.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,s,i){const a=r?r.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Qo.innerHTML=Lu(n==="svg"?`<svg>${t}</svg>`:n==="mathml"?`<math>${t}</math>`:t);const o=Qo.content;if(n==="svg"||n==="mathml"){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}e.insertBefore(o,r)}return[a?a.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},_f=Symbol("_vtc");function Of(t,e,r){const n=t[_f];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const ps=Symbol("_vod"),zu=Symbol("_vsh"),Lf={name:"show",beforeMount(t,{value:e},{transition:r}){t[ps]=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):Vn(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),Vn(t,!0),n.enter(t)):n.leave(t,()=>{Vn(t,!1)}):Vn(t,e))},beforeUnmount(t,{value:e}){Vn(t,e)}};function Vn(t,e){t.style.display=e?t[ps]:"none",t[zu]=!e}const zf=Symbol(""),Ff=/(^|;)\s*display\s*:/;function $f(t,e,r){const n=t.style,s=ut(r);let i=!1;if(r&&!s){if(e)if(ut(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();r[o]==null&&Q0(n,o,"")}else for(const a in e)r[a]==null&&Q0(n,a,"");for(const a in r)a==="display"&&(i=!0),Q0(n,a,r[a])}else if(s){if(e!==r){const a=n[zf];a&&(r+=";"+a),n.cssText=r,i=Ff.test(r)}}else e&&t.removeAttribute("style");ps in t&&(t[ps]=i?n.display:"",t[zu]&&(n.display="none"))}const el=/\s*!important$/;function Q0(t,e,r){if(Ce(r))r.forEach(n=>Q0(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=Bf(t,e);el.test(r)?t.setProperty(Qr(n),r.replace(el,""),"important"):t[n]=r}}const tl=["Webkit","Moz","ms"],fi={};function Bf(t,e){const r=fi[e];if(r)return r;let n=Wr(e);if(n!=="filter"&&n in t)return fi[e]=n;n=zc(n);for(let s=0;s<tl.length;s++){const i=tl[s]+n;if(i in t)return fi[e]=i}return e}const rl="http://www.w3.org/1999/xlink";function nl(t,e,r,n,s,i=jd(e)){n&&e.startsWith("xlink:")?r==null?t.removeAttributeNS(rl,e.slice(6,e.length)):t.setAttributeNS(rl,e,r):r==null||i&&!$c(r)?t.removeAttribute(e):t.setAttribute(e,i?"":Zr(r)?String(r):r)}function sl(t,e,r,n,s){if(e==="innerHTML"||e==="textContent"){r!=null&&(t[e]=e==="innerHTML"?Lu(r):r);return}const i=t.tagName;if(e==="value"&&i!=="PROGRESS"&&!i.includes("-")){const o=i==="OPTION"?t.getAttribute("value")||"":t.value,l=r==null?t.type==="checkbox"?"on":"":String(r);(o!==l||!("_value"in t))&&(t.value=l),r==null&&t.removeAttribute(e),t._value=r;return}let a=!1;if(r===""||r==null){const o=typeof t[e];o==="boolean"?r=$c(r):r==null&&o==="string"?(r="",a=!0):o==="number"&&(r=0,a=!0)}try{t[e]=r}catch{}a&&t.removeAttribute(s||e)}function An(t,e,r,n){t.addEventListener(e,r,n)}function Pf(t,e,r,n){t.removeEventListener(e,r,n)}const il=Symbol("_vei");function Hf(t,e,r,n,s=null){const i=t[il]||(t[il]={}),a=i[e];if(n&&a)a.value=n;else{const[o,l]=qf(e);if(n){const c=i[e]=Vf(n,s);An(t,o,c,l)}else a&&(Pf(t,o,a,l),i[e]=void 0)}}const al=/(?:Once|Passive|Capture)$/;function qf(t
color:${s.color};
padding:${s.padding};
margin:${s.margin};
font:${s.font};
background-color:${s.backgroundColor!=="rgba(0, 0, 0, 0)"&&s.backgroundColor};
border-radius:${s.borderRadius};`,this.direction===0&&(e.style.right="0"),Bu(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",i=>{i.stopPropagation();const a=i.key;if(a==="Enter"||a==="Tab"){if(i.shiftKey)return;i.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var i;if(!e)return;const a=((i=e.textContent)==null?void 0:i.trim())||"";a===""?r.topic=n:(r.topic=a,this.markdown?t.text.innerHTML=this.markdown(r.topic,r):t.text.textContent=a),e.remove(),a!==n&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:r,origin:n}))})},Ga=function(t){const e=$t.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},fn=document,Gt="http://www.w3.org/2000/svg",Ji=function(t,e,r,n={}){const{anchor:s="middle",color:i,dataType:a}=n,o=document.createElementNS(Gt,"text");return ft(o,{"text-anchor":s,x:e+"",y:r+"",fill:i||(s==="middle"?"rgb(235, 95, 82)":"#666")}),a&&(o.dataset.type=a),o.innerHTML=t,o},Pu=function(t,e,r){const n=fn.createElementNS(Gt,"path");return ft(n,{d:t,stroke:e||"#666",fill:"none","stroke-width":r}),n},Jn=function(t){const e=fn.createElementNS(Gt,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},fl=function(){const t=fn.createElementNS(Gt,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},Sp=function(t,e,r,n){const s=fn.createElementNS(Gt,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:r}].forEach((i,a)=>{const o=i.d,l=fn.createElementNS(Gt,"path"),c={d:o,stroke:(n==null?void 0:n.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(n==null?void 0:n.strokeLinecap)||"cap","stroke-width":String((n==null?void 0:n.strokeWidth)||"2")};(n==null?void 0:n.opacity)!==void 0&&(c.opacity=String(n.opacity)),ft(l,c),a===0&&l.setAttribute("stroke-dasharray",(n==null?void 0:n.strokeDasharray)||"8,2");const d=fn.createElementNS(Gt,"path");ft(d,{d:o,stroke:"transparent",fill:"none","stroke-width":"15"}),s.appendChild(d),s.appendChild(l),s[i.name]=l}),s},Hu=function(t,e,r){if(!e)return;const n=fn.createElement("div");t.nodes.appendChild(n);const s=e.innerHTML;n.id="input-box",n.textContent=s,n.contentEditable="plaintext-only",n.spellcheck=!1;const i=e.getBBox();n.style.cssText=`
min-width:${Math.max(88,i.width)}px;
position:absolute;
left:${i.x}px;
top:${i.y}px;
padding: 2px 4px;
margin: -2px -4px;
`,Bu(n),t.scrollIntoView(n),n.addEventListener("keydown",a=>{a.stopPropagation();const o=a.key;if(o==="Enter"||o==="Tab"){if(a.shiftKey)return;a.preventDefault(),n.blur(),t.container.focus()}}),n.addEventListener("blur",()=>{var a;if(!n)return;const o=((a=n.textContent)==null?void 0:a.trim())||"";o===""?r.label=s:r.label=o,n.remove(),o!==s&&(e.innerHTML=r.label,"parent"in r?t.bus.fire("operation",{name:"finishEditSummary",obj:r}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:r}))})},Tp=function(t){const e=this.map.querySelector("me-root"),r=e.offsetTop,n=e.offsetLeft,s=e.offsetWidth,i=e.offsetHeight,a=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let o=0;o<a.length;o++){const l=a[o],c=l.querySelector("me-tpc"),{offsetLeft:d,offsetTop:f}=tn(this.nodes,c),p=c.offsetWidth,b=c.offsetHeight,v=l.parentNode.className,x=this.generateMainBranch({pT:r,pL:n,pW:s,pH:i,cT:f,cL:d,cW:p,cH:b,direction:v,containerHeight:this.nodes.offsetHeight}),y=this.theme.palette,M=c.nodeObj.branchColor||y[o%y.length];if(c.style.borderColor=M,this.lines.appendChild(Pu(x,M,"3")),t&&t!==l)continue;const k=Jn("subLines"),T=l.lastChild;T.tagName==="svg"&&T.remove(),l.appendChild(k),qu(this,k,M,l,v,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},qu=function(t,e,r,n,s,i){const a=n.firstChild,o=n.children[1].children;if(o.length===0)return;const l=a.offsetTop,c=a.offsetLeft,d=a.offsetWidth,f=a.offsetHeight;for(let p=0;p<o.length;p++){const b=o[p],v=b.firstChild,x=v.offsetTop,y=v.offsetLeft,M=v.offsetWidth,k=v.offsetHeight,T=v.firstChild.nodeObj.branchColor||r,N=t.generateSubBranch({pT:l,pL:c,pW:d,pH:f,cT:x,cL:y,cW:M,cH:k,direction:s,isFirst:i});e.appendChild(Pu(N,T,"2"));const I=v.children[1];if(I){if(!I.expanded)continue}else continue;qu(t,e,T,b,s)}},pl={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",linkBidirectional:"双向连接",clickTips:"请点击目标节点",summary:"摘要"},ml={cn:pl,zh_CN:pl,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",linkBidirectional:"雙向連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",linkBidirectional:"Bidirectional Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",linkBidirectional:"Двунаправленная ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",linkBidirectional:"双方向リンク",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",linkBidirectional:"Link bidirecional",clickTips:"Favor clicar no item alvo",summary:"Resumo"},it:{addChild:"Aggiungi figlio",addParent:"Aggiungi ge
`).forEach((a,o)=>{const l=document.createElementNS(qt,"text");ft(l,{x:r+parseInt(e.paddingLeft)+"",y:n+parseInt(e.paddingTop)+gm(e.lineHeight,e.fontSize)*(o+1)+parseFloat(e.fontSize)*(o+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),l.innerHTML=a,s.appendChild(l)}),s}function bm(t,e,r,n){var s;let i="";(s=t.nodeObj)!=null&&s.dangerouslySetInnerHTML?i=t.nodeObj.dangerouslySetInnerHTML:t.text?i=t.text.textContent:i=t.childNodes[0].textContent;const a=document.createElementNS(qt,"foreignObject");ft(a,{x:r+parseInt(e.paddingLeft)+"",y:n+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const o=document.createElement("div");return ft(o,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),o.innerHTML=i,a.appendChild(o),a}function ym(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=tn(t.nodes,e),i=document.createElementNS(qt,"rect");return ft(i,{x:n+"",y:s+"",rx:r.borderRadius,ry:r.borderRadius,width:r.width,height:r.height,fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.borderWidth}),i}function L0(t,e,r=!1){const n=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=tn(t.nodes,e),a=document.createElementNS(qt,"rect");ft(a,{x:s+"",y:i+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth});const o=document.createElementNS(qt,"g");o.appendChild(a);let l;return r?l=bm(e,n,s,i):l=vm(e,n,s,i),o.appendChild(l),o}function wm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=tn(t.nodes,e),i=document.createElementNS(qt,"a"),a=document.createElementNS(qt,"text");return ft(a,{x:n+"",y:s+parseInt(r.fontSize)+"","text-anchor":"start","font-family":r.fontFamily,"font-size":`${r.fontSize}`,"font-weight":`${r.fontWeight}`,fill:`${r.color}`}),a.innerHTML=e.textContent,i.appendChild(a),i.setAttribute("href",e.href),i}function xm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:s}=tn(t.nodes,e),i=document.createElementNS(qt,"image");return ft(i,{x:n+"",y:s+"",width:r.width+"",height:r.height+"",href:e.src}),i}const z0=100,km='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',Sm=(t,e=!1)=>{var r,n,s;const i=t.nodes,a=i.offsetHeight+z0*2,o=i.offsetWidth+z0*2,l=mm(a+"px",o+"px"),c=document.createElementNS(qt,"svg"),d=document.createElementNS(qt,"rect");ft(d,{x:"0",y:"0",width:`${o}`,height:`${a}`,fill:t.theme.cssVar["--bgcolor"]}),l.appendChild(d),i.querySelectorAll(".subLines").forEach(v=>{const x=v.cloneNode(!0),{offsetLeft:y,offsetTop:M}=tn(i,v.parentElement);x.setAttribute("x",`${y}`),x.setAttribute("y",`${M}`),c.appendChild(x)});const f=(r=i.querySelector(".lines"))==null?void 0:r.cloneNode(!0);f&&c.appendChild(f);const p=(n=i.querySelector(".topiclinks"))==null?void 0:n.cloneNode(!0);p&&c.appendChild(p);const b=(s=i.querySelector(".summary"))==null?void 0:s.cloneNode(!0);return b&&c.appendChild(b),i.querySelectorAll("me-tpc").forEach(v=>{v.nodeObj.dangerouslySetInnerHTML?c.appendChild(L0(t,v,!e)):(c.appendChild(ym(t,v)),c.appendChild(L0(t,v.text,!e)))}),i.querySelectorAll(".tags > span").forEach(v=>{c.appendChild(L0(t,v))}),i.querySelectorAll(".icons > span").forEach(v=>{c.appendChild(L0(t,v))}),i.querySelectorAll(".hyper-link").forEach(v=>{c.appendChild(wm(t,v))}),i.querySelectorAll("img").forEach(v=>{c.appendChild(xm(t,v))}),ft(c,{x:z0+"",y:z0+"",overflow:"visible"}),l.appendChild(c),l},Tm=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),km+t.outerHTML);function Am(t){return new Promise((e,r)=>{const n=new FileReader;n.onload=s=>{e(s.target.result)},n.onerror=s=>{r(s)},n.readAsDataURL(t)})}const Em=function(t=!1,e){const r=Sm(this,t),n=Tm(r,e);return new Blob([n],{type:"image/svg+xml"})},Cm=async function(t=!1,e){const r=this.exportSvg(t,e),n=await Am(r);return new Promise((s,i)=>{const a=new Ima
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||e[r]&&F2[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Il=Symbol("internals");function Gn(t){return t&&String(t).trim().toLowerCase()}function ts(t){return t===!1||t==null?t:B.isArray(t)?t.map(ts):String(t)}function B2(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const P2=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function yi(t,e,r,n,s){if(B.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!B.isString(e)){if(B.isString(n))return e.indexOf(n)!==-1;if(B.isRegExp(n))return n.test(e)}}function H2(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function q2(t,e){const r=B.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,i,a){return this[n].call(this,e,s,i,a)},configurable:!0})})}class Gs{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function i(o,l,c){const d=Gn(l);if(!d)throw new Error("header name must be a non-empty string");const f=B.findKey(s,d);(!f||s[f]===void 0||c===!0||c===void 0&&s[f]!==!1)&&(s[f||l]=ts(o))}const a=(o,l)=>B.forEach(o,(c,d)=>i(c,d,l));if(B.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(B.isString(e)&&(e=e.trim())&&!P2(e))a($2(e),r);else if(B.isObject(e)&&B.isIterable(e)){let o={},l,c;for(const d of e){if(!B.isArray(d))throw TypeError("Object iterator must return a key-value pair");o[c=d[0]]=(l=o[c])?B.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}a(o,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=Gn(e),e){const n=B.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return B2(s);if(B.isFunction(r))return r.call(this,s,n);if(B.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Gn(e),e){const n=B.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||yi(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function i(a){if(a=Gn(a),a){const o=B.findKey(n,a);o&&(!r||yi(n,n[o],o,r))&&(delete n[o],s=!0)}}return B.isArray(e)?e.forEach(i):i(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const i=r[n];(!e||yi(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const r=this,n={};return B.forEach(this,(s,i)=>{const a=B.findKey(n,i);if(a){r[a]=ts(s),delete r[i];return}const o=e?H2(i):String(i).trim();o!==i&&delete r[i],r[o]=ts(s),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return B.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&B.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[Il]=this[Il]={accessors:{}}).accessors,s=this.prototype;function i(a){const o=Gn(a);n[o]||(q2(s,a),n[o]=!0)}return B.isArray(e)?e.forEach(i):i(e),this}}Gs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(Gs.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});B.freezeMethods(Gs);const nr=Gs;function wi(t,e){const r=this||to,n=e||r,s=nr.from(n.headers);let i=n.data;return B.forEach(t,function(o){i=o.call(r,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function g1(t){return!!(t&&t.__CANCEL__)}function Pn(t,e,r){Ne.call(this,t??"canceled",Ne.ERR_CANCELED,e,r),this.name="CanceledError"}B.inherits(Pn,Ne,{__CANCEL__:!0});function v1(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new Ne("Request failed with status code "+r.status,[Ne.ERR_BAD_REQUEST,Ne.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function j2(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function U2(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=n[i];a||(a=c),r[s]=l,n[s]=c;let f=i,p=0;for(;f!==s;)p+=r[f++],f=f%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-a<e)return;const b=d&&c-d;return b?Math.round(p*1e3/b):void 0}}function V2(t,e){let r=0,n=1e3/e,s,i;const a=(c,d=Date.now())=>{r=d,s=null,i&&(clearTimeout(i),i=null),t(...c)};return[(...c)=>{const d=Date.now(),f=d-r;f>=n?a(c,d):(s=c,i||(i=setTimeout(()=>{i=null,a(s)},n-f)))},()=>s&&a(s)]}const ws=(t,e,r=3)=>{let n=0;const s=U2(50,250);return V2(i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,l=a-n,c=s(l),d=a<=o;n=a;const f={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&d?(o-a)/c:void 0,event:i,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(f)},r)},_l=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ol=t=>(...e)=>B.asap(()=>t(...e)),W2=xt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,xt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,G2=xt.hasStandardBrowserEnv?{write(t,e,r,n,s,i){const a=[t+"="+encodeURIComponent(e)];B.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),B.isString(n)&&a.push("path="+n),B.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function K2(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Y2(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function b1(t,e,r){let n=!K2(e);return t&&(n||r==!1)?Y2(t,e):e}const Ll=t=>t instanceof nr?{...t}:t;function pn(t,e){e=e||{};const r={};function n(c,d,f,p){return B.isPlainObject(c)&&B.isPlainObject(d)?B.merge.call({caseless:p},c,d):B.isPlainObject(d)?B.merge({},d):B.isArray(d)?d.slice():d}function s(c,d,f,p){if(B.isUndefined(d)){if(!B.isUndefined(c))return n(void 0,c,f,p)}else return n(c,d,f,p)}function i(c,d){if(!B.isUndefined(d))return n(void 0,d)}function a(c,d){if(B.isUndefined(d)){if(!B.isUndefined(c))return n(void 0,c)}else return n(void 0,d)}function o(c,d,f){if(f in e)return n(c,d);if(f in t)return n(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cance
`+i.map($l).join(`
`):" "+$l(i[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:ia};function xi(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pn(null,t)}function Bl(t){return xi(t),t.headers=nr.from(t.headers),t.data=wi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),k1.getAdapter(t.adapter||to.adapter)(t).then(function(n){return xi(t),n.data=wi.call(t,t.transformResponse,n),n.headers=nr.from(n.headers),n},function(n){return g1(n)||(xi(t),n&&n.response&&(n.response.data=wi.call(t,t.transformResponse,n.response),n.response.headers=nr.from(n.response.headers))),Promise.reject(n)})}const S1="1.11.0",Ys={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ys[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Pl={};Ys.transitional=function(e,r,n){function s(i,a){return"[Axios v"+S1+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,o)=>{if(e===!1)throw new Ne(s(a," has been removed"+(r?" in "+r:"")),Ne.ERR_DEPRECATED);return r&&!Pl[a]&&(Pl[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,a,o):!0}};Ys.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function c3(t,e,r){if(typeof t!="object")throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let s=n.length;for(;s-- >0;){const i=n[s],a=e[i];if(a){const o=t[i],l=o===void 0||a(o,i,t);if(l!==!0)throw new Ne("option "+i+" must be "+l,Ne.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ne("Unknown option "+i,Ne.ERR_BAD_OPTION)}}const rs={assertOptions:c3,validators:Ys},or=rs.validators;class ks{constructor(e){this.defaults=e||{},this.interceptors={request:new Rl,response:new Rl}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=pn(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&rs.assertOptions(n,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},!1),s!=null&&(B.isFunction(s)?r.paramsSerializer={serialize:s}:rs.assertOptions(s,{encode:or.function,serialize:or.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),rs.assertOptions(r,{baseUrl:or.spelling("baseURL"),withXsrfToken:or.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&B.merge(i.common,i[r.method]);i&&B.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),r.headers=nr.concat(a,i);const o=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(l=l&&x.synchronous,o.unshift(x.fulfilled,x.rejected))});const c=[];this.interceptors.response.forEach(function(x){c.push(x.fulfilled,x.rejected)});let d,f=0,p;if(!l){const v=[Bl.bind(this),void 0];for(v.unshift(...o),v.push(...c),p=v.length,d=Promise.resolve(r);f<p;)d=d.then(v[f++],v[f++]);return d}p=o.length;let b=r;for(f=0;f<p;){const v=o[f++],x=o[f++];try{b=v(b)}catch(y){x.call(this,y);break}}try{d=Bl.call(this,b)}catch(v){return Promise.reject(v)}for(f=0,p=c.length;f<p;)d=d.then(c[f++],c[f++]);return d}getUri(e){e=pn(this.defaults,e);const r=b1(e.baseURL,e.url,e.allowAbsoluteUrls);return f1(r,e.params,e.paramsSerializer)}}B.forEach(["delete","get","head","options"],function(e){ks.prototype[e]=function(r,n){return this.request(pn(n||{},{method:e,url:r,data:(n||{}).data}))}});B.forEach(["post","put","patch"],function(e){function r(n){return function(i,a,o){return this.request(pn(o||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ks.prototype[e]=r(),ks.prototype[e+"Form"]=r(!0)});const ns=ks;class ro{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(o=>{n.subscribe(o),i=o}).then(s);return a.cancel=function(){n.unsubscribe(i)},a},e(function(i,a,o){n.reason||(n.reason=new Pn(i,a,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new ro(function(s){e=s}),cancel:e}}}const u3=ro;function d3(t){return function(r){return t.apply(null,r)}}function h3(t){return B.isObject(t)&&t.isAxiosError===!0}const aa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFiel
]`).replace("lheading",C1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},M3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,N3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,N1=/^( {2,}|\\)\n(?!\s*$)/,D3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Js=/[\p{P}\p{S}]/u,co=/[\s\p{P}\p{S}]/u,D1=/[^\s\p{P}\p{S}]/u,R3=je(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,co).getRegex(),R1=/(?!~)[\p{P}\p{S}]/u,I3=/(?!~)[\s\p{P}\p{S}]/u,_3=/(?:[^\s\p{P}\p{S}]|~)/u,O3=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,I1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,L3=je(I1,"u").replace(/punct/g,Js).getRegex(),z3=je(I1,"u").replace(/punct/g,R1).getRegex(),_1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",F3=je(_1,"gu").replace(/notPunctSpace/g,D1).replace(/punctSpace/g,co).replace(/punct/g,Js).getRegex(),$3=je(_1,"gu").replace(/notPunctSpace/g,_3).replace(/punctSpace/g,I3).replace(/punct/g,R1).getRegex(),B3=je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,D1).replace(/punctSpace/g,co).replace(/punct/g,Js).getRegex(),P3=je(/\\(punct)/,"gu").replace(/punct/g,Js).getRegex(),H3=je(/^<(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(),q3=je(oo).replace("(?:-->|$)","-->").getRegex(),j3=je("^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",q3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ss=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,U3=je(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ss).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O1=je(/^!?\[(label)\]\[(ref)\]/).replace("label",Ss).replace("ref",ao).getRegex(),L1=je(/^!?\[(ref)\](?:\[\])?/).replace("ref",ao).getRegex(),V3=je("reflink|nolink(?!\\()","g").replace("reflink",O1).replace("nolink",L1).getRegex(),uo={_backpedal:o0,anyPunctuation:P3,autolink:H3,blockSkip:O3,br:N1,code:N3,del:o0,emStrongLDelim:L3,emStrongRDelimAst:F3,emStrongRDelimUnd:B3,escape:M3,link:U3,nolink:L1,punctuation:R3,reflink:O1,reflinkSearch:V3,tag:j3,text:D3,url:o0},W3={...uo,link:je(/^!?\[(label)\]\((.*?)\)/).replace("label",Ss).getRegex(),reflink:je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ss).getRegex()},oa={...uo,emStrongRDelimAst:$3,emStrongLDelim:z3,url:je(/^((?: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\S]|[^\\])*?(?:\\[\s\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},G3={...oa,br:je(N1).replace("{2,}","*").getRegex(),text:je(oa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},F0={normal:lo,gfm:E3,pedantic:C3},Kn={normal:uo,gfm:oa,breaks:G3,pedantic:W3},K3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"
`).map(i=>{let a=i.match(r.other.beginningSpace);if(a===null)return i;let[o]=a;return o.length>=s.length?i.slice(s.length):i}).join(`
`)}var Ts=class{constructor(t){Ge(this,"options");Ge(this,"rules");Ge(this,"lexer");this.options=t||vn}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Yn(r,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=X3(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=Yn(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Yn(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Yn(e[0],`
`).split(`
`),n="",s="",i=[];for(;r.length>0;){let a=!1,o=[],l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),a=!0;else if(!a)o.push(r[l]);else break;r=r.slice(l);let c=o.join(`
`),d=c.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
${c}`:c,s=s?`${s}
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,r.length===0)break;let p=i.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let b=p,v=b.raw+`
`+r.join(`
`),x=this.blockquote(v);i[i.length-1]=x,n=n.substring(0,n.length-b.raw.length)+x.raw,s=s.substring(0,s.length-b.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){let b=p,v=b.raw+`
`+r.join(`
`),x=this.list(v);i[i.length-1]=x,n=n.substring(0,n.length-p.raw.length)+x.raw,s=s.substring(0,s.length-b.raw.length)+x.raw,r=v.substring(i.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:s}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,s={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let i=this.rules.other.listItemRegex(r),a=!1;for(;t;){let l=!1,c="",d="";if(!(e=i.exec(t))||this.rules.block.hr.test(t))break;c=e[0],t=t.substring(c.length);let f=e[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,M=>" ".repeat(3*M.length)),p=t.split(`
`,1)[0],b=!f.trim(),v=0;if(this.options.pedantic?(v=2,d=f.trimStart()):b?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,d=f.slice(v),v+=e[1].length),b&&this.rules.other.blankLine.test(p)&&(c+=p+`
`,t=t.substring(p.length+1),l=!0),!l){let M=this.rules.other.nextBulletRegex(v),k=this.rules.other.hrRegex(v),T=this.rules.other.fencesBeginRegex(v),N=this.rules.other.headingBeginRegex(v),I=this.rules.other.htmlBeginRegex(v);for(;t;){let O=t.split(`
`,1)[0],z;if(p=O,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),z=p):z=p.replace(this.rules.other.tabCharGlobal," "),T.test(p)||N.test(p)||I.test(p)||M.test(p)||k.test(p))break;if(z.search(this.rules.other.nonSpaceChar)>=v||!p.trim())d+=`
`+z.slice(v);else{if(b||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||N.test(f)||k.test(f))break;d+=`
`+p}!b&&!p.trim()&&(b=!0),c+=O+`
`,t=t.substring(O.length+1),f=z.slice(v)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let x=null,y;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(y=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:c,task:!!x,checked:y,loose:!1,text:d,tokens:[]}),s.raw+=c}let o=s.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let l=0;l<s.items.length;l++)if(this.lexer.state.top=!1,s.items[l].tokens=this.lexer.blockTokens(s.items[l].text,[]),!s.loose){let c=s.items[l].tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let l=0;l<s.items.length;l++)s.items[l].loose=!0;return s}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:s}}}table(t){var a;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Ul(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?i.align.push("right"):this.rules.other.tableAlignCenter.test(o)?i.align.push("center"):this.rules.other.tableAlignLeft.test(o)?i.align.push("left"):i.align.push(null);for(let o=0;o<r.length;o++)i.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:i.align[o]});for(let o of s)i.rows.push(Ul(o,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=Yn(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=Y3(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],s=i[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Vl(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[n.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Vl(r,s,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,a,o=s,l=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+s);(n=c.exec(e))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){o+=a;continue}else if((n[5]||n[6])&&s%3&&!((s+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let d=[...n[0]][0].length,f=t.slice(0,s+n.index+d+a);if(Math.min(s,a)%2){let b=f.slice(1,-1);return{type:"em",raw:f,text:b,tokens:this.lexer.inlineTokens(b)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let i;do i=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(i!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},Cr=class la{constructor(e){Ge(this,"tokens");Ge(this,"
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var s,i,a;for(this.options.pedantic&&(e=e.replace(Mt.tabCharGlobal," ").replace(Mt.spaceLine,""));e;){let o;if((i=(s=this.options.extensions)==null?void 0:s.block)!=null&&i.some(c=>(o=c.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
`:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+o.raw,c.text+=`
`+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+o.raw,c.text+=`
`+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,d=e.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+o.raw,c.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
`)?"":`
`)+o.raw,c.text+=`
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var o,l,c;let n=e,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a="";for(;e;){i||(a=""),i=!1;let d;if((l=(o=this.options.extensions)==null?void 0:o.inline)!=null&&l.some(p=>(d=p.call({lexer:this},e,r))?(e=e.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);let p=r.at(-1);d.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(e,n,a)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),r.push(d);continue}let f=e;if((c=this.options.extensions)!=null&&c.startInline){let p=1/0,b=e.slice(1),v;this.options.extensions.startInline.forEach(x=>{v=x.call({lexer:this},b),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(d=this.tokenizer.inlineText(f)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(a=d.raw.slice(-1)),i=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=d.raw,p.text+=d.text):r.push(d);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},As=class{constructor(t){Ge(this,"options");Ge(this,"parser");this.options=t||vn}space(t){return""}code({text:t,lang:e,escaped:r}){var i;let n=(i=(e||"").match(Mt.notSpaceStart))==null?void 0:i[0],s=t.replace(Mt.endingNewline,"")+`
`;return n?'<pre><code class="language-'+lr(n)+'">'+(r?s:lr(s,!0))+`</code></pre>
`:"<pre><code>"+(r?s:lr(s,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(t){let e=t.ordered,r=t.start,n="";for(let a=0;a<t.items.length;a++){let o=t.items[a];n+=this.listitem(o)}let s=e?"ol":"ul",i=e&&r!==1?' start="'+r+'"':"";return"<"+s+i+`>
`+n+"</"+s+`>
`}listitem(t){var r;let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((r=t.tokens[0])==null?void 0:r.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+lr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(t){let e="",r="";for(let s=0;s<t.header.length;s++)r+=this.tablecell(t.header[s]);e+=this.tablerow({text:r});let n="";for(let s=0;s<t.rows.length;s++){let i=t.rows[s];r="";for(let a=0;a<i.length;a++)r+=this.tablecell(i[a]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
<thead>
`+e+`</thead>
`+n+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${lr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),s=jl(t);if(s===null)return n;t=s;let i='<a href="'+t+'"';return e&&(i+=' title="'+lr(e)+'"'),i+=">"+n+"</a>",i}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let s=jl(t);if(s===null)return lr(r);t=s;let i=`<img src="${t}" alt="${r}"`;return e&&(i+=` title="${lr(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:lr(t.text)}},ho=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""}},Mr=class ca{constructor(e){Ge(this,"options");Ge(this,"renderer");Ge(this,"textRenderer");this.options=e||vn,this.options.renderer=this.options.renderer||new As,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ho}static parse(e,r){return new ca(r).parse(e)}static parseInline(e,r){return new ca(r).parseInline(e)}parse(e,r=!0){var s,i;let n="";for(let a=0;a<e.length;a++){let o=e[a];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[o.type]){let c=o,d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){n+=d||"";continue}}let l=o;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"def":{n+=this.renderer.def(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let c=l,d=this.renderer.text(c);for(;a+1<e.length&&e[a+1].type==="text";)c=e[++a],d+=`
`+this.renderer.text(c);r?n+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):n+=d;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}parseInline(e,r=this.renderer){var s,i;let n="";for(let a=0;a<e.length;a++){let o=e[a];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=c||"";continue}}let l=o;switch(l.type){case"escape":{n+=r.text(l);break}case"html":{n+=r.html(l);break}case"link":{n+=r.link(l);break}case"image":{n+=r.image(l);break}case"strong":{n+=r.strong(l);break}case"em":{n+=r.em(l);break}case"codespan":{n+=r.codespan(l);break}case"br":{n+=r.br(l);break}case"del":{n+=r.del(l);break}case"text":{n+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},Fi,ss=(Fi=class{constructor(t){Ge(this,"options");Ge(this,"block");this.options=t||vn}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Cr.lex:Cr.lexInline}provideParser(){return this.block?Mr.parse:Mr.parseInline}},Ge(Fi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Fi),J3=class{constructor(...t){Ge(this,"defaults",no());Ge(this,"options",this.setOptions);Ge(this,"parse",this.parseMarkdown(!0));Ge(this,"parseInline",this.parseMarkdown(!1));Ge(this,"Parser",Mr);Ge(this,"Renderer",As);Ge(this,"TextRenderer",ho);Ge(this,"Lexer",Cr);Ge(this,"Tokenizer",Ts);Ge(this,"Hooks",ss);this.use(...t)}walkTokens(t,e){var n,s;let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let a=i;for(let o of a.header)r=r.concat(this.walkTokens(o.tokens,e));for(let o of a.rows)for(let l of o)r=r.concat(this.walkTokens(l.tokens,e));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,e));break}default:{let a=i;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let l=a[o].flat(1/0);r=r.concat(this.walkTokens(l,e))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=e.renderers[s.name];i?e.renderers[s.name]=function(...a){let o=s.renderer.apply(this,a);return o===!1&&(o=i.apply(this,a)),o}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[s.level];i?i.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),n.extensions=e),r.renderer){let s=this.defaults.renderer||new As(this.defaults);for(let i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,o=r.renderer[a],l=s[a];s[a]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d||""}}n.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Ts(this.defaults);for(let i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,o=r.tokenizer[a],l=s[a];s[a]=(...c)=>{let d=o.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}n.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new ss;for(let i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].include
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+lr(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},mn=new J3;function qe(t,e){return mn.parse(t,e)}qe.options=qe.setOptions=function(t){return mn.setOptions(t),qe.defaults=mn.defaults,A1(qe.defaults),qe};qe.getDefaults=no;qe.defaults=vn;qe.use=function(...t){return mn.use(...t),qe.defaults=mn.defaults,A1(qe.defaults),qe};qe.walkTokens=function(t,e){return mn.walkTokens(t,e)};qe.parseInline=mn.parseInline;qe.Parser=Mr;qe.parser=Mr.parse;qe.Renderer=As;qe.TextRenderer=ho;qe.Lexer=Cr;qe.lexer=Cr.lex;qe.Tokenizer=Ts;qe.Hooks=ss;qe.parse=qe;qe.options;qe.setOptions;qe.use;qe.walkTokens;qe.parseInline;Mr.parse;Cr.lex;var Wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Z3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function v8(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var z1={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/var r=function(n){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},o={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function k(T){return T instanceof l?new l(T.type,k(T.content),T.alias):Array.isArray(T)?T.map(k):T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(k){return Object.prototype.toString.call(k).slice(8,-1)},objId:function(k){return k.__id||Object.defineProperty(k,"__id",{value:++i}),k.__id},clone:function k(T,N){N=N||{};var I,O;switch(o.util.type(T)){case"Object":if(O=o.util.objId(T),N[O])return N[O];I={},N[O]=I;for(var z in T)T.hasOwnProperty(z)&&(I[z]=k(T[z],N));return I;case"Array":return O=o.util.objId(T),N[O]?N[O]:(I=[],N[O]=I,T.forEach(function(W,U){I[U]=k(W,N)}),I);default:return T}},getLanguage:function(k){for(;k;){var T=s.exec(k.className);if(T)return T[1].toLowerCase();k=k.parentElement}return"none"},setLanguage:function(k,T){k.className=k.className.replace(RegExp(s,"gi"),""),k.classList.add("language-"+T)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(I){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(I.stack)||[])[1];if(k){var T=document.getElementsByTagName("script");for(var N in T)if(T[N].src==k)return T[N]}return null}},isActive:function(k,T,N){for(var I="no-"+T;k;){var O=k.classList;if(O.contains(T))return!0;if(O.contains(I))return!1;k=k.parentElement}return!!N}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(k,T){var N=o.util.clone(o.languages[k]);for(var I in T)N[I]=T[I];return N},insertBefore:function(k,T,N,I){I=I||o.languages;var O=I[k],z={};for(var W in O)if(O.hasOwnProperty(W)){if(W==T)for(var U in N)N.hasOwnProperty(U)&&(z[U]=N[U]);N.hasOwnProperty(W)||(z[W]=O[W])}var he=I[k];return I[k]=z,o.languages.DFS(o.languages,function(ge,Ae){Ae===he&&ge!=k&&(this[ge]=z)}),z},DFS:function k(T,N,I,O){O=O||{};var z=o.util.objId;for(var W in T)if(T.hasOwnProperty(W)){N.call(T,W,T[W],I||W);var U=T[W],he=o.util.type(U);he==="Object"&&!O[z(U)]?(O[z(U)]=!0,k(U,N,null,O)):he==="Array"&&!O[z(U)]&&(O[z(U)]=!0,k(U,N,W,O))}}},plugins:{},highlightAll:function(k,T){o.highlightAllUnder(document,k,T)},highlightAllUnder:function(k,T,N){var I={callback:N,container:k,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",I),I.elements=Array.prototype.slice.apply(I.container.querySelectorAll(I.selector)),o.hooks.run("before-all-elements-highlight",I);for(var O=0,z;z=I.elements[O++];)o.highlightElement(z,T===!0,I.callback)},highlightElement:function(k,T,N){var I=o.util.getLanguage(k),O=o.languages[I];o.util.setLanguage(k,I);var z=k.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(z,I);var W=k.textContent,U={element:k,language:I,grammar:O,code:W};function he(Ae){U.highlightedCode=Ae,o.hooks.run("before-insert",U),U.element.innerHTML=U.highlightedCode,o.hooks.run("after-highlight",U),o.hooks.run("complete",U),N&&N.call(U.element)}if(o.hooks.run("before-sanity-check",U),z=U.element.parentElement,z&&z.nodeName.toLowerCase()==="pre"&&!z.hasAttribute("tabindex")&&z.setAttribute("tabindex","0"),!U.code){o.hooks.run("complete",U),N&&N.call(U.element);return}if(o.hooks.run("before-highlight",U),!U.grammar){he(o.util.encode(U.code));return}if(T&&n.Worker){var ge=new Worker(o.filename);ge.onmessage=function(Ae){he(Ae.data)},ge.postMessage(JSON.stringify({language:U.language,code:U.code,immediateClose:!0}))}else he(o.highlight(U.code,U.grammar,U.language))},highlight:function(k,T,N){var I={code:k,grammar:T,language:N};if(o.hooks.run("before-tokenize",I),!I.grammar)throw new Error('The language "'+I.language+'" has no grammar.');return I.tokens=o.tokenize(I.code,I.grammar),o.hooks.run("after-tokenize",I),l.stringify(o.util.encode(I.tokens),I.language)},tokenize:function(k,T){var N=T.rest;if(N){for(var I in N)T[I]=N[I];delete T.rest}var O=new f;return p(O,
`),y.hasAttribute("data-start")||y.setAttribute("data-start",String(U+1))}M.textContent=O,r.highlightElement(M)},function(O){y.setAttribute(o,d),M.textContent=O})}}),r.plugins.fileHighlight={highlight:function(y){for(var M=(y||document).querySelectorAll(f),k=0,T;T=M[k++];)r.highlightElement(T)}};var v=!1;r.fileHighlight=function(){v||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),v=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(z1);var Q3=z1.exports;const Gl=Z3(Q3);class Ft{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new Ft(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class Kt{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new Kt(r,Ft.range(this,e))}}class te{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,s,i,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;s=a.start,i=a.end,s===o.length?n+=" at end of input: ":n+=" at position "+(s+1)+": ";var l=o.slice(s,i).replace(/[^]/g,"$&̲"),c;s>15?c="…"+o.slice(s-15,s):c=o.slice(0,s);var d;i+15<o.length?d=o.slice(i,i+15)+"…":d=o.slice(i),n+=c+l+d}var f=new Error(n);return f.name="ParseError",f.__proto__=te.prototype,f.position=s,s!=null&&i!=null&&(f.length=i-s),f.rawMessage=e,f}}te.prototype.__proto__=Error.prototype;var e6=function(e,r){return e.indexOf(r)!==-1},t6=function(e,r){return e===void 0?r:e},r6=/([A-Z])/g,n6=function(e){return e.replace(r6,"-$1").toLowerCase()},s6={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i6=/[&><"']/g;function a6(t){return String(t).replace(i6,e=>s6[e])}var F1=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},o6=function(e){var r=F1(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},l6=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},c6=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},we={contains:e6,deflt:t6,escape:a6,hyphenate:n6,getBaseElem:F1,isCharacterBox:o6,protocolFromUrl:c6},is={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-a
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+e/2.075+" -"+e+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+e)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},y6=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+e/2.084+" -"+e+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+e)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},w6=function(e,r){return"M983 "+(10+e+r)+`
l`+e/3.13+" -"+e+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},x6=function(e,r){return"M424,"+(2398+e+r)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+e)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`
h400000v`+(40+e)+"h-400000z"},k6=function(e,r){return"M473,"+(2713+e+r)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},S6=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},T6=function(e,r,n){var s=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},A6=function(e,r,n){r=1e3*r;var s="";switch(e){case"sqrtMain":s=b6(r,Sn);break;case"sqrtSize1":s=y6(r,Sn);break;case"sqrtSize2":s=w6(r,Sn);break;case"sqrtSize3":s=x6(r,Sn);break;case"sqrtSize4":s=k6(r,Sn);break;case"sqrtTall":s=T6(r,Sn,n)}return s},E6=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},Kl={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},C6=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class T0{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return we.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e}toText(){var e=r=>r.toText();return this.children.map(e).join("")}}var fr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.755
`+z+" children.");for(var ge=0;ge<z;ge++){var Ae=new Xr(T[ge]),et=new _r([Ae],{width:"400em",height:ae(O),viewBox:"0 0 "+o+" "+I,preserveAspectRatio:U[ge]+" slice"}),Je=L.makeSvgSpan([W[ge]],[et],r);if(z===1)return{span:Je,minWidth:N,height:O};Je.style.height=ae(O),M.push(Je)}return{span:L.makeSpan(["stretchy"],M,r),minWidth:N,height:O}}}var{span:s,minWidth:i,height:a}=n();return s.height=a,s.style.height=ae(a),i>0&&(s.style.minWidth=ae(i)),s},h5=function(e,r,n,s,i){var a,o=e.height+e.depth+n+s;if(/fbox|color|angl/.test(r)){if(a=L.makeSpan(["stretchy",r],[],i),r==="fbox"){var l=i.color&&i.getColor();l&&(a.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new ha({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new ha({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new _r(c,{width:"100%",height:ae(o)});a=L.makeSvgSpan([],[d],i)}return a.height=o,a.style.height=ae(o),a},Lr={encloseSpan:h5,mathMLnode:l5,svgSpan:d5};function Re(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function wo(t){var e=ei(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function ei(t){return t&&(t.type==="atom"||F6.hasOwnProperty(t.type))?t:null}var xo=(t,e)=>{var r,n,s;t&&t.type==="supsub"?(n=Re(t.base,"accent"),r=n.base,t.base=r,s=L6($e(t,e)),t.base=n):(n=Re(t,"accent"),r=n.base);var i=$e(r,e.havingCrampedStyle()),a=n.isShifty&&we.isCharacterBox(r),o=0;if(a){var l=we.getBaseElem(r),c=$e(l,e.havingCrampedStyle());o=Zl(c).skew}var d=n.label==="\\c",f=d?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=Lr.svgSpan(n,e),p=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ae(2*o)+")",marginLeft:ae(2*o)}:void 0}]},e);else{var b,v;n.label==="\\vec"?(b=L.staticSvg("vec",e),v=L.svgData.vec[1]):(b=L.makeOrd({mode:n.mode,text:n.label},e,"textord"),b=Zl(b),b.italic=0,v=b.width,d&&(f+=b.depth)),p=L.makeSpan(["accent-body"],[b]);var x=n.label==="\\textcircled";x&&(p.classes.push("accent-full"),f=i.height);var y=o;x||(y-=v/2),p.style.left=ae(y),n.label==="\\textcircled"&&(p.style.top=".2em"),p=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]},e)}var M=L.makeSpan(["mord","accent"],[p],e);return s?(s.children[0]=M,s.height=Math.max(M.height,s.height),s.classes[0]="mord",s):M},Q1=(t,e)=>{var r=t.isStretchy?Lr.mathMLnode(t.label):new ee.MathNode("mo",[Xt(t.label,t.mode)]),n=new ee.MathNode("mover",[Xe(t.base,e),r]);return n.setAttribute("accent","true"),n},f5=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));oe({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=Ds(e[0]),n=!f5.test(t.funcName),s=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:s,base:r}},htmlBuilder:xo,mathmlBuilder:Q1});oe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:xo,mathmlBuilder:Q1});oe({type:"accentUnder",names:["\\underleftarrow","\
]`,P5="\\\\[a-zA-Z@]+",H5="\\\\[^\uD800-\uDFFF]",q5="("+P5+")"+Ed+"*",j5=`\\\\(
|[ \r ]+
?)[ \r ]*`,ba="[̀-ͯ]",U5=new RegExp(ba+"+$"),V5="("+Ed+"+)|"+(j5+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ba+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ba+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+q5)+("|"+H5+")");class Sc{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(V5,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new Kt("EOF",new Ft(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new te("Unexpected character: '"+e[r]+"'",new Kt(e[r],new Ft(this,r,r+1)));var s=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=e.indexOf(`
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Kt(s,new Ft(this,r,this.tokenRegex.lastIndex))}}class W5{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new te("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var s=0;s<this.undefStack.length;s++)delete this.undefStack[s][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var G5=md;g("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});g("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});g("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});g("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});g("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});g("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");g("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Tc={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};g("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new te("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=Tc[e.text],n==null||n>=r)throw new te("Invalid base-"+r+" digit "+e.text);for(var s;(s=Tc[t.future().text])!=null&&s<r;)n*=r,n+=s,t.popToken()}return"\\@char{"+n+"}"});var No=(t,e,r,n)=>{var s=t.consumeArg().tokens;if(s.length!==1)throw new te("\\newcommand's first argument must be a macro name");var i=s[0].text,a=t.isDefined(i);if(a&&!e)throw new te("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new te("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=t.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new te("Invalid number of arguments: "+l);o=parseInt(l),s=t.consumeArg().tokens}return a&&n||t.macros.set(i,{tokens:s,numArgs:o}),""};g("\\newcommand",t=>No(t,!1,!0,!1));g("\\renewcommand",t=>No(t,!0,!1,!1));g("\\providecommand",t=>No(t,!0,!0,!0));g("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});g("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});g("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Ur[r],Qe.math[r],Qe.text[r]),""});g("\\bgroup","{");g("\\egroup","}");g("~","\\nobreakspace");g("\\lq","`");g("\\rq","'");g("\\aa","\\r a");g("\\AA","\\r A");g("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");g("\\copyright","\\TextOrMath{
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:s}}Cc.hasOwnProperty(r[0])&&!Qe[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=Cc[r[0]]+r.slice(1));var i=U5.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var a;if(Qe[this.mode][r]){this.settings.strict&&this.mode==="math"&&fa.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=Qe[this.mode][r].group,l=Ft.range(e),c;if(z6.hasOwnProperty(o)){var d=o;c={type:"atom",mode:this.mode,family:d,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};a=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&($1(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),a={type:"textord",mode:"text",loc:Ft.range(e),text:r};else return null;if(this.consume(),i)for(var f=0;f<i[0].length;f++){var p=i[0][f];if(!zi[p])throw new te("Unknown accent ' "+p+"'",e);var b=zi[p][this.mode]||zi[p].text;if(!b)throw new te("Accent "+p+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:Ft.range(e),label:b,isStretchy:!1,isShifty:!0,base:a}}return a}}si.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Ro=function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new si(e,r);delete n.gullet.macros.current["\\df@tag"];var s=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new te("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:n.subparse([new Kt("\\df@tag")])}]}return s},Dd=function(e,r,n){r.textContent="";var s=Io(e,n).toNode();r.appendChild(s)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Dd=function(){throw new te("KaTeX doesn't work in quirks mode.")});var Y5=function(e,r){var n=Io(e,r).toMarkup();return n},X5=function(e,r){var n=new fo(r);return Ro(e,n)},Rd=function(e,r,n){if(n.throwOnError||!(e instanceof te))throw e;var s=L.makeSpan(["katex-error"],[new Yt(r)]);return s.setAttribute("title",e.toString()),s.setAttribute("style","color:"+n.errorColor),s},Io=function(e,r){var n=new fo(r);try{var s=Ro(e,n);return i5(s,e,n)}catch(i){return Rd(i,e,n)}},J5=function(e,r){var n=new fo(r);try{var s=Ro(e,n);return a5(s,e,n)}catch(i){return Rd(i,e,n)}},Z5="0.16.22",Q5={Span:A0,Anchor:go,SymbolNode:Yt,SvgNode:_r,PathNode:Xr,LineNode:ha},Mc={version:Z5,render:Dd,renderToString:Y5,ParseError:te,SETTINGS_SCHEMA:is,__parse:X5,__renderToDomTree:Io,__renderToHTMLTree:J5,__setFontMetrics:M6,__defineSymbol:u,__defineFunction:oe,__defineMacro:g,__domTree:Q5};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\
`);let r=!1,n=!1;for(const a of e){const o=a.trim();o.includes("|")&&o.split("|").length>=3&&(r=!0),o.includes("|")&&o.includes("-")&&/^[\s\|\-\:]+$/.test(o)&&(n=!0)}const s=(t.match(/\|/g)||[]).length,i=s>=6;return r&&n||r&&i||r&&s>=4},n7=t=>!t||typeof t!="string"?!1:r7(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(r=>r.test(t)),G0=t=>!t||typeof t!="string"?t||"":n7(t)||t.includes("|")?ya(t):t;const _o=(t,e)=>{const r=t.__vccOpts||t;for(const[n,s]of e)r[n]=s;return r},s7={class:"mindmap-container"},i7={key:0,class:"welcome-page"},a7={class:"ai-input-content"},o7=["disabled","onKeydown"],l7={class:"ai-input-actions"},c7=["disabled"],u7=["disabled"],d7={key:0},h7={key:1},f7={key:3,class:"save-controls"},p7={__name:"MindMap",setup(t,{expose:e}){const r=ze(null),n=ze(null),s=ze(null),i=ze({}),a=ze({}),o=ze(null),l=ze(1),c=ze(!0),d=ze(!1),f=ze(!1),p=ze(null),b=ze(""),v=ze(!1);ze(new Map),ze(!1),ze({x:0,y:0}),ze(null);const x=()=>{c.value=!0,r.value&&(r.value.innerHTML=""),n.value&&(n.value=null)},y=()=>{c.value=!1},M=()=>{c.value=!1},k=()=>{if(!n.value||!r.value)return null;try{const w=r.value.querySelector(".map-canvas");if(w){const E=w.style.transform,_=n.value.scaleVal||1;return console.log("📍 保存位置:",{transform:E,scaleVal:_}),{transform:E,scaleVal:_}}}catch(w){console.warn("保存位置失败:",w)}return null},T=w=>{if(!(!w||!r.value||!n.value))try{const E=r.value.querySelector(".map-canvas");E&&w.transform&&(E.style.setProperty("transform",w.transform,"important"),w.scaleVal&&n.value.scaleVal!==w.scaleVal&&(n.value.scaleVal=w.scaleVal),E.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:w.transform,scaleVal:w.scaleVal}))}catch(E){console.warn("恢复位置失败:",E)}},N=async(w,E=!1,_=!0)=>{try{const P=E?k():null;P?console.log("📍 保存当前位置用于保持原位:",P):!E&&!_&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",w),console.log("🔍 数据字段:",Object.keys(w||{})),w&&w.id?(o.value=w.id,console.log("🔍 设置当前思维导图ID (data.id):",w.id)):w&&w.mindmapId?(o.value=w.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",w.mindmapId)):w&&w.nodeData&&w.nodeData.mindmapId?(o.value=w.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",w.nodeData.mindmapId)):w&&w.nodeData&&w.nodeData.mindmap_id?(o.value=w.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",w.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(w||{})),w&&w.nodeData&&console.log("🔍 nodeData字段:",Object.keys(w.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",o.value),y(),await Y0(),r.value||(console.warn("⚠️ 思维导图容器未准备好等待DOM更新..."),await new Promise(Z=>setTimeout(Z,100)),r.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(r.value){console.log("🔍 创建Mind Elixir实例设置markdown函数"),n.value=new vt({el:r.value,direction:vt.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(J,$)=>{if(console.log("🔍 Mind Elixir markdown函数被调用:",J.substring(0,100)+"..."),J.includes("|")||J.includes("**")||J.includes("`")||J.includes("#")){console.log("🎨 检测到markdown内容开始渲染:",J.substring(0,100)+"...");const ue=G0(J);return console.log("🎨 渲染结果:",ue.substring(0,200)+"..."),ue}return console.log("🔍 内容不包含markdown语法返回原文本"),J}}),console.log(" Mind Elixir实例创建完成markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",w);const Z=n.value.init(w);console.log(" Mind Elixir实例创建成功初始
font-size: 11px;
color: #666;
margin-top: 6px;
padding: 6px 8px;
background: rgba(0, 0, 0, 0.03);
border-radius: 4px;
max-width: 250px;
word-wrap: break-word;
line-height: 1.3;
border-left: 3px solid #e0e0e0;
display: block;
`,E.appendChild(ue));const de=J.data.des;de.length>150?(ue.textContent=de.substring(0,150)+"...",ue.title=de):ue.textContent=de}})},1e3)},O=()=>{try{if(n.value&&n.value.toCenter){n.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const w=r.value;if(!w)return;const E=w.querySelector(".map-canvas");if(!E)return;const _=E.querySelectorAll("me-tpc");if(_.length===0)return;let P=1/0,Z=-1/0,J=1/0,$=-1/0;_.forEach(C0=>{const yn=C0.getBoundingClientRect(),M0=w.getBoundingClientRect(),Oo=yn.left-M0.left,Lo=yn.top-M0.top;P=Math.min(P,Oo),Z=Math.max(Z,Oo+yn.width),J=Math.min(J,Lo),$=Math.max($,Lo+yn.height)});const ue=(P+Z)/2,de=(J+$)/2,me=w.clientWidth/2,Oe=w.clientHeight/2,Be=me-ue,gt=Oe-de;E.style.transform=`translate(${Be}px, ${gt}px)`,E.style.opacity="1",E.style.transition="opacity 0.3s ease";const Rt=100,Jt=Math.max(Be,Rt),yr=Math.max(gt,Rt);E.style.transform=`translate(${Jt}px, ${yr}px)`,E.style.opacity="1",E.style.visibility="visible"}catch{}},z=async w=>{if(!(!n.value||!w))try{console.log("🎯 开始处理新节点:",w);let E=null,_=0;const P=5;for(;!E&&_<P;)E=n.value.findEle(w),E||(_++,await new Promise(Z=>setTimeout(Z,50)));E?(console.log("✅ 找到节点元素:",E),n.value.scrollIntoView&&(n.value.scrollIntoView(E),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{n.value.beginEdit&&(n.value.beginEdit(E),console.log("✅ 节点已进入编辑状态"))},350)):console.error("❌ 多次尝试后仍未找到节点元素:",w)}catch(E){console.error("❌ 居中显示节点失败:",E)}},W=()=>{if(!s.value)return;if(n.value&&n.value.getNodeById)try{const E=n.value.getNodeById(s.value.id);if(E){const _=E.getBoundingClientRect(),P=r.value.getBoundingClientRect(),Z=_.left-P.left+_.width/2,J=_.bottom-P.top+10;i.value={left:`${Z}px`,top:`${J}px`};return}}catch{}let w=document.querySelector(`[data-id="${s.value.id}"]`);if(w||(w=document.querySelector(`.topic[data-id="${s.value.id}"]`)),w||(w=document.querySelector(`[data-node-id="${s.value.id}"]`)),w||(w=document.querySelector(`[data-nodeid="me${s.value.id}"]`)),!w){const E=document.querySelectorAll("me-tpc");for(const _ of E)if(_.getAttribute("data-nodeid")===`me${s.value.id}`){w=_;break}}if(!w){const E=document.querySelectorAll(".topic");for(const _ of E)if(_.textContent.trim()===s.value.topic){w=_;break}}if(w){const E=w.getBoundingClientRect(),_=r.value.getBoundingClientRect(),P=E.left-_.left+E.width/2,Z=E.bottom-_.top+10;i.value={left:`${P}px`,top:`${Z}px`}}else i.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},U=async()=>{s.value&&(await ye(s.value),s.value=null)},he=async()=>{s.value&&(await fe(s.value),s.value=null)},ge=async()=>{s.value&&(await Ue(s.value),s.value=null)},Ae=async()=>{if(!s.value)return;console.log("Ask AI for node:",s.value);const w=parseFloat(i.value.left)||0,E=parseFloat(i.value.top)||0;a.value={left:`${w}px`,top:`${E+60}px`,transform:"translateX(-50%)"},f.value=!0,p.value=s.value},et=()=>{f.value=!1,p.value=null,b.value="",v.value=!1,s.value=null},Je=w=>{if(!w)return"";const E=[];return w.parent&&w.parent.topic&&E.push(`父节点: ${w.parent.topic}`),w.parent&&w.parent.parent&&w.parent.parent.topic&&E.push(`祖父节点: ${w.parent.parent.topic}`),E.join(" | ")},ot=w=>{w.ctrlKey||w.metaKey||(w.preventDefault(),Fe())},Fe=async()=>{if(!(!b.value.trim()||!p.value||v.value)){v.value=!0;try{const w="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",E=`节点信息
当前节点${p.value.topic}
上下文${Je(p.value)}
用户问题${b.value}
请给出详细的回答回答应该
1. 直接回答用户的问题
2. 提供具体的建议或改进方案
3. 保持专业和有用的语调
4. 回答长度适中便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:w,userPrompt:E});const _=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:w,user_prompt:E,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!_.ok)throw new Error(`HTTP error! status: ${_.status}`);let P="";const Z=_.body.getReader(),J=new TextDecoder;let $="";for(;;){const{done:ue,value:de}=await Z.read();if(ue)break;$+=J.decode(de,{stream:!0});const me=$.split(`
`);$=me.pop()||"";for(const Oe of me)if(Oe.startsWith("data: "))try{const Be=JSON.parse(Oe.slice(6));if(Be.type==="chunk")P+=Be.content;else if(Be.type==="error")throw new Error(Be.content)}catch(Be){console.warn("解析流式数据失败:",Be)}}await tt(p.value,b.value,P),et()}catch(w){console.error("AI请求失败:",w),alert("AI请求失败请稍后重试")}finally{v.value=!1}}},Ie=w=>w.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(E,_)=>{if(_.includes(":")){const P=_.split(":");if(P.length>1)return`${P[0]}: ${P.slice(1).join(":")}`}return`${_}`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
`).replace(/\n/g,`
`),ve=(w,E,_)=>{const P=w.split(`
`);let Z=_,J=[];for(let $=0;$<P.length;$++){const de=P[$].trim(),me=de.match(/^[-*+]\s*【(.+)】/);if(me){const Oe=me[1].trim(),Be={id:`node_${Z++}`,topic:Oe,children:[],level:(E.level||0)+1,data:{}};let gt=[],Rt=$+1;for(;Rt<P.length;){const Jt=P[Rt].trim();if(Jt.match(/^[-*+]\s*【(.+)】/))break;const C0=Jt.match(/^[-*+]\s+(.+)$/);if(C0){const yn=C0[1].trim(),M0=Ie(yn);gt.push("• "+M0)}Rt++}if(gt.length>0){const Jt=Ie(gt.join(`
`));Be.topic=Be.topic+`
`+Jt}E.children.push(Be),$=Rt-1}else de&&J.push(de)}if(J.length>0){const $=J.join(`
`).trim();$&&$.split(`
`).filter(de=>de.trim()).forEach(de=>{const me=Ie(de.trim());if(me){const Oe={id:`node_${Z++}`,topic:me,children:[],level:(E.level||0)+1,data:{}};E.children.push(Oe)}})}return{nodeCounter:Z}},Me=w=>{const E=w.split(`
`);let _=null;const P=[];let Z=0,J=[];if(E.forEach(($,ue)=>{const de=$.trim(),me=de.match(/^(#{1,6})\s+(.+)$/);if(me){if(J.length>0&&P.length>0){const Jt=J.join(`
`).trim();Jt&&(Z=ve(Jt,P[P.length-1],Z).nodeCounter),J=[]}const Oe=me[1].length,Be=me[2].trim(),gt=Ie(Be),Rt={id:`node_${Z++}`,topic:gt,children:[],level:Oe,data:{}};if(Oe===1&&!_)_=Rt,P.length=0,P.push(_);else{for(;P.length>1&&P[P.length-1].level>=Oe;)P.pop();P.length>0&&P[P.length-1].children.push(Rt),P.push(Rt)}}else de&&J.push(de)}),J.length>0&&P.length>0){const $=J.join(`
`).trim();$&&(Z=ve($,P[P.length-1],Z).nodeCounter)}return _||(_={id:"root",topic:"根节点",children:[],data:{}}),_},tt=async(w,E,_)=>{var P,Z,J;try{const ue=(yr=>yr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
`).trim())(_),de=`# ${E}
${ue}`,me=Me(de),Oe={title:E,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:w.id,isRoot:!1},Be=[];if(me.children&&me.children.length>0&&me.children.forEach(yr=>{Be.push({title:yr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",o.value),!o.value)throw new Error("没有找到当前思维导图ID无法创建节点");const gt=await lt.addNodes(o.value,[Oe]);if(!gt.data||!gt.data.success)throw new Error("AI父节点创建失败");const Rt=(J=(Z=(P=gt.data.data)==null?void 0:P.nodes)==null?void 0:Z[0])==null?void 0:J.id;if(!Rt)throw new Error("无法获取创建的父节点ID");Be.forEach(yr=>{yr.parentId=Rt});let Jt=null;if(Be.length>0&&(Jt=await lt.addNodes(o.value,Be)),gt.data&&gt.data.success)await be();else throw new Error("AI父节点创建失败")}catch($){console.error("创建AI节点失败:",$),alert("创建AI回答节点失败: "+$.message)}},We=async()=>{if(s.value){try{const w=s.value.topic||s.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(w),_e();else{const E=document.createElement("textarea");E.value=w,E.style.position="fixed",E.style.left="-999999px",E.style.top="-999999px",document.body.appendChild(E),E.focus(),E.select();const _=document.execCommand("copy");document.body.removeChild(E),_?_e():St()}}catch{St()}s.value=null}},_e=()=>{const w=document.createElement("div");w.textContent="文本已复制到剪贴板",w.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #4CAF50;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`;const E=document.createElement("style");E.textContent=`
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
`,document.head.appendChild(E),document.body.appendChild(w),setTimeout(()=>{w.parentNode&&w.parentNode.removeChild(w),E.parentNode&&E.parentNode.removeChild(E)},3e3)},St=()=>{const w=document.createElement("div");w.textContent="复制失败,请手动复制",w.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #f44336;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(w),setTimeout(()=>{w.parentNode&&w.parentNode.removeChild(w)},3e3)},mt=(w,E="success")=>{const _=document.createElement("div");_.textContent=w;const P=E==="success"?"#4CAF50":E==="error"?"#f44336":"#ff9800";_.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: ${P};
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(_),setTimeout(()=>{_.parentNode&&_.parentNode.removeChild(_)},2e3)},j=()=>{const w=document.createElement("div");w.textContent="✅ 节点编辑已保存",w.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #4CAF50;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(w),setTimeout(()=>{w.parentNode&&w.parentNode.removeChild(w)},2e3)},V=()=>{const w=document.createElement("div");w.textContent="❌ 节点编辑保存失败",w.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: #f44336;
color: white;
padding: 12px 20px;
border-radius: 6px;
font-size: 14px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
`,document.body.appendChild(w),setTimeout(()=>{w.parentNode&&w.parentNode.removeChild(w)},3e3)},re=async w=>{try{console.log("🎯 处理节点拖拽操作:",w.name),console.log("📦 操作详情:",{name:w.name,objs:w.objs,toObj:w.toObj}),setTimeout(async()=>{var E;try{const _=w.objs||[],P=w.toObj;if(!_.length||!P){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${_.length} 个节点的父子关系`);let Z=null;w.name==="moveNodeIn"?(Z=P.id,console.log(`📌 拖入操作新父节点为 ${Z}`)):(w.name==="moveNodeBefore"||w.name==="moveNodeAfter")&&(Z=((E=P.parent)==null?void 0:E.id)||null,console.log(`📌 拖到兄弟位置新父节点为 ${Z||"根节点"}`));const J=_.map(async me=>{try{console.log(`🔄 更新节点 ${me.id} 的父节点为 ${Z||"根节点"}`);const Oe=await lt.updateNode(me.id,{newParentId:Z});return Oe.data&&Oe.data.success?(console.log(` 节点 ${me.id} 父子关系更新成功`),{success:!0,nodeId:me.id}):(console.warn(` 节点 ${me.id} 父子关系更新失败:`,Oe),{success:!1,nodeId:me.id})}catch(Oe){return console.error(` 节点 ${me.id} 父子关系更新失败:`,Oe),{success:!1,nodeId:me.id,error:Oe}}}),$=await Promise.all(J),ue=$.filter(me=>me.success).length,de=$.filter(me=>!me.success).length;console.log(`📊 拖拽保存结果: ${ue} 成功, ${de} 失败`)}catch(_){console.error("❌ 保存拖拽后的结构失败:",_),mt("❌ 节点拖拽保存失败","error")}},500)}catch(E){console.error("❌ 处理节点拖拽操作失败:",E)}},ie=async w=>{try{const E=w.obj;E?await Ee(E):console.error("无法解析编辑操作:",w)}catch(E){console.error("处理编辑完成失败:",E)}},Ee=async w=>{var E,_;try{if(!o.value){console.error("无法获取思维导图ID");return}const P=await lt.updateNode(w.id,{newTitle:w.topic,newDes:((E=w.data)==null?void 0:E.des)||"",newParentId:w.parentId||((_=w.parent)==null?void 0:_.id)});P.data&&P.data.success?j():(console.error("更新节点编辑失败:",P.data),V())}catch(P){console.error("更新节点编辑失败:",P),V()}},ye=async w=>{var E;try{await S();const _=o.value||w.mindmap_id||w.mindmapId;if(!_){console.error("无法获取思维导图ID");return}const P=await lt.addNodes(_,[{title:"新子节点",des:"子节点描述",parentId:w.id}]);if(P.data&&P.data.success){const Z=((E=P.data.data)==null?void 0:E.nodes)||[];if(Z.length>0){const J=Z[0];try{await new Promise(ue=>setTimeout(ue,800));const $=await lt.getMindmap(_);if($.data&&$.data.nodeData){await N($.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",J.id),await z(J.id)}catch(ue){console.error("居中显示新节点失败:",ue)}}else throw new Error("无法获取思维导图数据")}catch($){console.error("刷新思维导图失败:",$)}}}}catch(_){console.error("添加子节点失败:",_)}},fe=async w=>{var E;try{await S(),console.log("添加兄弟节点到API:",w.id),console.log("节点信息:",{id:w.id,parentId:w.parentId,parent:w.parent,mindmap_id:w.mindmap_id,mindmapId:w.mindmapId});const _=o.value||w.mindmap_id||w.mindmapId;if(!_){console.error("无法获取思维导图ID");return}let P=w.parentId;!P&&w.parent&&(P=w.parent.id);const Z=await lt.addNodes(_,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:P}]);if(console.log("添加兄弟节点响应:",Z),Z.data&&Z.data.success){const J=((E=Z.data.data)==null?void 0:E.nodes)||[];if(J.length>0){const $=J[0];console.log("新创建的兄弟节点:",$),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const ue=await lt.getMindmap(_);if(ue.data&&ue.data.nodeData){await N(ue.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",$.id),await z($.id)}catch(de){console.error("居中显示新节点失败:",de)}}else throw new Error("无法获取思维导图数据")}catch(ue){console.error("重新初始化失败,使用完整重新加载:",ue);const de=await lt.getMindmap(_);de.data&&de.data.nodeData&&await N(de.data,!0,!1)}}}}catch(_){console.error("添加兄弟节点失败:",_)}
${j}`;await he(V,re),await Ae(),We(v.value.name,i.value),setTimeout(async()=>{try{await ve()}catch(ie){console.error("自动保存失败:",ie)}},1500)}catch(j){console.error("从文件生成Markdown失败:",j),Me("生成失败: "+j.message,"error")}finally{o.value=!1}},z=j=>new Promise(async(V,re)=>{try{const ie=j.type.includes("text")||j.name.endsWith(".txt")||j.name.endsWith(".md"),Ee=j.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||j.type==="application/msword"||j.name.endsWith(".docx")||j.name.endsWith(".doc"),ye=j.type==="application/pdf"||j.name.endsWith(".pdf");if(ie){const fe=new FileReader;fe.onload=Ue=>V(Ue.target.result),fe.onerror=()=>re(new Error("文本文件读取失败")),fe.readAsText(j)}else if(Ee){const fe=await W(j);V(fe)}else if(ye){const fe=await U(j);V(fe)}else{const fe=new FileReader;fe.onload=Ue=>V(Ue.target.result),fe.onerror=()=>re(new Error("文件读取失败")),fe.readAsText(j)}}catch(ie){re(ie)}}),W=async j=>{try{if(j.name.endsWith(".docx")){const V=await Dc(()=>import("./index-c6bfb612.js").then(Ee=>Ee.i),[]),re=await j.arrayBuffer();return(await V.extractRawText({arrayBuffer:re})).value}else if(j.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式或安装相应的解析库")}catch(V){throw new Error(`Office文档解析失败: ${V.message}`)}},U=async j=>{try{const V=await Dc(()=>import("./pdf-869d0c0b.js"),[]);V.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const re=await j.arrayBuffer(),ie=await V.getDocument({data:re}).promise;let Ee="";for(let ye=1;ye<=ie.numPages;ye++){const S=(await(await ie.getPage(ye)).getTextContent()).items.map(D=>D.str).join(" ");Ee+=S+`
`}return Ee}catch(V){throw new Error(`PDF文件解析失败: ${V.message}`)}},he=async(j,V)=>{const ie=j||`你是一位Markdown格式转换专家你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式请遵循以下步骤
提取主标题 识别文章最顶层的主标题通常为文章题目或书名并使用Markdown的 # 级别表示
识别层级标题 从文章内容中提取所有层级的内容标题从主标题后的第一个标题开始Level 1 Level 4判断层级依据
视觉与结构特征 如独立成行/位置行首格式加粗编号如 1., 1.1, (1), -
语义逻辑 标题之间的包含和并列关系
在Markdown中使用相应标题级别
Level 1 标题用 ##
Level 2 标题用 ###
Level 3 标题用 ####
Level 4 标题用 #####
精确保留原文标题文字不得修改概括或润色
处理正文内容 对于每个标题下的正文内容区块从该标题后开始直到下一个同级或更高级别标题前
直接保留原文文本但根据内容结构适当格式化为Markdown
如果内容是列表如项目符号或编号列表使用Markdown列表语法例如 - 用于无序列表1. 用于有序列表
保持段落和换行不变
输出格式 输出必须是纯Markdown格式的文本不得包含任何额外说明JSON或非Markdown元素确保输出与示例风格一致`,Ee=V||"请将以下内容转换为结构化的Markdown格式";try{const ye=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:ie,user_prompt:Ee,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!ye.ok)throw new Error(`HTTP error! status: ${ye.status}`);const fe=ye.body.getReader(),Ue=new TextDecoder;let S="",D=0;for(;;){const{done:F,value:G}=await fe.read();if(F)break;S+=Ue.decode(G,{stream:!0});const q=S.split(`
`);S=q.pop()||"";for(const H of q)if(H.startsWith("data: "))try{const X=JSON.parse(H.slice(6));if(X.type==="start")Me("AI开始生成内容...","info");else if(X.type==="chunk"){D++,i.value+=X.content;try{const ne=et(i.value);a.value=JSON.stringify(ne,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:ne,title:ne.topic||"AI生成中...",source:"ai-streaming",chunkCount:D}}))}catch(ne){console.warn("⚠️ 实时转换JSON失败:",ne),console.warn("⚠️ 当前Markdown内容:",i.value)}}else if(X.type==="end")Me("AI内容生成完成","success");else if(X.type==="error")throw new Error(X.content)}catch(X){console.warn("解析流式数据失败:",X)}}}catch(ye){throw console.error("流式AI API调用失败:",ye),ye}},ge=j=>{if(j.includes("|")&&j.includes("-")){const V=j.split(`
`);let re=!1,ie=!1;for(const Ee of V){const ye=Ee.trim();ye.includes("|")&&ye.split("|").length>=3&&(re=!0),ye.includes("|")&&ye.includes("-")&&/^[\s\|\-\:]+$/.test(ye)&&(ie=!0)}if(re&&ie)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),j}return j.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(V,re)=>{if(re.includes(":")){const ie=re.split(":");if(ie.length>1)return`${ie[0]}: ${ie.slice(1).join(":")}`}return`${re}`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
`).replace(/\n/g,`
`)},Ae=async()=>{if(!i.value.trim()){Me("请输入Markdown内容","error");return}l.value=!0;try{const j=et(i.value);a.value=JSON.stringify(j,null,2)}catch(j){console.error("转换失败:",j),Me("转换失败请检查Markdown格式","error")}finally{l.value=!1}},et=j=>{const V=j.split(`
`);let re=null;const ie=[];let Ee=0,ye=[];if(V.forEach((fe,Ue)=>{const S=fe.trim(),D=S.match(/^(#{1,6})\s+(.+)$/);if(D){if(ye.length>0&&ie.length>0){const X=ye.join(`
`).trim();X&&(Ee=Je(X,ie[ie.length-1],Ee).nodeCounter),ye=[]}const F=D[1].length,G=D[2].trim(),q=ge(G),H={id:`node_${Ee++}`,topic:q,children:[],level:F,data:{}};if(F===1&&!re)re=H,ie.length=0,ie.push(re);else{for(;ie.length>1&&ie[ie.length-1].level>=F;)ie.pop();ie.length>0&&ie[ie.length-1].children.push(H),ie.push(H)}}else S&&ye.push(S)}),ye.length>0&&ie.length>0){const fe=ye.join(`
`).trim();fe&&(fe.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",fe.substring(0,200)+"..."),Ee=Je(fe,ie[ie.length-1],Ee).nodeCounter)}return re||(re={id:"root",topic:"根节点",children:[],data:{}}),re},Je=(j,V,re)=>{if(ot(j)){console.log("🎯 检测到表格内容,创建表格节点");const fe={id:`node_${re++}`,topic:j,children:[],level:(V.level||0)+1,data:{}};return V.children.push(fe),{nodeCounter:re}}const ie=j.split(`
`);let Ee=re,ye=[];for(let fe=0;fe<ie.length;fe++){const S=ie[fe].trim(),D=S.match(/^[-*+]\s*【(.+)】/);if(D){const F=D[1].trim(),G={id:`node_${Ee++}`,topic:F,children:[],level:(V.level||0)+1,data:{}};let q=[],H=fe+1;for(;H<ie.length;){const X=ie[H].trim();if(X.match(/^[-*+]\s*【(.+)】/))break;const se=X.match(/^[-*+]\s+(.+)$/);if(se){const Q=se[1].trim(),be=ge(Q);q.push("• "+be)}H++}if(q.length>0){const X=ge(q.join(`
`));G.topic=G.topic+`
`+X}V.children.push(G),fe=H-1}else S&&ye.push(S)}if(ye.length>0){const fe=ye.join(`
`).trim();if(fe)if(ot(fe)){console.log("🎯 检测到表格内容,创建表格节点");const Ue={id:`node_${Ee++}`,topic:fe,children:[],level:(V.level||0)+1,data:{}};V.children.push(Ue)}else fe.split(`
`).filter(S=>S.trim()).forEach(S=>{const D=ge(S.trim());if(D){const F={id:`node_${Ee++}`,topic:D,children:[],level:(V.level||0)+1,data:{}};V.children.push(F)}})}return{nodeCounter:Ee}},ot=j=>{if(!j||typeof j!="string")return!1;j.includes("|")&&console.log("🔍 检查表格内容:",j.substring(0,200)+"...");const V=j.split(`
`);let re=!1,ie=!1;for(const Ue of V){const S=Ue.trim();S.includes("|")&&S.split("|").length>=3&&(re=!0,console.log("✅ 找到表格行:",S)),S.includes("|")&&S.includes("-")&&/^[\s\|\-\:]+$/.test(S)&&(ie=!0,console.log("✅ 找到分隔符行:",S))}const Ee=(j.match(/\|/g)||[]).length,ye=Ee>=4,fe=re&&ie||re&&ye;return console.log("🔍 表格检测结果:",{hasTableRow:re,hasSeparator:ie,pipeCount:Ee,hasMultiplePipes:ye,result:fe}),fe},Fe=async()=>{if(!i.value){Me("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(i.value),Me("Markdown已复制到剪贴板","success")}catch{const V=document.createElement("textarea");V.value=i.value,document.body.appendChild(V),V.select(),document.execCommand("copy"),V.remove(),Me("Markdown已复制到剪贴板","success")}},Ie=async()=>{try{await navigator.clipboard.writeText(a.value),Me("JSON已复制到剪贴板","success")}catch(j){console.error("复制失败:",j),Me("复制失败","error")}},ve=async()=>{if(!a.value){Me("请先生成或转换JSON数据","error");return}try{const j=JSON.parse(a.value),V=j.topic||j.title||`AI生成的思维导图_${new Date().toLocaleString()}`,re=new CustomEvent("save-preview-to-database",{detail:{data:j,title:V,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(re),setTimeout(()=>{Me("思维导图已保存成功!","success"),v.value=null,b.value&&(b.value.value="")},2e3)}catch(j){console.error("JSON解析失败:",j),Me("JSON格式错误请检查数据","error")}},Me=(j,V="info")=>{const re=document.createElement("div");switch(re.className=`notification notification-${V}`,re.textContent=j,re.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
padding: 12px 20px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
animation: slideIn 0.3s ease;
max-width: 300px;
word-wrap: break-word;
`,V){case"success":re.style.background="#4CAF50",re.style.color="white";break;case"error":re.style.background="#f44336",re.style.color="white";break;case"info":default:re.style.background="#2196F3",re.style.color="white";break}if(!document.querySelector("#notification-styles")){const ie=document.createElement("style");ie.id="notification-styles",ie.textContent=`
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
from { transform: translateX(0); opacity: 1; }
to { transform: translateX(100%); opacity: 0; }
}
`,document.head.appendChild(ie)}document.body.appendChild(re),setTimeout(()=>{re.style.animation="slideOut 0.3s ease",setTimeout(()=>{re.parentNode&&re.parentNode.removeChild(re)},300)},3e3)},tt=()=>{i.value="",a.value="",Me("内容已清空","info")},We=(j,V,re=null)=>{const ie={title:j,content:V,mindmapId:re,timestamp:new Date};c.value.unshift(ie),c.value.length>10&&(c.value=c.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))},_e=async j=>{j.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:j.mindmapId,title:j.title}})):(i.value=j.content,await Ae(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:j.content,json:a.value,title:j.title}})))},St=j=>new Date(j).toLocaleString("zh-CN");Oa(()=>{const j=localStorage.getItem("ai-sidebar-history");if(j)try{c.value=JSON.parse(j)}catch(V){console.error("加载历史记录失败:",V)}window.addEventListener("add-to-history",V=>{const{title:re,content:ie,timestamp:Ee}=V.detail;We(re,ie,null)}),window.addEventListener("mindmap-saved",V=>{const{mindmapId:re,title:ie,timestamp:Ee}=V.detail,ye=c.value.find(fe=>fe.title===ie||fe.timestamp&&Math.abs(fe.timestamp-Ee)<5e3);ye?(ye.mindmapId=re,localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))):We(ie,"",re)}),i0(s,(V,re)=>{}),i0(i,(V,re)=>{})});const mt=async()=>{try{const j=await fetch("http://127.0.0.1:8000/api/ai/test-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test:"data"})});if(!j.ok)throw new Error(`HTTP error! status: ${j.status}`);const V=j.body.getReader(),re=new TextDecoder;let ie="";for(;;){const{done:Ee,value:ye}=await V.read();if(Ee)break;ie+=re.decode(ye,{stream:!0});const fe=ie.split(`
`);ie=fe.pop()||"";for(const Ue of fe)if(Ue.startsWith("data: "))try{const S=JSON.parse(Ue.slice(6))}catch(S){console.warn("解析测试数据失败:",S)}}}catch(j){console.error("❌ 测试流式API失败:",j)}};return window.testStreamAPI=mt,(j,V)=>(Ve(),Ke("div",b7,[Y("div",{class:"sidebar-toggle",onClick:x,title:n.value?"展开AI助手":"折叠AI助手",style:On({left:n.value?"10px":"420px"})},[n.value?(Ve(),Ke("svg",w7,[...V[1]||(V[1]=[Y("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(Ve(),Ke("svg",x7,[...V[2]||(V[2]=[Y("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,y7),Y("div",{class:Ln(["ai-sidebar",{"sidebar-collapsed":n.value}])},[ds(Y("div",k7,[V[12]||(V[12]=Y("div",{class:"sidebar-header"},[Y("h3",null,"🤖 AI 助手"),Y("p",null,"文档转思维导图工具"),Y("div",{class:"collapse-hint"},[Y("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),Y("div",S7,[V[6]||(V[6]=Y("h4",null,"📁 生成思维导图",-1)),Y("div",T7,[V[4]||(V[4]=Y("label",null,"上传文件:",-1)),Y("div",{class:"file-upload-area",onDrop:M,onDragover:k,onDragleave:T},[Y("input",{type:"file",ref_key:"fileInput",ref:b,onChange:y,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),Y("div",{class:Ln(["file-upload-placeholder",{"drag-over":d.value}])},[...V[3]||(V[3]=[Y("span",{class:"upload-icon"},"📎",-1),Y("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),Y("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),v.value?(Ve(),Ke("div",A7,[Y("div",E7,[Y("div",C7,[Y("span",M7,"📄 "+ur(v.value.name),1),Y("span",N7,"("+ur(I(v.value.size))+")",1)]),Y("button",{onClick:N,class:"btn-remove",title:"删除文件"},[...V[5]||(V[5]=[Y("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Y("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"})],-1)])])])])):Sr("",!0),Y("div",D7,[Y("button",{onClick:O,disabled:!v.value||o.value,class:"btn-primary"},[o.value?(Ve(),Ke("span",I7,"AI生成中...")):(Ve(),Ke("span",_7,"AI生成思维导图"))],8,R7)])]),c.value.length>0?(Ve(),Ke("div",O7,[V[7]||(V[7]=Y("h4",null,"📚 历史记录",-1)),Y("div",L7,[(Ve(!0),Ke(er,null,du(c.value,(re,ie)=>(Ve(),Ke("div",{key:ie,class:"history-item",onClick:Ee=>_e(re)},[Y("div",F7,ur(re.title),1),Y("div",$7,ur(St(re.timestamp)),1)],8,z7))),128))])])):Sr("",!0),Y("div",B7,[V[9]||(V[9]=Y("h4",null,"📝 AI生成的Markdown结果",-1)),Y("div",P7,[V[8]||(V[8]=Y("label",null,"Markdown内容",-1)),ds(Y("textarea",{"onUpdate:modelValue":V[0]||(V[0]=re=>i.value=re),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Pa,i.value]])]),Y("div",H7,[Y("button",{onClick:Ae,disabled:l.value,class:"btn-secondary"},[l.value?(Ve(),Ke("span",j7,"转换中...")):(Ve(),Ke("span",U7,"🔄 转换为JSON"))],8,q7),Y("button",{onClick:tt,class:"btn-clear"},"清空"),Y("button",{onClick:Fe,class:"btn-copy"},"📋 复制Markdown")])]),Y("div",V7,[V[11]||(V[11]=Y("h4",null,"📊 Markdown转JSON结果",-1)),f.value?(Ve(),Ke("div",W7,[V[10]||(V[10]=Y("div",{class:"spinner"},null,-1)),Y("span",null,ur(p.value),1)])):Sr("",!0),Y("div",G7,[Y("pre",K7,ur(a.value||"JSON转换结果将显示在这里"),1),Y("div",Y7,[Y("button",{onClick:Ie,class:"btn-copy"},"📋 复制JSON"),Y("button",{onClick:ve,disabled:f.value,class:"btn-copy"},ur(f.value?"处理中...":"👁️ 预览"),9,X7)])])])],512),[[Lf,!n.value]])],2)]))}},Z7=_o(J7,[["__scopeId","data-v-d0b1a702"]]);const Q7={class:"markdown-test"},e8={class:"test-section"},t8={class:"test-section"},r8=["innerHTML"],n8={class:"test-section"},s8={class:"test-cases"},i8=["onClick"],a8={__name:"MarkdownTest",setup(t){const e=ze(`# 测试标题
这是一个**粗体***斜体*的测试
## 表格测试
| 产品 | 价格 | 库存 |
|------|------|------|
| 苹果 | 4 | 100 |
| 香蕉 | 2 | 50 |
## 代码测试
\`\`\`javascript
function hello() {
console.log('Hello World!');
}
\`\`\`
行内代码\`const name = 'test'\`
## 列表测试
- 项目1
- 项目2
- 子项目2.1
- 子项目2.2
- 项目3
## 链接测试
- [GitHub](https://github.com)
- [Vue.js](https://vuejs.org)`),r=ze([{name:"基础表格",content:`# 产品价格表
| 产品 | 价格 |
|------|------|
| 苹果 | 4 |
| 香蕉 | 2 |`},{name:"复杂表格",content:`# 技术栈对比
| 技术 | 前端 | 后端 | 数据库 |
|------|------|------|--------|
| Vue.js | | | |
| Django | | | |
| PostgreSQL | | | |`},{name:"代码块",content:`# 代码示例
\`\`\`javascript
function markdownToJSON(markdown) {
const lines = markdown.split('\\n');
// 处理逻辑...
return result;
}
\`\`\``},{name:"混合内容",content:`# 混合内容测试
这是一个包含**粗体***斜体*\`行内代码\`的段落。
## 表格
| 功能 | 状态 | 说明 |
|------|------|------|
| 表格渲染 | | 支持markdown表格 |
| 代码高亮 | | 支持代码块 |
## 代码
\`\`\`python
def hello_world():
print("Hello, World!")
\`\`\``}]),n=Ou(()=>{if(!e.value)return"";try{return ya(e.value)}catch(a){return`<div class="error">渲染失败: ${a.message}</div>`}}),s=()=>{},i=a=>{e.value=a.content};return(a,o)=>(Ve(),Ke("div",Q7,[o[4]||(o[4]=Y("h2",null,"Markdown渲染测试",-1)),Y("div",e8,[o[1]||(o[1]=Y("h3",null,"输入Markdown内容",-1)),ds(Y("textarea",{"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[Pa,e.value]])]),Y("div",t8,[o[2]||(o[2]=Y("h3",null,"渲染结果",-1)),Y("div",{class:"rendered-content",innerHTML:n.value},null,8,r8)]),Y("div",n8,[o[3]||(o[3]=Y("h3",null,"测试用例",-1)),Y("button",{onClick:s,class:"test-btn"},"加载测试用例"),Y("div",s8,[(Ve(!0),Ke(er,null,du(r.value,(l,c)=>(Ve(),Ke("button",{key:c,onClick:d=>i(l),class:"test-case-btn"},ur(l.name),9,i8))),128))])])]))}},o8=_o(a8,[["__scopeId","data-v-68a00828"]]);const l8={id:"app"},c8={class:"test-mode-toggle",style:{display:"none"}},u8={key:0,class:"test-mode"},d8={key:1},h8={class:"main-content"},f8={__name:"App",setup(t){const e=ze(null),r=ze(!1),n=()=>{r.value=!r.value},s=()=>{e.value&&e.value.showMindMapPage()};return(i,a)=>(Ve(),Ke("div",l8,[a[0]||(a[0]=Ru("« ",-1)),Y("div",c8,[Y("button",{onClick:n,class:"test-btn"},ur(r.value?"切换到思维导图":"测试Markdown渲染"),1)]),r.value?(Ve(),Ke("div",u8,[Ht(o8)])):(Ve(),Ke("div",d8,[Ht(Z7,{onStartRealtimeGeneration:s}),Y("div",h8,[Ht(m7,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};tp(f8).mount("#app");export{Dc as _,Wl as c,v8 as g};