md-editor-v3 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -321,7 +321,9 @@ const mergeAttrs = (token, addAttrs) => {
321
321
  };
322
322
  const math_inline = (state, silent) => {
323
323
  const delimiters = [
324
+ { open: "$$", close: "$$" },
324
325
  { open: "$", close: "$" },
326
+ { open: "\\[", close: "\\]" },
325
327
  { open: "\\(", close: "\\)" }
326
328
  ];
327
329
  let match, token, pos;
@@ -334,7 +336,7 @@ const math_inline = (state, silent) => {
334
336
  while (state.src[pos] === "\\") {
335
337
  pos -= 1;
336
338
  }
337
- if ((match - pos) % 2 == 1) {
339
+ if ((match - pos) % 2 === 1) {
338
340
  break;
339
341
  }
340
342
  match += delim.close.length;
@@ -354,9 +356,10 @@ const math_inline = (state, silent) => {
354
356
  return true;
355
357
  }
356
358
  if (!silent) {
359
+ const inlineContent = state.src.slice(start, match);
357
360
  token = state.push("math_inline", "math", 0);
358
361
  token.markup = delim.open;
359
- token.content = state.src.slice(start, match);
362
+ token.content = inlineContent;
360
363
  }
361
364
  state.pos = match + delim.close.length;
362
365
  return true;
@@ -320,7 +320,9 @@ const mergeAttrs = (token, addAttrs) => {
320
320
  };
321
321
  const math_inline = (state, silent) => {
322
322
  const delimiters = [
323
+ { open: "$$", close: "$$" },
323
324
  { open: "$", close: "$" },
325
+ { open: "\\[", close: "\\]" },
324
326
  { open: "\\(", close: "\\)" }
325
327
  ];
326
328
  let match, token, pos;
@@ -333,7 +335,7 @@ const math_inline = (state, silent) => {
333
335
  while (state.src[pos] === "\\") {
334
336
  pos -= 1;
335
337
  }
336
- if ((match - pos) % 2 == 1) {
338
+ if ((match - pos) % 2 === 1) {
337
339
  break;
338
340
  }
339
341
  match += delim.close.length;
@@ -353,9 +355,10 @@ const math_inline = (state, silent) => {
353
355
  return true;
354
356
  }
355
357
  if (!silent) {
358
+ const inlineContent = state.src.slice(start, match);
356
359
  token = state.push("math_inline", "math", 0);
357
360
  token.markup = delim.open;
358
- token.content = state.src.slice(start, match);
361
+ token.content = inlineContent;
359
362
  }
360
363
  state.pos = match + delim.close.length;
361
364
  return true;
package/lib/umd/index.js CHANGED
@@ -296,7 +296,7 @@ See: https://github.com/francoischalifour/medium-zoom`)}},u6=function(t){var n=d
296
296
  `:">",o},cO.prototype.renderInline=function(e,t,n){let i="";const r=this.rules;for(let o=0,a=e.length;o<a;o++){const O=e[o].type;typeof r[O]<"u"?i+=r[O](e,o,t,n,this):i+=this.renderToken(e,o,t)}return i},cO.prototype.renderInlineAsText=function(e,t,n){let i="";for(let r=0,o=e.length;r<o;r++)switch(e[r].type){case"text":i+=e[r].content;break;case"image":i+=this.renderInlineAsText(e[r].children,t,n);break;case"html_inline":case"html_block":i+=e[r].content;break;case"softbreak":case"hardbreak":i+=`
297
297
  `;break}return i},cO.prototype.render=function(e,t,n){let i="";const r=this.rules;for(let o=0,a=e.length;o<a;o++){const O=e[o].type;O==="inline"?i+=this.renderInline(e[o].children,t,n):typeof r[O]<"u"?i+=r[O](e,o,t,n,this):i+=this.renderToken(e,o,t,n)}return i};function mn(){this.__rules__=[],this.__cache__=null}mn.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},mn.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(i){t.indexOf(i)<0&&t.push(i)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(i){i.enabled&&(n&&i.alt.indexOf(n)<0||e.__cache__[n].push(i.fn))})})},mn.prototype.at=function(e,t,n){const i=this.__find__(e),r=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=t,this.__rules__[i].alt=r.alt||[],this.__cache__=null},mn.prototype.before=function(e,t,n,i){const r=this.__find__(e),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},mn.prototype.after=function(e,t,n,i){const r=this.__find__(e),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null},mn.prototype.push=function(e,t,n){const i=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:i.alt||[]}),this.__cache__=null},mn.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(i){const r=this.__find__(i);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!0,n.push(i)},this),this.__cache__=null,n},mn.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)},mn.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(i){const r=this.__find__(i);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!1,n.push(i)},this),this.__cache__=null,n},mn.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Pi(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Pi.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let i=0,r=n.length;i<r;i++)if(n[i][0]===t)return i;return-1},Pi.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},Pi.prototype.attrSet=function(t,n){const i=this.attrIndex(t),r=[t,n];i<0?this.attrPush(r):this.attrs[i]=r},Pi.prototype.attrGet=function(t){const n=this.attrIndex(t);let i=null;return n>=0&&(i=this.attrs[n][1]),i},Pi.prototype.attrJoin=function(t,n){const i=this.attrIndex(t);i<0?this.attrPush([t,n]):this.attrs[i][1]=this.attrs[i][1]+" "+n};function _x(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}_x.prototype.Token=Pi;const hC=/\r\n?|\n/g,pC=/\0/g;function mC(e){let t;t=e.src.replace(hC,`
298
298
  `),t=t.replace(pC,"�"),e.src=t}function gC(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function $C(e){const t=e.tokens;for(let n=0,i=t.length;n<i;n++){const r=t[n];r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function QC(e){return/^<a[>\s]/i.test(e)}function bC(e){return/^<\/a\s*>/i.test(e)}function yC(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,i=t.length;n<i;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,o=0;for(let a=r.length-1;a>=0;a--){const O=r[a];if(O.type==="link_close"){for(a--;r[a].level!==O.level&&r[a].type!=="link_open";)a--;continue}if(O.type==="html_inline"&&(QC(O.content)&&o>0&&o--,bC(O.content)&&o++),!(o>0)&&O.type==="text"&&e.md.linkify.test(O.content)){const l=O.content;let s=e.md.linkify.match(l);const u=[];let c=O.level,f=0;s.length>0&&s[0].index===0&&a>0&&r[a-1].type==="text_special"&&(s=s.slice(1));for(let d=0;d<s.length;d++){const p=s[d].url,Q=e.md.normalizeLink(p);if(!e.md.validateLink(Q))continue;let b=s[d].text;s[d].schema?s[d].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 $=s[d].index;if($>f){const y=new e.Token("text","",0);y.content=l.slice(f,$),y.level=c,u.push(y)}const g=new e.Token("link_open","a",1);g.attrs=[["href",Q]],g.level=c++,g.markup="linkify",g.info="auto",u.push(g);const S=new e.Token("text","",0);S.content=b,S.level=c,u.push(S);const k=new e.Token("link_close","a",-1);k.level=--c,k.markup="linkify",k.info="auto",u.push(k),f=s[d].lastIndex}if(f<l.length){const d=new e.Token("text","",0);d.content=l.slice(f),d.level=c,u.push(d)}t[n].children=r=Tx(r,a,u)}}}}const Rx=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,SC=/\((c|tm|r)\)/i,PC=/\((c|tm|r)\)/ig,kC={c:"©",r:"®",tm:"™"};function xC(e,t){return kC[t.toLowerCase()]}function vC(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(PC,xC)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function wC(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&Rx.test(i.content)&&(i.content=i.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–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function TC(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(SC.test(e.tokens[t].content)&&vC(e.tokens[t].children),Rx.test(e.tokens[t].content)&&wC(e.tokens[t].children))}const XC=/['"]/,zx=/['"]/g,Wx="’";function Ac(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function _C(e,t){let n;const i=[];for(let r=0;r<e.length;r++){const o=e[r],a=e[r].level;for(n=i.length-1;n>=0&&!(i[n].level<=a);n--);if(i.length=n+1,o.type!=="text")continue;let O=o.content,l=0,s=O.length;e:for(;l<s;){zx.lastIndex=l;const u=zx.exec(O);if(!u)break;let c=!0,f=!0;l=u.index+1;const d=u[0]==="'";let p=32;if(u.index-1>=0)p=O.charCodeAt(u.index-1);else for(n=r-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){p=e[n].content.charCodeAt(e[n].content.length-1);break}let Q=32;if(l<s)Q=O.charCodeAt(l);else for(n=r+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){Q=e[n].content.charCodeAt(0);break}const b=Kl(p)||Hl(String.fromCharCode(p)),$=Kl(Q)||Hl(String.fromCharCode(Q)),g=Bl(p),S=Bl(Q);if(S?c=!1:$&&(g||b||(c=!1)),g?f=!1:b&&(S||$||(f=!1)),Q===34&&u[0]==='"'&&p>=48&&p<=57&&(f=c=!1),c&&f&&(c=b,f=$),!c&&!f){d&&(o.content=Ac(o.content,u.index,Wx));continue}if(f)for(n=i.length-1;n>=0;n--){let k=i[n];if(i[n].level<a)break;if(k.single===d&&i[n].level===a){k=i[n];let y,T;d?(y=t.md.options.quotes[2],T=t.md.options.quotes[3]):(y=t.md.options.quotes[0],T=t.md.options.quotes[1]),o.content=Ac(o.content,u.index,T),e[k.token].content=Ac(e[k.token].content,k.pos,y),l+=T.length-1,k.token===r&&(l+=y.length-1),O=o.content,s=O.length,i.length=n;continue e}}c?i.push({token:r,pos:u.index,single:d,level:a}):f&&d&&(o.content=Ac(o.content,u.index,Wx))}}}function RC(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!XC.test(e.tokens[t].content)||_C(e.tokens[t].children,e)}function zC(e){let t,n;const i=e.tokens,r=i.length;for(let o=0;o<r;o++){if(i[o].type!=="inline")continue;const a=i[o].children,O=a.length;for(t=0;t<O;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=n=0;t<O;t++)a[t].type==="text"&&t+1<O&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}}const Jm=[["normalize",mC],["block",gC],["inline",$C],["linkify",yC],["replacements",TC],["smartquotes",RC],["text_join",zC]];function eg(){this.ruler=new mn;for(let e=0;e<Jm.length;e++)this.ruler.push(Jm[e][0],Jm[e][1])}eg.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,i=t.length;n<i;n++)t[n](e)},eg.prototype.State=_x;function rr(e,t,n,i){this.src=e,this.md=t,this.env=n,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 r=this.src;for(let o=0,a=0,O=0,l=0,s=r.length,u=!1;a<s;a++){const c=r.charCodeAt(a);if(!u)if(Be(c)){O++,c===9?l+=4-l%4:l++;continue}else u=!0;(c===10||a===s-1)&&(c!==10&&a++,this.bMarks.push(o),this.eMarks.push(a),this.tShift.push(O),this.sCount.push(l),this.bsCount.push(0),u=!1,O=0,l=0,o=a+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}rr.prototype.push=function(e,t,n){const i=new Pi(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i},rr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},rr.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},rr.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const i=this.src.charCodeAt(t);if(!Be(i))break}return t},rr.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!Be(this.src.charCodeAt(--t)))return t+1;return t},rr.prototype.skipChars=function(t,n){for(let i=this.src.length;t<i&&this.src.charCodeAt(t)===n;t++);return t},rr.prototype.skipCharsBack=function(t,n,i){if(t<=i)return t;for(;t>i;)if(n!==this.src.charCodeAt(--t))return t+1;return t},rr.prototype.getLines=function(t,n,i,r){if(t>=n)return"";const o=new Array(n-t);for(let a=0,O=t;O<n;O++,a++){let l=0;const s=this.bMarks[O];let u=s,c;for(O+1<n||r?c=this.eMarks[O]+1:c=this.eMarks[O];u<c&&l<i;){const f=this.src.charCodeAt(u);if(Be(f))f===9?l+=4-(l+this.bsCount[O])%4:l++;else if(u-s<this.tShift[O])l++;else break;u++}l>i?o[a]=new Array(l-i+1).join(" ")+this.src.slice(u,c):o[a]=this.src.slice(u,c)}return o.join("")},rr.prototype.Token=Pi;const WC=65536;function tg(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function qx(e){const t=[],n=e.length;let i=0,r=e.charCodeAt(i),o=!1,a=0,O="";for(;i<n;)r===124&&(o?(O+=e.substring(a,i-1),a=i):(t.push(O+e.substring(a,i)),O="",a=i+1)),o=r===92,i++,r=e.charCodeAt(i);return t.push(O+e.substring(a)),t}function qC(e,t,n,i){if(t+2>n)return!1;let r=t+1;if(e.sCount[r]<e.blkIndent||e.sCount[r]-e.blkIndent>=4)return!1;let o=e.bMarks[r]+e.tShift[r];if(o>=e.eMarks[r])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[r])return!1;const O=e.src.charCodeAt(o++);if(O!==124&&O!==45&&O!==58&&!Be(O)||a===45&&Be(O))return!1;for(;o<e.eMarks[r];){const k=e.src.charCodeAt(o);if(k!==124&&k!==45&&k!==58&&!Be(k))return!1;o++}let l=tg(e,t+1),s=l.split("|");const u=[];for(let k=0;k<s.length;k++){const y=s[k].trim();if(!y){if(k===0||k===s.length-1)continue;return!1}if(!/^:?-+:?$/.test(y))return!1;y.charCodeAt(y.length-1)===58?u.push(y.charCodeAt(0)===58?"center":"right"):y.charCodeAt(0)===58?u.push("left"):u.push("")}if(l=tg(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;s=qx(l),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop();const c=s.length;if(c===0||c!==u.length)return!1;if(i)return!0;const f=e.parentType;e.parentType="table";const d=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),Q=[t,0];p.map=Q;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const $=e.push("tr_open","tr",1);$.map=[t,t+1];for(let k=0;k<s.length;k++){const y=e.push("th_open","th",1);u[k]&&(y.attrs=[["style","text-align:"+u[k]]]);const T=e.push("inline","",0);T.content=s[k].trim(),T.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let g,S=0;for(r=t+2;r<n&&!(e.sCount[r]<e.blkIndent);r++){let k=!1;for(let T=0,v=d.length;T<v;T++)if(d[T](e,r,n,!0)){k=!0;break}if(k||(l=tg(e,r).trim(),!l)||e.sCount[r]-e.blkIndent>=4||(s=qx(l),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop(),S+=c-s.length,S>WC))break;if(r===t+2){const T=e.push("tbody_open","tbody",1);T.map=g=[t+2,0]}const y=e.push("tr_open","tr",1);y.map=[r,r+1];for(let T=0;T<c;T++){const v=e.push("td_open","td",1);u[T]&&(v.attrs=[["style","text-align:"+u[T]]]);const w=e.push("inline","",0);w.content=s[T]?s[T].trim():"",w.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return g&&(e.push("tbody_close","tbody",-1),g[1]=r),e.push("table_close","table",-1),Q[1]=r,e.parentType=f,e.line=r,!0}function UC(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,r=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,r=i;continue}break}e.line=r;const o=e.push("code_block","code",0);return o.content=e.getLines(t,r,4+e.blkIndent,!1)+`
299
- `,o.map=[t,e.line],!0}function ZC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>o)return!1;const a=e.src.charCodeAt(r);if(a!==126&&a!==96)return!1;let O=r;r=e.skipChars(r,a);let l=r-O;if(l<3)return!1;const s=e.src.slice(O,r),u=e.src.slice(r,o);if(a===96&&u.indexOf(String.fromCharCode(a))>=0)return!1;if(i)return!0;let c=t,f=!1;for(;c++,!(c>=n||(r=O=e.bMarks[c]+e.tShift[c],o=e.eMarks[c],r<o&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(r)===a&&!(e.sCount[c]-e.blkIndent>=4)&&(r=e.skipChars(r,a),!(r-O<l)&&(r=e.skipSpaces(r),!(r<o)))){f=!0;break}l=e.sCount[t],e.line=c+(f?1:0);const d=e.push("fence","code",0);return d.info=u,d.content=e.getLines(t+1,c,l,!0),d.markup=s,d.map=[t,e.line],!0}function VC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(i)return!0;const O=[],l=[],s=[],u=[],c=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let d=!1,p;for(p=t;p<n;p++){const S=e.sCount[p]<e.blkIndent;if(r=e.bMarks[p]+e.tShift[p],o=e.eMarks[p],r>=o)break;if(e.src.charCodeAt(r++)===62&&!S){let y=e.sCount[p]+1,T,v;e.src.charCodeAt(r)===32?(r++,y++,v=!1,T=!0):e.src.charCodeAt(r)===9?(T=!0,(e.bsCount[p]+y)%4===3?(r++,y++,v=!1):v=!0):T=!1;let w=y;for(O.push(e.bMarks[p]),e.bMarks[p]=r;r<o;){const x=e.src.charCodeAt(r);if(Be(x))x===9?w+=4-(w+e.bsCount[p]+(v?1:0))%4:w++;else break;r++}d=r>=o,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(T?1:0),s.push(e.sCount[p]),e.sCount[p]=w-y,u.push(e.tShift[p]),e.tShift[p]=r-e.bMarks[p];continue}if(d)break;let k=!1;for(let y=0,T=c.length;y<T;y++)if(c[y](e,p,n,!0)){k=!0;break}if(k){e.lineMax=p,e.blkIndent!==0&&(O.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),s.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}O.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),s.push(e.sCount[p]),e.sCount[p]=-1}const Q=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const $=[t,0];b.map=$,e.md.block.tokenize(e,t,p);const g=e.push("blockquote_close","blockquote",-1);g.markup=">",e.lineMax=a,e.parentType=f,$[1]=e.line;for(let S=0;S<u.length;S++)e.bMarks[S+t]=O[S],e.tShift[S+t]=u[S],e.sCount[S+t]=s[S],e.bsCount[S+t]=l[S];return e.blkIndent=Q,!0}function YC(e,t,n,i){const r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let O=1;for(;o<r;){const s=e.src.charCodeAt(o++);if(s!==a&&!Be(s))return!1;s===a&&O++}if(O<3)return!1;if(i)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(O+1).join(String.fromCharCode(a)),!0}function Ux(e,t){const n=e.eMarks[t];let i=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<n){const o=e.src.charCodeAt(i);if(!Be(o))return-1}return i}function Zx(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];let r=n;if(r+1>=i)return-1;let o=e.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=e.src.charCodeAt(r++),o>=48&&o<=57){if(r-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=e.src.charCodeAt(r),!Be(o))?-1:r}function EC(e,t){const n=e.level+2;for(let i=t+2,r=e.tokens.length-2;i<r;i++)e.tokens[i].level===n&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function CC(e,t,n,i){let r,o,a,O,l=t,s=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(u=!0);let c,f,d;if((d=Zx(e,l))>=0){if(c=!0,a=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(a,d-1)),u&&f!==1)return!1}else if((d=Ux(e,l))>=0)c=!1;else return!1;if(u&&e.skipSpaces(d)>=e.eMarks[l])return!1;if(i)return!0;const p=e.src.charCodeAt(d-1),Q=e.tokens.length;c?(O=e.push("ordered_list_open","ol",1),f!==1&&(O.attrs=[["start",f]])):O=e.push("bullet_list_open","ul",1);const b=[l,0];O.map=b,O.markup=String.fromCharCode(p);let $=!1;const g=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";l<n;){o=d,r=e.eMarks[l];const k=e.sCount[l]+d-(e.bMarks[l]+e.tShift[l]);let y=k;for(;o<r;){const q=e.src.charCodeAt(o);if(q===9)y+=4-(y+e.bsCount[l])%4;else if(q===32)y++;else break;o++}const T=o;let v;T>=r?v=1:v=y-k,v>4&&(v=1);const w=k+v;O=e.push("list_item_open","li",1),O.markup=String.fromCharCode(p);const x=[l,0];O.map=x,c&&(O.info=e.src.slice(a,d-1));const U=e.tight,V=e.tShift[l],E=e.sCount[l],Z=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=w,e.tight=!0,e.tShift[l]=T-e.bMarks[l],e.sCount[l]=y,T>=r&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||$)&&(s=!1),$=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Z,e.tShift[l]=V,e.sCount[l]=E,e.tight=U,O=e.push("list_item_close","li",-1),O.markup=String.fromCharCode(p),l=e.line,x[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let X=!1;for(let q=0,W=g.length;q<W;q++)if(g[q](e,l,n,!0)){X=!0;break}if(X)break;if(c){if(d=Zx(e,l),d<0)break;a=e.bMarks[l]+e.tShift[l]}else if(d=Ux(e,l),d<0)break;if(p!==e.src.charCodeAt(d-1))break}return c?O=e.push("ordered_list_close","ol",-1):O=e.push("bullet_list_close","ul",-1),O.markup=String.fromCharCode(p),b[1]=l,e.line=l,e.parentType=S,s&&EC(e,Q),!0}function jC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==91)return!1;function O(g){const S=e.lineMax;if(g>=S||e.isEmpty(g))return null;let k=!1;if(e.sCount[g]-e.blkIndent>3&&(k=!0),e.sCount[g]<0&&(k=!0),!k){const v=e.md.block.ruler.getRules("reference"),w=e.parentType;e.parentType="reference";let x=!1;for(let U=0,V=v.length;U<V;U++)if(v[U](e,g,S,!0)){x=!0;break}if(e.parentType=w,x)return null}const y=e.bMarks[g]+e.tShift[g],T=e.eMarks[g];return e.src.slice(y,T+1)}let l=e.src.slice(r,o+1);o=l.length;let s=-1;for(r=1;r<o;r++){const g=l.charCodeAt(r);if(g===91)return!1;if(g===93){s=r;break}else if(g===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(g===92&&(r++,r<o&&l.charCodeAt(r)===10)){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}}if(s<0||l.charCodeAt(s+1)!==58)return!1;for(r=s+2;r<o;r++){const g=l.charCodeAt(r);if(g===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(!Be(g))break}const u=e.md.helpers.parseLinkDestination(l,r,o);if(!u.ok)return!1;const c=e.md.normalizeLink(u.str);if(!e.md.validateLink(c))return!1;r=u.pos;const f=r,d=a,p=r;for(;r<o;r++){const g=l.charCodeAt(r);if(g===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(!Be(g))break}let Q=e.md.helpers.parseLinkTitle(l,r,o);for(;Q.can_continue;){const g=O(a);if(g===null)break;l+=g,r=o,o=l.length,a++,Q=e.md.helpers.parseLinkTitle(l,r,o,Q)}let b;for(r<o&&p!==r&&Q.ok?(b=Q.str,r=Q.pos):(b="",r=f,a=d);r<o;){const g=l.charCodeAt(r);if(!Be(g))break;r++}if(r<o&&l.charCodeAt(r)!==10&&b)for(b="",r=f,a=d;r<o;){const g=l.charCodeAt(r);if(!Be(g))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;const $=jc(l.slice(1,s));return $?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[$]>"u"&&(e.env.references[$]={title:b,href:c}),e.line=a),!0):!1}const AC=["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"],GC="[a-zA-Z_:][a-zA-Z0-9:._-]*",IC="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",Vx="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+GC+"(?:\\s*=\\s*"+IC+")?)")+"*\\s*\\/?>",Yx="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",DC="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",NC="<[?][\\s\\S]*?[?]>",LC="<![A-Za-z][^>]*>",MC="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",FC=new RegExp("^(?:"+Vx+"|"+Yx+"|"+DC+"|"+NC+"|"+LC+"|"+MC+")"),BC=new RegExp("^(?:"+Vx+"|"+Yx+")"),fO=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+AC.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(BC.source+"\\s*$"),/^$/,!1]];function HC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let a=e.src.slice(r,o),O=0;for(;O<fO.length&&!fO[O][0].test(a);O++);if(O===fO.length)return!1;if(i)return fO[O][2];let l=t+1;if(!fO[O][1].test(a)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(r=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(r,o),fO[O][1].test(a)){a.length!==0&&l++;break}}e.line=l;const s=e.push("html_block","",0);return s.map=[t,l],s.content=e.getLines(t,l,e.blkIndent,!0),!0}function KC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(r);if(a!==35||r>=o)return!1;let O=1;for(a=e.src.charCodeAt(++r);a===35&&r<o&&O<=6;)O++,a=e.src.charCodeAt(++r);if(O>6||r<o&&!Be(a))return!1;if(i)return!0;o=e.skipSpacesBack(o,r);const l=e.skipCharsBack(o,35,r);l>r&&Be(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const s=e.push("heading_open","h"+String(O),1);s.markup="########".slice(0,O),s.map=[t,e.line];const u=e.push("inline","",0);u.content=e.src.slice(r,o).trim(),u.map=[t,e.line],u.children=[];const c=e.push("heading_close","h"+String(O),-1);return c.markup="########".slice(0,O),!0}function JC(e,t,n){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const r=e.parentType;e.parentType="paragraph";let o=0,a,O=t+1;for(;O<n&&!e.isEmpty(O);O++){if(e.sCount[O]-e.blkIndent>3)continue;if(e.sCount[O]>=e.blkIndent){let d=e.bMarks[O]+e.tShift[O];const p=e.eMarks[O];if(d<p&&(a=e.src.charCodeAt(d),(a===45||a===61)&&(d=e.skipChars(d,a),d=e.skipSpaces(d),d>=p))){o=a===61?1:2;break}}if(e.sCount[O]<0)continue;let f=!1;for(let d=0,p=i.length;d<p;d++)if(i[d](e,O,n,!0)){f=!0;break}if(f)break}if(!o)return!1;const l=e.getLines(t,O,e.blkIndent,!1).trim();e.line=O+1;const s=e.push("heading_open","h"+String(o),1);s.markup=String.fromCharCode(a),s.map=[t,e.line];const u=e.push("inline","",0);u.content=l,u.map=[t,e.line-1],u.children=[];const c=e.push("heading_close","h"+String(o),-1);return c.markup=String.fromCharCode(a),e.parentType=r,!0}function e9(e,t,n){const i=e.md.block.ruler.getRules("paragraph"),r=e.parentType;let o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let s=!1;for(let u=0,c=i.length;u<c;u++)if(i[u](e,o,n,!0)){s=!0;break}if(s)break}const a=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o;const O=e.push("paragraph_open","p",1);O.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=r,!0}const Gc=[["table",qC,["paragraph","reference"]],["code",UC],["fence",ZC,["paragraph","reference","blockquote","list"]],["blockquote",VC,["paragraph","reference","blockquote","list"]],["hr",YC,["paragraph","reference","blockquote","list"]],["list",CC,["paragraph","reference","blockquote"]],["reference",jC],["html_block",HC,["paragraph","reference","blockquote"]],["heading",KC,["paragraph","reference","blockquote"]],["lheading",JC],["paragraph",e9]];function Ic(){this.ruler=new mn;for(let e=0;e<Gc.length;e++)this.ruler.push(Gc[e][0],Gc[e][1],{alt:(Gc[e][2]||[]).slice()})}Ic.prototype.tokenize=function(e,t,n){const i=this.ruler.getRules(""),r=i.length,o=e.md.options.maxNesting;let a=t,O=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=o){e.line=n;break}const l=e.line;let s=!1;for(let u=0;u<r;u++)if(s=i[u](e,a,n,!1),s){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!s)throw new Error("none of the block rules matched");e.tight=!O,e.isEmpty(e.line-1)&&(O=!0),a=e.line,a<n&&e.isEmpty(a)&&(O=!0,a++,e.line=a)}},Ic.prototype.parse=function(e,t,n,i){if(!e)return;const r=new this.State(e,t,n,i);this.tokenize(r,r.line,r.lineMax)},Ic.prototype.State=rr;function Jl(e,t,n,i){this.src=e,this.env=n,this.md=t,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}Jl.prototype.pushPending=function(){const e=new Pi("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Jl.prototype.push=function(e,t,n){this.pending&&this.pushPending();const i=new Pi(e,t,n);let r=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i},Jl.prototype.scanDelims=function(e,t){const n=this.posMax,i=this.src.charCodeAt(e),r=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o<n&&this.src.charCodeAt(o)===i;)o++;const a=o-e,O=o<n?this.src.charCodeAt(o):32,l=Kl(r)||Hl(String.fromCharCode(r)),s=Kl(O)||Hl(String.fromCharCode(O)),u=Bl(r),c=Bl(O),f=!c&&(!s||u||l),d=!u&&(!l||c||s);return{can_open:f&&(t||!d||l),can_close:d&&(t||!f||s),length:a}},Jl.prototype.Token=Pi;function t9(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 n9(e,t){let n=e.pos;for(;n<e.posMax&&!t9(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const i9=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function r9(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const r=e.pending.match(i9);if(!r)return!1;const o=r[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let O=a.url;if(O.length<=o.length)return!1;O=O.replace(/\*+$/,"");const l=e.md.normalizeLink(O);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const s=e.push("link_open","a",1);s.attrs=[["href",l]],s.markup="linkify",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(O);const c=e.push("link_close","a",-1);c.markup="linkify",c.info="auto"}return e.pos+=O.length-o.length,!0}function o9(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,r=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),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(n++;n<r&&Be(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const ng=[];for(let e=0;e<256;e++)ng.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ng[e.charCodeAt(0)]=1});function a9(e,t){let n=e.pos;const i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(r=e.src.charCodeAt(n),!!Be(r));)n++;return e.pos=n,!0}let o=e.src[n];if(r>=55296&&r<=56319&&n+1<i){const O=e.src.charCodeAt(n+1);O>=56320&&O<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const O=e.push("text_special","",0);r<256&&ng[r]!==0?O.content=o:O.content=a,O.markup=a,O.info="escape"}return e.pos=n+1,!0}function O9(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const r=n;n++;const o=e.posMax;for(;n<o&&e.src.charCodeAt(n)===96;)n++;const a=e.src.slice(r,n),O=a.length;if(e.backticksScanned&&(e.backticks[O]||0)<=r)return t||(e.pending+=a),e.pos+=O,!0;let l=n,s;for(;(s=e.src.indexOf("`",l))!==-1;){for(l=s+1;l<o&&e.src.charCodeAt(l)===96;)l++;const u=l-s;if(u===O){if(!t){const c=e.push("code_inline","code",0);c.markup=a,c.content=e.src.slice(n,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[u]=s}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=O,!0}function l9(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const r=e.scanDelims(e.pos,!0);let o=r.length;const a=String.fromCharCode(i);if(o<2)return!1;let O;o%2&&(O=e.push("text","",0),O.content=a,o--);for(let l=0;l<o;l+=2)O=e.push("text","",0),O.content=a+a,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function Ex(e,t){let n;const i=[],r=t.length;for(let o=0;o<r;o++){const a=t[o];if(a.marker!==126||a.end===-1)continue;const O=t[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[O.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[O.token-1].type==="text"&&e.tokens[O.token-1].content==="~"&&i.push(O.token-1)}for(;i.length;){const o=i.pop();let a=o+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,o!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[o],e.tokens[o]=n)}}function s9(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ex(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&Ex(e,t[i].delimiters)}const Cx={tokenize:l9,postProcess:s9};function u9(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==95&&i!==42)return!1;const r=e.scanDelims(e.pos,i===42);for(let o=0;o<r.length;o++){const a=e.push("text","",0);a.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return e.pos+=r.length,!0}function jx(e,t){const n=t.length;for(let i=n-1;i>=0;i--){const r=t[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=t[r.end],a=i>0&&t[i-1].end===r.end+1&&t[i-1].marker===r.marker&&t[i-1].token===r.token-1&&t[r.end+1].token===o.token+1,O=String.fromCharCode(r.marker),l=e.tokens[r.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?O+O:O,l.content="";const s=e.tokens[o.token];s.type=a?"strong_close":"em_close",s.tag=a?"strong":"em",s.nesting=-1,s.markup=a?O+O:O,s.content="",a&&(e.tokens[t[i-1].token].content="",e.tokens[t[r.end+1].token].content="",i--)}}function c9(e){const t=e.tokens_meta,n=e.tokens_meta.length;jx(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&jx(e,t[i].delimiters)}const Ax={tokenize:u9,postProcess:c9};function f9(e,t){let n,i,r,o,a="",O="",l=e.pos,s=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const u=e.pos,c=e.posMax,f=e.pos+1,d=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(d<0)return!1;let p=d+1;if(p<c&&e.src.charCodeAt(p)===40){for(s=!1,p++;p<c&&(n=e.src.charCodeAt(p),!(!Be(n)&&n!==10));p++);if(p>=c)return!1;if(l=p,r=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),r.ok){for(a=e.md.normalizeLink(r.str),e.md.validateLink(a)?p=r.pos:a="",l=p;p<c&&(n=e.src.charCodeAt(p),!(!Be(n)&&n!==10));p++);if(r=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<c&&l!==p&&r.ok)for(O=r.str,p=r.pos;p<c&&(n=e.src.charCodeAt(p),!(!Be(n)&&n!==10));p++);}(p>=c||e.src.charCodeAt(p)!==41)&&(s=!0),p++}if(s){if(typeof e.env.references>"u")return!1;if(p<c&&e.src.charCodeAt(p)===91?(l=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?i=e.src.slice(l,p++):p=d+1):p=d+1,i||(i=e.src.slice(f,d)),o=e.env.references[jc(i)],!o)return e.pos=u,!1;a=o.href,O=o.title}if(!t){e.pos=f,e.posMax=d;const Q=e.push("link_open","a",1),b=[["href",a]];Q.attrs=b,O&&b.push(["title",O]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=c,!0}function d9(e,t){let n,i,r,o,a,O,l,s,u="";const c=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const d=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(o=p+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(!Be(n)&&n!==10));o++);if(o>=f)return!1;for(s=o,O=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),O.ok&&(u=e.md.normalizeLink(O.str),e.md.validateLink(u)?o=O.pos:u=""),s=o;o<f&&(n=e.src.charCodeAt(o),!(!Be(n)&&n!==10));o++);if(O=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<f&&s!==o&&O.ok)for(l=O.str,o=O.pos;o<f&&(n=e.src.charCodeAt(o),!(!Be(n)&&n!==10));o++);else l="";if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=c,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(s=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?r=e.src.slice(s,o++):o=p+1):o=p+1,r||(r=e.src.slice(d,p)),a=e.env.references[jc(r)],!a)return e.pos=c,!1;u=a.href,l=a.title}if(!t){i=e.src.slice(d,p);const Q=[];e.md.inline.parse(i,e.md,e.env,Q);const b=e.push("image","img",0),$=[["src",u],["alt",""]];b.attrs=$,b.children=Q,b.content=i,l&&$.push(["title",l])}return e.pos=o,e.posMax=f,!0}const h9=/^([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])?)*)$/,p9=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function m9(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const i=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(i+1,n);if(p9.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const O=e.push("link_open","a",1);O.attrs=[["href",a]],O.markup="autolink",O.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const s=e.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return e.pos+=o.length+2,!0}if(h9.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const O=e.push("link_open","a",1);O.attrs=[["href",a]],O.markup="autolink",O.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const s=e.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return e.pos+=o.length+2,!0}return!1}function g9(e){return/^<a[>\s]/i.test(e)}function $9(e){return/^<\/a\s*>/i.test(e)}function Q9(e){const t=e|32;return t>=97&&t<=122}function b9(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;const r=e.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!Q9(r))return!1;const o=e.src.slice(i).match(FC);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],g9(a.content)&&e.linkLevel++,$9(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const y9=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,S9=/^&([a-z][a-z0-9]{1,31});/i;function P9(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(y9);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),O=e.push("text_special","",0);O.content=Km(a)?Cc(a):Cc(65533),O.markup=o[0],O.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(S9);if(o){const a=wx(o[0]);if(a!==o[0]){if(!t){const O=e.push("text_special","",0);O.content=a,O.markup=o[0],O.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function Gx(e){const t={},n=e.length;if(!n)return;let i=0,r=-2;const o=[];for(let a=0;a<n;a++){const O=e[a];if(o.push(0),(e[i].marker!==O.marker||r!==O.token-1)&&(i=a),r=O.token,O.length=O.length||0,!O.close)continue;t.hasOwnProperty(O.marker)||(t[O.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[O.marker][(O.open?3:0)+O.length%3];let s=i-o[i]-1,u=s;for(;s>l;s-=o[s]+1){const c=e[s];if(c.marker===O.marker&&c.open&&c.end<0){let f=!1;if((c.close||O.open)&&(c.length+O.length)%3===0&&(c.length%3!==0||O.length%3!==0)&&(f=!0),!f){const d=s>0&&!e[s-1].open?o[s-1]+1:0;o[a]=a-s+d,o[s]=d,O.open=!1,c.end=a,c.close=!1,u=-1,r=-2;break}}}u!==-1&&(t[O.marker][(O.open?3:0)+(O.length||0)%3]=u)}}function k9(e){const t=e.tokens_meta,n=e.tokens_meta.length;Gx(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&Gx(t[i].delimiters)}function x9(e){let t,n,i=0;const r=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)r[t].nesting<0&&i--,r[t].level=i,r[t].nesting>0&&i++,r[t].type==="text"&&t+1<o&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==n&&(r[n]=r[t]),n++);t!==n&&(r.length=n)}const ig=[["text",n9],["linkify",r9],["newline",o9],["escape",a9],["backticks",O9],["strikethrough",Cx.tokenize],["emphasis",Ax.tokenize],["link",f9],["image",d9],["autolink",m9],["html_inline",b9],["entity",P9]],rg=[["balance_pairs",k9],["strikethrough",Cx.postProcess],["emphasis",Ax.postProcess],["fragments_join",x9]];function es(){this.ruler=new mn;for(let e=0;e<ig.length;e++)this.ruler.push(ig[e][0],ig[e][1]);this.ruler2=new mn;for(let e=0;e<rg.length;e++)this.ruler2.push(rg[e][0],rg[e][1])}es.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),i=n.length,r=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let a=!1;if(e.level<r){for(let O=0;O<i;O++)if(e.level++,a=n[O](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos},es.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,i=e.posMax,r=e.md.options.maxNesting;for(;e.pos<i;){const o=e.pos;let a=!1;if(e.level<r){for(let O=0;O<n;O++)if(a=t[O](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},es.prototype.parse=function(e,t,n,i){const r=new this.State(e,t,n,i);this.tokenize(r);const o=this.ruler2.getRules(""),a=o.length;for(let O=0;O<a;O++)o[O](r)},es.prototype.State=Jl;function v9(e){const t={};e=e||{},t.src_Any=Sx.source,t.src_Cc=Px.source,t.src_Z=xx.source,t.src_P=Mm.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.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]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function og(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(i){e[i]=n[i]})}),e}function Dc(e){return Object.prototype.toString.call(e)}function w9(e){return Dc(e)==="[object String]"}function T9(e){return Dc(e)==="[object Object]"}function X9(e){return Dc(e)==="[object RegExp]"}function Ix(e){return Dc(e)==="[object Function]"}function _9(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Dx={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function R9(e){return Object.keys(e||{}).reduce(function(t,n){return t||Dx.hasOwnProperty(n)},!1)}const z9={"http:":{validate:function(e,t,n){const i=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const i=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(i)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const i=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},W9="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]",q9="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function U9(e){e.__index__=-1,e.__text_cache__=""}function Z9(e){return function(t,n){const i=t.slice(n);return e.test(i)?i.match(e)[0].length:0}}function Nx(){return function(e,t){t.normalize(e)}}function Nc(e){const t=e.re=v9(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(W9),n.push(t.src_xn),t.src_tlds=n.join("|");function i(O){return O.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");const r=[];e.__compiled__={};function o(O,l){throw new Error('(LinkifyIt) Invalid schema "'+O+'": '+l)}Object.keys(e.__schemas__).forEach(function(O){const l=e.__schemas__[O];if(l===null)return;const s={validate:null,link:null};if(e.__compiled__[O]=s,T9(l)){X9(l.validate)?s.validate=Z9(l.validate):Ix(l.validate)?s.validate=l.validate:o(O,l),Ix(l.normalize)?s.normalize=l.normalize:l.normalize?o(O,l):s.normalize=Nx();return}if(w9(l)){r.push(O);return}o(O,l)}),r.forEach(function(O){e.__compiled__[e.__schemas__[O]]&&(e.__compiled__[O].validate=e.__compiled__[e.__schemas__[O]].validate,e.__compiled__[O].normalize=e.__compiled__[e.__schemas__[O]].normalize)}),e.__compiled__[""]={validate:null,normalize:Nx()};const a=Object.keys(e.__compiled__).filter(function(O){return O.length>0&&e.__compiled__[O]}).map(_9).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","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"),U9(e)}function V9(e,t){const n=e.__index__,i=e.__last_index__,r=e.__text_cache__.slice(n,i);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=i+t,this.raw=r,this.text=r,this.url=r}function ag(e,t){const n=new V9(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Wn(e,t){if(!(this instanceof Wn))return new Wn(e,t);t||R9(e)&&(t=e,e={}),this.__opts__=og({},Dx,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=og({},z9,e),this.__compiled__={},this.__tlds__=q9,this.__tlds_replaced__=!1,this.re={},Nc(this)}Wn.prototype.add=function(t,n){return this.__schemas__[t]=n,Nc(this),this},Wn.prototype.set=function(t){return this.__opts__=og(this.__opts__,t),this},Wn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,i,r,o,a,O,l,s,u;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],l.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(s=t.search(this.re.host_fuzzy_test),s>=0&&(this.__index__<0||s<this.__index__)&&(i=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=i.index+i[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=t.indexOf("@"),u>=0&&(r=t.match(this.re.email_fuzzy))!==null&&(a=r.index+r[1].length,O=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&O>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=O))),this.__index__>=0},Wn.prototype.pretest=function(t){return this.re.pretest.test(t)},Wn.prototype.testSchemaAt=function(t,n,i){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,i,this):0},Wn.prototype.match=function(t){const n=[];let i=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(ag(this,i)),i=this.__last_index__);let r=i?t.slice(i):t;for(;this.test(r);)n.push(ag(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return n.length?n:null},Wn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const i=this.testSchemaAt(t,n[2],n[0].length);return i?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i,ag(this,0)):null},Wn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),Nc(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Nc(this),this)},Wn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},Wn.prototype.onCompile=function(){};const dO=2147483647,or=36,Og=1,ts=26,Y9=38,E9=700,Lx=72,Mx=128,Fx="-",C9=/^xn--/,j9=/[^\0-\x7F]/,A9=/[\x2E\u3002\uFF0E\uFF61]/g,G9={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},lg=or-Og,ar=Math.floor,sg=String.fromCharCode;function ao(e){throw new RangeError(G9[e])}function I9(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}function Bx(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(A9,".");const r=e.split("."),o=I9(r,t).join(".");return i+o}function Hx(e){const t=[];let n=0;const i=e.length;for(;n<i;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){const o=e.charCodeAt(n++);(o&64512)==56320?t.push(((r&1023)<<10)+(o&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}const D9=e=>String.fromCodePoint(...e),N9=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:or},Kx=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Jx=function(e,t,n){let i=0;for(e=n?ar(e/E9):e>>1,e+=ar(e/t);e>lg*ts>>1;i+=or)e=ar(e/lg);return ar(i+(lg+1)*e/(e+Y9))},ev=function(e){const t=[],n=e.length;let i=0,r=Mx,o=Lx,a=e.lastIndexOf(Fx);a<0&&(a=0);for(let O=0;O<a;++O)e.charCodeAt(O)>=128&&ao("not-basic"),t.push(e.charCodeAt(O));for(let O=a>0?a+1:0;O<n;){const l=i;for(let u=1,c=or;;c+=or){O>=n&&ao("invalid-input");const f=N9(e.charCodeAt(O++));f>=or&&ao("invalid-input"),f>ar((dO-i)/u)&&ao("overflow"),i+=f*u;const d=c<=o?Og:c>=o+ts?ts:c-o;if(f<d)break;const p=or-d;u>ar(dO/p)&&ao("overflow"),u*=p}const s=t.length+1;o=Jx(i-l,s,l==0),ar(i/s)>dO-r&&ao("overflow"),r+=ar(i/s),i%=s,t.splice(i++,0,r)}return String.fromCodePoint(...t)},tv=function(e){const t=[];e=Hx(e);const n=e.length;let i=Mx,r=0,o=Lx;for(const l of e)l<128&&t.push(sg(l));const a=t.length;let O=a;for(a&&t.push(Fx);O<n;){let l=dO;for(const u of e)u>=i&&u<l&&(l=u);const s=O+1;l-i>ar((dO-r)/s)&&ao("overflow"),r+=(l-i)*s,i=l;for(const u of e)if(u<i&&++r>dO&&ao("overflow"),u===i){let c=r;for(let f=or;;f+=or){const d=f<=o?Og:f>=o+ts?ts:f-o;if(c<d)break;const p=c-d,Q=or-d;t.push(sg(Kx(d+p%Q,0))),c=ar(p/Q)}t.push(sg(Kx(c,0))),o=Jx(r,s,O===a),r=0,++O}++r,++i}return t.join("")},nv={version:"2.3.1",ucs2:{decode:Hx,encode:D9},decode:ev,encode:tv,toASCII:function(e){return Bx(e,function(t){return j9.test(t)?"xn--"+tv(t):t})},toUnicode:function(e){return Bx(e,function(t){return C9.test(t)?ev(t.slice(4).toLowerCase()):t})}},L9={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{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"]}}},commonmark:{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"]}}}},M9=/^(vbscript|javascript|file|data):/,F9=/^data:image\/(gif|png|jpeg|webp);/;function B9(e){const t=e.trim().toLowerCase();return M9.test(t)?F9.test(t):!0}const iv=["http:","https:","mailto:"];function H9(e){const t=Lm(e,!0);if(t.hostname&&(!t.protocol||iv.indexOf(t.protocol)>=0))try{t.hostname=nv.toASCII(t.hostname)}catch{}return Fl(Nm(t))}function K9(e){const t=Lm(e,!0);if(t.hostname&&(!t.protocol||iv.indexOf(t.protocol)>=0))try{t.hostname=nv.toUnicode(t.hostname)}catch{}return sO(Nm(t),sO.defaultChars+"%")}function ii(e,t){if(!(this instanceof ii))return new ii(e,t);t||Hm(e)||(t=e||{},e="default"),this.inline=new es,this.block=new Ic,this.core=new eg,this.renderer=new cO,this.linkify=new Wn,this.validateLink=B9,this.normalizeLink=H9,this.normalizeLinkText=K9,this.utils=sC,this.helpers=Ec({},dC),this.options={},this.configure(e),t&&this.set(t)}ii.prototype.set=function(e){return Ec(this.options,e),this},ii.prototype.configure=function(e){const t=this;if(Hm(e)){const n=e;if(e=L9[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},ii.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},ii.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},ii.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},ii.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},ii.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},ii.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},ii.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const rv=new Set([!0,!1,"alt","title"]);function ov(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function av(e,t){e&&e.attrs&&(e.attrs=ov(e.attrs,t))}function J9(e,t){if(!rv.has(e))throw new TypeError(`figcaption must be one of: ${[...rv]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([i])=>i==="title");return Array.isArray(n)&&n[1]?(av(t,"title"),n[1]):void 0}function e8(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(n){let i=1;for(let r=1,o=n.tokens.length;r<o-1;++r){const a=n.tokens[r];if(a.type!=="inline"||!a.children||a.children.length!==1&&a.children.length!==3||a.children.length===1&&a.children[0].type!=="image")continue;if(a.children.length===3){const[s,u,c]=a.children;if(s.type!=="link_open"||u.type!=="image"||c.type!=="link_close")continue}if(r!==0&&n.tokens[r-1].type!=="paragraph_open"||r!==o-1&&n.tokens[r+1].type!=="paragraph_close")continue;const O=n.tokens[r-1];let l;if(O.type="figure_open",O.tag="figure",n.tokens[r+1].type="figure_close",n.tokens[r+1].tag="figure",t.dataType&&n.tokens[r-1].attrPush(["data-type","image"]),t.link&&a.children.length===1){[l]=a.children;const s=new n.Token("link_open","a",1);s.attrPush(["href",l.attrGet("src")]),a.children.unshift(s),a.children.push(new n.Token("link_close","a",-1))}if(l=a.children.length===1?a.children[0]:a.children[1],t.figcaption){const s=J9(t.figcaption,l);if(s){const[u]=e.parseInline(s,n.env);a.children.push(new n.Token("figcaption_open","figcaption",1)),a.children.push(...u.children),a.children.push(new n.Token("figcaption_close","figcaption",-1)),l.attrs&&(l.attrs=ov(l.attrs,"title"))}}if(t.copyAttrs&&l.attrs){const s=t.copyAttrs===!0?"":t.copyAttrs;O.attrs=l.attrs.filter(([u])=>u.match(s)).map(u=>Array.from(u))}if(t.tabindex&&(n.tokens[r-1].attrPush(["tabindex",i]),i++),t.lazy&&(l.attrs.some(([s])=>s==="loading")||l.attrs.push(["loading","lazy"])),t.async&&(l.attrs.some(([s])=>s==="decoding")||l.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let s=!1;for(let u=0,c=l.attrs.length;u<c&&!s;u++){const f=l.attrs[u];f[0]==="class"&&(f[1]=`${f[1]} ${t.classes}`,s=!0)}s||l.attrs.push(["class",t.classes])}if(t.removeSrc){const s=l.attrs.find(([u])=>u==="src");l.attrs.push(["data-src",s[1]]),av(l,"src")}}})}const t8=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function n8(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==126||t||i+2>=n)return!1;e.pos=i+1;let r=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===126){r=!0;break}e.md.inline.skipToken(e)}if(!r||i+1===e.pos)return e.pos=i,!1;const o=e.src.slice(i+1,e.pos);if(o.match(/(^|[^\\])(\\\\)*\s/))return e.pos=i,!1;e.posMax=e.pos,e.pos=i+1;const a=e.push("sub_open","sub",1);a.markup="~";const O=e.push("text","",0);O.content=o.replace(t8,"$1");const l=e.push("sub_close","sub",-1);return l.markup="~",e.pos=e.posMax+1,e.posMax=n,!0}function i8(e){e.inline.ruler.after("emphasis","sub",n8)}const r8=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function o8(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==94||t||i+2>=n)return!1;e.pos=i+1;let r=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){r=!0;break}e.md.inline.skipToken(e)}if(!r||i+1===e.pos)return e.pos=i,!1;const o=e.src.slice(i+1,e.pos);if(o.match(/(^|[^\\])(\\\\)*\s/))return e.pos=i,!1;e.posMax=e.pos,e.pos=i+1;const a=e.push("sup_open","sup",1);a.markup="^";const O=e.push("text","",0);O.content=o.replace(r8,"$1");const l=e.push("sup_close","sup",-1);return l.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function a8(e){e.inline.ruler.after("emphasis","sup",o8)}const O8=e=>{const t=m.inject("highlight"),n=m.shallowRef(ht.editorExtensions.highlight.instance);return m.onMounted(()=>{e.noHighlight||n.value||(Ln("link",{...t.value.css,rel:"stylesheet",id:un.hlcss}),Ln("script",{...t.value.js,id:un.hljs,onload(){n.value=window.hljs}},"hljs"))}),m.watch(()=>t.value.css,()=>{e.noHighlight||ht.editorExtensions.highlight.instance||Z5("link",{...t.value.css,rel:"stylesheet",id:un.hlcss})}),n},hO=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ov=new Set,ug=typeof process=="object"&&process?process:{},lv=(e,t,n,i)=>{typeof ug.emitWarning=="function"?ug.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)};let Lc=globalThis.AbortController,sv=globalThis.AbortSignal;if(typeof Lc>"u"){sv=class{constructor(){qe(this,"onabort");qe(this,"_onabort",[]);qe(this,"reason");qe(this,"aborted",!1)}addEventListener(i,r){this._onabort.push(r)}},Lc=class{constructor(){qe(this,"signal",new sv);t()}abort(i){var r,o;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const a of this.signal._onabort)a(i);(o=(r=this.signal).onabort)==null||o.call(r,i)}}};let e=((u5=ug.env)==null?void 0:u5.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const t=()=>{e&&(e=!1,lv("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}const l8=e=>!Ov.has(e),Oo=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),uv=e=>Oo(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Mc:null:null;class Mc extends Array{constructor(t){super(t),this.fill(0)}}const $a=class $a{constructor(t,n){qe(this,"heap");qe(this,"length");if(!_($a,YO))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){const n=uv(t);if(!n)return[];he($a,YO,!0);const i=new $a(t,n);return he($a,YO,!1),i}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}};YO=new WeakMap,Ue($a,YO,!1);let cg=$a;const ob=class ob{constructor(t){Ue(this,K);Ue(this,Wi);Ue(this,jn);Ue(this,qi);Ue(this,Ui);Ue(this,EO);Ue(this,CO);qe(this,"ttl");qe(this,"ttlResolution");qe(this,"ttlAutopurge");qe(this,"updateAgeOnGet");qe(this,"updateAgeOnHas");qe(this,"allowStale");qe(this,"noDisposeOnSet");qe(this,"noUpdateTTL");qe(this,"maxEntrySize");qe(this,"sizeCalculation");qe(this,"noDeleteOnFetchRejection");qe(this,"noDeleteOnStaleGet");qe(this,"allowStaleOnFetchAbort");qe(this,"allowStaleOnFetchRejection");qe(this,"ignoreFetchAbort");Ue(this,Rt);Ue(this,Zi);Ue(this,xt);Ue(this,et);Ue(this,Qe);Ue(this,ln);Ue(this,An);Ue(this,en);Ue(this,Vt);Ue(this,Vi);Ue(this,Yt);Ue(this,Yi);Ue(this,Ei);Ue(this,Gn);Ue(this,Ci);Ue(this,ko);Ue(this,sn);Ue(this,Qa,()=>{});Ue(this,Zr,()=>{});Ue(this,Hs,()=>{});Ue(this,In,()=>!1);Ue(this,ba,t=>{});Ue(this,jO,(t,n,i)=>{});Ue(this,Ks,(t,n,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});qe(this,c5,"LRUCache");const{max:n=0,ttl:i,ttlResolution:r=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:O,allowStale:l,dispose:s,disposeAfter:u,noDisposeOnSet:c,noUpdateTTL:f,maxSize:d=0,maxEntrySize:p=0,sizeCalculation:Q,fetchMethod:b,memoMethod:$,noDeleteOnFetchRejection:g,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:y,ignoreFetchAbort:T}=t;if(n!==0&&!Oo(n))throw new TypeError("max option must be a nonnegative integer");const v=n?uv(n):Array;if(!v)throw new Error("invalid max value: "+n);if(he(this,Wi,n),he(this,jn,d),this.maxEntrySize=p||_(this,jn),this.sizeCalculation=Q,this.sizeCalculation){if(!_(this,jn)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if($!==void 0&&typeof $!="function")throw new TypeError("memoMethod must be a function if defined");if(he(this,CO,$),b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(he(this,EO,b),he(this,ko,!!b),he(this,xt,new Map),he(this,et,new Array(n).fill(void 0)),he(this,Qe,new Array(n).fill(void 0)),he(this,ln,new v(n)),he(this,An,new v(n)),he(this,en,0),he(this,Vt,0),he(this,Vi,cg.create(n)),he(this,Rt,0),he(this,Zi,0),typeof s=="function"&&he(this,qi,s),typeof u=="function"?(he(this,Ui,u),he(this,Yt,[])):(he(this,Ui,void 0),he(this,Yt,void 0)),he(this,Ci,!!_(this,qi)),he(this,sn,!!_(this,Ui)),this.noDisposeOnSet=!!c,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!g,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!y,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(_(this,jn)!==0&&!Oo(_(this,jn)))throw new TypeError("maxSize must be a positive integer if specified");if(!Oo(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");oe(this,K,Q5).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!O,this.ttlResolution=Oo(r)||r===0?r:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!Oo(this.ttl))throw new TypeError("ttl must be a positive integer if specified");oe(this,K,ub).call(this)}if(_(this,Wi)===0&&this.ttl===0&&_(this,jn)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!_(this,Wi)&&!_(this,jn)){const w="LRU_CACHE_UNBOUNDED";l8(w)&&(Ov.add(w),lv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",w,ob))}}static unsafeExposeInternals(t){return{starts:_(t,Ei),ttls:_(t,Gn),sizes:_(t,Yi),keyMap:_(t,xt),keyList:_(t,et),valList:_(t,Qe),next:_(t,ln),prev:_(t,An),get head(){return _(t,en)},get tail(){return _(t,Vt)},free:_(t,Vi),isBackgroundFetch:n=>{var i;return oe(i=t,K,tt).call(i,n)},backgroundFetch:(n,i,r,o)=>{var a;return oe(a=t,K,rh).call(a,n,i,r,o)},moveToTail:n=>{var i;return oe(i=t,K,Ou).call(i,n)},indexes:n=>{var i;return oe(i=t,K,wo).call(i,n)},rindexes:n=>{var i;return oe(i=t,K,To).call(i,n)},isStale:n=>{var i;return _(i=t,In).call(i,n)}}}get max(){return _(this,Wi)}get maxSize(){return _(this,jn)}get calculatedSize(){return _(this,Zi)}get size(){return _(this,Rt)}get fetchMethod(){return _(this,EO)}get memoMethod(){return _(this,CO)}get dispose(){return _(this,qi)}get disposeAfter(){return _(this,Ui)}getRemainingTTL(t){return _(this,xt).has(t)?1/0:0}*entries(){for(const t of oe(this,K,wo).call(this))_(this,Qe)[t]!==void 0&&_(this,et)[t]!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield[_(this,et)[t],_(this,Qe)[t]])}*rentries(){for(const t of oe(this,K,To).call(this))_(this,Qe)[t]!==void 0&&_(this,et)[t]!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield[_(this,et)[t],_(this,Qe)[t]])}*keys(){for(const t of oe(this,K,wo).call(this)){const n=_(this,et)[t];n!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield n)}}*rkeys(){for(const t of oe(this,K,To).call(this)){const n=_(this,et)[t];n!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield n)}}*values(){for(const t of oe(this,K,wo).call(this))_(this,Qe)[t]!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield _(this,Qe)[t])}*rvalues(){for(const t of oe(this,K,To).call(this))_(this,Qe)[t]!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield _(this,Qe)[t])}[(f5=Symbol.iterator,c5=Symbol.toStringTag,f5)](){return this.entries()}find(t,n={}){for(const i of oe(this,K,wo).call(this)){const r=_(this,Qe)[i],o=oe(this,K,tt).call(this,r)?r.__staleWhileFetching:r;if(o!==void 0&&t(o,_(this,et)[i],this))return this.get(_(this,et)[i],n)}}forEach(t,n=this){for(const i of oe(this,K,wo).call(this)){const r=_(this,Qe)[i],o=oe(this,K,tt).call(this,r)?r.__staleWhileFetching:r;o!==void 0&&t.call(n,o,_(this,et)[i],this)}}rforEach(t,n=this){for(const i of oe(this,K,To).call(this)){const r=_(this,Qe)[i],o=oe(this,K,tt).call(this,r)?r.__staleWhileFetching:r;o!==void 0&&t.call(n,o,_(this,et)[i],this)}}purgeStale(){let t=!1;for(const n of oe(this,K,To).call(this,{allowStale:!0}))_(this,In).call(this,n)&&(oe(this,K,Xo).call(this,_(this,et)[n],"expire"),t=!0);return t}info(t){const n=_(this,xt).get(t);if(n===void 0)return;const i=_(this,Qe)[n],r=oe(this,K,tt).call(this,i)?i.__staleWhileFetching:i;if(r===void 0)return;const o={value:r};if(_(this,Gn)&&_(this,Ei)){const a=_(this,Gn)[n],O=_(this,Ei)[n];if(a&&O){const l=a-(hO.now()-O);o.ttl=l,o.start=Date.now()}}return _(this,Yi)&&(o.size=_(this,Yi)[n]),o}dump(){const t=[];for(const n of oe(this,K,wo).call(this,{allowStale:!0})){const i=_(this,et)[n],r=_(this,Qe)[n],o=oe(this,K,tt).call(this,r)?r.__staleWhileFetching:r;if(o===void 0||i===void 0)continue;const a={value:o};if(_(this,Gn)&&_(this,Ei)){a.ttl=_(this,Gn)[n];const O=hO.now()-_(this,Ei)[n];a.start=Math.floor(Date.now()-O)}_(this,Yi)&&(a.size=_(this,Yi)[n]),t.unshift([i,a])}return t}load(t){this.clear();for(const[n,i]of t){if(i.start){const r=Date.now()-i.start;i.start=hO.now()-r}this.set(n,i.value,i)}}set(t,n,i={}){var f,d,p,Q,b;if(n===void 0)return this.delete(t),this;const{ttl:r=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:O=this.sizeCalculation,status:l}=i;let{noUpdateTTL:s=this.noUpdateTTL}=i;const u=_(this,Ks).call(this,t,n,i.size||0,O);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),oe(this,K,Xo).call(this,t,"set"),this;let c=_(this,Rt)===0?void 0:_(this,xt).get(t);if(c===void 0)c=_(this,Rt)===0?_(this,Vt):_(this,Vi).length!==0?_(this,Vi).pop():_(this,Rt)===_(this,Wi)?oe(this,K,ih).call(this,!1):_(this,Rt),_(this,et)[c]=t,_(this,Qe)[c]=n,_(this,xt).set(t,c),_(this,ln)[_(this,Vt)]=c,_(this,An)[c]=_(this,Vt),he(this,Vt,c),nh(this,Rt)._++,_(this,jO).call(this,c,u,l),l&&(l.set="add"),s=!1;else{oe(this,K,Ou).call(this,c);const $=_(this,Qe)[c];if(n!==$){if(_(this,ko)&&oe(this,K,tt).call(this,$)){$.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:g}=$;g!==void 0&&!a&&(_(this,Ci)&&((f=_(this,qi))==null||f.call(this,g,t,"set")),_(this,sn)&&((d=_(this,Yt))==null||d.push([g,t,"set"])))}else a||(_(this,Ci)&&((p=_(this,qi))==null||p.call(this,$,t,"set")),_(this,sn)&&((Q=_(this,Yt))==null||Q.push([$,t,"set"])));if(_(this,ba).call(this,c),_(this,jO).call(this,c,u,l),_(this,Qe)[c]=n,l){l.set="replace";const g=$&&oe(this,K,tt).call(this,$)?$.__staleWhileFetching:$;g!==void 0&&(l.oldValue=g)}}else l&&(l.set="update")}if(r!==0&&!_(this,Gn)&&oe(this,K,ub).call(this),_(this,Gn)&&(s||_(this,Hs).call(this,c,r,o),l&&_(this,Zr).call(this,l,c)),!a&&_(this,sn)&&_(this,Yt)){const $=_(this,Yt);let g;for(;g=$==null?void 0:$.shift();)(b=_(this,Ui))==null||b.call(this,...g)}return this}pop(){var t;try{for(;_(this,Rt);){const n=_(this,Qe)[_(this,en)];if(oe(this,K,ih).call(this,!0),oe(this,K,tt).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(_(this,sn)&&_(this,Yt)){const n=_(this,Yt);let i;for(;i=n==null?void 0:n.shift();)(t=_(this,Ui))==null||t.call(this,...i)}}}has(t,n={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=n,o=_(this,xt).get(t);if(o!==void 0){const a=_(this,Qe)[o];if(oe(this,K,tt).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(_(this,In).call(this,o))r&&(r.has="stale",_(this,Zr).call(this,r,o));else return i&&_(this,Qa).call(this,o),r&&(r.has="hit",_(this,Zr).call(this,r,o)),!0}else r&&(r.has="miss");return!1}peek(t,n={}){const{allowStale:i=this.allowStale}=n,r=_(this,xt).get(t);if(r===void 0||!i&&_(this,In).call(this,r))return;const o=_(this,Qe)[r];return oe(this,K,tt).call(this,o)?o.__staleWhileFetching:o}async fetch(t,n={}){const{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:O=this.noDisposeOnSet,size:l=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:Q,forceRefresh:b=!1,status:$,signal:g}=n;if(!_(this,ko))return $&&($.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:o,status:$});const S={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:O,size:l,sizeCalculation:s,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:$,signal:g};let k=_(this,xt).get(t);if(k===void 0){$&&($.fetch="miss");const y=oe(this,K,rh).call(this,t,k,S,Q);return y.__returned=y}else{const y=_(this,Qe)[k];if(oe(this,K,tt).call(this,y)){const U=i&&y.__staleWhileFetching!==void 0;return $&&($.fetch="inflight",U&&($.returnedStale=!0)),U?y.__staleWhileFetching:y.__returned=y}const T=_(this,In).call(this,k);if(!b&&!T)return $&&($.fetch="hit"),oe(this,K,Ou).call(this,k),r&&_(this,Qa).call(this,k),$&&_(this,Zr).call(this,$,k),y;const v=oe(this,K,rh).call(this,t,k,S,Q),x=v.__staleWhileFetching!==void 0&&i;return $&&($.fetch=T?"stale":"refresh",x&&T&&($.returnedStale=!0)),x?v.__staleWhileFetching:v.__returned=v}}async forceFetch(t,n={}){const i=await this.fetch(t,n);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,n={}){const i=_(this,CO);if(!i)throw new Error("no memoMethod provided to constructor");const{context:r,forceRefresh:o,...a}=n,O=this.get(t,a);if(!o&&O!==void 0)return O;const l=i(t,O,{options:a,context:r});return this.set(t,l,a),l}get(t,n={}){const{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=n,O=_(this,xt).get(t);if(O!==void 0){const l=_(this,Qe)[O],s=oe(this,K,tt).call(this,l);return a&&_(this,Zr).call(this,a,O),_(this,In).call(this,O)?(a&&(a.get="stale"),s?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(o||oe(this,K,Xo).call(this,t,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),s?l.__staleWhileFetching:(oe(this,K,Ou).call(this,O),r&&_(this,Qa).call(this,O),l))}else a&&(a.get="miss")}delete(t){return oe(this,K,Xo).call(this,t,"delete")}clear(){return oe(this,K,db).call(this,"delete")}};Wi=new WeakMap,jn=new WeakMap,qi=new WeakMap,Ui=new WeakMap,EO=new WeakMap,CO=new WeakMap,Rt=new WeakMap,Zi=new WeakMap,xt=new WeakMap,et=new WeakMap,Qe=new WeakMap,ln=new WeakMap,An=new WeakMap,en=new WeakMap,Vt=new WeakMap,Vi=new WeakMap,Yt=new WeakMap,Yi=new WeakMap,Ei=new WeakMap,Gn=new WeakMap,Ci=new WeakMap,ko=new WeakMap,sn=new WeakMap,K=new WeakSet,ub=function(){const t=new Mc(_(this,Wi)),n=new Mc(_(this,Wi));he(this,Gn,t),he(this,Ei,n),he(this,Hs,(o,a,O=hO.now())=>{if(n[o]=a!==0?O:0,t[o]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{_(this,In).call(this,o)&&oe(this,K,Xo).call(this,_(this,et)[o],"expire")},a+1);l.unref&&l.unref()}}),he(this,Qa,o=>{n[o]=t[o]!==0?hO.now():0}),he(this,Zr,(o,a)=>{if(t[a]){const O=t[a],l=n[a];if(!O||!l)return;o.ttl=O,o.start=l,o.now=i||r();const s=o.now-l;o.remainingTTL=O-s}});let i=0;const r=()=>{const o=hO.now();if(this.ttlResolution>0){i=o;const a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return o};this.getRemainingTTL=o=>{const a=_(this,xt).get(o);if(a===void 0)return 0;const O=t[a],l=n[a];if(!O||!l)return 1/0;const s=(i||r())-l;return O-s},he(this,In,o=>{const a=n[o],O=t[o];return!!O&&!!a&&(i||r())-a>O})},Qa=new WeakMap,Zr=new WeakMap,Hs=new WeakMap,In=new WeakMap,Q5=function(){const t=new Mc(_(this,Wi));he(this,Zi,0),he(this,Yi,t),he(this,ba,n=>{he(this,Zi,_(this,Zi)-t[n]),t[n]=0}),he(this,Ks,(n,i,r,o)=>{if(oe(this,K,tt).call(this,i))return 0;if(!Oo(r))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(r=o(i,n),!Oo(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r}),he(this,jO,(n,i,r)=>{if(t[n]=i,_(this,jn)){const o=_(this,jn)-t[n];for(;_(this,Zi)>o;)oe(this,K,ih).call(this,!0)}he(this,Zi,_(this,Zi)+t[n]),r&&(r.entrySize=i,r.totalCalculatedSize=_(this,Zi))})},ba=new WeakMap,jO=new WeakMap,Ks=new WeakMap,wo=function*({allowStale:t=this.allowStale}={}){if(_(this,Rt))for(let n=_(this,Vt);!(!oe(this,K,cb).call(this,n)||((t||!_(this,In).call(this,n))&&(yield n),n===_(this,en)));)n=_(this,An)[n]},To=function*({allowStale:t=this.allowStale}={}){if(_(this,Rt))for(let n=_(this,en);!(!oe(this,K,cb).call(this,n)||((t||!_(this,In).call(this,n))&&(yield n),n===_(this,Vt)));)n=_(this,ln)[n]},cb=function(t){return t!==void 0&&_(this,xt).get(_(this,et)[t])===t},ih=function(t){var o,a;const n=_(this,en),i=_(this,et)[n],r=_(this,Qe)[n];return _(this,ko)&&oe(this,K,tt).call(this,r)?r.__abortController.abort(new Error("evicted")):(_(this,Ci)||_(this,sn))&&(_(this,Ci)&&((o=_(this,qi))==null||o.call(this,r,i,"evict")),_(this,sn)&&((a=_(this,Yt))==null||a.push([r,i,"evict"]))),_(this,ba).call(this,n),t&&(_(this,et)[n]=void 0,_(this,Qe)[n]=void 0,_(this,Vi).push(n)),_(this,Rt)===1?(he(this,en,he(this,Vt,0)),_(this,Vi).length=0):he(this,en,_(this,ln)[n]),_(this,xt).delete(i),nh(this,Rt)._--,n},rh=function(t,n,i,r){const o=n===void 0?void 0:_(this,Qe)[n];if(oe(this,K,tt).call(this,o))return o;const a=new Lc,{signal:O}=i;O==null||O.addEventListener("abort",()=>a.abort(O.reason),{signal:a.signal});const l={signal:a.signal,options:i,context:r},s=(Q,b=!1)=>{const{aborted:$}=a.signal,g=i.ignoreFetchAbort&&Q!==void 0;if(i.status&&($&&!b?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,g&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),$&&!g&&!b)return c(a.signal.reason);const S=d;return _(this,Qe)[n]===d&&(Q===void 0?S.__staleWhileFetching?_(this,Qe)[n]=S.__staleWhileFetching:oe(this,K,Xo).call(this,t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,Q,l.options))),Q},u=Q=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=Q),c(Q)),c=Q=>{const{aborted:b}=a.signal,$=b&&i.allowStaleOnFetchAbort,g=$||i.allowStaleOnFetchRejection,S=g||i.noDeleteOnFetchRejection,k=d;if(_(this,Qe)[n]===d&&(!S||k.__staleWhileFetching===void 0?oe(this,K,Xo).call(this,t,"fetch"):$||(_(this,Qe)[n]=k.__staleWhileFetching)),g)return i.status&&k.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw Q},f=(Q,b)=>{var g;const $=(g=_(this,EO))==null?void 0:g.call(this,t,o,l);$&&$ instanceof Promise&&$.then(S=>Q(S===void 0?void 0:S),b),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(Q(void 0),i.allowStaleOnFetchAbort&&(Q=S=>s(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);const d=new Promise(f).then(s,u),p=Object.assign(d,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return n===void 0?(this.set(t,p,{...l.options,status:void 0}),n=_(this,xt).get(t)):_(this,Qe)[n]=p,p},tt=function(t){if(!_(this,ko))return!1;const n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Lc},fb=function(t,n){_(this,An)[n]=t,_(this,ln)[t]=n},Ou=function(t){t!==_(this,Vt)&&(t===_(this,en)?he(this,en,_(this,ln)[t]):oe(this,K,fb).call(this,_(this,An)[t],_(this,ln)[t]),oe(this,K,fb).call(this,_(this,Vt),t),he(this,Vt,t))},Xo=function(t,n){var r,o,a,O;let i=!1;if(_(this,Rt)!==0){const l=_(this,xt).get(t);if(l!==void 0)if(i=!0,_(this,Rt)===1)oe(this,K,db).call(this,n);else{_(this,ba).call(this,l);const s=_(this,Qe)[l];if(oe(this,K,tt).call(this,s)?s.__abortController.abort(new Error("deleted")):(_(this,Ci)||_(this,sn))&&(_(this,Ci)&&((r=_(this,qi))==null||r.call(this,s,t,n)),_(this,sn)&&((o=_(this,Yt))==null||o.push([s,t,n]))),_(this,xt).delete(t),_(this,et)[l]=void 0,_(this,Qe)[l]=void 0,l===_(this,Vt))he(this,Vt,_(this,An)[l]);else if(l===_(this,en))he(this,en,_(this,ln)[l]);else{const u=_(this,An)[l];_(this,ln)[u]=_(this,ln)[l];const c=_(this,ln)[l];_(this,An)[c]=_(this,An)[l]}nh(this,Rt)._--,_(this,Vi).push(l)}}if(_(this,sn)&&((a=_(this,Yt))!=null&&a.length)){const l=_(this,Yt);let s;for(;s=l==null?void 0:l.shift();)(O=_(this,Ui))==null||O.call(this,...s)}return i},db=function(t){var n,i,r;for(const o of oe(this,K,To).call(this,{allowStale:!0})){const a=_(this,Qe)[o];if(oe(this,K,tt).call(this,a))a.__abortController.abort(new Error("deleted"));else{const O=_(this,et)[o];_(this,Ci)&&((n=_(this,qi))==null||n.call(this,a,O,t)),_(this,sn)&&((i=_(this,Yt))==null||i.push([a,O,t]))}}if(_(this,xt).clear(),_(this,Qe).fill(void 0),_(this,et).fill(void 0),_(this,Gn)&&_(this,Ei)&&(_(this,Gn).fill(0),_(this,Ei).fill(0)),_(this,Yi)&&_(this,Yi).fill(0),he(this,en,0),he(this,Vt,0),_(this,Vi).length=0,he(this,Zi,0),he(this,Rt,0),_(this,sn)&&_(this,Yt)){const o=_(this,Yt);let a;for(;a=o==null?void 0:o.shift();)(r=_(this,Ui))==null||r.call(this,...a)}};let fg=ob;const Fc=new fg({max:1e3,ttl:6e5}),s8=e=>{const t=m.inject("theme"),n=m.inject("rootRef"),{editorExtensions:i,editorExtensionsAttrs:r,mermaidConfig:o}=ht,a=m.shallowRef(i.mermaid.instance),O=m.shallowRef(-1),l=()=>{const u=a.value;!e.noMermaid&&u&&(u.initialize(o({startOnLoad:!1,theme:t.value==="dark"?"dark":"default"})),O.value=O.value+1)};return m.watch(()=>t.value,()=>{Fc.clear(),l()}),m.onMounted(()=>{var c,f;if(e.noMermaid||a.value)return;const u=i.mermaid.js;/\.mjs/.test(u)?(Ln("link",{...(c=r.mermaid)==null?void 0:c.js,rel:"modulepreload",href:u,id:un.mermaidM}),import(u).then(d=>{a.value=d.default,l()})):Ln("script",{...(f=r.mermaid)==null?void 0:f.js,src:u,id:un.mermaid,onload(){a.value=window.mermaid,l()}},"mermaid")}),{mermaidRef:a,reRenderRef:O,replaceMermaid:async()=>{if(!e.noMermaid&&a.value){const u=n.value.querySelectorAll(`div.${z}-mermaid`),c=document.createElement("div"),f=document.body.offsetWidth>1366?document.body.offsetWidth:1366,d=document.body.offsetHeight>768?document.body.offsetHeight:768;c.style.width=f+"px",c.style.height=d+"px",c.style.position="fixed",c.style.zIndex="-10000",c.style.top="-10000";let p=u.length;p>0&&document.body.appendChild(c),await Promise.allSettled(Array.from(u).map(Q=>(async $=>{var S;let g=Fc.get($.innerText);if(!g){const k=Oh();let y={svg:""};try{y=await a.value.render(k,$.innerText,c),g=await e.sanitizeMermaid(y.svg);const T=document.createElement("p");T.className=`${z}-mermaid`,T.setAttribute("data-processed",""),T.innerHTML=g,(S=T.children[0])==null||S.removeAttribute("height"),Fc.set($.innerText,T.innerHTML),$.dataset.line!==void 0&&(T.dataset.line=$.dataset.line),$.replaceWith(T)}catch{}--p===0&&c.remove()}})(Q)))}}}},u8=e=>{const t=m.shallowRef(ht.editorExtensions.katex.instance);return m.onMounted(()=>{if(e.noKatex||t.value)return;const{editorExtensions:n}=ht;Ln("script",{src:n.katex.js,id:un.katexjs,onload(){t.value=window.katex}},"katex"),Ln("link",{rel:"stylesheet",href:n.katex.css,id:un.katexcss})}),t},c8=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(i,r,o,a,O)=>{const l=i[r],s=l.content.trim();if(l.info==="mermaid"){let u;i[r].map&&i[r].level===0&&(u=i[r].map[0],i[r].attrSet("data-line",String(u)));const c=Fc.get(s);return c?`<p class="${z}-mermaid" ${u!==void 0?"data-line="+u:""} data-processed>${c}</p>`:`<div class="${z}-mermaid" ${u!==void 0?"data-line="+u:""} data-mermaid-theme=${t.themeRef.value}>${s}</div>`}return n(i,r,o,a,O)}},Bc=(e,t)=>{const n=e.attrs?e.attrs.slice():[];return t.forEach(i=>{const r=e.attrIndex(i[0]);r<0?n.push(i):(n[r]=n[r].slice(),n[r][1]+=` ${i[1]}`)}),n},f8=(e,t)=>{const n=[{open:"$",close:"$"},{open:"\\(",close:"\\)"}];let i,r,o;for(const a of n)if(e.src.startsWith(a.open,e.pos)){const O=e.pos+a.open.length;for(i=O;(i=e.src.indexOf(a.close,i))!==-1;){for(o=i-1;e.src[o]==="\\";)o-=1;if((i-o)%2==1)break;i+=a.close.length}return i===-1?(t||(e.pending+=a.open),e.pos=O,!0):i-O===0?(t||(e.pending+=a.open+a.close),e.pos=O+a.close.length,!0):(t||(r=e.push("math_inline","math",0),r.markup=a.open,r.content=e.src.slice(O,i)),e.pos=i+a.close.length,!0)}return!1},d8=(e,t,n,i)=>{const r=[{open:"$$",close:"$$"},{open:"\\[",close:"\\]"}];let o,a,O,l,s=!1,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];for(const f of r){if(u+f.open.length>c||e.src.slice(u,u+f.open.length)!==f.open)continue;if(u+=f.open.length,o=e.src.slice(u,c),i)return!0;for(o.trim().slice(-f.close.length)===f.close&&(o=o.trim().slice(0,-f.close.length),s=!0),O=t;!s&&(O++,!(O>=n||(u=e.bMarks[O]+e.tShift[O],c=e.eMarks[O],u<c&&e.tShift[O]<e.blkIndent)));)e.src.slice(u,c).trim().slice(-f.close.length)===f.close&&(l=e.src.slice(0,c).lastIndexOf(f.close),a=e.src.slice(u,l),s=!0);e.line=O+1;const d=e.push("math_block","math",0);return d.block=!0,d.content=(o&&o.trim()?o+`
299
+ `,o.map=[t,e.line],!0}function ZC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>o)return!1;const a=e.src.charCodeAt(r);if(a!==126&&a!==96)return!1;let O=r;r=e.skipChars(r,a);let l=r-O;if(l<3)return!1;const s=e.src.slice(O,r),u=e.src.slice(r,o);if(a===96&&u.indexOf(String.fromCharCode(a))>=0)return!1;if(i)return!0;let c=t,f=!1;for(;c++,!(c>=n||(r=O=e.bMarks[c]+e.tShift[c],o=e.eMarks[c],r<o&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(r)===a&&!(e.sCount[c]-e.blkIndent>=4)&&(r=e.skipChars(r,a),!(r-O<l)&&(r=e.skipSpaces(r),!(r<o)))){f=!0;break}l=e.sCount[t],e.line=c+(f?1:0);const d=e.push("fence","code",0);return d.info=u,d.content=e.getLines(t+1,c,l,!0),d.markup=s,d.map=[t,e.line],!0}function VC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(i)return!0;const O=[],l=[],s=[],u=[],c=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let d=!1,p;for(p=t;p<n;p++){const S=e.sCount[p]<e.blkIndent;if(r=e.bMarks[p]+e.tShift[p],o=e.eMarks[p],r>=o)break;if(e.src.charCodeAt(r++)===62&&!S){let y=e.sCount[p]+1,T,v;e.src.charCodeAt(r)===32?(r++,y++,v=!1,T=!0):e.src.charCodeAt(r)===9?(T=!0,(e.bsCount[p]+y)%4===3?(r++,y++,v=!1):v=!0):T=!1;let w=y;for(O.push(e.bMarks[p]),e.bMarks[p]=r;r<o;){const x=e.src.charCodeAt(r);if(Be(x))x===9?w+=4-(w+e.bsCount[p]+(v?1:0))%4:w++;else break;r++}d=r>=o,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(T?1:0),s.push(e.sCount[p]),e.sCount[p]=w-y,u.push(e.tShift[p]),e.tShift[p]=r-e.bMarks[p];continue}if(d)break;let k=!1;for(let y=0,T=c.length;y<T;y++)if(c[y](e,p,n,!0)){k=!0;break}if(k){e.lineMax=p,e.blkIndent!==0&&(O.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),s.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}O.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),s.push(e.sCount[p]),e.sCount[p]=-1}const Q=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const $=[t,0];b.map=$,e.md.block.tokenize(e,t,p);const g=e.push("blockquote_close","blockquote",-1);g.markup=">",e.lineMax=a,e.parentType=f,$[1]=e.line;for(let S=0;S<u.length;S++)e.bMarks[S+t]=O[S],e.tShift[S+t]=u[S],e.sCount[S+t]=s[S],e.bsCount[S+t]=l[S];return e.blkIndent=Q,!0}function YC(e,t,n,i){const r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let O=1;for(;o<r;){const s=e.src.charCodeAt(o++);if(s!==a&&!Be(s))return!1;s===a&&O++}if(O<3)return!1;if(i)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(O+1).join(String.fromCharCode(a)),!0}function Ux(e,t){const n=e.eMarks[t];let i=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<n){const o=e.src.charCodeAt(i);if(!Be(o))return-1}return i}function Zx(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];let r=n;if(r+1>=i)return-1;let o=e.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=e.src.charCodeAt(r++),o>=48&&o<=57){if(r-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=e.src.charCodeAt(r),!Be(o))?-1:r}function EC(e,t){const n=e.level+2;for(let i=t+2,r=e.tokens.length-2;i<r;i++)e.tokens[i].level===n&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function CC(e,t,n,i){let r,o,a,O,l=t,s=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(u=!0);let c,f,d;if((d=Zx(e,l))>=0){if(c=!0,a=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(a,d-1)),u&&f!==1)return!1}else if((d=Ux(e,l))>=0)c=!1;else return!1;if(u&&e.skipSpaces(d)>=e.eMarks[l])return!1;if(i)return!0;const p=e.src.charCodeAt(d-1),Q=e.tokens.length;c?(O=e.push("ordered_list_open","ol",1),f!==1&&(O.attrs=[["start",f]])):O=e.push("bullet_list_open","ul",1);const b=[l,0];O.map=b,O.markup=String.fromCharCode(p);let $=!1;const g=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";l<n;){o=d,r=e.eMarks[l];const k=e.sCount[l]+d-(e.bMarks[l]+e.tShift[l]);let y=k;for(;o<r;){const q=e.src.charCodeAt(o);if(q===9)y+=4-(y+e.bsCount[l])%4;else if(q===32)y++;else break;o++}const T=o;let v;T>=r?v=1:v=y-k,v>4&&(v=1);const w=k+v;O=e.push("list_item_open","li",1),O.markup=String.fromCharCode(p);const x=[l,0];O.map=x,c&&(O.info=e.src.slice(a,d-1));const U=e.tight,V=e.tShift[l],E=e.sCount[l],Z=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=w,e.tight=!0,e.tShift[l]=T-e.bMarks[l],e.sCount[l]=y,T>=r&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||$)&&(s=!1),$=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Z,e.tShift[l]=V,e.sCount[l]=E,e.tight=U,O=e.push("list_item_close","li",-1),O.markup=String.fromCharCode(p),l=e.line,x[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let X=!1;for(let q=0,W=g.length;q<W;q++)if(g[q](e,l,n,!0)){X=!0;break}if(X)break;if(c){if(d=Zx(e,l),d<0)break;a=e.bMarks[l]+e.tShift[l]}else if(d=Ux(e,l),d<0)break;if(p!==e.src.charCodeAt(d-1))break}return c?O=e.push("ordered_list_close","ol",-1):O=e.push("bullet_list_close","ul",-1),O.markup=String.fromCharCode(p),b[1]=l,e.line=l,e.parentType=S,s&&EC(e,Q),!0}function jC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==91)return!1;function O(g){const S=e.lineMax;if(g>=S||e.isEmpty(g))return null;let k=!1;if(e.sCount[g]-e.blkIndent>3&&(k=!0),e.sCount[g]<0&&(k=!0),!k){const v=e.md.block.ruler.getRules("reference"),w=e.parentType;e.parentType="reference";let x=!1;for(let U=0,V=v.length;U<V;U++)if(v[U](e,g,S,!0)){x=!0;break}if(e.parentType=w,x)return null}const y=e.bMarks[g]+e.tShift[g],T=e.eMarks[g];return e.src.slice(y,T+1)}let l=e.src.slice(r,o+1);o=l.length;let s=-1;for(r=1;r<o;r++){const g=l.charCodeAt(r);if(g===91)return!1;if(g===93){s=r;break}else if(g===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(g===92&&(r++,r<o&&l.charCodeAt(r)===10)){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}}if(s<0||l.charCodeAt(s+1)!==58)return!1;for(r=s+2;r<o;r++){const g=l.charCodeAt(r);if(g===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(!Be(g))break}const u=e.md.helpers.parseLinkDestination(l,r,o);if(!u.ok)return!1;const c=e.md.normalizeLink(u.str);if(!e.md.validateLink(c))return!1;r=u.pos;const f=r,d=a,p=r;for(;r<o;r++){const g=l.charCodeAt(r);if(g===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(!Be(g))break}let Q=e.md.helpers.parseLinkTitle(l,r,o);for(;Q.can_continue;){const g=O(a);if(g===null)break;l+=g,r=o,o=l.length,a++,Q=e.md.helpers.parseLinkTitle(l,r,o,Q)}let b;for(r<o&&p!==r&&Q.ok?(b=Q.str,r=Q.pos):(b="",r=f,a=d);r<o;){const g=l.charCodeAt(r);if(!Be(g))break;r++}if(r<o&&l.charCodeAt(r)!==10&&b)for(b="",r=f,a=d;r<o;){const g=l.charCodeAt(r);if(!Be(g))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;const $=jc(l.slice(1,s));return $?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[$]>"u"&&(e.env.references[$]={title:b,href:c}),e.line=a),!0):!1}const AC=["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"],GC="[a-zA-Z_:][a-zA-Z0-9:._-]*",IC="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",Vx="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+GC+"(?:\\s*=\\s*"+IC+")?)")+"*\\s*\\/?>",Yx="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",DC="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",NC="<[?][\\s\\S]*?[?]>",LC="<![A-Za-z][^>]*>",MC="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",FC=new RegExp("^(?:"+Vx+"|"+Yx+"|"+DC+"|"+NC+"|"+LC+"|"+MC+")"),BC=new RegExp("^(?:"+Vx+"|"+Yx+")"),fO=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+AC.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(BC.source+"\\s*$"),/^$/,!1]];function HC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let a=e.src.slice(r,o),O=0;for(;O<fO.length&&!fO[O][0].test(a);O++);if(O===fO.length)return!1;if(i)return fO[O][2];let l=t+1;if(!fO[O][1].test(a)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(r=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(r,o),fO[O][1].test(a)){a.length!==0&&l++;break}}e.line=l;const s=e.push("html_block","",0);return s.map=[t,l],s.content=e.getLines(t,l,e.blkIndent,!0),!0}function KC(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(r);if(a!==35||r>=o)return!1;let O=1;for(a=e.src.charCodeAt(++r);a===35&&r<o&&O<=6;)O++,a=e.src.charCodeAt(++r);if(O>6||r<o&&!Be(a))return!1;if(i)return!0;o=e.skipSpacesBack(o,r);const l=e.skipCharsBack(o,35,r);l>r&&Be(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const s=e.push("heading_open","h"+String(O),1);s.markup="########".slice(0,O),s.map=[t,e.line];const u=e.push("inline","",0);u.content=e.src.slice(r,o).trim(),u.map=[t,e.line],u.children=[];const c=e.push("heading_close","h"+String(O),-1);return c.markup="########".slice(0,O),!0}function JC(e,t,n){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const r=e.parentType;e.parentType="paragraph";let o=0,a,O=t+1;for(;O<n&&!e.isEmpty(O);O++){if(e.sCount[O]-e.blkIndent>3)continue;if(e.sCount[O]>=e.blkIndent){let d=e.bMarks[O]+e.tShift[O];const p=e.eMarks[O];if(d<p&&(a=e.src.charCodeAt(d),(a===45||a===61)&&(d=e.skipChars(d,a),d=e.skipSpaces(d),d>=p))){o=a===61?1:2;break}}if(e.sCount[O]<0)continue;let f=!1;for(let d=0,p=i.length;d<p;d++)if(i[d](e,O,n,!0)){f=!0;break}if(f)break}if(!o)return!1;const l=e.getLines(t,O,e.blkIndent,!1).trim();e.line=O+1;const s=e.push("heading_open","h"+String(o),1);s.markup=String.fromCharCode(a),s.map=[t,e.line];const u=e.push("inline","",0);u.content=l,u.map=[t,e.line-1],u.children=[];const c=e.push("heading_close","h"+String(o),-1);return c.markup=String.fromCharCode(a),e.parentType=r,!0}function e9(e,t,n){const i=e.md.block.ruler.getRules("paragraph"),r=e.parentType;let o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let s=!1;for(let u=0,c=i.length;u<c;u++)if(i[u](e,o,n,!0)){s=!0;break}if(s)break}const a=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o;const O=e.push("paragraph_open","p",1);O.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=r,!0}const Gc=[["table",qC,["paragraph","reference"]],["code",UC],["fence",ZC,["paragraph","reference","blockquote","list"]],["blockquote",VC,["paragraph","reference","blockquote","list"]],["hr",YC,["paragraph","reference","blockquote","list"]],["list",CC,["paragraph","reference","blockquote"]],["reference",jC],["html_block",HC,["paragraph","reference","blockquote"]],["heading",KC,["paragraph","reference","blockquote"]],["lheading",JC],["paragraph",e9]];function Ic(){this.ruler=new mn;for(let e=0;e<Gc.length;e++)this.ruler.push(Gc[e][0],Gc[e][1],{alt:(Gc[e][2]||[]).slice()})}Ic.prototype.tokenize=function(e,t,n){const i=this.ruler.getRules(""),r=i.length,o=e.md.options.maxNesting;let a=t,O=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=o){e.line=n;break}const l=e.line;let s=!1;for(let u=0;u<r;u++)if(s=i[u](e,a,n,!1),s){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!s)throw new Error("none of the block rules matched");e.tight=!O,e.isEmpty(e.line-1)&&(O=!0),a=e.line,a<n&&e.isEmpty(a)&&(O=!0,a++,e.line=a)}},Ic.prototype.parse=function(e,t,n,i){if(!e)return;const r=new this.State(e,t,n,i);this.tokenize(r,r.line,r.lineMax)},Ic.prototype.State=rr;function Jl(e,t,n,i){this.src=e,this.env=n,this.md=t,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}Jl.prototype.pushPending=function(){const e=new Pi("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Jl.prototype.push=function(e,t,n){this.pending&&this.pushPending();const i=new Pi(e,t,n);let r=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i},Jl.prototype.scanDelims=function(e,t){const n=this.posMax,i=this.src.charCodeAt(e),r=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o<n&&this.src.charCodeAt(o)===i;)o++;const a=o-e,O=o<n?this.src.charCodeAt(o):32,l=Kl(r)||Hl(String.fromCharCode(r)),s=Kl(O)||Hl(String.fromCharCode(O)),u=Bl(r),c=Bl(O),f=!c&&(!s||u||l),d=!u&&(!l||c||s);return{can_open:f&&(t||!d||l),can_close:d&&(t||!f||s),length:a}},Jl.prototype.Token=Pi;function t9(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 n9(e,t){let n=e.pos;for(;n<e.posMax&&!t9(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const i9=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function r9(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const r=e.pending.match(i9);if(!r)return!1;const o=r[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let O=a.url;if(O.length<=o.length)return!1;O=O.replace(/\*+$/,"");const l=e.md.normalizeLink(O);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const s=e.push("link_open","a",1);s.attrs=[["href",l]],s.markup="linkify",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(O);const c=e.push("link_close","a",-1);c.markup="linkify",c.info="auto"}return e.pos+=O.length-o.length,!0}function o9(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,r=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),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(n++;n<r&&Be(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const ng=[];for(let e=0;e<256;e++)ng.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ng[e.charCodeAt(0)]=1});function a9(e,t){let n=e.pos;const i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(r=e.src.charCodeAt(n),!!Be(r));)n++;return e.pos=n,!0}let o=e.src[n];if(r>=55296&&r<=56319&&n+1<i){const O=e.src.charCodeAt(n+1);O>=56320&&O<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const O=e.push("text_special","",0);r<256&&ng[r]!==0?O.content=o:O.content=a,O.markup=a,O.info="escape"}return e.pos=n+1,!0}function O9(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const r=n;n++;const o=e.posMax;for(;n<o&&e.src.charCodeAt(n)===96;)n++;const a=e.src.slice(r,n),O=a.length;if(e.backticksScanned&&(e.backticks[O]||0)<=r)return t||(e.pending+=a),e.pos+=O,!0;let l=n,s;for(;(s=e.src.indexOf("`",l))!==-1;){for(l=s+1;l<o&&e.src.charCodeAt(l)===96;)l++;const u=l-s;if(u===O){if(!t){const c=e.push("code_inline","code",0);c.markup=a,c.content=e.src.slice(n,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[u]=s}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=O,!0}function l9(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const r=e.scanDelims(e.pos,!0);let o=r.length;const a=String.fromCharCode(i);if(o<2)return!1;let O;o%2&&(O=e.push("text","",0),O.content=a,o--);for(let l=0;l<o;l+=2)O=e.push("text","",0),O.content=a+a,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function Ex(e,t){let n;const i=[],r=t.length;for(let o=0;o<r;o++){const a=t[o];if(a.marker!==126||a.end===-1)continue;const O=t[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[O.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[O.token-1].type==="text"&&e.tokens[O.token-1].content==="~"&&i.push(O.token-1)}for(;i.length;){const o=i.pop();let a=o+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,o!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[o],e.tokens[o]=n)}}function s9(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ex(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&Ex(e,t[i].delimiters)}const Cx={tokenize:l9,postProcess:s9};function u9(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==95&&i!==42)return!1;const r=e.scanDelims(e.pos,i===42);for(let o=0;o<r.length;o++){const a=e.push("text","",0);a.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return e.pos+=r.length,!0}function jx(e,t){const n=t.length;for(let i=n-1;i>=0;i--){const r=t[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=t[r.end],a=i>0&&t[i-1].end===r.end+1&&t[i-1].marker===r.marker&&t[i-1].token===r.token-1&&t[r.end+1].token===o.token+1,O=String.fromCharCode(r.marker),l=e.tokens[r.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?O+O:O,l.content="";const s=e.tokens[o.token];s.type=a?"strong_close":"em_close",s.tag=a?"strong":"em",s.nesting=-1,s.markup=a?O+O:O,s.content="",a&&(e.tokens[t[i-1].token].content="",e.tokens[t[r.end+1].token].content="",i--)}}function c9(e){const t=e.tokens_meta,n=e.tokens_meta.length;jx(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&jx(e,t[i].delimiters)}const Ax={tokenize:u9,postProcess:c9};function f9(e,t){let n,i,r,o,a="",O="",l=e.pos,s=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const u=e.pos,c=e.posMax,f=e.pos+1,d=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(d<0)return!1;let p=d+1;if(p<c&&e.src.charCodeAt(p)===40){for(s=!1,p++;p<c&&(n=e.src.charCodeAt(p),!(!Be(n)&&n!==10));p++);if(p>=c)return!1;if(l=p,r=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),r.ok){for(a=e.md.normalizeLink(r.str),e.md.validateLink(a)?p=r.pos:a="",l=p;p<c&&(n=e.src.charCodeAt(p),!(!Be(n)&&n!==10));p++);if(r=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<c&&l!==p&&r.ok)for(O=r.str,p=r.pos;p<c&&(n=e.src.charCodeAt(p),!(!Be(n)&&n!==10));p++);}(p>=c||e.src.charCodeAt(p)!==41)&&(s=!0),p++}if(s){if(typeof e.env.references>"u")return!1;if(p<c&&e.src.charCodeAt(p)===91?(l=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?i=e.src.slice(l,p++):p=d+1):p=d+1,i||(i=e.src.slice(f,d)),o=e.env.references[jc(i)],!o)return e.pos=u,!1;a=o.href,O=o.title}if(!t){e.pos=f,e.posMax=d;const Q=e.push("link_open","a",1),b=[["href",a]];Q.attrs=b,O&&b.push(["title",O]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=c,!0}function d9(e,t){let n,i,r,o,a,O,l,s,u="";const c=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const d=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(o=p+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(!Be(n)&&n!==10));o++);if(o>=f)return!1;for(s=o,O=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),O.ok&&(u=e.md.normalizeLink(O.str),e.md.validateLink(u)?o=O.pos:u=""),s=o;o<f&&(n=e.src.charCodeAt(o),!(!Be(n)&&n!==10));o++);if(O=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<f&&s!==o&&O.ok)for(l=O.str,o=O.pos;o<f&&(n=e.src.charCodeAt(o),!(!Be(n)&&n!==10));o++);else l="";if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=c,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(s=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?r=e.src.slice(s,o++):o=p+1):o=p+1,r||(r=e.src.slice(d,p)),a=e.env.references[jc(r)],!a)return e.pos=c,!1;u=a.href,l=a.title}if(!t){i=e.src.slice(d,p);const Q=[];e.md.inline.parse(i,e.md,e.env,Q);const b=e.push("image","img",0),$=[["src",u],["alt",""]];b.attrs=$,b.children=Q,b.content=i,l&&$.push(["title",l])}return e.pos=o,e.posMax=f,!0}const h9=/^([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])?)*)$/,p9=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function m9(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const i=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(i+1,n);if(p9.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const O=e.push("link_open","a",1);O.attrs=[["href",a]],O.markup="autolink",O.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const s=e.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return e.pos+=o.length+2,!0}if(h9.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const O=e.push("link_open","a",1);O.attrs=[["href",a]],O.markup="autolink",O.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const s=e.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return e.pos+=o.length+2,!0}return!1}function g9(e){return/^<a[>\s]/i.test(e)}function $9(e){return/^<\/a\s*>/i.test(e)}function Q9(e){const t=e|32;return t>=97&&t<=122}function b9(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;const r=e.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!Q9(r))return!1;const o=e.src.slice(i).match(FC);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],g9(a.content)&&e.linkLevel++,$9(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const y9=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,S9=/^&([a-z][a-z0-9]{1,31});/i;function P9(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(y9);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),O=e.push("text_special","",0);O.content=Km(a)?Cc(a):Cc(65533),O.markup=o[0],O.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(S9);if(o){const a=wx(o[0]);if(a!==o[0]){if(!t){const O=e.push("text_special","",0);O.content=a,O.markup=o[0],O.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function Gx(e){const t={},n=e.length;if(!n)return;let i=0,r=-2;const o=[];for(let a=0;a<n;a++){const O=e[a];if(o.push(0),(e[i].marker!==O.marker||r!==O.token-1)&&(i=a),r=O.token,O.length=O.length||0,!O.close)continue;t.hasOwnProperty(O.marker)||(t[O.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[O.marker][(O.open?3:0)+O.length%3];let s=i-o[i]-1,u=s;for(;s>l;s-=o[s]+1){const c=e[s];if(c.marker===O.marker&&c.open&&c.end<0){let f=!1;if((c.close||O.open)&&(c.length+O.length)%3===0&&(c.length%3!==0||O.length%3!==0)&&(f=!0),!f){const d=s>0&&!e[s-1].open?o[s-1]+1:0;o[a]=a-s+d,o[s]=d,O.open=!1,c.end=a,c.close=!1,u=-1,r=-2;break}}}u!==-1&&(t[O.marker][(O.open?3:0)+(O.length||0)%3]=u)}}function k9(e){const t=e.tokens_meta,n=e.tokens_meta.length;Gx(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&Gx(t[i].delimiters)}function x9(e){let t,n,i=0;const r=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)r[t].nesting<0&&i--,r[t].level=i,r[t].nesting>0&&i++,r[t].type==="text"&&t+1<o&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==n&&(r[n]=r[t]),n++);t!==n&&(r.length=n)}const ig=[["text",n9],["linkify",r9],["newline",o9],["escape",a9],["backticks",O9],["strikethrough",Cx.tokenize],["emphasis",Ax.tokenize],["link",f9],["image",d9],["autolink",m9],["html_inline",b9],["entity",P9]],rg=[["balance_pairs",k9],["strikethrough",Cx.postProcess],["emphasis",Ax.postProcess],["fragments_join",x9]];function es(){this.ruler=new mn;for(let e=0;e<ig.length;e++)this.ruler.push(ig[e][0],ig[e][1]);this.ruler2=new mn;for(let e=0;e<rg.length;e++)this.ruler2.push(rg[e][0],rg[e][1])}es.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),i=n.length,r=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let a=!1;if(e.level<r){for(let O=0;O<i;O++)if(e.level++,a=n[O](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos},es.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,i=e.posMax,r=e.md.options.maxNesting;for(;e.pos<i;){const o=e.pos;let a=!1;if(e.level<r){for(let O=0;O<n;O++)if(a=t[O](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},es.prototype.parse=function(e,t,n,i){const r=new this.State(e,t,n,i);this.tokenize(r);const o=this.ruler2.getRules(""),a=o.length;for(let O=0;O<a;O++)o[O](r)},es.prototype.State=Jl;function v9(e){const t={};e=e||{},t.src_Any=Sx.source,t.src_Cc=Px.source,t.src_Z=xx.source,t.src_P=Mm.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.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]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function og(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(i){e[i]=n[i]})}),e}function Dc(e){return Object.prototype.toString.call(e)}function w9(e){return Dc(e)==="[object String]"}function T9(e){return Dc(e)==="[object Object]"}function X9(e){return Dc(e)==="[object RegExp]"}function Ix(e){return Dc(e)==="[object Function]"}function _9(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Dx={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function R9(e){return Object.keys(e||{}).reduce(function(t,n){return t||Dx.hasOwnProperty(n)},!1)}const z9={"http:":{validate:function(e,t,n){const i=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const i=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(i)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const i=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},W9="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]",q9="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function U9(e){e.__index__=-1,e.__text_cache__=""}function Z9(e){return function(t,n){const i=t.slice(n);return e.test(i)?i.match(e)[0].length:0}}function Nx(){return function(e,t){t.normalize(e)}}function Nc(e){const t=e.re=v9(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(W9),n.push(t.src_xn),t.src_tlds=n.join("|");function i(O){return O.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");const r=[];e.__compiled__={};function o(O,l){throw new Error('(LinkifyIt) Invalid schema "'+O+'": '+l)}Object.keys(e.__schemas__).forEach(function(O){const l=e.__schemas__[O];if(l===null)return;const s={validate:null,link:null};if(e.__compiled__[O]=s,T9(l)){X9(l.validate)?s.validate=Z9(l.validate):Ix(l.validate)?s.validate=l.validate:o(O,l),Ix(l.normalize)?s.normalize=l.normalize:l.normalize?o(O,l):s.normalize=Nx();return}if(w9(l)){r.push(O);return}o(O,l)}),r.forEach(function(O){e.__compiled__[e.__schemas__[O]]&&(e.__compiled__[O].validate=e.__compiled__[e.__schemas__[O]].validate,e.__compiled__[O].normalize=e.__compiled__[e.__schemas__[O]].normalize)}),e.__compiled__[""]={validate:null,normalize:Nx()};const a=Object.keys(e.__compiled__).filter(function(O){return O.length>0&&e.__compiled__[O]}).map(_9).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","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"),U9(e)}function V9(e,t){const n=e.__index__,i=e.__last_index__,r=e.__text_cache__.slice(n,i);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=i+t,this.raw=r,this.text=r,this.url=r}function ag(e,t){const n=new V9(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Wn(e,t){if(!(this instanceof Wn))return new Wn(e,t);t||R9(e)&&(t=e,e={}),this.__opts__=og({},Dx,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=og({},z9,e),this.__compiled__={},this.__tlds__=q9,this.__tlds_replaced__=!1,this.re={},Nc(this)}Wn.prototype.add=function(t,n){return this.__schemas__[t]=n,Nc(this),this},Wn.prototype.set=function(t){return this.__opts__=og(this.__opts__,t),this},Wn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,i,r,o,a,O,l,s,u;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],l.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(s=t.search(this.re.host_fuzzy_test),s>=0&&(this.__index__<0||s<this.__index__)&&(i=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=i.index+i[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=t.indexOf("@"),u>=0&&(r=t.match(this.re.email_fuzzy))!==null&&(a=r.index+r[1].length,O=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&O>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=O))),this.__index__>=0},Wn.prototype.pretest=function(t){return this.re.pretest.test(t)},Wn.prototype.testSchemaAt=function(t,n,i){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,i,this):0},Wn.prototype.match=function(t){const n=[];let i=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(ag(this,i)),i=this.__last_index__);let r=i?t.slice(i):t;for(;this.test(r);)n.push(ag(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return n.length?n:null},Wn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const i=this.testSchemaAt(t,n[2],n[0].length);return i?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i,ag(this,0)):null},Wn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),Nc(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Nc(this),this)},Wn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},Wn.prototype.onCompile=function(){};const dO=2147483647,or=36,Og=1,ts=26,Y9=38,E9=700,Lx=72,Mx=128,Fx="-",C9=/^xn--/,j9=/[^\0-\x7F]/,A9=/[\x2E\u3002\uFF0E\uFF61]/g,G9={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},lg=or-Og,ar=Math.floor,sg=String.fromCharCode;function ao(e){throw new RangeError(G9[e])}function I9(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}function Bx(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(A9,".");const r=e.split("."),o=I9(r,t).join(".");return i+o}function Hx(e){const t=[];let n=0;const i=e.length;for(;n<i;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){const o=e.charCodeAt(n++);(o&64512)==56320?t.push(((r&1023)<<10)+(o&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}const D9=e=>String.fromCodePoint(...e),N9=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:or},Kx=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Jx=function(e,t,n){let i=0;for(e=n?ar(e/E9):e>>1,e+=ar(e/t);e>lg*ts>>1;i+=or)e=ar(e/lg);return ar(i+(lg+1)*e/(e+Y9))},ev=function(e){const t=[],n=e.length;let i=0,r=Mx,o=Lx,a=e.lastIndexOf(Fx);a<0&&(a=0);for(let O=0;O<a;++O)e.charCodeAt(O)>=128&&ao("not-basic"),t.push(e.charCodeAt(O));for(let O=a>0?a+1:0;O<n;){const l=i;for(let u=1,c=or;;c+=or){O>=n&&ao("invalid-input");const f=N9(e.charCodeAt(O++));f>=or&&ao("invalid-input"),f>ar((dO-i)/u)&&ao("overflow"),i+=f*u;const d=c<=o?Og:c>=o+ts?ts:c-o;if(f<d)break;const p=or-d;u>ar(dO/p)&&ao("overflow"),u*=p}const s=t.length+1;o=Jx(i-l,s,l==0),ar(i/s)>dO-r&&ao("overflow"),r+=ar(i/s),i%=s,t.splice(i++,0,r)}return String.fromCodePoint(...t)},tv=function(e){const t=[];e=Hx(e);const n=e.length;let i=Mx,r=0,o=Lx;for(const l of e)l<128&&t.push(sg(l));const a=t.length;let O=a;for(a&&t.push(Fx);O<n;){let l=dO;for(const u of e)u>=i&&u<l&&(l=u);const s=O+1;l-i>ar((dO-r)/s)&&ao("overflow"),r+=(l-i)*s,i=l;for(const u of e)if(u<i&&++r>dO&&ao("overflow"),u===i){let c=r;for(let f=or;;f+=or){const d=f<=o?Og:f>=o+ts?ts:f-o;if(c<d)break;const p=c-d,Q=or-d;t.push(sg(Kx(d+p%Q,0))),c=ar(p/Q)}t.push(sg(Kx(c,0))),o=Jx(r,s,O===a),r=0,++O}++r,++i}return t.join("")},nv={version:"2.3.1",ucs2:{decode:Hx,encode:D9},decode:ev,encode:tv,toASCII:function(e){return Bx(e,function(t){return j9.test(t)?"xn--"+tv(t):t})},toUnicode:function(e){return Bx(e,function(t){return C9.test(t)?ev(t.slice(4).toLowerCase()):t})}},L9={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{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"]}}},commonmark:{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"]}}}},M9=/^(vbscript|javascript|file|data):/,F9=/^data:image\/(gif|png|jpeg|webp);/;function B9(e){const t=e.trim().toLowerCase();return M9.test(t)?F9.test(t):!0}const iv=["http:","https:","mailto:"];function H9(e){const t=Lm(e,!0);if(t.hostname&&(!t.protocol||iv.indexOf(t.protocol)>=0))try{t.hostname=nv.toASCII(t.hostname)}catch{}return Fl(Nm(t))}function K9(e){const t=Lm(e,!0);if(t.hostname&&(!t.protocol||iv.indexOf(t.protocol)>=0))try{t.hostname=nv.toUnicode(t.hostname)}catch{}return sO(Nm(t),sO.defaultChars+"%")}function ii(e,t){if(!(this instanceof ii))return new ii(e,t);t||Hm(e)||(t=e||{},e="default"),this.inline=new es,this.block=new Ic,this.core=new eg,this.renderer=new cO,this.linkify=new Wn,this.validateLink=B9,this.normalizeLink=H9,this.normalizeLinkText=K9,this.utils=sC,this.helpers=Ec({},dC),this.options={},this.configure(e),t&&this.set(t)}ii.prototype.set=function(e){return Ec(this.options,e),this},ii.prototype.configure=function(e){const t=this;if(Hm(e)){const n=e;if(e=L9[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},ii.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},ii.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},ii.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},ii.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},ii.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},ii.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},ii.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const rv=new Set([!0,!1,"alt","title"]);function ov(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function av(e,t){e&&e.attrs&&(e.attrs=ov(e.attrs,t))}function J9(e,t){if(!rv.has(e))throw new TypeError(`figcaption must be one of: ${[...rv]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([i])=>i==="title");return Array.isArray(n)&&n[1]?(av(t,"title"),n[1]):void 0}function e8(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(n){let i=1;for(let r=1,o=n.tokens.length;r<o-1;++r){const a=n.tokens[r];if(a.type!=="inline"||!a.children||a.children.length!==1&&a.children.length!==3||a.children.length===1&&a.children[0].type!=="image")continue;if(a.children.length===3){const[s,u,c]=a.children;if(s.type!=="link_open"||u.type!=="image"||c.type!=="link_close")continue}if(r!==0&&n.tokens[r-1].type!=="paragraph_open"||r!==o-1&&n.tokens[r+1].type!=="paragraph_close")continue;const O=n.tokens[r-1];let l;if(O.type="figure_open",O.tag="figure",n.tokens[r+1].type="figure_close",n.tokens[r+1].tag="figure",t.dataType&&n.tokens[r-1].attrPush(["data-type","image"]),t.link&&a.children.length===1){[l]=a.children;const s=new n.Token("link_open","a",1);s.attrPush(["href",l.attrGet("src")]),a.children.unshift(s),a.children.push(new n.Token("link_close","a",-1))}if(l=a.children.length===1?a.children[0]:a.children[1],t.figcaption){const s=J9(t.figcaption,l);if(s){const[u]=e.parseInline(s,n.env);a.children.push(new n.Token("figcaption_open","figcaption",1)),a.children.push(...u.children),a.children.push(new n.Token("figcaption_close","figcaption",-1)),l.attrs&&(l.attrs=ov(l.attrs,"title"))}}if(t.copyAttrs&&l.attrs){const s=t.copyAttrs===!0?"":t.copyAttrs;O.attrs=l.attrs.filter(([u])=>u.match(s)).map(u=>Array.from(u))}if(t.tabindex&&(n.tokens[r-1].attrPush(["tabindex",i]),i++),t.lazy&&(l.attrs.some(([s])=>s==="loading")||l.attrs.push(["loading","lazy"])),t.async&&(l.attrs.some(([s])=>s==="decoding")||l.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let s=!1;for(let u=0,c=l.attrs.length;u<c&&!s;u++){const f=l.attrs[u];f[0]==="class"&&(f[1]=`${f[1]} ${t.classes}`,s=!0)}s||l.attrs.push(["class",t.classes])}if(t.removeSrc){const s=l.attrs.find(([u])=>u==="src");l.attrs.push(["data-src",s[1]]),av(l,"src")}}})}const t8=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function n8(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==126||t||i+2>=n)return!1;e.pos=i+1;let r=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===126){r=!0;break}e.md.inline.skipToken(e)}if(!r||i+1===e.pos)return e.pos=i,!1;const o=e.src.slice(i+1,e.pos);if(o.match(/(^|[^\\])(\\\\)*\s/))return e.pos=i,!1;e.posMax=e.pos,e.pos=i+1;const a=e.push("sub_open","sub",1);a.markup="~";const O=e.push("text","",0);O.content=o.replace(t8,"$1");const l=e.push("sub_close","sub",-1);return l.markup="~",e.pos=e.posMax+1,e.posMax=n,!0}function i8(e){e.inline.ruler.after("emphasis","sub",n8)}const r8=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function o8(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==94||t||i+2>=n)return!1;e.pos=i+1;let r=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){r=!0;break}e.md.inline.skipToken(e)}if(!r||i+1===e.pos)return e.pos=i,!1;const o=e.src.slice(i+1,e.pos);if(o.match(/(^|[^\\])(\\\\)*\s/))return e.pos=i,!1;e.posMax=e.pos,e.pos=i+1;const a=e.push("sup_open","sup",1);a.markup="^";const O=e.push("text","",0);O.content=o.replace(r8,"$1");const l=e.push("sup_close","sup",-1);return l.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function a8(e){e.inline.ruler.after("emphasis","sup",o8)}const O8=e=>{const t=m.inject("highlight"),n=m.shallowRef(ht.editorExtensions.highlight.instance);return m.onMounted(()=>{e.noHighlight||n.value||(Ln("link",{...t.value.css,rel:"stylesheet",id:un.hlcss}),Ln("script",{...t.value.js,id:un.hljs,onload(){n.value=window.hljs}},"hljs"))}),m.watch(()=>t.value.css,()=>{e.noHighlight||ht.editorExtensions.highlight.instance||Z5("link",{...t.value.css,rel:"stylesheet",id:un.hlcss})}),n},hO=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ov=new Set,ug=typeof process=="object"&&process?process:{},lv=(e,t,n,i)=>{typeof ug.emitWarning=="function"?ug.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)};let Lc=globalThis.AbortController,sv=globalThis.AbortSignal;if(typeof Lc>"u"){sv=class{constructor(){qe(this,"onabort");qe(this,"_onabort",[]);qe(this,"reason");qe(this,"aborted",!1)}addEventListener(i,r){this._onabort.push(r)}},Lc=class{constructor(){qe(this,"signal",new sv);t()}abort(i){var r,o;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const a of this.signal._onabort)a(i);(o=(r=this.signal).onabort)==null||o.call(r,i)}}};let e=((u5=ug.env)==null?void 0:u5.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const t=()=>{e&&(e=!1,lv("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}const l8=e=>!Ov.has(e),Oo=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),uv=e=>Oo(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Mc:null:null;class Mc extends Array{constructor(t){super(t),this.fill(0)}}const $a=class $a{constructor(t,n){qe(this,"heap");qe(this,"length");if(!_($a,YO))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){const n=uv(t);if(!n)return[];he($a,YO,!0);const i=new $a(t,n);return he($a,YO,!1),i}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}};YO=new WeakMap,Ue($a,YO,!1);let cg=$a;const ob=class ob{constructor(t){Ue(this,K);Ue(this,Wi);Ue(this,jn);Ue(this,qi);Ue(this,Ui);Ue(this,EO);Ue(this,CO);qe(this,"ttl");qe(this,"ttlResolution");qe(this,"ttlAutopurge");qe(this,"updateAgeOnGet");qe(this,"updateAgeOnHas");qe(this,"allowStale");qe(this,"noDisposeOnSet");qe(this,"noUpdateTTL");qe(this,"maxEntrySize");qe(this,"sizeCalculation");qe(this,"noDeleteOnFetchRejection");qe(this,"noDeleteOnStaleGet");qe(this,"allowStaleOnFetchAbort");qe(this,"allowStaleOnFetchRejection");qe(this,"ignoreFetchAbort");Ue(this,Rt);Ue(this,Zi);Ue(this,xt);Ue(this,et);Ue(this,Qe);Ue(this,ln);Ue(this,An);Ue(this,en);Ue(this,Vt);Ue(this,Vi);Ue(this,Yt);Ue(this,Yi);Ue(this,Ei);Ue(this,Gn);Ue(this,Ci);Ue(this,ko);Ue(this,sn);Ue(this,Qa,()=>{});Ue(this,Zr,()=>{});Ue(this,Hs,()=>{});Ue(this,In,()=>!1);Ue(this,ba,t=>{});Ue(this,jO,(t,n,i)=>{});Ue(this,Ks,(t,n,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});qe(this,c5,"LRUCache");const{max:n=0,ttl:i,ttlResolution:r=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:O,allowStale:l,dispose:s,disposeAfter:u,noDisposeOnSet:c,noUpdateTTL:f,maxSize:d=0,maxEntrySize:p=0,sizeCalculation:Q,fetchMethod:b,memoMethod:$,noDeleteOnFetchRejection:g,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:y,ignoreFetchAbort:T}=t;if(n!==0&&!Oo(n))throw new TypeError("max option must be a nonnegative integer");const v=n?uv(n):Array;if(!v)throw new Error("invalid max value: "+n);if(he(this,Wi,n),he(this,jn,d),this.maxEntrySize=p||_(this,jn),this.sizeCalculation=Q,this.sizeCalculation){if(!_(this,jn)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if($!==void 0&&typeof $!="function")throw new TypeError("memoMethod must be a function if defined");if(he(this,CO,$),b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(he(this,EO,b),he(this,ko,!!b),he(this,xt,new Map),he(this,et,new Array(n).fill(void 0)),he(this,Qe,new Array(n).fill(void 0)),he(this,ln,new v(n)),he(this,An,new v(n)),he(this,en,0),he(this,Vt,0),he(this,Vi,cg.create(n)),he(this,Rt,0),he(this,Zi,0),typeof s=="function"&&he(this,qi,s),typeof u=="function"?(he(this,Ui,u),he(this,Yt,[])):(he(this,Ui,void 0),he(this,Yt,void 0)),he(this,Ci,!!_(this,qi)),he(this,sn,!!_(this,Ui)),this.noDisposeOnSet=!!c,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!g,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!y,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(_(this,jn)!==0&&!Oo(_(this,jn)))throw new TypeError("maxSize must be a positive integer if specified");if(!Oo(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");oe(this,K,Q5).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!O,this.ttlResolution=Oo(r)||r===0?r:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!Oo(this.ttl))throw new TypeError("ttl must be a positive integer if specified");oe(this,K,ub).call(this)}if(_(this,Wi)===0&&this.ttl===0&&_(this,jn)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!_(this,Wi)&&!_(this,jn)){const w="LRU_CACHE_UNBOUNDED";l8(w)&&(Ov.add(w),lv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",w,ob))}}static unsafeExposeInternals(t){return{starts:_(t,Ei),ttls:_(t,Gn),sizes:_(t,Yi),keyMap:_(t,xt),keyList:_(t,et),valList:_(t,Qe),next:_(t,ln),prev:_(t,An),get head(){return _(t,en)},get tail(){return _(t,Vt)},free:_(t,Vi),isBackgroundFetch:n=>{var i;return oe(i=t,K,tt).call(i,n)},backgroundFetch:(n,i,r,o)=>{var a;return oe(a=t,K,rh).call(a,n,i,r,o)},moveToTail:n=>{var i;return oe(i=t,K,Ou).call(i,n)},indexes:n=>{var i;return oe(i=t,K,wo).call(i,n)},rindexes:n=>{var i;return oe(i=t,K,To).call(i,n)},isStale:n=>{var i;return _(i=t,In).call(i,n)}}}get max(){return _(this,Wi)}get maxSize(){return _(this,jn)}get calculatedSize(){return _(this,Zi)}get size(){return _(this,Rt)}get fetchMethod(){return _(this,EO)}get memoMethod(){return _(this,CO)}get dispose(){return _(this,qi)}get disposeAfter(){return _(this,Ui)}getRemainingTTL(t){return _(this,xt).has(t)?1/0:0}*entries(){for(const t of oe(this,K,wo).call(this))_(this,Qe)[t]!==void 0&&_(this,et)[t]!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield[_(this,et)[t],_(this,Qe)[t]])}*rentries(){for(const t of oe(this,K,To).call(this))_(this,Qe)[t]!==void 0&&_(this,et)[t]!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield[_(this,et)[t],_(this,Qe)[t]])}*keys(){for(const t of oe(this,K,wo).call(this)){const n=_(this,et)[t];n!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield n)}}*rkeys(){for(const t of oe(this,K,To).call(this)){const n=_(this,et)[t];n!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield n)}}*values(){for(const t of oe(this,K,wo).call(this))_(this,Qe)[t]!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield _(this,Qe)[t])}*rvalues(){for(const t of oe(this,K,To).call(this))_(this,Qe)[t]!==void 0&&!oe(this,K,tt).call(this,_(this,Qe)[t])&&(yield _(this,Qe)[t])}[(f5=Symbol.iterator,c5=Symbol.toStringTag,f5)](){return this.entries()}find(t,n={}){for(const i of oe(this,K,wo).call(this)){const r=_(this,Qe)[i],o=oe(this,K,tt).call(this,r)?r.__staleWhileFetching:r;if(o!==void 0&&t(o,_(this,et)[i],this))return this.get(_(this,et)[i],n)}}forEach(t,n=this){for(const i of oe(this,K,wo).call(this)){const r=_(this,Qe)[i],o=oe(this,K,tt).call(this,r)?r.__staleWhileFetching:r;o!==void 0&&t.call(n,o,_(this,et)[i],this)}}rforEach(t,n=this){for(const i of oe(this,K,To).call(this)){const r=_(this,Qe)[i],o=oe(this,K,tt).call(this,r)?r.__staleWhileFetching:r;o!==void 0&&t.call(n,o,_(this,et)[i],this)}}purgeStale(){let t=!1;for(const n of oe(this,K,To).call(this,{allowStale:!0}))_(this,In).call(this,n)&&(oe(this,K,Xo).call(this,_(this,et)[n],"expire"),t=!0);return t}info(t){const n=_(this,xt).get(t);if(n===void 0)return;const i=_(this,Qe)[n],r=oe(this,K,tt).call(this,i)?i.__staleWhileFetching:i;if(r===void 0)return;const o={value:r};if(_(this,Gn)&&_(this,Ei)){const a=_(this,Gn)[n],O=_(this,Ei)[n];if(a&&O){const l=a-(hO.now()-O);o.ttl=l,o.start=Date.now()}}return _(this,Yi)&&(o.size=_(this,Yi)[n]),o}dump(){const t=[];for(const n of oe(this,K,wo).call(this,{allowStale:!0})){const i=_(this,et)[n],r=_(this,Qe)[n],o=oe(this,K,tt).call(this,r)?r.__staleWhileFetching:r;if(o===void 0||i===void 0)continue;const a={value:o};if(_(this,Gn)&&_(this,Ei)){a.ttl=_(this,Gn)[n];const O=hO.now()-_(this,Ei)[n];a.start=Math.floor(Date.now()-O)}_(this,Yi)&&(a.size=_(this,Yi)[n]),t.unshift([i,a])}return t}load(t){this.clear();for(const[n,i]of t){if(i.start){const r=Date.now()-i.start;i.start=hO.now()-r}this.set(n,i.value,i)}}set(t,n,i={}){var f,d,p,Q,b;if(n===void 0)return this.delete(t),this;const{ttl:r=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:O=this.sizeCalculation,status:l}=i;let{noUpdateTTL:s=this.noUpdateTTL}=i;const u=_(this,Ks).call(this,t,n,i.size||0,O);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),oe(this,K,Xo).call(this,t,"set"),this;let c=_(this,Rt)===0?void 0:_(this,xt).get(t);if(c===void 0)c=_(this,Rt)===0?_(this,Vt):_(this,Vi).length!==0?_(this,Vi).pop():_(this,Rt)===_(this,Wi)?oe(this,K,ih).call(this,!1):_(this,Rt),_(this,et)[c]=t,_(this,Qe)[c]=n,_(this,xt).set(t,c),_(this,ln)[_(this,Vt)]=c,_(this,An)[c]=_(this,Vt),he(this,Vt,c),nh(this,Rt)._++,_(this,jO).call(this,c,u,l),l&&(l.set="add"),s=!1;else{oe(this,K,Ou).call(this,c);const $=_(this,Qe)[c];if(n!==$){if(_(this,ko)&&oe(this,K,tt).call(this,$)){$.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:g}=$;g!==void 0&&!a&&(_(this,Ci)&&((f=_(this,qi))==null||f.call(this,g,t,"set")),_(this,sn)&&((d=_(this,Yt))==null||d.push([g,t,"set"])))}else a||(_(this,Ci)&&((p=_(this,qi))==null||p.call(this,$,t,"set")),_(this,sn)&&((Q=_(this,Yt))==null||Q.push([$,t,"set"])));if(_(this,ba).call(this,c),_(this,jO).call(this,c,u,l),_(this,Qe)[c]=n,l){l.set="replace";const g=$&&oe(this,K,tt).call(this,$)?$.__staleWhileFetching:$;g!==void 0&&(l.oldValue=g)}}else l&&(l.set="update")}if(r!==0&&!_(this,Gn)&&oe(this,K,ub).call(this),_(this,Gn)&&(s||_(this,Hs).call(this,c,r,o),l&&_(this,Zr).call(this,l,c)),!a&&_(this,sn)&&_(this,Yt)){const $=_(this,Yt);let g;for(;g=$==null?void 0:$.shift();)(b=_(this,Ui))==null||b.call(this,...g)}return this}pop(){var t;try{for(;_(this,Rt);){const n=_(this,Qe)[_(this,en)];if(oe(this,K,ih).call(this,!0),oe(this,K,tt).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(_(this,sn)&&_(this,Yt)){const n=_(this,Yt);let i;for(;i=n==null?void 0:n.shift();)(t=_(this,Ui))==null||t.call(this,...i)}}}has(t,n={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=n,o=_(this,xt).get(t);if(o!==void 0){const a=_(this,Qe)[o];if(oe(this,K,tt).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(_(this,In).call(this,o))r&&(r.has="stale",_(this,Zr).call(this,r,o));else return i&&_(this,Qa).call(this,o),r&&(r.has="hit",_(this,Zr).call(this,r,o)),!0}else r&&(r.has="miss");return!1}peek(t,n={}){const{allowStale:i=this.allowStale}=n,r=_(this,xt).get(t);if(r===void 0||!i&&_(this,In).call(this,r))return;const o=_(this,Qe)[r];return oe(this,K,tt).call(this,o)?o.__staleWhileFetching:o}async fetch(t,n={}){const{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:O=this.noDisposeOnSet,size:l=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:Q,forceRefresh:b=!1,status:$,signal:g}=n;if(!_(this,ko))return $&&($.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:o,status:$});const S={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:O,size:l,sizeCalculation:s,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:$,signal:g};let k=_(this,xt).get(t);if(k===void 0){$&&($.fetch="miss");const y=oe(this,K,rh).call(this,t,k,S,Q);return y.__returned=y}else{const y=_(this,Qe)[k];if(oe(this,K,tt).call(this,y)){const U=i&&y.__staleWhileFetching!==void 0;return $&&($.fetch="inflight",U&&($.returnedStale=!0)),U?y.__staleWhileFetching:y.__returned=y}const T=_(this,In).call(this,k);if(!b&&!T)return $&&($.fetch="hit"),oe(this,K,Ou).call(this,k),r&&_(this,Qa).call(this,k),$&&_(this,Zr).call(this,$,k),y;const v=oe(this,K,rh).call(this,t,k,S,Q),x=v.__staleWhileFetching!==void 0&&i;return $&&($.fetch=T?"stale":"refresh",x&&T&&($.returnedStale=!0)),x?v.__staleWhileFetching:v.__returned=v}}async forceFetch(t,n={}){const i=await this.fetch(t,n);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,n={}){const i=_(this,CO);if(!i)throw new Error("no memoMethod provided to constructor");const{context:r,forceRefresh:o,...a}=n,O=this.get(t,a);if(!o&&O!==void 0)return O;const l=i(t,O,{options:a,context:r});return this.set(t,l,a),l}get(t,n={}){const{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=n,O=_(this,xt).get(t);if(O!==void 0){const l=_(this,Qe)[O],s=oe(this,K,tt).call(this,l);return a&&_(this,Zr).call(this,a,O),_(this,In).call(this,O)?(a&&(a.get="stale"),s?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(o||oe(this,K,Xo).call(this,t,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),s?l.__staleWhileFetching:(oe(this,K,Ou).call(this,O),r&&_(this,Qa).call(this,O),l))}else a&&(a.get="miss")}delete(t){return oe(this,K,Xo).call(this,t,"delete")}clear(){return oe(this,K,db).call(this,"delete")}};Wi=new WeakMap,jn=new WeakMap,qi=new WeakMap,Ui=new WeakMap,EO=new WeakMap,CO=new WeakMap,Rt=new WeakMap,Zi=new WeakMap,xt=new WeakMap,et=new WeakMap,Qe=new WeakMap,ln=new WeakMap,An=new WeakMap,en=new WeakMap,Vt=new WeakMap,Vi=new WeakMap,Yt=new WeakMap,Yi=new WeakMap,Ei=new WeakMap,Gn=new WeakMap,Ci=new WeakMap,ko=new WeakMap,sn=new WeakMap,K=new WeakSet,ub=function(){const t=new Mc(_(this,Wi)),n=new Mc(_(this,Wi));he(this,Gn,t),he(this,Ei,n),he(this,Hs,(o,a,O=hO.now())=>{if(n[o]=a!==0?O:0,t[o]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{_(this,In).call(this,o)&&oe(this,K,Xo).call(this,_(this,et)[o],"expire")},a+1);l.unref&&l.unref()}}),he(this,Qa,o=>{n[o]=t[o]!==0?hO.now():0}),he(this,Zr,(o,a)=>{if(t[a]){const O=t[a],l=n[a];if(!O||!l)return;o.ttl=O,o.start=l,o.now=i||r();const s=o.now-l;o.remainingTTL=O-s}});let i=0;const r=()=>{const o=hO.now();if(this.ttlResolution>0){i=o;const a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return o};this.getRemainingTTL=o=>{const a=_(this,xt).get(o);if(a===void 0)return 0;const O=t[a],l=n[a];if(!O||!l)return 1/0;const s=(i||r())-l;return O-s},he(this,In,o=>{const a=n[o],O=t[o];return!!O&&!!a&&(i||r())-a>O})},Qa=new WeakMap,Zr=new WeakMap,Hs=new WeakMap,In=new WeakMap,Q5=function(){const t=new Mc(_(this,Wi));he(this,Zi,0),he(this,Yi,t),he(this,ba,n=>{he(this,Zi,_(this,Zi)-t[n]),t[n]=0}),he(this,Ks,(n,i,r,o)=>{if(oe(this,K,tt).call(this,i))return 0;if(!Oo(r))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(r=o(i,n),!Oo(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r}),he(this,jO,(n,i,r)=>{if(t[n]=i,_(this,jn)){const o=_(this,jn)-t[n];for(;_(this,Zi)>o;)oe(this,K,ih).call(this,!0)}he(this,Zi,_(this,Zi)+t[n]),r&&(r.entrySize=i,r.totalCalculatedSize=_(this,Zi))})},ba=new WeakMap,jO=new WeakMap,Ks=new WeakMap,wo=function*({allowStale:t=this.allowStale}={}){if(_(this,Rt))for(let n=_(this,Vt);!(!oe(this,K,cb).call(this,n)||((t||!_(this,In).call(this,n))&&(yield n),n===_(this,en)));)n=_(this,An)[n]},To=function*({allowStale:t=this.allowStale}={}){if(_(this,Rt))for(let n=_(this,en);!(!oe(this,K,cb).call(this,n)||((t||!_(this,In).call(this,n))&&(yield n),n===_(this,Vt)));)n=_(this,ln)[n]},cb=function(t){return t!==void 0&&_(this,xt).get(_(this,et)[t])===t},ih=function(t){var o,a;const n=_(this,en),i=_(this,et)[n],r=_(this,Qe)[n];return _(this,ko)&&oe(this,K,tt).call(this,r)?r.__abortController.abort(new Error("evicted")):(_(this,Ci)||_(this,sn))&&(_(this,Ci)&&((o=_(this,qi))==null||o.call(this,r,i,"evict")),_(this,sn)&&((a=_(this,Yt))==null||a.push([r,i,"evict"]))),_(this,ba).call(this,n),t&&(_(this,et)[n]=void 0,_(this,Qe)[n]=void 0,_(this,Vi).push(n)),_(this,Rt)===1?(he(this,en,he(this,Vt,0)),_(this,Vi).length=0):he(this,en,_(this,ln)[n]),_(this,xt).delete(i),nh(this,Rt)._--,n},rh=function(t,n,i,r){const o=n===void 0?void 0:_(this,Qe)[n];if(oe(this,K,tt).call(this,o))return o;const a=new Lc,{signal:O}=i;O==null||O.addEventListener("abort",()=>a.abort(O.reason),{signal:a.signal});const l={signal:a.signal,options:i,context:r},s=(Q,b=!1)=>{const{aborted:$}=a.signal,g=i.ignoreFetchAbort&&Q!==void 0;if(i.status&&($&&!b?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,g&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),$&&!g&&!b)return c(a.signal.reason);const S=d;return _(this,Qe)[n]===d&&(Q===void 0?S.__staleWhileFetching?_(this,Qe)[n]=S.__staleWhileFetching:oe(this,K,Xo).call(this,t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,Q,l.options))),Q},u=Q=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=Q),c(Q)),c=Q=>{const{aborted:b}=a.signal,$=b&&i.allowStaleOnFetchAbort,g=$||i.allowStaleOnFetchRejection,S=g||i.noDeleteOnFetchRejection,k=d;if(_(this,Qe)[n]===d&&(!S||k.__staleWhileFetching===void 0?oe(this,K,Xo).call(this,t,"fetch"):$||(_(this,Qe)[n]=k.__staleWhileFetching)),g)return i.status&&k.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw Q},f=(Q,b)=>{var g;const $=(g=_(this,EO))==null?void 0:g.call(this,t,o,l);$&&$ instanceof Promise&&$.then(S=>Q(S===void 0?void 0:S),b),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(Q(void 0),i.allowStaleOnFetchAbort&&(Q=S=>s(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);const d=new Promise(f).then(s,u),p=Object.assign(d,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return n===void 0?(this.set(t,p,{...l.options,status:void 0}),n=_(this,xt).get(t)):_(this,Qe)[n]=p,p},tt=function(t){if(!_(this,ko))return!1;const n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Lc},fb=function(t,n){_(this,An)[n]=t,_(this,ln)[t]=n},Ou=function(t){t!==_(this,Vt)&&(t===_(this,en)?he(this,en,_(this,ln)[t]):oe(this,K,fb).call(this,_(this,An)[t],_(this,ln)[t]),oe(this,K,fb).call(this,_(this,Vt),t),he(this,Vt,t))},Xo=function(t,n){var r,o,a,O;let i=!1;if(_(this,Rt)!==0){const l=_(this,xt).get(t);if(l!==void 0)if(i=!0,_(this,Rt)===1)oe(this,K,db).call(this,n);else{_(this,ba).call(this,l);const s=_(this,Qe)[l];if(oe(this,K,tt).call(this,s)?s.__abortController.abort(new Error("deleted")):(_(this,Ci)||_(this,sn))&&(_(this,Ci)&&((r=_(this,qi))==null||r.call(this,s,t,n)),_(this,sn)&&((o=_(this,Yt))==null||o.push([s,t,n]))),_(this,xt).delete(t),_(this,et)[l]=void 0,_(this,Qe)[l]=void 0,l===_(this,Vt))he(this,Vt,_(this,An)[l]);else if(l===_(this,en))he(this,en,_(this,ln)[l]);else{const u=_(this,An)[l];_(this,ln)[u]=_(this,ln)[l];const c=_(this,ln)[l];_(this,An)[c]=_(this,An)[l]}nh(this,Rt)._--,_(this,Vi).push(l)}}if(_(this,sn)&&((a=_(this,Yt))!=null&&a.length)){const l=_(this,Yt);let s;for(;s=l==null?void 0:l.shift();)(O=_(this,Ui))==null||O.call(this,...s)}return i},db=function(t){var n,i,r;for(const o of oe(this,K,To).call(this,{allowStale:!0})){const a=_(this,Qe)[o];if(oe(this,K,tt).call(this,a))a.__abortController.abort(new Error("deleted"));else{const O=_(this,et)[o];_(this,Ci)&&((n=_(this,qi))==null||n.call(this,a,O,t)),_(this,sn)&&((i=_(this,Yt))==null||i.push([a,O,t]))}}if(_(this,xt).clear(),_(this,Qe).fill(void 0),_(this,et).fill(void 0),_(this,Gn)&&_(this,Ei)&&(_(this,Gn).fill(0),_(this,Ei).fill(0)),_(this,Yi)&&_(this,Yi).fill(0),he(this,en,0),he(this,Vt,0),_(this,Vi).length=0,he(this,Zi,0),he(this,Rt,0),_(this,sn)&&_(this,Yt)){const o=_(this,Yt);let a;for(;a=o==null?void 0:o.shift();)(r=_(this,Ui))==null||r.call(this,...a)}};let fg=ob;const Fc=new fg({max:1e3,ttl:6e5}),s8=e=>{const t=m.inject("theme"),n=m.inject("rootRef"),{editorExtensions:i,editorExtensionsAttrs:r,mermaidConfig:o}=ht,a=m.shallowRef(i.mermaid.instance),O=m.shallowRef(-1),l=()=>{const u=a.value;!e.noMermaid&&u&&(u.initialize(o({startOnLoad:!1,theme:t.value==="dark"?"dark":"default"})),O.value=O.value+1)};return m.watch(()=>t.value,()=>{Fc.clear(),l()}),m.onMounted(()=>{var c,f;if(e.noMermaid||a.value)return;const u=i.mermaid.js;/\.mjs/.test(u)?(Ln("link",{...(c=r.mermaid)==null?void 0:c.js,rel:"modulepreload",href:u,id:un.mermaidM}),import(u).then(d=>{a.value=d.default,l()})):Ln("script",{...(f=r.mermaid)==null?void 0:f.js,src:u,id:un.mermaid,onload(){a.value=window.mermaid,l()}},"mermaid")}),{mermaidRef:a,reRenderRef:O,replaceMermaid:async()=>{if(!e.noMermaid&&a.value){const u=n.value.querySelectorAll(`div.${z}-mermaid`),c=document.createElement("div"),f=document.body.offsetWidth>1366?document.body.offsetWidth:1366,d=document.body.offsetHeight>768?document.body.offsetHeight:768;c.style.width=f+"px",c.style.height=d+"px",c.style.position="fixed",c.style.zIndex="-10000",c.style.top="-10000";let p=u.length;p>0&&document.body.appendChild(c),await Promise.allSettled(Array.from(u).map(Q=>(async $=>{var S;let g=Fc.get($.innerText);if(!g){const k=Oh();let y={svg:""};try{y=await a.value.render(k,$.innerText,c),g=await e.sanitizeMermaid(y.svg);const T=document.createElement("p");T.className=`${z}-mermaid`,T.setAttribute("data-processed",""),T.innerHTML=g,(S=T.children[0])==null||S.removeAttribute("height"),Fc.set($.innerText,T.innerHTML),$.dataset.line!==void 0&&(T.dataset.line=$.dataset.line),$.replaceWith(T)}catch{}--p===0&&c.remove()}})(Q)))}}}},u8=e=>{const t=m.shallowRef(ht.editorExtensions.katex.instance);return m.onMounted(()=>{if(e.noKatex||t.value)return;const{editorExtensions:n}=ht;Ln("script",{src:n.katex.js,id:un.katexjs,onload(){t.value=window.katex}},"katex"),Ln("link",{rel:"stylesheet",href:n.katex.css,id:un.katexcss})}),t},c8=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(i,r,o,a,O)=>{const l=i[r],s=l.content.trim();if(l.info==="mermaid"){let u;i[r].map&&i[r].level===0&&(u=i[r].map[0],i[r].attrSet("data-line",String(u)));const c=Fc.get(s);return c?`<p class="${z}-mermaid" ${u!==void 0?"data-line="+u:""} data-processed>${c}</p>`:`<div class="${z}-mermaid" ${u!==void 0?"data-line="+u:""} data-mermaid-theme=${t.themeRef.value}>${s}</div>`}return n(i,r,o,a,O)}},Bc=(e,t)=>{const n=e.attrs?e.attrs.slice():[];return t.forEach(i=>{const r=e.attrIndex(i[0]);r<0?n.push(i):(n[r]=n[r].slice(),n[r][1]+=` ${i[1]}`)}),n},f8=(e,t)=>{const n=[{open:"$$",close:"$$"},{open:"$",close:"$"},{open:"\\[",close:"\\]"},{open:"\\(",close:"\\)"}];let i,r,o;for(const a of n)if(e.src.startsWith(a.open,e.pos)){const O=e.pos+a.open.length;for(i=O;(i=e.src.indexOf(a.close,i))!==-1;){for(o=i-1;e.src[o]==="\\";)o-=1;if((i-o)%2===1)break;i+=a.close.length}if(i===-1)return t||(e.pending+=a.open),e.pos=O,!0;if(i-O===0)return t||(e.pending+=a.open+a.close),e.pos=O+a.close.length,!0;if(!t){const l=e.src.slice(O,i);r=e.push("math_inline","math",0),r.markup=a.open,r.content=l}return e.pos=i+a.close.length,!0}return!1},d8=(e,t,n,i)=>{const r=[{open:"$$",close:"$$"},{open:"\\[",close:"\\]"}];let o,a,O,l,s=!1,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];for(const f of r){if(u+f.open.length>c||e.src.slice(u,u+f.open.length)!==f.open)continue;if(u+=f.open.length,o=e.src.slice(u,c),i)return!0;for(o.trim().slice(-f.close.length)===f.close&&(o=o.trim().slice(0,-f.close.length),s=!0),O=t;!s&&(O++,!(O>=n||(u=e.bMarks[O]+e.tShift[O],c=e.eMarks[O],u<c&&e.tShift[O]<e.blkIndent)));)e.src.slice(u,c).trim().slice(-f.close.length)===f.close&&(l=e.src.slice(0,c).lastIndexOf(f.close),a=e.src.slice(u,l),s=!0);e.line=O+1;const d=e.push("math_block","math",0);return d.block=!0,d.content=(o&&o.trim()?o+`
300
300
  `:"")+e.getLines(t+1,O,e.tShift[t],!0)+(a&&a.trim()?a:""),d.map=[t,e.line],d.markup=f.open,!0}return!1},h8=(e,{katexRef:t})=>{const n=(r,o,a,O,l)=>{const s=r[o],u={attrs:Bc(s,[["class",`${z}-katex-inline`]])};if(t.value){const c=t.value.renderToString(s.content,ht.katexConfig({throwOnError:!1}));return`<span ${l.renderAttrs(u)} data-processed>${c}</span>`}else return`<span ${l.renderAttrs(u)}>${s.content}</span>`},i=(r,o,a,O,l)=>{const s=r[o],u={attrs:Bc(s,[["class",`${z}-katex-block`]])};if(t.value){const c=t.value.renderToString(s.content,ht.katexConfig({throwOnError:!1,displayMode:!0}));return`<p ${l.renderAttrs(u)} data-processed>${c}</p>`}else return`<p ${l.renderAttrs(u)}>${s.content}</p>`};e.inline.ruler.before("escape","math_inline",f8),e.block.ruler.after("blockquote","math_block",d8,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i},p8=(e,t)=>{t=t||{};const n=3,i=t.marker||"!",r=i.charCodeAt(0),o=i.length;let a="",O="";const l=(u,c,f,d,p)=>{const Q=u[c];return Q.type==="admonition_open"?u[c].attrPush(["class",`${z}-admonition ${z}-admonition-${Q.info}`]):Q.type==="admonition_title_open"&&u[c].attrPush(["class",`${z}-admonition-title`]),p.renderToken(u,c,f)},s=u=>{const c=u.trim().split(" ",2);O="",a=c[0],c.length>1&&(O=u.substring(a.length+2))};e.block.ruler.before("code","admonition",(u,c,f,d)=>{let p,Q,b,$=!1,g=u.bMarks[c]+u.tShift[c],S=u.eMarks[c];if(r!==u.src.charCodeAt(g))return!1;for(p=g+1;p<=S&&i[(p-g)%o]===u.src[p];p++);const k=Math.floor((p-g)/o);if(k!==n)return!1;p-=(p-g)%o;const y=u.src.slice(g,p),T=u.src.slice(p,S);if(s(T),d)return!0;for(Q=c;Q++,!(Q>=f||(g=u.bMarks[Q]+u.tShift[Q],S=u.eMarks[Q],g<S&&u.sCount[Q]<u.blkIndent));)if(r===u.src.charCodeAt(g)&&!(u.sCount[Q]-u.blkIndent>=4)){for(p=g+1;p<=S&&i[(p-g)%o]===u.src[p];p++);if(!(Math.floor((p-g)/o)<k)&&(p-=(p-g)%o,p=u.skipSpaces(p),!(p<S))){$=!0;break}}const v=u.parentType,w=u.lineMax;return u.parentType="root",u.lineMax=Q,b=u.push("admonition_open","div",1),b.markup=y,b.block=!0,b.info=a,b.map=[c,Q],O&&(b=u.push("admonition_title_open","p",1),b.markup=y+" "+a,b.map=[c,Q],b=u.push("inline","",0),b.content=O,b.map=[c,u.line-1],b.children=[],b=u.push("admonition_title_close","p",-1),b.markup=y+" "+a),u.md.block.tokenize(u,c+1,Q),b=u.push("admonition_close","div",-1),b.markup=u.src.slice(g,p),b.block=!0,u.parentType=v,u.lineMax=w,u.line=Q+($?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=l,e.renderer.rules.admonition_title_open=l,e.renderer.rules.admonition_title_close=l,e.renderer.rules.admonition_close=l},m8=(e,t)=>{e.renderer.rules.heading_open=(n,i)=>{var O;const r=n[i],o=((O=n[i+1].children)==null?void 0:O.reduce((l,s)=>l+(["text","code_inline","math_inline"].includes(s.type)&&s.content||""),""))||"",a=r.markup.length;return t.headsRef.value.push({text:o,level:a}),r.map&&r.level===0&&r.attrSet("id",t.mdHeadingId(o,a,t.headsRef.value.length)),e.renderer.renderToken(n,i,t)},e.renderer.rules.heading_close=(n,i,r,o,a)=>a.renderToken(n,i,r)},g8={copy:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy ${z}-icon"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`,"collapse-tips":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-chevron-left ${z}-icon"><circle cx="12" cy="12" r="10"/><path d="m14 16-4-4 4-4"/></svg>`},cv=(e,t)=>typeof t[e]=="string"?t[e]:g8[e],$8=(e,t)=>{const n=e.renderer.rules.fence,i=e.utils.unescapeAll,r=/\[(\w*)(?::([\w ]*))?\]/,o=/::(open|close)/,a=c=>c.info?i(c.info).trim():"",O=c=>{const f=a(c),[d=null,p=""]=(r.exec(f)||[]).slice(1);return[d,p]},l=c=>{const f=a(c);return f?f.split(/(\s+)/g)[0]:""},s=c=>{const f=c.info.match(o)||[],d=f[1]==="open"||f[1]!=="close"&&t.codeFoldable&&c.content.trim().split(`
301
301
  `).length<t.autoFoldThreshold,p=f[1]||t.codeFoldable?"details":"div",Q=f[1]||t.codeFoldable?"summary":"div";return{open:d,tagContainer:p,tagHeader:Q}},u=(c,f,d,p,Q)=>{var Y;if(c[f].hidden)return"";const b=(Y=t.usedLanguageTextRef.value)==null?void 0:Y.copyCode.text,$=t.customIconRef.value.copy||b,g=!!t.customIconRef.value.copy,S=`<span class="${z}-collapse-tips">${cv("collapse-tips",t.customIconRef.value)}</span>`,[k]=O(c[f]);if(k===null){const{open:I,tagContainer:N,tagHeader:A}=s(c[f]),L=[["class",`${z}-code`]];I&&L.push(["open",""]);const ee={attrs:Bc(c[f],L)};c[f].info=c[f].info.replace(o,"");const se=n(c,f,d,p,Q);return`
302
302
  <${N} ${Q.renderAttrs(ee)}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md-editor-v3",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "vue",