import{u as Le,q as Ze,t as Ce,v as Be,w as ye,x as qe,y as Ne,Z as Ue,z as Ae,D as Ee,F as He,G as Se,H as ue}from"./vendor-other.2cdd5822.js";function Ge(e){return Object.prototype.toString.call(e)}function ie(e){return Ge(e)==="[object String]"}const We=Object.prototype.hasOwnProperty;function Qe(e,n){return We.call(e,n)}function Q(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(o){e[o]=r[o]})}}),e}function ze(e,n,r){return[].concat(e.slice(0,n),r,e.slice(n+1))}function ce(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 G(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 we=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Je=/&([a-z#][a-z0-9]{1,31});/gi,Ve=new RegExp(we.source+"|"+Je.source,"gi"),Xe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Ye(e,n){if(n.charCodeAt(0)===35&&Xe.test(n)){const o=n[1].toLowerCase()==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return ce(o)?G(o):e}const r=ye(e);return r!==e?r:e}function Ke(e){return e.indexOf("\\")<0?e:e.replace(we,"$1")}function D(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Ve,function(n,r,o){return r||Ye(n,o)})}const en=/[&<>"]/,nn=/[&<>"]/g,rn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function on(e){return rn[e]}function R(e){return en.test(e)?e.replace(nn,on):e}const tn=/[.?*+^$[\]\\(){}|-]/g;function cn(e){return e.replace(tn,"\\$&")}function A(e){switch(e){case 9:case 32:return!0}return!1}function L(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 Z(e){return Ce.test(e)||Be.test(e)}function B(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 J(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const ln={mdurl:Ze,ucmicro:Le},sn=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:ze,assign:Q,escapeHtml:R,escapeRE:cn,fromCodePoint:G,has:Qe,isMdAsciiPunct:B,isPunctChar:Z,isSpace:A,isString:ie,isValidEntityCode:ce,isWhiteSpace:L,lib:ln,normalizeReference:J,unescapeAll:D,unescapeMd:Ke},Symbol.toStringTag,{value:"Module"}));function fn(e,n,r){let o,t,c,l;const i=e.posMax,s=e.pos;for(e.pos=n+1,o=1;e.pos<i;){if(c=e.src.charCodeAt(e.pos),c===93&&(o--,o===0)){t=!0;break}if(l=e.pos,e.md.inline.skipToken(e),c===91){if(l===e.pos-1)o++;else if(r)return e.pos=s,-1}}let f=-1;return t&&(f=e.pos),e.pos=s,f}function un(e,n,r){let o,t=n;const c={ok:!1,pos:0,str:""};if(e.charCodeAt(t)===60){for(t++;t<r;){if(o=e.charCodeAt(t),o===10||o===60)return c;if(o===62)return c.pos=t+1,c.str=D(e.slice(n+1,t)),c.ok=!0,c;if(o===92&&t+1<r){t+=2;continue}t++}return c}let l=0;for(;t<r&&(o=e.charCodeAt(t),!(o===32||o<32||o===127));){if(o===92&&t+1<r){if(e.charCodeAt(t+1)===32)break;t+=2;continue}if(o===40&&(l++,l>32))return c;if(o===41){if(l===0)break;l--}t++}return n===t||l!==0||(c.str=D(e.slice(n,t)),c.pos=t,c.ok=!0),c}function hn(e,n,r,o){let t,c=n;const l={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(o)l.str=o.str,l.marker=o.marker;else{if(c>=r)return l;let i=e.charCodeAt(c);if(i!==34&&i!==39&&i!==40)return l;n++,c++,i===40&&(i=41),l.marker=i}for(;c<r;){if(t=e.charCodeAt(c),t===l.marker)return l.pos=c+1,l.str+=D(e.slice(n,c)),l.ok=!0,l;if(t===40&&l.marker===41)return l;t===92&&c+1<r&&c++,c++}return l.can_continue=!0,l.str+=D(e.slice(n,c)),l}const pn=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:un,parseLinkLabel:fn,parseLinkTitle:hn},Symbol.toStringTag,{value:"Module"})),T={};T.code_inline=function(e,n,r,o,t){const c=e[n];return"<code"+t.renderAttrs(c)+">"+R(c.content)+"</code>"};T.code_block=function(e,n,r,o,t){const c=e[n];return"<pre"+t.renderAttrs(c)+"><code>"+R(e[n].content)+`</code></pre>
`};T.fence=function(e,n,r,o,t){const c=e[n],l=c.info?D(c.info).trim():"";let i="",s="";if(l){const u=l.split(/(\s+)/g);i=u[0],s=u.slice(2).join("")}let f;if(r.highlight?f=r.highlight(c.content,i,s)||R(c.content):f=R(c.content),f.indexOf("<pre")===0)return f+`
`;if(l){const u=c.attrIndex("class"),h=c.attrs?c.attrs.slice():[];u<0?h.push(["class",r.langPrefix+i]):(h[u]=h[u].slice(),h[u][1]+=" "+r.langPrefix+i);const a={attrs:h};return`<pre><code${t.renderAttrs(a)}>${f}</code></pre>
`}return`<pre><code${t.renderAttrs(c)}>${f}</code></pre>
`};T.image=function(e,n,r,o,t){const c=e[n];return c.attrs[c.attrIndex("alt")][1]=t.renderInlineAsText(c.children,r,o),t.renderToken(e,n,r)};T.hardbreak=function(e,n,r){return r.xhtmlOut?`<br />
`:`<br>
`};T.softbreak=function(e,n,r){return r.breaks?r.xhtmlOut?`<br />
`:`<br>
`:`
`};T.text=function(e,n){return R(e[n].content)};T.html_block=function(e,n){return e[n].content};T.html_inline=function(e,n){return e[n].content};function j(){this.rules=Q({},T)}j.prototype.renderAttrs=function(n){let r,o,t;if(!n.attrs)return"";for(t="",r=0,o=n.attrs.length;r<o;r++)t+=" "+R(n.attrs[r][0])+'="'+R(n.attrs[r][1])+'"';return t};j.prototype.renderToken=function(n,r,o){const t=n[r];let c="";if(t.hidden)return"";t.block&&t.nesting!==-1&&r&&n[r-1].hidden&&(c+=`
`),c+=(t.nesting===-1?"</":"<")+t.tag,c+=this.renderAttrs(t),t.nesting===0&&o.xhtmlOut&&(c+=" /");let l=!1;if(t.block&&(l=!0,t.nesting===1&&r+1<n.length)){const i=n[r+1];(i.type==="inline"||i.hidden||i.nesting===-1&&i.tag===t.tag)&&(l=!1)}return c+=l?`>
`:">",c};j.prototype.renderInline=function(e,n,r){let o="";const t=this.rules;for(let c=0,l=e.length;c<l;c++){const i=e[c].type;typeof t[i]<"u"?o+=t[i](e,c,n,r,this):o+=this.renderToken(e,c,n)}return o};j.prototype.renderInlineAsText=function(e,n,r){let o="";for(let t=0,c=e.length;t<c;t++)switch(e[t].type){case"text":o+=e[t].content;break;case"image":o+=this.renderInlineAsText(e[t].children,n,r);break;case"html_inline":case"html_block":o+=e[t].content;break;case"softbreak":case"hardbreak":o+=`
`;break}return o};j.prototype.render=function(e,n,r){let o="";const t=this.rules;for(let c=0,l=e.length;c<l;c++){const i=e[c].type;i==="inline"?o+=this.renderInline(e[c].children,n,r):typeof t[i]<"u"?o+=t[i](e,c,n,r,this):o+=this.renderToken(e,c,n,r)}return o};function z(){this.__rules__=[],this.__cache__=null}z.prototype.__find__=function(e){for(let n=0;n<this.__rules__.length;n++)if(this.__rules__[n].name===e)return n;return-1};z.prototype.__compile__=function(){const e=this,n=[""];e.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(o){n.indexOf(o)<0&&n.push(o)})}),e.__cache__={},n.forEach(function(r){e.__cache__[r]=[],e.__rules__.forEach(function(o){o.enabled&&(r&&o.alt.indexOf(r)<0||e.__cache__[r].push(o.fn))})})};z.prototype.at=function(e,n,r){const o=this.__find__(e),t=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__[o].fn=n,this.__rules__[o].alt=t.alt||[],this.__cache__=null};z.prototype.before=function(e,n,r,o){const t=this.__find__(e),c=o||{};if(t===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(t,0,{name:n,enabled:!0,fn:r,alt:c.alt||[]}),this.__cache__=null};z.prototype.after=function(e,n,r,o){const t=this.__find__(e),c=o||{};if(t===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(t+1,0,{name:n,enabled:!0,fn:r,alt:c.alt||[]}),this.__cache__=null};z.prototype.push=function(e,n,r){const o=r||{};this.__rules__.push({name:e,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};z.prototype.enable=function(e,n){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(o){const t=this.__find__(o);if(t<0){if(n)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[t].enabled=!0,r.push(o)},this),this.__cache__=null,r};z.prototype.enableOnly=function(e,n){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,n)};z.prototype.disable=function(e,n){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(o){const t=this.__find__(o);if(t<0){if(n)return;throw new Error("Rules manager: invalid rule name "+o)}this.__rules__[t].enabled=!1,r.push(o)},this),this.__cache__=null,r};z.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function v(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}v.prototype.attrIndex=function(n){if(!this.attrs)return-1;const r=this.attrs;for(let o=0,t=r.length;o<t;o++)if(r[o][0]===n)return o;return-1};v.prototype.attrPush=function(n){this.attrs?this.attrs.push(n):this.attrs=[n]};v.prototype.attrSet=function(n,r){const o=this.attrIndex(n),t=[n,r];o<0?this.attrPush(t):this.attrs[o]=t};v.prototype.attrGet=function(n){const r=this.attrIndex(n);let o=null;return r>=0&&(o=this.attrs[r][1]),o};v.prototype.attrJoin=function(n,r){const o=this.attrIndex(n);o<0?this.attrPush([n,r]):this.attrs[o][1]=this.attrs[o][1]+" "+r};function Me(e,n,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=n}Me.prototype.Token=v;const _n=/\r\n?|\n/g,an=/\0/g;function dn(e){let n;n=e.src.replace(_n,`
`),n=n.replace(an,"�"),e.src=n}function kn(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 mn(e){const n=e.tokens;for(let r=0,o=n.length;r<o;r++){const t=n[r];t.type==="inline"&&e.md.inline.parse(t.content,e.md,e.env,t.children)}}function xn(e){return/^<a[>\s]/i.test(e)}function gn(e){return/^<\/a\s*>/i.test(e)}function bn(e){const n=e.tokens;if(e.md.options.linkify)for(let r=0,o=n.length;r<o;r++){if(n[r].type!=="inline"||!e.md.linkify.pretest(n[r].content))continue;let t=n[r].children,c=0;for(let l=t.length-1;l>=0;l--){const i=t[l];if(i.type==="link_close"){for(l--;t[l].level!==i.level&&t[l].type!=="link_open";)l--;continue}if(i.type==="html_inline"&&(xn(i.content)&&c>0&&c--,gn(i.content)&&c++),!(c>0)&&i.type==="text"&&e.md.linkify.test(i.content)){const s=i.content;let f=e.md.linkify.match(s);const u=[];let h=i.level,a=0;f.length>0&&f[0].index===0&&l>0&&t[l-1].type==="text_special"&&(f=f.slice(1));for(let _=0;_<f.length;_++){const p=f[_].url,g=e.md.normalizeLink(p);if(!e.md.validateLink(g))continue;let b=f[_].text;f[_].schema?f[_].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,"");const y=f[_].index;if(y>a){const x=new e.Token("text","",0);x.content=s.slice(a,y),x.level=h,u.push(x)}const k=new e.Token("link_open","a",1);k.attrs=[["href",g]],k.level=h++,k.markup="linkify",k.info="auto",u.push(k);const m=new e.Token("text","",0);m.content=b,m.level=h,u.push(m);const d=new e.Token("link_close","a",-1);d.level=--h,d.markup="linkify",d.info="auto",u.push(d),a=f[_].lastIndex}if(a<s.length){const _=new e.Token("text","",0);_.content=s.slice(a),_.level=h,u.push(_)}n[r].children=t=ze(t,l,u)}}}}const ve=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Cn=/\((c|tm|r)\)/i,yn=/\((c|tm|r)\)/ig,An={c:"©",r:"®",tm:"™"};function En(e,n){return An[n.toLowerCase()]}function Sn(e){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o.type==="text"&&!n&&(o.content=o.content.replace(yn,En)),o.type==="link_open"&&o.info==="auto"&&n--,o.type==="link_close"&&o.info==="auto"&&n++}}function zn(e){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o.type==="text"&&!n&&ve.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),o.type==="link_open"&&o.info==="auto"&&n--,o.type==="link_close"&&o.info==="auto"&&n++}}function wn(e){let n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)e.tokens[n].type==="inline"&&(Cn.test(e.tokens[n].content)&&Sn(e.tokens[n].children),ve.test(e.tokens[n].content)&&zn(e.tokens[n].children))}const Mn=/['"]/,he=/['"]/g,pe="’";function U(e,n,r){return e.slice(0,n)+r+e.slice(n+1)}function vn(e,n){let r;const o=[];for(let t=0;t<e.length;t++){const c=e[t],l=e[t].level;for(r=o.length-1;r>=0&&!(o[r].level<=l);r--);if(o.length=r+1,c.type!=="text")continue;let i=c.content,s=0,f=i.length;e:for(;s<f;){he.lastIndex=s;const u=he.exec(i);if(!u)break;let h=!0,a=!0;s=u.index+1;const _=u[0]==="'";let p=32;if(u.index-1>=0)p=i.charCodeAt(u.index-1);else for(r=t-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){p=e[r].content.charCodeAt(e[r].content.length-1);break}let g=32;if(s<f)g=i.charCodeAt(s);else for(r=t+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){g=e[r].content.charCodeAt(0);break}const b=B(p)||Z(String.fromCharCode(p)),y=B(g)||Z(String.fromCharCode(g)),k=L(p),m=L(g);if(m?h=!1:y&&(k||b||(h=!1)),k?a=!1:b&&(m||y||(a=!1)),g===34&&u[0]==='"'&&p>=48&&p<=57&&(a=h=!1),h&&a&&(h=b,a=y),!h&&!a){_&&(c.content=U(c.content,u.index,pe));continue}if(a)for(r=o.length-1;r>=0;r--){let d=o[r];if(o[r].level<l)break;if(d.single===_&&o[r].level===l){d=o[r];let x,C;_?(x=n.md.options.quotes[2],C=n.md.options.quotes[3]):(x=n.md.options.quotes[0],C=n.md.options.quotes[1]),c.content=U(c.content,u.index,C),e[d.token].content=U(e[d.token].content,d.pos,x),s+=C.length-1,d.token===t&&(s+=x.length-1),i=c.content,f=i.length,o.length=r;continue e}}h?o.push({token:t,pos:u.index,single:_,level:l}):a&&_&&(c.content=U(c.content,u.index,pe))}}}function Tn(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)||vn(e.tokens[n].children,e)}function In(e){let n,r;const o=e.tokens,t=o.length;for(let c=0;c<t;c++){if(o[c].type!=="inline")continue;const l=o[c].children,i=l.length;for(n=0;n<i;n++)l[n].type==="text_special"&&(l[n].type="text");for(n=r=0;n<i;n++)l[n].type==="text"&&n+1<i&&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 K=[["normalize",dn],["block",kn],["inline",mn],["linkify",bn],["replacements",wn],["smartquotes",Tn],["text_join",In]];function le(){this.ruler=new z;for(let e=0;e<K.length;e++)this.ruler.push(K[e][0],K[e][1])}le.prototype.process=function(e){const n=this.ruler.getRules("");for(let r=0,o=n.length;r<o;r++)n[r](e)};le.prototype.State=Me;function I(e,n,r,o){this.src=e,this.md=n,this.env=r,this.tokens=o,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 t=this.src;for(let c=0,l=0,i=0,s=0,f=t.length,u=!1;l<f;l++){const h=t.charCodeAt(l);if(!u)if(A(h)){i++,h===9?s+=4-s%4:s++;continue}else u=!0;(h===10||l===f-1)&&(h!==10&&l++,this.bMarks.push(c),this.eMarks.push(l),this.tShift.push(i),this.sCount.push(s),this.bsCount.push(0),u=!1,i=0,s=0,c=l+1)}this.bMarks.push(t.length),this.eMarks.push(t.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 o=new v(e,n,r);return o.block=!0,r<0&&this.level--,o.level=this.level,r>0&&this.level++,this.tokens.push(o),o};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 o=this.src.charCodeAt(n);if(!A(o))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 o=this.src.length;n<o&&this.src.charCodeAt(n)===r;n++);return n};I.prototype.skipCharsBack=function(n,r,o){if(n<=o)return n;for(;n>o;)if(r!==this.src.charCodeAt(--n))return n+1;return n};I.prototype.getLines=function(n,r,o,t){if(n>=r)return"";const c=new Array(r-n);for(let l=0,i=n;i<r;i++,l++){let s=0;const f=this.bMarks[i];let u=f,h;for(i+1<r||t?h=this.eMarks[i]+1:h=this.eMarks[i];u<h&&s<o;){const a=this.src.charCodeAt(u);if(A(a))a===9?s+=4-(s+this.bsCount[i])%4:s++;else if(u-f<this.tShift[i])s++;else break;u++}s>o?c[l]=new Array(s-o+1).join(" ")+this.src.slice(u,h):c[l]=this.src.slice(u,h)}return c.join("")};I.prototype.Token=v;const Pn=65536;function ee(e,n){const r=e.bMarks[n]+e.tShift[n],o=e.eMarks[n];return e.src.slice(r,o)}function _e(e){const n=[],r=e.length;let o=0,t=e.charCodeAt(o),c=!1,l=0,i="";for(;o<r;)t===124&&(c?(i+=e.substring(l,o-1),l=o):(n.push(i+e.substring(l,o)),i="",l=o+1)),c=t===92,o++,t=e.charCodeAt(o);return n.push(i+e.substring(l)),n}function Rn(e,n,r,o){if(n+2>r)return!1;let t=n+1;if(e.sCount[t]<e.blkIndent||e.sCount[t]-e.blkIndent>=4)return!1;let c=e.bMarks[t]+e.tShift[t];if(c>=e.eMarks[t])return!1;const l=e.src.charCodeAt(c++);if(l!==124&&l!==45&&l!==58||c>=e.eMarks[t])return!1;const i=e.src.charCodeAt(c++);if(i!==124&&i!==45&&i!==58&&!A(i)||l===45&&A(i))return!1;for(;c<e.eMarks[t];){const d=e.src.charCodeAt(c);if(d!==124&&d!==45&&d!==58&&!A(d))return!1;c++}let s=ee(e,n+1),f=s.split("|");const u=[];for(let d=0;d<f.length;d++){const x=f[d].trim();if(!x){if(d===0||d===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(x))return!1;x.charCodeAt(x.length-1)===58?u.push(x.charCodeAt(0)===58?"center":"right"):x.charCodeAt(0)===58?u.push("left"):u.push("")}if(s=ee(e,n).trim(),s.indexOf("|")===-1||e.sCount[n]-e.blkIndent>=4)return!1;f=_e(s),f.length&&f[0]===""&&f.shift(),f.length&&f[f.length-1]===""&&f.pop();const h=f.length;if(h===0||h!==u.length)return!1;if(o)return!0;const a=e.parentType;e.parentType="table";const _=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),g=[n,0];p.map=g;const b=e.push("thead_open","thead",1);b.map=[n,n+1];const y=e.push("tr_open","tr",1);y.map=[n,n+1];for(let d=0;d<f.length;d++){const x=e.push("th_open","th",1);u[d]&&(x.attrs=[["style","text-align:"+u[d]]]);const C=e.push("inline","",0);C.content=f[d].trim(),C.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let k,m=0;for(t=n+2;t<r&&!(e.sCount[t]<e.blkIndent);t++){let d=!1;for(let C=0,E=_.length;C<E;C++)if(_[C](e,t,r,!0)){d=!0;break}if(d||(s=ee(e,t).trim(),!s)||e.sCount[t]-e.blkIndent>=4||(f=_e(s),f.length&&f[0]===""&&f.shift(),f.length&&f[f.length-1]===""&&f.pop(),m+=h-f.length,m>Pn))break;if(t===n+2){const C=e.push("tbody_open","tbody",1);C.map=k=[n+2,0]}const x=e.push("tr_open","tr",1);x.map=[t,t+1];for(let C=0;C<h;C++){const E=e.push("td_open","td",1);u[C]&&(E.attrs=[["style","text-align:"+u[C]]]);const S=e.push("inline","",0);S.content=f[C]?f[C].trim():"",S.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return k&&(e.push("tbody_close","tbody",-1),k[1]=t),e.push("table_close","table",-1),g[1]=t,e.parentType=a,e.line=t,!0}function $n(e,n,r){if(e.sCount[n]-e.blkIndent<4)return!1;let o=n+1,t=o;for(;o<r;){if(e.isEmpty(o)){o++;continue}if(e.sCount[o]-e.blkIndent>=4){o++,t=o;continue}break}e.line=t;const c=e.push("code_block","code",0);return c.content=e.getLines(n,t,4+e.blkIndent,!1)+`
`,c.map=[n,e.line],!0}function On(e,n,r,o){let t=e.bMarks[n]+e.tShift[n],c=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||t+3>c)return!1;const l=e.src.charCodeAt(t);if(l!==126&&l!==96)return!1;let i=t;t=e.skipChars(t,l);let s=t-i;if(s<3)return!1;const f=e.src.slice(i,t),u=e.src.slice(t,c);if(l===96&&u.indexOf(String.fromCharCode(l))>=0)return!1;if(o)return!0;let h=n,a=!1;for(;h++,!(h>=r||(t=i=e.bMarks[h]+e.tShift[h],c=e.eMarks[h],t<c&&e.sCount[h]<e.blkIndent));)if(e.src.charCodeAt(t)===l&&!(e.sCount[h]-e.blkIndent>=4)&&(t=e.skipChars(t,l),!(t-i<s)&&(t=e.skipSpaces(t),!(t<c)))){a=!0;break}s=e.sCount[n],e.line=h+(a?1:0);const _=e.push("fence","code",0);return _.info=u,_.content=e.getLines(n+1,h,s,!0),_.markup=f,_.map=[n,e.line],!0}function Dn(e,n,r,o){let t=e.bMarks[n]+e.tShift[n],c=e.eMarks[n];const l=e.lineMax;if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(t)!==62)return!1;if(o)return!0;const i=[],s=[],f=[],u=[],h=e.md.block.ruler.getRules("blockquote"),a=e.parentType;e.parentType="blockquote";let _=!1,p;for(p=n;p<r;p++){const m=e.sCount[p]<e.blkIndent;if(t=e.bMarks[p]+e.tShift[p],c=e.eMarks[p],t>=c)break;if(e.src.charCodeAt(t++)===62&&!m){let x=e.sCount[p]+1,C,E;e.src.charCodeAt(t)===32?(t++,x++,E=!1,C=!0):e.src.charCodeAt(t)===9?(C=!0,(e.bsCount[p]+x)%4===3?(t++,x++,E=!1):E=!0):C=!1;let S=x;for(i.push(e.bMarks[p]),e.bMarks[p]=t;t<c;){const P=e.src.charCodeAt(t);if(A(P))P===9?S+=4-(S+e.bsCount[p]+(E?1:0))%4:S++;else break;t++}_=t>=c,s.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(C?1:0),f.push(e.sCount[p]),e.sCount[p]=S-x,u.push(e.tShift[p]),e.tShift[p]=t-e.bMarks[p];continue}if(_)break;let d=!1;for(let x=0,C=h.length;x<C;x++)if(h[x](e,p,r,!0)){d=!0;break}if(d){e.lineMax=p,e.blkIndent!==0&&(i.push(e.bMarks[p]),s.push(e.bsCount[p]),u.push(e.tShift[p]),f.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}i.push(e.bMarks[p]),s.push(e.bsCount[p]),u.push(e.tShift[p]),f.push(e.sCount[p]),e.sCount[p]=-1}const g=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const y=[n,0];b.map=y,e.md.block.tokenize(e,n,p);const k=e.push("blockquote_close","blockquote",-1);k.markup=">",e.lineMax=l,e.parentType=a,y[1]=e.line;for(let m=0;m<u.length;m++)e.bMarks[m+n]=i[m],e.tShift[m+n]=u[m],e.sCount[m+n]=f[m],e.bsCount[m+n]=s[m];return e.blkIndent=g,!0}function jn(e,n,r,o){const t=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4)return!1;let c=e.bMarks[n]+e.tShift[n];const l=e.src.charCodeAt(c++);if(l!==42&&l!==45&&l!==95)return!1;let i=1;for(;c<t;){const f=e.src.charCodeAt(c++);if(f!==l&&!A(f))return!1;f===l&&i++}if(i<3)return!1;if(o)return!0;e.line=n+1;const s=e.push("hr","hr",0);return s.map=[n,e.line],s.markup=Array(i+1).join(String.fromCharCode(l)),!0}function ae(e,n){const r=e.eMarks[n];let o=e.bMarks[n]+e.tShift[n];const t=e.src.charCodeAt(o++);if(t!==42&&t!==45&&t!==43)return-1;if(o<r){const c=e.src.charCodeAt(o);if(!A(c))return-1}return o}function de(e,n){const r=e.bMarks[n]+e.tShift[n],o=e.eMarks[n];let t=r;if(t+1>=o)return-1;let c=e.src.charCodeAt(t++);if(c<48||c>57)return-1;for(;;){if(t>=o)return-1;if(c=e.src.charCodeAt(t++),c>=48&&c<=57){if(t-r>=10)return-1;continue}if(c===41||c===46)break;return-1}return t<o&&(c=e.src.charCodeAt(t),!A(c))?-1:t}function Fn(e,n){const r=e.level+2;for(let o=n+2,t=e.tokens.length-2;o<t;o++)e.tokens[o].level===r&&e.tokens[o].type==="paragraph_open"&&(e.tokens[o+2].hidden=!0,e.tokens[o].hidden=!0,o+=2)}function Ln(e,n,r,o){let t,c,l,i,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 u=!1;o&&e.parentType==="paragraph"&&e.sCount[s]>=e.blkIndent&&(u=!0);let h,a,_;if((_=de(e,s))>=0){if(h=!0,l=e.bMarks[s]+e.tShift[s],a=Number(e.src.slice(l,_-1)),u&&a!==1)return!1}else if((_=ae(e,s))>=0)h=!1;else return!1;if(u&&e.skipSpaces(_)>=e.eMarks[s])return!1;if(o)return!0;const p=e.src.charCodeAt(_-1),g=e.tokens.length;h?(i=e.push("ordered_list_open","ol",1),a!==1&&(i.attrs=[["start",a]])):i=e.push("bullet_list_open","ul",1);const b=[s,0];i.map=b,i.markup=String.fromCharCode(p);let y=!1;const k=e.md.block.ruler.getRules("list"),m=e.parentType;for(e.parentType="list";s<r;){c=_,t=e.eMarks[s];const d=e.sCount[s]+_-(e.bMarks[s]+e.tShift[s]);let x=d;for(;c<t;){const $=e.src.charCodeAt(c);if($===9)x+=4-(x+e.bsCount[s])%4;else if($===32)x++;else break;c++}const C=c;let E;C>=t?E=1:E=x-d,E>4&&(E=1);const S=d+E;i=e.push("list_item_open","li",1),i.markup=String.fromCharCode(p);const P=[s,0];i.map=P,h&&(i.info=e.src.slice(l,_-1));const F=e.tight,Y=e.tShift[s],De=e.sCount[s],je=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[s]=C-e.bMarks[s],e.sCount[s]=x,C>=t&&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=je,e.tShift[s]=Y,e.sCount[s]=De,e.tight=F,i=e.push("list_item_close","li",-1),i.markup=String.fromCharCode(p),s=e.line,P[1]=s,s>=r||e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)break;let fe=!1;for(let $=0,Fe=k.length;$<Fe;$++)if(k[$](e,s,r,!0)){fe=!0;break}if(fe)break;if(h){if(_=de(e,s),_<0)break;l=e.bMarks[s]+e.tShift[s]}else if(_=ae(e,s),_<0)break;if(p!==e.src.charCodeAt(_-1))break}return h?i=e.push("ordered_list_close","ol",-1):i=e.push("bullet_list_close","ul",-1),i.markup=String.fromCharCode(p),b[1]=s,e.line=s,e.parentType=m,f&&Fn(e,g),!0}function Zn(e,n,r,o){let t=e.bMarks[n]+e.tShift[n],c=e.eMarks[n],l=n+1;if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(t)!==91)return!1;function i(k){const m=e.lineMax;if(k>=m||e.isEmpty(k))return null;let d=!1;if(e.sCount[k]-e.blkIndent>3&&(d=!0),e.sCount[k]<0&&(d=!0),!d){const E=e.md.block.ruler.getRules("reference"),S=e.parentType;e.parentType="reference";let P=!1;for(let F=0,Y=E.length;F<Y;F++)if(E[F](e,k,m,!0)){P=!0;break}if(e.parentType=S,P)return null}const x=e.bMarks[k]+e.tShift[k],C=e.eMarks[k];return e.src.slice(x,C+1)}let s=e.src.slice(t,c+1);c=s.length;let f=-1;for(t=1;t<c;t++){const k=s.charCodeAt(t);if(k===91)return!1;if(k===93){f=t;break}else if(k===10){const m=i(l);m!==null&&(s+=m,c=s.length,l++)}else if(k===92&&(t++,t<c&&s.charCodeAt(t)===10)){const m=i(l);m!==null&&(s+=m,c=s.length,l++)}}if(f<0||s.charCodeAt(f+1)!==58)return!1;for(t=f+2;t<c;t++){const k=s.charCodeAt(t);if(k===10){const m=i(l);m!==null&&(s+=m,c=s.length,l++)}else if(!A(k))break}const u=e.md.helpers.parseLinkDestination(s,t,c);if(!u.ok)return!1;const h=e.md.normalizeLink(u.str);if(!e.md.validateLink(h))return!1;t=u.pos;const a=t,_=l,p=t;for(;t<c;t++){const k=s.charCodeAt(t);if(k===10){const m=i(l);m!==null&&(s+=m,c=s.length,l++)}else if(!A(k))break}let g=e.md.helpers.parseLinkTitle(s,t,c);for(;g.can_continue;){const k=i(l);if(k===null)break;s+=k,t=c,c=s.length,l++,g=e.md.helpers.parseLinkTitle(s,t,c,g)}let b;for(t<c&&p!==t&&g.ok?(b=g.str,t=g.pos):(b="",t=a,l=_);t<c;){const k=s.charCodeAt(t);if(!A(k))break;t++}if(t<c&&s.charCodeAt(t)!==10&&b)for(b="",t=a,l=_;t<c;){const k=s.charCodeAt(t);if(!A(k))break;t++}if(t<c&&s.charCodeAt(t)!==10)return!1;const y=J(s.slice(1,f));return y?(o||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[y]>"u"&&(e.env.references[y]={title:b,href:h}),e.line=l),!0):!1}const Bn=["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"],qn="[a-zA-Z_:][a-zA-Z0-9:._-]*",Nn="[^\"'=<>`\\x00-\\x20]+",Un="'[^']*'",Hn='"[^"]*"',Gn="(?:"+Nn+"|"+Un+"|"+Hn+")",Wn="(?:\\s+"+qn+"(?:\\s*=\\s*"+Gn+")?)",Te="<[A-Za-z][A-Za-z0-9\\-]*"+Wn+"*\\s*\\/?>",Ie="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Qn="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Jn="<[?][\\s\\S]*?[?]>",Vn="<![A-Za-z][^>]*>",Xn="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Yn=new RegExp("^(?:"+Te+"|"+Ie+"|"+Qn+"|"+Jn+"|"+Vn+"|"+Xn+")"),Kn=new RegExp("^(?:"+Te+"|"+Ie+")"),O=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Bn.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Kn.source+"\\s*$"),/^$/,!1]];function er(e,n,r,o){let t=e.bMarks[n]+e.tShift[n],c=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(t)!==60)return!1;let l=e.src.slice(t,c),i=0;for(;i<O.length&&!O[i][0].test(l);i++);if(i===O.length)return!1;if(o)return O[i][2];let s=n+1;if(!O[i][1].test(l)){for(;s<r&&!(e.sCount[s]<e.blkIndent);s++)if(t=e.bMarks[s]+e.tShift[s],c=e.eMarks[s],l=e.src.slice(t,c),O[i][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 nr(e,n,r,o){let t=e.bMarks[n]+e.tShift[n],c=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4)return!1;let l=e.src.charCodeAt(t);if(l!==35||t>=c)return!1;let i=1;for(l=e.src.charCodeAt(++t);l===35&&t<c&&i<=6;)i++,l=e.src.charCodeAt(++t);if(i>6||t<c&&!A(l))return!1;if(o)return!0;c=e.skipSpacesBack(c,t);const s=e.skipCharsBack(c,35,t);s>t&&A(e.src.charCodeAt(s-1))&&(c=s),e.line=n+1;const f=e.push("heading_open","h"+String(i),1);f.markup="########".slice(0,i),f.map=[n,e.line];const u=e.push("inline","",0);u.content=e.src.slice(t,c).trim(),u.map=[n,e.line],u.children=[];const h=e.push("heading_close","h"+String(i),-1);return h.markup="########".slice(0,i),!0}function rr(e,n,r){const o=e.md.block.ruler.getRules("paragraph");if(e.sCount[n]-e.blkIndent>=4)return!1;const t=e.parentType;e.parentType="paragraph";let c=0,l,i=n+1;for(;i<r&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]>=e.blkIndent){let _=e.bMarks[i]+e.tShift[i];const p=e.eMarks[i];if(_<p&&(l=e.src.charCodeAt(_),(l===45||l===61)&&(_=e.skipChars(_,l),_=e.skipSpaces(_),_>=p))){c=l===61?1:2;break}}if(e.sCount[i]<0)continue;let a=!1;for(let _=0,p=o.length;_<p;_++)if(o[_](e,i,r,!0)){a=!0;break}if(a)break}if(!c)return!1;const s=e.getLines(n,i,e.blkIndent,!1).trim();e.line=i+1;const f=e.push("heading_open","h"+String(c),1);f.markup=String.fromCharCode(l),f.map=[n,e.line];const u=e.push("inline","",0);u.content=s,u.map=[n,e.line-1],u.children=[];const h=e.push("heading_close","h"+String(c),-1);return h.markup=String.fromCharCode(l),e.parentType=t,!0}function or(e,n,r){const o=e.md.block.ruler.getRules("paragraph"),t=e.parentType;let c=n+1;for(e.parentType="paragraph";c<r&&!e.isEmpty(c);c++){if(e.sCount[c]-e.blkIndent>3||e.sCount[c]<0)continue;let f=!1;for(let u=0,h=o.length;u<h;u++)if(o[u](e,c,r,!0)){f=!0;break}if(f)break}const l=e.getLines(n,c,e.blkIndent,!1).trim();e.line=c;const i=e.push("paragraph_open","p",1);i.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=t,!0}const H=[["table",Rn,["paragraph","reference"]],["code",$n],["fence",On,["paragraph","reference","blockquote","list"]],["blockquote",Dn,["paragraph","reference","blockquote","list"]],["hr",jn,["paragraph","reference","blockquote","list"]],["list",Ln,["paragraph","reference","blockquote"]],["reference",Zn],["html_block",er,["paragraph","reference","blockquote"]],["heading",nr,["paragraph","reference","blockquote"]],["lheading",rr],["paragraph",or]];function V(){this.ruler=new z;for(let e=0;e<H.length;e++)this.ruler.push(H[e][0],H[e][1],{alt:(H[e][2]||[]).slice()})}V.prototype.tokenize=function(e,n,r){const o=this.ruler.getRules(""),t=o.length,c=e.md.options.maxNesting;let l=n,i=!1;for(;l<r&&(e.line=l=e.skipEmptyLines(l),!(l>=r||e.sCount[l]<e.blkIndent));){if(e.level>=c){e.line=r;break}const s=e.line;let f=!1;for(let u=0;u<t;u++)if(f=o[u](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=!i,e.isEmpty(e.line-1)&&(i=!0),l=e.line,l<r&&e.isEmpty(l)&&(i=!0,l++,e.line=l)}};V.prototype.parse=function(e,n,r,o){if(!e)return;const t=new this.State(e,n,r,o);this.tokenize(t,t.line,t.lineMax)};V.prototype.State=I;function q(e,n,r,o){this.src=e,this.env=r,this.md=n,this.tokens=o,this.tokens_meta=Array(o.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 v("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 o=new v(e,n,r);let t=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],t={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(t),o};q.prototype.scanDelims=function(e,n){const r=this.posMax,o=this.src.charCodeAt(e),t=e>0?this.src.charCodeAt(e-1):32;let c=e;for(;c<r&&this.src.charCodeAt(c)===o;)c++;const l=c-e,i=c<r?this.src.charCodeAt(c):32,s=B(t)||Z(String.fromCharCode(t)),f=B(i)||Z(String.fromCharCode(i)),u=L(t),h=L(i),a=!h&&(!f||u||s),_=!u&&(!s||h||f);return{can_open:a&&(n||!_||s),can_close:_&&(n||!a||f),length:l}};q.prototype.Token=v;function tr(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 ir(e,n){let r=e.pos;for(;r<e.posMax&&!tr(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const cr=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function lr(e,n){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,o=e.posMax;if(r+3>o||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const t=e.pending.match(cr);if(!t)return!1;const c=t[1],l=e.md.linkify.matchAtStart(e.src.slice(r-c.length));if(!l)return!1;let i=l.url;if(i.length<=c.length)return!1;let s=i.length;for(;s>0&&i.charCodeAt(s-1)===42;)s--;s!==i.length&&(i=i.slice(0,s));const f=e.md.normalizeLink(i);if(!e.md.validateLink(f))return!1;if(!n){e.pending=e.pending.slice(0,-c.length);const u=e.push("link_open","a",1);u.attrs=[["href",f]],u.markup="linkify",u.info="auto";const h=e.push("text","",0);h.content=e.md.normalizeLinkText(i);const a=e.push("link_close","a",-1);a.markup="linkify",a.info="auto"}return e.pos+=i.length-c.length,!0}function sr(e,n){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const o=e.pending.length-1,t=e.posMax;if(!n)if(o>=0&&e.pending.charCodeAt(o)===32)if(o>=1&&e.pending.charCodeAt(o-1)===32){let c=o-1;for(;c>=1&&e.pending.charCodeAt(c-1)===32;)c--;e.pending=e.pending.slice(0,c),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<t&&A(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const se=[];for(let e=0;e<256;e++)se.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){se[e.charCodeAt(0)]=1});function fr(e,n){let r=e.pos;const o=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=o))return!1;let t=e.src.charCodeAt(r);if(t===10){for(n||e.push("hardbreak","br",0),r++;r<o&&(t=e.src.charCodeAt(r),!!A(t));)r++;return e.pos=r,!0}let c=e.src[r];if(t>=55296&&t<=56319&&r+1<o){const i=e.src.charCodeAt(r+1);i>=56320&&i<=57343&&(c+=e.src[r+1],r++)}const l="\\"+c;if(!n){const i=e.push("text_special","",0);t<256&&se[t]!==0?i.content=c:i.content=l,i.markup=l,i.info="escape"}return e.pos=r+1,!0}function ur(e,n){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const t=r;r++;const c=e.posMax;for(;r<c&&e.src.charCodeAt(r)===96;)r++;const l=e.src.slice(t,r),i=l.length;if(e.backticksScanned&&(e.backticks[i]||0)<=t)return n||(e.pending+=l),e.pos+=i,!0;let s=r,f;for(;(f=e.src.indexOf("`",s))!==-1;){for(s=f+1;s<c&&e.src.charCodeAt(s)===96;)s++;const u=s-f;if(u===i){if(!n){const h=e.push("code_inline","code",0);h.markup=l,h.content=e.src.slice(r,f).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=s,!0}e.backticks[u]=f}return e.backticksScanned=!0,n||(e.pending+=l),e.pos+=i,!0}function hr(e,n){const r=e.pos,o=e.src.charCodeAt(r);if(n||o!==126)return!1;const t=e.scanDelims(e.pos,!0);let c=t.length;const l=String.fromCharCode(o);if(c<2)return!1;let i;c%2&&(i=e.push("text","",0),i.content=l,c--);for(let s=0;s<c;s+=2)i=e.push("text","",0),i.content=l+l,e.delimiters.push({marker:o,length:0,token:e.tokens.length-1,end:-1,open:t.can_open,close:t.can_close});return e.pos+=t.length,!0}function ke(e,n){let r;const o=[],t=n.length;for(let c=0;c<t;c++){const l=n[c];if(l.marker!==126||l.end===-1)continue;const i=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[i.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[i.token-1].type==="text"&&e.tokens[i.token-1].content==="~"&&o.push(i.token-1)}for(;o.length;){const c=o.pop();let l=c+1;for(;l<e.tokens.length&&e.tokens[l].type==="s_close";)l++;l--,c!==l&&(r=e.tokens[l],e.tokens[l]=e.tokens[c],e.tokens[c]=r)}}function pr(e){const n=e.tokens_meta,r=e.tokens_meta.length;ke(e,e.delimiters);for(let o=0;o<r;o++)n[o]&&n[o].delimiters&&ke(e,n[o].delimiters)}const Pe={tokenize:hr,postProcess:pr};function _r(e,n){const r=e.pos,o=e.src.charCodeAt(r);if(n||o!==95&&o!==42)return!1;const t=e.scanDelims(e.pos,o===42);for(let c=0;c<t.length;c++){const l=e.push("text","",0);l.content=String.fromCharCode(o),e.delimiters.push({marker:o,length:t.length,token:e.tokens.length-1,end:-1,open:t.can_open,close:t.can_close})}return e.pos+=t.length,!0}function me(e,n){const r=n.length;for(let o=r-1;o>=0;o--){const t=n[o];if(t.marker!==95&&t.marker!==42||t.end===-1)continue;const c=n[t.end],l=o>0&&n[o-1].end===t.end+1&&n[o-1].marker===t.marker&&n[o-1].token===t.token-1&&n[t.end+1].token===c.token+1,i=String.fromCharCode(t.marker),s=e.tokens[t.token];s.type=l?"strong_open":"em_open",s.tag=l?"strong":"em",s.nesting=1,s.markup=l?i+i:i,s.content="";const f=e.tokens[c.token];f.type=l?"strong_close":"em_close",f.tag=l?"strong":"em",f.nesting=-1,f.markup=l?i+i:i,f.content="",l&&(e.tokens[n[o-1].token].content="",e.tokens[n[t.end+1].token].content="",o--)}}function ar(e){const n=e.tokens_meta,r=e.tokens_meta.length;me(e,e.delimiters);for(let o=0;o<r;o++)n[o]&&n[o].delimiters&&me(e,n[o].delimiters)}const Re={tokenize:_r,postProcess:ar};function dr(e,n){let r,o,t,c,l="",i="",s=e.pos,f=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const u=e.pos,h=e.posMax,a=e.pos+1,_=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(_<0)return!1;let p=_+1;if(p<h&&e.src.charCodeAt(p)===40){for(f=!1,p++;p<h&&(r=e.src.charCodeAt(p),!(!A(r)&&r!==10));p++);if(p>=h)return!1;if(s=p,t=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),t.ok){for(l=e.md.normalizeLink(t.str),e.md.validateLink(l)?p=t.pos:l="",s=p;p<h&&(r=e.src.charCodeAt(p),!(!A(r)&&r!==10));p++);if(t=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<h&&s!==p&&t.ok)for(i=t.str,p=t.pos;p<h&&(r=e.src.charCodeAt(p),!(!A(r)&&r!==10));p++);}(p>=h||e.src.charCodeAt(p)!==41)&&(f=!0),p++}if(f){if(typeof e.env.references>"u")return!1;if(p<h&&e.src.charCodeAt(p)===91?(s=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?o=e.src.slice(s,p++):p=_+1):p=_+1,o||(o=e.src.slice(a,_)),c=e.env.references[J(o)],!c)return e.pos=u,!1;l=c.href,i=c.title}if(!n){e.pos=a,e.posMax=_;const g=e.push("link_open","a",1),b=[["href",l]];g.attrs=b,i&&b.push(["title",i]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=h,!0}function kr(e,n){let r,o,t,c,l,i,s,f,u="";const h=e.pos,a=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const _=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(c=p+1,c<a&&e.src.charCodeAt(c)===40){for(c++;c<a&&(r=e.src.charCodeAt(c),!(!A(r)&&r!==10));c++);if(c>=a)return!1;for(f=c,i=e.md.helpers.parseLinkDestination(e.src,c,e.posMax),i.ok&&(u=e.md.normalizeLink(i.str),e.md.validateLink(u)?c=i.pos:u=""),f=c;c<a&&(r=e.src.charCodeAt(c),!(!A(r)&&r!==10));c++);if(i=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<a&&f!==c&&i.ok)for(s=i.str,c=i.pos;c<a&&(r=e.src.charCodeAt(c),!(!A(r)&&r!==10));c++);else s="";if(c>=a||e.src.charCodeAt(c)!==41)return e.pos=h,!1;c++}else{if(typeof e.env.references>"u")return!1;if(c<a&&e.src.charCodeAt(c)===91?(f=c+1,c=e.md.helpers.parseLinkLabel(e,c),c>=0?t=e.src.slice(f,c++):c=p+1):c=p+1,t||(t=e.src.slice(_,p)),l=e.env.references[J(t)],!l)return e.pos=h,!1;u=l.href,s=l.title}if(!n){o=e.src.slice(_,p);const g=[];e.md.inline.parse(o,e.md,e.env,g);const b=e.push("image","img",0),y=[["src",u],["alt",""]];b.attrs=y,b.children=g,b.content=o,s&&y.push(["title",s])}return e.pos=c,e.posMax=a,!0}const mr=/^([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])?)*)$/,xr=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function gr(e,n){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const o=e.pos,t=e.posMax;for(;;){if(++r>=t)return!1;const l=e.src.charCodeAt(r);if(l===60)return!1;if(l===62)break}const c=e.src.slice(o+1,r);if(xr.test(c)){const l=e.md.normalizeLink(c);if(!e.md.validateLink(l))return!1;if(!n){const i=e.push("link_open","a",1);i.attrs=[["href",l]],i.markup="autolink",i.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(c);const f=e.push("link_close","a",-1);f.markup="autolink",f.info="auto"}return e.pos+=c.length+2,!0}if(mr.test(c)){const l=e.md.normalizeLink("mailto:"+c);if(!e.md.validateLink(l))return!1;if(!n){const i=e.push("link_open","a",1);i.attrs=[["href",l]],i.markup="autolink",i.info="auto";const s=e.push("text","",0);s.content=e.md.normalizeLinkText(c);const f=e.push("link_close","a",-1);f.markup="autolink",f.info="auto"}return e.pos+=c.length+2,!0}return!1}function br(e){return/^<a[>\s]/i.test(e)}function Cr(e){return/^<\/a\s*>/i.test(e)}function yr(e){const n=e|32;return n>=97&&n<=122}function Ar(e,n){if(!e.md.options.html)return!1;const r=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==60||o+2>=r)return!1;const t=e.src.charCodeAt(o+1);if(t!==33&&t!==63&&t!==47&&!yr(t))return!1;const c=e.src.slice(o).match(Yn);if(!c)return!1;if(!n){const l=e.push("html_inline","",0);l.content=c[0],br(l.content)&&e.linkLevel++,Cr(l.content)&&e.linkLevel--}return e.pos+=c[0].length,!0}const Er=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Sr=/^&([a-z][a-z0-9]{1,31});/i;function zr(e,n){const r=e.pos,o=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=o)return!1;if(e.src.charCodeAt(r+1)===35){const c=e.src.slice(r).match(Er);if(c){if(!n){const l=c[1][0].toLowerCase()==="x"?parseInt(c[1].slice(1),16):parseInt(c[1],10),i=e.push("text_special","",0);i.content=ce(l)?G(l):G(65533),i.markup=c[0],i.info="entity"}return e.pos+=c[0].length,!0}}else{const c=e.src.slice(r).match(Sr);if(c){const l=ye(c[0]);if(l!==c[0]){if(!n){const i=e.push("text_special","",0);i.content=l,i.markup=c[0],i.info="entity"}return e.pos+=c[0].length,!0}}}return!1}function xe(e){const n={},r=e.length;if(!r)return;let o=0,t=-2;const c=[];for(let l=0;l<r;l++){const i=e[l];if(c.push(0),(e[o].marker!==i.marker||t!==i.token-1)&&(o=l),t=i.token,i.length=i.length||0,!i.close)continue;n.hasOwnProperty(i.marker)||(n[i.marker]=[-1,-1,-1,-1,-1,-1]);const s=n[i.marker][(i.open?3:0)+i.length%3];let f=o-c[o]-1,u=f;for(;f>s;f-=c[f]+1){const h=e[f];if(h.marker===i.marker&&h.open&&h.end<0){let a=!1;if((h.close||i.open)&&(h.length+i.length)%3===0&&(h.length%3!==0||i.length%3!==0)&&(a=!0),!a){const _=f>0&&!e[f-1].open?c[f-1]+1:0;c[l]=l-f+_,c[f]=_,i.open=!1,h.end=l,h.close=!1,u=-1,t=-2;break}}}u!==-1&&(n[i.marker][(i.open?3:0)+(i.length||0)%3]=u)}}function wr(e){const n=e.tokens_meta,r=e.tokens_meta.length;xe(e.delimiters);for(let o=0;o<r;o++)n[o]&&n[o].delimiters&&xe(n[o].delimiters)}function Mr(e){let n,r,o=0;const t=e.tokens,c=e.tokens.length;for(n=r=0;n<c;n++)t[n].nesting<0&&o--,t[n].level=o,t[n].nesting>0&&o++,t[n].type==="text"&&n+1<c&&t[n+1].type==="text"?t[n+1].content=t[n].content+t[n+1].content:(n!==r&&(t[r]=t[n]),r++);n!==r&&(t.length=r)}const ne=[["text",ir],["linkify",lr],["newline",sr],["escape",fr],["backticks",ur],["strikethrough",Pe.tokenize],["emphasis",Re.tokenize],["link",dr],["image",kr],["autolink",gr],["html_inline",Ar],["entity",zr]],re=[["balance_pairs",wr],["strikethrough",Pe.postProcess],["emphasis",Re.postProcess],["fragments_join",Mr]];function N(){this.ruler=new z;for(let e=0;e<ne.length;e++)this.ruler.push(ne[e][0],ne[e][1]);this.ruler2=new z;for(let e=0;e<re.length;e++)this.ruler2.push(re[e][0],re[e][1])}N.prototype.skipToken=function(e){const n=e.pos,r=this.ruler.getRules(""),o=r.length,t=e.md.options.maxNesting,c=e.cache;if(typeof c[n]<"u"){e.pos=c[n];return}let l=!1;if(e.level<t){for(let i=0;i<o;i++)if(e.level++,l=r[i](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++,c[n]=e.pos};N.prototype.tokenize=function(e){const n=this.ruler.getRules(""),r=n.length,o=e.posMax,t=e.md.options.maxNesting;for(;e.pos<o;){const c=e.pos;let l=!1;if(e.level<t){for(let i=0;i<r;i++)if(l=n[i](e,!1),l){if(c>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(l){if(e.pos>=o)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};N.prototype.parse=function(e,n,r,o){const t=new this.State(e,n,r,o);this.tokenize(t);const c=this.ruler2.getRules(""),l=c.length;for(let i=0;i<l;i++)c[i](t)};N.prototype.State=q;function vr(e){const n={};e=e||{},n.src_Any=qe.source,n.src_Cc=Ne.source,n.src_Z=Ue.source,n.src_P=Ce.source,n.src_ZPCc=[n.src_Z,n.src_P,n.src_Cc].join("|"),n.src_ZCc=[n.src_Z,n.src_Cc].join("|");const r="[><｜]";return n.src_pseudo_letter="(?:(?!"+r+"|"+n.src_ZPCc+")"+n.src_Any+")",n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n.src_auth="(?:(?:(?!"+n.src_ZCc+"|[@/\\[\\]()]).)+@)?",n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",n.src_host_terminator="(?=$|"+r+"|"+n.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+n.src_ZPCc+"))",n.src_path="(?:[/?#](?:(?!"+n.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+n.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+n.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+n.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+n.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+n.src_ZCc+"|[']).)+\\'|\\'(?="+n.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+n.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+n.src_ZCc+"|$)|;(?!"+n.src_ZCc+"|$)|\\!+(?!"+n.src_ZCc+"|[!]|$)|\\?(?!"+n.src_ZCc+"|[?]|$))+|\\/)?",n.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',n.src_xn="xn--[a-z0-9\\-]{1,59}",n.src_domain_root="(?:"+n.src_xn+"|"+n.src_pseudo_letter+"{1,63})",n.src_domain="(?:"+n.src_xn+"|(?:"+n.src_pseudo_letter+")|(?:"+n.src_pseudo_letter+"(?:-|"+n.src_pseudo_letter+"){0,61}"+n.src_pseudo_letter+"))",n.src_host="(?:(?:(?:(?:"+n.src_domain+")\\.)*"+n.src_domain+"))",n.tpl_host_fuzzy="(?:"+n.src_ip4+"|(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%)))",n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%))",n.src_host_strict=n.src_host+n.src_host_terminator,n.tpl_host_fuzzy_strict=n.tpl_host_fuzzy+n.src_host_terminator,n.src_host_port_strict=n.src_host+n.src_port+n.src_host_terminator,n.tpl_host_port_fuzzy_strict=n.tpl_host_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_port_no_ip_fuzzy_strict=n.tpl_host_no_ip_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+n.src_ZPCc+"|>|$))",n.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+n.src_ZCc+")("+n.src_email_name+"@"+n.tpl_host_fuzzy_strict+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|"+n.src_ZPCc+"))((?![$+<=>^`|｜])"+n.tpl_host_port_fuzzy_strict+n.src_path+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|"+n.src_ZPCc+"))((?![$+<=>^`|｜])"+n.tpl_host_port_no_ip_fuzzy_strict+n.src_path+")",n}function oe(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(o){e[o]=r[o]})}),e}function X(e){return Object.prototype.toString.call(e)}function Tr(e){return X(e)==="[object String]"}function Ir(e){return X(e)==="[object Object]"}function Pr(e){return X(e)==="[object RegExp]"}function ge(e){return X(e)==="[object Function]"}function Rr(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const $e={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function $r(e){return Object.keys(e||{}).reduce(function(n,r){return n||$e.hasOwnProperty(r)},!1)}const Or={"http:":{validate:function(e,n,r){const o=e.slice(n);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(o)?o.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,n,r){const o=e.slice(n);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(o)?n>=3&&e[n-3]===":"||n>=3&&e[n-3]==="/"?0:o.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,n,r){const o=e.slice(n);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(o)?o.match(r.re.mailto)[0].length:0}}},Dr="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",jr="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Fr(e){e.__index__=-1,e.__text_cache__=""}function Lr(e){return function(n,r){const o=n.slice(r);return e.test(o)?o.match(e)[0].length:0}}function be(){return function(e,n){n.normalize(e)}}function W(e){const n=e.re=vr(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(Dr),r.push(n.src_xn),n.src_tlds=r.join("|");function o(i){return i.replace("%TLDS%",n.src_tlds)}n.email_fuzzy=RegExp(o(n.tpl_email_fuzzy),"i"),n.link_fuzzy=RegExp(o(n.tpl_link_fuzzy),"i"),n.link_no_ip_fuzzy=RegExp(o(n.tpl_link_no_ip_fuzzy),"i"),n.host_fuzzy_test=RegExp(o(n.tpl_host_fuzzy_test),"i");const t=[];e.__compiled__={};function c(i,s){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+s)}Object.keys(e.__schemas__).forEach(function(i){const s=e.__schemas__[i];if(s===null)return;const f={validate:null,link:null};if(e.__compiled__[i]=f,Ir(s)){Pr(s.validate)?f.validate=Lr(s.validate):ge(s.validate)?f.validate=s.validate:c(i,s),ge(s.normalize)?f.normalize=s.normalize:s.normalize?c(i,s):f.normalize=be();return}if(Tr(s)){t.push(i);return}c(i,s)}),t.forEach(function(i){e.__compiled__[e.__schemas__[i]]&&(e.__compiled__[i].validate=e.__compiled__[e.__schemas__[i]].validate,e.__compiled__[i].normalize=e.__compiled__[e.__schemas__[i]].normalize)}),e.__compiled__[""]={validate:null,normalize:be()};const l=Object.keys(e.__compiled__).filter(function(i){return i.length>0&&e.__compiled__[i]}).map(Rr).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><｜]|"+n.src_ZPCc+"))("+l+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><｜]|"+n.src_ZPCc+"))("+l+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Fr(e)}function Zr(e,n){const r=e.__index__,o=e.__last_index__,t=e.__text_cache__.slice(r,o);this.schema=e.__schema__.toLowerCase(),this.index=r+n,this.lastIndex=o+n,this.raw=t,this.text=t,this.url=t}function te(e,n){const r=new Zr(e,n);return e.__compiled__[r.schema].normalize(r,e),r}function w(e,n){if(!(this instanceof w))return new w(e,n);n||$r(e)&&(n=e,e={}),this.__opts__=oe({},$e,n),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=oe({},Or,e),this.__compiled__={},this.__tlds__=jr,this.__tlds_replaced__=!1,this.re={},W(this)}w.prototype.add=function(n,r){return this.__schemas__[n]=r,W(this),this};w.prototype.set=function(n){return this.__opts__=oe(this.__opts__,n),this};w.prototype.test=function(n){if(this.__text_cache__=n,this.__index__=-1,!n.length)return!1;let r,o,t,c,l,i,s,f,u;if(this.re.schema_test.test(n)){for(s=this.re.schema_search,s.lastIndex=0;(r=s.exec(n))!==null;)if(c=this.testSchemaAt(n,r[2],s.lastIndex),c){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(f=n.search(this.re.host_fuzzy_test),f>=0&&(this.__index__<0||f<this.__index__)&&(o=n.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(l=o.index+o[1].length,(this.__index__<0||l<this.__index__)&&(this.__schema__="",this.__index__=l,this.__last_index__=o.index+o[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=n.indexOf("@"),u>=0&&(t=n.match(this.re.email_fuzzy))!==null&&(l=t.index+t[1].length,i=t.index+t[0].length,(this.__index__<0||l<this.__index__||l===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=l,this.__last_index__=i))),this.__index__>=0};w.prototype.pretest=function(n){return this.re.pretest.test(n)};w.prototype.testSchemaAt=function(n,r,o){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(n,o,this):0};w.prototype.match=function(n){const r=[];let o=0;this.__index__>=0&&this.__text_cache__===n&&(r.push(te(this,o)),o=this.__last_index__);let t=o?n.slice(o):n;for(;this.test(t);)r.push(te(this,o)),t=t.slice(this.__last_index__),o+=this.__last_index__;return r.length?r:null};w.prototype.matchAtStart=function(n){if(this.__text_cache__=n,this.__index__=-1,!n.length)return null;const r=this.re.schema_at_start.exec(n);if(!r)return null;const o=this.testSchemaAt(n,r[2],r[0].length);return o?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+o,te(this,0)):null};w.prototype.tlds=function(n,r){return n=Array.isArray(n)?n:[n],r?(this.__tlds__=this.__tlds__.concat(n).sort().filter(function(o,t,c){return o!==c[t-1]}).reverse(),W(this),this):(this.__tlds__=n.slice(),this.__tlds_replaced__=!0,W(this),this)};w.prototype.normalize=function(n){n.schema||(n.url="http://"+n.url),n.schema==="mailto:"&&!/^mailto:/i.test(n.url)&&(n.url="mailto:"+n.url)};w.prototype.onCompile=function(){};const Br={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},qr={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},Nr={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",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"]}}},Ur={default:Br,zero:qr,commonmark:Nr},Hr=/^(vbscript|javascript|file|data):/,Gr=/^data:image\/(gif|png|jpeg|webp);/;function Wr(e){const n=e.trim().toLowerCase();return Hr.test(n)?Gr.test(n):!0}const Oe=["http:","https:","mailto:"];function Qr(e){const n=Ae(e,!0);if(n.hostname&&(!n.protocol||Oe.indexOf(n.protocol)>=0))try{n.hostname=Ee.toASCII(n.hostname)}catch{}return He(Se(n))}function Jr(e){const n=Ae(e,!0);if(n.hostname&&(!n.protocol||Oe.indexOf(n.protocol)>=0))try{n.hostname=Ee.toUnicode(n.hostname)}catch{}return ue(Se(n),ue.defaultChars+"%")}function M(e,n){if(!(this instanceof M))return new M(e,n);n||ie(e)||(n=e||{},e="default"),this.inline=new N,this.block=new V,this.core=new le,this.renderer=new j,this.linkify=new w,this.validateLink=Wr,this.normalizeLink=Qr,this.normalizeLinkText=Jr,this.utils=sn,this.helpers=Q({},pn),this.options={},this.configure(e),n&&this.set(n)}M.prototype.set=function(e){return Q(this.options,e),this};M.prototype.configure=function(e){const n=this;if(ie(e)){const r=e;if(e=Ur[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(t){r=r.concat(this[t].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const o=e.filter(function(t){return r.indexOf(t)<0});if(o.length&&!n)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+o);return this};M.prototype.disable=function(e,n){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const o=e.filter(function(t){return r.indexOf(t)<0});if(o.length&&!n)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+o);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)};const _o=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));function Vr(e,n,r,o){const t=Number(e[n].meta.id+1).toString();let c="";return typeof o.docId=="string"&&(c=`-${o.docId}-`),c+t}function Xr(e,n){let r=Number(e[n].meta.id+1).toString();return e[n].meta.subId>0&&(r+=`:${e[n].meta.subId}`),`[${r}]`}function Yr(e,n,r,o,t){const c=t.rules.footnote_anchor_name(e,n,r,o,t),l=t.rules.footnote_caption(e,n,r,o,t);let i=c;return e[n].meta.subId>0&&(i+=`:${e[n].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${c}" id="fnref${i}">${l}</a></sup>`}function Kr(e,n,r){return(r.xhtmlOut?`<hr class="footnotes-sep" />
`:`<hr class="footnotes-sep">
`)+`<section class="footnotes">
<ol class="footnotes-list">
`}function eo(){return`</ol>
</section>
`}function no(e,n,r,o,t){let c=t.rules.footnote_anchor_name(e,n,r,o,t);return e[n].meta.subId>0&&(c+=`:${e[n].meta.subId}`),`<li id="fn${c}" class="footnote-item">`}function ro(){return`</li>
`}function oo(e,n,r,o,t){let c=t.rules.footnote_anchor_name(e,n,r,o,t);return e[n].meta.subId>0&&(c+=`:${e[n].meta.subId}`),` <a href="#fnref${c}" class="footnote-backref">↩︎</a>`}function to(e){const n=e.helpers.parseLinkLabel,r=e.utils.isSpace;e.renderer.rules.footnote_ref=Yr,e.renderer.rules.footnote_block_open=Kr,e.renderer.rules.footnote_block_close=eo,e.renderer.rules.footnote_open=no,e.renderer.rules.footnote_close=ro,e.renderer.rules.footnote_anchor=oo,e.renderer.rules.footnote_caption=Xr,e.renderer.rules.footnote_anchor_name=Vr;function o(i,s,f,u){const h=i.bMarks[s]+i.tShift[s],a=i.eMarks[s];if(h+4>a||i.src.charCodeAt(h)!==91||i.src.charCodeAt(h+1)!==94)return!1;let _;for(_=h+2;_<a;_++){if(i.src.charCodeAt(_)===32)return!1;if(i.src.charCodeAt(_)===93)break}if(_===h+2||_+1>=a||i.src.charCodeAt(++_)!==58)return!1;if(u)return!0;_++,i.env.footnotes||(i.env.footnotes={}),i.env.footnotes.refs||(i.env.footnotes.refs={});const p=i.src.slice(h+2,_-2);i.env.footnotes.refs[`:${p}`]=-1;const g=new i.Token("footnote_reference_open","",1);g.meta={label:p},g.level=i.level++,i.tokens.push(g);const b=i.bMarks[s],y=i.tShift[s],k=i.sCount[s],m=i.parentType,d=_,x=i.sCount[s]+_-(i.bMarks[s]+i.tShift[s]);let C=x;for(;_<a;){const S=i.src.charCodeAt(_);if(r(S))S===9?C+=4-C%4:C++;else break;_++}i.tShift[s]=_-d,i.sCount[s]=C-x,i.bMarks[s]=d,i.blkIndent+=4,i.parentType="footnote",i.sCount[s]<i.blkIndent&&(i.sCount[s]+=i.blkIndent),i.md.block.tokenize(i,s,f,!0),i.parentType=m,i.blkIndent-=4,i.tShift[s]=y,i.sCount[s]=k,i.bMarks[s]=b;const E=new i.Token("footnote_reference_close","",-1);return E.level=--i.level,i.tokens.push(E),!0}function t(i,s){const f=i.posMax,u=i.pos;if(u+2>=f||i.src.charCodeAt(u)!==94||i.src.charCodeAt(u+1)!==91)return!1;const h=u+2,a=n(i,u+1);if(a<0)return!1;if(!s){i.env.footnotes||(i.env.footnotes={}),i.env.footnotes.list||(i.env.footnotes.list=[]);const _=i.env.footnotes.list.length,p=[];i.md.inline.parse(i.src.slice(h,a),i.md,i.env,p);const g=i.push("footnote_ref","",0);g.meta={id:_},i.env.footnotes.list[_]={content:i.src.slice(h,a),tokens:p}}return i.pos=a+1,i.posMax=f,!0}function c(i,s){const f=i.posMax,u=i.pos;if(u+3>f||!i.env.footnotes||!i.env.footnotes.refs||i.src.charCodeAt(u)!==91||i.src.charCodeAt(u+1)!==94)return!1;let h;for(h=u+2;h<f;h++){if(i.src.charCodeAt(h)===32||i.src.charCodeAt(h)===10)return!1;if(i.src.charCodeAt(h)===93)break}if(h===u+2||h>=f)return!1;h++;const a=i.src.slice(u+2,h-1);if(typeof i.env.footnotes.refs[`:${a}`]>"u")return!1;if(!s){i.env.footnotes.list||(i.env.footnotes.list=[]);let _;i.env.footnotes.refs[`:${a}`]<0?(_=i.env.footnotes.list.length,i.env.footnotes.list[_]={label:a,count:0},i.env.footnotes.refs[`:${a}`]=_):_=i.env.footnotes.refs[`:${a}`];const p=i.env.footnotes.list[_].count;i.env.footnotes.list[_].count++;const g=i.push("footnote_ref","",0);g.meta={id:_,subId:p,label:a}}return i.pos=h,i.posMax=f,!0}function l(i){let s,f,u,h=!1;const a={};if(!i.env.footnotes||(i.tokens=i.tokens.filter(function(p){return p.type==="footnote_reference_open"?(h=!0,f=[],u=p.meta.label,!1):p.type==="footnote_reference_close"?(h=!1,a[":"+u]=f,!1):(h&&f.push(p),!h)}),!i.env.footnotes.list))return;const _=i.env.footnotes.list;i.tokens.push(new i.Token("footnote_block_open","",1));for(let p=0,g=_.length;p<g;p++){const b=new i.Token("footnote_open","",1);if(b.meta={id:p,label:_[p].label},i.tokens.push(b),_[p].tokens){s=[];const m=new i.Token("paragraph_open","p",1);m.block=!0,s.push(m);const d=new i.Token("inline","",0);d.children=_[p].tokens,d.content=_[p].content,s.push(d);const x=new i.Token("paragraph_close","p",-1);x.block=!0,s.push(x)}else _[p].label&&(s=a[`:${_[p].label}`]);s&&(i.tokens=i.tokens.concat(s));let y;i.tokens[i.tokens.length-1].type==="paragraph_close"?y=i.tokens.pop():y=null;const k=_[p].count>0?_[p].count:1;for(let m=0;m<k;m++){const d=new i.Token("footnote_anchor","",0);d.meta={id:p,subId:m,label:_[p].label},i.tokens.push(d)}y&&i.tokens.push(y),i.tokens.push(new i.Token("footnote_close","",-1))}i.tokens.push(new i.Token("footnote_block_close","",-1))}e.block.ruler.before("reference","footnote_def",o,{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",t),e.inline.ruler.after("footnote_inline","footnote_ref",c),e.core.ruler.after("inline","footnote_tail",l)}const ao=Object.freeze(Object.defineProperty({__proto__:null,default:to},Symbol.toStringTag,{value:"Module"}));function io(e){function n(o,t){const c=o.pos,l=o.src.charCodeAt(c);if(t||l!==61)return!1;const i=o.scanDelims(o.pos,!0);let s=i.length;const f=String.fromCharCode(l);if(s<2)return!1;if(s%2){const u=o.push("text","",0);u.content=f,s--}for(let u=0;u<s;u+=2){const h=o.push("text","",0);h.content=f+f,!(!i.can_open&&!i.can_close)&&o.delimiters.push({marker:l,length:0,jump:u/2,token:o.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return o.pos+=i.length,!0}function r(o,t){const c=[],l=t.length;for(let i=0;i<l;i++){const s=t[i];if(s.marker!==61||s.end===-1)continue;const f=t[s.end],u=o.tokens[s.token];u.type="mark_open",u.tag="mark",u.nesting=1,u.markup="==",u.content="";const h=o.tokens[f.token];h.type="mark_close",h.tag="mark",h.nesting=-1,h.markup="==",h.content="",o.tokens[f.token-1].type==="text"&&o.tokens[f.token-1].content==="="&&c.push(f.token-1)}for(;c.length;){const i=c.pop();let s=i+1;for(;s<o.tokens.length&&o.tokens[s].type==="mark_close";)s++;if(s--,i!==s){const f=o.tokens[s];o.tokens[s]=o.tokens[i],o.tokens[i]=f}}}e.inline.ruler.before("emphasis","mark",n),e.inline.ruler2.before("emphasis","mark",function(o){let t;const c=o.tokens_meta,l=(o.tokens_meta||[]).length;for(r(o,o.delimiters),t=0;t<l;t++)c[t]&&c[t].delimiters&&r(o,c[t].delimiters)})}const ko=Object.freeze(Object.defineProperty({__proto__:null,default:io},Symbol.toStringTag,{value:"Module"})),co=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function lo(e,n){const r=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==126||n||o+2>=r)return!1;e.pos=o+1;let t=!1;for(;e.pos<r;){if(e.src.charCodeAt(e.pos)===126){t=!0;break}e.md.inline.skipToken(e)}if(!t||o+1===e.pos)return e.pos=o,!1;const c=e.src.slice(o+1,e.pos);if(c.match(/(^|[^\\])(\\\\)*\s/))return e.pos=o,!1;e.posMax=e.pos,e.pos=o+1;const l=e.push("sub_open","sub",1);l.markup="~";const i=e.push("text","",0);i.content=c.replace(co,"$1");const s=e.push("sub_close","sub",-1);return s.markup="~",e.pos=e.posMax+1,e.posMax=r,!0}function so(e){e.inline.ruler.after("emphasis","sub",lo)}const mo=Object.freeze(Object.defineProperty({__proto__:null,default:so},Symbol.toStringTag,{value:"Module"})),fo=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function uo(e,n){const r=e.posMax,o=e.pos;if(e.src.charCodeAt(o)!==94||n||o+2>=r)return!1;e.pos=o+1;let t=!1;for(;e.pos<r;){if(e.src.charCodeAt(e.pos)===94){t=!0;break}e.md.inline.skipToken(e)}if(!t||o+1===e.pos)return e.pos=o,!1;const c=e.src.slice(o+1,e.pos);if(c.match(/(^|[^\\])(\\\\)*\s/))return e.pos=o,!1;e.posMax=e.pos,e.pos=o+1;const l=e.push("sup_open","sup",1);l.markup="^";const i=e.push("text","",0);i.content=c.replace(fo,"$1");const s=e.push("sup_close","sup",-1);return s.markup="^",e.pos=e.posMax+1,e.posMax=r,!0}function ho(e){e.inline.ruler.after("emphasis","sup",uo)}const xo=Object.freeze(Object.defineProperty({__proto__:null,default:ho},Symbol.toStringTag,{value:"Module"}));export{ao as a,ko as b,mo as c,xo as d,_o as i};
