@runtypelabs/persona 4.16.0 → 4.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,37 +1,37 @@
1
- var bi=Object.defineProperty;var un=l=>{throw TypeError(l)};var _i=(l,e,t)=>e in l?bi(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var E=(l,e,t)=>_i(l,typeof e!="symbol"?e+"":e,t),xi=(l,e,t)=>e.has(l)||un("Cannot "+t);var pn=(l,e,t)=>e.has(l)?un("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(l):e.set(l,t);var Xe=(l,e,t)=>(xi(l,e,"access private method"),t);function wt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var he=wt();function Tn(l){he=l}var kn=/[&<>"']/,yi=new RegExp(kn.source,"g"),bn=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,wi=new RegExp(bn.source,"g"),Ei={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fn=l=>Ei[l];function G(l,e){if(e){if(kn.test(l))return l.replace(yi,fn)}else if(bn.test(l))return l.replace(wi,fn);return l}var Ai=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Si(l){return l.replace(Ai,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}var Ri=/(^|[^\[])\^/g;function w(l,e){let t=typeof l=="string"?l:l.source;e=e||"";let n={replace:(s,o)=>{let r=typeof o=="string"?o:o.source;return r=r.replace(Ri,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}function hn(l){try{l=encodeURI(l).replace(/%25/g,"%")}catch{return null}return l}var Ce={exec:()=>null};function dn(l,e){let t=l.replace(/\|/g,(o,r,c)=>{let u=!1,g=r;for(;--g>=0&&c[g]==="\\";)u=!u;return u?"|":" |"}),n=t.split(/ \|/),s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-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(/\\\|/g,"|");return n}function Ve(l,e,t){let n=l.length;if(n===0)return"";let s=0;for(;s<n;){let o=l.charAt(n-s-1);if(o===e&&!t)s++;else if(o!==e&&t)s++;else break}return l.slice(0,n-s)}function Ii(l,e){if(l.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<l.length;n++)if(l[n]==="\\")n++;else if(l[n]===e[0])t++;else if(l[n]===e[1]&&(t--,t<0))return n;return-1}function mn(l,e,t,n){let s=e.href,o=e.title?G(e.title):null,r=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){n.state.inLink=!0;let c={type:"link",raw:t,href:s,title:o,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,c}return{type:"image",raw:t,href:s,title:o,text:G(r)}}function Oi(l,e){let t=l.match(/^(\s+)(?:```)/);if(t===null)return e;let n=t[1];return e.split(`
2
- `).map(s=>{let o=s.match(/^\s+/);if(o===null)return s;let[r]=o;return r.length>=n.length?s.slice(n.length):s}).join(`
3
- `)}var ye=class{constructor(e){E(this,"options");E(this,"rules");E(this,"lexer");this.options=e||he}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(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ve(n,`
4
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=Oi(n,t[3]||"");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(/#$/.test(n)){let s=Ve(n,"#");(this.options.pedantic||!s||/ $/.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:t[0]}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
5
- $1`);n=Ve(n.replace(/^ *>[ \t]?/gm,""),`
6
- `);let s=this.lexer.state.top;this.lexer.state.top=!0;let o=this.lexer.blockTokens(n);return this.lexer.state.top=s,{type:"blockquote",raw:t[0],tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),s=n.length>1,o={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=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),c="",u="",g=!1;for(;e;){let d=!1;if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let T=t[2].split(`
7
- `,1)[0].replace(/^\t+/,K=>" ".repeat(3*K.length)),m=e.split(`
8
- `,1)[0],x=0;this.options.pedantic?(x=2,u=T.trimStart()):(x=t[2].search(/[^ ]/),x=x>4?1:x,u=T.slice(x),x+=t[1].length);let q=!1;if(!T&&/^ *$/.test(m)&&(c+=m+`
9
- `,e=e.substring(m.length+1),d=!0),!d){let K=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),Se=new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),me=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),z=new RegExp(`^ {0,${Math.min(3,x-1)}}#`);for(;e;){let W=e.split(`
10
- `,1)[0];if(m=W,this.options.pedantic&&(m=m.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),me.test(m)||z.test(m)||K.test(m)||Se.test(e))break;if(m.search(/[^ ]/)>=x||!m.trim())u+=`
11
- `+m.slice(x);else{if(q||T.search(/[^ ]/)>=4||me.test(T)||z.test(T)||Se.test(T))break;u+=`
12
- `+m}!q&&!m.trim()&&(q=!0),c+=W+`
13
- `,e=e.substring(W.length+1),T=m.slice(x)}}o.loose||(g?o.loose=!0:/\n *\n *$/.test(c)&&(g=!0));let H=null,B;this.options.gfm&&(H=/^\[[ xX]\] /.exec(u),H&&(B=H[0]!=="[ ] ",u=u.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:c,task:!!H,checked:B,loose:!1,text:u,tokens:[]}),o.raw+=c}o.items[o.items.length-1].raw=c.trimEnd(),o.items[o.items.length-1].text=u.trimEnd(),o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let T=o.items[d].tokens.filter(x=>x.type==="space"),m=T.length>0&&T.some(x=>/\n.*\n/.test(x.raw));o.loose=m}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}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(/\s+/g," "),s=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=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:o}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;let n=dn(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
14
- `):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let c of s)/^ *-+: *$/.test(c)?r.align.push("right"):/^ *:-+: *$/.test(c)?r.align.push("center"):/^ *:-+ *$/.test(c)?r.align.push("left"):r.align.push(null);for(let c of n)r.header.push({text:c,tokens:this.lexer.inline(c)});for(let c of o)r.rows.push(dn(c,r.header.length).map(u=>({text:u,tokens:this.lexer.inline(u)})));return r}}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)===`
15
- `?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:G(t[1])}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.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&&/^</.test(n)){if(!/>$/.test(n))return;let r=Ve(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{let r=Ii(t[2],"()");if(r>-1){let u=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let s=t[2],o="";if(this.options.pedantic){let r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);r&&(s=r[1],o=r[3])}else o=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^</.test(s)&&(this.options.pedantic&&!/>$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),mn(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}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(/\s+/g," "),o=t[s.toLowerCase()];if(!o){let r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return mn(n,o,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let r=[...s[0]].length-1,c,u,g=r,d=0,T=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(T.lastIndex=0,t=t.slice(-1*e.length+r);(s=T.exec(t))!=null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(u=[...c].length,s[3]||s[4]){g+=u;continue}else if((s[5]||s[6])&&r%3&&!((r+u)%3)){d+=u;continue}if(g-=u,g>0)continue;u=Math.min(u,u+g+d);let m=[...s[0]][0].length,x=e.slice(0,r+s.index+m+u);if(Math.min(r,u)%2){let H=x.slice(1,-1);return{type:"em",raw:x,text:H,tokens:this.lexer.inlineTokens(H)}}let q=x.slice(2,-2);return{type:"strong",raw:x,text:q,tokens:this.lexer.inlineTokens(q)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," "),s=/[^ ]/.test(n),o=/^ /.test(n)&&/ $/.test(n);return s&&o&&(n=n.substring(1,n.length-1)),n=G(n,!0),{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=G(t[1]),s="mailto:"+n):(n=G(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=G(t[0]),s="mailto:"+n;else{let o;do o=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(o!==t[0]);n=G(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;return this.lexer.state.inRawBlock?n=t[0]:n=G(t[0]),{type:"text",raw:t[0],text:n}}}},Ni=/^(?: *(?:\n|$))+/,Li=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,Di=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Pe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ci=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_n=/(?:[*+-]|\d{1,9}[.)])/,xn=w(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,_n).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(),Et=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mi=/^[^\n]+/,At=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Pi=w(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",At).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zi=w(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_n).getRegex(),et="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",St=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$i=w("^ {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",St).replace("tag",et).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yn=w(Et).replace("hr",Pe).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",et).getRegex(),vi=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yn).getRegex(),Rt={blockquote:vi,code:Li,def:Pi,fences:Di,heading:Ci,hr:Pe,html:$i,lheading:xn,list:zi,newline:Ni,paragraph:yn,table:Ce,text:Mi},gn=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Pe).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",et).getRegex(),Ui={...Rt,table:gn,paragraph:w(Et).replace("hr",Pe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gn).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",et).getRegex()},Fi={...Rt,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",St).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:Ce,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(Et).replace("hr",Pe).replace("heading",` *#{1,6} *[^
16
- ]`).replace("lheading",xn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},wn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hi=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,En=/^( {2,}|\\)\n(?!\s*$)/,Bi=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ze="\\p{P}\\p{S}",Gi=w(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ze).getRegex(),Wi=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,ji=w(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ze).getRegex(),qi=w("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ze).getRegex(),Yi=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ze).getRegex(),Zi=w(/\\([punct])/,"gu").replace(/punct/g,ze).getRegex(),Xi=w(/^<(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(),Vi=w(St).replace("(?:-->|$)","-->").getRegex(),Qi=w("^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",Vi).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ke=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ki=w(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ke).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),An=w(/^!?\[(label)\]\[(ref)\]/).replace("label",Ke).replace("ref",At).getRegex(),Sn=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",At).getRegex(),Ji=w("reflink|nolink(?!\\()","g").replace("reflink",An).replace("nolink",Sn).getRegex(),It={_backpedal:Ce,anyPunctuation:Zi,autolink:Xi,blockSkip:Wi,br:En,code:Hi,del:Ce,emStrongLDelim:ji,emStrongRDelimAst:qi,emStrongRDelimUnd:Yi,escape:wn,link:Ki,nolink:Sn,punctuation:Gi,reflink:An,reflinkSearch:Ji,tag:Qi,text:Bi,url:Ce},es={...It,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",Ke).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ke).getRegex()},xt={...It,escape:w(wn).replace("])","~|])").getRegex(),url:w(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},ts={...xt,br:w(En).replace("{2,}","*").getRegex(),text:w(xt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Qe={normal:Rt,gfm:Ui,pedantic:Fi},De={normal:It,gfm:xt,breaks:ts,pedantic:es},ee=class l{constructor(e){E(this,"tokens");E(this,"options");E(this,"state");E(this,"tokenizer");E(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||he,this.options.tokenizer=this.options.tokenizer||new ye,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={block:Qe.normal,inline:De.normal};this.options.pedantic?(t.block=Qe.pedantic,t.inline=De.pedantic):this.options.gfm&&(t.block=Qe.gfm,this.options.breaks?t.inline=De.breaks:t.inline=De.gfm),this.tokenizer.rules=t}static get rules(){return{block:Qe,inline:De}}static lex(e,t){return new l(t).lex(e)}static lexInline(e,t){return new l(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
17
- `),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=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(c,u,g)=>u+" ".repeat(g.length));let n,s,o,r;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(c=>(n=c.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
18
- `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
19
- `+n.raw,s.text+=`
20
- `+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
21
- `+n.raw,s.text+=`
22
- `+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let c=1/0,u=e.slice(1),g;this.options.extensions.startBlock.forEach(d=>{g=d.call({lexer:this},u),typeof g=="number"&&g>=0&&(c=Math.min(c,g))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){s=t[t.length-1],r&&s.type==="paragraph"?(s.raw+=`
23
- `+n.raw,s.text+=`
24
- `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),r=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&s.type==="text"?(s.raw+=`
25
- `+n.raw,s.text+=`
26
- `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,o,r=e,c,u,g;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)d.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,c.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(u||(g=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(n=d.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),s=t[t.length-1],s&&n.type==="text"&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,g)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let d=1/0,T=e.slice(1),m;this.options.extensions.startInline.forEach(x=>{m=x.call({lexer:this},T),typeof m=="number"&&m>=0&&(d=Math.min(d,m))}),d<1/0&&d>=0&&(o=e.substring(0,d+1))}if(n=this.tokenizer.inlineText(o)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(g=n.raw.slice(-1)),u=!0,s=t[t.length-1],s&&s.type==="text"?(s.raw+=n.raw,s.text+=n.text):t.push(n);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}},we=class{constructor(e){E(this,"options");this.options=e||he}code(e,t,n){let s=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+`
27
- `,s?'<pre><code class="language-'+G(s)+'">'+(n?e:G(e,!0))+`</code></pre>
28
- `:"<pre><code>"+(n?e:G(e,!0))+`</code></pre>
1
+ var Ai=Object.defineProperty;var mn=a=>{throw TypeError(a)};var Si=(a,e,t)=>e in a?Ai(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var A=(a,e,t)=>Si(a,typeof e!="symbol"?e+"":e,t),Ri=(a,e,t)=>e.has(a)||mn("Cannot "+t);var gn=(a,e,t)=>e.has(a)?mn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t);var tt=(a,e,t)=>(Ri(a,e,"access private method"),t);function It(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var de=It();function yn(a){de=a}var wn=/[&<>"']/,Ii=new RegExp(wn.source,"g"),En=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Oi=new RegExp(En.source,"g"),Li={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Tn=a=>Li[a];function q(a,e){if(e){if(wn.test(a))return a.replace(Ii,Tn)}else if(En.test(a))return a.replace(Oi,Tn);return a}var Di=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Ni(a){return a.replace(Di,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}var Ci=/(^|[^\[])\^/g;function E(a,e){let t=typeof a=="string"?a:a.source;e=e||"";let n={replace:(r,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Ci,"$1"),t=t.replace(r,s),n},getRegex:()=>new RegExp(t,e)};return n}function kn(a){try{a=encodeURI(a).replace(/%25/g,"%")}catch{return null}return a}var Pe={exec:()=>null};function bn(a,e){let t=a.replace(/\|/g,(o,s,u)=>{let p=!1,T=s;for(;--T>=0&&u[T]==="\\";)p=!p;return p?"|":" |"}),n=t.split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function nt(a,e,t){let n=a.length;if(n===0)return"";let r=0;for(;r<n;){let o=a.charAt(n-r-1);if(o===e&&!t)r++;else if(o!==e&&t)r++;else break}return a.slice(0,n-r)}function Mi(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-1}function _n(a,e,t,n){let r=e.href,o=e.title?q(e.title):null,s=a[1].replace(/\\([\[\]])/g,"$1");if(a[0].charAt(0)!=="!"){n.state.inLink=!0;let u={type:"link",raw:t,href:r,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,u}return{type:"image",raw:t,href:r,title:o,text:q(s)}}function Pi(a,e){let t=a.match(/^(\s+)(?:```)/);if(t===null)return e;let n=t[1];return e.split(`
2
+ `).map(r=>{let o=r.match(/^\s+/);if(o===null)return r;let[s]=o;return s.length>=n.length?r.slice(n.length):r}).join(`
3
+ `)}var we=class{constructor(e){A(this,"options");A(this,"rules");A(this,"lexer");this.options=e||de}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(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:nt(n,`
4
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=Pi(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){let r=nt(n,"#");(this.options.pedantic||!r||/ $/.test(r))&&(n=r.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:t[0]}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
5
+ $1`);n=nt(n.replace(/^ *>[ \t]?/gm,""),`
6
+ `);let r=this.lexer.state.top;this.lexer.state.top=!0;let o=this.lexer.blockTokens(n);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),u="",p="",T=!1;for(;e;){let d=!1;if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let k=t[2].split(`
7
+ `,1)[0].replace(/^\t+/,X=>" ".repeat(3*X.length)),m=e.split(`
8
+ `,1)[0],x=0;this.options.pedantic?(x=2,p=k.trimStart()):(x=t[2].search(/[^ ]/),x=x>4?1:x,p=k.slice(x),x+=t[1].length);let Z=!1;if(!k&&/^ *$/.test(m)&&(u+=m+`
9
+ `,e=e.substring(m.length+1),d=!0),!d){let X=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),Ie=new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),ge=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),C=new RegExp(`^ {0,${Math.min(3,x-1)}}#`);for(;e;){let H=e.split(`
10
+ `,1)[0];if(m=H,this.options.pedantic&&(m=m.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),ge.test(m)||C.test(m)||X.test(m)||Ie.test(e))break;if(m.search(/[^ ]/)>=x||!m.trim())p+=`
11
+ `+m.slice(x);else{if(Z||k.search(/[^ ]/)>=4||ge.test(k)||C.test(k)||Ie.test(k))break;p+=`
12
+ `+m}!Z&&!m.trim()&&(Z=!0),u+=H+`
13
+ `,e=e.substring(H.length+1),k=m.slice(x)}}o.loose||(T?o.loose=!0:/\n *\n *$/.test(u)&&(T=!0));let j=null,F;this.options.gfm&&(j=/^\[[ xX]\] /.exec(p),j&&(F=j[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:u,task:!!j,checked:F,loose:!1,text:p,tokens:[]}),o.raw+=u}o.items[o.items.length-1].raw=u.trimEnd(),o.items[o.items.length-1].text=p.trimEnd(),o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){let k=o.items[d].tokens.filter(x=>x.type==="space"),m=k.length>0&&k.some(x=>/\n.*\n/.test(x.raw));o.loose=m}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}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(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=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:r,title:o}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;let n=bn(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
14
+ `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let u of r)/^ *-+: *$/.test(u)?s.align.push("right"):/^ *:-+: *$/.test(u)?s.align.push("center"):/^ *:-+ *$/.test(u)?s.align.push("left"):s.align.push(null);for(let u of n)s.header.push({text:u,tokens:this.lexer.inline(u)});for(let u of o)s.rows.push(bn(u,s.header.length).map(p=>({text:p,tokens:this.lexer.inline(p)})));return s}}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)===`
15
+ `?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:q(t[1])}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.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&&/^</.test(n)){if(!/>$/.test(n))return;let s=nt(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=Mi(t[2],"()");if(s>-1){let p=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,p).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s&&(r=s[1],o=s[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(this.options.pedantic&&!/>$/.test(n)?r=r.slice(1):r=r.slice(1,-1)),_n(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(/\s+/g," "),o=t[r.toLowerCase()];if(!o){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return _n(n,o,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let s=[...r[0]].length-1,u,p,T=s,d=0,k=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(k.lastIndex=0,t=t.slice(-1*e.length+s);(r=k.exec(t))!=null;){if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!u)continue;if(p=[...u].length,r[3]||r[4]){T+=p;continue}else if((r[5]||r[6])&&s%3&&!((s+p)%3)){d+=p;continue}if(T-=p,T>0)continue;p=Math.min(p,p+T+d);let m=[...r[0]][0].length,x=e.slice(0,s+r.index+m+p);if(Math.min(s,p)%2){let j=x.slice(1,-1);return{type:"em",raw:x,text:j,tokens:this.lexer.inlineTokens(j)}}let Z=x.slice(2,-2);return{type:"strong",raw:x,text:Z,tokens:this.lexer.inlineTokens(Z)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),o=/^ /.test(n)&&/ $/.test(n);return r&&o&&(n=n.substring(1,n.length-1)),n=q(n,!0),{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,r;return t[2]==="@"?(n=q(t[1]),r="mailto:"+n):(n=q(t[1]),r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=q(t[0]),r="mailto:"+n;else{let o;do o=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(o!==t[0]);n=q(t[0]),t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=q(t[0]),{type:"text",raw:t[0],text:n}}}},zi=/^(?: *(?:\n|$))+/,$i=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,vi=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$e=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ui=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,An=/(?:[*+-]|\d{1,9}[.)])/,Sn=E(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,An).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(),Ot=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Fi=/^[^\n]+/,Lt=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Hi=E(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Lt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Bi=E(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,An).getRegex(),ot="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",Dt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Gi=E("^ {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",Dt).replace("tag",ot).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rn=E(Ot).replace("hr",$e).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",ot).getRegex(),Wi=E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Rn).getRegex(),Nt={blockquote:Wi,code:$i,def:Hi,fences:vi,heading:Ui,hr:$e,html:Gi,lheading:Sn,list:Bi,newline:zi,paragraph:Rn,table:Pe,text:Fi},xn=E("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$e).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",ot).getRegex(),ji={...Nt,table:xn,paragraph:E(Ot).replace("hr",$e).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xn).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",ot).getRegex()},qi={...Nt,html:E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Dt).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:Pe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:E(Ot).replace("hr",$e).replace("heading",` *#{1,6} *[^
16
+ ]`).replace("lheading",Sn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},In=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Yi=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,On=/^( {2,}|\\)\n(?!\s*$)/,Zi=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ve="\\p{P}\\p{S}",Xi=E(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ve).getRegex(),Vi=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Qi=E(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ve).getRegex(),Ki=E("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ve).getRegex(),Ji=E("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ve).getRegex(),es=E(/\\([punct])/,"gu").replace(/punct/g,ve).getRegex(),ts=E(/^<(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(),ns=E(Dt).replace("(?:-->|$)","-->").getRegex(),is=E("^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",ns).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),st=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ss=E(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",st).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ln=E(/^!?\[(label)\]\[(ref)\]/).replace("label",st).replace("ref",Lt).getRegex(),Dn=E(/^!?\[(ref)\](?:\[\])?/).replace("ref",Lt).getRegex(),rs=E("reflink|nolink(?!\\()","g").replace("reflink",Ln).replace("nolink",Dn).getRegex(),Ct={_backpedal:Pe,anyPunctuation:es,autolink:ts,blockSkip:Vi,br:On,code:Yi,del:Pe,emStrongLDelim:Qi,emStrongRDelimAst:Ki,emStrongRDelimUnd:Ji,escape:In,link:ss,nolink:Dn,punctuation:Xi,reflink:Ln,reflinkSearch:rs,tag:is,text:Zi,url:Pe},os={...Ct,link:E(/^!?\[(label)\]\((.*?)\)/).replace("label",st).getRegex(),reflink:E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",st).getRegex()},St={...Ct,escape:E(In).replace("])","~|])").getRegex(),url:E(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},ls={...St,br:E(On).replace("{2,}","*").getRegex(),text:E(St.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},it={normal:Nt,gfm:ji,pedantic:qi},Me={normal:Ct,gfm:St,breaks:ls,pedantic:os},ee=class a{constructor(e){A(this,"tokens");A(this,"options");A(this,"state");A(this,"tokenizer");A(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||de,this.options.tokenizer=this.options.tokenizer||new we,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={block:it.normal,inline:Me.normal};this.options.pedantic?(t.block=it.pedantic,t.inline=Me.pedantic):this.options.gfm&&(t.block=it.gfm,this.options.breaks?t.inline=Me.breaks:t.inline=Me.gfm),this.tokenizer.rules=t}static get rules(){return{block:it,inline:Me}}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(/\r\n|\r/g,`
17
+ `),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=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(u,p,T)=>p+" ".repeat(T.length));let n,r,o,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(u=>(n=u.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
18
+ `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
19
+ `+n.raw,r.text+=`
20
+ `+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=`
21
+ `+n.raw,r.text+=`
22
+ `+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let u=1/0,p=e.slice(1),T;this.options.extensions.startBlock.forEach(d=>{T=d.call({lexer:this},p),typeof T=="number"&&T>=0&&(u=Math.min(u,T))}),u<1/0&&u>=0&&(o=e.substring(0,u+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){r=t[t.length-1],s&&r.type==="paragraph"?(r.raw+=`
23
+ `+n.raw,r.text+=`
24
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&r.type==="text"?(r.raw+=`
25
+ `+n.raw,r.text+=`
26
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,s=e,u,p,T;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(u=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(u=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(u=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,u.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(p||(T=""),p=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(n=d.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&n.type==="text"&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),r=t[t.length-1],r&&n.type==="text"&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,s,T)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let d=1/0,k=e.slice(1),m;this.options.extensions.startInline.forEach(x=>{m=x.call({lexer:this},k),typeof m=="number"&&m>=0&&(d=Math.min(d,m))}),d<1/0&&d>=0&&(o=e.substring(0,d+1))}if(n=this.tokenizer.inlineText(o)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(T=n.raw.slice(-1)),p=!0,r=t[t.length-1],r&&r.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){let d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return t}},Ee=class{constructor(e){A(this,"options");this.options=e||de}code(e,t,n){let r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+`
27
+ `,r?'<pre><code class="language-'+q(r)+'">'+(n?e:q(e,!0))+`</code></pre>
28
+ `:"<pre><code>"+(n?e:q(e,!0))+`</code></pre>
29
29
  `}blockquote(e){return`<blockquote>
30
30
  ${e}</blockquote>
31
31
  `}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>
32
32
  `}hr(){return`<hr>
33
- `}list(e,t,n){let s=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+s+o+`>
34
- `+e+"</"+s+`>
33
+ `}list(e,t,n){let r=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+r+o+`>
34
+ `+e+"</"+r+`>
35
35
  `}listitem(e,t,n){return`<li>${e}</li>
36
36
  `}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>
37
37
  `}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),`<table>
@@ -41,13 +41,13 @@ ${e}</blockquote>
41
41
  `}tablerow(e){return`<tr>
42
42
  ${e}</tr>
43
43
  `}tablecell(e,t){let n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
44
- `}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){let s=hn(e);if(s===null)return n;e=s;let o='<a href="'+e+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>",o}image(e,t,n){let s=hn(e);if(s===null)return n;e=s;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${t}"`),o+=">",o}text(e){return e}},Me=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}},te=class l{constructor(e){E(this,"options");E(this,"renderer");E(this,"textRenderer");this.options=e||he,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Me}static parse(e,t){return new l(t).parse(e)}static parseInline(e,t){return new l(t).parseInline(e)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){let o=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){let r=o,c=this.options.extensions.renderers[r.type].call({parser:this},r);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(r.type)){n+=c||"";continue}}switch(o.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{let r=o;n+=this.renderer.heading(this.parseInline(r.tokens),r.depth,Si(this.parseInline(r.tokens,this.textRenderer)));continue}case"code":{let r=o;n+=this.renderer.code(r.text,r.lang,!!r.escaped);continue}case"table":{let r=o,c="",u="";for(let d=0;d<r.header.length;d++)u+=this.renderer.tablecell(this.parseInline(r.header[d].tokens),{header:!0,align:r.align[d]});c+=this.renderer.tablerow(u);let g="";for(let d=0;d<r.rows.length;d++){let T=r.rows[d];u="";for(let m=0;m<T.length;m++)u+=this.renderer.tablecell(this.parseInline(T[m].tokens),{header:!1,align:r.align[m]});g+=this.renderer.tablerow(u)}n+=this.renderer.table(c,g);continue}case"blockquote":{let r=o,c=this.parse(r.tokens);n+=this.renderer.blockquote(c);continue}case"list":{let r=o,c=r.ordered,u=r.start,g=r.loose,d="";for(let T=0;T<r.items.length;T++){let m=r.items[T],x=m.checked,q=m.task,H="";if(m.task){let B=this.renderer.checkbox(!!x);g?m.tokens.length>0&&m.tokens[0].type==="paragraph"?(m.tokens[0].text=B+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&m.tokens[0].tokens[0].type==="text"&&(m.tokens[0].tokens[0].text=B+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:B+" "}):H+=B+" "}H+=this.parse(m.tokens,g),d+=this.renderer.listitem(H,q,!!x)}n+=this.renderer.list(d,c,u);continue}case"html":{let r=o;n+=this.renderer.html(r.text,r.block);continue}case"paragraph":{let r=o;n+=this.renderer.paragraph(this.parseInline(r.tokens));continue}case"text":{let r=o,c=r.tokens?this.parseInline(r.tokens):r.text;for(;s+1<e.length&&e[s+1].type==="text";)r=e[++s],c+=`
45
- `+(r.tokens?this.parseInline(r.tokens):r.text);n+=t?this.renderer.paragraph(c):c;continue}default:{let r='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let s=0;s<e.length;s++){let o=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){let r=this.options.extensions.renderers[o.type].call({parser:this},o);if(r!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=r||"";continue}}switch(o.type){case"escape":{let r=o;n+=t.text(r.text);break}case"html":{let r=o;n+=t.html(r.text);break}case"link":{let r=o;n+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break}case"image":{let r=o;n+=t.image(r.href,r.title,r.text);break}case"strong":{let r=o;n+=t.strong(this.parseInline(r.tokens,t));break}case"em":{let r=o;n+=t.em(this.parseInline(r.tokens,t));break}case"codespan":{let r=o;n+=t.codespan(r.text);break}case"br":{n+=t.br();break}case"del":{let r=o;n+=t.del(this.parseInline(r.tokens,t));break}case"text":{let r=o;n+=t.text(r.text);break}default:{let r='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return n}},ue=class{constructor(e){E(this,"options");this.options=e||he}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}};E(ue,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var fe,yt,Rn,Je=class{constructor(...e){pn(this,fe);E(this,"defaults",wt());E(this,"options",this.setOptions);E(this,"parse",Xe(this,fe,yt).call(this,ee.lex,te.parse));E(this,"parseInline",Xe(this,fe,yt).call(this,ee.lexInline,te.parseInline));E(this,"Parser",te);E(this,"Renderer",we);E(this,"TextRenderer",Me);E(this,"Lexer",ee);E(this,"Tokenizer",ye);E(this,"Hooks",ue);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 o=s;for(let r of o.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of o.rows)for(let c of r)n=n.concat(this.walkTokens(c.tokens,t));break}case"list":{let o=s;n=n.concat(this.walkTokens(o.items,t));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(r=>{let c=o[r].flat(1/0);n=n.concat(this.walkTokens(c,t))}):o.tokens&&(n=n.concat(this.walkTokens(o.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(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let r=t.renderers[o.name];r?t.renderers[o.name]=function(...c){let u=o.renderer.apply(this,c);return u===!1&&(u=r.apply(this,c)),u}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=t[o.level];r?r.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),s.extensions=t),n.renderer){let o=this.defaults.renderer||new we(this.defaults);for(let r in n.renderer){if(!(r in o))throw new Error(`renderer '${r}' does not exist`);if(r==="options")continue;let c=r,u=n.renderer[c],g=o[c];o[c]=(...d)=>{let T=u.apply(o,d);return T===!1&&(T=g.apply(o,d)),T||""}}s.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new ye(this.defaults);for(let r in n.tokenizer){if(!(r in o))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let c=r,u=n.tokenizer[c],g=o[c];o[c]=(...d)=>{let T=u.apply(o,d);return T===!1&&(T=g.apply(o,d)),T}}s.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new ue;for(let r in n.hooks){if(!(r in o))throw new Error(`hook '${r}' does not exist`);if(r==="options")continue;let c=r,u=n.hooks[c],g=o[c];ue.passThroughHooks.has(r)?o[c]=d=>{if(this.defaults.async)return Promise.resolve(u.call(o,d)).then(m=>g.call(o,m));let T=u.call(o,d);return g.call(o,T)}:o[c]=(...d)=>{let T=u.apply(o,d);return T===!1&&(T=g.apply(o,d)),T}}s.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,r=n.walkTokens;s.walkTokens=function(c){let u=[];return u.push(r.call(this,c)),o&&(u=u.concat(o.call(this,c))),u}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ee.lex(e,t??this.defaults)}parser(e,t){return te.parse(e,t??this.defaults)}};fe=new WeakSet,yt=function(e,t){return(n,s)=>{let o={...s},r={...this.defaults,...o};this.defaults.async===!0&&o.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 c=Xe(this,fe,Rn).call(this,!!r.silent,!!r.async);if(typeof n>"u"||n===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(r.hooks&&(r.hooks.options=r),r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(u=>e(u,r)).then(u=>r.hooks?r.hooks.processAllTokens(u):u).then(u=>r.walkTokens?Promise.all(this.walkTokens(u,r.walkTokens)).then(()=>u):u).then(u=>t(u,r)).then(u=>r.hooks?r.hooks.postprocess(u):u).catch(c);try{r.hooks&&(n=r.hooks.preprocess(n));let u=e(n,r);r.hooks&&(u=r.hooks.processAllTokens(u)),r.walkTokens&&this.walkTokens(u,r.walkTokens);let g=t(u,r);return r.hooks&&(g=r.hooks.postprocess(g)),g}catch(u){return c(u)}}},Rn=function(e,t){return n=>{if(n.message+=`
46
- Please report this to https://github.com/markedjs/marked.`,e){let s="<p>An error occurred:</p><pre>"+G(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}};var pe=new Je;function y(l,e){return pe.parse(l,e)}y.options=y.setOptions=function(l){return pe.setOptions(l),y.defaults=pe.defaults,Tn(y.defaults),y};y.getDefaults=wt;y.defaults=he;y.use=function(...l){return pe.use(...l),y.defaults=pe.defaults,Tn(y.defaults),y};y.walkTokens=function(l,e){return pe.walkTokens(l,e)};y.parseInline=pe.parseInline;y.Parser=te;y.parser=te.parse;y.Renderer=we;y.TextRenderer=Me;y.Lexer=ee;y.lexer=ee.lex;y.Tokenizer=ye;y.Hooks=ue;y.parse=y;var $s=y.options,vs=y.setOptions,Us=y.use,Fs=y.walkTokens,Hs=y.parseInline;var Bs=te.parse,Gs=ee.lex;function In(l,e){(e==null||e>l.length)&&(e=l.length);for(var t=0,n=Array(e);t<e;t++)n[t]=l[t];return n}function ns(l){if(Array.isArray(l))return l}function is(l,e){var t=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(t!=null){var n,s,o,r,c=[],u=!0,g=!1;try{if(o=(t=t.call(l)).next,e!==0)for(;!(u=(n=o.call(t)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(d){g=!0,s=d}finally{try{if(!u&&t.return!=null&&(r=t.return(),Object(r)!==r))return}finally{if(g)throw s}}return c}}function ss(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
47
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rs(l,e){return ns(l)||is(l,e)||os(l,e)||ss()}function os(l,e){if(l){if(typeof l=="string")return In(l,e);var t={}.toString.call(l).slice(8,-1);return t==="Object"&&l.constructor&&(t=l.constructor.name),t==="Map"||t==="Set"?Array.from(l):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?In(l,e):void 0}}var Bn=Object.entries,On=Object.setPrototypeOf,ls=Object.isFrozen,as=Object.getPrototypeOf,cs=Object.getOwnPropertyDescriptor,M=Object.freeze,P=Object.seal,Ae=Object.create,Gn=typeof Reflect<"u"&&Reflect,Mt=Gn.apply,Pt=Gn.construct;M||(M=function(e){return e});P||(P=function(e){return e});Mt||(Mt=function(e,t){for(var n=arguments.length,s=new Array(n>2?n-2:0),o=2;o<n;o++)s[o-2]=arguments[o];return e.apply(t,s)});Pt||(Pt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return new e(...n)});var $e=N(Array.prototype.forEach),us=N(Array.prototype.lastIndexOf),Nn=N(Array.prototype.pop),Ee=N(Array.prototype.push),ps=N(Array.prototype.splice),oe=Array.isArray,Fe=N(String.prototype.toLowerCase),Ot=N(String.prototype.toString),Ln=N(String.prototype.match),ve=N(String.prototype.replace),Dn=N(String.prototype.indexOf),fs=N(String.prototype.trim),hs=N(Number.prototype.toString),ds=N(Boolean.prototype.toString),Cn=typeof BigInt>"u"?null:N(BigInt.prototype.toString),Mn=typeof Symbol>"u"?null:N(Symbol.prototype.toString),U=N(Object.prototype.hasOwnProperty),Ue=N(Object.prototype.toString),C=N(RegExp.prototype.test),de=ms(TypeError);function N(l){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return Mt(l,e,n)}}function ms(l){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pt(l,t)}}function b(l,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Fe;if(On&&On(l,null),!oe(e))return l;let n=e.length;for(;n--;){let s=e[n];if(typeof s=="string"){let o=t(s);o!==s&&(ls(e)||(e[n]=o),s=o)}l[s]=!0}return l}function gs(l){for(let e=0;e<l.length;e++)U(l,e)||(l[e]=null);return l}function v(l){let e=Ae(null);for(let n of Bn(l)){var t=rs(n,2);let s=t[0],o=t[1];U(l,s)&&(oe(o)?e[s]=gs(o):o&&typeof o=="object"&&o.constructor===Object?e[s]=v(o):e[s]=o)}return e}function Ts(l){switch(typeof l){case"string":return l;case"number":return hs(l);case"boolean":return ds(l);case"bigint":return Cn?Cn(l):"0";case"symbol":return Mn?Mn(l):"Symbol()";case"undefined":return Ue(l);case"function":case"object":{if(l===null)return Ue(l);let e=l,t=Q(e,"toString");if(typeof t=="function"){let n=t(e);return typeof n=="string"?n:Ue(n)}return Ue(l)}default:return Ue(l)}}function Q(l,e){for(;l!==null;){let n=cs(l,e);if(n){if(n.get)return N(n.get);if(typeof n.value=="function")return N(n.value)}l=as(l)}function t(){return null}return t}function ks(l){try{return C(l,""),!0}catch{return!1}}var Pn=M(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Nt=M(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Lt=M(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bs=M(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Dt=M(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_s=M(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zn=M(["#text"]),$n=M(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ct=M(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),vn=M(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),tt=M(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xs=P(/{{[\w\W]*|^[\w\W]*}}/g),ys=P(/<%[\w\W]*|^[\w\W]*%>/g),ws=P(/\${[\w\W]*/g),Es=P(/^data-[\-\w.\u00B7-\uFFFF]+$/),As=P(/^aria-[\-\w]+$/),Un=P(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ss=P(/^(?:\w+script|data):/i),Rs=P(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Is=P(/^html$/i),Os=P(/^[a-z][.\w]*(-[.\w]+)+$/i),Fn=P(/<[/\w!]/g),Ns=P(/<[/\w]/g),Ls=P(/<\/no(script|embed|frames)/i),Ds=P(/\/>/i),V={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Cs=function(){return typeof window>"u"?null:window},Ms=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,s="data-tt-policy-suffix";t&&t.hasAttribute(s)&&(n=t.getAttribute(s));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Hn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},re=function(e,t,n,s){return U(e,t)&&oe(e[t])?b(s.base?v(s.base):{},e[t],s.transform):n};function Wn(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Cs(),e=f=>Wn(f);if(e.version="3.4.10",e.removed=[],!l||!l.document||l.document.nodeType!==V.document||!l.Element)return e.isSupported=!1,e;let t=l.document,n=t,s=n.currentScript;l.DocumentFragment;let o=l.HTMLTemplateElement,r=l.Node,c=l.Element,u=l.NodeFilter,g=l.NamedNodeMap;g===void 0&&(l.NamedNodeMap||l.MozNamedAttrMap),l.HTMLFormElement;let d=l.DOMParser,T=l.trustedTypes,m=c.prototype,x=Q(m,"cloneNode"),q=Q(m,"remove"),H=Q(m,"nextSibling"),B=Q(m,"childNodes"),K=Q(m,"parentNode"),Se=Q(m,"shadowRoot"),me=Q(m,"attributes"),z=r&&r.prototype?Q(r.prototype,"nodeType"):null,W=r&&r.prototype?Q(r.prototype,"nodeName"):null;if(typeof o=="function"){let f=t.createElement("template");f.content&&f.content.ownerDocument&&(t=f.content.ownerDocument)}let F,le="",nt,zt=!1,Re=0,$t=function(){if(Re>0)throw de('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ge=function(i){$t(),Re++;try{return F.createHTML(i)}finally{Re--}},jn=function(i){$t(),Re++;try{return F.createScriptURL(i)}finally{Re--}},qn=function(){return zt||(nt=Ms(T,s),zt=!0),nt},He=t,it=He.implementation,vt=He.createNodeIterator,Yn=He.createDocumentFragment,Zn=He.getElementsByTagName,Xn=n.importNode,L=Hn();e.isSupported=typeof Bn=="function"&&typeof K=="function"&&it&&it.createHTMLDocument!==void 0;let Vn=xs,Qn=ys,Kn=ws,Jn=Es,ei=As,ti=Ss,Ut=Rs,ni=Os,Ft=Un,R=null,st=b({},[...Pn,...Nt,...Lt,...Dt,...zn]),I=null,rt=b({},[...$n,...Ct,...vn,...tt]),A=Object.seal(Ae(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ie=null,Ht=null,ne=Object.seal(Ae(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Bt=!0,ot=!0,Gt=!1,Wt=!0,ie=!1,Oe=!0,ae=!1,lt=!1,at=!1,Te=!1,Be=!1,Ge=!1,jt=!0,qt=!1,Yt="user-content-",ct=!0,ut=!1,ke={},Z=null,pt=b({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Zt=null,Xt=b({},["audio","video","img","source","image","track"]),ft=null,Vt=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",X="http://www.w3.org/1999/xhtml",be=X,ht=!1,dt=null,ii=b({},[We,je,X],Ot),Qt=M(["mi","mo","mn","ms","mtext"]),mt=b({},Qt),Kt=M(["annotation-xml"]),gt=b({},Kt),si=b({},["title","style","font","a","script"]),Ne=null,ri=["application/xhtml+xml","text/html"],oi="text/html",S=null,_e=null,li=t.createElement("form"),Jt=function(i){return i instanceof RegExp||i instanceof Function},Tt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_e&&_e===i)return;(!i||typeof i!="object")&&(i={}),i=v(i),Ne=ri.indexOf(i.PARSER_MEDIA_TYPE)===-1?oi:i.PARSER_MEDIA_TYPE,S=Ne==="application/xhtml+xml"?Ot:Fe,R=re(i,"ALLOWED_TAGS",st,{transform:S}),I=re(i,"ALLOWED_ATTR",rt,{transform:S}),dt=re(i,"ALLOWED_NAMESPACES",ii,{transform:Ot}),ft=re(i,"ADD_URI_SAFE_ATTR",Vt,{transform:S,base:Vt}),Zt=re(i,"ADD_DATA_URI_TAGS",Xt,{transform:S,base:Xt}),Z=re(i,"FORBID_CONTENTS",pt,{transform:S}),Ie=re(i,"FORBID_TAGS",v({}),{transform:S}),Ht=re(i,"FORBID_ATTR",v({}),{transform:S}),ke=U(i,"USE_PROFILES")?i.USE_PROFILES&&typeof i.USE_PROFILES=="object"?v(i.USE_PROFILES):i.USE_PROFILES:!1,Bt=i.ALLOW_ARIA_ATTR!==!1,ot=i.ALLOW_DATA_ATTR!==!1,Gt=i.ALLOW_UNKNOWN_PROTOCOLS||!1,Wt=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=i.SAFE_FOR_TEMPLATES||!1,Oe=i.SAFE_FOR_XML!==!1,ae=i.WHOLE_DOCUMENT||!1,Te=i.RETURN_DOM||!1,Be=i.RETURN_DOM_FRAGMENT||!1,Ge=i.RETURN_TRUSTED_TYPE||!1,at=i.FORCE_BODY||!1,jt=i.SANITIZE_DOM!==!1,qt=i.SANITIZE_NAMED_PROPS||!1,ct=i.KEEP_CONTENT!==!1,ut=i.IN_PLACE||!1,Ft=ks(i.ALLOWED_URI_REGEXP)?i.ALLOWED_URI_REGEXP:Un,be=typeof i.NAMESPACE=="string"?i.NAMESPACE:X,mt=U(i,"MATHML_TEXT_INTEGRATION_POINTS")&&i.MATHML_TEXT_INTEGRATION_POINTS&&typeof i.MATHML_TEXT_INTEGRATION_POINTS=="object"?v(i.MATHML_TEXT_INTEGRATION_POINTS):b({},Qt),gt=U(i,"HTML_INTEGRATION_POINTS")&&i.HTML_INTEGRATION_POINTS&&typeof i.HTML_INTEGRATION_POINTS=="object"?v(i.HTML_INTEGRATION_POINTS):b({},Kt);let a=U(i,"CUSTOM_ELEMENT_HANDLING")&&i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING=="object"?v(i.CUSTOM_ELEMENT_HANDLING):Ae(null);if(A=Ae(null),U(a,"tagNameCheck")&&Jt(a.tagNameCheck)&&(A.tagNameCheck=a.tagNameCheck),U(a,"attributeNameCheck")&&Jt(a.attributeNameCheck)&&(A.attributeNameCheck=a.attributeNameCheck),U(a,"allowCustomizedBuiltInElements")&&typeof a.allowCustomizedBuiltInElements=="boolean"&&(A.allowCustomizedBuiltInElements=a.allowCustomizedBuiltInElements),P(A),ie&&(ot=!1),Be&&(Te=!0),ke&&(R=b({},zn),I=Ae(null),ke.html===!0&&(b(R,Pn),b(I,$n)),ke.svg===!0&&(b(R,Nt),b(I,Ct),b(I,tt)),ke.svgFilters===!0&&(b(R,Lt),b(I,Ct),b(I,tt)),ke.mathMl===!0&&(b(R,Dt),b(I,vn),b(I,tt))),ne.tagCheck=null,ne.attributeCheck=null,U(i,"ADD_TAGS")&&(typeof i.ADD_TAGS=="function"?ne.tagCheck=i.ADD_TAGS:oe(i.ADD_TAGS)&&(R===st&&(R=v(R)),b(R,i.ADD_TAGS,S))),U(i,"ADD_ATTR")&&(typeof i.ADD_ATTR=="function"?ne.attributeCheck=i.ADD_ATTR:oe(i.ADD_ATTR)&&(I===rt&&(I=v(I)),b(I,i.ADD_ATTR,S))),U(i,"ADD_URI_SAFE_ATTR")&&oe(i.ADD_URI_SAFE_ATTR)&&b(ft,i.ADD_URI_SAFE_ATTR,S),U(i,"FORBID_CONTENTS")&&oe(i.FORBID_CONTENTS)&&(Z===pt&&(Z=v(Z)),b(Z,i.FORBID_CONTENTS,S)),U(i,"ADD_FORBID_CONTENTS")&&oe(i.ADD_FORBID_CONTENTS)&&(Z===pt&&(Z=v(Z)),b(Z,i.ADD_FORBID_CONTENTS,S)),ct&&(R["#text"]=!0),ae&&b(R,["html","head","body"]),R.table&&(b(R,["tbody"]),delete Ie.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let p=F;F=i.TRUSTED_TYPES_POLICY;try{le=ge("")}catch(h){throw F=p,h}}else i.TRUSTED_TYPES_POLICY===null?(F=void 0,le=""):(F===void 0&&(F=qn()),F&&typeof le=="string"&&(le=ge("")));(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&R===st&&(R=v(R)),L.uponSanitizeAttribute.length>0&&I===rt&&(I=v(I)),M&&M(i),_e=i},en=b({},[...Nt,...Lt,...bs]),tn=b({},[...Dt,..._s]),ai=function(i,a,p){return a.namespaceURI===X?i==="svg":a.namespaceURI===We?i==="svg"&&(p==="annotation-xml"||mt[p]):!!en[i]},ci=function(i,a,p){return a.namespaceURI===X?i==="math":a.namespaceURI===je?i==="math"&&gt[p]:!!tn[i]},ui=function(i,a,p){return a.namespaceURI===je&&!gt[p]||a.namespaceURI===We&&!mt[p]?!1:!tn[i]&&(si[i]||!en[i])},pi=function(i){let a=K(i);(!a||!a.tagName)&&(a={namespaceURI:be,tagName:"template"});let p=Fe(i.tagName),h=Fe(a.tagName);return dt[i.namespaceURI]?i.namespaceURI===je?ai(p,a,h):i.namespaceURI===We?ci(p,a,h):i.namespaceURI===X?ui(p,a,h):!!(Ne==="application/xhtml+xml"&&dt[i.namespaceURI]):!1},se=function(i){Ee(e.removed,{element:i});try{K(i).removeChild(i)}catch{if(q(i),!K(i))throw de("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nn=function(i){let a=B(i);if(a){let h=[];$e(a,k=>{Ee(h,k)}),$e(h,k=>{try{q(k)}catch{}})}let p=me(i);if(p)for(let h=p.length-1;h>=0;--h){let k=p[h],_=k&&k.name;if(typeof _=="string")try{i.removeAttribute(_)}catch{}}},ce=function(i,a){try{Ee(e.removed,{attribute:a.getAttributeNode(i),from:a})}catch{Ee(e.removed,{attribute:null,from:a})}if(a.removeAttribute(i),i==="is")if(Te||Be)try{se(a)}catch{}else try{a.setAttribute(i,"")}catch{}},fi=function(i){let a=me(i);if(a)for(let p=a.length-1;p>=0;--p){let h=a[p],k=h&&h.name;if(!(typeof k!="string"||I[S(k)]))try{i.removeAttribute(k)}catch{}}},hi=function(i){let a=[i];for(;a.length>0;){let p=a.pop();(z?z(p):p.nodeType)===V.element&&fi(p);let k=B(p);if(k)for(let _=k.length-1;_>=0;--_)a.push(k[_])}},sn=function(i){let a=null,p=null;if(at)i="<remove></remove>"+i;else{let _=Ln(i,/^[\r\n\t ]+/);p=_&&_[0]}Ne==="application/xhtml+xml"&&be===X&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");let h=F?ge(i):i;if(be===X)try{a=new d().parseFromString(h,Ne)}catch{}if(!a||!a.documentElement){a=it.createDocument(be,"template",null);try{a.documentElement.innerHTML=ht?le:h}catch{}}let k=a.body||a.documentElement;return i&&p&&k.insertBefore(t.createTextNode(p),k.childNodes[0]||null),be===X?Zn.call(a,ae?"html":"body")[0]:ae?a.documentElement:k},rn=function(i){return vt.call(i.ownerDocument||i,i,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},qe=function(i){return i=ve(i,Vn," "),i=ve(i,Qn," "),i=ve(i,Kn," "),i},kt=function(i){var a;i.normalize();let p=vt.call(i.ownerDocument||i,i,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),h=p.nextNode();for(;h;)h.data=qe(h.data),h=p.nextNode();let k=(a=i.querySelectorAll)===null||a===void 0?void 0:a.call(i,"template");k&&$e(k,_=>{xe(_.content)&&kt(_.content)})},Ye=function(i){let a=W?W(i):null;return typeof a!="string"||S(a)!=="form"?!1:typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||i.attributes!==me(i)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function"||i.nodeType!==z(i)||i.childNodes!==B(i)},xe=function(i){if(!z||typeof i!="object"||i===null)return!1;try{return z(i)===V.documentFragment}catch{return!1}},Le=function(i){if(!z||typeof i!="object"||i===null)return!1;try{return typeof z(i)=="number"}catch{return!1}};function J(f,i,a){f.length!==0&&$e(f,p=>{p.call(e,i,a,_e)})}let di=function(i,a){return!!(Oe&&i.hasChildNodes()&&!Le(i.firstElementChild)&&C(Fn,i.textContent)&&C(Fn,i.innerHTML)||Oe&&i.namespaceURI===X&&a==="style"&&Le(i.firstElementChild)||i.nodeType===V.processingInstruction||Oe&&i.nodeType===V.comment&&C(Ns,i.data))},mi=function(i,a){if(!Ie[a]&&an(a)&&(A.tagNameCheck instanceof RegExp&&C(A.tagNameCheck,a)||A.tagNameCheck instanceof Function&&A.tagNameCheck(a)))return!1;if(ct&&!Z[a]){let p=K(i),h=B(i);if(h&&p){let k=h.length;for(let _=k-1;_>=0;--_){let D=ut?h[_]:x(h[_],!0);p.insertBefore(D,H(i))}}}return se(i),!0},on=function(i){if(J(L.beforeSanitizeElements,i,null),Ye(i))return se(i),!0;let a=S(W?W(i):i.nodeName);if(J(L.uponSanitizeElement,i,{tagName:a,allowedTags:R}),di(i,a))return se(i),!0;if(Ie[a]||!(ne.tagCheck instanceof Function&&ne.tagCheck(a))&&!R[a])return mi(i,a);if((z?z(i):i.nodeType)===V.element&&!pi(i)||(a==="noscript"||a==="noembed"||a==="noframes")&&C(Ls,i.innerHTML))return se(i),!0;if(ie&&i.nodeType===V.text){let h=qe(i.textContent);i.textContent!==h&&(Ee(e.removed,{element:i.cloneNode()}),i.textContent=h)}return J(L.afterSanitizeElements,i,null),!1},ln=function(i,a,p){if(Ht[a]||jt&&(a==="id"||a==="name")&&(p in t||p in li))return!1;let h=I[a]||ne.attributeCheck instanceof Function&&ne.attributeCheck(a,i);if(!(ot&&C(Jn,a))){if(!(Bt&&C(ei,a))){if(h){if(!ft[a]){if(!C(Ft,ve(p,Ut,""))){if(!((a==="src"||a==="xlink:href"||a==="href")&&i!=="script"&&Dn(p,"data:")===0&&Zt[i])){if(!(Gt&&!C(ti,ve(p,Ut,"")))){if(p)return!1}}}}}else if(!(an(i)&&(A.tagNameCheck instanceof RegExp&&C(A.tagNameCheck,i)||A.tagNameCheck instanceof Function&&A.tagNameCheck(i))&&(A.attributeNameCheck instanceof RegExp&&C(A.attributeNameCheck,a)||A.attributeNameCheck instanceof Function&&A.attributeNameCheck(a,i))||a==="is"&&A.allowCustomizedBuiltInElements&&(A.tagNameCheck instanceof RegExp&&C(A.tagNameCheck,p)||A.tagNameCheck instanceof Function&&A.tagNameCheck(p))))return!1}}return!0},gi=b({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),an=function(i){return!gi[Fe(i)]&&C(ni,i)},Ti=function(i,a,p,h){if(F&&typeof T=="object"&&typeof T.getAttributeType=="function"&&!p)switch(T.getAttributeType(i,a)){case"TrustedHTML":return ge(h);case"TrustedScriptURL":return jn(h)}return h},ki=function(i,a,p,h){try{p?i.setAttributeNS(p,a,h):i.setAttribute(a,h),Ye(i)?se(i):Nn(e.removed)}catch{ce(a,i)}},cn=function(i){J(L.beforeSanitizeAttributes,i,null);let a=i.attributes;if(!a||Ye(i))return;let p={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},h=a.length,k=S(i.nodeName);for(;h--;){let _=a[h],D=_.name,O=_.namespaceURI,j=_.value,Y=S(D),_t=j,$=D==="value"?_t:fs(_t);if(p.attrName=Y,p.attrValue=$,p.keepAttr=!0,p.forceKeepAttr=void 0,J(L.uponSanitizeAttribute,i,p),$=p.attrValue,qt&&(Y==="id"||Y==="name")&&Dn($,Yt)!==0&&(ce(D,i),$=Yt+$),Oe&&C(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,$)){ce(D,i);continue}if(Y==="attributename"&&Ln($,"href")){ce(D,i);continue}if(!p.forceKeepAttr){if(!p.keepAttr){ce(D,i);continue}if(!Wt&&C(Ds,$)){ce(D,i);continue}if(ie&&($=qe($)),!ln(k,Y,$)){ce(D,i);continue}$=Ti(k,Y,O,$),$!==_t&&ki(i,D,O,$)}}J(L.afterSanitizeAttributes,i,null)},Ze=function(i){let a=null,p=rn(i);for(J(L.beforeSanitizeShadowDOM,i,null);a=p.nextNode();)if(J(L.uponSanitizeShadowNode,a,null),on(a),cn(a),xe(a.content)&&Ze(a.content),(z?z(a):a.nodeType)===V.element){let k=Se(a);xe(k)&&(bt(k),Ze(k))}J(L.afterSanitizeShadowDOM,i,null)},bt=function(i){let a=[{node:i,shadow:null}];for(;a.length>0;){let p=a.pop();if(p.shadow){Ze(p.shadow);continue}let h=p.node,_=(z?z(h):h.nodeType)===V.element,D=B(h);if(D)for(let O=D.length-1;O>=0;--O)a.push({node:D[O],shadow:null});if(_){let O=W?W(h):null;if(typeof O=="string"&&S(O)==="template"){let j=h.content;xe(j)&&a.push({node:j,shadow:null})}}if(_){let O=Se(h);xe(O)&&a.push({node:null,shadow:O},{node:O,shadow:null})}}};return e.sanitize=function(f){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,p=null,h=null,k=null;if(ht=!f,ht&&(f="<!-->"),typeof f!="string"&&!Le(f)&&(f=Ts(f),typeof f!="string"))throw de("dirty is not a string, aborting");if(!e.isSupported)return f;lt||Tt(i),e.removed=[];let _=ut&&typeof f!="string"&&Le(f);if(_){let j=W?W(f):f.nodeName;if(typeof j=="string"){let Y=S(j);if(!R[Y]||Ie[Y])throw de("root node is forbidden and cannot be sanitized in-place")}if(Ye(f))throw de("root node is clobbered and cannot be sanitized in-place");try{bt(f)}catch(Y){throw nn(f),Y}}else if(Le(f))a=sn("<!---->"),p=a.ownerDocument.importNode(f,!0),p.nodeType===V.element&&p.nodeName==="BODY"||p.nodeName==="HTML"?a=p:a.appendChild(p),bt(p);else{if(!Te&&!ie&&!ae&&f.indexOf("<")===-1)return F&&Ge?ge(f):f;if(a=sn(f),!a)return Te?null:Ge?le:""}a&&at&&se(a.firstChild);let D=rn(_?f:a);try{for(;h=D.nextNode();)on(h),cn(h),xe(h.content)&&Ze(h.content)}catch(j){throw _&&nn(f),j}if(_)return $e(e.removed,j=>{j.element&&hi(j.element)}),ie&&kt(f),f;if(Te){if(ie&&kt(a),Be)for(k=Yn.call(a.ownerDocument);a.firstChild;)k.appendChild(a.firstChild);else k=a;return(I.shadowroot||I.shadowrootmode)&&(k=Xn.call(n,k,!0)),k}let O=ae?a.outerHTML:a.innerHTML;return ae&&R["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&C(Is,a.ownerDocument.doctype.name)&&(O="<!DOCTYPE "+a.ownerDocument.doctype.name+`>
48
- `+O),ie&&(O=qe(O)),F&&Ge?ge(O):O},e.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tt(f),lt=!0},e.clearConfig=function(){_e=null,lt=!1,F=nt,le=""},e.isValidAttribute=function(f,i,a){_e||Tt({});let p=S(f),h=S(i);return ln(p,h,a)},e.addHook=function(f,i){typeof i=="function"&&Ee(L[f],i)},e.removeHook=function(f,i){if(i!==void 0){let a=us(L[f],i);return a===-1?void 0:ps(L[f],a,1)[0]}return Nn(L[f])},e.removeHooks=function(f){L[f]=[]},e.removeAllHooks=function(){L=Hn()},e}var Ps=Wn();export{Ps as DOMPurify,Je as Marked};
44
+ `}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){let r=kn(e);if(r===null)return n;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>",o}image(e,t,n){let r=kn(e);if(r===null)return n;e=r;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${t}"`),o+=">",o}text(e){return e}},ze=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}},te=class a{constructor(e){A(this,"options");A(this,"renderer");A(this,"textRenderer");this.options=e||de,this.options.renderer=this.options.renderer||new Ee,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ze}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 r=0;r<e.length;r++){let o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){let s=o,u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){n+=u||"";continue}}switch(o.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{let s=o;n+=this.renderer.heading(this.parseInline(s.tokens),s.depth,Ni(this.parseInline(s.tokens,this.textRenderer)));continue}case"code":{let s=o;n+=this.renderer.code(s.text,s.lang,!!s.escaped);continue}case"table":{let s=o,u="",p="";for(let d=0;d<s.header.length;d++)p+=this.renderer.tablecell(this.parseInline(s.header[d].tokens),{header:!0,align:s.align[d]});u+=this.renderer.tablerow(p);let T="";for(let d=0;d<s.rows.length;d++){let k=s.rows[d];p="";for(let m=0;m<k.length;m++)p+=this.renderer.tablecell(this.parseInline(k[m].tokens),{header:!1,align:s.align[m]});T+=this.renderer.tablerow(p)}n+=this.renderer.table(u,T);continue}case"blockquote":{let s=o,u=this.parse(s.tokens);n+=this.renderer.blockquote(u);continue}case"list":{let s=o,u=s.ordered,p=s.start,T=s.loose,d="";for(let k=0;k<s.items.length;k++){let m=s.items[k],x=m.checked,Z=m.task,j="";if(m.task){let F=this.renderer.checkbox(!!x);T?m.tokens.length>0&&m.tokens[0].type==="paragraph"?(m.tokens[0].text=F+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&m.tokens[0].tokens[0].type==="text"&&(m.tokens[0].tokens[0].text=F+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:F+" "}):j+=F+" "}j+=this.parse(m.tokens,T),d+=this.renderer.listitem(j,Z,!!x)}n+=this.renderer.list(d,u,p);continue}case"html":{let s=o;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{let s=o;n+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=o,u=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1<e.length&&e[r+1].type==="text";)s=e[++r],u+=`
45
+ `+(s.tokens?this.parseInline(s.tokens):s.text);n+=t?this.renderer.paragraph(u):u;continue}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){let s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=s||"";continue}}switch(o.type){case"escape":{let s=o;n+=t.text(s.text);break}case"html":{let s=o;n+=t.html(s.text);break}case"link":{let s=o;n+=t.link(s.href,s.title,this.parseInline(s.tokens,t));break}case"image":{let s=o;n+=t.image(s.href,s.title,s.text);break}case"strong":{let s=o;n+=t.strong(this.parseInline(s.tokens,t));break}case"em":{let s=o;n+=t.em(this.parseInline(s.tokens,t));break}case"codespan":{let s=o;n+=t.codespan(s.text);break}case"br":{n+=t.br();break}case"del":{let s=o;n+=t.del(this.parseInline(s.tokens,t));break}case"text":{let s=o;n+=t.text(s.text);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}},pe=class{constructor(e){A(this,"options");this.options=e||de}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}};A(pe,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var he,Rt,Nn,rt=class{constructor(...e){gn(this,he);A(this,"defaults",It());A(this,"options",this.setOptions);A(this,"parse",tt(this,he,Rt).call(this,ee.lex,te.parse));A(this,"parseInline",tt(this,he,Rt).call(this,ee.lexInline,te.parseInline));A(this,"Parser",te);A(this,"Renderer",Ee);A(this,"TextRenderer",ze);A(this,"Lexer",ee);A(this,"Tokenizer",we);A(this,"Hooks",pe);this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let o=r;for(let s of o.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of o.rows)for(let u of s)n=n.concat(this.walkTokens(u.tokens,t));break}case"list":{let o=r;n=n.concat(this.walkTokens(o.items,t));break}default:{let o=r;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(s=>{let u=o[s].flat(1/0);n=n.concat(this.walkTokens(u,t))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let s=t.renderers[o.name];s?t.renderers[o.name]=function(...u){let p=o.renderer.apply(this,u);return p===!1&&(p=s.apply(this,u)),p}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[o.level];s?s.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),r.extensions=t),n.renderer){let o=this.defaults.renderer||new Ee(this.defaults);for(let s in n.renderer){if(!(s in o))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;let u=s,p=n.renderer[u],T=o[u];o[u]=(...d)=>{let k=p.apply(o,d);return k===!1&&(k=T.apply(o,d)),k||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new we(this.defaults);for(let s in n.tokenizer){if(!(s in o))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let u=s,p=n.tokenizer[u],T=o[u];o[u]=(...d)=>{let k=p.apply(o,d);return k===!1&&(k=T.apply(o,d)),k}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new pe;for(let s in n.hooks){if(!(s in o))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;let u=s,p=n.hooks[u],T=o[u];pe.passThroughHooks.has(s)?o[u]=d=>{if(this.defaults.async)return Promise.resolve(p.call(o,d)).then(m=>T.call(o,m));let k=p.call(o,d);return T.call(o,k)}:o[u]=(...d)=>{let k=p.apply(o,d);return k===!1&&(k=T.apply(o,d)),k}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(u){let p=[];return p.push(s.call(this,u)),o&&(p=p.concat(o.call(this,u))),p}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ee.lex(e,t??this.defaults)}parser(e,t){return te.parse(e,t??this.defaults)}};he=new WeakSet,Rt=function(e,t){return(n,r)=>{let o={...r},s={...this.defaults,...o};this.defaults.async===!0&&o.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);let u=tt(this,he,Nn).call(this,!!s.silent,!!s.async);if(typeof n>"u"||n===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(p=>e(p,s)).then(p=>s.hooks?s.hooks.processAllTokens(p):p).then(p=>s.walkTokens?Promise.all(this.walkTokens(p,s.walkTokens)).then(()=>p):p).then(p=>t(p,s)).then(p=>s.hooks?s.hooks.postprocess(p):p).catch(u);try{s.hooks&&(n=s.hooks.preprocess(n));let p=e(n,s);s.hooks&&(p=s.hooks.processAllTokens(p)),s.walkTokens&&this.walkTokens(p,s.walkTokens);let T=t(p,s);return s.hooks&&(T=s.hooks.postprocess(T)),T}catch(p){return u(p)}}},Nn=function(e,t){return n=>{if(n.message+=`
46
+ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+q(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}};var fe=new rt;function w(a,e){return fe.parse(a,e)}w.options=w.setOptions=function(a){return fe.setOptions(a),w.defaults=fe.defaults,yn(w.defaults),w};w.getDefaults=It;w.defaults=de;w.use=function(...a){return fe.use(...a),w.defaults=fe.defaults,yn(w.defaults),w};w.walkTokens=function(a,e){return fe.walkTokens(a,e)};w.parseInline=fe.parseInline;w.Parser=te;w.parser=te.parse;w.Renderer=Ee;w.TextRenderer=ze;w.Lexer=ee;w.lexer=ee.lex;w.Tokenizer=we;w.Hooks=pe;w.parse=w;var Bs=w.options,Gs=w.setOptions,Ws=w.use,js=w.walkTokens,qs=w.parseInline;var Ys=te.parse,Zs=ee.lex;function Cn(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,n=Array(e);t<e;t++)n[t]=a[t];return n}function as(a){if(Array.isArray(a))return a}function cs(a,e){var t=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(t!=null){var n,r,o,s,u=[],p=!0,T=!1;try{if(o=(t=t.call(a)).next,e!==0)for(;!(p=(n=o.call(t)).done)&&(u.push(n.value),u.length!==e);p=!0);}catch(d){T=!0,r=d}finally{try{if(!p&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(T)throw r}}return u}}function us(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
47
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ps(a,e){return as(a)||cs(a,e)||fs(a,e)||us()}function fs(a,e){if(a){if(typeof a=="string")return Cn(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Cn(a,e):void 0}}var Zn=Object.entries,Mn=Object.setPrototypeOf,hs=Object.isFrozen,ds=Object.getPrototypeOf,ms=Object.getOwnPropertyDescriptor,z=Object.freeze,$=Object.seal,Re=Object.create,Xn=typeof Reflect<"u"&&Reflect,Ut=Xn.apply,Ft=Xn.construct;z||(z=function(e){return e});$||($=function(e){return e});Ut||(Ut=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)});Ft||(Ft=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});var Ae=N(Array.prototype.forEach),gs=N(Array.prototype.lastIndexOf),Pn=N(Array.prototype.pop),Se=N(Array.prototype.push),Ts=N(Array.prototype.splice),le=Array.isArray,He=N(String.prototype.toLowerCase),Mt=N(String.prototype.toString),zn=N(String.prototype.match),Ue=N(String.prototype.replace),$n=N(String.prototype.indexOf),ks=N(String.prototype.trim),bs=N(Number.prototype.toString),_s=N(Boolean.prototype.toString),vn=typeof BigInt>"u"?null:N(BigInt.prototype.toString),Un=typeof Symbol>"u"?null:N(Symbol.prototype.toString),P=N(Object.prototype.hasOwnProperty),Fe=N(Object.prototype.toString),M=N(RegExp.prototype.test),me=xs(TypeError);function N(a){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Ut(a,e,n)}}function xs(a){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ft(a,t)}}function _(a,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:He;if(Mn&&Mn(a,null),!le(e))return a;let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){let o=t(r);o!==r&&(hs(e)||(e[n]=o),r=o)}a[r]=!0}return a}function ys(a){for(let e=0;e<a.length;e++)P(a,e)||(a[e]=null);return a}function v(a){let e=Re(null);for(let n of Zn(a)){var t=ps(n,2);let r=t[0],o=t[1];P(a,r)&&(le(o)?e[r]=ys(o):o&&typeof o=="object"&&o.constructor===Object?e[r]=v(o):e[r]=o)}return e}function ws(a){switch(typeof a){case"string":return a;case"number":return bs(a);case"boolean":return _s(a);case"bigint":return vn?vn(a):"0";case"symbol":return Un?Un(a):"Symbol()";case"undefined":return Fe(a);case"function":case"object":{if(a===null)return Fe(a);let e=a,t=V(e,"toString");if(typeof t=="function"){let n=t(e);return typeof n=="string"?n:Fe(n)}return Fe(a)}default:return Fe(a)}}function V(a,e){for(;a!==null;){let n=ms(a,e);if(n){if(n.get)return N(n.get);if(typeof n.value=="function")return N(n.value)}a=ds(a)}function t(){return null}return t}function Es(a){try{return M(a,""),!0}catch{return!1}}var Fn=z(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Pt=z(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),zt=z(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),As=z(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$t=z(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ss=z(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hn=z(["#text"]),Bn=z(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),vt=z(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Gn=z(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),lt=z(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rs=$(/{{[\w\W]*|^[\w\W]*}}/g),Is=$(/<%[\w\W]*|^[\w\W]*%>/g),Os=$(/\${[\w\W]*/g),Ls=$(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ds=$(/^aria-[\-\w]+$/),Wn=$(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ns=$(/^(?:\w+script|data):/i),Cs=$(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ms=$(/^html$/i),Ps=$(/^[a-z][.\w]*(-[.\w]+)+$/i),jn=$(/<[/\w!]/g),qn=$(/<[/\w]/g),zs=$(/<\/no(script|embed|frames)/i),$s=$(/\/>/i),Y={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vs=function(){return typeof window>"u"?null:window},Us=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Yn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},oe=function(e,t,n,r){return P(e,t)&&le(e[t])?_(r.base?v(r.base):{},e[t],r.transform):n};function Vn(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vs(),e=f=>Vn(f);if(e.version="3.4.13",e.removed=[],!a||!a.document||a.document.nodeType!==Y.document||!a.Element)return e.isSupported=!1,e;let t=a.document,n=t,r=n.currentScript;a.DocumentFragment;let o=a.HTMLTemplateElement,s=a.Node,u=a.Element,p=a.NodeFilter,T=a.NamedNodeMap;T===void 0&&(a.NamedNodeMap||a.MozNamedAttrMap),a.HTMLFormElement;let d=a.DOMParser,k=a.trustedTypes,m=u.prototype,x=V(m,"cloneNode"),Z=V(m,"remove"),j=V(m,"nextSibling"),F=V(m,"childNodes"),X=V(m,"parentNode"),Ie=V(m,"shadowRoot"),ge=V(m,"attributes"),C=s&&s.prototype?V(s.prototype,"nodeType"):null,H=s&&s.prototype?V(s.prototype,"nodeName"):null,Be=s&&s.prototype?V(s.prototype,"ownerDocument"):null;if(typeof o=="function"){let f=t.createElement("template");f.content&&f.content.ownerDocument&&(t=f.content.ownerDocument)}let B,ae="",at,Ht=!1,Oe=0,Bt=function(){if(Oe>0)throw me('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Te=function(i){Bt(),Oe++;try{return B.createHTML(i)}finally{Oe--}},Qn=function(i){Bt(),Oe++;try{return B.createScriptURL(i)}finally{Oe--}},Kn=function(){return Ht||(at=Us(k,r),Ht=!0),at},Ge=t,ct=Ge.implementation,Gt=Ge.createNodeIterator,Jn=Ge.createDocumentFragment,ei=Ge.getElementsByTagName,ti=n.importNode,S=Yn();e.isSupported=typeof Zn=="function"&&typeof X=="function"&&ct&&ct.createHTMLDocument!==void 0;let ni=Rs,ii=Is,si=Os,ri=Ls,oi=Ds,li=Ns,Wt=Cs,ai=Ps,jt=Wn,R=null,ut=_({},[...Fn,...Pt,...zt,...$t,...Hn]),I=null,pt=_({},[...Bn,...vt,...Gn,...lt]),D=Object.seal(Re(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,qt=null,ne=Object.seal(Re(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Yt=!0,ft=!0,Zt=!1,Xt=!0,ie=!1,se=!0,ce=!1,ht=!1,We=null,je=null,dt=!1,ke=!1,qe=!1,Ye=!1,Vt=!0,Qt=!1,Kt="user-content-",mt=!0,Ze=!1,be={},Q=null,gt=_({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Jt=null,en=_({},["audio","video","img","source","image","track"]),Tt=null,tn=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",Ve="http://www.w3.org/2000/svg",K="http://www.w3.org/1999/xhtml",_e=K,kt=!1,bt=null,ci=_({},[Xe,Ve,K],Mt),nn=z(["mi","mo","mn","ms","mtext"]),_t=_({},nn),sn=z(["annotation-xml"]),xt=_({},sn),ui=_({},["title","style","font","a","script"]),De=null,pi=["application/xhtml+xml","text/html"],fi="text/html",O=null,xe=null,hi=t.createElement("form"),rn=function(i){return i instanceof RegExp||i instanceof Function},yt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(xe&&xe===i)return;(!i||typeof i!="object")&&(i={}),i=v(i),De=pi.indexOf(i.PARSER_MEDIA_TYPE)===-1?fi:i.PARSER_MEDIA_TYPE,O=De==="application/xhtml+xml"?Mt:He,R=oe(i,"ALLOWED_TAGS",ut,{transform:O}),I=oe(i,"ALLOWED_ATTR",pt,{transform:O}),bt=oe(i,"ALLOWED_NAMESPACES",ci,{transform:Mt}),Tt=oe(i,"ADD_URI_SAFE_ATTR",tn,{transform:O,base:tn}),Jt=oe(i,"ADD_DATA_URI_TAGS",en,{transform:O,base:en}),Q=oe(i,"FORBID_CONTENTS",gt,{transform:O}),Le=oe(i,"FORBID_TAGS",v({}),{transform:O}),qt=oe(i,"FORBID_ATTR",v({}),{transform:O}),be=P(i,"USE_PROFILES")?i.USE_PROFILES&&typeof i.USE_PROFILES=="object"?v(i.USE_PROFILES):i.USE_PROFILES:!1,Yt=i.ALLOW_ARIA_ATTR!==!1,ft=i.ALLOW_DATA_ATTR!==!1,Zt=i.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ie=i.SAFE_FOR_TEMPLATES||!1,se=i.SAFE_FOR_XML!==!1,ce=i.WHOLE_DOCUMENT||!1,ke=i.RETURN_DOM||!1,qe=i.RETURN_DOM_FRAGMENT||!1,Ye=i.RETURN_TRUSTED_TYPE||!1,dt=i.FORCE_BODY||!1,Vt=i.SANITIZE_DOM!==!1,Qt=i.SANITIZE_NAMED_PROPS||!1,mt=i.KEEP_CONTENT!==!1,Ze=i.IN_PLACE||!1,jt=Es(i.ALLOWED_URI_REGEXP)?i.ALLOWED_URI_REGEXP:Wn,_e=typeof i.NAMESPACE=="string"?i.NAMESPACE:K,_t=P(i,"MATHML_TEXT_INTEGRATION_POINTS")&&i.MATHML_TEXT_INTEGRATION_POINTS&&typeof i.MATHML_TEXT_INTEGRATION_POINTS=="object"?v(i.MATHML_TEXT_INTEGRATION_POINTS):_({},nn),xt=P(i,"HTML_INTEGRATION_POINTS")&&i.HTML_INTEGRATION_POINTS&&typeof i.HTML_INTEGRATION_POINTS=="object"?v(i.HTML_INTEGRATION_POINTS):_({},sn);let l=P(i,"CUSTOM_ELEMENT_HANDLING")&&i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING=="object"?v(i.CUSTOM_ELEMENT_HANDLING):Re(null);if(D=Re(null),P(l,"tagNameCheck")&&rn(l.tagNameCheck)&&(D.tagNameCheck=l.tagNameCheck),P(l,"attributeNameCheck")&&rn(l.attributeNameCheck)&&(D.attributeNameCheck=l.attributeNameCheck),P(l,"allowCustomizedBuiltInElements")&&typeof l.allowCustomizedBuiltInElements=="boolean"&&(D.allowCustomizedBuiltInElements=l.allowCustomizedBuiltInElements),$(D),ie&&(ft=!1),qe&&(ke=!0),be&&(R=_({},Hn),I=Re(null),be.html===!0&&(_(R,Fn),_(I,Bn)),be.svg===!0&&(_(R,Pt),_(I,vt),_(I,lt)),be.svgFilters===!0&&(_(R,zt),_(I,vt),_(I,lt)),be.mathMl===!0&&(_(R,$t),_(I,Gn),_(I,lt))),ne.tagCheck=null,ne.attributeCheck=null,P(i,"ADD_TAGS")&&(typeof i.ADD_TAGS=="function"?ne.tagCheck=i.ADD_TAGS:le(i.ADD_TAGS)&&(R===ut&&(R=v(R)),_(R,i.ADD_TAGS,O))),P(i,"ADD_ATTR")&&(typeof i.ADD_ATTR=="function"?ne.attributeCheck=i.ADD_ATTR:le(i.ADD_ATTR)&&(I===pt&&(I=v(I)),_(I,i.ADD_ATTR,O))),P(i,"ADD_URI_SAFE_ATTR")&&le(i.ADD_URI_SAFE_ATTR)&&_(Tt,i.ADD_URI_SAFE_ATTR,O),P(i,"FORBID_CONTENTS")&&le(i.FORBID_CONTENTS)&&(Q===gt&&(Q=v(Q)),_(Q,i.FORBID_CONTENTS,O)),P(i,"ADD_FORBID_CONTENTS")&&le(i.ADD_FORBID_CONTENTS)&&(Q===gt&&(Q=v(Q)),_(Q,i.ADD_FORBID_CONTENTS,O)),mt&&(R["#text"]=!0),ce&&_(R,["html","head","body"]),R.table&&(_(R,["tbody"]),delete Le.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw me('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw me('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let c=B;B=i.TRUSTED_TYPES_POLICY;try{ae=Te("")}catch(h){throw B=c,h}}else i.TRUSTED_TYPES_POLICY===null?(B=void 0,ae=""):(B===void 0&&(B=Kn()),B&&typeof ae=="string"&&(ae=Te("")));z&&z(i),xe=i},on=_({},[...Pt,...zt,...As]),ln=_({},[...$t,...Ss]),di=function(i,l,c){return l.namespaceURI===K?i==="svg":l.namespaceURI===Xe?i==="svg"&&(c==="annotation-xml"||_t[c]):!!on[i]},mi=function(i,l,c){return l.namespaceURI===K?i==="math":l.namespaceURI===Ve?i==="math"&&xt[c]:!!ln[i]},gi=function(i,l,c){return l.namespaceURI===Ve&&!xt[c]||l.namespaceURI===Xe&&!_t[c]?!1:!ln[i]&&(ui[i]||!on[i])},Ti=function(i){let l=X(i);(!l||!l.tagName)&&(l={namespaceURI:_e,tagName:"template"});let c=He(i.tagName),h=He(l.tagName);return bt[i.namespaceURI]?i.namespaceURI===Ve?di(c,l,h):i.namespaceURI===Xe?mi(c,l,h):i.namespaceURI===K?gi(c,l,h):!!(De==="application/xhtml+xml"&&bt[i.namespaceURI]):!1},re=function(i){Se(e.removed,{element:i});try{X(i).removeChild(i)}catch{if(Z(i),!X(i))throw me("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Qe=function(i){Ne(i);let l=F(i);if(l){let h=[];Ae(l,g=>{Se(h,g)}),Ae(h,g=>{try{Z(g)}catch{}})}let c=ge(i);if(c)for(let h=c.length-1;h>=0;--h){let g=c[h],b=g&&g.name;if(typeof b=="string")try{i.removeAttribute(b)}catch{}}},ue=function(i,l){try{Se(e.removed,{attribute:l.getAttributeNode(i),from:l})}catch{Se(e.removed,{attribute:null,from:l})}if(l.removeAttribute(i),i==="is")if(ke||qe)try{re(l)}catch{}else try{l.setAttribute(i,"")}catch{}},ki=function(i){let l=ge(i);if(l)for(let c=l.length-1;c>=0;--c){let h=l[c],g=h&&h.name;if(!(typeof g!="string"||I[O(g)]))try{i.removeAttribute(g)}catch{}}},Ne=function(i){let l=[i];for(;l.length>0;){let c=l.pop();(C?C(c):c.nodeType)===Y.element&&ki(c);let g=F(c);if(g)for(let b=g.length-1;b>=0;--b)l.push(g[b])}},bi=function(i){if(!se)return;let l=[i];for(;l.length>0;){let c=l.pop(),h=C?C(c):c.nodeType;if(h===Y.processingInstruction||h===Y.comment&&M(qn,c.data)){try{Z(c)}catch{}continue}if(h===Y.element){let b=c,y=O(H?H(c):c.nodeName);try{b.hasAttribute&&b.hasAttribute("patchsrc")&&b.removeAttribute("patchsrc"),b.hasAttribute&&b.hasAttribute("for")&&y!=="label"&&y!=="output"&&b.removeAttribute("for")}catch{}}let g=F(c);if(g)for(let b=g.length-1;b>=0;--b)l.push(g[b])}},an=function(i){let l=null,c=null;if(dt)i="<remove></remove>"+i;else{let b=zn(i,/^[\r\n\t ]+/);c=b&&b[0]}De==="application/xhtml+xml"&&_e===K&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");let h=B?Te(i):i;if(_e===K)try{l=new d().parseFromString(h,De)}catch{}if(!l||!l.documentElement){l=ct.createDocument(_e,"template",null);try{l.documentElement.innerHTML=kt?ae:h}catch{}}let g=l.body||l.documentElement;return i&&c&&g.insertBefore(t.createTextNode(c),g.childNodes[0]||null),_e===K?ei.call(l,ce?"html":"body")[0]:ce?l.documentElement:g},cn=function(i){let l=Be?Be(i):i.ownerDocument;return Gt.call(l||i,i,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Ke=function(i){return i=Ue(i,ni," "),i=Ue(i,ii," "),i=Ue(i,si," "),i},wt=function(i){var l;i.normalize();let c=Be?Be(i):i.ownerDocument,h=Gt.call(c||i,i,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null),g=h.nextNode();for(;g;)g.data=Ke(g.data),g=h.nextNode();let b=(l=i.querySelectorAll)===null||l===void 0?void 0:l.call(i,"template");b&&Ae(b,y=>{ye(y.content)&&wt(y.content)})},Je=function(i){let l=H?H(i):null;return typeof l!="string"||O(l)!=="form"?!1:typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||i.attributes!==ge(i)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function"||i.nodeType!==C(i)||i.childNodes!==F(i)},ye=function(i){if(!C||typeof i!="object"||i===null)return!1;try{return C(i)===Y.documentFragment}catch{return!1}},Ce=function(i){if(!C||typeof i!="object"||i===null)return!1;try{return typeof C(i)=="number"}catch{return!1}};function J(f,i,l){f.length!==0&&Ae(f,c=>{c.call(e,i,l,xe)})}let _i=function(i,l){return!!(se&&i.hasChildNodes()&&!Ce(i.firstElementChild)&&M(jn,i.textContent)&&M(jn,i.innerHTML)||se&&i.namespaceURI===K&&l==="style"&&Ce(i.firstElementChild)||i.nodeType===Y.processingInstruction||se&&i.nodeType===Y.comment&&M(qn,i.data))},xi=function(i,l,c){if(!Le[l]&&hn(l)&&(D.tagNameCheck instanceof RegExp&&M(D.tagNameCheck,l)||D.tagNameCheck instanceof Function&&D.tagNameCheck(l)))return!1;if(mt&&!Q[l]){let h=X(i),g=F(i);if(g&&h){let b=g.length;for(let y=b-1;y>=0;--y){let L=i===c?x(g[y],!0):g[y];h.insertBefore(L,j(i))}}}return re(i),!0},un=function(i,l,c,h){return i.length===0?l:l===c||l===h?v(l):l},pn=function(i,l){if(J(S.beforeSanitizeElements,i,null),i!==l&&X(i)===null)return Ze&&Ne(i),!0;if(Je(i))return re(i),!0;let c=O(H?H(i):i.nodeName);if(R=un(S.uponSanitizeElement,R,ut,We),J(S.uponSanitizeElement,i,{tagName:c,allowedTags:R}),i!==l&&X(i)===null)return Ze&&Ne(i),!0;if(_i(i,c))return re(i),!0;if(Le[c]||!(ne.tagCheck instanceof Function&&ne.tagCheck(c))&&!R[c]){let g=xi(i,c,l);return g===!1&&J(S.afterSanitizeElements,i,null),g}if((C?C(i):i.nodeType)===Y.element&&!Ti(i)||(c==="noscript"||c==="noembed"||c==="noframes")&&M(zs,i.innerHTML))return re(i),!0;if(ie&&i.nodeType===Y.text){let g=Ke(i.textContent);i.textContent!==g&&(Se(e.removed,{element:i.cloneNode()}),i.textContent=g)}return J(S.afterSanitizeElements,i,null),!1},fn=function(i,l,c){if(qt[l]||se&&l==="patchsrc"||se&&l==="for"&&i!=="label"&&i!=="output"||Vt&&(l==="id"||l==="name")&&(c in t||c in hi))return!1;let h=I[l]||ne.attributeCheck instanceof Function&&ne.attributeCheck(l,i);if(!(ft&&M(ri,l))){if(!(Yt&&M(oi,l))){if(h){if(!Tt[l]){if(!M(jt,Ue(c,Wt,""))){if(!((l==="src"||l==="xlink:href"||l==="href")&&i!=="script"&&$n(c,"data:")===0&&Jt[i])){if(!(Zt&&!M(li,Ue(c,Wt,"")))){if(c)return!1}}}}}else if(!(hn(i)&&(D.tagNameCheck instanceof RegExp&&M(D.tagNameCheck,i)||D.tagNameCheck instanceof Function&&D.tagNameCheck(i))&&(D.attributeNameCheck instanceof RegExp&&M(D.attributeNameCheck,l)||D.attributeNameCheck instanceof Function&&D.attributeNameCheck(l,i))||l==="is"&&D.allowCustomizedBuiltInElements&&(D.tagNameCheck instanceof RegExp&&M(D.tagNameCheck,c)||D.tagNameCheck instanceof Function&&D.tagNameCheck(c))))return!1}}return!0},yi=_({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),hn=function(i){return!yi[He(i)]&&M(ai,i)},wi=function(i,l,c,h){if(B&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!c)switch(k.getAttributeType(i,l)){case"TrustedHTML":return Te(h);case"TrustedScriptURL":return Qn(h)}return h},Ei=function(i,l,c,h){try{c?i.setAttributeNS(c,l,h):i.setAttribute(l,h),Je(i)?re(i):Pn(e.removed)}catch{ue(l,i)}},dn=function(i){J(S.beforeSanitizeAttributes,i,null);let l=i.attributes;if(!l||Je(i))return;I=un(S.uponSanitizeAttribute,I,pt,je);let c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},h=l.length,g=O(i.nodeName);for(;h--;){let b=l[h],y=b.name,L=b.namespaceURI,G=b.value,W=O(y),At=G,U=y==="value"?At:ks(At);if(c.attrName=W,c.attrValue=U,c.keepAttr=!0,c.forceKeepAttr=void 0,J(S.uponSanitizeAttribute,i,c),U=c.attrValue,Qt&&(W==="id"||W==="name")&&$n(U,Kt)!==0&&(ue(y,i),U=Kt+U),se&&M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,U)){ue(y,i);continue}if(W==="attributename"&&zn(U,"href")){ue(y,i);continue}if(!c.forceKeepAttr){if(!c.keepAttr){ue(y,i);continue}if(!Xt&&M($s,U)){ue(y,i);continue}if(ie&&(U=Ke(U)),!fn(g,W,U)){ue(y,i);continue}U=wi(g,W,L,U),U!==At&&Ei(i,y,L,U)}}J(S.afterSanitizeAttributes,i,null)},et=function(i){let l=null,c=cn(i);for(J(S.beforeSanitizeShadowDOM,i,null);l=c.nextNode();)if(J(S.uponSanitizeShadowNode,l,null),pn(l,i),dn(l),ye(l.content)&&et(l.content),(C?C(l):l.nodeType)===Y.element){let g=Ie(l);ye(g)&&(Et(g),et(g))}J(S.afterSanitizeShadowDOM,i,null)},Et=function(i){let l=[{node:i,shadow:null}];for(;l.length>0;){let c=l.pop();if(c.shadow){et(c.shadow);continue}let h=c.node,b=(C?C(h):h.nodeType)===Y.element,y=F(h);if(y)for(let L=y.length-1;L>=0;--L)l.push({node:y[L],shadow:null});if(b){let L=H?H(h):null;if(typeof L=="string"&&O(L)==="template"){let G=h.content;ye(G)&&l.push({node:G,shadow:null})}}if(b){let L=Ie(h);ye(L)&&l.push({node:null,shadow:L},{node:L,shadow:null})}}};return e.sanitize=function(f){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=null,c=null,h=null,g=null;if(kt=!f,kt&&(f="<!-->"),typeof f!="string"&&!Ce(f)&&(f=ws(f),typeof f!="string"))throw me("dirty is not a string, aborting");if(!e.isSupported)return f;ht?(R=We,I=je):yt(i),(S.uponSanitizeElement.length>0||S.uponSanitizeAttribute.length>0)&&(R=v(R)),S.uponSanitizeAttribute.length>0&&(I=v(I)),e.removed=[];let b=Ze&&typeof f!="string"&&Ce(f);if(b){bi(f);let G=H?H(f):f.nodeName;if(typeof G=="string"){let W=O(G);if(!R[W]||Le[W])throw Qe(f),me("root node is forbidden and cannot be sanitized in-place")}if(Je(f))throw Qe(f),me("root node is clobbered and cannot be sanitized in-place");try{Et(f)}catch(W){throw Qe(f),W}}else if(Ce(f))l=an("<!---->"),c=l.ownerDocument.importNode(f,!0),c.nodeType===Y.element&&c.nodeName==="BODY"||c.nodeName==="HTML"?l=c:l.appendChild(c),Et(c);else{if(!ke&&!ie&&!ce&&f.indexOf("<")===-1)return B&&Ye?Te(f):f;if(l=an(f),!l)return ke?null:Ye?ae:""}l&&dt&&re(l.firstChild);let y=b?f:l;try{let G=cn(y);for(;h=G.nextNode();)pn(h,y),dn(h),ye(h.content)&&et(h.content)}catch(G){throw b&&(Qe(f),Ae(e.removed,W=>{W.element&&Ne(W.element)})),G}if(b)return Ae(e.removed,G=>{G.element&&Ne(G.element)}),ie&&wt(f),f;if(ke){if(ie&&wt(l),qe)for(g=Jn.call(l.ownerDocument);l.firstChild;)g.appendChild(l.firstChild);else g=l;return(I.shadowroot||I.shadowrootmode)&&(g=ti.call(n,g,!0)),g}let L=ce?l.outerHTML:l.innerHTML;return ce&&R["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&M(Ms,l.ownerDocument.doctype.name)&&(L="<!DOCTYPE "+l.ownerDocument.doctype.name+`>
48
+ `+L),ie&&(L=Ke(L)),B&&Ye?Te(L):L},e.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yt(f),ht=!0,We=R,je=I},e.clearConfig=function(){xe=null,ht=!1,We=null,je=null,B=at,ae=""},e.isValidAttribute=function(f,i,l){xe||yt({});let c=O(f),h=O(i);return fn(c,h,l)},e.addHook=function(f,i){typeof i=="function"&&P(S,f)&&Se(S[f],i)},e.removeHook=function(f,i){if(P(S,f)){if(i!==void 0){let l=gs(S[f],i);return l===-1?void 0:Ts(S[f],l,1)[0]}return Pn(S[f])}},e.removeHooks=function(f){P(S,f)&&(S[f]=[])},e.removeAllHooks=function(){S=Yn()},e}var Fs=Vn();export{Fs as DOMPurify,rt as Marked};
49
49
  /*! Bundled license information:
50
50
 
51
51
  dompurify/dist/purify.es.mjs:
52
- (*! @license DOMPurify 3.4.10 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.10/LICENSE *)
52
+ (*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE *)
53
53
  */
@@ -1321,6 +1321,7 @@ type RuntypeExecutionStreamEvent = ({
1321
1321
  iterations?: number;
1322
1322
  kind: "agent" | "flow";
1323
1323
  seq: number;
1324
+ stepErrorCount?: number;
1324
1325
  stopReason?: string;
1325
1326
  success: boolean;
1326
1327
  successfulSteps?: number;
@@ -1650,10 +1651,21 @@ type RuntypeExecutionStreamEvent = ({
1650
1651
  mode: "form" | "url";
1651
1652
  pauseCount?: number;
1652
1653
  requestedSchema?: Record<string, unknown>;
1654
+ requests?: Array<{
1655
+ message: string;
1656
+ mode: "form" | "url";
1657
+ name: string;
1658
+ requestedSchema?: Record<string, unknown>;
1659
+ url?: string;
1660
+ }>;
1653
1661
  serverName?: string;
1654
1662
  url?: string;
1655
1663
  };
1656
1664
  executionId: string;
1665
+ externalAgent?: {
1666
+ contextId?: string;
1667
+ taskId?: string;
1668
+ };
1657
1669
  origin?: "webmcp" | "sdk";
1658
1670
  pageOrigin?: string;
1659
1671
  parameters?: Record<string, unknown>;
@@ -1321,6 +1321,7 @@ type RuntypeExecutionStreamEvent = ({
1321
1321
  iterations?: number;
1322
1322
  kind: "agent" | "flow";
1323
1323
  seq: number;
1324
+ stepErrorCount?: number;
1324
1325
  stopReason?: string;
1325
1326
  success: boolean;
1326
1327
  successfulSteps?: number;
@@ -1650,10 +1651,21 @@ type RuntypeExecutionStreamEvent = ({
1650
1651
  mode: "form" | "url";
1651
1652
  pauseCount?: number;
1652
1653
  requestedSchema?: Record<string, unknown>;
1654
+ requests?: Array<{
1655
+ message: string;
1656
+ mode: "form" | "url";
1657
+ name: string;
1658
+ requestedSchema?: Record<string, unknown>;
1659
+ url?: string;
1660
+ }>;
1653
1661
  serverName?: string;
1654
1662
  url?: string;
1655
1663
  };
1656
1664
  executionId: string;
1665
+ externalAgent?: {
1666
+ contextId?: string;
1667
+ taskId?: string;
1668
+ };
1657
1669
  origin?: "webmcp" | "sdk";
1658
1670
  pageOrigin?: string;
1659
1671
  parameters?: Record<string, unknown>;