MindMap/frontend/dist/assets/index-a09f7810.js

595 lines
578 KiB
JavaScript
Raw Normal View History

2025-09-10 10:26:48 +00:00
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 i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();/**
* @vue/shared v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function xa(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const Ye={},Mn=[],rr=()=>{},Rc=()=>!1,Ii=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),ka=t=>t.startsWith("onUpdate:"),wt=Object.assign,Sa=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},Od=Object.prototype.hasOwnProperty,He=(t,e)=>Od.call(t,e),Me=Array.isArray,Nn=t=>_i(t)==="[object Map]",Ic=t=>_i(t)==="[object Set]",De=t=>typeof t=="function",dt=t=>typeof t=="string",Jr=t=>typeof t=="symbol",lt=t=>t!==null&&typeof t=="object",_c=t=>(lt(t)||De(t))&&De(t.then)&&De(t.catch),Oc=Object.prototype.toString,_i=t=>Oc.call(t),Ld=t=>_i(t).slice(8,-1),Lc=t=>_i(t)==="[object Object]",Ta=t=>dt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Qn=xa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Oi=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},zd=/-(\w)/g,Wr=Oi(t=>t.replace(zd,(e,r)=>r?r.toUpperCase():"")),Fd=/\B([A-Z])/g,Qr=Oi(t=>t.replace(Fd,"-$1").toLowerCase()),zc=Oi(t=>t.charAt(0).toUpperCase()+t.slice(1)),as=Oi(t=>t?`on${zc(t)}`:""),Vr=(t,e)=>!Object.is(t,e),Y0=(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})},Bs=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Fo;const Li=()=>Fo||(Fo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ln(t){if(Me(t)){const e={};for(let r=0;r<t.length;r++){const n=t[r],i=dt(n)?Hd(n):Ln(n);if(i)for(const s in i)e[s]=i[s]}return e}else if(dt(t)||lt(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 pn(t){let e="";if(dt(t))e=t;else if(Me(t))for(let r=0;r<t.length;r++){const n=pn(t[r]);n&&(e+=n+" ")}else if(lt(t))for(const r in t)t[r]&&(e+=r+" ");return e.trim()}const qd="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",jd=xa(qd);function $c(t){return!!t||t===""}const Bc=t=>!!(t&&t.__v_isRef===!0),Qt=t=>dt(t)?t:t==null?"":Me(t)||lt(t)&&(t.toString===Oc||!De(t.toString))?Bc(t)?Qt(t.value):JSON.stringify(t,Pc,2):String(t),Pc=(t,e)=>Bc(e)?Pc(t,e.value):Nn(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,i],s)=>(r[os(n,s)+" =>"]=i,r),{})}:Ic(e)?{[`Set(${e.size})`]:[...e.values()].map(r=>os(r))}:Jr(e)?os(e):lt(e)&&!Me(e)&&!Lc(e)?String(e):e,os=(t,e="")=>{var r;return Jr(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 _t;class Ud{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_t,!e&&_t&&(this.index=(_t.scopes||(_t.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=_t;try{return _t=this,e()}finally{_t=r}}}on(){++this._on===1&&(this.prevScope=_t,_t=this)}off(){this._on>0&&--this._on===0&&(_t=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 i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Vd(){return _t}let Je;const ls=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,_t&&_t.active&&_t.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ls.has(this)&&(ls.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,$o(this),Uc(this);const e=Je,r=nr;Je=this,nr=!0;try{return this.fn()}finally{Vc(this),Je=e,nr=r,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ca(e);this.deps=this.depsTail=void 0,$o(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ls.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ps(this)&&this.run()}get dirty(){return Ps(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 Aa(){qc++}function Ea(){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 i=n.prevDep;n.version===-1?(n===r&&(r=i),Ca(n),Wd(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}t.deps=e,t.depsTail=r}function Ps(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||!Ps(t))))return;t.flags|=2;const e=t.dep,r=Je,n=nr;Je=t,nr=!0;try{Uc(t);const i=t.fn(t._value);(e.version===0||Vr(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{Je=r,nr=n,Vc(t),t.flags&=-3}}function Ca(t,e=!1){const{dep:r,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let s=r.computed.deps;s;s=s.nextDep)Ca(s,!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 nr=!0;const Gc=[];function Rr(){Gc.push(nr),nr=!1}function Ir(){const t=Gc.pop();nr=t===void 0?!0:t}function $o(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=Je;Je=void 0;try{e()}finally{Je=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(i){Fi(i,e,r)}}function mr(t,e,r,n){if(De(t)){const i=v0(t,e,r,n);return i&&_c(i)&&i.catch(s=>{Fi(s,e,r)}),i}if(Me(t)){const i=[];for(let s=0;s<t.length;s++)i.push(mr(t[s],e,r,n));return i}}function Fi(t,e,r,n=!0){const i=e?e.vnode:null,{errorHandler:s,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(s){Rr(),v0(s,null,10,[t,l,c]),Ir();return}}wh(t,r,i,n,a)}function wh(t,e,r,n=!0,i=!1){if(i)throw t;console.error(t)}const Et=[];let ur=-1;const Rn=[];let qr=null,An=0;const nu=Promise.resolve();let ui=null;function X0(t){const e=ui||nu;return t?e.then(this?t.bind(this):t):e}function xh(t){let e=ur+1,r=Et.length;for(;e<r;){const n=e+r>>>1,i=Et[n],s=d0(i);s<t||s===t&&i.flags&2?e=n+1:r=n}return e}function _a(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,iu()}}function iu(){ui||(ui=nu.then(au))}function kh(t){Me(t)?Rn.push(...t):qr&&t.id===-1?qr.splice(An+1,0,t):t.flags&1||(Rn.push(t),t.flags|=1),iu()}function Po(t,e,r=ur+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 su(t){if(Rn.length){const e=[...new Set(Rn)].sort((r,n)=>d0(r)-d0(n));if(Rn.length=0,qr){qr.push(...e);return}for(qr=e,An=0;An<qr.length;An++){const r=qr[An];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}qr=null,An=0}}const d0=t=>t.id==null?t.flags&2?-1:1/0:t.id;function au(t){const e=rr;try{for(ur=0;ur<Et.length;ur++){const r=Et[ur];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(;ur<Et.length;ur++){const r=Et[ur];r&&(r.flags&=-2)}ur=-1,Et.length=0,su(),ui=null,(Et.length||Rn.length)&&au()}}let Vt=null,ou=null;function di(t){const e=Vt;return Vt=t,ou=t&&t.type.__scopeId||null,e}function Sh(t,e=Vt,r){if(!e||t._n)return t;const n=(...i)=>{n._d&&Ko(-1);const s=di(e);let a;try{a=t(...i)}finally{di(s),n._d&&Ko(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function hi(t,e){if(Vt===null)return t;const r=Hi(Vt),n=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[s,a,o,l=Ye]=e[i];s&&(De(s)&&(s={mounted:s,updated:s}),s.deep&&Er(a),n.push({dir:s,instance:r,value:a,oldValue:void 0,arg:o,modifiers:l}))}return t}function nn(t,e,r,n){const i=t.dirs,s=e&&e.dirs;for(let a=0;a<i.length;a++){const o=i[a];s&&(o.oldValue=s[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 Oa(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Oa(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,i=!1){if(Me(t)){t.forEach((v,k)=>r0(v,e&&(Me(e)?e[k]:e),r,n,i));return}if(n0(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&r0(t,e,r,n.component.subTree);return}const s=n.shapeFlag&4?Hi(n.component):n.el,a=i?null:s,{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(dt(c))d[c]=null,b(c)&&(f[c]=null);else if(St(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=dt(l),k=St(l);if(v||k){const w=()=>{if(t.f){const M=v?b(l)?f[l]:d[l]:l.value;if(i)Me(M)&&Sa(M,s);else if(Me(M))M.includes(s)||M.push(s);else if(v)d[l]=[s],b(l)&&(f[l]=d[l]);else{const x=[s];l.value=x,t.k&&(d[t.k]=x)}}else v?(d[l]=a,b(l)&&(f[l]=a)):k&&(l.value=a,t.k&&(d[t.k]=a))};a?(w.id=-1,Ft(w,r)):w()}}}Li().requestIdleCallback;Li().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 i=r;for(;i;){if(i.isDeactivated)return;i=i.p
* @vue/runtime-dom v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ys;const Jo=typeof window<"u"&&window.trustedTypes;if(Jo)try{Ys=Jo.createPolicy("vue",{createHTML:t=>t})}catch{}const Lu=Ys?t=>Ys.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 i=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&&i.setAttribute("multiple",n.multiple),i},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,i,s){const a=r?r.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),r),!(i===s||!(i=i.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 mi=Symbol("_vod"),zu=Symbol("_vsh"),Lf={name:"show",beforeMount(t,{value:e},{transition:r}){t[mi]=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[mi]:"none",t[zu]=!e}const zf=Symbol(""),Ff=/(^|;)\s*display\s*:/;function $f(t,e,r){const n=t.style,i=dt(r);let s=!1;if(r&&!i){if(e)if(dt(e))for(const a of e.split(";")){const o=a.slice(0,a.indexOf(":")).trim();r[o]==null&&ei(n,o,"")}else for(const a in e)r[a]==null&&ei(n,a,"");for(const a in r)a==="display"&&(s=!0),ei(n,a,r[a])}else if(i){if(e!==r){const a=n[zf];a&&(r+=";"+a),n.cssText=r,s=Ff.test(r)}}else e&&t.removeAttribute("style");mi in t&&(t[mi]=s?n.display:"",t[zu]&&(n.display="none"))}const el=/\s*!important$/;function ei(t,e,r){if(Me(r))r.forEach(n=>ei(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"],ps={};function Bf(t,e){const r=ps[e];if(r)return r;let n=Wr(e);if(n!=="filter"&&n in t)return ps[e]=n;n=zc(n);for(let i=0;i<tl.length;i++){const s=tl[i]+n;if(s in t)return ps[e]=s}return e}const rl="http://www.w3.org/1999/xlink";function nl(t,e,r,n,i,s=jd(e)){n&&e.startsWith("xlink:")?r==null?t.removeAttributeNS(rl,e.slice(6,e.length)):t.setAttributeNS(rl,e,r):r==null||s&&!$c(r)?t.removeAttribute(e):t.setAttribute(e,s?"":Jr(r)?String(r):r)}function il(t,e,r,n,i){if(e==="innerHTML"||e==="textContent"){r!=null&&(t[e]=e==="innerHTML"?Lu(r):r);return}const s=t.tagName;if(e==="value"&&s!=="PROGRESS"&&!s.includes("-")){const o=s==="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(i||e)}function En(t,e,r,n){t.addEventListener(e,r,n)}function Pf(t,e,r,n){t.removeEventListener(e,r,n)}const sl=Symbol("_vei");function Hf(t,e,r,n,i=null){const s=t[sl]||(t[sl]={}),a=s[e];if(n&&a)a.value=n;else{const[o,l]=qf(e);if(n){const c=s[e]=Vf(n,i);En(t,o,c,l)}else a&&(Pf(t,o,a,l),s[e]=void 0)}}const al=/(?:Once|Passive|Capture)$/;function qf(t
color:${i.color};
padding:${i.padding};
margin:${i.margin};
font:${i.font};
background-color:${i.backgroundColor!=="rgba(0, 0, 0, 0)"&&i.backgroundColor};
border-radius:${i.borderRadius};`,this.direction===0&&(e.style.right="0"),Bu(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",s=>{s.stopPropagation();const a=s.key;if(a==="Enter"||a==="Tab"){if(s.shiftKey)return;s.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var s;if(!e)return;const a=((s=e.textContent)==null?void 0:s.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}))})},Ka=function(t){const e=Bt.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},fn=document,Kt="http://www.w3.org/2000/svg",Js=function(t,e,r,n={}){const{anchor:i="middle",color:s,dataType:a}=n,o=document.createElementNS(Kt,"text");return gt(o,{"text-anchor":i,x:e+"",y:r+"",fill:s||(i==="middle"?"rgb(235, 95, 82)":"#666")}),a&&(o.dataset.type=a),o.innerHTML=t,o},Pu=function(t,e,r){const n=fn.createElementNS(Kt,"path");return gt(n,{d:t,stroke:e||"#666",fill:"none","stroke-width":r}),n},Zn=function(t){const e=fn.createElementNS(Kt,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},fl=function(){const t=fn.createElementNS(Kt,"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 i=fn.createElementNS(Kt,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:r}].forEach((s,a)=>{const o=s.d,l=fn.createElementNS(Kt,"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)),gt(l,c),a===0&&l.setAttribute("stroke-dasharray",(n==null?void 0:n.strokeDasharray)||"8,2");const d=fn.createElementNS(Kt,"path");gt(d,{d:o,stroke:"transparent",fill:"none","stroke-width":"15"}),i.appendChild(d),i.appendChild(l),i[s.name]=l}),i},Hu=function(t,e,r){if(!e)return;const n=fn.createElement("div");t.nodes.appendChild(n);const i=e.innerHTML;n.id="input-box",n.textContent=i,n.contentEditable="plaintext-only",n.spellcheck=!1;const s=e.getBBox();n.style.cssText=`
min-width:${Math.max(88,s.width)}px;
position:absolute;
left:${s.x}px;
top:${s.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=i:r.label=o,n.remove(),o!==i&&(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,i=e.offsetWidth,s=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,k=this.generateMainBranch({pT:r,pL:n,pW:i,pH:s,cT:f,cL:d,cW:p,cH:b,direction:v,containerHeight:this.nodes.offsetHeight}),w=this.theme.palette,M=c.nodeObj.branchColor||w[o%w.length];if(c.style.borderColor=M,this.lines.appendChild(Pu(k,M,"3")),t&&t!==l)continue;const x=Zn("subLines"),A=l.lastChild;A.tagName==="svg"&&A.remove(),l.appendChild(x),qu(this,x,M,l,v,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},qu=function(t,e,r,n,i,s){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,k=v.offsetTop,w=v.offsetLeft,M=v.offsetWidth,x=v.offsetHeight,A=v.firstChild.nodeObj.branchColor||r,N=t.generateSubBranch({pT:l,pL:c,pW:d,pH:f,cT:k,cL:w,cW:M,cH:x,direction:i,isFirst:s});e.appendChild(Pu(N,A,"2"));const _=v.children[1];if(_){if(!_.expanded)continue}else continue;qu(t,e,A,b,i)}},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(jt,"text");gt(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,i.appendChild(l)}),i}function bm(t,e,r,n){var i;let s="";(i=t.nodeObj)!=null&&i.dangerouslySetInnerHTML?s=t.nodeObj.dangerouslySetInnerHTML:t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const a=document.createElementNS(jt,"foreignObject");gt(a,{x:r+parseInt(e.paddingLeft)+"",y:n+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const o=document.createElement("div");return gt(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=s,a.appendChild(o),a}function ym(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:i}=tn(t.nodes,e),s=document.createElementNS(jt,"rect");return gt(s,{x:n+"",y:i+"",rx:r.borderRadius,ry:r.borderRadius,width:r.width,height:r.height,fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.borderWidth}),s}function z0(t,e,r=!1){const n=getComputedStyle(e),{offsetLeft:i,offsetTop:s}=tn(t.nodes,e),a=document.createElementNS(jt,"rect");gt(a,{x:i+"",y:s+"",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(jt,"g");o.appendChild(a);let l;return r?l=bm(e,n,i,s):l=vm(e,n,i,s),o.appendChild(l),o}function wm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:i}=tn(t.nodes,e),s=document.createElementNS(jt,"a"),a=document.createElementNS(jt,"text");return gt(a,{x:n+"",y:i+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,s.appendChild(a),s.setAttribute("href",e.href),s}function xm(t,e){const r=getComputedStyle(e),{offsetLeft:n,offsetTop:i}=tn(t.nodes,e),s=document.createElementNS(jt,"image");return gt(s,{x:n+"",y:i+"",width:r.width+"",height:r.height+"",href:e.src}),s}const F0=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,i;const s=t.nodes,a=s.offsetHeight+F0*2,o=s.offsetWidth+F0*2,l=mm(a+"px",o+"px"),c=document.createElementNS(jt,"svg"),d=document.createElementNS(jt,"rect");gt(d,{x:"0",y:"0",width:`${o}`,height:`${a}`,fill:t.theme.cssVar["--bgcolor"]}),l.appendChild(d),s.querySelectorAll(".subLines").forEach(v=>{const k=v.cloneNode(!0),{offsetLeft:w,offsetTop:M}=tn(s,v.parentElement);k.setAttribute("x",`${w}`),k.setAttribute("y",`${M}`),c.appendChild(k)});const f=(r=s.querySelector(".lines"))==null?void 0:r.cloneNode(!0);f&&c.appendChild(f);const p=(n=s.querySelector(".topiclinks"))==null?void 0:n.cloneNode(!0);p&&c.appendChild(p);const b=(i=s.querySelector(".summary"))==null?void 0:i.cloneNode(!0);return b&&c.appendChild(b),s.querySelectorAll("me-tpc").forEach(v=>{v.nodeObj.dangerouslySetInnerHTML?c.appendChild(z0(t,v,!e)):(c.appendChild(ym(t,v)),c.appendChild(z0(t,v.text,!e)))}),s.querySelectorAll(".tags > span").forEach(v=>{c.appendChild(z0(t,v))}),s.querySelectorAll(".icons > span").forEach(v=>{c.appendChild(z0(t,v))}),s.querySelectorAll(".hyper-link").forEach(v=>{c.appendChild(wm(t,v))}),s.querySelectorAll("img").forEach(v=>{c.appendChild(xm(t,v))}),gt(c,{x:F0+"",y:F0+"",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=i=>{e(i.target.result)},n.onerror=i=>{r(i)},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((i,s)=>{const a=new Ima
`).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+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 ri(t){return t===!1||t==null?t:$.isArray(t)?t.map(ri):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 ws(t,e,r,n,i){if($.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!$.isString(e)){if($.isString(n))return e.indexOf(n)!==-1;if($.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=$.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,s,a){return this[n].call(this,e,i,s,a)},configurable:!0})})}class Ki{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function s(o,l,c){const d=Gn(l);if(!d)throw new Error("header name must be a non-empty string");const f=$.findKey(i,d);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=ri(o))}const a=(o,l)=>$.forEach(o,(c,d)=>s(c,d,l));if($.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if($.isString(e)&&(e=e.trim())&&!P2(e))a($2(e),r);else if($.isObject(e)&&$.isIterable(e)){let o={},l,c;for(const d of e){if(!$.isArray(d))throw TypeError("Object iterator must return a key-value pair");o[c=d[0]]=(l=o[c])?$.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}a(o,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Gn(e),e){const n=$.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return B2(i);if($.isFunction(r))return r.call(this,i,n);if($.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Gn(e),e){const n=$.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||ws(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function s(a){if(a=Gn(a),a){const o=$.findKey(n,a);o&&(!r||ws(n,n[o],o,r))&&(delete n[o],i=!0)}}return $.isArray(e)?e.forEach(s):s(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!e||ws(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const r=this,n={};return $.forEach(this,(i,s)=>{const a=$.findKey(n,s);if(a){r[a]=ri(i),delete r[s];return}const o=e?H2(s):String(s).trim();o!==s&&delete r[s],r[o]=ri(i),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return $.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&$.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(i=>n.set(i)),n}static accessor(e){const n=(this[Il]=this[Il]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=Gn(a);n[o]||(q2(i,a),n[o]=!0)}return $.isArray(e)?e.forEach(s):s(e),this}}Ki.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);$.reduceDescriptors(Ki.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});$.freezeMethods(Ki);const ir=Ki;function xs(t,e){const r=this||ro,n=e||r,i=ir.from(n.headers);let s=n.data;return $.forEach(t,function(o){s=o.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}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"}$.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 i=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=n[s];a||(a=c),r[i]=l,n[i]=c;let f=s,p=0;for(;f!==i;)p+=r[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+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,i,s;const a=(c,d=Date.now())=>{r=d,i=null,s&&(clearTimeout(s),s=null),t(...c)};return[(...c)=>{const d=Date.now(),f=d-r;f>=n?a(c,d):(i=c,s||(s=setTimeout(()=>{s=null,a(i)},n-f)))},()=>i&&a(i)]}const xi=(t,e,r=3)=>{let n=0;const i=U2(50,250);return V2(s=>{const a=s.loaded,o=s.lengthComputable?s.total:void 0,l=a-n,c=i(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:s,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)=>$.asap(()=>t(...e)),W2=kt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,kt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(kt.origin),kt.navigator&&/(msie|trident)/i.test(kt.navigator.userAgent)):()=>!0,G2=kt.hasStandardBrowserEnv?{write(t,e,r,n,i,s){const a=[t+"="+encodeURIComponent(e)];$.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),$.isString(n)&&a.push("path="+n),$.isString(i)&&a.push("domain="+i),s===!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 ir?{...t}:t;function mn(t,e){e=e||{};const r={};function n(c,d,f,p){return $.isPlainObject(c)&&$.isPlainObject(d)?$.merge.call({caseless:p},c,d):$.isPlainObject(d)?$.merge({},d):$.isArray(d)?d.slice():d}function i(c,d,f,p){if($.isUndefined(d)){if(!$.isUndefined(c))return n(void 0,c,f,p)}else return n(c,d,f,p)}function s(c,d){if(!$.isUndefined(d))return n(void 0,d)}function a(c,d){if($.isUndefined(d)){if(!$.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:s,method:s,data:s,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
`+s.map($l).join(`
`):" "+$l(s[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:aa};function ks(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Pn(null,t)}function Bl(t){return ks(t),t.headers=ir.from(t.headers),t.data=xs.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),k1.getAdapter(t.adapter||ro.adapter)(t).then(function(n){return ks(t),n.data=xs.call(t,t.transformResponse,n),n.headers=ir.from(n.headers),n},function(n){return g1(n)||(ks(t),n&&n.response&&(n.response.data=xs.call(t,t.transformResponse,n.response),n.response.headers=ir.from(n.response.headers))),Promise.reject(n)})}const S1="1.11.0",Xi={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Xi[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Pl={};Xi.transitional=function(e,r,n){function i(s,a){return"[Axios v"+S1+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,o)=>{if(e===!1)throw new Ne(i(a," has been removed"+(r?" in "+r:"")),Ne.ERR_DEPRECATED);return r&&!Pl[a]&&(Pl[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,o):!0}};Xi.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 i=n.length;for(;i-- >0;){const s=n[i],a=e[s];if(a){const o=t[s],l=o===void 0||a(o,s,t);if(l!==!0)throw new Ne("option "+s+" must be "+l,Ne.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ne("Unknown option "+s,Ne.ERR_BAD_OPTION)}}const ni={assertOptions:c3,validators:Xi},lr=ni.validators;class Si{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 i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=mn(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&ni.assertOptions(n,{silentJSONParsing:lr.transitional(lr.boolean),forcedJSONParsing:lr.transitional(lr.boolean),clarifyTimeoutError:lr.transitional(lr.boolean)},!1),i!=null&&($.isFunction(i)?r.paramsSerializer={serialize:i}:ni.assertOptions(i,{encode:lr.function,serialize:lr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ni.assertOptions(r,{baseUrl:lr.spelling("baseURL"),withXsrfToken:lr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&$.merge(s.common,s[r.method]);s&&$.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),r.headers=ir.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(r)===!1||(l=l&&k.synchronous,o.unshift(k.fulfilled,k.rejected))});const c=[];this.interceptors.response.forEach(function(k){c.push(k.fulfilled,k.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++],k=o[f++];try{b=v(b)}catch(w){k.call(this,w);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=mn(this.defaults,e);const r=b1(e.baseURL,e.url,e.allowAbsoluteUrls);return f1(r,e.params,e.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(e){Si.prototype[e]=function(r,n){return this.request(mn(n||{},{method:e,url:r,data:(n||{}).data}))}});$.forEach(["post","put","patch"],function(e){function r(n){return function(s,a,o){return this.request(mn(o||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Si.prototype[e]=r(),Si.prototype[e+"Form"]=r(!0)});const ii=Si;class no{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{n.subscribe(o),s=o}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},e(function(s,a,o){n.reason||(n.reason=new Pn(s,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 no(function(i){e=i}),cancel:e}}}const u3=no;function d3(t){return function(r){return t.apply(null,r)}}function h3(t){return $.isObject(t)&&t.isAxiosError===!0}const oa={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)))/,Ji=/[\p{P}\p{S}]/u,uo=/[\s\p{P}\p{S}]/u,D1=/[^\s\p{P}\p{S}]/u,R3=je(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,uo).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,Ji).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,uo).replace(/punct/g,Ji).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,uo).replace(/punct/g,Ji).getRegex(),P3=je(/\\(punct)/,"gu").replace(/punct/g,Ji).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(lo).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(),Ti=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,U3=je(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ti).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),O1=je(/^!?\[(label)\]\[(ref)\]/).replace("label",Ti).replace("ref",oo).getRegex(),L1=je(/^!?\[(ref)\](?:\[\])?/).replace("ref",oo).getRegex(),V3=je("reflink|nolink(?!\\()","g").replace("reflink",O1).replace("nolink",L1).getRegex(),ho={_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={...ho,link:je(/^!?\[(label)\]\((.*?)\)/).replace("label",Ti).getRegex(),reflink:je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ti).getRegex()},la={...ho,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={...la,br:je(N1).replace("{2,}","*").getRegex(),text:je(la.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$0={normal:co,gfm:E3,pedantic:C3},Kn={normal:ho,gfm:la,breaks:G3,pedantic:W3},K3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"
`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=i.length?s.slice(i.length):s}).join(`
`)}var Ai=class{constructor(t){Ge(this,"options");Ge(this,"rules");Ge(this,"lexer");this.options=t||bn}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="",i="",s=[];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,i=i?`${i}
${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=f,r.length===0)break;let p=s.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(`
`),k=this.blockquote(v);s[s.length-1]=k,n=n.substring(0,n.length-b.raw.length)+k.raw,i=i.substring(0,i.length-b.text.length)+k.text;break}else if((p==null?void 0:p.type)==="list"){let b=p,v=b.raw+`
`+r.join(`
`),k=this.list(v);s[s.length-1]=k,n=n.substring(0,n.length-p.raw.length)+k.raw,i=i.substring(0,i.length-b.raw.length)+k.raw,r=v.substring(s.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,i={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 s=this.rules.other.listItemRegex(r),a=!1;for(;t;){let l=!1,c="",d="";if(!(e=s.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),x=this.rules.other.hrRegex(v),A=this.rules.other.fencesBeginRegex(v),N=this.rules.other.headingBeginRegex(v),_=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," "),A.test(p)||N.test(p)||_.test(p)||M.test(p)||x.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||A.test(f)||N.test(f)||x.test(f))break;d+=`
`+p}!b&&!p.trim()&&(b=!0),c+=O+`
`,t=t.substring(O.length+1),f=z.slice(v)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let k=null,w;this.options.gfm&&(k=this.rules.other.listIsTask.exec(d),k&&(w=k[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!k,checked:w,loose:!1,text:d,tokens:[]}),i.raw+=c}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;l<i.items.length;l++)if(this.lexer.state.top=!1,i.items[l].tokens=this.lexer.blockTokens(i.items[l].text,[]),!i.loose){let c=i.items[l].tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=d}if(i.loose)for(let l=0;l<i.items.length;l++)i.items[l].loose=!0;return i}}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"):"",i=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:i}}}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("|"),i=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<r.length;o++)s.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:s.align[o]});for(let o of i)s.rows.push(Ul(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}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 s=Yn(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=Y3(e[2],"()");if(s===-2)return;if(s>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],i=s[3])}else i=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:i&&i.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," "),i=e[n.toLowerCase()];if(!i){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return Vl(r,i,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 i=[...n[0]].length-1,s,a,o=i,l=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(n=c.exec(e))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(a=[...s].length,n[3]||n[4]){o+=a;continue}else if((n[5]||n[6])&&i%3&&!((i+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,i+n.index+d+a);if(Math.min(i,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),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(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,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let s;do s=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(s!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,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 ca{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 i,s,a;for(this.options.pedantic&&(e=e.replace(Mt.tabCharGlobal," ").replace(Mt.spaceLine,""));e;){let o;if((s=(i=this.options.extensions)==null?void 0:i.block)!=null&&s.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,i=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)d.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!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(k=>{v=k.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)),s=!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}},Ei=class{constructor(t){Ge(this,"options");Ge(this,"parser");this.options=t||bn}space(t){return""}code({text:t,lang:e,escaped:r}){var s;let n=(s=(e||"").match(Mt.notSpaceStart))==null?void 0:s[0],i=t.replace(Mt.endingNewline,"")+`
`;return n?'<pre><code class="language-'+cr(n)+'">'+(r?i:cr(i,!0))+`</code></pre>
`:"<pre><code>"+(r?i:cr(i,!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 i=e?"ol":"ul",s=e&&r!==1?' start="'+r+'"':"";return"<"+i+s+`>
`+n+"</"+i+`>
`}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+" "+cr(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 i=0;i<t.header.length;i++)r+=this.tablecell(t.header[i]);e+=this.tablerow({text:r});let n="";for(let i=0;i<t.rows.length;i++){let s=t.rows[i];r="";for(let a=0;a<s.length;a++)r+=this.tablecell(s[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>${cr(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),i=jl(t);if(i===null)return n;t=i;let s='<a href="'+t+'"';return e&&(s+=' title="'+cr(e)+'"'),s+=">"+n+"</a>",s}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=jl(t);if(i===null)return cr(r);t=i;let s=`<img src="${t}" alt="${r}"`;return e&&(s+=` title="${cr(e)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:cr(t.text)}},fo=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 ua{constructor(e){Ge(this,"options");Ge(this,"renderer");Ge(this,"textRenderer");this.options=e||bn,this.options.renderer=this.options.renderer||new Ei,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fo}static parse(e,r){return new ua(r).parse(e)}static parseInline(e,r){return new ua(r).parseInline(e)}parse(e,r=!0){var i,s;let n="";for(let a=0;a<e.length;a++){let o=e[a];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[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 i,s;let n="";for(let a=0;a<e.length;a++){let o=e[a];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[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}},$s,si=($s=class{constructor(t){Ge(this,"options");Ge(this,"block");this.options=t||bn}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($s,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),$s),Z3=class{constructor(...t){Ge(this,"defaults",io());Ge(this,"options",this.setOptions);Ge(this,"parse",this.parseMarkdown(!0));Ge(this,"parseInline",this.parseMarkdown(!1));Ge(this,"Parser",Mr);Ge(this,"Renderer",Ei);Ge(this,"TextRenderer",fo);Ge(this,"Lexer",Cr);Ge(this,"Tokenizer",Ai);Ge(this,"Hooks",si);this.use(...t)}walkTokens(t,e){var n,i;let r=[];for(let s of t)switch(r=r.concat(e.call(this,s)),s.type){case"table":{let a=s;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=s;r=r.concat(this.walkTokens(a.items,e));break}default:{let a=s;(i=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&i[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(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new Ei(this.defaults);for(let s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=r.renderer[a],l=i[a];i[a]=(...c)=>{let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Ai(this.defaults);for(let s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=r.tokenizer[a],l=i[a];i[a]=(...c)=>{let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new si;for(let s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' 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>"+cr(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},gn=new Z3;function qe(t,e){return gn.parse(t,e)}qe.options=qe.setOptions=function(t){return gn.setOptions(t),qe.defaults=gn.defaults,A1(qe.defaults),qe};qe.getDefaults=io;qe.defaults=bn;qe.use=function(...t){return gn.use(...t),qe.defaults=gn.defaults,A1(qe.defaults),qe};qe.walkTokens=function(t,e){return gn.walkTokens(t,e)};qe.parseInline=gn.parseInline;qe.Parser=Mr;qe.parser=Mr.parse;qe.Renderer=Ei;qe.TextRenderer=fo;qe.Lexer=Cr;qe.lexer=Cr.lex;qe.Tokenizer=Ai;qe.Hooks=si;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 J3(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function b8(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 i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{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 i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,a={},o={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function x(A){return A instanceof l?new l(A.type,x(A.content),A.alias):Array.isArray(A)?A.map(x):A.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(x){return Object.prototype.toString.call(x).slice(8,-1)},objId:function(x){return x.__id||Object.defineProperty(x,"__id",{value:++s}),x.__id},clone:function x(A,N){N=N||{};var _,O;switch(o.util.type(A)){case"Object":if(O=o.util.objId(A),N[O])return N[O];_={},N[O]=_;for(var z in A)A.hasOwnProperty(z)&&(_[z]=x(A[z],N));return _;case"Array":return O=o.util.objId(A),N[O]?N[O]:(_=[],N[O]=_,A.forEach(function(Y,W){_[W]=x(Y,N)}),_);default:return A}},getLanguage:function(x){for(;x;){var A=i.exec(x.className);if(A)return A[1].toLowerCase();x=x.parentElement}return"none"},setLanguage:function(x,A){x.className=x.className.replace(RegExp(i,"gi"),""),x.classList.add("language-"+A)},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(_){var x=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(_.stack)||[])[1];if(x){var A=document.getElementsByTagName("script");for(var N in A)if(A[N].src==x)return A[N]}return null}},isActive:function(x,A,N){for(var _="no-"+A;x;){var O=x.classList;if(O.contains(A))return!0;if(O.contains(_))return!1;x=x.parentElement}return!!N}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(x,A){var N=o.util.clone(o.languages[x]);for(var _ in A)N[_]=A[_];return N},insertBefore:function(x,A,N,_){_=_||o.languages;var O=_[x],z={};for(var Y in O)if(O.hasOwnProperty(Y)){if(Y==A)for(var W in N)N.hasOwnProperty(W)&&(z[W]=N[W]);N.hasOwnProperty(Y)||(z[Y]=O[Y])}var he=_[x];return _[x]=z,o.languages.DFS(o.languages,function(pe,Ae){Ae===he&&pe!=x&&(this[pe]=z)}),z},DFS:function x(A,N,_,O){O=O||{};var z=o.util.objId;for(var Y in A)if(A.hasOwnProperty(Y)){N.call(A,Y,A[Y],_||Y);var W=A[Y],he=o.util.type(W);he==="Object"&&!O[z(W)]?(O[z(W)]=!0,x(W,N,null,O)):he==="Array"&&!O[z(W)]&&(O[z(W)]=!0,x(W,N,Y,O))}}},plugins:{},highlightAll:function(x,A){o.highlightAllUnder(document,x,A)},highlightAllUnder:function(x,A,N){var _={callback:N,container:x,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",_),_.elements=Array.prototype.slice.apply(_.container.querySelectorAll(_.selector)),o.hooks.run("before-all-elements-highlight",_);for(var O=0,z;z=_.elements[O++];)o.highlightElement(z,A===!0,_.callback)},highlightElement:function(x,A,N){var _=o.util.getLanguage(x),O=o.languages[_];o.util.setLanguage(x,_);var z=x.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(z,_);var Y=x.textContent,W={element:x,language:_,grammar:O,code:Y};function he(Ae){W.highlightedCode=Ae,o.hooks.run("before-insert",W),W.element.innerHTML=W.highlightedCode,o.hooks.run("after-highlight",W),o.hooks.run("complete",W),N&&N.call(W.element)}if(o.hooks.run("before-sanity-check",W),z=W.element.parentElement,z&&z.nodeName.toLowerCase()==="pre"&&!z.hasAttribute("tabindex")&&z.setAttribute("tabindex","0"),!W.code){o.hooks.run("complete",W),N&&N.call(W.element);return}if(o.hooks.run("before-highlight",W),!W.grammar){he(o.util.encode(W.code));return}if(A&&n.Worker){var pe=new Worker(o.filename);pe.onmessage=function(Ae){he(Ae.data)},pe.postMessage(JSON.stringify({language:W.language,code:W.code,immediateClose:!0}))}else he(o.highlight(W.code,W.grammar,W.language))},highlight:function(x,A,N){var _={code:x,grammar:A,language:N};if(o.hooks.run("before-tokenize",_),!_.grammar)throw new Error('The language "'+_.language+'" has no grammar.');return _.tokens=o.tokenize(_.code,_.grammar),o.hooks.run("after-tokenize",_),l.stringify(o.util.encode(_.tokens),_.language)},tokenize:function(x,A){var N=A.rest;if(N){for(var _ in N)A[_]=N[_];delete A.rest}var O=new f;return p(O,
`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(W+1))}M.textContent=O,r.highlightElement(M)},function(O){w.setAttribute(o,d),M.textContent=O})}}),r.plugins.fileHighlight={highlight:function(w){for(var M=(w||document).querySelectorAll(f),x=0,A;A=M[x++];)r.highlightElement(A)}};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=J3(Q3);class $t{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 $t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class Yt{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 Yt(r,$t.range(this,e))}}class ee{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,i,s,a=r&&r.loc;if(a&&a.start<=a.end){var o=a.lexer.input;i=a.start,s=a.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,s).replace(/[^]/g,"$&̲"),c;i>15?c="…"+o.slice(i-15,i):c=o.slice(0,i);var d;s+15<o.length?d=o.slice(s,s+15)+"…":d=o.slice(s),n+=c+l+d}var f=new Error(n);return f.name="ParseError",f.__proto__=ee.prototype,f.position=i,i!=null&&s!=null&&(f.length=s-i),f.rawMessage=e,f}}ee.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()},i6={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},s6=/[&><"']/g;function a6(t){return String(t).replace(s6,e=>i6[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"},ye={contains:e6,deflt:t6,escape:a6,hyphenate:n6,getBaseElem:F1,isCharacterBox:o6,protocolFromUrl:c6},ai={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 i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
H742v`+i+`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 i="";switch(e){case"sqrtMain":i=b6(r,Tn);break;case"sqrtSize1":i=y6(r,Tn);break;case"sqrtSize2":i=w6(r,Tn);break;case"sqrtSize3":i=x6(r,Tn);break;case"sqrtSize4":i=k6(r,Tn);break;case"sqrtTall":i=T6(r,Tn,n)}return i},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 ye.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 pe=0;pe<z;pe++){var Ae=new Xr(A[pe]),st=new _r([Ae],{width:"400em",height:ae(O),viewBox:"0 0 "+o+" "+_,preserveAspectRatio:W[pe]+" slice"}),Ze=L.makeSvgSpan([Y[pe]],[st],r);if(z===1)return{span:Ze,minWidth:N,height:O};Ze.style.height=ae(O),M.push(Ze)}return{span:L.makeSpan(["stretchy"],M,r),minWidth:N,height:O}}}var{span:i,minWidth:s,height:a}=n();return i.height=a,i.style.height=ae(a),s>0&&(i.style.minWidth=ae(s)),i},h5=function(e,r,n,i,s){var a,o=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(a=L.makeSpan(["stretchy",r],[],s),r==="fbox"){var l=s.color&&s.getColor();l&&(a.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new fa({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new fa({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],s)}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 xo(t){var e=ts(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 ts(t){return t&&(t.type==="atom"||F6.hasOwnProperty(t.type))?t:null}var ko=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=Re(t.base,"accent"),r=n.base,t.base=r,i=L6(Be(t,e)),t.base=n):(n=Re(t,"accent"),r=n.base);var s=Be(r,e.havingCrampedStyle()),a=n.isShifty&&ye.isCharacterBox(r),o=0;if(a){var l=ye.getBaseElem(r),c=Be(l,e.havingCrampedStyle());o=Jl(c).skew}var d=n.label==="\\c",f=d?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=Lr.svgSpan(n,e),p=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{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=Jl(b),b.italic=0,v=b.width,d&&(f+=b.depth)),p=L.makeSpan(["accent-body"],[b]);var k=n.label==="\\textcircled";k&&(p.classes.push("accent-full"),f=s.height);var w=o;k||(w-=v/2),p.style.left=ae(w),n.label==="\\textcircled"&&(p.style.top=".2em"),p=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-f},{type:"elem",elem:p}]},e)}var M=L.makeSpan(["mord","accent"],[p],e);return i?(i.children[0]=M,i.height=Math.max(M.height,i.height),i.classes[0]="mord",i):M},Q1=(t,e)=>{var r=t.isStretchy?Lr.mathMLnode(t.label):new Q.MathNode("mo",[Zt(t.label,t.mode)]),n=new Q.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=Ri(e[0]),n=!f5.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:ko,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:ko,mathmlBuilder:Q1});oe({type:"accentUnder",names:["\\underleftarrow","\\u
]`,P5="\\\\[a-zA-Z@]+",H5="\\\\[^\uD800-\uDFFF]",q5="("+P5+")"+Ed+"*",j5=`\\\\(
|[ \r ]+
?)[ \r ]*`,ya="[̀-ͯ]",U5=new RegExp(ya+"+$"),V5="("+Ed+"+)|"+(j5+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ya+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ya+"*")+"|\\\\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 Yt("EOF",new $t(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new ee("Unexpected character: '"+e[r]+"'",new Yt(e[r],new $t(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var s=e.indexOf(`
`,this.tokenRegex.lastIndex);return s===-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=s+1,this.lex()}return new Yt(i,new $t(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 ee("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 i=0;i<this.undefStack.length;i++)delete this.undefStack[i][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[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 ee("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=Tc[e.text],n==null||n>=r)throw new ee("Invalid base-"+r+" digit "+e.text);for(var i;(i=Tc[t.future().text])!=null&&i<r;)n*=r,n+=i,t.popToken()}return"\\@char{"+n+"}"});var Do=(t,e,r,n)=>{var i=t.consumeArg().tokens;if(i.length!==1)throw new ee("\\newcommand's first argument must be a macro name");var s=i[0].text,a=t.isDefined(s);if(a&&!e)throw new ee("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!r)throw new ee("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(i=t.consumeArg().tokens,i.length===1&&i[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 ee("Invalid number of arguments: "+l);o=parseInt(l),i=t.consumeArg().tokens}return a&&n||t.macros.set(s,{tokens:i,numArgs:o}),""};g("\\newcommand",t=>Do(t,!1,!0,!1));g("\\renewcommand",t=>Do(t,!0,!1,!1));g("\\providecommand",t=>Do(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:i}}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 s=U5.exec(r);s&&(r=r.substring(0,s.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var a;if(Qe[this.mode][r]){this.settings.strict&&this.mode==="math"&&pa.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=$t.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:$t.range(e),text:r};else return null;if(this.consume(),s)for(var f=0;f<s[0].length;f++){var p=s[0][f];if(!Fs[p])throw new ee("Unknown accent ' "+p+"'",e);var b=Fs[p][this.mode]||Fs[p].text;if(!b)throw new ee("Accent "+p+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:$t.range(e),label:b,isStretchy:!1,isShifty:!0,base:a}}return a}}ss.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Io=function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new ss(e,r);delete n.gullet.macros.current["\\df@tag"];var i=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 ee("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new Yt("\\df@tag")])}]}return i},Dd=function(e,r,n){r.textContent="";var i=_o(e,n).toNode();r.appendChild(i)};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 ee("KaTeX doesn't work in quirks mode.")});var Y5=function(e,r){var n=_o(e,r).toMarkup();return n},X5=function(e,r){var n=new po(r);return Io(e,n)},Rd=function(e,r,n){if(n.throwOnError||!(e instanceof ee))throw e;var i=L.makeSpan(["katex-error"],[new Xt(r)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},_o=function(e,r){var n=new po(r);try{var i=Io(e,n);return s5(i,e,n)}catch(s){return Rd(s,e,n)}},Z5=function(e,r){var n=new po(r);try{var i=Io(e,n);return a5(i,e,n)}catch(s){return Rd(s,e,n)}},J5="0.16.22",Q5={Span:A0,Anchor:vo,SymbolNode:Xt,SvgNode:_r,PathNode:Xr,LineNode:fa},Mc={version:J5,render:Dd,renderToString:Y5,ParseError:ee,SETTINGS_SCHEMA:ai,__parse:X5,__renderToDomTree:_o,__renderToHTMLTree:Z5,__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 i=(t.match(/\|/g)||[]).length,s=i>=6;return r&&n||r&&s||r&&i>=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)),K0=t=>!t||typeof t!="string"?t||"":n7(t)||t.includes("|")?wa(t):t;const Oo=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},i7={class:"mindmap-container"},s7={class:"zoom-level"},a7={key:0,class:"welcome-page"},o7={class:"ai-input-content"},l7=["disabled","onKeydown"],c7={class:"ai-input-actions"},u7=["disabled"],d7=["disabled"],h7={key:0},f7={key:1},p7={key:3,class:"save-controls"},m7={__name:"MindMap",setup(t,{expose:e}){const r=ze(null),n=ze(null),i=ze(null),s=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 k=()=>{c.value=!0,r.value&&(r.value.innerHTML=""),n.value&&(n.value=null)},w=()=>{c.value=!1},M=()=>{c.value=!1},x=()=>{if(!n.value||!r.value)return null;try{const y=r.value.querySelector("canvas");if(y)return{transform:y.style.transform}}catch(y){console.warn("保存位置失败:",y)}return null},A=y=>{if(!(!y||!r.value))try{const E=r.value.querySelector("canvas");E&&y.transform&&(E.style.transform=y.transform)}catch(E){console.warn("恢复位置失败:",E)}},N=async(y,E=!1)=>{try{const I=E?x():null;console.log("🔍 loadMindmapData 被调用,数据:",y),console.log("🔍 数据字段:",Object.keys(y||{})),y&&y.id?(o.value=y.id,console.log("🔍 设置当前思维导图ID (data.id):",y.id)):y&&y.mindmapId?(o.value=y.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",y.mindmapId)):y&&y.nodeData&&y.nodeData.mindmapId?(o.value=y.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",y.nodeData.mindmapId)):y&&y.nodeData&&y.nodeData.mindmap_id?(o.value=y.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",y.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(y||{})),y&&y.nodeData&&console.log("🔍 nodeData字段:",Object.keys(y.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",o.value),w(),await X0(),r.value||(console.warn("⚠️ 思维导图容器未准备好等待DOM更新..."),await new Promise(H=>setTimeout(H,100)),r.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(r.value){console.log("🔍 创建Mind Elixir实例设置markdown函数"),n.value=new bt({el:r.value,direction:bt.RIGHT,draggable:!0,contextMenu:!0,toolBar:!0,nodeMenu:!1,keypress:!0,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(U,ne)=>{if(console.log("🔍 Mind Elixir markdown函数被调用:",U.substring(0,100)+"..."),U.includes("|")||U.includes("**")||U.includes("`")||U.includes("#")){console.log("🎨 检测到markdown内容开始渲染:",U.substring(0,100)+"...");const B=K0(U);return console.log("🎨 渲染结果:",B.substring(0,200)+"..."),B}return console.log("🔍 内容不包含markdown语法返回原文本"),U}}),console.log(" Mind Elixir实例创建完成markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",y);const H=n.value.init(y);console.log(" Mind Elixir实例创建成功初始化结果:",H)}else{console.warn(" 容器未准备好延迟创建Mind Elixir实例..."),setTimeout(()=>{if(r.value){n.value=new bt({el:r.value,direction:bt.RIGHT,draggable:!0,contextMenu:!0,toolBar:!0,nodeMenu:!1,keypress:!0,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,markdown:(U,ne)=>U.includes("|")||U.includes("**")||U.includes("`")||U.includes("#")?K0(U):U});const H=n.value.init(y);console.log("✅ Mind Elixir实例延迟创建成功"),setTimeout(()=>{E&&I?A(I):O(),K(),_()},300)}},200);
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(be));const ue=ne.data.des;ue.length>150?(be.textContent=ue.substring(0,150)+"...",be.title=ue):be.textContent=ue}})},1e3)},O=()=>{try{const y=r.value;if(!y)return;const E=y.querySelector(".map-canvas");if(!E)return;const I=E.querySelectorAll("me-tpc");if(I.length===0)return;let H=1/0,U=-1/0,ne=1/0,B=-1/0;I.forEach(C0=>{const wn=C0.getBoundingClientRect(),M0=y.getBoundingClientRect(),Lo=wn.left-M0.left,zo=wn.top-M0.top;H=Math.min(H,Lo),U=Math.max(U,Lo+wn.width),ne=Math.min(ne,zo),B=Math.max(B,zo+wn.height)});const be=(H+U)/2,ue=(ne+B)/2,ke=y.clientWidth/2,Fe=y.clientHeight/2,_e=ke-be,et=Fe-ue;E.style.transform=`translate(${_e}px, ${et}px)`,E.style.opacity="1",E.style.transition="opacity 0.3s ease";const mt=100,It=Math.max(_e,mt),yr=Math.max(et,mt);E.style.transform=`translate(${It}px, ${yr}px)`,E.style.opacity="1",E.style.visibility="visible"}catch{}},z=()=>{if(!i.value)return;if(n.value&&n.value.getNodeById)try{const E=n.value.getNodeById(i.value.id);if(E){const I=E.getBoundingClientRect(),H=r.value.getBoundingClientRect(),U=I.left-H.left+I.width/2,ne=I.bottom-H.top+10;s.value={left:`${U}px`,top:`${ne}px`};return}}catch{}let y=document.querySelector(`[data-id="${i.value.id}"]`);if(y||(y=document.querySelector(`.topic[data-id="${i.value.id}"]`)),y||(y=document.querySelector(`[data-node-id="${i.value.id}"]`)),y||(y=document.querySelector(`[data-nodeid="me${i.value.id}"]`)),!y){const E=document.querySelectorAll("me-tpc");for(const I of E)if(I.getAttribute("data-nodeid")===`me${i.value.id}`){y=I;break}}if(!y){const E=document.querySelectorAll(".topic");for(const I of E)if(I.textContent.trim()===i.value.topic){y=I;break}}if(!y){const E=document.querySelectorAll("*");for(const I of E)if(I.textContent&&I.textContent.trim()===i.value.topic){if(I.tagName==="ME-TPC"){y=I;break}if(I.closest("me-tpc")){y=I;break}if(I.classList.contains("topic")||I.closest(".topic")){y=I.closest(".topic")||I;break}}}if(y){const E=y.getBoundingClientRect(),I=r.value.getBoundingClientRect(),H=E.left-I.left+E.width/2,U=E.bottom-I.top+10;s.value={left:`${H}px`,top:`${U}px`}}else s.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},Y=async()=>{i.value&&(await Ce(i.value),i.value=null)},W=async()=>{i.value&&(await me(i.value),i.value=null)},he=async()=>{i.value&&(await de(i.value),i.value=null)},pe=async()=>{if(!i.value)return;console.log("Ask AI for node:",i.value);const y=parseFloat(s.value.left)||0,E=parseFloat(s.value.top)||0;a.value={left:`${y}px`,top:`${E+60}px`,transform:"translateX(-50%)"},f.value=!0,p.value=i.value},Ae=()=>{f.value=!1,p.value=null,b.value="",v.value=!1,i.value=null},st=y=>{if(!y)return"";const E=[];return y.parent&&y.parent.topic&&E.push(`父节点: ${y.parent.topic}`),y.parent&&y.parent.parent&&y.parent.parent.topic&&E.push(`祖父节点: ${y.parent.parent.topic}`),E.join(" | ")},Ze=y=>{y.ctrlKey||y.metaKey||(y.preventDefault(),tt())},tt=async()=>{if(!(!b.value.trim()||!p.value||v.value)){v.value=!0;try{const y="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",E=`节点信息
当前节点${p.value.topic}
上下文${st(p.value)}
用户问题${b.value}
请给出详细的回答回答应该
1. 直接回答用户的问题
2. 提供具体的建议或改进方案
3. 保持专业和有用的语调
4. 回答长度适中便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:y,userPrompt:E});const I=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:y,user_prompt:E,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!I.ok)throw new Error(`HTTP error! status: ${I.status}`);let H="";const U=I.body.getReader(),ne=new TextDecoder;let B="";for(;;){const{done:be,value:ue}=await U.read();if(be)break;B+=ne.decode(ue,{stream:!0});const ke=B.split(`
`);B=ke.pop()||"";for(const Fe of ke)if(Fe.startsWith("data: "))try{const _e=JSON.parse(Fe.slice(6));if(_e.type==="chunk")H+=_e.content;else if(_e.type==="error")throw new Error(_e.content)}catch(_e){console.warn("解析流式数据失败:",_e)}}await Ee(p.value,b.value,H),Ae()}catch(y){console.error("AI请求失败:",y),alert("AI请求失败请稍后重试")}finally{v.value=!1}}},$e=y=>y.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(E,I)=>{if(I.includes(":")){const H=I.split(":");if(H.length>1)return`${H[0]}: ${H.slice(1).join(":")}`}return`${I}`}).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,`
`),Oe=(y,E,I)=>{const H=y.split(`
`);let U=I,ne=[];for(let B=0;B<H.length;B++){const ue=H[B].trim(),ke=ue.match(/^[-*+]\s*【(.+)】/);if(ke){const Fe=ke[1].trim(),_e={id:`node_${U++}`,topic:Fe,children:[],level:(E.level||0)+1,data:{}};let et=[],mt=B+1;for(;mt<H.length;){const It=H[mt].trim();if(It.match(/^[-*+]\s*【(.+)】/))break;const C0=It.match(/^[-*+]\s+(.+)$/);if(C0){const wn=C0[1].trim(),M0=$e(wn);et.push("• "+M0)}mt++}if(et.length>0){const It=$e(et.join(`
`));_e.topic=_e.topic+`
`+It}E.children.push(_e),B=mt-1}else ue&&ne.push(ue)}if(ne.length>0){const B=ne.join(`
`).trim();B&&B.split(`
`).filter(ue=>ue.trim()).forEach(ue=>{const ke=$e(ue.trim());if(ke){const Fe={id:`node_${U++}`,topic:ke,children:[],level:(E.level||0)+1,data:{}};E.children.push(Fe)}})}return{nodeCounter:U}},ve=y=>{const E=y.split(`
`);let I=null;const H=[];let U=0,ne=[];if(E.forEach((B,be)=>{const ue=B.trim(),ke=ue.match(/^(#{1,6})\s+(.+)$/);if(ke){if(ne.length>0&&H.length>0){const It=ne.join(`
`).trim();It&&(U=Oe(It,H[H.length-1],U).nodeCounter),ne=[]}const Fe=ke[1].length,_e=ke[2].trim(),et=$e(_e),mt={id:`node_${U++}`,topic:et,children:[],level:Fe,data:{}};if(Fe===1&&!I)I=mt,H.length=0,H.push(I);else{for(;H.length>1&&H[H.length-1].level>=Fe;)H.pop();H.length>0&&H[H.length-1].children.push(mt),H.push(mt)}}else ue&&ne.push(ue)}),ne.length>0&&H.length>0){const B=ne.join(`
`).trim();B&&(U=Oe(B,H[H.length-1],U).nodeCounter)}return I||(I={id:"root",topic:"根节点",children:[],data:{}}),I},Ee=async(y,E,I)=>{var H,U,ne;try{const be=(yr=>yr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
`).trim())(I),ue=`# ${E}
${be}`,ke=ve(ue),Fe={title:E,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:y.id,isRoot:!1},_e=[];if(ke.children&&ke.children.length>0&&ke.children.forEach(yr=>{_e.push({title:yr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",o.value),!o.value)throw new Error("没有找到当前思维导图ID无法创建节点");const et=await nt.addNodes(o.value,[Fe]);if(!et.data||!et.data.success)throw new Error("AI父节点创建失败");const mt=(ne=(U=(H=et.data.data)==null?void 0:H.nodes)==null?void 0:U[0])==null?void 0:ne.id;if(!mt)throw new Error("无法获取创建的父节点ID");_e.forEach(yr=>{yr.parentId=mt});let It=null;if(_e.length>0&&(It=await nt.addNodes(o.value,_e)),et.data&&et.data.success)await ge();else throw new Error("AI父节点创建失败")}catch(B){console.error("创建AI节点失败:",B),alert("创建AI回答节点失败: "+B.message)}},rt=async()=>{if(i.value){try{const y=i.value.topic||i.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(y),Ve();else{const E=document.createElement("textarea");E.value=y,E.style.position="fixed",E.style.left="-999999px",E.style.top="-999999px",document.body.appendChild(E),E.focus(),E.select();const I=document.execCommand("copy");document.body.removeChild(E),I?Ve():Ie()}}catch{Ie()}i.value=null}},Ve=()=>{const y=document.createElement("div");y.textContent="文本已复制到剪贴板",y.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(y),setTimeout(()=>{y.parentNode&&y.parentNode.removeChild(y),E.parentNode&&E.parentNode.removeChild(E)},3e3)},Ie=()=>{const y=document.createElement("div");y.textContent="复制失败,请手动复制",y.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(y),setTimeout(()=>{y.parentNode&&y.parentNode.removeChild(y)},3e3)},Rt=()=>{const y=document.createElement("div");y.textContent="✅ 节点编辑已保存",y.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(y),setTimeout(()=>{y.parentNode&&y.parentNode.removeChild(y)},2e3)},pt=()=>{const y=document.createElement("div");y.textContent="❌ 节点编辑保存失败",y.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(y),setTimeout(()=>{y.parentNode&&y.parentNode.removeChild(y)},3e3)},j=async y=>{try{const E=y.obj,I=y.toObj,H=y.originParentId;if(E&&I){const U=E,ne=I.id;await se(U,ne)}}catch{}},G=async y=>{try{const E=y.obj;E?await te(E):console.error("无法解析编辑操作:",y)}catch(E){console.error("处理编辑完成失败:",E)}},te=async y=>{var E,I;try{if(!o.value){console.error("无法获取思维导图ID");return}const H=await nt.updateNode(y.id,{newTitle:y.topic,newDes:((E=y.data)==null?void 0:E.des)||"",newParentId:y.parentId||((I=y.parent)==null?void 0:I.id)});H.data&&H.data.success?Rt():(console.error("更新节点编辑失败:",H.data),pt())}catch(H){console.error("更新节点编辑失败:",H),pt()}},se=async(y,E)=>{var I;try{if(!(y.mindmapId||y.mindmap_id)){console.error("无法获取思维导图ID");return}const U=await nt.updateNode(y.id,{newTitle:y.topic,newDes:((I=y.data)==null?void 0:I.des)||"",newParentId:E});U.data&&U.data.success||console.error("更新节点父节点失败:",U.data)}catch(H){console.error("更新节点父节点失败:",H)}},Ce=async y=>{var E;try{await Ue();const I=o.value||y.mindmap_id||y.mindmapId;if(!I){console.error("无法获取思维导图ID");return}const H=await nt.addNodes(I,[{title:"新子节点",des:"子节点描述",parentId:y.id}]);if(H.data&&H.data.success){const U=((E=H.data.data)==null?void 0:E.nodes)||[];if(U.length>0){const ne=U[0];try{const B=x();await new Promise(ue=>setTimeout(ue,800));const be=await nt.getMindmap(I);if(be.data&&be.data.nodeData)await N(be.data,!0),setTimeout(async()=>{try{const ue=await nt.getMindmap(I);if(ue.data&&ue.data.nodeData){const ke=_e=>{if(_e.id===ne.id)return _e;if(_e.children)for(const et of _e.children){const mt=ke(et);if(mt)return mt}return null},Fe=ke(ue.data.nodeData);Fe&&n.value&&n.value.editText(Fe)}}catch(ue){console.error("查找新节点失败:",ue)}},1e3);else throw new Error("无法获取思维导图数据")}catch(B){console.error("刷新思维导图失败:",B)}}}}catch(I){console.error("添加子节点失败:",I)}},me=async y=>{var E;try{await Ue(),console.log("添加兄弟节点到API:",y.id),console.log("节点信息:",{id:y.id,parentId:y.parentId,parent:y.parent,mindmap_id:y.mindmap_id,mindmapId:y.mindmapId});const I=o.value||y.mindmap_id||y.mindmapId;if(!I){console.error("无法获取思维导图ID");return}let H=y.parentId;!H&&y.parent&&(H=y.parent.id);const U=await nt.addNodes(I,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:H}]);if(console.log("添加兄弟节点响应:",U),U.data&&U.data.success){const ne=((E=U.data.data)==null?void 0:E.nodes)||[];if(ne.length>0){const B=ne[0];console.log("新创建的兄弟节点:",B),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const be=x(),ue=await nt.getMindmap(I);if(ue.data&&ue.data.nodeData)await N(ue.data,!0),console.log("✅ 思维导图刷新成功"),setTimeout(async()=>{try{const ke=await nt.getMindmap(I);if(ke.data&&ke.data.nodeData){const Fe=et=>{if(et.id===B.id)return et;if(et.children)for(const mt of et.children){const It=Fe(mt);if(It)return It}return null},_e=Fe(ke.data.nodeData);_e&&n.value&&(console.log("找到新节点,进入编辑模式:",_e),n.value.editText(_e))}}catch(ke){console.error("查找新节点失败:",ke)}},1e3);else throw new Error("无法获取思维导图数据")}catch(be){console.error("重新初始化失败,使用完整重新加载:",be);const ue=await nt.getMindmap(I);ue.data&&ue.data.nodeData&&await N(ue.data,!0)}}}}catch(I){console.error("添加兄弟节点失败:",I)}},de=async y=>{try{await Ue(),console.log("删除节点从API:",y.id);const E=await nt.deleteNodes([y.id]);if(console.log("删除节点响应:",E),E.data&&E.data.success){const I=o.value||y.mindmap_id||y.mindmapId;if(I){const H=await nt.getMindmap(I);H.data&&H.data.nodeData&&(await N(H.data,!0),setTimeout(async()=>{try{console.log("重新加载思维导图数据...");const U=await nt.getMindmap(I);U.data&&U.data.nodeData&&(await N(U.data,!0),console.log("思维导图数据重新加载成功"))}catch(U){console.
${j}`;await he(G,te),await Ae(),Ve("AI生成: "+v.value.name,s.value),Ee("AI生成Markdown成功正在自动保存...","success"),setTimeout(async()=>{try{await ve()}catch(se){console.error("自动保存失败:",se)}},1500)}catch(j){console.error("从文件生成Markdown失败:",j),Ee("生成失败: "+j.message,"error")}finally{o.value=!1}},z=j=>new Promise(async(G,te)=>{try{const se=j.type.includes("text")||j.name.endsWith(".txt")||j.name.endsWith(".md"),Ce=j.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||j.type==="application/msword"||j.name.endsWith(".docx")||j.name.endsWith(".doc"),me=j.type==="application/pdf"||j.name.endsWith(".pdf");if(se){const de=new FileReader;de.onload=Ue=>G(Ue.target.result),de.onerror=()=>te(new Error("文本文件读取失败")),de.readAsText(j)}else if(Ce){const de=await Y(j);G(de)}else if(me){const de=await W(j);G(de)}else{const de=new FileReader;de.onload=Ue=>G(Ue.target.result),de.onerror=()=>te(new Error("文件读取失败")),de.readAsText(j)}}catch(se){te(se)}}),Y=async j=>{try{if(j.name.endsWith(".docx")){const G=await Dc(()=>import("./index-a46c0a22.js").then(Ce=>Ce.i),[]),te=await j.arrayBuffer();return(await G.extractRawText({arrayBuffer:te})).value}else if(j.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式或安装相应的解析库")}catch(G){throw new Error(`Office文档解析失败: ${G.message}`)}},W=async j=>{try{const G=await Dc(()=>import("./pdf-e6f26e66.js"),[]);G.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const te=await j.arrayBuffer(),se=await G.getDocument({data:te}).promise;let Ce="";for(let me=1;me<=se.numPages;me++){const S=(await(await se.getPage(me)).getTextContent()).items.map(D=>D.str).join(" ");Ce+=S+`
`}return Ce}catch(G){throw new Error(`PDF文件解析失败: ${G.message}`)}},he=async(j,G)=>{const se=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元素确保输出与示例风格一致`,Ce=G||"请将以下内容转换为结构化的Markdown格式";try{const me=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:se,user_prompt:Ce,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!me.ok)throw new Error(`HTTP error! status: ${me.status}`);const de=me.body.getReader(),Ue=new TextDecoder;let S="",D=0;for(;;){const{done:F,value:K}=await de.read();if(F)break;S+=Ue.decode(K,{stream:!0});const q=S.split(`
`);S=q.pop()||"";for(const P of q)if(P.startsWith("data: "))try{const Z=JSON.parse(P.slice(6));if(Z.type==="start")Ee("AI开始生成内容...","info");else if(Z.type==="chunk"){D++,s.value+=Z.content;try{const re=st(s.value);a.value=JSON.stringify(re,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:re,title:re.topic||"AI生成中...",source:"ai-streaming",chunkCount:D}}))}catch(re){console.warn("⚠️ 实时转换JSON失败:",re),console.warn("⚠️ 当前Markdown内容:",s.value)}}else if(Z.type==="end")Ee("AI内容生成完成","success");else if(Z.type==="error")throw new Error(Z.content)}catch(Z){console.warn("解析流式数据失败:",Z)}}}catch(me){throw console.error("流式AI API调用失败:",me),me}},pe=j=>{if(j.includes("|")&&j.includes("-")){const G=j.split(`
`);let te=!1,se=!1;for(const Ce of G){const me=Ce.trim();me.includes("|")&&me.split("|").length>=3&&(te=!0),me.includes("|")&&me.includes("-")&&/^[\s\|\-\:]+$/.test(me)&&(se=!0)}if(te&&se)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),j}return j.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(G,te)=>{if(te.includes(":")){const se=te.split(":");if(se.length>1)return`${se[0]}: ${se.slice(1).join(":")}`}return`${te}`}).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(!s.value.trim()){Ee("请输入Markdown内容","error");return}l.value=!0;try{const j=st(s.value);a.value=JSON.stringify(j,null,2)}catch(j){console.error("转换失败:",j),Ee("转换失败请检查Markdown格式","error")}finally{l.value=!1}},st=j=>{const G=j.split(`
`);let te=null;const se=[];let Ce=0,me=[];if(G.forEach((de,Ue)=>{const S=de.trim(),D=S.match(/^(#{1,6})\s+(.+)$/);if(D){if(me.length>0&&se.length>0){const Z=me.join(`
`).trim();Z&&(Ce=Ze(Z,se[se.length-1],Ce).nodeCounter),me=[]}const F=D[1].length,K=D[2].trim(),q=pe(K),P={id:`node_${Ce++}`,topic:q,children:[],level:F,data:{}};if(F===1&&!te)te=P,se.length=0,se.push(te);else{for(;se.length>1&&se[se.length-1].level>=F;)se.pop();se.length>0&&se[se.length-1].children.push(P),se.push(P)}}else S&&me.push(S)}),me.length>0&&se.length>0){const de=me.join(`
`).trim();de&&(de.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",de.substring(0,200)+"..."),Ce=Ze(de,se[se.length-1],Ce).nodeCounter)}return te||(te={id:"root",topic:"根节点",children:[],data:{}}),te},Ze=(j,G,te)=>{if(tt(j)){console.log("🎯 检测到表格内容,创建表格节点");const de={id:`node_${te++}`,topic:j,children:[],level:(G.level||0)+1,data:{}};return G.children.push(de),{nodeCounter:te}}const se=j.split(`
`);let Ce=te,me=[];for(let de=0;de<se.length;de++){const S=se[de].trim(),D=S.match(/^[-*+]\s*【(.+)】/);if(D){const F=D[1].trim(),K={id:`node_${Ce++}`,topic:F,children:[],level:(G.level||0)+1,data:{}};let q=[],P=de+1;for(;P<se.length;){const Z=se[P].trim();if(Z.match(/^[-*+]\s*【(.+)】/))break;const ie=Z.match(/^[-*+]\s+(.+)$/);if(ie){const J=ie[1].trim(),ge=pe(J);q.push("• "+ge)}P++}if(q.length>0){const Z=pe(q.join(`
`));K.topic=K.topic+`
`+Z}G.children.push(K),de=P-1}else S&&me.push(S)}if(me.length>0){const de=me.join(`
`).trim();if(de)if(tt(de)){console.log("🎯 检测到表格内容,创建表格节点");const Ue={id:`node_${Ce++}`,topic:de,children:[],level:(G.level||0)+1,data:{}};G.children.push(Ue)}else de.split(`
`).filter(S=>S.trim()).forEach(S=>{const D=pe(S.trim());if(D){const F={id:`node_${Ce++}`,topic:D,children:[],level:(G.level||0)+1,data:{}};G.children.push(F)}})}return{nodeCounter:Ce}},tt=j=>{if(!j||typeof j!="string")return!1;j.includes("|")&&console.log("🔍 检查表格内容:",j.substring(0,200)+"...");const G=j.split(`
`);let te=!1,se=!1;for(const Ue of G){const S=Ue.trim();S.includes("|")&&S.split("|").length>=3&&(te=!0,console.log("✅ 找到表格行:",S)),S.includes("|")&&S.includes("-")&&/^[\s\|\-\:]+$/.test(S)&&(se=!0,console.log("✅ 找到分隔符行:",S))}const Ce=(j.match(/\|/g)||[]).length,me=Ce>=4,de=te&&se||te&&me;return console.log("🔍 表格检测结果:",{hasTableRow:te,hasSeparator:se,pipeCount:Ce,hasMultiplePipes:me,result:de}),de},$e=async()=>{if(!s.value){Ee("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(s.value),Ee("Markdown已复制到剪贴板","success")}catch{const G=document.createElement("textarea");G.value=s.value,document.body.appendChild(G),G.select(),document.execCommand("copy"),G.remove(),Ee("Markdown已复制到剪贴板","success")}},Oe=async()=>{try{await navigator.clipboard.writeText(a.value),Ee("JSON已复制到剪贴板","success")}catch(j){console.error("复制失败:",j),Ee("复制失败","error")}},ve=async()=>{if(!a.value){Ee("请先生成或转换JSON数据","error");return}f.value=!0,p.value="正在保存思维导图...";try{const j=JSON.parse(a.value),G=j.topic||j.title||`AI生成的思维导图_${new Date().toLocaleString()}`,te=new CustomEvent("save-preview-to-database",{detail:{data:j,title:G,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(te),setTimeout(()=>{f.value=!1,p.value="",Ee("思维导图已保存成功!","success"),v.value=null,b.value&&(b.value.value="")},2e3)}catch(j){f.value=!1,p.value="",console.error("JSON解析失败:",j),Ee("JSON格式错误请检查数据","error")}},Ee=(j,G="info")=>{const te=document.createElement("div");switch(te.className=`notification notification-${G}`,te.textContent=j,te.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;
`,G){case"success":te.style.background="#4CAF50",te.style.color="white";break;case"error":te.style.background="#f44336",te.style.color="white";break;case"info":default:te.style.background="#2196F3",te.style.color="white";break}if(!document.querySelector("#notification-styles")){const se=document.createElement("style");se.id="notification-styles",se.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(se)}document.body.appendChild(te),setTimeout(()=>{te.style.animation="slideOut 0.3s ease",setTimeout(()=>{te.parentNode&&te.parentNode.removeChild(te)},300)},3e3)},rt=()=>{s.value="",a.value="",Ee("内容已清空","info")},Ve=(j,G,te=null)=>{const se={title:j,content:G,mindmapId:te,timestamp:new Date};c.value.unshift(se),c.value.length>10&&(c.value=c.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))},Ie=async j=>{j.mindmapId?(window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:j.mindmapId,title:j.title}})),Ee(`正在加载: ${j.title}`,"info")):(s.value=j.content,await Ae(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:j.content,json:a.value,title:j.title}})),Ee(`正在加载: ${j.title}`,"info"))},Rt=j=>new Date(j).toLocaleString("zh-CN");La(()=>{const j=localStorage.getItem("ai-sidebar-history");if(j)try{c.value=JSON.parse(j)}catch(G){console.error("加载历史记录失败:",G)}window.addEventListener("add-to-history",G=>{const{title:te,content:se,timestamp:Ce}=G.detail;Ve(te,se,null)}),window.addEventListener("mindmap-saved",G=>{const{mindmapId:te,title:se,timestamp:Ce}=G.detail,me=c.value.find(de=>de.title===se||de.timestamp&&Math.abs(de.timestamp-Ce)<5e3);me?(me.mindmapId=te,localStorage.setItem("ai-sidebar-history",JSON.stringify(c.value))):Ve(se,"",te)}),s0(i,(G,te)=>{}),s0(s,(G,te)=>{})});const pt=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 G=j.body.getReader(),te=new TextDecoder;let se="";for(;;){const{done:Ce,value:me}=await G.read();if(Ce)break;se+=te.decode(me,{stream:!0});const de=se.split(`
`);se=de.pop()||"";for(const Ue of de)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=pt,(j,G)=>(We(),Ke("div",y7,[V("div",{class:"sidebar-toggle",onClick:k,title:n.value?"展开AI助手":"折叠AI助手",style:Ln({left:n.value?"10px":"420px"})},[n.value?(We(),Ke("svg",x7,[...G[1]||(G[1]=[V("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(We(),Ke("svg",k7,[...G[2]||(G[2]=[V("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,w7),V("div",{class:pn(["ai-sidebar",{"sidebar-collapsed":n.value}])},[hi(V("div",S7,[G[12]||(G[12]=V("div",{class:"sidebar-header"},[V("h3",null,"🤖 AI 助手"),V("p",null,"文档转思维导图工具"),V("div",{class:"collapse-hint"},[V("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),V("div",T7,[G[6]||(G[6]=V("h4",null,"📁 生成思维导图",-1)),V("div",A7,[G[4]||(G[4]=V("label",null,"上传文件:",-1)),V("div",{class:"file-upload-area",onDrop:M,onDragover:x,onDragleave:A},[V("input",{type:"file",ref_key:"fileInput",ref:b,onChange:w,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),V("div",{class:pn(["file-upload-placeholder",{"drag-over":d.value}])},[...G[3]||(G[3]=[V("span",{class:"upload-icon"},"📎",-1),V("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),V("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),v.value?(We(),Ke("div",E7,[V("div",C7,[V("div",M7,[V("span",N7,"📄 "+Qt(v.value.name),1),V("span",D7,"("+Qt(_(v.value.size))+")",1)]),V("button",{onClick:N,class:"btn-remove",title:"删除文件"},[...G[5]||(G[5]=[V("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[V("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),V("div",R7,[V("button",{onClick:O,disabled:!v.value||o.value,class:"btn-primary"},[o.value?(We(),Ke("span",_7,"AI生成中...")):(We(),Ke("span",O7,"AI生成思维导图"))],8,I7)])]),c.value.length>0?(We(),Ke("div",L7,[G[7]||(G[7]=V("h4",null,"📚 历史记录",-1)),V("div",z7,[(We(!0),Ke(tr,null,du(c.value,(te,se)=>(We(),Ke("div",{key:se,class:"history-item",onClick:Ce=>Ie(te)},[V("div",$7,Qt(te.title),1),V("div",B7,Qt(Rt(te.timestamp)),1)],8,F7))),128))])])):Sr("",!0),V("div",P7,[G[9]||(G[9]=V("h4",null,"📝 AI生成的Markdown结果",-1)),V("div",H7,[G[8]||(G[8]=V("label",null,"Markdown内容",-1)),hi(V("textarea",{"onUpdate:modelValue":G[0]||(G[0]=te=>s.value=te),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Ha,s.value]])]),V("div",q7,[V("button",{onClick:Ae,disabled:l.value,class:"btn-secondary"},[l.value?(We(),Ke("span",U7,"转换中...")):(We(),Ke("span",V7,"🔄 转换为JSON"))],8,j7),V("button",{onClick:rt,class:"btn-clear"},"清空"),V("button",{onClick:$e,class:"btn-copy"},"📋 复制Markdown")])]),V("div",W7,[G[11]||(G[11]=V("h4",null,"📊 Markdown转JSON结果",-1)),f.value?(We(),Ke("div",G7,[G[10]||(G[10]=V("div",{class:"spinner"},null,-1)),V("span",null,Qt(p.value),1)])):Sr("",!0),V("div",K7,[V("pre",Y7,Qt(a.value||"JSON转换结果将显示在这里"),1),V("div",X7,[V("button",{onClick:Oe,class:"btn-copy"},"📋 复制JSON"),V("button",{onClick:ve,disabled:f.value,class:"btn-copy"},Qt(f.value?"处理中...":"👁️ 预览"),9,Z7)])])])],512),[[Lf,!n.value]])],2)]))}},Q7=Oo(J7,[["__scopeId","data-v-9bdaf8f5"]]);const e8={class:"markdown-test"},t8={class:"test-section"},r8={class:"test-section"},n8=["innerHTML"],i8={class:"test-section"},s8={class:"test-cases"},a8=["onClick"],o8={__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 wa(e.value)}catch(a){return`<div class="error">渲染失败: ${a.message}</div>`}}),i=()=>{},s=a=>{e.value=a.content};return(a,o)=>(We(),Ke("div",e8,[o[4]||(o[4]=V("h2",null,"Markdown渲染测试",-1)),V("div",t8,[o[1]||(o[1]=V("h3",null,"输入Markdown内容",-1)),hi(V("textarea",{"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[Ha,e.value]])]),V("div",r8,[o[2]||(o[2]=V("h3",null,"渲染结果",-1)),V("div",{class:"rendered-content",innerHTML:n.value},null,8,n8)]),V("div",i8,[o[3]||(o[3]=V("h3",null,"测试用例",-1)),V("button",{onClick:i,class:"test-btn"},"加载测试用例"),V("div",s8,[(We(!0),Ke(tr,null,du(r.value,(l,c)=>(We(),Ke("button",{key:c,onClick:d=>s(l),class:"test-case-btn"},Qt(l.name),9,a8))),128))])])]))}},l8=Oo(o8,[["__scopeId","data-v-68a00828"]]);const c8={id:"app"},u8={class:"test-mode-toggle"},d8={key:0,class:"test-mode"},h8={key:1},f8={class:"main-content"},p8={__name:"App",setup(t){const e=ze(null),r=ze(!1),n=()=>{r.value=!r.value},i=()=>{e.value&&e.value.showMindMapPage()};return(s,a)=>(We(),Ke("div",c8,[a[0]||(a[0]=Ru("« ",-1)),V("div",u8,[V("button",{onClick:n,class:"test-btn"},Qt(r.value?"切换到思维导图":"测试Markdown渲染"),1)]),r.value?(We(),Ke("div",d8,[qt(l8)])):(We(),Ke("div",h8,[qt(Q7,{onStartRealtimeGeneration:i}),V("div",f8,[qt(g7,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};tp(p8).mount("#app");export{Dc as _,Wl as c,b8 as g};