PageSourceSearch

https://papergames.io/en/chunk-56SBPUW3.js

js papergames.io collected 2026-10-03 22:15:30 UTC 47,633 bytes, 50 lines download raw bytes

vendor: 4,612 bytes, lines 1-9
1import{A as S,O as De,U as Pe,q as ve}from"./chunk-ZJMZLXYY.js";import{Ab as Te,D as he,F as pe,Hb as Ee,Ka as be,Mc as Ce,Nb as j,Oc as Ie,P as ue,Pb as $e,Pc as ze,T as de,Ub as W,Va as N,Yc as Oe,Zc as Ae,_a as we,f as M,ga as fe,gb as ye,ia as ge,ja as me,ka as ke,md as X,n as ce,nc as Se,nd as K,sa as xe,t as Q,va as O,vc as Re,wc as _e,ya as E}from"./chunk-ZU6GPA3X.js";import{a as m,b as C,i as ae}from"./chunk-Y3NN2N5T.js";function Y(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _=Y();function Fe(a){_=a}var qe=/[&<>"']/,tt=new RegExp(qe.source,"g"),Ue=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,nt=new RegExp(Ue.source,"g"),it={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Le=a=>it[a];function x(a,n){if(n){if(qe.test(a))return a.replace(tt,Le)}else if(Ue.test(a))return a.replace(nt,Le);return a}var st=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function rt(a){return a.replace(st,(n,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}var ot=/(^|[^\[])\^/g;function g(a,n){let e=typeof a=="string"?a:a.source;n=n||"";let t={replace:(i,s)=>{let r=typeof s=="string"?s:s.source;return r=r.replace(ot,"$1"),e=e.replace(i,r),t},getRegex:()=>new RegExp(e,n)};return t}function Me(a){try{a=encodeURI(a).replace(/%25/g,"%")}catch{return null}return a}var v={exec:()=>null};function Ne(a,n){let e=a.replace(/\|/g,(s,r,o)=>{let l=!1,p=r;for(;--p>=0&&o[p]==="\\";)l=!l;return l?"|":" |"}),t=e.split(/ \|/),i=0;if(t[0].trim()||t.shift(),t.length>0&&!t[t.length-1].trim()&&t.pop(),n)if(t.length>n)t.splice(n);else for(;t.length<n;)t.push("");for(;i<t.length;i++)t[i]=t[i].trim().replace(/\\\|/g,"|");return t}function B(a,n,e){let t=a.length;if(t===0)return"";let i=0;for(;i<t;){let s=a.charAt(t-i-1);if(s===n&&!e)i++;else if(s!==n&&e)i++;else break}return a.slice(0,t-i)}function lt(a,n){if(a.indexOf(n[1])===-1)return-1;let e=0;for(let t=0;t<a.length;t++)if(a[t]==="\\")t++;else if(a[t]===n[0])e++;else if(a[t]===n[1]&&(e--,e<0))return t;return-1}function je(a,n,e,t){let i=n.href,s=n.title?x(n.title):null,r=a[1].replace(/\\([\[\]])/g,"$1");if(a[0].charAt(0)!=="!"){t.state.inLink=!0;let o={type:"link",raw:e,href:i,title:s,text:r,tokens:t.inlineTokens(r)};return t.state.inLink=!1,o}return{type:"image",raw:e,href:i,title:s,text:x(r)}}function at(a,n){let e=a.match(/^(\s+)(?:```)/);if(e===null)return n;let t=e[1];return n.split(`
2`).map(i=>{let s=i.match(/^\s+/);if(s===null)return i;let[r]=s;return r.length>=t.length?i.slice(t.length):i}).join(`
3`)}var z=class{options;rules;lexer;constructor(n){this.options=n||_}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:B(t,`
4`)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],i=at(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(/#$/.test(t)){let i=B(t,"#");(this.options.pedantic||!i||/ $/.test(i))&&(t=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:e[0]}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
5    $1`);t=B(t.replace(/^ *>[ \t]?/gm,""),`
6`);let i=this.lexer.state.top;this.lexer.state.top=!0;let s=this.lexer.blockTokens(t);return this.lexer.state.top=i,{type:"blockquote",raw:e[0],tokens:s,text:t}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),i=t.length>1,s={type:"list",raw:"",ordered:i,start:i?+t.slice(0,-1):"",loose:!1,items:[]};t=i?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=i?t:"[*+-]");let r=new RegExp(`^( {0,3}${t})((?:[	 ][^\\n]*)?(?:\\n|$))`),o="",l="",p=!1;for(;n;){let c=!1;if(!(e=r.exec(n))||this.rules.block.hr.test(n))break;o=e[0],n=n.substring(o.length);let u=e[2].split(`
7`,1)[0].replace(/^\t+/,H=>" ".repeat(3*H.length)),h=n.split(`
8`,1)[0],d=0;this.options.pedantic?(d=2,l=u.trimStart()):(d=e[2].search(/[^ ]/),d=d>4?1:d,l=u.slice(d),d+=e[1].length);let k=!1;if(!u&&/^ *$/.test(h)&&(o+=h+`
9`,n=n.substring(h.length+1),c=!0),!c){let H=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}
9[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),re=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),oe=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),le=new RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;n;){let Z=n.split(`
10`,1)[0];if(h=Z,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),oe.test(h)||le.test(h)||H.test(h)||re.test(n))break;if(h.search(/[^ ]/)>=d||!h.trim())l+=`
11`+h.slice(d);else{if(k||u.search(/[^ ]/)>=4||oe.test(u)||le.test(u)||re.test(u))break;l+=`
12`+h}!k&&!h.trim()&&(k=!0),o+=Z+`
13`,n=n.substring(Z.length+1),u=h.slice(d)}}s.loose||(p?s.loose=!0:/\n *\n *$/.test(o)&&(p=!0));let b=null,$;this.options.gfm&&(b=/^\[[ xX]\] /.exec(l),b&&($=b[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:o,task:!!b,checked:$,loose:!1,text:l,tokens:[]}),s.raw+=o}s.items[s.items.length-1].raw=o.trimEnd(),s.items[s.items.length-1].text=l.trimEnd(),s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let u=s.items[c].tokens.filter(d=>d.type==="space"),h=u.length>0&&u.some(d=>/\n.*\n/.test(d.raw));s.loose=h}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(/\s+/g," "),i=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:i,title:s}}}table(n){let e=this.rules.block.table.exec(n);if(!e||!/[:|]/.test(e[2]))return;let t=Ne(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),s=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
14`):[],r={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let o of i)/^ *-+: *$/.test(o)?r.align.push("right"):/^ *:-+: *$/.test(o)?r.align.push("center"):/^ *:-+ *$/.test(o)?r.align.push("left"):r.align.push(null);for(let o of t)r.header.push({text:o,tokens:this.lexer.inline(o)});
vendor: 4,146 bytes, lines 14-15
14for(let o of s)r.rows.push(Ne(o,r.header.length).map(l=>({text:l,tokens:this.lexer.inline(l)})));return r}}lheading(n){let e=this.rules.block.lheading.exec(n);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(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
15`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:x(e[1])}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.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(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;let r=B(t.slice(0,-1),"\\");if((t.length-r.length)%2===0)return}else{let r=lt(e[2],"()");if(r>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+r;e[2]=e[2].substring(0,r),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=e[2],s="";if(this.options.pedantic){let r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);r&&(i=r[1],s=r[3])}else s=e[3]?e[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(t)?i=i.slice(1):i=i.slice(1,-1)),je(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let i=(t[2]||t[1]).replace(/\s+/g," "),s=e[i.toLowerCase()];if(!s){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return je(t,s,t[0],this.lexer)}}emStrong(n,e,t=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!i||i[3]&&t.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!t||this.rules.inline.punctuation.exec(t)){let r=[...i[0]].length-1,o,l,p=r,c=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*n.length+r);(i=u.exec(e))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(l=[...o].length,i[3]||i[4]){p+=l;continue}else if((i[5]||i[6])&&r%3&&!((r+l)%3)){c+=l;continue}if(p-=l,p>0)continue;l=Math.min(l,l+p+c);let h=[...i[0]][0].length,d=n.slice(0,r+i.index+h+l);if(Math.min(r,l)%2){let b=d.slice(1,-1);return{type:"em",raw:d,text:b,tokens:this.lexer.inlineTokens(b)}}let k=d.slice(2,-2);return{type:"strong",raw:d,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(/\n/g," "),i=/[^ ]/.test(t),s=/^ /.test(t)&&/ $/.test(t);return i&&s&&(t=t.substring(1,t.length-1)),t=x(t,!0),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,i;return e[2]==="@"?(t=x(e[1]),i="mailto:"+t):(t=x(e[1]),i=t),{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,i;if(e[2]==="@")t=x(e[0]),i="mailto:"+t;else{let s;do s=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(s!==e[0]);t=x(e[0]),e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t;return this.lexer.state.inRawBlock?t=e[0]:t=x(e[0]),{type:"text",raw:e[0],text:t}}}},ct=/^(?: *(?:\n|$))+/,ht=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,pt=/^ {0,3}(`{3,}
15(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ut=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,He=/(?:[*+-]|\d{1,9}[.)])/,Ze=g(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,He).replace(/blockCode/g,/ {4}/).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(),G=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,dt=/^[^\n]+/,ee=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ft=g(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",ee).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gt=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,He).getRegex(),U="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]*?(?:-->|$))/,mt=g("^ {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",U).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qe=g(G).replace("hr",P).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",U).getRegex(),kt=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qe).getRegex(),ne={blockquote:kt,code:ht,def:ft,fences:pt,heading:ut,hr:P,html:mt,lheading:Ze,list:gt,newline:ct,paragraph:Qe,table:v,text:dt},Be=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",U).getRegex(),xt=C(m({},ne),{table:Be,paragraph:g(G).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Be).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",U).getRegex()}),bt=C(m({},ne),{html:g(`^ *(?: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:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(G).replace("hr",P).replace("heading",` *#{1,6} *[^
16]`).replace("lheading",Ze).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),We=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xe=/^( {2,}|\\)\n(?!\s*$)/,yt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,L="\\p{P}\\p{S}",Tt=g(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,L).getRegex(),Et=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>
vendor: 7,353 bytes, lines 16-26
16/g,$t=g(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,L).getRegex(),St=g("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,L).getRegex(),Rt=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,L).getRegex(),_t=g(/\\([punct])/,"gu").replace(/punct/g,L).getRegex(),Ct=g(/^<(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(),It=g(te).replace("(?:-->|$)","-->").getRegex(),zt=g("^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",It).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),q=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ot=g(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",q).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ke=g(/^!?\[(label)\]\[(ref)\]/).replace("label",q).replace("ref",ee).getRegex(),Ve=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",ee).getRegex(),At=g("reflink|nolink(?!\\()","g").replace("reflink",Ke).replace("nolink",Ve).getRegex(),ie={_backpedal:v,anyPunctuation:_t,autolink:Ct,blockSkip:Et,br:Xe,code:wt,del:v,emStrongLDelim:$t,emStrongRDelimAst:St,emStrongRDelimUnd:Rt,escape:We,link:Ot,nolink:Ve,punctuation:Tt,reflink:Ke,reflinkSearch:At,tag:zt,text:yt,url:v},vt=C(m({},ie),{link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",q).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q).getRegex()}),V=C(m({},ie),{escape:g(We).replace("])","~|])").getRegex(),url:g(/^((?: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\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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Dt=C(m({},V),{br:g(Xe).replace("{2,}","*").getRegex(),text:g(V.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),F={normal:ne,gfm:xt,pedantic:bt},A={normal:ie,gfm:V,breaks:Dt,pedantic:vt},y=class a{tokens;options;state;tokenizer;inlineQueue;constructor(n){this.tokens=[],this.tokens.links=Object.create(null),this.options=n||_,this.options.tokenizer=this.options.tokenizer||new z,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={block:F.normal,inline:A.normal};this.options.pedantic?(e.block=F.pedantic,e.inline=A.pedantic):this.options.gfm&&(e.block=F.gfm,this.options.breaks?e.inline=A.breaks:e.inline=A.gfm),this.tokenizer.rules=e}static get rules(){return{block:F,inline:A}}static lex(n,e){return new a(e).lex(n)}static lexInline(n,e){return new a(e).inlineTokens(n)}lex(n){n=n.replace(/\r\n|\r/g,`
17`),this.blockTokens(n,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(n,e=[]){this.options.pedantic?n=n.replace(/\t/g,"    ").replace(/^ +$/gm,""):n=n.replace(/^( *)(\t+)/gm,(o,l,p)=>l+"    ".repeat(p.length));let t,i,s,r;for(;n;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(t=o.call({lexer:this},n,e))?(n=n.substring(t.raw.length),e.push(t),!0):!1))){if(t=this.tokenizer.space(n)){n=n.substring(t.raw.length),t.raw.length===1&&e.length>0?e[e.length-1].raw+=`
18`:e.push(t);continue}if(t=this.tokenizer.code(n)){n=n.substring(t.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
19`+t.raw,i.text+=`
20`+t.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(t);continue}if(t=this.tokenizer.fences(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.heading(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.hr(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.blockquote(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.list(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.html(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.def(n)){n=n.substring(t.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
21`+t.raw,i.text+=`
22`+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title});continue}if(t=this.tokenizer.table(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.lheading(n)){n=n.substring(t.raw.length),e.push(t);continue}if(s=n,this.options.extensions&&this.options.extensions.startBlock){let o=1/0,l=n.slice(1),p;this.options.extensions.startBlock.forEach(c=>{p=c.call({lexer:this},l),typeof p=="number"&&p>=0&&(o=Math.min(o,p))}),o<1/0&&o>=0&&(s=n.substring(0,o+1))}if(this.state.top&&(t=this.tokenizer.paragraph(s))){i=e[e.length-1],r&&i.type==="paragraph"?(i.raw+=`
23`+t.raw,i.text+=`
24`+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(t),r=s.length!==n.length,n=n.substring(t.raw.length);continue}if(t=this.tokenizer.text(n)){n=n.substring(t.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=`
25`+t.raw,i.text+=`
26`+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(t);continue}if(n){let o="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,e}inline(n,e=[]){return this.inlineQueue.push({src:n,tokens:e}),e}inlineTokens(n,e=[]){let t,i,s,r=n,o,l,p;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;n;)if(l||(p=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>
vendor: 8,951 bytes, lines 26-45
26(t=c.call({lexer:this},n,e))?(n=n.substring(t.raw.length),e.push(t),!0):!1))){if(t=this.tokenizer.escape(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.tag(n)){n=n.substring(t.raw.length),i=e[e.length-1],i&&t.type==="text"&&i.type==="text"?(i.raw+=t.raw,i.text+=t.text):e.push(t);continue}if(t=this.tokenizer.link(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(t.raw.length),i=e[e.length-1],i&&t.type==="text"&&i.type==="text"?(i.raw+=t.raw,i.text+=t.text):e.push(t);continue}if(t=this.tokenizer.emStrong(n,r,p)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.codespan(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.br(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.del(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.autolink(n)){n=n.substring(t.raw.length),e.push(t);continue}if(!this.state.inLink&&(t=this.tokenizer.url(n))){n=n.substring(t.raw.length),e.push(t);continue}if(s=n,this.options.extensions&&this.options.extensions.startInline){let c=1/0,u=n.slice(1),h;this.options.extensions.startInline.forEach(d=>{h=d.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(s=n.substring(0,c+1))}if(t=this.tokenizer.inlineText(s)){n=n.substring(t.raw.length),t.raw.slice(-1)!=="_"&&(p=t.raw.slice(-1)),l=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=t.raw,i.text+=t.text):e.push(t);continue}if(n){let c="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}},w=class{options;constructor(n){this.options=n||_}code(n,e,t){let i=(e||"").match(/^\S*/)?.[0];return n=n.replace(/\n$/,"")+`
27`,i?'<pre><code class="language-'+x(i)+'">'+(t?n:x(n,!0))+`</code></pre>
28`:"<pre><code>"+(t?n:x(n,!0))+`</code></pre>
29`}blockquote(n){return`<blockquote>
30${n}</blockquote>
31`}html(n,e){return n}heading(n,e,t){return`<h${e}>${n}</h${e}>
32`}hr(){return`<hr>
33`}list(n,e,t){let i=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+i+s+`>
34`+n+"</"+i+`>
35`}listitem(n,e,t){return`<li>${n}</li>
36`}checkbox(n){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(n){return`<p>${n}</p>
37`}table(n,e){return e&&(e=`<tbody>${e}</tbody>`),`<table>
38<thead>
39`+n+`</thead>
40`+e+`</table>
41`}tablerow(n){return`<tr>
42${n}</tr>
43`}tablecell(n,e){let t=e.header?"th":"td";return(e.align?`<${t} align="${e.align}">`:`<${t}>`)+n+`</${t}>
44`}strong(n){return`<strong>${n}</strong>`}em(n){return`<em>${n}</em>`}codespan(n){return`<code>${n}</code>`}br(){return"<br>"}del(n){return`<del>${n}</del>`}link(n,e,t){let i=Me(n);if(i===null)return t;n=i;let s='<a href="'+n+'"';return e&&(s+=' title="'+e+'"'),s+=">"+t+"</a>",s}image(n,e,t){let i=Me(n);if(i===null)return t;n=i;let s=`<img src="${n}" alt="${t}"`;return e&&(s+=` title="${e}"`),s+=">",s}text(n){return n}},D=class{strong(n){return n}em(n){return n}codespan(n){return n}del(n){return n}html(n){return n}text(n){return n}link(n,e,t){return""+t}image(n,e,t){return""+t}br(){return""}},T=class a{options;renderer;textRenderer;constructor(n){this.options=n||_,this.options.renderer=this.options.renderer||new w,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new D}static parse(n,e){return new a(e).parse(n)}static parseInline(n,e){return new a(e).parseInline(n)}parse(n,e=!0){let t="";for(let i=0;i<n.length;i++){let s=n[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){let r=s,o=this.options.extensions.renderers[r.type].call({parser:this},r);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(r.type)){t+=o||"";continue}}switch(s.type){case"space":continue;case"hr":{t+=this.renderer.hr();continue}case"heading":{let r=s;t+=this.renderer.heading(this.parseInline(r.tokens),r.depth,rt(this.parseInline(r.tokens,this.textRenderer)));continue}case"code":{let r=s;t+=this.renderer.code(r.text,r.lang,!!r.escaped);continue}case"table":{let r=s,o="",l="";for(let c=0;c<r.header.length;c++)l+=this.renderer.tablecell(this.parseInline(r.header[c].tokens),{header:!0,align:r.align[c]});o+=this.renderer.tablerow(l);let p="";for(let c=0;c<r.rows.length;c++){let u=r.rows[c];l="";for(let h=0;h<u.length;h++)l+=this.renderer.tablecell(this.parseInline(u[h].tokens),{header:!1,align:r.align[h]});p+=this.renderer.tablerow(l)}t+=this.renderer.table(o,p);continue}case"blockquote":{let r=s,o=this.parse(r.tokens);t+=this.renderer.blockquote(o);continue}case"list":{let r=s,o=r.ordered,l=r.start,p=r.loose,c="";for(let u=0;u<r.items.length;u++){let h=r.items[u],d=h.checked,k=h.task,b="";if(h.task){let $=this.renderer.checkbox(!!d);p?h.tokens.length>0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=$+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=$+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:$+" "}):b+=$+" "}b+=this.parse(h.tokens,p),c+=this.renderer.listitem(b,k,!!d)}t+=this.renderer.list(c,o,l);continue}case"html":{let r=s;t+=this.renderer.html(r.text,r.block);continue}case"paragraph":{let r=s;t+=this.renderer.paragraph(this.parseInline(r.tokens));continue}case"text":{let r=s,o=r.tokens?this.parseInline(r.tokens):r.text;for(;i+1<n.length&&n[i+1].type==="text";)r=n[++i],o+=`
45`+(r.tokens?this.parseInline(r.tokens):r.text);t+=e?this.renderer.paragraph(o):o;continue}default:{let r='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return t}parseInline(n,e){e=e||this.renderer;let t="";for(let i=0;i<n.length;i++){let s=n[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){let r=this.options.extensions.renderers[s.type].call({parser:this},s);if(r!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){t+=r||"";continue}}switch(s.type){case"escape":{let r=s;t+=e.text(r.text);break}case"html":{let r=s;t+=e.html(r.text);break}case"link":{let r=s;t+=e.link(r.href,r.title,this.parseInline(r.tokens,e));break}case"image":{let r=s;t+=e.image(r.href,r.title,r.text);break}case"strong":{let r=s;t+=e.strong(this.parseInline(r.tokens,e));break}case"em":{let r=s;t+=e.em(this.parseInline(r.tokens,e));break}case"codespan":{let r=s;t+=e.codespan(r.text);break}case"br":{t+=e.br();break}case"del":{let r=s;t+=e.del(this.parseInline(r.tokens,e));break}case"text":{let r=s;t+=e.text(r.text);break}default:{let r='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return t}},I=class{options;constructor(n){this.options=n||_}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}},J=class{defaults=Y();options=this.setOptions;parse=this.#e(y.lex,T.parse);parseInline=this.#e(y.lexInline,T.parseInline);Parser=T;Renderer=w;TextRenderer=D;Lexer=y;Tokenizer=z;Hooks=I;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(let i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let s=i;for(let r of s.header)t=t.concat(this.walkTokens(r.tokens,e));for(let r of s.rows)for(let o of r)t=t.concat(this.walkTokens(o.tokens,e));break}case"list":{let s=i;t=t.concat(this.walkTokens(s.items,e));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(r=>{let o=s[r].flat(1/0);t=t.concat(this.walkTokens(o,e))}):s.tokens&&(t=t.concat(this.walkTokens(s.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let i=m({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let r=e.renderers[s.name];r?e.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=r.apply(this,o)),l}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=e[s.level];r?r.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),i.extensions=e),t.renderer){let s=this.defaults.renderer||new w(this.defaults);for(let r in t.renderer){if(!(r in s))throw new Error(`renderer '${r}' does not exist`);if(r==="options")continue;let o=r,l=t.renderer[o],p=s[o];s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=p.apply(s,c)),u||""}}i.renderer=s}
45if(t.tokenizer){let s=this.defaults.tokenizer||new z(this.defaults);for(let r in t.tokenizer){if(!(r in s))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let o=r,l=t.tokenizer[o],p=s[o];s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=p.apply(s,c)),u}}i.tokenizer=s}if(t.hooks){let s=this.defaults.hooks||new I;for(let r in t.hooks){if(!(r in s))throw new Error(`hook '${r}' does not exist`);if(r==="options")continue;let o=r,l=t.hooks[o],p=s[o];I.passThroughHooks.has(r)?s[o]=c=>{if(this.defaults.async)return Promise.resolve(l.call(s,c)).then(h=>p.call(s,h));let u=l.call(s,c);return p.call(s,u)}:s[o]=(...c)=>{let u=l.apply(s,c);return u===!1&&(u=p.apply(s,c)),u}}i.hooks=s}if(t.walkTokens){let s=this.defaults.walkTokens,r=t.walkTokens;i.walkTokens=function(o){let l=[];return l.push(r.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}this.defaults=m(m({},this.defaults),i)}),this}setOptions(n){return this.defaults=m(m({},this.defaults),n),this}lexer(n,e){return y.lex(n,e??this.defaults)}parser(n,e){return T.parse(n,e??this.defaults)}#e(n,e){return(t,i)=>{let s=m({},i),r=m(m({},this.defaults),s);this.defaults.async===!0&&s.async===!1&&(r.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),r.async=!0);let o=this.#t(!!r.silent,!!r.async);if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r),r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then(l=>n(l,r)).then(l=>r.hooks?r.hooks.processAllTokens(l):l).then(l=>r.walkTokens?Promise.all(this.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>e(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(o);try{r.hooks&&(t=r.hooks.preprocess(t));let l=n(t,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let p=e(l,r);return r.hooks&&(p=r.hooks.postprocess(p)),p}catch(l){return o(l)}}}#t(n,e){return t=>{if(t.message+=`
46Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+x(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},R=new J;function f(a,n){return R.parse(a,n)}f.options=f.setOptions=function(a){return R.setOptions(a),f.defaults=R.defaults,Fe(f.defaults),f};f.getDefaults=Y;f.defaults=_;f.use=function(...a){return R.use(...a),f.defaults=R.defaults,Fe(f.defaults),f};f.walkTokens=function(a,n){return R.walkTokens(a,n)};f.parseInline=R.parseInline;f.Parser=T;f.parser=T.parse;f.Renderer=w;f.TextRenderer=D;f.Lexer=y;f.lexer=y.lex;f.Tokenizer=z;f.Hooks=I;f.parse=f;var Wt=f.options,Xt=f.setOptions,Kt=f.use,Vt=f.walkTokens,Jt=f.parseInline;var Yt=T.parse,Gt=y.lex;var Pt=["*"],Lt="Copy",Mt="Copied",Nt=(()=>{class a{constructor(){this._buttonClick$=new M,this.copied$=this._buttonClick$.pipe(me(()=>pe(ce(!0),he(3e3).pipe(ue(!1)))),de(),fe(1)),this.copiedText$=this.copied$.pipe(ge(!1),Q(e=>e?Mt:Lt))}onCopyToClipboardClick(){this._buttonClick$.next()}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275cmp=W({type:a,selectors:[["markdown-clipboard"]],decls:4,vars:7,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(t,i){t&1&&(Re(0,"button",0),X(1,"async"),Ce("click",function(){return i.onCopyToClipboardClick()}),Oe(2),X(3,"async"),_e()),t&2&&(Se("copied",K(1,3,i.copied$)),Ee(2),Ae(K(3,5,i.copiedText$)))},dependencies:[ve],encapsulation:2,changeDetection:0})}}return a})(),jt=new O("CLIPBOARD_OPTIONS");var se=function(a){return a.CommandLine="command-line",a.LineHighlight="line-highlight",a.LineNumbers="line-numbers",a}(se||{}),Ye=new O("MARKED_EXTENSIONS"),Bt=new O("MARKED_OPTIONS"),Ft="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",qt="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",Ut="[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information",Ht="[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information",Zt="[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function",Qt="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information",Ge=new O("SECURITY_CONTEXT");var et=(()=>{class a{get options(){return this._options}set options(e){this._options=m(m({},this.DEFAULT_MARKED_OPTIONS),e)}get renderer(){return this.options.renderer}set renderer(e){this.options.renderer=e}constructor(e,t,i,s,r,o,l){this.clipboardOptions=e,this.extensions=t,this.platform=s,this.securityContext=r,this.http=o,this.sanitizer=l,this.DEFAULT_MARKED_OPTIONS={renderer:new w},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this._reload$=new M,this.reload$=this._reload$.asObservable(),this.options=i}parse(e,t=this.DEFAULT_PARSE_OPTIONS){let{decodeHtml:i,inline:s,emoji:r,mermaid:o,disableSanitizer:l}=t,p=m(m({},this.options),t.markedOptions),c=p.renderer||this.renderer||new w;this.extensions&&(this.renderer=this.extendsRendererForExtensions(c)),o&&(this.renderer=this.extendsRendererForMermaid(c));let u=this.trimIndentation(e),h=i?this.decodeHtml(u):u,d=r?this.parseEmoji(h):h,k=this.parseMarked(d,p,s);return(l?k:this.sanitizer.sanitize(this.securityContext,k))||""}render(e,t=this.DEFAULT_RENDER_OPTIONS,i){let{clipboard:s,clipboardOptions:r,katex:o,katexOptions:l,mermaid:p,mermaidOptions:c}=t;o&&this.renderKatex(e,m(m({},this.DEFAULT_KATEX_OPTIONS),l)),p&&this.renderMermaid(e,m(m({},this.DEFAULT_MERMAID_OPTIONS),c)),s&&this.renderClipboard(e,i,m(m(m({},this.DEFAULT_CLIPBOARD_OPTIONS),this.clipboardOptions),r)),this.highlight(e)}reload(){this._reload$.next()}getSource(e){if(!this.http)throw new Error(Qt);return this.http.get(e,{responseType:"text"}).pipe(Q(t=>this.handleExtension(e,t)))}highlight(e){if(!S(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;e||(e=document);let t=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(t,i=>i.classList.add("language-none")),Prism.highlightAllUnder(e)}decodeHtml(e){if(!S(this.platform))return e;let t=document.createElement("textarea");return t.innerHTML=e,t.value}extendsRendererForExtensions(e){let t=e;return t.\u0275NgxMarkdownRendererExtendedForExtensions===!0||(this.extensions?.length>0&&f.use(...this.extensions),t.\u0275NgxMarkdownRendererExtendedForExtensions=!0),e}extendsRendererForMermaid(e){let t=e;if(t.\u0275NgxMarkdownRendererExtendedForMermaid===!0)return e;let i=e.code;return e.code=function(s,r,o){return r==="mermaid"?`<div class="mermaid">${s}</div>`:i.call(this,s,r,o)},t.\u0275NgxMarkdownRendererExtendedForMermaid=!0,e}handleExtension(e,t){let i=e.lastIndexOf("://"),s=i>-1?e.substring(i+4):e,r=s.lastIndexOf("/"),o=r>-1?s.substring(r+1).split("?")[0]:"",l=o.lastIndexOf("."),p=l>-1?o.substring(l+1):"";return p&&p!=="md"?"```"+p+`
47`+t+"\n```":t}parseMarked(e,t,i=!1){if(t.renderer){let s=m({},t.renderer);delete s.\u0275NgxMarkdownRendererExtendedForExtensions,delete s.\u0275NgxMarkdownRendererExtendedForMermaid,delete t.renderer,f.use({renderer:s})}return i?f.parseInline(e,t):f.parse(e,t)}parseEmoji(e){if(!S(this.platform))return e;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error(Ft);return joypixels.shortnameToUnicode(e)}renderKatex(e,t){if(S(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error(qt);renderMathInElement(e,t)}}renderClipboard(e,t,i){if(!S(this.platform))return;if(typeof ClipboardJS>"u")throw new Error(Ht);if(!t)throw new Error(Zt);let{buttonComponent:s,buttonTemplate:r}=i,o=e.querySelectorAll("pre");for(let l=0;l<o.length;l++){let p=o.item(l),c=document.createElement("div");c.style.position="relative",p.parentNode.insertBefore(c,p),c.appendChild(p);let u=document.createElement("div");u.classList.add("markdown-clipboard-toolbar"),u.style.position="absolute",u.style.top=".5em",u.style.right=".5em",u.style.zIndex="1",c.insertAdjacentElement("beforeend",u),c.onmouseenter=()=>u.classList.add("hover"),c.onmouseleave=()=>u.classList.remove("hover");let h;if(s){let k=t.createComponent(s);h=k.hostView,k.changeDetectorRef.markForCheck()}else if(r)h=t.createEmbeddedView(r);else{let k=t.createComponent(Nt);h=k.hostView,k.changeDetectorRef.markForCheck()}let d;
47h.rootNodes.forEach(k=>{u.appendChild(k),d=new ClipboardJS(k,{text:()=>p.innerText})}),h.onDestroy(()=>d.destroy())}}renderMermaid(e,t=this.DEFAULT_MERMAID_OPTIONS){if(!S(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error(Ut);let i=e.querySelectorAll(".mermaid");i.length!==0&&(mermaid.initialize(t),mermaid.run({nodes:i}))}trimIndentation(e){if(!e)return"";let t;return e.split(`
48`).map(i=>{let s=t;return i.length>0&&(s=isNaN(s)?i.search(/\S|$/):Math.min(i.search(/\S|$/),s)),isNaN(t)&&(t=s),s?i.substring(s):i}).join(`
49`)}static{this.\u0275fac=function(t){return new(t||a)(E(jt,8),E(Ye,8),E(Bt,8),E(ye),E(Ge),E(De,8),E(Pe))}}static{this.\u0275prov=xe({token:a,factory:a.\u0275fac})}}return a})(),Rn=(()=>{class a{get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(e){this._disableSanitizer=this.coerceBooleanProperty(e)}get inline(){return this._inline}set inline(e){this._inline=this.coerceBooleanProperty(e)}get clipboard(){return this._clipboard}set clipboard(e){this._clipboard=this.coerceBooleanProperty(e)}get emoji(){return this._emoji}set emoji(e){this._emoji=this.coerceBooleanProperty(e)}get katex(){return this._katex}set katex(e){this._katex=this.coerceBooleanProperty(e)}get mermaid(){return this._mermaid}set mermaid(e){this._mermaid=this.coerceBooleanProperty(e)}get lineHighlight(){return this._lineHighlight}set lineHighlight(e){this._lineHighlight=this.coerceBooleanProperty(e)}get lineNumbers(){return this._lineNumbers}set lineNumbers(e){this._lineNumbers=this.coerceBooleanProperty(e)}get commandLine(){return this._commandLine}set commandLine(e){this._commandLine=this.coerceBooleanProperty(e)}constructor(e,t,i){this.element=e,this.markdownService=t,this.viewContainerRef=i,this.error=new N,this.load=new N,this.ready=new N,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new M}ngOnChanges(){this.loadContent()}loadContent(){if(this.data!=null){this.handleData();return}if(this.src!=null){this.handleSrc();return}}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(ke(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}render(e,t=!1){return ae(this,null,function*(){let i={decodeHtml:t,inline:this.inline,emoji:this.emoji,mermaid:this.mermaid,disableSanitizer:this.disableSanitizer},s={clipboard:this.clipboard,clipboardOptions:this.getClipboardOptions(),katex:this.katex,katexOptions:this.katexOptions,mermaid:this.mermaid,mermaidOptions:this.mermaidOptions},r=yield this.markdownService.parse(e,i);this.element.nativeElement.innerHTML=r,this.handlePlugins(),this.markdownService.render(this.element.nativeElement,s,this.viewContainerRef),this.ready.emit()})}coerceBooleanProperty(e){return e!=null&&`${String(e)}`!="false"}getClipboardOptions(){if(this.clipboardButtonComponent||this.clipboardButtonTemplate)return{buttonComponent:this.clipboardButtonComponent,buttonTemplate:this.clipboardButtonTemplate}}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:e=>{this.render(e).then(()=>{this.load.emit(e)})},error:e=>this.error.emit(e)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,se.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,se.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(e,t){let i=e.querySelectorAll("pre");for(let s=0;s<i.length;s++){let r=t instanceof Array?t:[t];i.item(s).classList.add(...r)}}setPluginOptions(e,t){let i=e.querySelectorAll("pre");for(let s=0;s<i.length;s++)Object.keys(t).forEach(r=>{let o=t[r];if(o){let l=this.toLispCase(r);i.item(s).setAttribute(l,o.toString())}})}toLispCase(e){let t=e.match(/([A-Z])/g);if(!t)return e;let i=e.toString();for(let s=0,r=t.length;s<r;s++)i=i.replace(new RegExp(t[s]),"-"+t[s].toLowerCase());return i.slice(0,1)==="-"&&(i=i.slice(1)),i}static{this.\u0275fac=function(t){return new(t||a)(j(we),j(et),j($e))}}static{this.\u0275cmp=W({type:a,selectors:[["markdown"],["","markdown",""]],inputs:{data:"data",src:"src",disableSanitizer:"disableSanitizer",inline:"inline",clipboard:"clipboard",clipboardButtonComponent:"
49clipboardButtonComponent",clipboardButtonTemplate:"clipboardButtonTemplate",emoji:"emoji",katex:"katex",katexOptions:"katexOptions",mermaid:"mermaid",mermaidOptions:"mermaidOptions",lineHighlight:"lineHighlight",line:"line",lineOffset:"lineOffset",lineNumbers:"lineNumbers",start:"start",commandLine:"commandLine",filterOutput:"filterOutput",host:"host",prompt:"prompt",output:"output",user:"user"},outputs:{error:"error",load:"load",ready:"ready"},features:[be],ngContentSelectors:Pt,decls:1,vars:0,template:function(t,i){t&1&&(Ie(),ze(0))},encapsulation:2})}}return a})();function _n(a){return[et,a?.loader??[],a?.clipboardOptions??[],a?.markedOptions??[],{provide:Ye,useValue:a?.markedExtensions??[]},{provide:Ge,useValue:a?.sanitize??Te.HTML}]}var Je;(function(a){let n;(function(i){i.Strict="strict",i.Loose="loose",i.Antiscript="antiscript",i.Sandbox="sandbox"})(n=a.SecurityLevel||(a.SecurityLevel={}));let e;(function(i){i.Base="base",i.Forest="forest",i.Dark="dark",i.Default="default",i.Neutral="neutral"})(e=a.Theme||(a.Theme={}));let t;(function(i){i[i.Debug=1]="Debug",i[i.Info=2]="Info",i[i.Warn=3]="Warn",i[i.Error=4]="Error",i[i.Fatal=5]="Fatal"})(t=a.LogLevel||(a.LogLevel={}))})(Je||(Je={}));export{Rn as a,_n as b};
50/**i18n:f02b524534ac24b1132b8e39493e341ce8905bc542cf180e9cd87b1999097251*/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.