"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5154],{84203:function(Or,Ie,S){S.d(Ie,{Z:function(){return Pr}});var K={};S.r(K),S.d(K,{arrayReplaceAt:function(){return he},assign:function(){return G},escapeHtml:function(){return R},escapeRE:function(){return We},fromCodePoint:function(){return W},has:function(){return Fe},isMdAsciiPunct:function(){return Z},isPunctChar:function(){return N},isSpace:function(){return A},isString:function(){return ne},isValidEntityCode:function(){return re},isWhiteSpace:function(){return j},lib:function(){return Qe},normalizeReference:function(){return Q},unescapeAll:function(){return D},unescapeMd:function(){return Ne}});var ee={};S.r(ee),S.d(ee,{parseLinkDestination:function(){return Ve},parseLinkLabel:function(){return Je},parseLinkTitle:function(){return Xe}});var P=S(8782),Pe=S(53837),Re=S(34083),ze=S(34632),ue=S(53813);function De(e){return Object.prototype.toString.call(e)}function ne(e){return De(e)==="[object String]"}const Oe=Object.prototype.hasOwnProperty;function Fe(e,n){return Oe.call(e,n)}function G(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(i){e[i]=r[i]})}}),e}function he(e,n,r){return[].concat(e.slice(0,n),r,e.slice(n+1))}function re(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function W(e){if(e>65535){e-=65536;const n=55296+(e>>10),r=56320+(e&1023);return String.fromCharCode(n,r)}return String.fromCharCode(e)}const pe=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Le=/&([a-z#][a-z0-9]{1,31});/gi,Be=new RegExp(pe.source+"|"+Le.source,"gi"),$e=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function je(e,n){if(n.charCodeAt(0)===35&&$e.test(n)){const i=n[1].toLowerCase()==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return re(i)?W(i):e}const r=(0,ue.p1)(e);return r!==e?r:e}function Ne(e){return e.indexOf("\\")<0?e:e.replace(pe,"$1")}function D(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Be,function(n,r,i){return r||je(n,i)})}const Ze=/[&<>"]/,qe=/[&<>"]/g,Ue={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function He(e){return Ue[e]}function R(e){return Ze.test(e)?e.replace(qe,He):e}const Ge=/[.?*+^$[\]\\(){}|-]/g;function We(e){return e.replace(Ge,"\\$&")}function A(e){switch(e){case 9:case 32:return!0}return!1}function j(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function N(e){return Pe.Z.test(e)||Re.Z.test(e)}function Z(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Q(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}const Qe={mdurl:P,ucmicro:ze};function Je(e,n,r){let i,o,t,l;const c=e.posMax,s=e.pos;for(e.pos=n+1,i=1;e.pos<c;){if(t=e.src.charCodeAt(e.pos),t===93&&(i--,i===0)){o=!0;break}if(l=e.pos,e.md.inline.skipToken(e),t===91){if(l===e.pos-1)i++;else if(r)return e.pos=s,-1}}let f=-1;return o&&(f=e.pos),e.pos=s,f}function Ve(e,n,r){let i,o=n;const t={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<r;){if(i=e.charCodeAt(o),i===10||i===60)return t;if(i===62)return t.pos=o+1,t.str=D(e.slice(n+1,o)),t.ok=!0,t;if(i===92&&o+1<r){o+=2;continue}o++}return t}let l=0;for(;o<r&&(i=e.charCodeAt(o),!(i===32||i<32||i===127));){if(i===92&&o+1<r){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(i===40&&(l++,l>32))return t;if(i===41){if(l===0)break;l--}o++}return n===o||l!==0||(t.str=D(e.slice(n,o)),t.pos=o,t.ok=!0),t}function Xe(e,n,r,i){let o,t=n;const l={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)l.str=i.str,l.marker=i.marker;else{if(t>=r)return l;let c=e.charCodeAt(t);if(c!==34&&c!==39&&c!==40)return l;n++,t++,c===40&&(c=41),l.marker=c}for(;t<r;){if(o=e.charCodeAt(t),o===l.marker)return l.pos=t+1,l.str+=D(e.slice(n,t)),l.ok=!0,l;if(o===40&&l.marker===41)return l;o===92&&t+1<r&&t++,t++}return l.can_continue=!0,l.str+=D(e.slice(n,t)),l}const v={};v.code_inline=function(e,n,r,i,o){const t=e[n];return"<code"+o.renderAttrs(t)+">"+R(t.content)+"</code>"},v.code_block=function(e,n,r,i,o){const t=e[n];return"<pre"+o.renderAttrs(t)+"><code>"+R(e[n].content)+`</code></pre>
`},v.fence=function(e,n,r,i,o){const t=e[n],l=t.info?D(t.info).trim():"";let c="",s="";if(l){const h=l.split(/(\s+)/g);c=h[0],s=h.slice(2).join("")}let f;if(r.highlight?f=r.highlight(t.content,c,s)||R(t.content):f=R(t.content),f.indexOf("<pre")===0)return f+`
`;if(l){const h=t.attrIndex("class"),p=t.attrs?t.attrs.slice():[];h<0?p.push(["class",r.langPrefix+c]):(p[h]=p[h].slice(),p[h][1]+=" "+r.langPrefix+c);const k={attrs:p};return`<pre><code${o.renderAttrs(k)}>${f}</code></pre>
`}return`<pre><code${o.renderAttrs(t)}>${f}</code></pre>
`},v.image=function(e,n,r,i,o){const t=e[n];return t.attrs[t.attrIndex("alt")][1]=o.renderInlineAsText(t.children,r,i),o.renderToken(e,n,r)},v.hardbreak=function(e,n,r){return r.xhtmlOut?`<br />
`:`<br>
`},v.softbreak=function(e,n,r){return r.breaks?r.xhtmlOut?`<br />
`:`<br>
`:`
`},v.text=function(e,n){return R(e[n].content)},v.html_block=function(e,n){return e[n].content},v.html_inline=function(e,n){return e[n].content};function O(){this.rules=G({},v)}O.prototype.renderAttrs=function(n){let r,i,o;if(!n.attrs)return"";for(o="",r=0,i=n.attrs.length;r<i;r++)o+=" "+R(n.attrs[r][0])+'="'+R(n.attrs[r][1])+'"';return o},O.prototype.renderToken=function(n,r,i){const o=n[r];let t="";if(o.hidden)return"";o.block&&o.nesting!==-1&&r&&n[r-1].hidden&&(t+=`
`),t+=(o.nesting===-1?"</":"<")+o.tag,t+=this.renderAttrs(o),o.nesting===0&&i.xhtmlOut&&(t+=" /");let l=!1;if(o.block&&(l=!0,o.nesting===1&&r+1<n.length)){const c=n[r+1];(c.type==="inline"||c.hidden||c.nesting===-1&&c.tag===o.tag)&&(l=!1)}return t+=l?`>
`:">",t},O.prototype.renderInline=function(e,n,r){let i="";const o=this.rules;for(let t=0,l=e.length;t<l;t++){const c=e[t].type;typeof o[c]<"u"?i+=o[c](e,t,n,r,this):i+=this.renderToken(e,t,n)}return i},O.prototype.renderInlineAsText=function(e,n,r){let i="";for(let o=0,t=e.length;o<t;o++)switch(e[o].type){case"text":i+=e[o].content;break;case"image":i+=this.renderInlineAsText(e[o].children,n,r);break;case"html_inline":case"html_block":i+=e[o].content;break;case"softbreak":case"hardbreak":i+=`
`;break;default:}return i},O.prototype.render=function(e,n,r){let i="";const o=this.rules;for(let t=0,l=e.length;t<l;t++){const c=e[t].type;c==="inline"?i+=this.renderInline(e[t].children,n,r):typeof o[c]<"u"?i+=o[c](e,t,n,r,this):i+=this.renderToken(e,t,n,r)}return i};var Ye=O;function w(){this.__rules__=[],this.__cache__=null}w.prototype.__find__=function(e){for(let n=0;n<this.__rules__.length;n++)if(this.__rules__[n].name===e)return n;return-1},w.prototype.__compile__=function(){const e=this,n=[""];e.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(i){n.indexOf(i)<0&&n.push(i)})}),e.__cache__={},n.forEach(function(r){e.__cache__[r]=[],e.__rules__.forEach(function(i){i.enabled&&(r&&i.alt.indexOf(r)<0||e.__cache__[r].push(i.fn))})})},w.prototype.at=function(e,n,r){const i=this.__find__(e),o=r||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=n,this.__rules__[i].alt=o.alt||[],this.__cache__=null},w.prototype.before=function(e,n,r,i){const o=this.__find__(e),t=i||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:n,enabled:!0,fn:r,alt:t.alt||[]}),this.__cache__=null},w.prototype.after=function(e,n,r,i){const o=this.__find__(e),t=i||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:n,enabled:!0,fn:r,alt:t.alt||[]}),this.__cache__=null},w.prototype.push=function(e,n,r){const i=r||{};this.__rules__.push({name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},w.prototype.enable=function(e,n){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(i){const o=this.__find__(i);if(o<0){if(n)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!0,r.push(i)},this),this.__cache__=null,r},w.prototype.enableOnly=function(e,n){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,n)},w.prototype.disable=function(e,n){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(i){const o=this.__find__(i);if(o<0){if(n)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[o].enabled=!1,r.push(i)},this),this.__cache__=null,r},w.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var J=w;function F(e,n,r){this.type=e,this.tag=n,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}F.prototype.attrIndex=function(n){if(!this.attrs)return-1;const r=this.attrs;for(let i=0,o=r.length;i<o;i++)if(r[i][0]===n)return i;return-1},F.prototype.attrPush=function(n){this.attrs?this.attrs.push(n):this.attrs=[n]},F.prototype.attrSet=function(n,r){const i=this.attrIndex(n),o=[n,r];i<0?this.attrPush(o):this.attrs[i]=o},F.prototype.attrGet=function(n){const r=this.attrIndex(n);let i=null;return r>=0&&(i=this.attrs[r][1]),i},F.prototype.attrJoin=function(n,r){const i=this.attrIndex(n);i<0?this.attrPush([n,r]):this.attrs[i][1]=this.attrs[i][1]+" "+r};var L=F;function ae(e,n,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=n}ae.prototype.Token=L;var Ke=ae;const en=/\r\n?|\n/g,nn=/\0/g;function rn(e){let n;n=e.src.replace(en,`
`),n=n.replace(nn,"\uFFFD"),e.src=n}function on(e){let n;e.inlineMode?(n=new e.Token("inline","",0),n.content=e.src,n.map=[0,1],n.children=[],e.tokens.push(n)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function tn(e){const n=e.tokens;for(let r=0,i=n.length;r<i;r++){const o=n[r];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function ln(e){return/^<a[>\s]/i.test(e)}function cn(e){return/^<\/a\s*>/i.test(e)}function sn(e){const n=e.tokens;if(e.md.options.linkify)for(let r=0,i=n.length;r<i;r++){if(n[r].type!=="inline"||!e.md.linkify.pretest(n[r].content))continue;let o=n[r].children,t=0;for(let l=o.length-1;l>=0;l--){const c=o[l];if(c.type==="link_close"){for(l--;o[l].level!==c.level&&o[l].type!=="link_open";)l--;continue}if(c.type==="html_inline"&&(ln(c.content)&&t>0&&t--,cn(c.content)&&t++),!(t>0)&&c.type==="text"&&e.md.linkify.test(c.content)){const s=c.content;let f=e.md.linkify.match(s);const h=[];let p=c.level,k=0;f.length>0&&f[0].index===0&&l>0&&o[l-1].type==="text_special"&&(f=f.slice(1));for(let a=0;a<f.length;a++){const u=f[a].url,C=e.md.normalizeLink(u);if(!e.md.validateLink(C))continue;let _=f[a].text;f[a].schema?f[a].schema==="mailto:"&&!/^mailto:/i.test(_)?_=e.md.normalizeLinkText("mailto:"+_).replace(/^mailto:/,""):_=e.md.normalizeLinkText(_):_=e.md.normalizeLinkText("http://"+_).replace(/^http:\/\//,"");const y=f[a].index;if(y>k){const g=new e.Token("text","",0);g.content=s.slice(k,y),g.level=p,h.push(g)}const d=new e.Token("link_open","a",1);d.attrs=[["href",C]],d.level=p++,d.markup="linkify",d.info="auto",h.push(d);const x=new e.Token("text","",0);x.content=_,x.level=p,h.push(x);const m=new e.Token("link_close","a",-1);m.level=--p,m.markup="linkify",m.info="auto",h.push(m),k=f[a].lastIndex}if(k<s.length){const a=new e.Token("text","",0);a.content=s.slice(k),a.level=p,h.push(a)}n[r].children=o=he(o,l,h)}}}}const ke=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,fn=/\((c|tm|r)\)/i,un=/\((c|tm|r)\)/ig,hn={c:"\xA9",r:"\xAE",tm:"\u2122"};function pn(e,n){return hn[n.toLowerCase()]}function an(e){let n=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i.type==="text"&&!n&&(i.content=i.content.replace(un,pn)),i.type==="link_open"&&i.info==="auto"&&n--,i.type==="link_close"&&i.info==="auto"&&n++}}function kn(e){let n=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i.type==="text"&&!n&&ke.test(i.content)&&(i.content=i.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),i.type==="link_open"&&i.info==="auto"&&n--,i.type==="link_close"&&i.info==="auto"&&n++}}function dn(e){let n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)e.tokens[n].type==="inline"&&(fn.test(e.tokens[n].content)&&an(e.tokens[n].children),ke.test(e.tokens[n].content)&&kn(e.tokens[n].children))}const mn=/['"]/,de=/['"]/g,me="\u2019";function V(e,n,r){return e.slice(0,n)+r+e.slice(n+1)}function xn(e,n){let r;const i=[];for(let o=0;o<e.length;o++){const t=e[o],l=e[o].level;for(r=i.length-1;r>=0&&!(i[r].level<=l);r--);if(i.length=r+1,t.type!=="text")continue;let c=t.content,s=0,f=c.length;e:for(;s<f;){de.lastIndex=s;const h=de.exec(c);if(!h)break;let p=!0,k=!0;s=h.index+1;const a=h[0]==="'";let u=32;if(h.index-1>=0)u=c.charCodeAt(h.index-1);else for(r=o-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){u=e[r].content.charCodeAt(e[r].content.length-1);break}let C=32;if(s<f)C=c.charCodeAt(s);else for(r=o+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){C=e[r].content.charCodeAt(0);break}const _=Z(u)||N(String.fromCharCode(u)),y=Z(C)||N(String.fromCharCode(C)),d=j(u),x=j(C);if(x?p=!1:y&&(d||_||(p=!1)),d?k=!1:_&&(x||y||(k=!1)),C===34&&h[0]==='"'&&u>=48&&u<=57&&(k=p=!1),p&&k&&(p=_,k=y),!p&&!k){a&&(t.content=V(t.content,h.index,me));continue}if(k)for(r=i.length-1;r>=0;r--){let m=i[r];if(i[r].level<l)break;if(m.single===a&&i[r].level===l){m=i[r];let g,b;a?(g=n.md.options.quotes[2],b=n.md.options.quotes[3]):(g=n.md.options.quotes[0],b=n.md.options.quotes[1]),t.content=V(t.content,h.index,b),e[m.token].content=V(e[m.token].content,m.pos,g),s+=b.length-1,m.token===o&&(s+=g.length-1),c=t.content,f=c.length,i.length=r;continue e}}p?i.push({token:o,pos:h.index,single:a,level:l}):k&&a&&(t.content=V(t.content,h.index,me))}}}function gn(e){if(e.md.options.typographer)for(let n=e.tokens.length-1;n>=0;n--)e.tokens[n].type!=="inline"||!mn.test(e.tokens[n].content)||xn(e.tokens[n].children,e)}function _n(e){let n,r;const i=e.tokens,o=i.length;for(let t=0;t<o;t++){if(i[t].type!=="inline")continue;const l=i[t].children,c=l.length;for(n=0;n<c;n++)l[n].type==="text_special"&&(l[n].type="text");for(n=r=0;n<c;n++)l[n].type==="text"&&n+1<c&&l[n+1].type==="text"?l[n+1].content=l[n].content+l[n+1].content:(n!==r&&(l[r]=l[n]),r++);n!==r&&(l.length=r)}}const oe=[["normalize",rn],["block",on],["inline",tn],["linkify",sn],["replacements",dn],["smartquotes",gn],["text_join",_n]];function te(){this.ruler=new J;for(let e=0;e<oe.length;e++)this.ruler.push(oe[e][0],oe[e][1])}te.prototype.process=function(e){const n=this.ruler.getRules("");for(let r=0,i=n.length;r<i;r++)n[r](e)},te.prototype.State=Ke;var bn=te;function I(e,n,r,i){this.src=e,this.md=n,this.env=r,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let t=0,l=0,c=0,s=0,f=o.length,h=!1;l<f;l++){const p=o.charCodeAt(l);if(!h)if(A(p)){c++,p===9?s+=4-s%4:s++;continue}else h=!0;(p===10||l===f-1)&&(p!==10&&l++,this.bMarks.push(t),this.eMarks.push(l),this.tShift.push(c),this.sCount.push(s),this.bsCount.push(0),h=!1,c=0,s=0,t=l+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}I.prototype.push=function(e,n,r){const i=new L(e,n,r);return i.block=!0,r<0&&this.level--,i.level=this.level,r>0&&this.level++,this.tokens.push(i),i},I.prototype.isEmpty=function(n){return this.bMarks[n]+this.tShift[n]>=this.eMarks[n]},I.prototype.skipEmptyLines=function(n){for(let r=this.lineMax;n<r&&!(this.bMarks[n]+this.tShift[n]<this.eMarks[n]);n++);return n},I.prototype.skipSpaces=function(n){for(let r=this.src.length;n<r;n++){const i=this.src.charCodeAt(n);if(!A(i))break}return n},I.prototype.skipSpacesBack=function(n,r){if(n<=r)return n;for(;n>r;)if(!A(this.src.charCodeAt(--n)))return n+1;return n},I.prototype.skipChars=function(n,r){for(let i=this.src.length;n<i&&this.src.charCodeAt(n)===r;n++);return n},I.prototype.skipCharsBack=function(n,r,i){if(n<=i)return n;for(;n>i;)if(r!==this.src.charCodeAt(--n))return n+1;return n},I.prototype.getLines=function(n,r,i,o){if(n>=r)return"";const t=new Array(r-n);for(let l=0,c=n;c<r;c++,l++){let s=0;const f=this.bMarks[c];let h=f,p;for(c+1<r||o?p=this.eMarks[c]+1:p=this.eMarks[c];h<p&&s<i;){const k=this.src.charCodeAt(h);if(A(k))k===9?s+=4-(s+this.bsCount[c])%4:s++;else if(h-f<this.tShift[c])s++;else break;h++}s>i?t[l]=new Array(s-i+1).join(" ")+this.src.slice(h,p):t[l]=this.src.slice(h,p)}return t.join("")},I.prototype.Token=L;var Cn=I;const An=65536;function ie(e,n){const r=e.bMarks[n]+e.tShift[n],i=e.eMarks[n];return e.src.slice(r,i)}function xe(e){const n=[],r=e.length;let i=0,o=e.charCodeAt(i),t=!1,l=0,c="";for(;i<r;)o===124&&(t?(c+=e.substring(l,i-1),l=i):(n.push(c+e.substring(l,i)),c="",l=i+1)),t=o===92,i++,o=e.charCodeAt(i);return n.push(c+e.substring(l)),n}function yn(e,n,r,i){if(n+2>r)return!1;let o=n+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let t=e.bMarks[o]+e.tShift[o];if(t>=e.eMarks[o])return!1;const l=e.src.charCodeAt(t++);if(l!==124&&l!==45&&l!==58||t>=e.eMarks[o])return!1;const c=e.src.charCodeAt(t++);if(c!==124&&c!==45&&c!==58&&!A(c)||l===45&&A(c))return!1;for(;t<e.eMarks[o];){const m=e.src.charCodeAt(t);if(m!==124&&m!==45&&m!==58&&!A(m))return!1;t++}let s=ie(e,n+1),f=s.split("|");const h=[];for(let m=0;m<f.length;m++){const g=f[m].trim();if(!g){if(m===0||m===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(g))return!1;g.charCodeAt(g.length-1)===58?h.push(g.charCodeAt(0)===58?"center":"right"):g.charCodeAt(0)===58?h.push("left"):h.push("")}if(s=ie(e,n).trim(),s.indexOf("|")===-1||e.sCount[n]-e.blkIndent>=4)return!1;f=xe(s),f.length&&f[0]===""&&f.shift(),f.length&&f[f.length-1]===""&&f.pop();const p=f.length;if(p===0||p!==h.length)return!1;if(i)return!0;const k=e.parentType;e.parentType="table";const a=e.md.block.ruler.getRules("blockquote"),u=e.push("table_open","table",1),C=[n,0];u.map=C;const _=e.push("thead_open","thead",1);_.map=[n,n+1];const y=e.push("tr_open","tr",1);y.map=[n,n+1];for(let m=0;m<f.length;m++){const g=e.push("th_open","th",1);h[m]&&(g.attrs=[["style","text-align:"+h[m]]]);const b=e.push("inline","",0);b.content=f[m].trim(),b.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let d,x=0;for(o=n+2;o<r&&!(e.sCount[o]<e.blkIndent);o++){let m=!1;for(let b=0,E=a.length;b<E;b++)if(a[b](e,o,r,!0)){m=!0;break}if(m||(s=ie(e,o).trim(),!s)||e.sCount[o]-e.blkIndent>=4||(f=xe(s),f.length&&f[0]===""&&f.shift(),f.length&&f[f.length-1]===""&&f.pop(),x+=p-f.length,x>An))break;if(o===n+2){const b=e.push("tbody_open","tbody",1);b.map=d=[n+2,0]}const g=e.push("tr_open","tr",1);g.map=[o,o+1];for(let b=0;b<p;b++){const E=e.push("td_open","td",1);h[b]&&(E.attrs=[["style","text-align:"+h[b]]]);const T=e.push("inline","",0);T.content=f[b]?f[b].trim():"",T.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return d&&(e.push("tbody_close","tbody",-1),d[1]=o),e.push("table_close","table",-1),C[1]=o,e.parentType=k,e.line=o,!0}function En(e,n,r){if(e.sCount[n]-e.blkIndent<4)return!1;let i=n+1,o=i;for(;i<r;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,o=i;continue}break}e.line=o;const t=e.push("code_block","code",0);return t.content=e.getLines(n,o,4+e.blkIndent,!1)+`
`,t.map=[n,e.line],!0}function Sn(e,n,r,i){let o=e.bMarks[n]+e.tShift[n],t=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||o+3>t)return!1;const l=e.src.charCodeAt(o);if(l!==126&&l!==96)return!1;let c=o;o=e.skipChars(o,l);let s=o-c;if(s<3)return!1;const f=e.src.slice(c,o),h=e.src.slice(o,t);if(l===96&&h.indexOf(String.fromCharCode(l))>=0)return!1;if(i)return!0;let p=n,k=!1;for(;p++,!(p>=r||(o=c=e.bMarks[p]+e.tShift[p],t=e.eMarks[p],o<t&&e.sCount[p]<e.blkIndent));)if(e.src.charCodeAt(o)===l&&!(e.sCount[p]-e.blkIndent>=4)&&(o=e.skipChars(o,l),!(o-c<s)&&(o=e.skipSpaces(o),!(o<t)))){k=!0;break}s=e.sCount[n],e.line=p+(k?1:0);const a=e.push("fence","code",0);return a.info=h,a.content=e.getLines(n+1,p,s,!0),a.markup=f,a.map=[n,e.line],!0}function Mn(e,n,r,i){let o=e.bMarks[n]+e.tShift[n],t=e.eMarks[n];const l=e.lineMax;if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(i)return!0;const c=[],s=[],f=[],h=[],p=e.md.block.ruler.getRules("blockquote"),k=e.parentType;e.parentType="blockquote";let a=!1,u;for(u=n;u<r;u++){const x=e.sCount[u]<e.blkIndent;if(o=e.bMarks[u]+e.tShift[u],t=e.eMarks[u],o>=t)break;if(e.src.charCodeAt(o++)===62&&!x){let g=e.sCount[u]+1,b,E;e.src.charCodeAt(o)===32?(o++,g++,E=!1,b=!0):e.src.charCodeAt(o)===9?(b=!0,(e.bsCount[u]+g)%4===3?(o++,g++,E=!1):E=!0):b=!1;let T=g;for(c.push(e.bMarks[u]),e.bMarks[u]=o;o<t;){const z=e.src.charCodeAt(o);if(A(z))z===9?T+=4-(T+e.bsCount[u]+(E?1:0))%4:T++;else break;o++}a=o>=t,s.push(e.bsCount[u]),e.bsCount[u]=e.sCount[u]+1+(b?1:0),f.push(e.sCount[u]),e.sCount[u]=T-g,h.push(e.tShift[u]),e.tShift[u]=o-e.bMarks[u];continue}if(a)break;let m=!1;for(let g=0,b=p.length;g<b;g++)if(p[g](e,u,r,!0)){m=!0;break}if(m){e.lineMax=u,e.blkIndent!==0&&(c.push(e.bMarks[u]),s.push(e.bsCount[u]),h.push(e.tShift[u]),f.push(e.sCount[u]),e.sCount[u]-=e.blkIndent);break}c.push(e.bMarks[u]),s.push(e.bsCount[u]),h.push(e.tShift[u]),f.push(e.sCount[u]),e.sCount[u]=-1}const C=e.blkIndent;e.blkIndent=0;const _=e.push("blockquote_open","blockquote",1);_.markup=">";const y=[n,0];_.map=y,e.md.block.tokenize(e,n,u);const d=e.push("blockquote_close","blockquote",-1);d.markup=">",e.lineMax=l,e.parentType=k,y[1]=e.line;for(let x=0;x<h.length;x++)e.bMarks[x+n]=c[x],e.tShift[x+n]=h[x],e.sCount[x+n]=f[x],e.bsCount[x+n]=s[x];return e.blkIndent=C,!0}function wn(e,n,r,i){const o=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4)return!1;let t=e.bMarks[n]+e.tShift[n];const l=e.src.charCodeAt(t++);if(l!==42&&l!==45&&l!==95)return!1;let c=1;for(;t<o;){const f=e.src.charCodeAt(t++);if(f!==l&&!A(f))return!1;f===l&&c++}if(c<3)return!1;if(i)return!0;e.line=n+1;const s=e.push("hr","hr",0);return s.map=[n,e.line],s.markup=Array(c+1).join(String.fromCharCode(l)),!0}function ge(e,n){const r=e.eMarks[n];let i=e.bMarks[n]+e.tShift[n];const o=e.src.charCodeAt(i++);if(o!==42&&o!==45&&o!==43)return-1;if(i<r){const t=e.src.charCodeAt(i);if(!A(t))return-1}return i}function _e(e,n){const r=e.bMarks[n]+e.tShift[n],i=e.eMarks[n];let o=r;if(o+1>=i)return-1;let t=e.src.charCodeAt(o++);if(t<48||t>57)return-1;for(;;){if(o>=i)return-1;if(t=e.src.charCodeAt(o++),t>=48&&t<=57){if(o-r>=10)return-1;continue}if(t===41||t===46)break;return-1}return o<i&&(t=e.src.charCodeAt(o),!A(t))?-1:o}function Tn(e,n){const r=e.level+2;for(let i=n+2,o=e.tokens.length-2;i<o;i++)e.tokens[i].level===r&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function vn(e,n,r,i){let o,t,l,c,s=n,f=!0;if(e.sCount[s]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[s]-e.listIndent>=4&&e.sCount[s]<e.blkIndent)return!1;let h=!1;i&&e.parentType==="paragraph"&&e.sCount[s]>=e.blkIndent&&(h=!0);let p,k,a;if((a=_e(e,s))>=0){if(p=!0,l=e.bMarks[s]+e.tShift[s],k=Number(e.src.slice(l,a-1)),h&&k!==1)return!1}else if((a=ge(e,s))>=0)p=!1;else return!1;if(h&&e.skipSpaces(a)>=e.eMarks[s])return!1;if(i)return!0;const u=e.src.charCodeAt(a-1),C=e.tokens.length;p?(c=e.push("ordered_list_open","ol",1),k!==1&&(c.attrs=[["start",k]])):c=e.push("bullet_list_open","ul",1);const _=[s,0];c.map=_,c.markup=String.fromCharCode(u);let y=!1;const d=e.md.block.ruler.getRules("list"),x=e.parentType;for(e.parentType="list";s<r;){t=a,o=e.eMarks[s];const m=e.sCount[s]+a-(e.bMarks[s]+e.tShift[s]);let g=m;for(;t<o;){const $=e.src.charCodeAt(t);if($===9)g+=4-(g+e.bsCount[s])%4;else if($===32)g++;else break;t++}const b=t;let E;b>=o?E=1:E=g-m,E>4&&(E=1);const T=m+E;c=e.push("list_item_open","li",1),c.markup=String.fromCharCode(u);const z=[s,0];c.map=z,p&&(c.info=e.src.slice(l,a-1));const H=e.tight,fe=e.tShift[s],Rr=e.sCount[s],zr=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=T,e.tight=!0,e.tShift[s]=b-e.bMarks[s],e.sCount[s]=g,b>=o&&e.isEmpty(s+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,s,r,!0),(!e.tight||y)&&(f=!1),y=e.line-s>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=zr,e.tShift[s]=fe,e.sCount[s]=Rr,e.tight=H,c=e.push("list_item_close","li",-1),c.markup=String.fromCharCode(u),s=e.line,z[1]=s,s>=r||e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)break;let ve=!1;for(let $=0,Dr=d.length;$<Dr;$++)if(d[$](e,s,r,!0)){ve=!0;break}if(ve)break;if(p){if(a=_e(e,s),a<0)break;l=e.bMarks[s]+e.tShift[s]}else if(a=ge(e,s),a<0)break;if(u!==e.src.charCodeAt(a-1))break}return p?c=e.push("ordered_list_close","ol",-1):c=e.push("bullet_list_close","ul",-1),c.markup=String.fromCharCode(u),_[1]=s,e.line=s,e.parentType=x,f&&Tn(e,C),!0}function In(e,n,r,i){let o=e.bMarks[n]+e.tShift[n],t=e.eMarks[n],l=n+1;if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function c(d){const x=e.lineMax;if(d>=x||e.isEmpty(d))return null;let m=!1;if(e.sCount[d]-e.blkIndent>3&&(m=!0),e.sCount[d]<0&&(m=!0),!m){const E=e.md.block.ruler.getRules("reference"),T=e.parentType;e.parentType="reference";let z=!1;for(let H=0,fe=E.length;H<fe;H++)if(E[H](e,d,x,!0)){z=!0;break}if(e.parentType=T,z)return null}const g=e.bMarks[d]+e.tShift[d],b=e.eMarks[d];return e.src.slice(g,b+1)}let s=e.src.slice(o,t+1);t=s.length;let f=-1;for(o=1;o<t;o++){const d=s.charCodeAt(o);if(d===91)return!1;if(d===93){f=o;break}else if(d===10){const x=c(l);x!==null&&(s+=x,t=s.length,l++)}else if(d===92&&(o++,o<t&&s.charCodeAt(o)===10)){const x=c(l);x!==null&&(s+=x,t=s.length,l++)}}if(f<0||s.charCodeAt(f+1)!==58)return!1;for(o=f+2;o<t;o++){const d=s.charCodeAt(o);if(d===10){const x=c(l);x!==null&&(s+=x,t=s.length,l++)}else if(!A(d))break}const h=e.md.helpers.parseLinkDestination(s,o,t);if(!h.ok)return!1;const p=e.md.normalizeLink(h.str);if(!e.md.validateLink(p))return!1;o=h.pos;const k=o,a=l,u=o;for(;o<t;o++){const d=s.charCodeAt(o);if(d===10){const x=c(l);x!==null&&(s+=x,t=s.length,l++)}else if(!A(d))break}let C=e.md.helpers.parseLinkTitle(s,o,t);for(;C.can_continue;){const d=c(l);if(d===null)break;s+=d,o=t,t=s.length,l++,C=e.md.helpers.parseLinkTitle(s,o,t,C)}let _;for(o<t&&u!==o&&C.ok?(_=C.str,o=C.pos):(_="",o=k,l=a);o<t;){const d=s.charCodeAt(o);if(!A(d))break;o++}if(o<t&&s.charCodeAt(o)!==10&&_)for(_="",o=k,l=a;o<t;){const d=s.charCodeAt(o);if(!A(d))break;o++}if(o<t&&s.charCodeAt(o)!==10)return!1;const y=Q(s.slice(1,f));return y?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:_,href:p}),e.line=l),!0):!1}var Pn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];const Rn="[a-zA-Z_:][a-zA-Z0-9:._-]*",zn="[^\"'=<>`\\x00-\\x20]+",Dn="'[^']*'",On='"[^"]*"',Fn="(?:"+zn+"|"+Dn+"|"+On+")",be="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+Rn+"(?:\\s*=\\s*"+Fn+")?)")+"*\\s*\\/?>",Ce="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Ln="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Bn="<[?][\\s\\S]*?[?]>",$n="<![A-Za-z][^>]*>",jn="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Nn=new RegExp("^(?:"+be+"|"+Ce+"|"+Ln+"|"+Bn+"|"+$n+"|"+jn+")"),Zn=new RegExp("^(?:"+be+"|"+Ce+")"),B=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Pn.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Zn.source+"\\s*$"),/^$/,!1]];function qn(e,n,r,i){let o=e.bMarks[n]+e.tShift[n],t=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let l=e.src.slice(o,t),c=0;for(;c<B.length&&!B[c][0].test(l);c++);if(c===B.length)return!1;if(i)return B[c][2];let s=n+1;if(!B[c][1].test(l)){for(;s<r&&!(e.sCount[s]<e.blkIndent);s++)if(o=e.bMarks[s]+e.tShift[s],t=e.eMarks[s],l=e.src.slice(o,t),B[c][1].test(l)){l.length!==0&&s++;break}}e.line=s;const f=e.push("html_block","",0);return f.map=[n,s],f.content=e.getLines(n,s,e.blkIndent,!0),!0}function Un(e,n,r,i){let o=e.bMarks[n]+e.tShift[n],t=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4)return!1;let l=e.src.charCodeAt(o);if(l!==35||o>=t)return!1;let c=1;for(l=e.src.charCodeAt(++o);l===35&&o<t&&c<=6;)c++,l=e.src.charCodeAt(++o);if(c>6||o<t&&!A(l))return!1;if(i)return!0;t=e.skipSpacesBack(t,o);const s=e.skipCharsBack(t,35,o);s>o&&A(e.src.charCodeAt(s-1))&&(t=s),e.line=n+1;const f=e.push("heading_open","h"+String(c),1);f.markup="########".slice(0,c),f.map=[n,e.line];const h=e.push("inline","",0);h.content=e.src.slice(o,t).trim(),h.map=[n,e.line],h.children=[];const p=e.push("heading_close","h"+String(c),-1);return p.markup="########".slice(0,c),!0}function Hn(e,n,r){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[n]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let t=0,l,c=n+1;for(;c<r&&!e.isEmpty(c);c++){if(e.sCount[c]-e.blkIndent>3)continue;if(e.sCount[c]>=e.blkIndent){let a=e.bMarks[c]+e.tShift[c];const u=e.eMarks[c];if(a<u&&(l=e.src.charCodeAt(a),(l===45||l===61)&&(a=e.skipChars(a,l),a=e.skipSpaces(a),a>=u))){t=l===61?1:2;break}}if(e.sCount[c]<0)continue;let k=!1;for(let a=0,u=i.length;a<u;a++)if(i[a](e,c,r,!0)){k=!0;break}if(k)break}if(!t)return!1;const s=e.getLines(n,c,e.blkIndent,!1).trim();e.line=c+1;const f=e.push("heading_open","h"+String(t),1);f.markup=String.fromCharCode(l),f.map=[n,e.line];const h=e.push("inline","",0);h.content=s,h.map=[n,e.line-1],h.children=[];const p=e.push("heading_close","h"+String(t),-1);return p.markup=String.fromCharCode(l),e.parentType=o,!0}function Gn(e,n,r){const i=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let t=n+1;for(e.parentType="paragraph";t<r&&!e.isEmpty(t);t++){if(e.sCount[t]-e.blkIndent>3||e.sCount[t]<0)continue;let f=!1;for(let h=0,p=i.length;h<p;h++)if(i[h](e,t,r,!0)){f=!0;break}if(f)break}const l=e.getLines(n,t,e.blkIndent,!1).trim();e.line=t;const c=e.push("paragraph_open","p",1);c.map=[n,e.line];const s=e.push("inline","",0);return s.content=l,s.map=[n,e.line],s.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const X=[["table",yn,["paragraph","reference"]],["code",En],["fence",Sn,["paragraph","reference","blockquote","list"]],["blockquote",Mn,["paragraph","reference","blockquote","list"]],["hr",wn,["paragraph","reference","blockquote","list"]],["list",vn,["paragraph","reference","blockquote"]],["reference",In],["html_block",qn,["paragraph","reference","blockquote"]],["heading",Un,["paragraph","reference","blockquote"]],["lheading",Hn],["paragraph",Gn]];function Y(){this.ruler=new J;for(let e=0;e<X.length;e++)this.ruler.push(X[e][0],X[e][1],{alt:(X[e][2]||[]).slice()})}Y.prototype.tokenize=function(e,n,r){const i=this.ruler.getRules(""),o=i.length,t=e.md.options.maxNesting;let l=n,c=!1;for(;l<r&&(e.line=l=e.skipEmptyLines(l),!(l>=r||e.sCount[l]<e.blkIndent));){if(e.level>=t){e.line=r;break}const s=e.line;let f=!1;for(let h=0;h<o;h++)if(f=i[h](e,l,r,!1),f){if(s>=e.line)throw new Error("block rule didn't increment state.line");break}if(!f)throw new Error("none of the block rules matched");e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),l=e.line,l<r&&e.isEmpty(l)&&(c=!0,l++,e.line=l)}},Y.prototype.parse=function(e,n,r,i){if(!e)return;const o=new this.State(e,n,r,i);this.tokenize(o,o.line,o.lineMax)},Y.prototype.State=Cn;var Wn=Y;function q(e,n,r,i){this.src=e,this.env=r,this.md=n,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}q.prototype.pushPending=function(){const e=new L("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},q.prototype.push=function(e,n,r){this.pending&&this.pushPending();const i=new L(e,n,r);let o=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},q.prototype.scanDelims=function(e,n){const r=this.posMax,i=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32;let t=e;for(;t<r&&this.src.charCodeAt(t)===i;)t++;const l=t-e,c=t<r?this.src.charCodeAt(t):32,s=Z(o)||N(String.fromCharCode(o)),f=Z(c)||N(String.fromCharCode(c)),h=j(o),p=j(c),k=!p&&(!f||h||s),a=!h&&(!s||p||f);return{can_open:k&&(n||!a||s),can_close:a&&(n||!k||f),length:l}},q.prototype.Token=L;var Qn=q;function Jn(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Vn(e,n){let r=e.pos;for(;r<e.posMax&&!Jn(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const Xn=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Yn(e,n){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,i=e.posMax;if(r+3>i||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const o=e.pending.match(Xn);if(!o)return!1;const t=o[1],l=e.md.linkify.matchAtStart(e.src.slice(r-t.length));if(!l)return!1;let c=l.url;if(c.length<=t.length)return!1;c=c.replace(/\*+$/,"");const s=e.md.normalizeLink(c);if(!e.md.validateLink(s))return!1;if(!n){e.pending=e.pending.slice(0,-t.length);const f=e.push("link_open","a",1);f.attrs=[["href",s]],f.markup="linkify",f.info="auto";const h=e.push("text","",0);h.content=e.md.normalizeLinkText(c);const p=e.push("link_close","a",-1);p.markup="linkify",p.info="auto"}return e.pos+=c.length-t.length,!0}function Kn(e,n){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const i=e.pending.length-1,o=e.posMax;if(!n)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let t=i-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<o&&A(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const le=[];for(let e=0;e<256;e++)le.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){le[e.charCodeAt(0)]=1});function er(e,n){let r=e.pos;const i=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=i))return!1;let o=e.src.charCodeAt(r);if(o===10){for(n||e.push("hardbreak","br",0),r++;r<i&&(o=e.src.charCodeAt(r),!!A(o));)r++;return e.pos=r,!0}let t=e.src[r];if(o>=55296&&o<=56319&&r+1<i){const c=e.src.charCodeAt(r+1);c>=56320&&c<=57343&&(t+=e.src[r+1],r++)}const l="\\"+t;if(!n){const c=e.push("text_special","",0);o<256&&le[o]!==0?c.content=t:c.content=l,c.markup=l,c.info="escape"}return e.pos=r+1,!0}function nr(e,n){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const o=r;r++;const t=e.posMax;for(;r<t&&e.src.charCodeAt(r)===96;)r++;const l=e.src.slice(o,r),c=l.length;if(e.backticksScanned&&(e.backticks[c]||0)<=o)return n||(e.pending+=l),e.pos+=c,!0;let s=r,f;for(;(f=e.src.indexOf("`",s))!==-1;){for(s=f+1;s<t&&e.src.charCodeAt(s)===96;)s++;const h=s-f;if(h===c){if(!n){const p=e.push("code_inline","code",0);p.markup=l,p.content=e.src.slice(r,f).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=s,!0}e.backticks[h]=f}return e.backticksScanned=!0,n||(e.pending+=l),e.pos+=c,!0}function rr(e,n){const r=e.pos,i=e.src.charCodeAt(r);if(n||i!==126)return!1;const o=e.scanDelims(e.pos,!0);let t=o.length;const l=String.fromCharCode(i);if(t<2)return!1;let c;t%2&&(c=e.push("text","",0),c.content=l,t--);for(let s=0;s<t;s+=2)c=e.push("text","",0),c.content=l+l,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function Ae(e,n){let r;const i=[],o=n.length;for(let t=0;t<o;t++){const l=n[t];if(l.marker!==126||l.end===-1)continue;const c=n[l.end];r=e.tokens[l.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[c.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[c.token-1].type==="text"&&e.tokens[c.token-1].content==="~"&&i.push(c.token-1)}for(;i.length;){const t=i.pop();let l=t+1;for(;l<e.tokens.length&&e.tokens[l].type==="s_close";)l++;l--,t!==l&&(r=e.tokens[l],e.tokens[l]=e.tokens[t],e.tokens[t]=r)}}function or(e){const n=e.tokens_meta,r=e.tokens_meta.length;Ae(e,e.delimiters);for(let i=0;i<r;i++)n[i]&&n[i].delimiters&&Ae(e,n[i].delimiters)}var ye={tokenize:rr,postProcess:or};function tr(e,n){const r=e.pos,i=e.src.charCodeAt(r);if(n||i!==95&&i!==42)return!1;const o=e.scanDelims(e.pos,i===42);for(let t=0;t<o.length;t++){const l=e.push("text","",0);l.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function Ee(e,n){const r=n.length;for(let i=r-1;i>=0;i--){const o=n[i];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const t=n[o.end],l=i>0&&n[i-1].end===o.end+1&&n[i-1].marker===o.marker&&n[i-1].token===o.token-1&&n[o.end+1].token===t.token+1,c=String.fromCharCode(o.marker),s=e.tokens[o.token];s.type=l?"strong_open":"em_open",s.tag=l?"strong":"em",s.nesting=1,s.markup=l?c+c:c,s.content="";const f=e.tokens[t.token];f.type=l?"strong_close":"em_close",f.tag=l?"strong":"em",f.nesting=-1,f.markup=l?c+c:c,f.content="",l&&(e.tokens[n[i-1].token].content="",e.tokens[n[o.end+1].token].content="",i--)}}function ir(e){const n=e.tokens_meta,r=e.tokens_meta.length;Ee(e,e.delimiters);for(let i=0;i<r;i++)n[i]&&n[i].delimiters&&Ee(e,n[i].delimiters)}var Se={tokenize:tr,postProcess:ir};function lr(e,n){let r,i,o,t,l="",c="",s=e.pos,f=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const h=e.pos,p=e.posMax,k=e.pos+1,a=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(a<0)return!1;let u=a+1;if(u<p&&e.src.charCodeAt(u)===40){for(f=!1,u++;u<p&&(r=e.src.charCodeAt(u),!(!A(r)&&r!==10));u++);if(u>=p)return!1;if(s=u,o=e.md.helpers.parseLinkDestination(e.src,u,e.posMax),o.ok){for(l=e.md.normalizeLink(o.str),e.md.validateLink(l)?u=o.pos:l="",s=u;u<p&&(r=e.src.charCodeAt(u),!(!A(r)&&r!==10));u++);if(o=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<p&&s!==u&&o.ok)for(c=o.str,u=o.pos;u<p&&(r=e.src.charCodeAt(u),!(!A(r)&&r!==10));u++);}(u>=p||e.src.charCodeAt(u)!==41)&&(f=!0),u++}if(f){if(typeof e.env.references>"u")return!1;if(u<p&&e.src.charCodeAt(u)===91?(s=u+1,u=e.md.helpers.parseLinkLabel(e,u),u>=0?i=e.src.slice(s,u++):u=a+1):u=a+1,i||(i=e.src.slice(k,a)),t=e.env.references[Q(i)],!t)return e.pos=h,!1;l=t.href,c=t.title}if(!n){e.pos=k,e.posMax=a;const C=e.push("link_open","a",1),_=[["href",l]];C.attrs=_,c&&_.push(["title",c]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=u,e.posMax=p,!0}function cr(e,n){let r,i,o,t,l,c,s,f,h="";const p=e.pos,k=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const a=e.pos+2,u=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(u<0)return!1;if(t=u+1,t<k&&e.src.charCodeAt(t)===40){for(t++;t<k&&(r=e.src.charCodeAt(t),!(!A(r)&&r!==10));t++);if(t>=k)return!1;for(f=t,c=e.md.helpers.parseLinkDestination(e.src,t,e.posMax),c.ok&&(h=e.md.normalizeLink(c.str),e.md.validateLink(h)?t=c.pos:h=""),f=t;t<k&&(r=e.src.charCodeAt(t),!(!A(r)&&r!==10));t++);if(c=e.md.helpers.parseLinkTitle(e.src,t,e.posMax),t<k&&f!==t&&c.ok)for(s=c.str,t=c.pos;t<k&&(r=e.src.charCodeAt(t),!(!A(r)&&r!==10));t++);else s="";if(t>=k||e.src.charCodeAt(t)!==41)return e.pos=p,!1;t++}else{if(typeof e.env.references>"u")return!1;if(t<k&&e.src.charCodeAt(t)===91?(f=t+1,t=e.md.helpers.parseLinkLabel(e,t),t>=0?o=e.src.slice(f,t++):t=u+1):t=u+1,o||(o=e.src.slice(a,u)),l=e.env.references[Q(o)],!l)return e.pos=p,!1;h=l.href,s=l.title}if(!n){i=e.src.slice(a,u);const C=[];e.md.inline.parse(i,e.md,e.env,C);const _=e.push("image","img",0),y=[["src",h],["alt",""]];_.attrs=y,_.children=C,_.content=i,s&&y.push(["title",s])}return e.pos=t,e.posMax=k,!0}const sr=/^([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])?)*)$/,fr=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ur(e,n){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const i=e.pos,o=e.posMax;for(;;){if(++r>=o)return!1;const l=e.src.charCodeAt(r);if(l===60)return!1;if(l===62)break}const t=e.src.slice(i+1,r);if(fr.test(t)){const l=e.md.normalizeLink(t);if(!e.md.validateLink(l))return!1;if(!n){const c=e.push("link_open","a",1);c.attrs=[["href",l]],c.markup="autolink",c.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(t);const f=e.push("link_close","a",-1);f.markup="autolink",f.info="auto"}return e.pos+=t.length+2,!0}if(sr.test(t)){const l=e.md.normalizeLink("mailto:"+t);if(!e.md.validateLink(l))return!1;if(!n){const c=e.push("link_open","a",1);c.attrs=[["href",l]],c.markup="autolink",c.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(t);const f=e.push("link_close","a",-1);f.markup="autolink",f.info="auto"}return e.pos+=t.length+2,!0}return!1}function hr(e){return/^<a[>\s]/i.test(e)}function pr(e){return/^<\/a\s*>/i.test(e)}function ar(e){const n=e|32;return n>=97&&n<=122}function kr(e,n){if(!e.md.options.html)return!1;const r=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=r)return!1;const o=e.src.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!ar(o))return!1;const t=e.src.slice(i).match(Nn);if(!t)return!1;if(!n){const l=e.push("html_inline","",0);l.content=t[0],hr(l.content)&&e.linkLevel++,pr(l.content)&&e.linkLevel--}return e.pos+=t[0].length,!0}const dr=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,mr=/^&([a-z][a-z0-9]{1,31});/i;function xr(e,n){const r=e.pos,i=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=i)return!1;if(e.src.charCodeAt(r+1)===35){const t=e.src.slice(r).match(dr);if(t){if(!n){const l=t[1][0].toLowerCase()==="x"?parseInt(t[1].slice(1),16):parseInt(t[1],10),c=e.push("text_special","",0);c.content=re(l)?W(l):W(65533),c.markup=t[0],c.info="entity"}return e.pos+=t[0].length,!0}}else{const t=e.src.slice(r).match(mr);if(t){const l=(0,ue.p1)(t[0]);if(l!==t[0]){if(!n){const c=e.push("text_special","",0);c.content=l,c.markup=t[0],c.info="entity"}return e.pos+=t[0].length,!0}}}return!1}function Me(e){const n={},r=e.length;if(!r)return;let i=0,o=-2;const t=[];for(let l=0;l<r;l++){const c=e[l];if(t.push(0),(e[i].marker!==c.marker||o!==c.token-1)&&(i=l),o=c.token,c.length=c.length||0,!c.close)continue;n.hasOwnProperty(c.marker)||(n[c.marker]=[-1,-1,-1,-1,-1,-1]);const s=n[c.marker][(c.open?3:0)+c.length%3];let f=i-t[i]-1,h=f;for(;f>s;f-=t[f]+1){const p=e[f];if(p.marker===c.marker&&p.open&&p.end<0){let k=!1;if((p.close||c.open)&&(p.length+c.length)%3===0&&(p.length%3!==0||c.length%3!==0)&&(k=!0),!k){const a=f>0&&!e[f-1].open?t[f-1]+1:0;t[l]=l-f+a,t[f]=a,c.open=!1,p.end=l,p.close=!1,h=-1,o=-2;break}}}h!==-1&&(n[c.marker][(c.open?3:0)+(c.length||0)%3]=h)}}function gr(e){const n=e.tokens_meta,r=e.tokens_meta.length;Me(e.delimiters);for(let i=0;i<r;i++)n[i]&&n[i].delimiters&&Me(n[i].delimiters)}function _r(e){let n,r,i=0;const o=e.tokens,t=e.tokens.length;for(n=r=0;n<t;n++)o[n].nesting<0&&i--,o[n].level=i,o[n].nesting>0&&i++,o[n].type==="text"&&n+1<t&&o[n+1].type==="text"?o[n+1].content=o[n].content+o[n+1].content:(n!==r&&(o[r]=o[n]),r++);n!==r&&(o.length=r)}const ce=[["text",Vn],["linkify",Yn],["newline",Kn],["escape",er],["backticks",nr],["strikethrough",ye.tokenize],["emphasis",Se.tokenize],["link",lr],["image",cr],["autolink",ur],["html_inline",kr],["entity",xr]],se=[["balance_pairs",gr],["strikethrough",ye.postProcess],["emphasis",Se.postProcess],["fragments_join",_r]];function U(){this.ruler=new J;for(let e=0;e<ce.length;e++)this.ruler.push(ce[e][0],ce[e][1]);this.ruler2=new J;for(let e=0;e<se.length;e++)this.ruler2.push(se[e][0],se[e][1])}U.prototype.skipToken=function(e){const n=e.pos,r=this.ruler.getRules(""),i=r.length,o=e.md.options.maxNesting,t=e.cache;if(typeof t[n]<"u"){e.pos=t[n];return}let l=!1;if(e.level<o){for(let c=0;c<i;c++)if(e.level++,l=r[c](e,!0),e.level--,l){if(n>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;l||e.pos++,t[n]=e.pos},U.prototype.tokenize=function(e){const n=this.ruler.getRules(""),r=n.length,i=e.posMax,o=e.md.options.maxNesting;for(;e.pos<i;){const t=e.pos;let l=!1;if(e.level<o){for(let c=0;c<r;c++)if(l=n[c](e,!1),l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(l){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},U.prototype.parse=function(e,n,r,i){const o=new this.State(e,n,r,i);this.tokenize(o);const t=this.ruler2.getRules(""),l=t.length;for(let c=0;c<l;c++)t[c](o)},U.prototype.State=Qn;var br=U,Cr=S(37176),we=S(35748),Ar={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},yr={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},Er={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}};const Sr={default:Ar,zero:yr,commonmark:Er},Mr=/^(vbscript|javascript|file|data):/,wr=/^data:image\/(gif|png|jpeg|webp);/;function Tr(e){const n=e.trim().toLowerCase();return Mr.test(n)?wr.test(n):!0}const Te=["http:","https:","mailto:"];function vr(e){const n=P.parse(e,!0);if(n.hostname&&(!n.protocol||Te.indexOf(n.protocol)>=0))try{n.hostname=we.ZP.toASCII(n.hostname)}catch{}return P.encode(P.format(n))}function Ir(e){const n=P.parse(e,!0);if(n.hostname&&(!n.protocol||Te.indexOf(n.protocol)>=0))try{n.hostname=we.ZP.toUnicode(n.hostname)}catch{}return P.decode(P.format(n),P.decode.defaultChars+"%")}function M(e,n){if(!(this instanceof M))return new M(e,n);n||ne(e)||(n=e||{},e="default"),this.inline=new br,this.block=new Wn,this.core=new bn,this.renderer=new Ye,this.linkify=new Cr.Z,this.validateLink=Tr,this.normalizeLink=vr,this.normalizeLinkText=Ir,this.utils=K,this.helpers=G({},ee),this.options={},this.configure(e),n&&this.set(n)}M.prototype.set=function(e){return G(this.options,e),this},M.prototype.configure=function(e){const n=this;if(ne(e)){const r=e;if(e=Sr[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&n[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&n[r].ruler2.enableOnly(e.components[r].rules2)}),this},M.prototype.enable=function(e,n){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(function(o){return r.indexOf(o)<0});if(i.length&&!n)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},M.prototype.disable=function(e,n){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){r=r.concat(this[o].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(function(o){return r.indexOf(o)<0});if(i.length&&!n)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},M.prototype.use=function(e){const n=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,n),this},M.prototype.parse=function(e,n){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,n);return this.core.process(r),r.tokens},M.prototype.render=function(e,n){return n=n||{},this.renderer.render(this.parse(e,n),this.options,n)},M.prototype.parseInline=function(e,n){const r=new this.core.State(e,this,n);return r.inlineMode=!0,this.core.process(r),r.tokens},M.prototype.renderInline=function(e,n){return n=n||{},this.renderer.render(this.parseInline(e,n),this.options,n)};var Pr=M}}]);
