nadesiko3 3.7.2 → 3.7.4

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.
Files changed (159) hide show
  1. package/batch/command.txt +472 -469
  2. package/batch/pickup_command.nako3 +1 -1
  3. package/core/.eslintrc.cjs +10 -3
  4. package/core/package-lock.json +1184 -645
  5. package/core/package.json +4 -5
  6. package/core/src/nako3.mjs +8 -6
  7. package/core/src/nako3.mts +19 -16
  8. package/core/src/nako_ast.mts +2 -3
  9. package/core/src/nako_core_version.mjs +2 -2
  10. package/core/src/nako_core_version.mts +2 -2
  11. package/core/src/nako_csv.mjs +1 -0
  12. package/core/src/nako_csv.mts +3 -2
  13. package/core/src/nako_from_dncl.mjs +1 -1
  14. package/core/src/nako_from_dncl.mts +1 -1
  15. package/core/src/nako_from_dncl2.mjs +1 -1
  16. package/core/src/nako_from_dncl2.mts +2 -2
  17. package/core/src/nako_gen.mjs +37 -35
  18. package/core/src/nako_gen.mts +70 -67
  19. package/core/src/nako_global.mjs +3 -2
  20. package/core/src/nako_global.mts +3 -2
  21. package/core/src/nako_lexer.mjs +3 -3
  22. package/core/src/nako_lexer.mts +3 -3
  23. package/core/src/nako_logger.mjs +1 -1
  24. package/core/src/nako_logger.mts +2 -2
  25. package/core/src/nako_parser3.mjs +67 -59
  26. package/core/src/nako_parser3.mts +96 -90
  27. package/core/src/nako_parser_base.mts +3 -3
  28. package/core/src/nako_prepare.mjs +1 -1
  29. package/core/src/nako_prepare.mts +1 -1
  30. package/core/src/nako_source_mapping.mts +0 -1
  31. package/core/src/nako_token.mts +8 -8
  32. package/core/src/nako_types.mts +1 -1
  33. package/core/src/plugin_api.mts +1 -1
  34. package/core/src/plugin_csv.mjs +1 -0
  35. package/core/src/plugin_csv.mts +2 -1
  36. package/core/src/plugin_math.mjs +2 -2
  37. package/core/src/plugin_math.mts +3 -3
  38. package/core/src/plugin_promise.mjs +1 -1
  39. package/core/src/plugin_promise.mts +1 -1
  40. package/core/src/plugin_system.mjs +117 -40
  41. package/core/src/plugin_system.mts +132 -58
  42. package/core/src/plugin_test.mjs +3 -1
  43. package/core/src/plugin_test.mts +3 -1
  44. package/core/test/basic_test.mjs +16 -0
  45. package/core/test/calc_test.mjs +7 -0
  46. package/core/test/plugin_system_test.mjs +33 -0
  47. package/doc/files.md +4 -4
  48. package/doc/plugins.md +1 -1
  49. package/package.json +9 -9
  50. package/release/_hash.txt +36 -121
  51. package/release/_script-tags.txt +16 -33
  52. package/release/command.json +1 -1
  53. package/release/command.json.js +1 -1
  54. package/release/command_cnako3.json +1 -1
  55. package/release/command_list.json +1 -1
  56. package/release/edit_main.js +3 -3
  57. package/release/edit_main.js.map +2 -2
  58. package/release/editor.js +3 -3
  59. package/release/plugin_markup.js +53 -53
  60. package/release/plugin_markup.js.map +3 -3
  61. package/release/plugin_weykturtle3d.js +1 -1
  62. package/release/plugin_weykturtle3d.js.map +4 -4
  63. package/release/version.js +3 -3
  64. package/release/version_main.js +3 -3
  65. package/release/version_main.js.map +2 -2
  66. package/release/wnako3.js +66 -66
  67. package/release/wnako3.js.map +3 -3
  68. package/release/wnako3webworker.js +58 -58
  69. package/release/wnako3webworker.js.map +3 -3
  70. package/src/browsers.txt +30 -20
  71. package/src/cnako3mod.mjs +19 -18
  72. package/src/cnako3mod.mts +17 -16
  73. package/src/deno_wrapper.mjs +6 -6
  74. package/src/deno_wrapper.mts +11 -11
  75. package/src/nako_version.mjs +2 -2
  76. package/src/nako_version.mts +2 -2
  77. package/src/plugin_browser.mjs +2 -2
  78. package/src/plugin_browser.mts +5 -5
  79. package/src/plugin_browser_ajax.mjs +2 -2
  80. package/src/plugin_browser_ajax.mts +2 -2
  81. package/src/plugin_browser_api.mts +0 -1
  82. package/src/plugin_browser_crypto.mjs +8 -8
  83. package/src/plugin_browser_crypto.mts +13 -13
  84. package/src/plugin_browser_dom_basic.mjs +3 -3
  85. package/src/plugin_browser_dom_basic.mts +5 -7
  86. package/src/plugin_browser_dom_event.mjs +1 -1
  87. package/src/plugin_browser_dom_event.mts +2 -1
  88. package/src/plugin_browser_dom_parts.mjs +33 -18
  89. package/src/plugin_browser_dom_parts.mts +60 -59
  90. package/src/plugin_browser_speech.mjs +1 -1
  91. package/src/plugin_browser_speech.mts +1 -1
  92. package/src/plugin_node.mjs +5 -3
  93. package/src/plugin_node.mts +6 -4
  94. package/src/plugin_weykturtle3d.mjs +38 -15
  95. package/src/plugin_weykturtle3d.mts +279 -240
  96. package/src/plugin_weykturtle3d_three.mjs +3 -0
  97. package/src/plugin_weykturtle3d_three.mts +214 -0
  98. package/src/plugin_weykturtle3d_threeutil.mjs +28 -0
  99. package/src/plugin_weykturtle3d_threeutil.mts +31 -0
  100. package/src/wnako3.mjs +1 -0
  101. package/src/wnako3.mts +1 -0
  102. package/src/wnako3mod.mjs +5 -2
  103. package/src/wnako3mod.mts +6 -3
  104. package/batch/command_nakopad.txt +0 -1177
  105. package/core/__report.txt +0 -617
  106. package/core/command/plugin_snako.mjs +0 -112
  107. package/core/command/snako.mjs +0 -108
  108. package/release/core_src_nako_josi_list_mjs.js +0 -3
  109. package/release/core_src_nako_josi_list_mjs.js.LICENSE.txt +0 -3
  110. package/release/core_src_nako_josi_list_mjs.js.map +0 -1
  111. package/release/core_src_nako_reserved_words_mjs.js +0 -3
  112. package/release/core_src_nako_reserved_words_mjs.js.LICENSE.txt +0 -3
  113. package/release/core_src_nako_reserved_words_mjs.js.map +0 -1
  114. package/release/editor/edit_main.js +0 -48
  115. package/release/editor/edit_main.js.map +0 -7
  116. package/release/editor/version_main.js +0 -44
  117. package/release/editor/version_main.js.map +0 -7
  118. package/release/editor.js.LICENSE.txt +0 -91
  119. package/release/editor.js.map +0 -1
  120. package/release/nako_gen_async.js +0 -2
  121. package/release/nako_gen_async.js.LICENSE.txt +0 -21
  122. package/release/nako_gen_async.js.map +0 -1
  123. package/release/plugin_caniuse.js.LICENSE.txt +0 -15
  124. package/release/plugin_datetime.js.LICENSE.txt +0 -21
  125. package/release/plugin_kansuji.js.LICENSE.txt +0 -3
  126. package/release/plugin_markup.js.LICENSE.txt +0 -15
  127. package/release/plugin_toml.js +0 -295
  128. package/release/plugin_toml.js.map +0 -7
  129. package/release/plugin_turtle.js.LICENSE.txt +0 -9
  130. package/release/plugin_webworker.js.LICENSE.txt +0 -3
  131. package/release/plugin_weykturtle3d.js.LICENSE.txt +0 -3
  132. package/release/src/plugin_caniuse.js +0 -2
  133. package/release/src/plugin_caniuse.js.map +0 -7
  134. package/release/src/plugin_datetime.js +0 -2
  135. package/release/src/plugin_datetime.js.map +0 -7
  136. package/release/src/plugin_kansuji.js +0 -2
  137. package/release/src/plugin_kansuji.js.map +0 -7
  138. package/release/src/plugin_keigo.js +0 -2
  139. package/release/src/plugin_keigo.js.map +0 -7
  140. package/release/src/plugin_markup.js +0 -64
  141. package/release/src/plugin_markup.js.map +0 -7
  142. package/release/src/plugin_three.js +0 -2
  143. package/release/src/plugin_three.js.map +0 -7
  144. package/release/src/plugin_turtle.js +0 -2
  145. package/release/src/plugin_turtle.js.map +0 -7
  146. package/release/src/plugin_webworker.js +0 -4
  147. package/release/src/plugin_webworker.js.map +0 -7
  148. package/release/src/plugin_weykturtle3d.js +0 -2
  149. package/release/src/plugin_weykturtle3d.js.map +0 -7
  150. package/release/src/wnako3.js +0 -482
  151. package/release/src/wnako3.js.map +0 -7
  152. package/release/src/wnako3webworker.js +0 -428
  153. package/release/src/wnako3webworker.js.map +0 -7
  154. package/release/stats.json +0 -1
  155. package/release/version.js.LICENSE.txt +0 -65
  156. package/release/version.js.map +0 -1
  157. package/release/wnako3.js.LICENSE.txt +0 -341
  158. package/release/wnako3webworker.js.LICENSE.txt +0 -209
  159. package/src/plugin_three.mts +0 -240
@@ -1,64 +1,64 @@
1
- "use strict";(()=>{var ye=Object.create;var se=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var $e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var Ae=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports);var ze=(o,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of $e(t))!Se.call(o,s)&&s!==e&&se(o,s,{get:()=>t[s],enumerable:!(n=Te(t,s))||n.enumerable});return o};var ve=(o,t,e)=>(e=o!=null?ye(Re(o)):{},ze(t||!o||!o.__esModule?se(e,"default",{value:o,enumerable:!0}):e,o));var me=Ae((dt,be)=>{function rt(o,t){var e,n,s,i,r,l;t=t||{},n=t.indent_size||4,s=t.indent_char||" ",r=t.brace_style||"collapse",i=t.max_char==0?1/0:t.max_char||70,l=t.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"];function a(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:`
2
- \r `.split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(h,p){for(var k=0;k<p.length;k++)if(h===p[k])return!0;return!1}},this.get_content=function(){for(var h="",p=[],k=!1;this.input.charAt(this.pos)!=="<";){if(this.pos>=this.input.length)return p.length?p.join(""):["","TK_EOF"];if(h=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(h,this.Utils.whitespace)){p.length&&(k=!0),this.line_char_count--;continue}else if(k){if(this.line_char_count>=this.max_char){p.push(`
3
- `);for(var _=0;_<this.indent_level;_++)p.push(this.indent_string);this.line_char_count=0}else p.push(" "),this.line_char_count++;k=!1}p.push(h)}return p.length?p.join(""):""},this.get_contents_to=function(h){if(this.pos==this.input.length)return["","TK_EOF"];var p="",k="",_=new RegExp("</"+h+"\\s*>","igm");_.lastIndex=this.pos;var S=_.exec(this.input),y=S?S.index:this.input.length;return this.pos<y&&(k=this.input.substring(this.pos,y),this.pos=y),k},this.record_tag=function(h){this.tags[h+"count"]?(this.tags[h+"count"]++,this.tags[h+this.tags[h+"count"]]=this.indent_level):(this.tags[h+"count"]=1,this.tags[h+this.tags[h+"count"]]=this.indent_level),this.tags[h+this.tags[h+"count"]+"parent"]=this.tags.parent,this.tags.parent=h+this.tags[h+"count"]},this.retrieve_tag=function(h){if(this.tags[h+"count"]){for(var p=this.tags.parent;p&&h+this.tags[h+"count"]!==p;)p=this.tags[p+"parent"];p&&(this.indent_level=this.tags[h+this.tags[h+"count"]],this.tags.parent=this.tags[p+"parent"]),delete this.tags[h+this.tags[h+"count"]+"parent"],delete this.tags[h+this.tags[h+"count"]],this.tags[h+"count"]==1?delete this.tags[h+"count"]:this.tags[h+"count"]--}},this.get_tag=function(){var h="",p=[],k=!1,_,S;do{if(this.pos>=this.input.length)return p.length?p.join(""):["","TK_EOF"];if(h=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(h,this.Utils.whitespace)){k=!0,this.line_char_count--;continue}(h==="'"||h==='"')&&(!p[1]||p[1]!=="!")&&(h+=this.get_unformatted(h),k=!0),h==="="&&(k=!1),p.length&&p[p.length-1]!=="="&&h!==">"&&k&&(this.line_char_count>=this.max_char?(this.print_newline(!1,p),this.line_char_count=0):(p.push(" "),this.line_char_count++),k=!1),h==="<"&&(_=this.pos-1),p.push(h)}while(h!==">");var y=p.join(""),C;y.indexOf(" ")!=-1?C=y.indexOf(" "):C=y.indexOf(">");var w=y.substring(1,C).toLowerCase();if(y.charAt(y.length-2)==="/"||this.Utils.in_array(w,this.Utils.single_token))this.tag_type="SINGLE";else if(w==="script")this.record_tag(w),this.tag_type="SCRIPT";else if(w==="style")this.record_tag(w),this.tag_type="STYLE";else if(this.Utils.in_array(w,l)){var v=this.get_unformatted("</"+w+">",y);p.push(v),_>0&&this.Utils.in_array(this.input.charAt(_-1),this.Utils.whitespace)&&p.splice(0,0,this.input.charAt(_-1)),S=this.pos-1,this.Utils.in_array(this.input.charAt(S+1),this.Utils.whitespace)&&p.push(this.input.charAt(S+1)),this.tag_type="SINGLE"}else if(w.charAt(0)==="!")if(w.indexOf("[if")!=-1){if(y.indexOf("!IE")!=-1){var v=this.get_unformatted("-->",y);p.push(v)}this.tag_type="START"}else if(w.indexOf("[endif")!=-1)this.tag_type="END",this.unindent();else if(w.indexOf("[cdata[")!=-1){var v=this.get_unformatted("]]>",y);p.push(v),this.tag_type="SINGLE"}else{var v=this.get_unformatted("-->",y);p.push(v),this.tag_type="SINGLE"}else w.charAt(0)==="/"?(this.retrieve_tag(w.substring(1)),this.tag_type="END"):(this.record_tag(w),this.tag_type="START"),this.Utils.in_array(w,this.Utils.extra_liners)&&this.print_newline(!0,this.output);return p.join("")},this.get_unformatted=function(h,p){if(p&&p.toLowerCase().indexOf(h)!=-1)return"";var k="",_="",S=!0;do{if(this.pos>=this.input.length)return _;if(k=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(k,this.Utils.whitespace)){if(!S){this.line_char_count--;continue}if(k===`
4
- `||k==="\r"){_+=`
5
- `,this.line_char_count=0;continue}}_+=k,this.line_char_count++,S=!0}while(_.toLowerCase().indexOf(h)==-1);return _},this.get_token=function(){var h;if(this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"){var p=this.last_token.substr(7);return h=this.get_contents_to(p),typeof h!="string"?h:[h,"TK_"+p]}if(this.current_mode==="CONTENT")return h=this.get_content(),typeof h!="string"?h:[h,"TK_CONTENT"];if(this.current_mode==="TAG"){if(h=this.get_tag(),typeof h!="string")return h;var k="TK_TAG_"+this.tag_type;return[h,k]}},this.get_full_indent=function(h){return h=this.indent_level+h||0,h<1?"":Array(h+1).join(this.indent_string)},this.printer=function(h,p,k,_,S){this.input=h||"",this.output=[],this.indent_character=p,this.indent_string="",this.indent_size=k,this.brace_style=S,this.indent_level=0,this.max_char=_,this.line_char_count=0;for(var y=0;y<this.indent_size;y++)this.indent_string+=this.indent_character;this.print_newline=function(C,w){if(this.line_char_count=0,!(!w||!w.length)){if(!C)for(;this.Utils.in_array(w[w.length-1],this.Utils.whitespace);)w.pop();w.push(`
6
- `);for(var v=0;v<this.indent_level;v++)w.push(this.indent_string)}},this.print_token=function(C){this.output.push(C)},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}for(e=new a,e.printer(o,s,n,i,r);;){var u=e.get_token();if(e.token_text=u[0],e.token_type=u[1],e.token_type==="TK_EOF")break;switch(e.token_type){case"TK_TAG_START":e.print_newline(!1,e.output),e.print_token(e.token_text),e.indent(),e.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":e.print_newline(!1,e.output),e.print_token(e.token_text),e.current_mode="CONTENT";break;case"TK_TAG_END":if(e.last_token==="TK_CONTENT"&&e.last_text===""){var c=e.token_text.match(/\w+/)[0],f=e.output[e.output.length-1].match(/<\s*(\w+)/);(f===null||f[1]!==c)&&e.print_newline(!0,e.output)}e.print_token(e.token_text),e.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var g=e.token_text.match(/^\s*<([a-z]+)/i);(!g||!e.Utils.in_array(g[1],l))&&e.print_newline(!1,e.output),e.print_token(e.token_text),e.current_mode="CONTENT";break;case"TK_CONTENT":e.token_text!==""&&e.print_token(e.token_text),e.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(e.token_text!==""){e.output.push(`
7
- `);var m=e.token_text;if(e.token_type=="TK_SCRIPT")var d=typeof js_beautify=="function"&&js_beautify;else if(e.token_type=="TK_STYLE")var d=typeof css_beautify=="function"&&css_beautify;if(t.indent_scripts=="keep")var T=0;else if(t.indent_scripts=="separate")var T=-e.indent_level;else var T=1;var R=e.get_full_indent(T);if(d)m=d(m.replace(/^\s*/,R),t);else{var O=m.match(/^\s*/)[0],M=O.match(/[^\n\r]*$/)[0].split(e.indent_string).length-1,K=e.get_full_indent(T-M);m=m.replace(/^\s*/,R).replace(/\r\n|\r|\n/g,`
8
- `+K).replace(/\s*$/,"")}m&&(e.print_token(m),e.print_newline(!0,e.output))}e.current_mode="TAG";break}e.last_token=e.token_type,e.last_text=e.token_text}return e.output.join("")}be.exports={prettyPrint:rt}});function W(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var E=W();function he(o){E=o}var G={exec:()=>null};function b(o,t=""){let e=typeof o=="string"?o:o.source,n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace($.caret,"$1"),e=e.replace(s,r),n},getRegex:()=>new RegExp(e,t)};return n}var $={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o=>new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}#`),htmlBeginRegex:o=>new RegExp(`^ {0,${Math.min(3,o-1)}}<(?:[a-z].*>|!--)`,"i")},Le=/^(?:[ \t]*(?:\n|$))+/,Ce=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ie=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,U=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ee=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ce=/(?:[*+-]|\d{1,9}[.)])/,ue=b(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ce).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),V=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pe=/^[^\n]+/,J=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Be=b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",J).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ne=b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ce).getRegex(),F="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ee=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Oe=b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ee).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe=b(V).replace("hr",U).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),qe=b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pe).getRegex(),te={blockquote:qe,code:Ce,def:Be,fences:Ie,heading:Ee,hr:U,html:Oe,lheading:ue,list:Ne,newline:Le,paragraph:pe,table:G,text:Pe},ie=b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",U).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),je={...te,table:ie,paragraph:b(V).replace("hr",U).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ie).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex()},Ge={...te,html:b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ee).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:G,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:b(V).replace("hr",U).replace("heading",` *#{1,6} *[^
9
- ]`).replace("lheading",ue).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},fe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ze=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ge=/^( {2,}|\\)\n(?!\s*$)/,Ue=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,D="\\p{P}\\p{S}",De=b(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,D).getRegex(),Me=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Ke=b(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,D).getRegex(),Qe=b("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,D).getRegex(),He=b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,D).getRegex(),Fe=b(/\\([punct])/,"gu").replace(/punct/g,D).getRegex(),Ye=b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),Xe=b(ee).replace("(?:-->|$)","-->").getRegex(),We=b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Xe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),H=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ve=b(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",H).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),de=b(/^!?\[(label)\]\[(ref)\]/).replace("label",H).replace("ref",J).getRegex(),ke=b(/^!?\[(ref)\](?:\[\])?/).replace("ref",J).getRegex(),Je=b("reflink|nolink(?!\\()","g").replace("reflink",de).replace("nolink",ke).getRegex(),ne={_backpedal:G,anyPunctuation:Fe,autolink:Ye,blockSkip:Me,br:ge,code:Ze,del:G,emStrongLDelim:Ke,emStrongRDelimAst:Qe,emStrongRDelimUnd:He,escape:fe,link:Ve,nolink:ke,punctuation:De,reflink:de,reflinkSearch:Je,tag:We,text:Ue,url:G},et={...ne,link:b(/^!?\[(label)\]\((.*?)\)/).replace("label",H).getRegex(),reflink:b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H).getRegex()},Y={...ne,escape:b(fe).replace("])","~|])").getRegex(),url:b(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},tt={...Y,br:b(ge).replace("{2,}","*").getRegex(),text:b(Y.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:te,gfm:je,pedantic:Ge},q={normal:ne,gfm:Y,breaks:tt,pedantic:et},nt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},re=o=>nt[o];function L(o,t){if(t){if($.escapeTest.test(o))return o.replace($.escapeReplace,re)}else if($.escapeTestNoEncode.test(o))return o.replace($.escapeReplaceNoEncode,re);return o}function le(o){try{o=encodeURI(o).replace($.percentDecode,"%")}catch{return null}return o}function oe(o,t){let e=o.replace($.findPipe,(i,r,l)=>{let a=!1,u=r;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),n=e.split($.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace($.slashPipe,"|");return n}function j(o,t,e){let n=o.length;if(n===0)return"";let s=0;for(;s<n;){let i=o.charAt(n-s-1);if(i===t&&!e)s++;else if(i!==t&&e)s++;else break}return o.slice(0,n-s)}function st(o,t){if(o.indexOf(t[1])===-1)return-1;let e=0;for(let n=0;n<o.length;n++)if(o[n]==="\\")n++;else if(o[n]===t[0])e++;else if(o[n]===t[1]&&(e--,e<0))return n;return-1}function ae(o,t,e,n,s){let i=t.href,r=t.title||null,l=o[1].replace(s.other.outputLinkReplace,"$1");if(o[0].charAt(0)!=="!"){n.state.inLink=!0;let a={type:"link",raw:e,href:i,title:r,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,a}return{type:"image",raw:e,href:i,title:r,text:l}}function it(o,t,e){let n=o.match(e.other.indentCodeCompensation);if(n===null)return t;let s=n[1];return t.split(`
10
- `).map(i=>{let r=i.match(e.other.beginningSpace);if(r===null)return i;let[l]=r;return l.length>=s.length?i.slice(s.length):i}).join(`
11
- `)}var B=class{options;rules;lexer;constructor(t){this.options=t||E}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:j(n,`
12
- `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=it(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=j(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:j(e[0],`
13
- `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=j(e[0],`
1
+ "use strict";(()=>{var Ae=Object.create;var re=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Ce=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty;var Ee=(a,e)=>()=>(e||a((e={exports:{}}).exports,e),e.exports);var Ie=(a,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ze(e))!Le.call(a,s)&&s!==t&&re(a,s,{get:()=>e[s],enumerable:!(n=ve(e,s))||n.enumerable});return a};var Pe=(a,e,t)=>(t=a!=null?Ae(Ce(a)):{},Ie(e||!a||!a.__esModule?re(t,"default",{value:a,enumerable:!0}):t,a));var Se=Ee(($t,Te)=>{function kt(a,e){var t,n,s,r,i,l;e=e||{},n=e.indent_size||4,s=e.indent_char||" ",i=e.brace_style||"collapse",r=e.max_char==0?1/0:e.max_char||70,l=e.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"];function o(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.Utils={whitespace:`
2
+ \r `.split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(c,u){for(var x=0;x<u.length;x++)if(c===u[x])return!0;return!1}},this.get_content=function(){for(var c="",u=[],x=!1;this.input.charAt(this.pos)!=="<";){if(this.pos>=this.input.length)return u.length?u.join(""):["","TK_EOF"];if(c=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(c,this.Utils.whitespace)){u.length&&(x=!0),this.line_char_count--;continue}else if(x){if(this.line_char_count>=this.max_char){u.push(`
3
+ `);for(var w=0;w<this.indent_level;w++)u.push(this.indent_string);this.line_char_count=0}else u.push(" "),this.line_char_count++;x=!1}u.push(c)}return u.length?u.join(""):""},this.get_contents_to=function(c){if(this.pos==this.input.length)return["","TK_EOF"];var u="",x="",w=new RegExp("</"+c+"\\s*>","igm");w.lastIndex=this.pos;var S=w.exec(this.input),T=S?S.index:this.input.length;return this.pos<T&&(x=this.input.substring(this.pos,T),this.pos=T),x},this.record_tag=function(c){this.tags[c+"count"]?(this.tags[c+"count"]++,this.tags[c+this.tags[c+"count"]]=this.indent_level):(this.tags[c+"count"]=1,this.tags[c+this.tags[c+"count"]]=this.indent_level),this.tags[c+this.tags[c+"count"]+"parent"]=this.tags.parent,this.tags.parent=c+this.tags[c+"count"]},this.retrieve_tag=function(c){if(this.tags[c+"count"]){for(var u=this.tags.parent;u&&c+this.tags[c+"count"]!==u;)u=this.tags[u+"parent"];u&&(this.indent_level=this.tags[c+this.tags[c+"count"]],this.tags.parent=this.tags[u+"parent"]),delete this.tags[c+this.tags[c+"count"]+"parent"],delete this.tags[c+this.tags[c+"count"]],this.tags[c+"count"]==1?delete this.tags[c+"count"]:this.tags[c+"count"]--}},this.get_tag=function(){var c="",u=[],x=!1,w,S;do{if(this.pos>=this.input.length)return u.length?u.join(""):["","TK_EOF"];if(c=this.input.charAt(this.pos),this.pos++,this.line_char_count++,this.Utils.in_array(c,this.Utils.whitespace)){x=!0,this.line_char_count--;continue}(c==="'"||c==='"')&&(!u[1]||u[1]!=="!")&&(c+=this.get_unformatted(c),x=!0),c==="="&&(x=!1),u.length&&u[u.length-1]!=="="&&c!==">"&&x&&(this.line_char_count>=this.max_char?(this.print_newline(!1,u),this.line_char_count=0):(u.push(" "),this.line_char_count++),x=!1),c==="<"&&(w=this.pos-1),u.push(c)}while(c!==">");var T=u.join(""),L;T.indexOf(" ")!=-1?L=T.indexOf(" "):L=T.indexOf(">");var _=T.substring(1,L).toLowerCase();if(T.charAt(T.length-2)==="/"||this.Utils.in_array(_,this.Utils.single_token))this.tag_type="SINGLE";else if(_==="script")this.record_tag(_),this.tag_type="SCRIPT";else if(_==="style")this.record_tag(_),this.tag_type="STYLE";else if(this.Utils.in_array(_,l)){var z=this.get_unformatted("</"+_+">",T);u.push(z),w>0&&this.Utils.in_array(this.input.charAt(w-1),this.Utils.whitespace)&&u.splice(0,0,this.input.charAt(w-1)),S=this.pos-1,this.Utils.in_array(this.input.charAt(S+1),this.Utils.whitespace)&&u.push(this.input.charAt(S+1)),this.tag_type="SINGLE"}else if(_.charAt(0)==="!")if(_.indexOf("[if")!=-1){if(T.indexOf("!IE")!=-1){var z=this.get_unformatted("-->",T);u.push(z)}this.tag_type="START"}else if(_.indexOf("[endif")!=-1)this.tag_type="END",this.unindent();else if(_.indexOf("[cdata[")!=-1){var z=this.get_unformatted("]]>",T);u.push(z),this.tag_type="SINGLE"}else{var z=this.get_unformatted("-->",T);u.push(z),this.tag_type="SINGLE"}else _.charAt(0)==="/"?(this.retrieve_tag(_.substring(1)),this.tag_type="END"):(this.record_tag(_),this.tag_type="START"),this.Utils.in_array(_,this.Utils.extra_liners)&&this.print_newline(!0,this.output);return u.join("")},this.get_unformatted=function(c,u){if(u&&u.toLowerCase().indexOf(c)!=-1)return"";var x="",w="",S=!0;do{if(this.pos>=this.input.length)return w;if(x=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(x,this.Utils.whitespace)){if(!S){this.line_char_count--;continue}if(x===`
4
+ `||x==="\r"){w+=`
5
+ `,this.line_char_count=0;continue}}w+=x,this.line_char_count++,S=!0}while(w.toLowerCase().indexOf(c)==-1);return w},this.get_token=function(){var c;if(this.last_token==="TK_TAG_SCRIPT"||this.last_token==="TK_TAG_STYLE"){var u=this.last_token.substr(7);return c=this.get_contents_to(u),typeof c!="string"?c:[c,"TK_"+u]}if(this.current_mode==="CONTENT")return c=this.get_content(),typeof c!="string"?c:[c,"TK_CONTENT"];if(this.current_mode==="TAG"){if(c=this.get_tag(),typeof c!="string")return c;var x="TK_TAG_"+this.tag_type;return[c,x]}},this.get_full_indent=function(c){return c=this.indent_level+c||0,c<1?"":Array(c+1).join(this.indent_string)},this.printer=function(c,u,x,w,S){this.input=c||"",this.output=[],this.indent_character=u,this.indent_string="",this.indent_size=x,this.brace_style=S,this.indent_level=0,this.max_char=w,this.line_char_count=0;for(var T=0;T<this.indent_size;T++)this.indent_string+=this.indent_character;this.print_newline=function(L,_){if(this.line_char_count=0,!(!_||!_.length)){if(!L)for(;this.Utils.in_array(_[_.length-1],this.Utils.whitespace);)_.pop();_.push(`
6
+ `);for(var z=0;z<this.indent_level;z++)_.push(this.indent_string)}},this.print_token=function(L){this.output.push(L)},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}for(t=new o,t.printer(a,s,n,r,i);;){var h=t.get_token();if(t.token_text=h[0],t.token_type=h[1],t.token_type==="TK_EOF")break;switch(t.token_type){case"TK_TAG_START":t.print_newline(!1,t.output),t.print_token(t.token_text),t.indent(),t.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":t.print_newline(!1,t.output),t.print_token(t.token_text),t.current_mode="CONTENT";break;case"TK_TAG_END":if(t.last_token==="TK_CONTENT"&&t.last_text===""){var p=t.token_text.match(/\w+/)[0],f=t.output[t.output.length-1].match(/<\s*(\w+)/);(f===null||f[1]!==p)&&t.print_newline(!0,t.output)}t.print_token(t.token_text),t.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var m=t.token_text.match(/^\s*<([a-z]+)/i);(!m||!t.Utils.in_array(m[1],l))&&t.print_newline(!1,t.output),t.print_token(t.token_text),t.current_mode="CONTENT";break;case"TK_CONTENT":t.token_text!==""&&t.print_token(t.token_text),t.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(t.token_text!==""){t.output.push(`
7
+ `);var g=t.token_text;if(t.token_type=="TK_SCRIPT")var y=typeof js_beautify=="function"&&js_beautify;else if(t.token_type=="TK_STYLE")var y=typeof css_beautify=="function"&&css_beautify;if(e.indent_scripts=="keep")var k=0;else if(e.indent_scripts=="separate")var k=-t.indent_level;else var k=1;var R=t.get_full_indent(k);if(y)g=y(g.replace(/^\s*/,R),e);else{var U=g.match(/^\s*/)[0],O=U.match(/[^\n\r]*$/)[0].split(t.indent_string).length-1,M=t.get_full_indent(k-O);g=g.replace(/^\s*/,R).replace(/\r\n|\r|\n/g,`
8
+ `+M).replace(/\s*$/,"")}g&&(t.print_token(g),t.print_newline(!0,t.output))}t.current_mode="TAG";break}t.last_token=t.token_type,t.last_text=t.token_text}return t.output.join("")}Te.exports={prettyPrint:kt}});function W(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var I=W();function pe(a){I=a}var j={exec:()=>null};function d(a,e=""){let t=typeof a=="string"?a:a.source,n={replace:(s,r)=>{let i=typeof r=="string"?r:r.source;return i=i.replace($.caret,"$1"),t=t.replace(s,i),n},getRegex:()=>new RegExp(t,e)};return n}var $={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:a=>new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}#`),htmlBeginRegex:a=>new RegExp(`^ {0,${Math.min(3,a-1)}}<(?:[a-z].*>|!--)`,"i")},Be=/^(?:[ \t]*(?:\n|$))+/,Ne=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Z=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,V=/(?:[*+-]|\d{1,9}[.)])/,ue=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,fe=d(ue).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ge=d(ue).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),J=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,je=/^[^\n]+/,ee=/(?!\s*\])(?:\\.|[^\[\]\\])+/,De=d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ee).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ze=d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,V).getRegex(),Q="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",te=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ue=d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",te).replace("tag",Q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ge=d(J).replace("hr",Z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex(),Me=d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ge).getRegex(),ne={blockquote:Me,code:Ne,def:De,fences:Oe,heading:qe,hr:Z,html:Ue,lheading:fe,list:Ze,newline:Be,paragraph:ge,table:j,text:je},le=d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex(),Ke={...ne,lheading:Ge,table:le,paragraph:d(J).replace("hr",Z).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",le).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex()},He={...ne,html:d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",te).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:j,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:d(J).replace("hr",Z).replace("heading",` *#{1,6} *[^
9
+ ]`).replace("lheading",fe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Fe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,de=/^( {2,}|\\)\n(?!\s*$)/,Ye=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,se=/[\s\p{P}\p{S}]/u,ke=/[^\s\p{P}\p{S}]/u,Xe=d(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,se).getRegex(),be=/(?!~)[\p{P}\p{S}]/u,We=/(?!~)[\s\p{P}\p{S}]/u,Ve=/(?:[^\s\p{P}\p{S}]|~)/u,Je=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,xe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,et=d(xe,"u").replace(/punct/g,F).getRegex(),tt=d(xe,"u").replace(/punct/g,be).getRegex(),me="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nt=d(me,"gu").replace(/notPunctSpace/g,ke).replace(/punctSpace/g,se).replace(/punct/g,F).getRegex(),st=d(me,"gu").replace(/notPunctSpace/g,Ve).replace(/punctSpace/g,We).replace(/punct/g,be).getRegex(),it=d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ke).replace(/punctSpace/g,se).replace(/punct/g,F).getRegex(),rt=d(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),lt=d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),at=d(te).replace("(?:-->|$)","-->").getRegex(),ot=d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",at).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),H=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ct=d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",H).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_e=d(/^!?\[(label)\]\[(ref)\]/).replace("label",H).replace("ref",ee).getRegex(),we=d(/^!?\[(ref)\](?:\[\])?/).replace("ref",ee).getRegex(),ht=d("reflink|nolink(?!\\()","g").replace("reflink",_e).replace("nolink",we).getRegex(),ie={_backpedal:j,anyPunctuation:rt,autolink:lt,blockSkip:Je,br:de,code:Fe,del:j,emStrongLDelim:et,emStrongRDelimAst:nt,emStrongRDelimUnd:it,escape:Qe,link:ct,nolink:we,punctuation:Xe,reflink:_e,reflinkSearch:ht,tag:ot,text:Ye,url:j},pt={...ie,link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",H).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H).getRegex()},Y={...ie,emStrongRDelimAst:st,emStrongLDelim:tt,url:d(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},ut={...Y,br:d(de).replace("{2,}","*").getRegex(),text:d(Y.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},K={normal:ne,gfm:Ke,pedantic:He},q={normal:ie,gfm:Y,breaks:ut,pedantic:pt},ft={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ae=a=>ft[a];function C(a,e){if(e){if($.escapeTest.test(a))return a.replace($.escapeReplace,ae)}else if($.escapeTestNoEncode.test(a))return a.replace($.escapeReplaceNoEncode,ae);return a}function oe(a){try{a=encodeURI(a).replace($.percentDecode,"%")}catch{return null}return a}function ce(a,e){let t=a.replace($.findPipe,(r,i,l)=>{let o=!1,h=i;for(;--h>=0&&l[h]==="\\";)o=!o;return o?"|":" |"}),n=t.split($.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace($.slashPipe,"|");return n}function G(a,e,t){let n=a.length;if(n===0)return"";let s=0;for(;s<n&&a.charAt(n-s-1)===e;)s++;return a.slice(0,n-s)}function gt(a,e){if(a.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<a.length;n++)if(a[n]==="\\")n++;else if(a[n]===e[0])t++;else if(a[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function he(a,e,t,n,s){let r=e.href,i=e.title||null,l=a[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let o={type:a[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:i,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,o}function dt(a,e,t){let n=a.match(t.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
10
+ `).map(r=>{let i=r.match(t.other.beginningSpace);if(i===null)return r;let[l]=i;return l.length>=s.length?r.slice(s.length):r}).join(`
11
+ `)}var B=class{options;rules;lexer;constructor(e){this.options=e||I}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:G(n,`
12
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=dt(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=G(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:G(t[0],`
13
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=G(t[0],`
14
14
  `).split(`
15
- `),s="",i="",r=[];for(;n.length>0;){let l=!1,a=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))a.push(n[u]),l=!0;else if(!l)a.push(n[u]);else break;n=n.slice(u);let c=a.join(`
16
- `),f=c.replace(this.rules.other.blockquoteSetextReplace,`
15
+ `),s="",r="",i=[];for(;n.length>0;){let l=!1,o=[],h;for(h=0;h<n.length;h++)if(this.rules.other.blockquoteStart.test(n[h]))o.push(n[h]),l=!0;else if(!l)o.push(n[h]);else break;n=n.slice(h);let p=o.join(`
16
+ `),f=p.replace(this.rules.other.blockquoteSetextReplace,`
17
17
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
18
- ${c}`:c,i=i?`${i}
19
- ${f}`:f;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,r,!0),this.lexer.state.top=g,n.length===0)break;let m=r[r.length-1];if(m?.type==="code")break;if(m?.type==="blockquote"){let d=m,T=d.raw+`
18
+ ${p}`:p,r=r?`${r}
19
+ ${f}`:f;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,i,!0),this.lexer.state.top=m,n.length===0)break;let g=i.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let y=g,k=y.raw+`
20
20
  `+n.join(`
21
- `),R=this.blockquote(T);r[r.length-1]=R,s=s.substring(0,s.length-d.raw.length)+R.raw,i=i.substring(0,i.length-d.text.length)+R.text;break}else if(m?.type==="list"){let d=m,T=d.raw+`
21
+ `),R=this.blockquote(k);i[i.length-1]=R,s=s.substring(0,s.length-y.raw.length)+R.raw,r=r.substring(0,r.length-y.text.length)+R.text;break}else if(g?.type==="list"){let y=g,k=y.raw+`
22
22
  `+n.join(`
23
- `),R=this.list(T);r[r.length-1]=R,s=s.substring(0,s.length-m.raw.length)+R.raw,i=i.substring(0,i.length-d.raw.length)+R.raw,n=T.substring(r[r.length-1].raw.length).split(`
24
- `);continue}}return{type:"blockquote",raw:s,tokens:r,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),s=n.length>1,i={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let r=this.rules.other.listItemRegex(n),l=!1;for(;t;){let a=!1,u="",c="";if(!(e=r.exec(t))||this.rules.block.hr.test(t))break;u=e[0],t=t.substring(u.length);let f=e[2].split(`
25
- `,1)[0].replace(this.rules.other.listReplaceTabs,O=>" ".repeat(3*O.length)),g=t.split(`
26
- `,1)[0],m=!f.trim(),d=0;if(this.options.pedantic?(d=2,c=f.trimStart()):m?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,c=f.slice(d),d+=e[1].length),m&&this.rules.other.blankLine.test(g)&&(u+=g+`
27
- `,t=t.substring(g.length+1),a=!0),!a){let O=this.rules.other.nextBulletRegex(d),M=this.rules.other.hrRegex(d),K=this.rules.other.fencesBeginRegex(d),h=this.rules.other.headingBeginRegex(d),p=this.rules.other.htmlBeginRegex(d);for(;t;){let k=t.split(`
28
- `,1)[0],_;if(g=k,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),_=g):_=g.replace(this.rules.other.tabCharGlobal," "),K.test(g)||h.test(g)||p.test(g)||O.test(g)||M.test(g))break;if(_.search(this.rules.other.nonSpaceChar)>=d||!g.trim())c+=`
29
- `+_.slice(d);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||K.test(f)||h.test(f)||M.test(f))break;c+=`
30
- `+g}!m&&!g.trim()&&(m=!0),u+=k+`
31
- `,t=t.substring(k.length+1),f=_.slice(d)}}i.loose||(l?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(l=!0));let T=null,R;this.options.gfm&&(T=this.rules.other.listIsTask.exec(c),T&&(R=T[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!T,checked:R,loose:!1,text:c,tokens:[]}),i.raw+=u}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let a=0;a<i.items.length;a++)if(this.lexer.state.top=!1,i.items[a].tokens=this.lexer.blockTokens(i.items[a].text,[]),!i.loose){let u=i.items[a].tokens.filter(f=>f.type==="space"),c=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=c}if(i.loose)for(let a=0;a<i.items.length;a++)i.items[a].loose=!0;return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:s,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=oe(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]&&e[3].trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
32
- `):[],r={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?r.align.push("right"):this.rules.other.tableAlignCenter.test(l)?r.align.push("center"):this.rules.other.tableAlignLeft.test(l)?r.align.push("left"):r.align.push(null);for(let l=0;l<n.length;l++)r.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:r.align[l]});for(let l of i)r.rows.push(oe(l,r.header.length).map((a,u)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:r.align[u]})));return r}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
33
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let r=j(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{let r=st(e[2],"()");if(r>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+r;e[2]=e[2].substring(0,r),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],i="";if(this.options.pedantic){let r=this.rules.other.pedanticHrefTitle.exec(s);r&&(s=r[1],i=r[3])}else i=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),ae(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[s.toLowerCase()];if(!i){let r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return ae(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!s||s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let r=[...s[0]].length-1,l,a,u=r,c=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+r);(s=f.exec(e))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(a=[...l].length,s[3]||s[4]){u+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);let g=[...s[0]][0].length,m=t.slice(0,r+s.index+g+a);if(Math.min(r,a)%2){let T=m.slice(1,-1);return{type:"em",raw:m,text:T,tokens:this.lexer.inlineTokens(T)}}let d=m.slice(2,-2);return{type:"strong",raw:m,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},A=class o{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||E,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:$,block:Q.normal,inline:q.normal};this.options.pedantic?(e.block=Q.pedantic,e.inline=q.pedantic):this.options.gfm&&(e.block=Q.gfm,this.options.breaks?e.inline=q.breaks:e.inline=q.gfm),this.tokenizer.rules=e}static get rules(){return{block:Q,inline:q}}static lex(t,e){return new o(e).lex(t)}static lexInline(t,e){return new o(e).inlineTokens(t)}lex(t){t=t.replace($.carriageReturn,`
34
- `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let n=this.inlineQueue[e];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){this.options.pedantic&&(t=t.replace($.tabCharGlobal," ").replace($.spaceLine,""));let s,i,r;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(s=l.call({lexer:this},t,e))?(t=t.substring(s.raw.length),e.push(s),!0):!1))){if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length),s.raw.length===1&&e.length>0?e[e.length-1].raw+=`
35
- `:e.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
23
+ `),R=this.list(k);i[i.length-1]=R,s=s.substring(0,s.length-g.raw.length)+R.raw,r=r.substring(0,r.length-y.raw.length)+R.raw,n=k.substring(i.at(-1).raw.length).split(`
24
+ `);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),l=!1;for(;e;){let h=!1,p="",f="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let m=t[2].split(`
25
+ `,1)[0].replace(this.rules.other.listReplaceTabs,O=>" ".repeat(3*O.length)),g=e.split(`
26
+ `,1)[0],y=!m.trim(),k=0;if(this.options.pedantic?(k=2,f=m.trimStart()):y?k=t[1].length+1:(k=t[2].search(this.rules.other.nonSpaceChar),k=k>4?1:k,f=m.slice(k),k+=t[1].length),y&&this.rules.other.blankLine.test(g)&&(p+=g+`
27
+ `,e=e.substring(g.length+1),h=!0),!h){let O=this.rules.other.nextBulletRegex(k),M=this.rules.other.hrRegex(k),c=this.rules.other.fencesBeginRegex(k),u=this.rules.other.headingBeginRegex(k),x=this.rules.other.htmlBeginRegex(k);for(;e;){let w=e.split(`
28
+ `,1)[0],S;if(g=w,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),S=g):S=g.replace(this.rules.other.tabCharGlobal," "),c.test(g)||u.test(g)||x.test(g)||O.test(g)||M.test(g))break;if(S.search(this.rules.other.nonSpaceChar)>=k||!g.trim())f+=`
29
+ `+S.slice(k);else{if(y||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||c.test(m)||u.test(m)||M.test(m))break;f+=`
30
+ `+g}!y&&!g.trim()&&(y=!0),p+=w+`
31
+ `,e=e.substring(w.length+1),m=S.slice(k)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(l=!0));let R=null,U;this.options.gfm&&(R=this.rules.other.listIsTask.exec(f),R&&(U=R[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:p,task:!!R,checked:U,loose:!1,text:f,tokens:[]}),r.raw+=p}let o=r.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let h=0;h<r.items.length;h++)if(this.lexer.state.top=!1,r.items[h].tokens=this.lexer.blockTokens(r.items[h].text,[]),!r.loose){let p=r.items[h].tokens.filter(m=>m.type==="space"),f=p.length>0&&p.some(m=>this.rules.other.anyLine.test(m.raw));r.loose=f}if(r.loose)for(let h=0;h<r.items.length;h++)r.items[h].loose=!0;return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ce(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
32
+ `):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<n.length;l++)i.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:i.align[l]});for(let l of r)i.rows.push(ce(l,i.header.length).map((o,h)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[h]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
33
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=G(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=gt(t[2],"()");if(i===-2)return;if(i>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],r=i[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),he(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return he(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let i=[...s[0]].length-1,l,o,h=i,p=0,f=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+i);(s=f.exec(t))!=null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(o=[...l].length,s[3]||s[4]){h+=o;continue}else if((s[5]||s[6])&&i%3&&!((i+o)%3)){p+=o;continue}if(h-=o,h>0)continue;o=Math.min(o,o+h+p);let m=[...s[0]][0].length,g=e.slice(0,i+s.index+m+o);if(Math.min(i,o)%2){let k=g.slice(1,-1);return{type:"em",raw:g,text:k,tokens:this.lexer.inlineTokens(k)}}let y=g.slice(2,-2);return{type:"strong",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]==="@")n=t[0],s="mailto:"+n;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);n=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},A=class a{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||I,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:$,block:K.normal,inline:q.normal};this.options.pedantic?(t.block=K.pedantic,t.inline=q.pedantic):this.options.gfm&&(t.block=K.gfm,this.options.breaks?t.inline=q.breaks:t.inline=q.gfm),this.tokenizer.rules=t}static get rules(){return{block:K,inline:q}}static lex(e,t){return new a(t).lex(e)}static lexInline(e,t){return new a(t).inlineTokens(e)}lex(e){e=e.replace($.carriageReturn,`
34
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace($.tabCharGlobal," ").replace($.spaceLine,""));e;){let s;if(this.options.extensions?.block?.some(i=>(s=i.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let i=t.at(-1);s.raw.length===1&&i!==void 0?i.raw+=`
35
+ `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let i=t.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=`
36
36
  `+s.raw,i.text+=`
37
- `+s.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
37
+ `+s.text,this.inlineQueue.at(-1).src=i.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let i=t.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=`
38
38
  `+s.raw,i.text+=`
39
- `+s.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),e.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),e.push(s);continue}if(r=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,a=t.slice(1),u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(r=t.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(r))){i=e[e.length-1],n&&i?.type==="paragraph"?(i.raw+=`
39
+ `+s.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let r=e;if(this.options.extensions?.startBlock){let i=1/0,l=e.slice(1),o;this.options.extensions.startBlock.forEach(h=>{o=h.call({lexer:this},l),typeof o=="number"&&o>=0&&(i=Math.min(i,o))}),i<1/0&&i>=0&&(r=e.substring(0,i+1))}if(this.state.top&&(s=this.tokenizer.paragraph(r))){let i=t.at(-1);n&&i?.type==="paragraph"?(i.raw+=`
40
40
  `+s.raw,i.text+=`
41
- `+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(s),n=r.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=`
41
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(s),n=r.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let i=t.at(-1);i?.type==="text"?(i.raw+=`
42
42
  `+s.raw,i.text+=`
43
- `+s.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(s);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,s,i,r=t,l,a,u;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)c.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,l.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),s=e[e.length-1],e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),s=e[e.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,r,u)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0,f=t.slice(1),g;this.options.extensions.startInline.forEach(m=>{g=m.call({lexer:this},f),typeof g=="number"&&g>=0&&(c=Math.min(c,g))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(n=this.tokenizer.inlineText(i)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),a=!0,s=e[e.length-1],s&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):e.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}},N=class{options;parser;constructor(t){this.options=t||E}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match($.notSpaceStart)?.[0],i=t.replace($.endingNewline,"")+`
44
- `;return s?'<pre><code class="language-'+L(s)+'">'+(n?i:L(i,!0))+`</code></pre>
45
- `:"<pre><code>"+(n?i:L(i,!0))+`</code></pre>
46
- `}blockquote({tokens:t}){return`<blockquote>
47
- ${this.parser.parse(t)}</blockquote>
48
- `}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
49
- `}hr(t){return`<hr>
50
- `}list(t){let e=t.ordered,n=t.start,s="";for(let l=0;l<t.items.length;l++){let a=t.items[l];s+=this.listitem(a)}let i=e?"ol":"ul",r=e&&n!==1?' start="'+n+'"':"";return"<"+i+r+`>
51
- `+s+"</"+i+`>
52
- `}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&t.tokens[0].type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+L(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
53
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
54
- `}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let s="";for(let i=0;i<t.rows.length;i++){let r=t.rows[i];n="";for(let l=0;l<r.length;l++)n+=this.tablecell(r[l]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
43
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(s);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let r=!1,i="";for(;e;){r||(i=""),r=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let h=t.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,n,i)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let o=e;if(this.options.extensions?.startInline){let h=1/0,p=e.slice(1),f;this.options.extensions.startInline.forEach(m=>{f=m.call({lexer:this},p),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(o=e.substring(0,h+1))}if(l=this.tokenizer.inlineText(o)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(i=l.raw.slice(-1)),r=!0;let h=t.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):t.push(l);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return t}},N=class{options;parser;constructor(e){this.options=e||I}space(e){return""}code({text:e,lang:t,escaped:n}){let s=(t||"").match($.notSpaceStart)?.[0],r=e.replace($.endingNewline,"")+`
44
+ `;return s?'<pre><code class="language-'+C(s)+'">'+(n?r:C(r,!0))+`</code></pre>
45
+ `:"<pre><code>"+(n?r:C(r,!0))+`</code></pre>
46
+ `}blockquote({tokens:e}){return`<blockquote>
47
+ ${this.parser.parse(e)}</blockquote>
48
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
49
+ `}hr(e){return`<hr>
50
+ `}list(e){let t=e.ordered,n=e.start,s="";for(let l=0;l<e.items.length;l++){let o=e.items[l];s+=this.listitem(o)}let r=t?"ol":"ul",i=t&&n!==1?' start="'+n+'"':"";return"<"+r+i+`>
51
+ `+s+"</"+r+`>
52
+ `}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+C(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
53
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
54
+ `}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s="";for(let r=0;r<e.rows.length;r++){let i=e.rows[r];n="";for(let l=0;l<i.length;l++)n+=this.tablecell(i[l]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
55
55
  <thead>
56
- `+e+`</thead>
56
+ `+t+`</thead>
57
57
  `+s+`</table>
58
- `}tablerow({text:t}){return`<tr>
59
- ${t}</tr>
60
- `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
61
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${L(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let s=this.parser.parseInline(n),i=le(t);if(i===null)return s;t=i;let r='<a href="'+t+'"';return e&&(r+=' title="'+L(e)+'"'),r+=">"+s+"</a>",r}image({href:t,title:e,text:n}){let s=le(t);if(s===null)return L(n);t=s;let i=`<img src="${t}" alt="${n}"`;return e&&(i+=` title="${L(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:L(t.text)}},Z=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},z=class o{options;renderer;textRenderer;constructor(t){this.options=t||E,this.options.renderer=this.options.renderer||new N,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Z}static parse(t,e){return new o(e).parse(t)}static parseInline(t,e){return new o(e).parseInline(t)}parse(t,e=!0){let n="";for(let s=0;s<t.length;s++){let i=t[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){let l=i,a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){n+=a||"";continue}}let r=i;switch(r.type){case"space":{n+=this.renderer.space(r);continue}case"hr":{n+=this.renderer.hr(r);continue}case"heading":{n+=this.renderer.heading(r);continue}case"code":{n+=this.renderer.code(r);continue}case"table":{n+=this.renderer.table(r);continue}case"blockquote":{n+=this.renderer.blockquote(r);continue}case"list":{n+=this.renderer.list(r);continue}case"html":{n+=this.renderer.html(r);continue}case"paragraph":{n+=this.renderer.paragraph(r);continue}case"text":{let l=r,a=this.renderer.text(l);for(;s+1<t.length&&t[s+1].type==="text";)l=t[++s],a+=`
62
- `+this.renderer.text(l);e?n+=this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):n+=a;continue}default:{let l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,e){e=e||this.renderer;let n="";for(let s=0;s<t.length;s++){let i=t[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=l||"";continue}}let r=i;switch(r.type){case"escape":{n+=e.text(r);break}case"html":{n+=e.html(r);break}case"link":{n+=e.link(r);break}case"image":{n+=e.image(r);break}case"strong":{n+=e.strong(r);break}case"em":{n+=e.em(r);break}case"codespan":{n+=e.codespan(r);break}case"br":{n+=e.br(r);break}case"del":{n+=e.del(r);break}case"text":{n+=e.text(r);break}default:{let l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},P=class{options;block;constructor(t){this.options=t||E}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?A.lex:A.lexInline}provideParser(){return this.block?z.parse:z.parseInline}},X=class{defaults=W();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=z;Renderer=N;TextRenderer=Z;Lexer=A;Tokenizer=B;Hooks=P;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{let i=s;for(let r of i.header)n=n.concat(this.walkTokens(r.tokens,e));for(let r of i.rows)for(let l of r)n=n.concat(this.walkTokens(l.tokens,e));break}case"list":{let i=s;n=n.concat(this.walkTokens(i.items,e));break}default:{let i=s;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(r=>{let l=i[r].flat(1/0);n=n.concat(this.walkTokens(l,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let r=e.renderers[i.name];r?e.renderers[i.name]=function(...l){let a=i.renderer.apply(this,l);return a===!1&&(a=r.apply(this,l)),a}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=e[i.level];r?r.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),s.extensions=e),n.renderer){let i=this.defaults.renderer||new N(this.defaults);for(let r in n.renderer){if(!(r in i))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let l=r,a=n.renderer[l],u=i[l];i[l]=(...c)=>{let f=a.apply(i,c);return f===!1&&(f=u.apply(i,c)),f||""}}s.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new B(this.defaults);for(let r in n.tokenizer){if(!(r in i))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let l=r,a=n.tokenizer[l],u=i[l];i[l]=(...c)=>{let f=a.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}s.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new P;for(let r in n.hooks){if(!(r in i))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let l=r,a=n.hooks[l],u=i[l];P.passThroughHooks.has(r)?i[l]=c=>{if(this.defaults.async)return Promise.resolve(a.call(i,c)).then(g=>u.call(i,g));let f=a.call(i,c);return u.call(i,f)}:i[l]=(...c)=>{let f=a.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}s.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,r=n.walkTokens;s.walkTokens=function(l){let a=[];return a.push(r.call(this,l)),i&&(a=a.concat(i.call(this,l))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return A.lex(t,e??this.defaults)}parser(t,e){return z.parse(t,e??this.defaults)}parseMarkdown(t){return(n,s)=>{let i={...s},r={...this.defaults,...i},l=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=t);let a=r.hooks?r.hooks.provideLexer():t?A.lex:A.lexInline,u=r.hooks?r.hooks.provideParser():t?z.parse:z.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(c=>a(c,r)).then(c=>r.hooks?r.hooks.processAllTokens(c):c).then(c=>r.walkTokens?Promise.all(this.walkTokens(c,r.walkTokens)).then(()=>c):c).then(c=>u(c,r)).then(c=>r.hooks?r.hooks.postprocess(c):c).catch(l);try{r.hooks&&(n=r.hooks.preprocess(n));let c=a(n,r);r.hooks&&(c=r.hooks.processAllTokens(c)),r.walkTokens&&this.walkTokens(c,r.walkTokens);let f=u(c,r);return r.hooks&&(f=r.hooks.postprocess(f)),f}catch(c){return l(c)}}}onError(t,e){return n=>{if(n.message+=`
63
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+L(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},I=new X;function x(o,t){return I.parse(o,t)}x.options=x.setOptions=function(o){return I.setOptions(o),x.defaults=I.defaults,he(x.defaults),x};x.getDefaults=W;x.defaults=E;x.use=function(...o){return I.use(...o),x.defaults=I.defaults,he(x.defaults),x};x.walkTokens=function(o,t){return I.walkTokens(o,t)};x.parseInline=I.parseInline;x.Parser=z;x.parser=z.parse;x.Renderer=N;x.TextRenderer=Z;x.Lexer=A;x.lexer=A.lex;x.Tokenizer=B;x.Hooks=P;x.parse=x;var ot=x.options,at=x.setOptions,ht=x.use,ct=x.walkTokens,ut=x.parseInline,xe=x,pt=z.parse,ft=A.lex;var _e=ve(me(),1),we={meta:{type:"const",value:{pluginName:"plugin_markup",description:"HTML\u6574\u5F62\u3084\u30DE\u30FC\u30AF\u30C0\u30A6\u30F3\u5909\u63DB\u306A\u3069\u306E\u547D\u4EE4\u3092\u63D0\u4F9B\u3059\u308B\u30D7\u30E9\u30B0\u30A4\u30F3",pluginVersion:"3.6.0",nakoRuntime:["wnako","cnako"],nakoVersion:"3.6.0"}},\u30DE\u30FC\u30AF\u30C0\u30A6\u30F3HTML\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(o){return xe(o)}},HTML\u6574\u5F62:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(o){return _e.default.prettyPrint(o,{indent_size:2})}}},xt=we;typeof navigator=="object"&&typeof navigator.nako3=="object"&&navigator.nako3.addPluginObject("PluginMarkup",we);})();
58
+ `}tablerow({text:e}){return`<tr>
59
+ ${e}</tr>
60
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
61
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${C(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),r=oe(e);if(r===null)return s;e=r;let i='<a href="'+e+'"';return t&&(i+=' title="'+C(t)+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=oe(e);if(r===null)return C(n);e=r;let i=`<img src="${e}" alt="${n}"`;return t&&(i+=` title="${C(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:C(e.text)}},D=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},v=class a{options;renderer;textRenderer;constructor(e){this.options=e||I,this.options.renderer=this.options.renderer||new N,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new D}static parse(e,t){return new a(t).parse(e)}static parseInline(e,t){return new a(t).parseInline(e)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let l=r,o=this.options.extensions.renderers[l.type].call({parser:this},l);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){n+=o||"";continue}}let i=r;switch(i.type){case"space":{n+=this.renderer.space(i);continue}case"hr":{n+=this.renderer.hr(i);continue}case"heading":{n+=this.renderer.heading(i);continue}case"code":{n+=this.renderer.code(i);continue}case"table":{n+=this.renderer.table(i);continue}case"blockquote":{n+=this.renderer.blockquote(i);continue}case"list":{n+=this.renderer.list(i);continue}case"html":{n+=this.renderer.html(i);continue}case"paragraph":{n+=this.renderer.paragraph(i);continue}case"text":{let l=i,o=this.renderer.text(l);for(;s+1<e.length&&e[s+1].type==="text";)l=e[++s],o+=`
62
+ `+this.renderer.text(l);t?n+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):n+=o;continue}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,t=this.renderer){let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let l=this.options.extensions.renderers[r.type].call({parser:this},r);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=l||"";continue}}let i=r;switch(i.type){case"escape":{n+=t.text(i);break}case"html":{n+=t.html(i);break}case"link":{n+=t.link(i);break}case"image":{n+=t.image(i);break}case"strong":{n+=t.strong(i);break}case"em":{n+=t.em(i);break}case"codespan":{n+=t.codespan(i);break}case"br":{n+=t.br(i);break}case"del":{n+=t.del(i);break}case"text":{n+=t.text(i);break}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},P=class{options;block;constructor(e){this.options=e||I}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?A.lex:A.lexInline}provideParser(){return this.block?v.parse:v.parseInline}},X=class{defaults=W();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=v;Renderer=N;TextRenderer=D;Lexer=A;Tokenizer=B;Hooks=P;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{let r=s;for(let i of r.header)n=n.concat(this.walkTokens(i.tokens,t));for(let i of r.rows)for(let l of i)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,t));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let l=r[i].flat(1/0);n=n.concat(this.walkTokens(l,t))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=t.renderers[r.name];i?t.renderers[r.name]=function(...l){let o=r.renderer.apply(this,l);return o===!1&&(o=i.apply(this,l)),o}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[r.level];i?i.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new N(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,o=n.renderer[l],h=r[l];r[l]=(...p)=>{let f=o.apply(r,p);return f===!1&&(f=h.apply(r,p)),f||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new B(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,o=n.tokenizer[l],h=r[l];r[l]=(...p)=>{let f=o.apply(r,p);return f===!1&&(f=h.apply(r,p)),f}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new P;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,o=n.hooks[l],h=r[l];P.passThroughHooks.has(i)?r[l]=p=>{if(this.defaults.async)return Promise.resolve(o.call(r,p)).then(m=>h.call(r,m));let f=o.call(r,p);return h.call(r,f)}:r[l]=(...p)=>{let f=o.apply(r,p);return f===!1&&(f=h.apply(r,p)),f}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(l){let o=[];return o.push(i.call(this,l)),r&&(o=o.concat(r.call(this,l))),o}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return A.lex(e,t??this.defaults)}parser(e,t){return v.parse(e,t??this.defaults)}parseMarkdown(e){return(n,s)=>{let r={...s},i={...this.defaults,...r},l=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?A.lex:A.lexInline,h=i.hooks?i.hooks.provideParser():e?v.parse:v.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(p=>o(p,i)).then(p=>i.hooks?i.hooks.processAllTokens(p):p).then(p=>i.walkTokens?Promise.all(this.walkTokens(p,i.walkTokens)).then(()=>p):p).then(p=>h(p,i)).then(p=>i.hooks?i.hooks.postprocess(p):p).catch(l);try{i.hooks&&(n=i.hooks.preprocess(n));let p=o(n,i);i.hooks&&(p=i.hooks.processAllTokens(p)),i.walkTokens&&this.walkTokens(p,i.walkTokens);let f=h(p,i);return i.hooks&&(f=i.hooks.postprocess(f)),f}catch(p){return l(p)}}}onError(e,t){return n=>{if(n.message+=`
63
+ Please report this to https://github.com/markedjs/marked.`,e){let s="<p>An error occurred:</p><pre>"+C(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},E=new X;function b(a,e){return E.parse(a,e)}b.options=b.setOptions=function(a){return E.setOptions(a),b.defaults=E.defaults,pe(b.defaults),b};b.getDefaults=W;b.defaults=I;b.use=function(...a){return E.use(...a),b.defaults=E.defaults,pe(b.defaults),b};b.walkTokens=function(a,e){return E.walkTokens(a,e)};b.parseInline=E.parseInline;b.Parser=v;b.parser=v.parse;b.Renderer=N;b.TextRenderer=D;b.Lexer=A;b.lexer=A.lex;b.Tokenizer=B;b.Hooks=P;b.parse=b;var xt=b.options,mt=b.setOptions,_t=b.use,wt=b.walkTokens,yt=b.parseInline,ye=b,Tt=v.parse,St=A.lex;var Re=Pe(Se(),1),$e={meta:{type:"const",value:{pluginName:"plugin_markup",description:"HTML\u6574\u5F62\u3084\u30DE\u30FC\u30AF\u30C0\u30A6\u30F3\u5909\u63DB\u306A\u3069\u306E\u547D\u4EE4\u3092\u63D0\u4F9B\u3059\u308B\u30D7\u30E9\u30B0\u30A4\u30F3",pluginVersion:"3.6.0",nakoRuntime:["wnako","cnako"],nakoVersion:"3.6.0"}},\u30DE\u30FC\u30AF\u30C0\u30A6\u30F3HTML\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(a){return ye(a)}},HTML\u6574\u5F62:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(a){return Re.default.prettyPrint(a,{indent_size:2})}}},vt=$e;typeof navigator=="object"&&typeof navigator.nako3=="object"&&navigator.nako3.addPluginObject("PluginMarkup",$e);})();
64
64
  //# sourceMappingURL=plugin_markup.js.map