!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Vditor=t():e.Vditor=t()}(this,(()=>(()=>{"use strict";var e={793:(e,t,n)=>{n.d(t,{g:()=>r});var r=function(){function e(){}return e.ZWSP="​",e.DROP_EDITOR="application/editor",e.MOBILE_WIDTH=520,e.CLASS_MENU_DISABLED="vditor-menu--disabled",e.EDIT_TOOLBARS=["emoji","headings","bold","italic","strike","link","list","ordered-list","outdent","indent","check","line","quote","code","inline-code","insert-after","insert-before","upload","record","table"],e.CODE_THEME=["abap","algol","algol_nu","arduino","autumn","borland","bw","colorful","dracula","emacs","friendly","fruity","github","igor","lovelace","manni","monokai","monokailight","murphy","native","paraiso-dark","paraiso-light","pastie","perldoc","pygments","rainbow_dash","rrt","solarized-dark","solarized-dark256","solarized-light","swapoff","tango","trac","vim","vs","xcode","ant-design"],e.CODE_LANGUAGES=["mermaid","echarts","mindmap","plantuml","abc","graphviz","flowchart","apache","js","ts","html","markmap","properties","apache","bash","c","csharp","cpp","css","coffeescript","diff","go","xml","http","json","java","javascript","kotlin","less","lua","makefile","markdown","nginx","objectivec","php","php-template","perl","plaintext","python","python-repl","r","ruby","rust","scss","sql","shell","swift","ini","typescript","vbnet","yaml","ada","clojure","dart","erb","fortran","gradle","haskell","julia","julia-repl","lisp","matlab","pgsql","powershell","sql_more","stata","cmake","mathematica","solidity","yul"],e.CDN="https://unpkg.com/vditor@".concat("3.10.6"),e.MARKDOWN_OPTIONS={autoSpace:!1,gfmAutoLink:!0,codeBlockPreview:!0,fixTermTypo:!1,footnotes:!0,linkBase:"",linkPrefix:"",listStyle:!1,mark:!1,mathBlockPreview:!0,paragraphBeginningSpace:!1,sanitize:!0,toc:!1},e.HLJS_OPTIONS={enable:!0,lineNumber:!1,defaultLang:"",style:"github"},e.MATH_OPTIONS={engine:"KaTeX",inlineDigit:!1,macros:{}},e.THEME_OPTIONS={current:"light",list:{"ant-design":"Ant Design",dark:"Dark",light:"Light",wechat:"WeChat"},path:"".concat(e.CDN,"/dist/css/content-theme")},e}()},386:(e,t,n)=>{n.d(t,{Q:()=>o});var r=n(793),a=n(998),i=n(781),o=function(e,t){void 0===e&&(e=document),void 0===t&&(t=r.g.CDN);var n=i.abcRenderAdapter.getElements(e);n.length>0&&(0,a.G)("".concat(t,"/dist/js/abcjs/abcjs_basic.min.js"),"vditorAbcjsScript").then((function(){n.forEach((function(e){e.parentElement.classList.contains("vditor-wysiwyg__pre")||e.parentElement.classList.contains("vditor-ir__marker--pre")||"true"!==e.getAttribute("data-processed")&&(ABCJS.renderAbc(e,i.abcRenderAdapter.getCode(e).trim()),e.style.overflowX="auto",e.setAttribute("data-processed","true"))}))}))}},781:(e,t,n)=>{n.r(t),n.d(t,{abcRenderAdapter:()=>s,chartRenderAdapter:()=>c,flowchartRenderAdapter:()=>d,graphvizRenderAdapter:()=>l,markmapRenderAdapter:()=>i,mathRenderAdapter:()=>r,mermaidRenderAdapter:()=>a,mindmapRenderAdapter:()=>o,plantumlRenderAdapter:()=>u});var r={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-math")}},a={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-mermaid")}},i={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-markmap")}},o={getCode:function(e){return e.getAttribute("data-code")},getElements:function(e){return e.querySelectorAll(".language-mindmap")}},c={getCode:function(e){return e.innerText},getElements:function(e){return e.querySelectorAll(".language-echarts")}},s={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-abc")}},l={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-graphviz")}},d={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-flowchart")}},u={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-plantuml")}}},379:(e,t,n)=>{n.d(t,{p:()=>l});var r=n(793),a=n(998),i=n(781),o=n(446),c=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]0&&(0,a.G)("".concat(t,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then((function(){l.forEach((function(e){return c(void 0,void 0,void 0,(function(){var t,r,a;return s(this,(function(c){switch(c.label){case 0:if(e.parentElement.classList.contains("vditor-wysiwyg__pre")||e.parentElement.classList.contains("vditor-ir__marker--pre"))return[2];if(!(t=i.chartRenderAdapter.getCode(e).trim()))return[2];c.label=1;case 1:return c.trys.push([1,3,,4]),"true"===e.getAttribute("data-processed")?[2]:[4,(0,o.Qf)(t)];case 2:return r=c.sent(),echarts.init(e,"dark"===n?"dark":void 0).setOption(r),e.setAttribute("data-processed","true"),[3,4];case 3:return a=c.sent(),e.className="vditor-reset--error",e.innerHTML="echarts render error:
".concat(a),[3,4];case 4:return[2]}}))}))}))}))}},895:(e,t,n)=>{n.d(t,{O:()=>i});var r=n(528),a=n(793),i=function(e,t){Array.from(e.querySelectorAll("pre > code")).filter((function(t,n){return!t.parentElement.classList.contains("vditor-wysiwyg__pre")&&!t.parentElement.classList.contains("vditor-ir__marker--pre")&&(!(t.classList.contains("language-mermaid")||t.classList.contains("language-flowchart")||t.classList.contains("language-echarts")||t.classList.contains("language-mindmap")||t.classList.contains("language-plantuml")||t.classList.contains("language-markmap")||t.classList.contains("language-abc")||t.classList.contains("language-graphviz")||t.classList.contains("language-math"))&&(!(t.style.maxHeight.indexOf("px")>-1)&&!(e.classList.contains("vditor-preview")&&n>5)))})).forEach((function(e){var n,i,o,c=e.innerText;if(e.classList.contains("highlight-chroma")){var s=e.cloneNode(!0);s.querySelectorAll(".highlight-ln").forEach((function(e){e.remove()})),c=s.innerText}else c.endsWith("\n")&&(c=c.substr(0,c.length-1));var l='';document.getElementById("vditorIconScript")||(l='');var d=document.createElement("div");d.className="vditor-copy",d.innerHTML='").concat(l,"");var u=document.createElement("textarea");u.value=(0,r.X)(c),d.insertAdjacentElement("afterbegin",u),t&&t.renderMenu&&t.renderMenu(e,d),e.before(d),e.style.maxHeight=window.outerHeight-40+"px",e.insertAdjacentHTML("afterend",''.concat(a.g.ZWSP,""))}))}},169:(e,t,n)=>{n.d(t,{P:()=>o});var r=n(793),a=n(998),i=n(781),o=function(e,t){void 0===t&&(t=r.g.CDN);var n=i.flowchartRenderAdapter.getElements(e);0!==n.length&&(0,a.G)("".concat(t,"/dist/js/flowchart.js/flowchart.min.js"),"vditorFlowchartScript").then((function(){n.forEach((function(e){if("true"!==e.getAttribute("data-processed")){var t=flowchart.parse(i.flowchartRenderAdapter.getCode(e));e.innerHTML="",t.drawSVG(e),e.setAttribute("data-processed","true")}}))}))}},572:(e,t,n)=>{n.d(t,{v:()=>o});var r=n(793),a=n(998),i=n(781),o=function(e,t){void 0===t&&(t=r.g.CDN);var n=i.graphvizRenderAdapter.getElements(e);0!==n.length&&(0,a.G)("".concat(t,"/dist/js/graphviz/viz.js"),"vditorGraphVizScript").then((function(){n.forEach((function(e){var t=i.graphvizRenderAdapter.getCode(e);if(!e.parentElement.classList.contains("vditor-wysiwyg__pre")&&!e.parentElement.classList.contains("vditor-ir__marker--pre")&&"true"!==e.getAttribute("data-processed")&&""!==t.trim()){try{var n=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),r=(window.URL||window.webkitURL).createObjectURL(n),a=new Worker(r);new Viz({worker:a}).renderSVGElement(t).then((function(t){e.innerHTML=t.outerHTML})).catch((function(t){e.innerHTML="graphviz render error:
".concat(t),e.className="vditor-reset--error"}))}catch(e){console.error("graphviz error",e)}e.setAttribute("data-processed","true")}}))}))}},702:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(793),a=n(998),i=n(296),o=function(e,t,n){void 0===t&&(t=document),void 0===n&&(n=r.g.CDN);var o=e.style;r.g.CODE_THEME.includes(o)||(o="github");var c=document.getElementById("vditorHljsStyle"),s="".concat(n,"/dist/js/highlight.js/styles/").concat(o,".css");(c&&c.getAttribute("href")!==s&&c.remove(),(0,i.c)("".concat(n,"/dist/js/highlight.js/styles/").concat(o,".css"),"vditorHljsStyle"),!1!==e.enable)&&(0!==t.querySelectorAll("pre > code").length&&(0,a.G)("".concat(n,"/dist/js/highlight.js/highlight.pack.js"),"vditorHljsScript").then((function(){(0,a.G)("".concat(n,"/dist/js/highlight.js/solidity.min.js"),"vditorHljsSolidityScript").then((function(){(0,a.G)("".concat(n,"/dist/js/highlight.js/yul.min.js"),"vditorHljsYulScript").then((function(){t.querySelectorAll("pre > code").forEach((function(t){if(!t.parentElement.classList.contains("vditor-ir__marker--pre")&&!t.parentElement.classList.contains("vditor-wysiwyg__pre")&&!(t.classList.contains("language-mermaid")||t.classList.contains("language-flowchart")||t.classList.contains("language-echarts")||t.classList.contains("language-mindmap")||t.classList.contains("language-plantuml")||t.classList.contains("language-abc")||t.classList.contains("language-graphviz")||t.classList.contains("language-math"))&&(""!==e.defaultLang&&-1===t.className.indexOf("language-")&&t.classList.add("language-"+e.defaultLang),hljs.highlightElement(t),e.lineNumber)){t.classList.add("vditor-linenumber");var n=t.querySelector(".vditor-linenumber__temp");n||((n=document.createElement("div")).className="vditor-linenumber__temp",t.insertAdjacentElement("beforeend",n));var r=getComputedStyle(t).whiteSpace,a=!1;"pre-wrap"!==r&&"pre-line"!==r||(a=!0);var i="",o=t.textContent.split(/\r\n|\r|\n/g);o.pop(),o.map((function(e){var t="";a&&(n.textContent=e||"\n",t=' style="height:'.concat(n.getBoundingClientRect().height,'px"')),i+="")})),n.style.display="none",i=''.concat(i,""),t.insertAdjacentHTML("beforeend",i)}}))}))}))})))}},593:(e,t,n)=>{n.d(t,{K:()=>s});var r=n(793),a=n(998),i=n(781),o={},c=function(e,t){var n=window.markmap,r=n.Transformer,a=n.Markmap,i=n.deriveOptions,c=(n.globalCSS,new r);e.innerHTML='';var s=e.firstChild,l=a.create(s,null),d=function(e,t){var n=e.transform(t),r=Object.keys(n.features).filter((function(e){return!o[e]}));r.forEach((function(e){o[e]=!0}));var a=e.getAssets(r),i=a.styles,c=a.scripts,s=window.markmap;return i&&s.loadCSS(i),c&&s.loadJS(c),n}(c,t),u=d.root,m=d.frontmatter,p=i(null==m?void 0:m.markmap);l.setData(u,p),l.fit()},s=function(e,t,n){void 0===t&&(t=r.g.CDN);var o=i.markmapRenderAdapter.getElements(e);0!==o.length&&(0,a.G)("".concat(t,"/dist/js/markmap/markmap.min.js"),"vditorMermaidScript").then((function(){o.forEach((function(e){var t=i.markmapRenderAdapter.getCode(e);if("true"!==e.getAttribute("data-processed")&&""!==t.trim()){var n=document.createElement("div");n.className="language-markmap",e.parentNode.appendChild(n),c(n,t),"CODE"==e.parentNode.childNodes[0].nodeName&&e.parentNode.removeChild(e.parentNode.childNodes[0])}}))}))}},982:(e,t,n)=>{n.d(t,{H:()=>s});var r=n(793),a=n(998),i=n(296),o=n(528),c=n(781),s=function(e,t){var n=c.mathRenderAdapter.getElements(e);if(0!==n.length){var s={cdn:r.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(t&&t.math&&(t.math=Object.assign({},s.math,t.math)),"KaTeX"===(t=Object.assign({},s,t)).math.engine)(0,i.c)("".concat(t.cdn,"/dist/js/katex/katex.min.css?v=0.16.9"),"vditorKatexStyle"),(0,a.G)("".concat(t.cdn,"/dist/js/katex/katex.min.js?v=0.16.9"),"vditorKatexScript").then((function(){(0,a.G)("".concat(t.cdn,"/dist/js/katex/mhchem.min.js?v=0.16.9"),"vditorKatexChemScript").then((function(){n.forEach((function(e){if(!e.parentElement.classList.contains("vditor-wysiwyg__pre")&&!e.parentElement.classList.contains("vditor-ir__marker--pre")&&!e.getAttribute("data-math")){var n=(0,o.X)(c.mathRenderAdapter.getCode(e));e.setAttribute("data-math",n);try{e.innerHTML=katex.renderToString(n,{displayMode:"DIV"===e.tagName,output:"html",macros:t.math.macros})}catch(t){e.innerHTML=t.message,e.className="language-math vditor-reset--error"}e.addEventListener("copy",(function(e){e.stopPropagation(),e.preventDefault();var t=e.currentTarget.closest(".language-math");e.clipboardData.setData("text/html",t.innerHTML),e.clipboardData.setData("text/plain",t.getAttribute("data-math"))}))}}))}))}));else if("MathJax"===t.math.engine){window.MathJax||(window.MathJax={loader:{paths:{mathjax:"".concat(t.cdn,"/dist/js/mathjax")}},startup:{typeset:!1},tex:{macros:t.math.macros}},Object.assign(window.MathJax,t.math.mathJaxOptions)),(0,a.J)("".concat(t.cdn,"/dist/js/mathjax/tex-svg-full.js"),"protyleMathJaxScript");var l=function(e,t){var n=(0,o.X)(e.textContent).trim(),r=window.MathJax.getMetricsFor(e);r.display="DIV"===e.tagName,window.MathJax.tex2svgPromise(n,r).then((function(r){e.innerHTML="",e.setAttribute("data-math",n),e.append(r),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var a=r.querySelector('[data-mml-node="merror"]');a&&""!==a.textContent.trim()&&(e.innerHTML=a.textContent.trim(),e.className="vditor-reset--error"),t&&t()}))};window.MathJax.startup.promise.then((function(){for(var e=[],t=function(t){var r=n[t];r.parentElement.classList.contains("vditor-wysiwyg__pre")||r.parentElement.classList.contains("vditor-ir__marker--pre")||r.getAttribute("data-math")||!(0,o.X)(r.textContent).trim()||e.push((function(e){t===n.length-1?l(r):l(r,e)}))},r=0;r{n.d(t,{Y:()=>a});var r=n(446),a=function(e){e&&e.querySelectorAll("a").forEach((function(e){var t=e.getAttribute("href");t&&(t.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)?function(e,t){e.insertAdjacentHTML("afterend",'')),e.remove()}(e,t):t.match(/^.+.(mp3|wav|flac)$/)?function(e,t){e.insertAdjacentHTML("afterend",'')),e.remove()}(e,t):function(e,t){var n=t.match(/\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?/),a=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),i=t.match(/\/\/v\.qq\.com\/x\/cover\/.*\/([^\/]+)\.html\??.*/),o=t.match(/(?:www\.|\/\/)coub\.com\/view\/(\w+)/),c=t.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/),s=t.match(/.+dailymotion.com\/(video|hub)\/(\w+)\?/),l=t.match(/(?:www\.|\/\/)bilibili\.com\/video\/(\w+)/),d=t.match(/(?:www\.|\/\/)ted\.com\/talks\/(\w+)/);if(n&&11===n[1].length)e.insertAdjacentHTML("afterend",'')),e.remove();else if(a&&a[1])e.insertAdjacentHTML("afterend",'')),e.remove();else if(i&&i[1])e.insertAdjacentHTML("afterend",'')),e.remove();else if(o&&o[1])e.insertAdjacentHTML("afterend",'')),e.remove();else if(c&&c[0])e.insertAdjacentHTML("afterend",'')),e.remove();else if(s&&s[2])e.insertAdjacentHTML("afterend",'')),e.remove();else if(t.indexOf("bilibili.com")>-1&&(t.indexOf("bvid=")>-1||l&&l[1])){var u={bvid:(0,r.on)("bvid",t)||l&&l[1],page:"1",high_quality:"1",as_wide:"1",allowfullscreen:"true",autoplay:"0"};new URL(t.startsWith("http")?t:"https:"+t).search.split("&").forEach((function(e,t){if(e){0===t&&(e=e.substr(1));var n=e.split("=");u[n[0]]=n[1]}}));var m="https://player.bilibili.com/player.html?",p=Object.keys(u);p.forEach((function(e,t){m+="".concat(e,"=").concat(u[e]),t')),e.remove()}else d&&d[1]&&(e.insertAdjacentHTML("afterend",'')),e.remove())}(e,t))}))}},570:(e,t,n)=>{n.d(t,{i:()=>l});var r=n(793),a=n(998),i=n(781),o=n(446),c=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]\n
').concat(a.message.replace(/\n/,"
"),"
"),c.parentElement.remove(),[3,4];case 4:return e.setAttribute("data-processed","true"),[2]}}))}))}))}))}},558:(e,t,n)=>{n.d(t,{P:()=>o});var r=n(793),a=n(998),i=n(781),o=function(e,t,n){void 0===e&&(e=document),void 0===t&&(t=r.g.CDN);var o=i.mindmapRenderAdapter.getElements(e);o.length>0&&(0,a.G)("".concat(t,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then((function(){o.forEach((function(e){if(!e.parentElement.classList.contains("vditor-wysiwyg__pre")&&!e.parentElement.classList.contains("vditor-ir__marker--pre")){var t=i.mindmapRenderAdapter.getCode(e);if(t)try{if("true"===e.getAttribute("data-processed"))return;echarts.init(e,"dark"===n?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(t))],initialTreeDepth:-1,itemStyle:{borderWidth:0,color:"#4285f4"},label:{backgroundColor:"#f6f8fa",borderColor:"#d1d5da",borderRadius:5,borderWidth:.5,color:"#586069",lineHeight:20,offset:[-5,0],padding:[0,5],position:"insideRight"},lineStyle:{color:"#d1d5da",width:1},roam:!0,symbol:function(e,t){var n;return(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.children)?"circle":"path://"},type:"tree"}],tooltip:{trigger:"item",triggerOn:"mousemove"}}),e.setAttribute("data-processed","true")}catch(t){e.className="vditor-reset--error",e.innerHTML="mindmap render error:
".concat(t)}}}))}))}},182:(e,t,n)=>{n.d(t,{k:()=>i});var r=n(946),a=n(982),i=function(e,t,n){var i="",o=[];if(Array.from(e.children).forEach((function(e,t){if((0,r.W)(e)){if(n){var a=e.id.lastIndexOf("_");e.id=e.id.substring(0,-1===a?void 0:a)+"_"+t}o.push(e.id),i+=e.outerHTML.replace("","")}})),""===i)return t.innerHTML="","";var c=document.createElement("div");if(n)n.lute.SetToC(!0),"wysiwyg"!==n.currentMode||n.preview.element.contains(e)?"ir"!==n.currentMode||n.preview.element.contains(e)?c.innerHTML=n.lute.HTML2VditorDOM("

[ToC]

"+i):c.innerHTML=n.lute.SpinVditorIRDOM("

[ToC]

"+i):c.innerHTML=n.lute.SpinVditorDOM("

[ToC]

"+i),n.lute.SetToC(n.options.preview.markdown.toc);else{t.classList.add("vditor-outline");var s=Lute.New();s.SetToC(!0),c.innerHTML=s.HTML2VditorDOM("

[ToC]

"+i)}var l=c.firstElementChild.querySelectorAll("li > span[data-target-id]");return l.forEach((function(e,t){if(e.nextElementSibling&&"UL"===e.nextElementSibling.tagName){var n="";document.getElementById("vditorIconScript")||(n=''),e.innerHTML="".concat(n,"").concat(e.innerHTML,"")}else e.innerHTML="".concat(e.innerHTML,"");e.setAttribute("data-target-id",o[t])})),i=c.firstElementChild.innerHTML,0===l.length?(t.innerHTML="",i):(t.innerHTML=i,n&&(0,a.H)(t,{cdn:n.options.cdn,math:n.options.preview.math}),t.firstElementChild.addEventListener("click",(function(r){for(var a=r.target;a&&!a.isEqualNode(t);){if(a.classList.contains("vditor-outline__action")){a.classList.contains("vditor-outline__action--close")?(a.classList.remove("vditor-outline__action--close"),a.parentElement.nextElementSibling.setAttribute("style","display:block")):(a.classList.add("vditor-outline__action--close"),a.parentElement.nextElementSibling.setAttribute("style","display:none")),r.preventDefault(),r.stopPropagation();break}if(a.getAttribute("data-target-id")){r.preventDefault(),r.stopPropagation();var i=document.getElementById(a.getAttribute("data-target-id"));if(!i)return;if(n)if("auto"===n.options.height){var o=i.offsetTop+n.element.offsetTop;n.options.toolbarConfig.pin||(o+=n.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,o)}else n.element.offsetTop{n.d(t,{B:()=>o});var r=n(793),a=n(998),i=n(781),o=function(e,t){void 0===e&&(e=document),void 0===t&&(t=r.g.CDN);var n=i.plantumlRenderAdapter.getElements(e);0!==n.length&&(0,a.G)("".concat(t,"/dist/js/plantuml/plantuml-encoder.min.js"),"vditorPlantumlScript").then((function(){n.forEach((function(e){if(!e.parentElement.classList.contains("vditor-wysiwyg__pre")&&!e.parentElement.classList.contains("vditor-ir__marker--pre")){var t=i.plantumlRenderAdapter.getCode(e).trim();if(t)try{e.innerHTML='')}catch(t){e.className="vditor-reset--error",e.innerHTML="plantuml render error:
".concat(t)}}}))}))}},65:(e,t,n)=>{n.d(t,{X:()=>r});var r=function(e){var t=Lute.New();return t.PutEmojis(e.emojis),t.SetEmojiSite(e.emojiSite),t.SetHeadingAnchor(e.headingAnchor),t.SetInlineMathAllowDigitAfterOpenMarker(e.inlineMathDigit),t.SetAutoSpace(e.autoSpace),t.SetToC(e.toc),t.SetFootnotes(e.footnotes),t.SetFixTermTypo(e.fixTermTypo),t.SetVditorCodeBlockPreview(e.codeBlockPreview),t.SetVditorMathBlockPreview(e.mathBlockPreview),t.SetSanitize(e.sanitize),t.SetChineseParagraphBeginningSpace(e.paragraphBeginningSpace),t.SetRenderListStyle(e.listStyle),t.SetLinkBase(e.linkBase),t.SetLinkPrefix(e.linkPrefix),t.SetMark(e.mark),t.SetGFMAutoLink(e.gfmAutoLink),e.lazyLoadImage&&t.SetImageLazyLoading(e.lazyLoadImage),t}},971:(e,t,n)=>{n.d(t,{E:()=>r});var r=function(e,t,n){void 0===t&&(t="zh_CN"),void 0===n&&(n="classic");var r=e.getBoundingClientRect();document.body.insertAdjacentHTML("beforeend",'
\n
\n \n \n ').concat(window.VditorI18n.spin,"\n \n \n X  ").concat(window.VditorI18n.close,'\n \n
\n
\n \n
\n
')),document.body.style.overflow="hidden";var a=document.querySelector(".vditor-img img"),i="translate3d(".concat(Math.max(0,window.innerWidth-e.naturalWidth)/2,"px, ").concat(Math.max(0,window.innerHeight-36-e.naturalHeight)/2,"px, 0)");setTimeout((function(){a.setAttribute("style","transition: transform .3s ease-in-out;transform: ".concat(i)),setTimeout((function(){a.parentElement.scrollTo((a.parentElement.scrollWidth-a.parentElement.clientWidth)/2,(a.parentElement.scrollHeight-a.parentElement.clientHeight)/2)}),400)}));var o=document.querySelector(".vditor-img__btn");o.addEventListener("click",(function(){var t=parseInt(o.getAttribute("data-deg"),10)+90;t/90%2==1&&e.naturalWidth>a.parentElement.clientHeight?a.style.transform="translate3d(".concat(Math.max(0,window.innerWidth-e.naturalWidth)/2,"px, ").concat(e.naturalWidth/2-e.naturalHeight/2,"px, 0) rotateZ(").concat(t,"deg)"):a.style.transform="".concat(i," rotateZ(").concat(t,"deg)"),o.setAttribute("data-deg",t.toString()),setTimeout((function(){a.parentElement.scrollTo((a.parentElement.scrollWidth-a.parentElement.clientWidth)/2,(a.parentElement.scrollHeight-a.parentElement.clientHeight)/2)}),400)}))}},34:(e,t,n)=>{n.d(t,{Y:()=>i});var r=n(793),a=n(296),i=function(e,t){void 0===t&&(t=r.g.CDN),r.g.CODE_THEME.includes(e)||(e="github");var n=document.getElementById("vditorHljsStyle"),i="".concat(t,"/dist/js/highlight.js/styles/").concat(e,".css");n?n.getAttribute("href")!==i&&(n.remove(),(0,a.c)(i,"vditorHljsStyle")):(0,a.c)(i,"vditorHljsStyle")}},652:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(296),a=function(e,t){if(e&&t){var n=document.getElementById("vditorContentTheme"),a="".concat(t,"/").concat(e,".css");n?n.getAttribute("href")!==a&&(n.remove(),(0,r.c)(a,"vditorContentTheme")):(0,r.c)(a,"vditorContentTheme")}}},998:(e,t,n)=>{n.d(t,{G:()=>a,J:()=>r});var r=function(e,t){if(document.getElementById(t))return!1;var n=new XMLHttpRequest;n.open("GET",e,!1),n.setRequestHeader("Accept","text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01"),n.send("");var r=document.createElement("script");r.type="text/javascript",r.text=n.responseText,r.id=t,document.head.appendChild(r)},a=function(e,t){return new Promise((function(n,r){if(document.getElementById(t))return n(!0),!1;var a=document.createElement("script");a.src=e,a.async=!0,document.head.appendChild(a),a.onerror=function(e){r(e)},a.onload=function(){if(document.getElementById(t))return a.remove(),n(!0),!1;a.id=t,n(!0)}}))}},296:(e,t,n)=>{n.d(t,{c:()=>r});var r=function(e,t){if(!document.getElementById(t)){var n=document.createElement("link");n.id=t,n.rel="stylesheet",n.type="text/css",n.href=e,document.getElementsByTagName("head")[0].appendChild(n)}}},528:(e,t,n)=>{n.d(t,{X:()=>r});var r=function(e){return e.replace(/\u00a0/g," ")}},446:(e,t,n)=>{n.d(t,{Qf:()=>i,Wb:()=>r,on:()=>a});var r=function(){return([1e7].toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(parseInt(e,10)^window.crypto.getRandomValues(new Uint32Array(1))[0]&15>>parseInt(e,10)/4).toString(16)}))},a=function(e,t){void 0===t&&(t=window.location.search);var n=t.substring(t.indexOf("?")),r=n.indexOf("#");return new URLSearchParams(n.substring(0,r>=0?r:void 0)).get(e)},i=function(e){return Function('"use strict";return ('.concat(e,")"))()}},118:(e,t,n)=>{n.d(t,{fb:()=>a,lG:()=>r});var r=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,r=!1;n&&!r&&!n.classList.contains("vditor-reset");)n.nodeName===t?r=!0:n=n.parentElement;return r&&n},a=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,r=!1;n&&!r&&!n.classList.contains("vditor-reset");)n.classList.contains(t)?r=!0:n=n.parentElement;return r&&n}},946:(e,t,n)=>{n.d(t,{W:()=>r});var r=function(e){var t=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,r=!1;n&&!r&&!n.classList.contains("vditor-reset");)0===n.nodeName.indexOf(t)?r=!0:n=n.parentElement;return r&&n}(e,"H");return!(!t||2!==t.tagName.length||"HR"===t.tagName)&&t}},2:(e,t,n)=>{n.d(t,{T:()=>r});var r=function(){for(var e=[],t=0;t{n.d(t,{Hc:()=>r});n(793);var r=function(e){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.d(r,{default:()=>C});var e=n(386),t=n(781),a=n(379),i=n(895),o=n(169),c=n(572),s=n(702),l=function(e){void 0===e&&(e=document);var t=function(e){var t=document.createElement("img");t.src=e.getAttribute("data-src"),t.addEventListener("load",(function(){e.getAttribute("style")||e.getAttribute("class")||e.getAttribute("width")||e.getAttribute("height")||t.naturalHeight>t.naturalWidth&&t.naturalWidth/t.naturalHeightwindow.innerHeight-40&&(e.style.height=window.innerHeight-40+"px"),e.src=t.src})),e.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return e.querySelectorAll("img").forEach((function(e){e.getAttribute("data-src")&&t(e)})),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),e.querySelectorAll("img").forEach((function(e){window.vditorImageIntersectionObserver.observe(e)}))):(window.vditorImageIntersectionObserver=new IntersectionObserver((function(e){e.forEach((function(e){(void 0===e.isIntersecting?0!==e.intersectionRatio:e.isIntersecting)&&e.target.getAttribute("data-src")&&t(e.target)}))})),e.querySelectorAll("img").forEach((function(e){window.vditorImageIntersectionObserver.observe(e)})))},d=n(982),u=n(431),m=n(570),p=n(593),h=n(558),f=n(182),v=n(931),g=n(793),w=n(652),y=n(998),b=n(118),S=n(2),E=n(65),L=n(307),T=function(e,t){if(void 0===t&&(t="zh_CN"),"undefined"!=typeof speechSynthesis&&"undefined"!=typeof SpeechSynthesisUtterance){var n=function(){var e,n;return speechSynthesis.getVoices().forEach((function(r){r.lang===t.replace("_","-")&&(e=r),r.default&&(n=r)})),e||(e=n),e},r='',a='';document.getElementById("vditorIconScript")||(r='',a='');var i=document.querySelector(".vditor-speech");i||((i=document.createElement("button")).className="vditor-speech",e.insertAdjacentElement("beforeend",i),void 0!==speechSynthesis.onvoiceschanged&&(speechSynthesis.onvoiceschanged=n));var o=n(),c=new SpeechSynthesisUtterance;c.voice=o,c.onend=c.onerror=function(){i.style.display="none",speechSynthesis.cancel(),i.classList.remove("vditor-speech--current"),i.innerHTML=r},e.addEventListener(void 0!==window.ontouchstart?"touchend":"click",(function(t){var n=t.target;if(n.classList.contains("vditor-speech")||n.parentElement.classList.contains("vditor-speech"))return i.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),i.innerHTML=a):(speechSynthesis.pause(),i.innerHTML=r)):(c.text=i.getAttribute("data-text"),speechSynthesis.speak(c),i.classList.add("vditor-speech--current"),i.innerHTML=a),(0,L.Hc)(window.vditorSpeechRange),void e.focus();if(i.style.display="none",speechSynthesis.cancel(),i.classList.remove("vditor-speech--current"),i.innerHTML=r,0!==getSelection().rangeCount){var o=getSelection().getRangeAt(0),s=o.toString().trim();if(s){window.vditorSpeechRange=o.cloneRange();var l=o.getBoundingClientRect();i.innerHTML=r,i.style.display="block",i.style.top=l.top+l.height+document.querySelector("html").scrollTop-20+"px",void 0!==window.ontouchstart?i.style.left=t.changedTouches[t.changedTouches.length-1].pageX+2+"px":i.style.left=t.clientX+2+"px",i.setAttribute("data-text",s)}}}))}},k=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}s((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&c[0]?r.return:c[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;switch(r=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!a||c[1]>a[0]&&c[1]