UNPKG

@jhuix/showdowns

Version:

A lib that make markdown to html with some extensions of showdown.js.

6 lines 99.8 kB
/*! * showdowns.core.min.js v0.6.15 * Copyright (c) 2019-present, Jhuix (Hui Jin) <jhuix0117@gmail.com> * Released under the MIT License. */ "use strict";var t=require("showdown"),e=require("zlib");t.ConverterExtObj=function(e,n){let o=[],i=e;function r(e,n){if(n=n||null,t.helper.isString(e)&&(n=t.helper.stdExtName(e),e=t.asyncExtension(n),t.helper.isUndefined(e)))throw Error('Extension "'+n+'" could not be loaded. It was either not found or is not a valid aync extension.');if("function"==typeof e&&(e=e()),t.helper.isArray(e)||(e=[e]),t.validateExtension(e))for(var i=0;e.length>i;++i)if("output"===e[i].type)o.push(e[i])}n&&t.helper.forEach(n,r),this.addAsyncExtension=function(t,e){r(t,e=e||null)},this.removeAsyncExtension=function(e){t.helper.isArray(e)||(e=[e]);for(var n=0;e.length>n;++n){const t=e[n];for(var i=0;o.length>i;++i)o[i]===t&&o.splice(i,1)}},this.getAsyncExtensions=function(){return o},this.getCurrFlavor=function(){return i},this.setCurrFlavor=function(t){i=t}},t.Converter.prototype.initConvertExtObj=function(e,n){return this.extObj=new t.ConverterExtObj(e,n),this.resetOptions=function(e){e=e||{};const n=t.getOptions();let o=this.getOptions();for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);if("object"==typeof e)for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r])},this.setFlavor=function(e){let n=t.getFlavorOptions(e);if(t.helper.isUndefined(n))return;this.extObj.setCurrFlavor(e);let o=t.getDefaultOptions(!0);for(var i in o)o.hasOwnProperty(i)&&(this.getOptions()[i]=o[i]);for(var i in n)n.hasOwnProperty(i)&&(this.getOptions()[i]=n[i])},this.getFlavor=function(){return this.extObj.getCurrFlavor()},this.addAsyncExtension=function(t,e){this.extObj.addAsyncExtension(t,e)},this.removeAsyncExtension=function(t){this.extObj.removeAsyncExtension(t)},this.removeExtension=function(e){t.helper.isArray(e)||(e=[e]);const n=this.getAllExtensions();let o=n.language,i=n.output;for(var r=0;e.length>r;++r){const t=e[r];for(var a=0;o.length>a;++a)o[a]===t&&o.splice(a,1);for(var s=0;i.length>s;++s)i[s]===t&&i.splice(s,1)}},this.asyncMakeHtml=function(t,e){const n=this.makeHtml(t),o=this.extObj.getAsyncExtensions();if(!o.length)return Promise.resolve({html:n});var i={outputs:o,converter:this};const r=(new DOMParser).parseFromString(n,"text/html"),a=void 0!==r.body?r.body:r,s=this.getOptions();let l=Promise.resolve({wrapper:a,options:s,globals:i,scripts:[],cssLinks:[]});return o.forEach(function(t){l=l.then(e=>{const n=t.filter(e);return n||e})}),l.then(t=>{if("function"==typeof e&&e){const n=e(t);if(n instanceof Promise)return n.then(t=>({html:t.wrapper.innerHTML,extras:t.extras,scripts:t.scripts,cssLinks:t.cssLinks}))}return{html:t.wrapper.innerHTML,extras:t.extras,scripts:t.scripts,cssLinks:t.cssLinks}})},this},t.subParser("githubCodeBlocks",function(e,n,o){return n.ghCodeBlocks?(e=o.converter._dispatch("githubCodeBlocks.before",e,n,o),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*?)(?:[ \t]*?)((?:\{[\S\t ]*\}|\[[\S\t ]*\])?)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,i,r,a,s){var l=n.omitExtraWLInCodeBlocks?"":"\n";return s=t.subParser("encodeCode")(s,n,o),s="<pre><code"+(r?' class="'+r+" language-"+r+'"':"")+(a?` data-lang='${a}'`:"")+">"+(s=(s=(s=t.subParser("detab")(s,n,o)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+l+"</code></pre>",s=t.subParser("hashBlock")(s,n,o),"\n\n¨G"+(o.ghCodeBlocks.push({text:e,codeblock:s})-1)+"G\n\n"})).replace(/¨0/,""),o.converter._dispatch("githubCodeBlocks.after",e,n,o)):e}),t.subParser("tables",function(e,n,o){if(!n.tables)return e;function i(t){return/^:[ \t]*--*$/.test(t)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(t)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(t)?' style="text-align:center;"':""}function r(e,i){var r="";return e=e.trim(),(n.tablesHeaderId||n.tableHeaderId)&&(r=' id="'+e.replace(/ /g,"_").toLowerCase()+'"'),"<th"+r+i+">"+(e=t.subParser("spanGamut")(e,n,o))+"</th>\n"}function a(e,i,r,a,s){if(n.tablesMerge){var l=function(t,e,o,i){if(i){if(!n.tablesRowspan||"^^"!==i||!e)return;for(var r=e-1;r>=0;--r)if(t[r][o]){if("^^"!==t[r][o])return t[r][o]=t[r][o].replace(/rowspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,function(t,n,o){return n+' rowspan="'+(e-r+1)+'"'+o}),i;if(0===r)return t[r][o]='<td rowspan="'+(e-r+1)+'"></td>\n',i}else for(var a=o-1;a>=0;-a){if(t[r+1][a]&&"^^"!==t[r+1][a])return;if(t[r][a]){if(!t[r+1][a])return;return t[r][a]=t[r][a].replace(/rowspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,function(t,n,o){return n+' rowspan="'+(e-r+1)+'"'+o}),i}}}else if(o)for(a=o-1;a>=0;--a)if(t[e][a]){if("^^"!==t[e][a])return t[e][a]=t[e][a].replace(/colspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,function(t,e,n){return e+' colspan="'+(o-a+1)+'"'+n}),i;for(r=e-1;r>=0;--r){if(t[r][a+1])return;if("^^"!==t[r][a])return t[r][a]=t[r][a].replace(/colspan="[0-9]*"/g,"").replace(/^(<td[^<>\n\r]*?)(>.*<\/td>\n)/,function(t,e,n){return e+' colspan="'+(o-a+1)+'"'+n}),i}}else if(0===a)return t[e][a]='<td colspan="'+(o-a+1)+'"></td>\n',i}(e,i,r,a);if(!t.helper.isUndefined(l))return l}return a=a.trim(),"<td"+s+">"+t.subParser("spanGamut")(a,n,o)+"</td>\n"}function s(e,s){var l,u=e.split("\n");for(l=0;u.length>l;++l)/^ {0,3}\|/.test(u[l])&&(u[l]=u[l].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(u[l])&&(u[l]=u[l].replace(/\|[ \t]*$/,"")),u[l]=t.subParser("codeSpans")(u[l],n,o);var c=[],d=[],p=[],h=[],m=[];if(s)for(c=u[0].split("|").map(function(t){return t.trim()}),u.shift(),l=0;c.length>l;++l)h.push(i(c[l]));else{var f=u[0].split("|").map(function(t){return t.trim()});if(c=u[1].split("|").map(function(t){return t.trim()}),u.shift(),u.shift(),c.length>f.length)return e;for(l=0;c.length>l;++l)h.push(i(c[l]));for(l=0;f.length>l;++l)t.helper.isUndefined(h[l])&&(h[l]=""),p.push(r(f[l],h[l]))}for(l=0;u.length>l;++l)""!==u[l].trim()&&d.push(u[l].split("|").map(function(t){var e=t.trim();return""===e&&t.length>0?t:e}));for(l=0;d.length>l;++l){var g=[];m.push(g);for(var y=0;h.length>y;++y)t.helper.isUndefined(d[l][y])&&(d[l][y]=""),g.push(a(m,l,y,d[l][y],h[y]))}return function(t,e,o){var i="<table>\n",r=e.length;if(t.length){i+="<thead>\n<tr>\n";for(var a=0;t.length>a;++a)i+=t[a];i+="</tr>\n</thead>\n"}for(i+="<tbody>\n",a=0;o.length>a;++a){i+="<tr>\n";for(var s=0;r>s;++s)n.tablesMerge&&"^^"===o[a][s]||(i+=o[a][s]);i+="</tr>\n"}return i+"</tbody>\n</table>\n"}(p,h,m)}function l(t){return s(t,!1)}function u(t){return s(t,!0)}return e=(e=(e=(e=o.converter._dispatch("tables.before",e,n,o)).replace(/\\(\|)/g,t.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,l)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,l),n.tablesHeaderless&&(e=(e=e.replace(/^ {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,u)).replace(/^ {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,u)),e=o.converter._dispatch("tables.after",e,n,o)});let n="vanilla",o={github:{ghCompatibleHeaderId:!1,underline:!0,rawHeaderId:!0,tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},ghost:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0},allOn:{tablesHeaderless:!0,tablesMerge:!0,tablesRowspan:!0}},i={};t.asyncExtension=function(e,n){if(!t.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=t.helper.stdExtName(e),t.helper.isUndefined(n)){if(!i.hasOwnProperty(e))throw Error("Async Extension named "+e+" is not registered!");return i[e]}"function"==typeof n&&(n=n()),t.helper.isArray(n)||(n=[n]),t.validateExtension(n)&&(i[e]=n)},t.removeAsyncExtension=function(e){e=t.helper.stdExtName(e),delete i[e]},t.resetAsyncExtensions=function(){i={}},t.removeExtension=function(e){e=t.helper.stdExtName(e),delete t.getAllExtensions[e]};const r=t.setFlavor,a=t.getFlavorOptions;function s(t){return`${(new Date).Format("yyyy-MM-dd HH:mm:ss.S")} ${t}`}t.setFlavor=function(e){try{if(r(e),n=e,!o.hasOwnProperty(e))return}catch{if(!o.hasOwnProperty(e))return;t.resetOptions(),n=e}var i=o[e];for(var a in i)i.hasOwnProperty(a)&&(t.getOptions()[a]=i[a])},t.getFlavor=function(){return n},t.setFlavorOptions=function(t,e){e&&(o[t]=Object.assign(o[t]||{},e))},t.getFlavorOptions=function(e){const n=a(e);return t.helper.isUndefined(n)?o.hasOwnProperty(e)?o[e]:void 0:o.hasOwnProperty(e)?Object.assign(n,o[e]):n},Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};t||(t="yyyy-MM-dd hh:mm:ss.S");const n=/(y+)/.exec(t);n&&(t=t.replace(n[1],(this.getFullYear()+"").substring(4-n[1].length)));for(const n in e){const o=RegExp("("+n+")").exec(t);if(o){let i=e[n];1==o[1].length?i=("000"+e[n]).substring((""+e[n]).length):2==o[1].length&&(i=("00"+e[n]).substring((""+e[n]).length)),t=t.replace(o[1],i)}}return t};let l="jsdelivr",u="file:"===document.location.protocol?"https://":document.location.protocol+"//",c="",d="",p="";const h={local:{ABCJS:"../node_modules/abcjs/dist/abcjs-basic.js",ABCJSCSS:"../node_modules/abcjs/abcjs-audio.css",echarts:"../node_modules/echarts/dist/echarts.js",Viz:"../node_modules/@viz-js/viz/lib/viz-standalone.js",Raphael:"../node_modules/raphael/raphael.min.js",flowchart:"../dist/diagrams/flowchart/flowchart.min.js",mermaid:"../node_modules/mermaid/dist/mermaid.js",katex:"../node_modules/katex/dist/katex.min.js",katexCSS:"../node_modules/katex/dist/katex.min.css",renderMathInElement:"../node_modules/katex/dist/contrib/auto-render.js",railroad:"../node_modules/railroad-diagrams/railroad-diagrams.js",railroadCSS:"../node_modules/railroad-diagrams/railroad-diagrams.css",Snap:"../node_modules/snapsvg/dist/snap.svg-min.js",WebFont:"../node_modules/webfontloader/webfontloader.js",underscore:"../node_modules/underscore/underscore-min.js",sequence:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.js",sequenceCSS:"../node_modules/@rokt33r/js-sequence-diagrams/dist/sequence-diagram-min.css",WaveDrom:"../node_modules/wavedrom/wavedrom.min.js",WaveDromSkin:{default:"../node_modules/wavedrom/skins/default.js",lowkey:"../node_modules/wavedrom/skins/lowkey.js",narrow:"../node_modules/wavedrom/skins/narrow.js"},vega:"../node_modules/vega/build/vega.min.js",vegaLite:"../node_modules/vega-lite/build/vega-lite.min.js",vegaEmbed:"../node_modules/vega-embed/build/vega-embed.min.js"},cdnjs:{ABCJS:u+"cdnjs.cloudflare.com/ajax/libs/abcjs/6.5.1/abcjs-basic-min.js",ABCJSCSS:u+"cdn.jsdelivr.net/npm/abcjs@6/abcjs-audio.css",echarts:u+"cdnjs.cloudflare.com/ajax/libs/echarts/5.6.0/echarts.min.js",Viz:u+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:u+"cdnjs.cloudflare.com/ajax/libs/raphael/2.3.0/raphael.min.js",flowchart:u+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:u+"cdnjs.cloudflare.com/ajax/libs/mermaid/11.6.0/mermaid.min.js",katex:u+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.22/katex.min.js",katexCSS:u+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.22/katex.min.css",renderMathInElement:u+"cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.22/contrib/auto-render.js",railroad:u+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.js",railroadCSS:u+"cdnjs.cloudflare.com/ajax/libs/railroad-diagrams/1.0.0/railroad-diagrams.css",Snap:u+"cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js",WebFont:u+"cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js",underscore:u+"cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.7/underscore-min.js",sequence:u+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:u+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:u+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/wavedrom.min.js",WaveDromSkin:{default:u+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/default.js",lowkey:u+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/lowkey.js",narrow:u+"cdnjs.cloudflare.com/ajax/libs/wavedrom/3.5.0/skins/narrow.js"},vega:u+"cdnjs.cloudflare.com/ajax/libs/vega/6.1.2/vega.min.js",vegaLite:u+"cdnjs.cloudflare.com/ajax/libs/vega-lite/6.1.0/vega-lite.min.js",vegaEmbed:u+"cdnjs.cloudflare.com/ajax/libs/vega-embed/7.0.2/vega-embed.min.js"},jsdelivr:{ABCJS:u+"cdn.jsdelivr.net/npm/abcjs@6/dist/abcjs-basic-min.js",ABCJSCSS:u+"cdn.jsdelivr.net/npm/abcjs@6/abcjs-audio.css",echarts:u+"cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js",Viz:u+"cdn.jsdelivr.net/npm/@viz-js/viz@3/lib/viz-standalone.js",Raphael:u+"cdn.jsdelivr.net/npm/raphael@2/raphael.min.js",flowchart:u+"cdnjs.cloudflare.com/ajax/libs/flowchart/1.18.0/flowchart.min.js",mermaid:u+"cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js",katex:u+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.js",katexCSS:u+"cdn.jsdelivr.net/npm/katex@0/dist/katex.min.css",renderMathInElement:u+"cdn.jsdelivr.net/npm/katex@0/dist/contrib/auto-render.js",railroad:u+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.js",railroadCSS:u+"cdn.jsdelivr.net/npm/railroad-diagrams@1/railroad-diagrams.css",Snap:u+"cdn.jsdelivr.net/npm/snapsvg@0/dist/snap.svg-min.js",WebFont:u+"cdn.jsdelivr.net/npm/webfontloader@1/webfontloader.js",underscore:u+"cdn.jsdelivr.net/npm/underscore@1/underscore-min.js",sequence:u+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.js",sequenceCSS:u+"cdn.jsdelivr.net/npm/@rokt33r/js-sequence-diagrams@2.0.6-2/dist/sequence-diagram-min.css",WaveDrom:u+"cdn.jsdelivr.net/npm/wavedrom@3/wavedrom.min.js",WaveDromSkin:{default:u+"cdn.jsdelivr.net/npm/wavedrom@3/skins/default.js",lowkey:u+"cdn.jsdelivr.net/npm/wavedrom@3/skins/lowkey.js",narrow:u+"cdn.jsdelivr.net/npm/wavedrom@3/skins/narrow.js"},vega:u+"cdn.jsdelivr.net/npm/vega@6/build/vega.min.js",vegaLite:u+"cdn.jsdelivr.net/npm/vega-lite@6/build/vega-lite.min.js",vegaEmbed:u+"cdn.jsdelivr.net/npm/vega-embed@7/build/vega-embed.min.js"}};function m(){return l}function f(t){if("object"==typeof t){const e=Object.keys(t)[0],n=t[e];if("string"==typeof n)return e+"-"+n}return t}function g(t,e,n,o){if(void 0!==n&&n||(n=m()),h.hasOwnProperty(n)){const i=h[n];let r="";if("object"==typeof e){const t=Object.keys(e)[0],n=e[t];i[t]&&"string"==typeof n&&n&&i[t][n]&&(r=i[t][n])}else i[e]&&(r=i[e]);r&&(o=t||r.substring(0,u.length)===u?r:"../dist/"===r.substring(0,8)?d+r:c+r)}return o}const y={setCDN:function(t,e,n,o){t in h&&(l=t),"string"==typeof e&&e&&(c=e),"string"==typeof n&&n&&(d=n),"string"==typeof o&&o&&("/"!==p.at(p.length-1)&&(o+="/"),p=o)},getCDN:m,getUrl:function(t){try{const e=new URL(t);if("dist:"===e.protocol)return t="../dist/"===(t=t.substring(e.protocol.length+2)).substring(0,8)?d+t:c+t;if("file:"===e.protocol&&p){return t=new URL(p).origin+"/"+t.substring(8)}}catch{if(p){const e="./";t.substring(0,e.length)===e&&(t=t.substring(e.length)),t=p+t}}return t},getSrc:g,loadScript:function(t,e){return new Promise((n,o)=>{t&&"undefined"!=typeof document||o("Args is invaild!"),void 0===e&&(e=""),(e=g(!1,t,e))||o(t+" script source invaild!");const i="script-"+f(t).toLowerCase();let r=document.getElementById(i);if(r)return n(t);const a=document.head||document.getElementsByTagName("head")[0];r=document.createElement("script"),r.src=e,r.id=i,r.onload=()=>{n(t)},a.appendChild(r)})},unloadScript:function(t){t=f(t);const e=document.getElementById("script-"+t.toLowerCase());if(e){(document.head||document.getElementsByTagName("head")[0]).removeChild(e)}},loadStyleSheet:function(t,e){if(!t||"undefined"==typeof document)return"";if(void 0===e&&(e=""),!(e=g(!1,t,e)))return"";const n="css-"+f(t).toLowerCase();if(!document.getElementById(n)){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("link");i.rel="stylesheet",i.href=e,i.id=n,o.appendChild(i)}return"local"===l?"":e},unloadStyleSheet:function(t){t=f(t);const e=document.getElementById("css-"+t.toLowerCase());if(e){(document.head||document.getElementsByTagName("head")[0]).removeChild(e)}}};const v={interopDefault:function(t){return t&&"object"==typeof t&&"default"in t?t.default:t},loadStyle:function(t,e){if(!t||!e||"undefined"==typeof document)return!1;const n="css-"+t.toLowerCase();if(!document.getElementById(n)){const t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.id=n,o.type="text/css",o.innerText=e,t.appendChild(o)}return!0},loadStylesheet:function(t,e){if(!t||"undefined"==typeof document)return!1;let n=null;if(e&&(n=document.getElementById(e)),!n){const n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("link");o.rel="stylesheet",o.href=t,e&&(o.id=e),n.appendChild(o)}return!0},loadScript:function(t,e,n){return new Promise((o,i)=>{if(!t||!e||"undefined"==typeof document)return i("Args is invaild!");let r=document.getElementById(t);if(r)return o(!0);n?"string"==typeof n&&(n=document.querySelector(n)):n=document.body,r=document.createElement("script"),r.id=t,r.type="text/javascript",r.text=e,n.appendChild(r),o(!0)})},removeAllStylesheet:function(t){if(!t)return;const e=document.head||document.getElementsByTagName("head")[0];e.querySelectorAll("link").forEach(n=>{n.id&&n.id.substring(0,t.length)===t&&e.removeChild(n)})},renderCacheElement:function(t,e,n,o){"undefined"!=typeof window&&window.document&&(t=window.document);const i=t.createElement("div");if(i.id=e,i.className=n,i.style.display="none",t.body.appendChild(i),"function"==typeof o&&o){const e=o(i);if(e instanceof Promise)return e.then(e=>{t.body.removeChild(e),e.style.display=""}),i.outerHTML}return t.body.removeChild(i),i.style.display="",i.outerHTML},renderElement:function(t,e,n){"undefined"!=typeof window&&window.document&&(t=window.document);const o=t.createElement("div");return o.id=e,o.className=n,t.body.appendChild(o),o},createElementMeta:function(t,e,n){const o=e.dataset.lang,i=o?JSON.parse(o):null;let r="";if(i){if("boolean"==typeof i.codeblock&&i.codeblock||"string"==typeof i.codeblock&&"true"===i.codeblock.toLowerCase())return!1;i.align&&("center"===i.align?r="diagram-center":"right"===i.align&&(r="diagram-right")),i.width&&"string"!=typeof i.width&&(i.width=i.width+"px"),i.height&&"string"!=typeof i.height&&(i.height=i.height+"px")}let a=e.textContent.trim();n&&"function"==typeof n&&(a=n(a));const s=(e.classList.length>0?e.classList[0]:"")+(e.className&&r?" ":"")+r,l=t.toLowerCase()+"-"+Date.now()+"-"+Math.floor(1e4*Math.random());return e.id=l,{id:l,container:l+"-container",className:s,data:a,element:e,lang:i}},addCssLink:function(t,e,n){return t.cssLinks?Array.isArray(t.cssLinks)||(t.cssLinks=[t.cssLinks]):t.cssLinks=[],t.cssLinks.push({id:n,link:e}),t},addScript:function(t,e){return t.scripts?Array.isArray(t.scripts)||(t.scripts=[t.scripts]):t.scripts=[],t.scripts.push(e),t},addExtra:function(t,e){return t.extras?Array.isArray(t.extras)||(t.extras=[t.extras]):t.extras=[],t.extras.push(e),t},hashString:function(t){let e=0;for(let n=0;t.length>n;n++){const o=t.charCodeAt(n);e=Math.imul(31,e)+o|0}return e>>>0}},w="abc",x="ABCJSCSS";if("undefined"==typeof window)throw Error("The showdown abcjs extension can only be used in browser environment!");if(void 0===b)var b=window.ABCJS||void 0;function S(){return!!b}let k=!1;function E(){if(void 0===t)var t=window.ABCJS||void 0;function e(t){const e=this;e.onReady=function(){},e.onStart=function(){const e=document.querySelector("#"+t+" svg"),n=document.createElementNS("http://www.w3.org/2000/svg","line");n.setAttribute("class","abcjs-cursor"),n.setAttributeNS(null,"x1",0),n.setAttributeNS(null,"y1",0),n.setAttributeNS(null,"x2",0),n.setAttributeNS(null,"y2",0),e.appendChild(n)},e.beatSubdivisions=2,e.onBeat=function(t,e,n){},e.onEvent=function(e){if(e.measureStart&&null===e.left)return;const n=document.querySelectorAll("#"+t+" svg .highlight");for(let t=0;n.length>t;t++)n[t].classList.remove("highlight");for(let t=0;e.elements.length>t;t++){const n=e.elements[t];for(let t=0;n.length>t;t++)n[t].classList.add("highlight")}const o=document.querySelector("#"+t+" svg .abcjs-cursor");o&&(o.setAttribute("x1",e.left-2),o.setAttribute("x2",e.left-2),o.setAttribute("y1",e.top),o.setAttribute("y2",e.top+e.height))},e.onFinished=function(){const e=document.querySelectorAll("#"+t+" svg .highlight");for(let t=0;e.length>t;t++)e[t].classList.remove("highlight");const n=document.querySelector("#"+t+" svg .abcjs-cursor");n&&(n.setAttribute("x1",0),n.setAttribute("x2",0),n.setAttribute("y1",0),n.setAttribute("y2",0))}}window.abcEnv={abcOptions:{add_classes:!0,responsive:"resize"},setTune(e,n,o){const i=e.id,r=e.data;if(!o)return void t.renderAbc(i,r,this.abcOptions);o.disable(!0);const a=t.renderAbc(i,r,this.abcOptions)[0];(new t.synth.CreateSynth).init({visualObj:a}).then(function(t){o.setTune(a,n).then(function(t){console.log("Audio successfully loaded.")}).catch(function(t){console.warn("Audio problem:",t)})}).catch(function(t){console.warn("Audio problem:",t)})},load(n,o){let i;if(n){const r="#"+n;t.synth.supportsAudio()?(i=new t.synth.SynthController,i.load(r,new e(o.id),{displayLoop:!0,displayRestart:!0,displayPlay:!0,displayProgress:!0,displayWarp:!0})):document.querySelector(r).innerHTML="<div class='audio-error'>Audio is not supported in this browser.</div>"}this.setTune(o,!1,i)}}}function j(t,e){const n=function(){window.abcEnv.load(t,e)};return n.toString=function(){return`function(){\n const audio = '${t}';\n const render = ${JSON.stringify(e)};\n window.abcEnv.load(audio, render);\n }`},n}function A(t,e,n){if(S()){const o=n.id,i=n.className,r=n.container;let a="";n.lang&&(n.lang.width&&(a+=`width:${n.lang.width};`),n.lang.height&&(a+=`height:${n.lang.height};`));let s="";if(a?(s+=`<div id="${r}" class="${i}" style="${a}">`,s+=`<div id="${o}" style="width:100%;height:100%;display:inline-block"></div>`):(s+=`<div id="${r}" class="${i}">`,s+=`<div id="${o}"></div>`),!n.lang||!n.lang.audio){const e=n.data,i=n.element.ownerDocument;s+="</div>",n.element.parentNode.outerHTML=s;const r=i.getElementById(o);return b.renderAbc(r,e,{add_classes:!0,responsive:"resize"}),t(!0)}const l=n.cssLink,u=n.data,c=o+"-audio";s+=a?l?`<div id="${c}" style="width:100%;height:100%;display:inline-block" class="css-abc" data-css="${l}"></div>`:`<div id="${c}" style="width:100%;height:100%;display:inline-block"></div>`:l?`<div id="${c}" class="css-abc" data-css="${l}"></div>`:`<div id="${c}"></div>`,s+="</div>",n.element.parentNode.outerHTML=s;const d={id:r,code:j(c,{id:o,class:i,data:u}),host:"#"+r};return e.push(d),t(!0)}setTimeout(()=>{A(t,e,n)},10)}function C(t,e){return new Promise(n=>{let o=v.createElementMeta(w,t);if(!o)return n(!1);o.cssLink=y.getSrc(!0,x),A(n,e,o)})}function L(t,e){const n={outer:[{name:"ABCJS",src:y.getSrc(!1,"ABCJS","jsdelivr")}],id:"abcjs-ext",code:E,inner:[]};return e.push(n),function(){const t=S();if("undefined"!=typeof window){if(k)return t;t||(k=!0,y.loadStyleSheet(x),v.loadStyle("abc-audio",".highlight{fill: #0a9ecc;} .abcjs-cursor{stroke: red;} .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed{border: none;} .abcjs-inline-audio .abcjs-midi-loop.abcjs-pushed svg path{fill: #6eaa49;}"),y.loadScript("ABCJS").then(t=>{b=v.interopDefault(window[t])}))}}(),new Promise(e=>{const o=[];t.forEach(t=>{o.push(C(t,n.inner))}),Promise.all(o).then(()=>{e(!0)})})}function $(){return[{type:"output",filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll(`code.${w}.language-${w}`);return!!n.length&&(this.config={cssLink:y.getSrc(!0,x)},v.addCssLink(t,this.config.cssLink,"css-abc"),console.log(s(`Begin render ${w} elements.`)),L(n,t.scripts).then(()=>(console.log(s(`End render ${w} elements.`)),t)))}}]}const O=["h1","h2","h3","h4","h5","h6"],N=RegExp("^([\\[【]Table[ -]Of[ -]Contents[\\]】]|[\\[【]目录[\\]】]|[\\[【]TOC[\\]】]|\\{\\{TOC\\}\\})$","i");function q(t,e,n,o,i){try{if(i){if(o>1){const t=n.parentNode;t&&"UL"===t.tagName&&t.classList.add("toc-multi")}const e=n.querySelector("div");if(e){e.classList.remove("toc-title"),e.classList.add("toc-multi-title");const t=e.querySelector("i");t&&(t.classList.remove("toc-chapter"),t.classList.add("toc-multi-chapter"),t.innerHTML='<svg class="icon" aria-hidden="true"><use xlink:href="#icon-expand"></use></svg>')}(n=n.appendChild(t.ownerDocument.createElement("ul"))).classList.add(o>1?"toc-level-"+o:"toc-main")}if(n=n.appendChild(t.ownerDocument.createElement("li")),e){const i=n.appendChild(t.ownerDocument.createElement("div"));i.classList.add("toc-title-"+o,"toc-title");const r=i.appendChild(t.ownerDocument.createElement("i"));r.classList.add("iconfont","toc-chapter"),r.innerHTML='<svg class="icon" aria-hidden="true"><use xlink:href="#icon-chapter-l"></use></svg>';const a=i.appendChild(t.ownerDocument.createElement("a"));a.appendChild(t.ownerDocument.createTextNode(e.textContent)),a.href="#"+e.id}}catch{console.warn(s("append child error:"),t)}return n}function T(t,e,n,o){if(n.headingLevel>=o){let i=null;for(;n&&n.headingLevel>=o;)i=n,n=i.parentNode,i.parentNode=null,i.toc=null,i.headingLevel=null,i.preLevel=null;return n&&T(t,e,n,o),n}if(o>n.preLevel){for(n.preLevel++;o>n.preLevel;)n.toc=q(t,null,n.toc,o,!0),n.preLevel++;n.toc=q(t,e,n.toc,o,!0)}else{for(;n.preLevel>o;)n.toc&&(n.toc=n.toc.parentNode),n.toc&&(n.toc=n.toc.parentNode),n.preLevel--;n.toc&&(n.toc=n.toc.parentNode),n.toc=q(t,e,n.toc,o,!1)}return n.parentNode&&T(t,e,n.parentNode,o),n}function M(){if(!document.querySelector("#total-showdown-toc"))return;const t=document.querySelector("#toc-fold-icon");t&&(t.onclick=e=>{const n=document.querySelectorAll(".total-toc ul"),o=document.querySelectorAll(".total-toc ul:not(.toc-main) .toc-multi-chapter use");if("toc-expand"===t.dataset.name)return n.forEach(t=>{t.classList.contains("toc-main")||t.classList.contains("toc-level-2")||t.classList.add("hidden")}),o.forEach(t=>{t.setAttributeNS("http://www.w3.org/1999/xlink","href","#icon-collapse")}),void(t.dataset.name="toc-fold");n.forEach(t=>{t.classList.remove("hidden")}),o.forEach(t=>{t.setAttributeNS("http://www.w3.org/1999/xlink","href","#icon-expand")}),t.dataset.name="toc-expand"});const e=document.querySelector("#toc-close-icon");e&&(e.onclick=t=>{const e=document.querySelector("#total-showdown-toc");e&&e.classList.add("hidden");const n=document.querySelector("#toc-switch-button");n&&n.classList.remove("hidden")});const n=document.querySelector("#toc-switch-button");n&&(n.onclick=t=>{t.currentTarget.classList.add("hidden");const e=document.querySelector("#total-showdown-toc");e&&e.classList.remove("hidden")});document.querySelectorAll(".total-toc .toc-multi-chapter").forEach(t=>{t.onclick=t=>{let e=t.currentTarget.parentNode;if(!e)return;if(e=e.parentNode,!e)return;const n=e.querySelectorAll("ul"),o=e.querySelectorAll(".toc-multi-chapter use"),i=t.currentTarget.querySelector("use");if(i){if("#icon-expand"===i.getAttributeNS("http://www.w3.org/1999/xlink","href"))return n.forEach(t=>{t.classList.add("hidden")}),void o.forEach(t=>{t.setAttributeNS("http://www.w3.org/1999/xlink","href","#icon-collapse")});n.forEach(t=>{t.classList.remove("hidden")}),o.forEach(t=>{t.setAttributeNS("http://www.w3.org/1999/xlink","href","#icon-expand")})}}})}function D(){return[{type:"output",config:{},filter:function(t){if("string"==typeof t){const e=(new DOMParser).parseFromString(t,"text/html"),n=void 0!==e.body?e.body:e;return function(t,e){let n=null,o=0,i=null,r=!1,a=!1,s=null;e.extraDocs=[],e.extraDocs.push('<div id="toc-svgs" class="hidden"><svg aria-hidden="true" style="position: absolute; width: 0px; height: 0px; overflow: hidden;"><symbol id="icon-chapter-s" viewBox="0 0 1024 1024"><path d="M725.108359 579.864261c11.519371-117.753568-94.714826-195.829303-165.110981-247.666471l-10.879406-7.679581-21.118846-15.359161c-40.317798-28.798427-81.915525-58.876784-95.994756-95.994756-15.999126-41.597728-13.439266-74.235945 7.67958-97.274686 26.878532-29.438392 90.235071-35.838042 120.313428-11.519371 26.238567 20.478881 26.878532 53.117098 24.958637 70.396154-2.55986 24.318672 14.719196 46.717448 39.037867 49.917274 24.318672 2.55986 46.717448-14.719196 49.917274-39.037868 7.039615-60.796679-14.079231-115.833673-58.236819-151.03175C547.838042-19.143018 432.644335-8.903578 373.127586 55.732892c-44.157588 47.997378-53.117098 115.193708-24.958637 189.429652 8.319546 23.038742 21.758811 42.877658 37.117973 60.156714-36.478007 34.558112-73.59598 78.075735-79.355665 138.872414C294.411886 561.94524 400.646083 640.020975 471.042237 691.858143l10.879406 7.679581 21.118846 15.359161c40.317798 28.798427 81.915525 58.876784 95.994757 95.994756 15.999126 41.597728 13.439266 74.235945-7.679581 97.274686-26.878532 29.438392-90.235071 35.838042-120.313428 11.519371-26.238567-20.478881-26.878532-53.117098-24.958636-70.396154 2.55986-24.318672-14.719196-46.717448-39.037868-49.917274s-46.717448 14.719196-49.917273 39.037868c-7.039615 60.796679 14.079231 115.833673 58.236819 151.03175 29.438392 23.038742 67.196329 34.558112 106.234197 34.558112 50.557238 0 102.394407-19.198951 135.672589-55.676959 44.157588-47.997378 53.117098-115.193708 24.958636-189.429652-8.319546-23.038742-21.758811-42.877658-37.117972-60.156714 36.478007-34.558112 74.235945-78.075735 79.99563-138.872414z m-201.588988 39.677833c-60.156714-44.157588-135.672589-99.834547-129.272939-166.390911 3.199825-33.278182 28.158462-60.156714 57.596854-87.675211 7.679581 5.759685 15.999126 11.519371 23.678707 17.279056 7.039615 5.11972 13.439266 9.599476 19.838916 14.719196l10.879406 8.319546c60.156714 44.157588 135.672589 99.834547 129.272938 166.39091-3.199825 33.278182-28.158462 60.156714-57.596854 87.675211-8.319546-5.759685-15.999126-11.519371-23.678706-17.279056-7.039615-5.11972-13.439266-9.599476-19.838917-14.719196l-10.879405-8.319545z"></path></symbol><symbol id="icon-chapter-l" viewBox="0 0 1024 1024"><path d="M791.272727 11.636364a81.454545 81.454545 0 0 1 81.175273 74.752L872.727273 93.090909v884.363636a34.909091 34.909091 0 0 1-51.060364 30.999273l-4.142545-2.606545-142.615273-101.888-142.615273 101.934545a34.909091 34.909091 0 0 1-30.813091 4.840727l-5.026909-2.048-4.747636-2.792727L349.090909 903.912727l-142.615273 101.934546a34.955636 34.955636 0 0 1-53.946181-18.944l-0.93091-4.654546L151.272727 977.454545V93.090909A81.454545 81.454545 0 0 1 226.024727 11.915636L232.727273 11.636364h558.545454z m-139.636363 605.090909H372.363636l-4.747636 0.325818A34.909091 34.909091 0 0 0 372.363636 686.545455h279.272728l4.747636-0.325819A34.909091 34.909091 0 0 0 651.636364 616.727273z m0-186.181818H372.363636l-4.747636 0.325818A34.909091 34.909091 0 0 0 372.363636 500.363636h279.272728l4.747636-0.325818A34.909091 34.909091 0 0 0 651.636364 430.545455z m0-186.181819H372.363636l-4.747636 0.325819A34.909091 34.909091 0 0 0 372.363636 314.181818h279.272728l4.747636-0.325818A34.909091 34.909091 0 0 0 651.636364 244.363636z"></path></symbol><symbol id="icon-toc" viewBox="0 0 1024 1024"><path d="M62.500473 512.163729l61.447491-40.958854 387.221112 202.039529L898.394281 471.204875l61.443397 40.958854-448.668603 244.728794L62.500473 512.163729zM62.500473 308.228013l448.668603-244.732887 448.668603 244.732887-448.668603 244.724701L62.500473 308.228013zM511.169075 877.18012l387.225205-202.035436 61.443397 40.958854L511.169075 960.836425 62.500473 716.104561l61.447491-40.958854L511.169075 877.18012z"></path></symbol><symbol id="icon-collapse" viewBox="0 0 1024 1024"><path d="M85.781832 219.399571h73.720856c20.35996 0 36.879928-16.359968 36.879928-36.559928s-16.519968-36.559929-36.879928-36.559929h-73.719856c-20.35996 0-36.860928 16.359968-36.860928 36.559929 0 20.199961 16.499968 36.559929 36.859928 36.559928zM50.462901 475.419071c0 20.199961 16.500968 36.579929 36.859928 36.579929h72.179859c20.35996 0 36.879928-16.379968 36.879928-36.579929s-16.519968-36.579929-36.879928-36.579928h-72.179859c-20.35996 0-36.859928 16.379968-36.859928 36.579928z m145.919715 292.577429c0-20.199961-16.519968-36.595929-36.879928-36.595929h-73.719856c-20.35996 0-36.860928 16.395968-36.860928 36.595929 0 20.180961 16.499968 36.562929 36.859928 36.562929h73.720856c20.35996 0 36.879928-16.381968 36.879928-36.562929z"></path><path d="M933.660176 38.839924l-73.718856-2.279995c0-20.198961-16.519968-36.559929-36.879928-36.559929h-661.998707c-20.35996 0-36.879928 16.359968-36.879928 36.559929v70.879861h36.879928s73.359857 6.840987 73.359857 73.140857c0 0 0.779998 73.279857-75.239853 73.279857l-34.999932 2.119996 0.759999 144.019719 34.399933-0.02s75.879852-0.02 75.879852 77.699848c0 0-7.057986 70.879862-76.179852 70.879862l-34.699932 0.019-0.619999 143.980718h36.740929s73.559856 2.279996 73.559856 75.437853c0 0-0.14 75.402853-76.179851 75.402853l-33.199935-2.279996-0.46 73.159857s42.239918 109.718786 106.759792 109.718786h705.018623s34.557933-6.877987 34.557932-34.298933V75.421853s-6.899987-36.580929-36.859928-36.580929zM306.9634 255.9795h479.238064v292.579429h-479.239064V255.9795zM897.939246 916.55821s1.159998 34.279933-37.999926 34.279933H233.243544s-38.019926-12.559975-38.019925-37.719926l627.838773-0.36c20.35996 0 36.879928-16.379968 36.879928-36.579928V69.719864l37.998926 12.559975v834.278371z"></path><path d="M694.042644 329.119357H399.14022c-10.19998 0-18.439964 8.199984-18.439964 18.319964 0 10.07998 8.239984 18.259964 18.439964 18.259965h294.901424c10.17898 0 18.418964-8.179984 18.418964-18.259965 0-10.11898-8.239984-18.319964-18.419964-18.319964z m0 109.719786H399.14022c-10.19998 0-18.439964 8.199984-18.439964 18.279964 0 10.11998 8.239984 18.299964 18.439964 18.299964h294.901424c10.17898 0 18.418964-8.179984 18.418964-18.299964 0-10.07998-8.239984-18.279964-18.419964-18.279964z"></path></symbol><symbol id="icon-chapter" viewBox="0 0 1024 1024"><path d="M832 128v768H256V128h576m64-64H192v896h704V64z" ></path><path d="M161.3 296.2v-0.2H320v-40H161.3c-35.5 0-64.3 28.7-64.3 64s28.8 64 64.3 64h90v-40h-90v-0.2c-13.3 0-24.1-10.7-24.1-23.8 0-13.1 10.8-23.8 24.1-23.8z m0 192v-0.2H320v-40H161.3c-35.5 0-64.3 28.7-64.3 64s28.8 64 64.3 64h90v-40h-90v-0.2c-13.3 0-24.1-10.7-24.1-23.8 0-13.1 10.8-23.8 24.1-23.8z m0 192v-0.2H320v-40H161.3c-35.5 0-64.3 28.7-64.3 64s28.8 64 64.3 64h90v-40h-90v-0.2c-13.3 0-24.1-10.7-24.1-23.8 0-13.1 10.8-23.8 24.1-23.8z" ></path><path d="M288 277a32 32 0 1 0 64 0 32 32 0 1 0-64 0zM288 469a32 32 0 1 0 64 0 32 32 0 1 0-64 0zM288 662a32 32 0 1 0 64 0 32 32 0 1 0-64 0zM384 256h385v40H384z m0 128h385v40H384z m0 128h385v40H384z m0 128h256v40H384z" ></path></symbol><symbol id="icon-expand" viewBox="0 0 1024 1024"><path d="M731.093333 128c82.346667 0 158.08 20.906667 218.88 56.32 6.4 3.626667 10.026667 10.88 10.026667 18.346667v667.306666c0 12.16-9.386667 20.906667-19.84 20.906667-2.986667 0-5.76-0.64-8.746667-2.133333-57.386667-29.226667-126.08-46.08-200.32-46.08s-141.866667 17.066667-199.04 45.653333c-2.986667 1.493333-5.973333 2.986667-8.96 4.693333-0.426667 0.213333-0.853333 0.64-1.493333 0.853334-5.973333 3.2-13.226667 3.2-19.2 0-3.413333-1.92-6.826667-3.626667-10.453333-5.546667-56.96-28.586667-125.44-45.653333-199.04-45.653333s-143.146667 16.853333-200.32 46.08c-2.773333 1.493333-5.76 2.133333-8.746667 2.133333-10.453333 0-19.84-8.746667-19.84-20.906667V202.453333c0-7.68 3.84-14.72 10.026667-18.346666C134.826667 148.693333 210.56 128 292.906667 128S451.2 149.333333 512 184.746667C572.8 149.333333 648.746667 128 731.093333 128zM701.866667 187.733333c-71.466667 0-137.386667 17.92-189.866667 47.786667-52.693333-29.866667-118.613333-47.786667-189.866667-47.786667s-136.96 17.493333-189.653333 47.36c-5.546667 3.2-8.746667 9.173333-8.746667 15.573334v563.626666c0 10.24 8.106667 17.493333 17.066667 17.493334 2.56 0 5.12-0.64 7.466667-1.92 49.706667-24.533333 109.44-38.826667 173.653333-38.826667s123.093333 14.293333 172.373333 38.4c3.2 1.493333 6.186667 2.986667 9.173334 4.693333 5.12 2.773333 11.52 2.773333 16.64 0 0.64-0.213333 0.853333-0.426667 1.493333-0.853333l7.68-3.84c49.493333-24.106667 108.8-38.4 172.373333-38.4s123.946667 14.293333 173.653334 38.826667c2.56 1.28 5.12 1.92 7.466666 1.92 8.96 0 17.066667-7.466667 17.066667-17.493334V250.666667c0-6.4-3.2-12.373333-8.746667-15.573334-52.693333-29.866667-118.186667-47.573333-189.653333-47.573333z" ></path><path d="M949.333333 771.84c-123.306667-71.68-260.266667-80.64-407.466666-26.666667V221.866667c0-16.426667-13.44-29.866667-29.866667-29.866667s-29.866667 13.44-29.866667 29.866667v529.066666c-120.533333-55.466667-253.226667-53.973333-395.093333 5.12-10.88 4.48-16 17.066667-11.52 27.946667 4.48 10.88 17.066667 16 27.946667 11.52 139.306667-58.026667 263.253333-57.173333 378.666666 2.773333v46.506667c0 16.426667 13.44 29.866667 29.866667 29.866667s29.866667-13.44 29.866667-29.866667v-53.973333c142.08-56.32 268.586667-50.56 386.133333 17.706666 3.413333 1.92 7.04 2.986667 10.666667 2.986667 7.253333 0 14.506667-3.84 18.56-10.666667a21.290667 21.290667 0 0 0-7.68-29.226666z"></path></symbol></svg></div>');const l=t.querySelectorAll("p,h1,h2,h3,h4,h5,h6");for(let e=0;l.length>e;e++){if(n=l[e],N.test(n.textContent.trim())){let e=null;if(a)e=t.ownerDocument.createElement("div"),e.classList.add("showdown-toc");else{if(s){n.parentNode.removeChild(n);continue}e=t.ownerDocument.createElement("div"),e.classList.add("showdown-toc"),s=e;const o=t.ownerDocument.createElement("div");o.id="toc-switch-button",o.classList.add("toc-switch","hidden"),o.innerHTML='<svg class="icon" aria-hidden="true"><use xlink:href="#icon-chapter-l"></use></svg>',n.parentNode.insertBefore(o,n);let i="Table Of Contents",r=document.children[0].lang;r&&(r=r.toLowerCase(),"zh-cn"!==r&&"zh-hans"!==r||(i="目录")),e.id="total-showdown-toc",e.classList.add("total-toc"),e.innerHTML=`<div class="toc-pin"><span class="toc-pin-text">${i}</span><div class="toc-fold-wrap"><div id="toc-fold-icon" class="toc-fold toc-icon" data-name="toc-expand"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-toc"></use></svg></div><div id="toc-close-icon" class="toc-close toc-icon"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-chapter-s"></use></svg></div></div></div>`}let l=t.ownerDocument.createElement("div");l.className="toc-view",e.appendChild(l);let u={parentNode:null,toc:l,headingLevel:o,preLevel:o,standalone:!1};if(i)if(o>i.headingLevel)u.parentNode=i;else{let t=i;for(;t.headingLevel>o;)t=t.parentNode;t&&(u.parentNode=o===t.headingLevel?t.parentNode:t)}i=u,r=!0,i.standalone=!a,a?n.parentNode.replaceChild(e,n):n.parentNode.removeChild(n);continue}if(!a&&O.includes(n.tagName.toLowerCase())&&(a=!0),n.tagName)switch(n.tagName){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":o=parseInt(n.tagName.substr(1)),i&&(i=T(t,n,i,o))}}for(s&&e.extraDocs.push(s.outerHTML);i;){let t=i;i=t.parentNode,t.parentNode=null,t.toc=null,t.headingLevel=null,t.preLevel=null}return r}(n,this.config)?n.innerHTML:t}if("object"!=typeof t||!t||!this.config.extraDocs||!Array.isArray(this.config.extraDocs))return!1;const e=t;this.config.extraDocs.forEach(t=>{v.addExtra(e,t)});return v.addScript(e,{inner:[{id:"showdown-toc",code:M,host:"#total-showdown-toc"}]}),e}}]}function P(){return[{type:"output",filter:function(t){const e="css-ex-";v.removeAllStylesheet(e);const n=t.wrapper;if(!n)return!1;const o=n.querySelectorAll("a");return!!o.length&&(o.forEach(n=>{try{if(n.href&&"string"==typeof n.href&&"css:"===n.href.substr(0,4)){let o=n.href.substr(4).trim();const i=""+v.hashString(o);v.addCssLink(t,o,e+i),n.parentNode&&"P"===n.parentNode.tagName&&n.parentNode.parentNode?n.parentNode.parentNode.removeChild(n.parentNode):n.parentNode.removeChild(n),o=y.getUrl(o),v.loadStylesheet(o,e+i)}}catch{console.log("Error: href of <a> tag is not exist")}}),t)}}]}if("undefined"==typeof window)throw Error("The showdown viz extension can only be used in browser environment!");if(void 0===H)var H=window.Viz||void 0;const B=["circo","dot","neato","osage","twopi"];function z(){return!(void 0===H||!H||void 0===H.instance)}let _=!1;function F(t,e){if(z()){const n=e.id,o=e.className,i=e.data,r=e.element,a=e.element.dataset.lang;let s="dot";if(a){const t=JSON.parse(a);t&&t.engine&&-1!=B.indexOf(t.engine)&&(s=t.engine)}return void H.instance().then(e=>{const a=e.renderString(i,{format:"svg",engine:s});r.parentNode.outerHTML=`<div id="${n}" class="${o}">${a}</div>`,t(!0)})}setTimeout(()=>{F(t,e)},10)}function R(t){return new Promise(e=>{const n=v.createElementMeta("viz",t);if(!n)return e(!1);F(e,n)})}function I(t){return function(){const t=z();if("undefined"!=typeof window){if(_)return t;t||(_=!0,y.loadScript("Viz").then(t=>{H=v.interopDefault(window[t])}))}}(),new Promise(e=>{const n=[];t.forEach(t=>{n.push(R(t))}),Promise.all(n).then(()=>{e(!0)})})}function J(){return[{type:"output",filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.dot.language-dot");return!!n.length&&(console.log(s("Begin render dot elements.")),I(n).then(()=>(console.log(s("End render dot elements.")),t)))}}]}const V="vega";if("undefined"==typeof window)throw Error("The showdown vega extension can only be used in browser environment!");if(void 0===W)var W=window.vegaEmbed||void 0;function U(){return!(void 0===W||!W)}let G=!1;function K(t,e,n,o){const i=v.createElementMeta(V,t);if(!i)return Promise.resolve(!1);const r=i.container,a={id:r,code:((t,e)=>{const n=()=>{const n=eval;let o=document.getElementById(t.id);if(o)if(t.lang&&t.lang.type&&"string"==typeof t.lang.type&&"javascript"==t.lang.type.toLowerCase()){const i=n(`(function(){${t.data}; return option;})();`);W(o,i,e)}else{const n=JSON.parse(t.data);W(o,n,e)}};return n.toString=()=>t.lang&&t.lang.type&&"string"==typeof t.lang.type&&"javascript"==t.lang.type.toLowerCase()?`function(){\n let el = document.getElementById('${t.id}');\n if (el) {\n ${t.data};\n const config = ${JSON.stringify(e)};\n vegaEmbed(el, option, config);\n }\n }`:`function(){\n let el = document.getElementById('${t.id}');\n if (el) {\n const option = ${t.data};\n const config = ${JSON.stringify(e)};\n vegaEmbed(el, option, config);\n }\n }`,n})(i,e),host:"#"+r};return n.push(a),new Promise(t=>{Z(t,i)})}function X(t,e,n,o){const i={outer:[{name:V,src:y.getSrc(!1,V,"jsdelivr")},{name:"vegaLite",src:y.getSrc(!1,"vegaLite","jsdelivr")},{name:"vegaEmbed",src:y.getSrc(!1,"vegaEmbed","jsdelivr")}],inner:[]};return n.push(i),function(){const t=U();if("undefined"!=typeof window){if(G)return t;t||(G=!0,y.loadScript(V).then(()=>y.loadScript("vegaLite")).then(()=>y.loadScript("vegaEmbed")).then(t=>{W=v.interopDefault(window[t])}))}}(),new Promise(n=>{const r=[];t.forEach(t=>{r.push(K(t,o,i.inner))}),e.forEach(t=>{r.push(K(t,o,i.inner))}),Promise.all(r).then(()=>{n(!0)})})}function Z(t,e){if(U()){return e.element.parentNode.outerHTML=`<div id="${e.container}" class="${e.className}"><div id="${e.id}"></div></div>`,t(!0)}setTimeout(()=>{Z(t,e)},10)}function Q(t){const e=((t={})=>({actions:{editor:!1},theme:"vox",tooltip:!1,renderer:"svg",...t}))(t);return[{type:"output",config:e,filter:function(t){const e=t.wrapper;if(!e)return!1;const n=e.querySelectorAll("code.vega.language-vega"),o=e.querySelectorAll("code.vega-lite.language-vega-lite");return!(!n.length&&!o.length)&&(console.log(s("Begin render vega elements.")),X(n,o,t.scripts,this.config).then(()=>(console.log(s("End render vega elements.")),t)))}}]}function Y(){const t=new DOMParser;return[{type:"output",filter:function(e){const n=t.parseFromString(e,"text/html"),o=void 0!==n.body?n.body:n;return function(t){let e=null,n=null,o=!1;const i=t.querySelectorAll("p, li, h1, h2, h3, h4, h5, h6, div.paragraph");for(let t=0;i.length>t;t++)for(e=i[t],n=e.firstChild;n;){if(3===n.nodeType){let t=n.nodeValue.match(/^([\s\S]*?)([:-]-:)(?:[\s]?)([\s\S]*)$/);t&&(":-:"===t[2]?(n.nodeValue=t[3],e.className?e.className+=" align-center":e.className="align-center",o=!0):"--:"===t[2]&&(n.nodeValue=t[3],e.className?e.className+=" align-right":e.className="align-right",o=!0));break}n=n.nextSibling}return o}(o)?o.innerHTML:e}}]}var tt=".",et={input:'"',tag:"mtext",output:"mbox",tex:null,ttype:10},nt=[{input:"alpha",tag:"mi",output:"α",tex:null,ttype:0},{input:"beta",tag:"mi",output:"β",tex:null,ttype:0},{input:"chi",tag:"mi",output:"χ",tex:null,ttype:0},{input:"delta",tag:"mi",output:"δ",tex:null,ttype:0},{input:"Delta",tag:"mo",output:"Δ",tex:null,ttype:0},{input:"epsi",tag:"mi",output:"ε",tex:"epsilon",ttype:0},{input:"varepsilon",tag:"mi",output:"ɛ",tex:null,ttype:0},{input:"eta",tag:"mi",output:"η",tex:null,ttype:0},{input:"gamma",tag:"mi",output:"γ",tex:null,ttype:0},{input:"Gamma",tag:"mo",output:"Γ",tex:null,ttype:0},{input:"iota",tag:"mi",output:"ι",tex:null,ttype:0},{input:"kappa",tag:"mi",output:"κ",tex:null,ttype:0},{input:"lambda",tag:"mi",output:"λ",tex:null,ttype:0},{input:"Lambda",tag:"mo",output:"Λ",tex:null,ttype:0},{input:"lamda",tag:"mi",output:"lambda",tex:null,ttype:8},{input:"Lamda",tag:"mi",output:"Lambda",tex:null,ttype:8},{input:"mu",tag:"mi",output:"μ",tex:null,ttype:0},{input:"nu",tag:"mi",output:"ν",tex:null,ttype:0},{input:"omega",tag:"mi",output:"ω",tex:null,ttype:0},{input:"Omega",tag:"mo",output:"Ω",tex:null,ttype:0},{input:"phi",tag:"mi",output:"φ",tex:null,ttype:0},{input:"varphi",tag:"mi",output:"ϕ",tex:null,ttype:0},{input:"Phi",tag:"mo",output:"Φ",tex:null,ttype:0},{input:"pi",tag:"mi",output:"π",tex:null,ttype:0},{input:"Pi",tag:"mo",output:"Π",tex:null,ttype:0},{input:"psi",tag:"mi",output:"ψ",tex:null,ttype:0},{input:"Psi",tag:"mi",output:"Ψ",tex:null,ttype:0},{input:"rho",tag:"mi",output:"ρ",tex:null,ttype:0},{input:"sigma",tag:"mi",output:"σ",tex:null,ttype:0},{input:"Sigma",tag:"mo",output:"Σ",tex:null,ttype:0},{input:"tau",tag:"mi",output:"τ",tex:null,ttype:0},{input:"theta",tag:"mi",output:"θ",tex:null,ttype:0},{input:"vartheta",tag:"mi",output:"ϑ",tex:null,ttype:0},{input:"Theta",tag:"mo",output:"Θ",tex:null,ttype:0},{input:"upsilon",tag:"mi",output:"υ",tex:null,ttype:0},{input:"xi",tag:"mi",output:"ξ",tex:null,ttype:0},{input:"Xi",tag:"mo",output:"Ξ",tex:null,ttype:0},{input:"zeta",tag:"mi",output:"ζ",tex:null,ttype:0},{input:"*",tag:"mo",output:"⋅",tex:"cdot",ttype:0},{input:"**",tag:"mo",output:"∗",tex:"ast",ttype:0},{input:"***",tag:"mo",output:"⋆",tex:"star",ttype:0},{input:"//",tag:"mo",output:"/",tex:"/",ttype:0,val:!0,notexcopy:!0},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:0},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:0},{input:"xx",tag:"mo",output:"×",tex:"times",ttype:0},{input:"|><",tag:"mo",output:"⋉",tex:"ltimes",ttype:0},{input:"><|",tag:"mo",output:"⋊",tex:"rtimes",ttype:0},{input:"|><|",tag:"mo",output:"⋈",tex:"bowtie",ttype:0},{input:"-:",tag:"mo",output:"÷",tex:"div",ttype:0},{input:"divide",tag:"mo",output:"-:",tex:null,ttype:8},{input:"@",tag:"mo",output:"∘",tex:"circ",ttype:0},{input:"o+",tag:"mo",output:"⊕",tex:"oplus",ttype:0},{input:"ox",tag:"mo",output:"⊗",tex:"otimes",ttype:0},{input:"o.",tag:"mo",output:"⊙",tex:"odot",ttype:0},{input:"sum",tag:"mo",output:"∑",tex:null,ttype:7},{input:"prod",tag:"mo",output:"∏",tex:null,ttype:7},{input:"^^",tag:"mo",output:"∧",tex:"wedge",ttype:0},{input:"^^^",tag:"mo",output:"⋀",tex:"bigwedge",ttype:7},{input:"vv",tag:"mo",output:"∨",tex:"vee",ttype:0},{input:"vvv",tag:"mo",output:"⋁",tex:"bigvee",ttype:7},{input:"nn",tag:"mo",output:"∩",tex:"cap",ttype:0},{input:"nnn",tag:"mo",output:"⋂",tex:"bigcap",ttype:7},{input:"uu",tag:"mo",output:"∪",tex:"cup",ttype:0},{input:"uuu",tag:"mo",output:"⋃",tex:"bigcup",ttype:7},{input:"overset",tag:"mover",output:"stackrel",tex:null,ttype:2},{input:"underset",tag:"munder",output:"stackrel",tex:null,ttype:2},{input:"!=",tag:"mo",output:"≠",tex:"ne",ttype:0},{input:":=",tag:"mo",output:":=",tex:null,ttype:0},{input:"lt",tag:"mo",output:"<",tex:null,ttype:0},{input:"gt",tag:"mo",output:">",tex:null,ttype:0},{input:"<=",tag:"mo",output:"≤",tex:"le",ttype:0},{input:"lt=",tag:"mo",output:"≤",tex:"leq",ttype:0},{input:"gt=",tag:"mo",output:"≥",tex:"geq",ttype:0},{input:">=",tag:"mo",output:"≥",tex:"ge",ttype:0},{input:"-<",tag:"mo",output:"≺",tex:"prec",ttype:0},{input:"-lt",tag:"mo",output:"≺",tex:null,ttype:0},{input:">-",tag:"mo",output:"≻",tex:"succ",ttype:0},{input:"-<=",tag:"mo",output:"⪯",tex:"preceq",ttype:0},{input:">-=",tag:"mo",output:"⪰",tex:"succeq",ttype:0},{input:"in",tag:"mo",output:"∈",tex:null,ttype:0},{input:"!in",tag:"mo",output:"∉",tex:"notin",ttype:0},{input:"sub",tag:"mo",output:"⊂",tex:"subset",ttype:0},{input:"sup",tag:"mo",output:"⊃",tex:"supset",ttype:0},{input:"sube",tag:"mo",output:"⊆",tex:"subseteq",ttype:0},{input:"supe",tag:"mo",output:"⊇",tex:"supseteq",ttype:0},{input:"-=",tag:"mo",output:"≡",tex:"equiv",ttype:0},{input:"~=",tag:"mo",output:"≅",tex:"stackrel{\\sim}{=}",notexcopy:!0,ttype:0},{input:"cong",tag:"mo",output:"~=",tex:null,ttype:8},{input:"~~",tag:"mo",output:"≈",tex:"approx",ttype:0},{input:"prop",tag:"mo",output:"∝",tex:"propto",ttype:0},{input:"and",tag:"mtext",output:"and",tex:null,ttype:6},{input:"or",tag:"mtext",output:"or",tex:null,ttype:6},{input:"not",tag:"mo",output:"¬",tex:"neg",ttype:0},{input:"=>",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:0},{input:"implies",tag:"mo",output:"=>",tex:null,ttype:8},{input:"if",tag:"mo",output:"if",tex:null,ttype:6},{input:"<=>",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:0},{input:"iff",tag:"mo",output:"<=>",tex:null,ttype:8},{input:"AA",tag:"mo",output:"∀",tex:"forall",ttype:0},{input:"EE",tag:"mo",output:"∃",tex:"exists",ttype:0},{input:"_|_",tag:"mo",output:"⊥",tex:"bot",ttype:0},{input:"TT",tag:"mo",output:"⊤",tex:"top",ttype:0},{input:"|--",tag:"mo",output:"⊢",tex:"vdash",ttype:0},{input:"|==",tag:"mo",output:"⊨",tex:"models",ttype:0},{input:"(",tag:"mo",output:"(",tex:null,ttype:4,val:!0},{input:")",tag:"mo",output:")",tex:null