opencami 1.8.9 → 1.8.13
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.
- package/dist/client/assets/{CSPContext-DI-5GAnQ.js → CSPContext-DATmz4sz.js} +1 -1
- package/dist/client/assets/{DirectionContext-CrIsc5n9.js → DirectionContext-FHFKdJq_.js} +1 -1
- package/dist/client/assets/_sessionKey-D2ZMdqJ0.js +23 -0
- package/dist/client/assets/agents-9A0buuwT.js +2 -0
- package/dist/client/assets/agents-screen-C58VLjES.js +1 -0
- package/dist/client/assets/bots-Lqt92ma0.js +2 -0
- package/dist/client/assets/{bots-screen-BTKCOohV.js → bots-screen-B8h4Y1VL.js} +1 -1
- package/dist/client/assets/{button-8ab4wOwy.js → button-BcUmP7JL.js} +1 -1
- package/dist/client/assets/{composite-B2qsrzf3.js → composite--BBbKdxm.js} +1 -1
- package/dist/client/assets/{connect-B3_p7C4I.js → connect-BmwKnEFP.js} +1 -1
- package/dist/client/assets/{dashboard-BtClHYpn.js → dashboard-BWQl_-2-.js} +1 -1
- package/dist/client/assets/event-BxzjTPjG.js +1 -0
- package/dist/client/assets/file-explorer-screen-BAbbb_R4.js +1 -0
- package/dist/client/assets/files-DvIFms9G.js +2 -0
- package/dist/client/assets/follow-up-suggestions-Bq-xR5GV.js +5 -0
- package/dist/client/assets/{index-BXiha-Vz.js → index-BTtT4Vbb.js} +1 -1
- package/dist/client/assets/{index-CtlYu8Ug.js → index-rOr2i8gW.js} +1 -1
- package/dist/client/assets/keyboard-shortcuts-dialog-BA8cBwWm.js +1 -0
- package/dist/client/assets/main-_1IghVZn.js +212 -0
- package/dist/client/assets/markdown-CqIcraPO.js +87 -0
- package/dist/client/assets/memory-B3LyVZwO.js +2 -0
- package/dist/client/assets/memory-screen-GBzowsnE.js +1 -0
- package/dist/client/assets/menu--FXN_JCl.js +1 -0
- package/dist/client/assets/{opencami-logo-BSed2Wez.js → opencami-logo-BFo87CeM.js} +1 -1
- package/dist/client/assets/proxy-CJ6-TEKD.js +9 -0
- package/dist/client/assets/{react-WkSlhZJd.js → react-BRYbnjMp.js} +1 -1
- package/dist/client/assets/search-dialog-CJS2GUnE.js +1 -0
- package/dist/client/assets/{search-sources-badge-Du8KpUEb.js → search-sources-badge-D0YArqfp.js} +1 -1
- package/dist/client/assets/session-export-dialog-Bc9YEPLs.js +1 -0
- package/dist/client/assets/settings-dialog-SDzqDXsx.js +1 -0
- package/dist/client/assets/skills-BVLjvrPU.js +2 -0
- package/dist/client/assets/{skills-panel-CVh1I-7D.js → skills-panel-DIalYvpW.js} +1 -1
- package/dist/client/assets/styles-b2XYKZYx.css +1 -0
- package/dist/client/assets/switch-BwmDNR0d.js +1 -0
- package/dist/client/assets/tabs-T1fJbUsm.js +1 -0
- package/dist/client/assets/thinking-DUdE6Iej.js +1 -0
- package/dist/client/assets/tooltip-DexBPu8g.js +1 -0
- package/dist/client/assets/use-file-explorer-state-eXs92yKN.js +12 -0
- package/dist/client/assets/{useBaseUiId-DiwX_3so.js → useBaseUiId-DN9cOflS.js} +1 -1
- package/dist/client/assets/{useCompositeItem-UPIPwR9H.js → useCompositeItem-B_J-cnZX.js} +1 -1
- package/dist/client/assets/{useControlled-CT2hRlcU.js → useControlled-DeDLOsPR.js} +1 -1
- package/dist/client/assets/{useMutation-rx8UH99I.js → useMutation-TzgejsE_.js} +1 -1
- package/dist/client/assets/useOnFirstRender-S4-xcV93.js +1 -0
- package/dist/client/assets/{useQuery-Boaa6oF3.js → useQuery-BdjM5kzn.js} +1 -1
- package/dist/server/assets/{_sessionKey-B6iYeyCS.js → _sessionKey-DBzlGMo3.js} +147 -129
- package/dist/server/assets/{_tanstack-start-manifest_v-C9chPgNH.js → _tanstack-start-manifest_v-CX4xb59U.js} +1 -1
- package/dist/server/assets/{agents-CmQ4vvXm.js → agents-BuE0Yum3.js} +1 -1
- package/dist/server/assets/{agents-screen-bmrIyFbk.js → agents-screen-CEQhbEwf.js} +3 -3
- package/dist/server/assets/{bots-Byt6jv0a.js → bots-BDHeSvSQ.js} +1 -1
- package/dist/server/assets/{bots-screen-C2TGFv42.js → bots-screen-C0NRS526.js} +2 -2
- package/dist/server/assets/{button-CwY2OHFj.js → button-kI8fEIZQ.js} +1 -1
- package/dist/server/assets/{connect-BNabuqpW.js → connect-CTVBm0Vc.js} +2 -2
- package/dist/server/assets/{file-explorer-screen-DH4UFK03.js → file-explorer-screen-FU_NhZmS.js} +4 -4
- package/dist/server/assets/{files-DYdXlQDr.js → files-DLxqp-h5.js} +1 -1
- package/dist/server/assets/{follow-up-suggestions-mzRQIB0k.js → follow-up-suggestions-BmSFSY87.js} +8 -8
- package/dist/server/assets/{index-BEWnDAH6.js → index-B_F4DTUu.js} +1 -1
- package/dist/server/assets/{index-COElhwGA.js → index-C1dylvu-.js} +1 -1
- package/dist/server/assets/{keyboard-shortcuts-dialog-Cr6fOqHz.js → keyboard-shortcuts-dialog-Cp3ECNNi.js} +2 -2
- package/dist/server/assets/{markdown-DoX5Q7qh.js → markdown-CFdYXCRQ.js} +3 -3
- package/dist/server/assets/{memory-Cxu7i8ej.js → memory-rBB015W-.js} +1 -1
- package/dist/server/assets/{memory-screen-B5l1NZRY.js → memory-screen-vqXczcVo.js} +4 -4
- package/dist/server/assets/{menu-D90CDTi2.js → menu-D8cKTpmN.js} +1 -1
- package/dist/server/assets/{router-BqLGFd4L.js → router-CL6A11qi.js} +305 -85
- package/dist/server/assets/{search-dialog-CmI7naPN.js → search-dialog-D8DvpPZw.js} +8 -8
- package/dist/server/assets/{search-sources-badge-B0rAEDs_.js → search-sources-badge-B0t8Qffy.js} +1 -1
- package/dist/server/assets/{session-export-dialog-C53RRAah.js → session-export-dialog-CgtlOnwf.js} +2 -2
- package/dist/server/assets/{settings-dialog-BZ67gr9N.js → settings-dialog-CeP-J_NJ.js} +35 -18
- package/dist/server/assets/{skills-Cy8xclXY.js → skills-BXUivxuo.js} +1 -1
- package/dist/server/assets/{skills-panel-BnRNb7u9.js → skills-panel-CDUp4jvw.js} +2 -2
- package/dist/server/assets/{switch-BbkUeVDV.js → switch-BZzwkgAQ.js} +1 -1
- package/dist/server/assets/{tabs-DDFZob0m.js → tabs-CWbp3mT4.js} +1 -1
- package/dist/server/assets/{thinking-CA8PSwKJ.js → thinking-ClIWjSbx.js} +8 -8
- package/dist/server/assets/{tooltip-DgsSPocE.js → tooltip-DOvOrSSS.js} +1 -1
- package/dist/server/assets/{use-file-explorer-state-s7CS50ho.js → use-file-explorer-state-E6cUvMva.js} +1 -1
- package/dist/server/server.js +195 -38
- package/package.json +1 -1
- package/dist/client/assets/_sessionKey-B4NZmxf3.js +0 -21
- package/dist/client/assets/agents-bptidK8z.js +0 -2
- package/dist/client/assets/agents-screen-6qdnPmx2.js +0 -1
- package/dist/client/assets/bots-BWpbaQ-E.js +0 -2
- package/dist/client/assets/event-DG3RKJz8.js +0 -1
- package/dist/client/assets/file-explorer-screen-Djl8x-8P.js +0 -1
- package/dist/client/assets/files-CjbCJDgC.js +0 -2
- package/dist/client/assets/follow-up-suggestions-BSCMXRXh.js +0 -5
- package/dist/client/assets/keyboard-shortcuts-dialog-HAufCn9C.js +0 -1
- package/dist/client/assets/main-CQKtcNr3.js +0 -210
- package/dist/client/assets/markdown-DFJF-FsV.js +0 -87
- package/dist/client/assets/memory-DnJOmcwU.js +0 -2
- package/dist/client/assets/memory-screen-Bm4NMAnU.js +0 -1
- package/dist/client/assets/menu-D26Vmgxl.js +0 -1
- package/dist/client/assets/popupStateMapping-DkI2OCkW.js +0 -1
- package/dist/client/assets/proxy-CHQ-VCN1.js +0 -9
- package/dist/client/assets/search-dialog-CCl4d0Pi.js +0 -1
- package/dist/client/assets/session-export-dialog-io9FvLKq.js +0 -1
- package/dist/client/assets/settings-dialog-B93qswor.js +0 -1
- package/dist/client/assets/skills-BNDGnHwM.js +0 -2
- package/dist/client/assets/styles-Ce2xZzc4.css +0 -1
- package/dist/client/assets/switch-CSnzINDW.js +0 -1
- package/dist/client/assets/tabs-CWfn44FL.js +0 -1
- package/dist/client/assets/thinking-BmoLlbFC.js +0 -1
- package/dist/client/assets/tooltip-CSGMH2t4.js +0 -1
- package/dist/client/assets/use-file-explorer-state-BYVzjwPA.js +0 -12
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import{A as Ir,j as _,r as he,d as Xi,L as _n}from"./main-_1IghVZn.js";import{r as Yi,C as Jt}from"./index-BTtT4Vbb.js";import{u as Ct,D as Ji,a as Ki,b as el,d as tl}from"./use-file-explorer-state-eXs92yKN.js";import{c as nl,B as Ln}from"./button-BcUmP7JL.js";import{s as Kt,h as rl,w as il,f as ll,a as sl,b as al,c as Fn}from"./index-T4TOjvD0.js";function en(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ze=en();function Tr(e){ze=e}var Ie={exec:()=>null};function O(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let l=typeof s=="string"?s:s.source;return l=l.replace(J.caret,"$1"),n=n.replace(i,l),r},getRegex:()=>new RegExp(n,t)};return r}var ol=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),J={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},ul=/^(?:[ \t]*(?:\n|$))+/,cl=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Je=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fl=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ar=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zr=O(Ar).replace(/bull/g,tn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),pl=O(Ar).replace(/bull/g,tn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),nn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ml=/^[^\n]+/,rn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,gl=O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),dl=O(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tn).getRegex(),dt="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",ln=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kl=O("^ {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",ln).replace("tag",dt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rr=O(nn).replace("hr",Je).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex(),xl=O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Rr).getRegex(),sn={blockquote:xl,code:cl,def:gl,fences:hl,heading:fl,hr:Je,html:kl,lheading:zr,list:dl,newline:ul,paragraph:Rr,table:Ie,text:ml},Dn=O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Je).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex(),yl={...sn,lheading:pl,table:Dn,paragraph:O(nn).replace("hr",Je).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dn).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",dt).getRegex()},bl={...sn,html:O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ln).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:Ie,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(nn).replace("hr",Je).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",zr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},wl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Sl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Pr=/^( {2,}|\\)\n(?!\s*$)/,Cl=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,kt=/[\p{P}\p{S}]/u,an=/[\s\p{P}\p{S}]/u,_r=/[^\s\p{P}\p{S}]/u,El=O(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,an).getRegex(),Lr=/(?!~)[\p{P}\p{S}]/u,Il=/(?!~)[\s\p{P}\p{S}]/u,Tl=/(?:[^\s\p{P}\p{S}]|~)/u,Fr=/(?![*_])[\p{P}\p{S}]/u,Al=/(?![*_])[\s\p{P}\p{S}]/u,zl=/(?:[^\s\p{P}\p{S}]|[*_])/u,Rl=O(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ol?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Dr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Pl=O(Dr,"u").replace(/punct/g,kt).getRegex(),_l=O(Dr,"u").replace(/punct/g,Lr).getRegex(),vr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ll=O(vr,"gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,an).replace(/punct/g,kt).getRegex(),Fl=O(vr,"gu").replace(/notPunctSpace/g,Tl).replace(/punctSpace/g,Il).replace(/punct/g,Lr).getRegex(),Dl=O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_r).replace(/punctSpace/g,an).replace(/punct/g,kt).getRegex(),vl=O(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Fr).getRegex(),Nl="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",$l=O(Nl,"gu").replace(/notPunctSpace/g,zl).replace(/punctSpace/g,Al).replace(/punct/g,Fr).getRegex(),Bl=O(/\\(punct)/,"gu").replace(/punct/g,kt).getRegex(),Ol=O(/^<(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(),jl=O(ln).replace("(?:-->|$)","-->").getRegex(),Ml=O("^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",jl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ot=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ql=O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ot).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nr=O(/^!?\[(label)\]\[(ref)\]/).replace("label",ot).replace("ref",rn).getRegex(),$r=O(/^!?\[(ref)\](?:\[\])?/).replace("ref",rn).getRegex(),Hl=O("reflink|nolink(?!\\()","g").replace("reflink",Nr).replace("nolink",$r).getRegex(),vn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,on={_backpedal:Ie,anyPunctuation:Bl,autolink:Ol,blockSkip:Rl,br:Pr,code:Sl,del:Ie,delLDelim:Ie,delRDelim:Ie,emStrongLDelim:Pl,emStrongRDelimAst:Ll,emStrongRDelimUnd:Dl,escape:wl,link:ql,nolink:$r,punctuation:El,reflink:Nr,reflinkSearch:Hl,tag:Ml,text:Cl,url:Ie},Vl={...on,link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",ot).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ot).getRegex()},Mt={...on,emStrongRDelimAst:Fl,emStrongLDelim:_l,delLDelim:vl,delRDelim:$l,url:O(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vn).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\S]|[^\s~\\]))\1(?=[^~]|$)/,text:O(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vn).getRegex()},Ul={...Mt,br:O(Pr).replace("{2,}","*").getRegex(),text:O(Mt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},nt={normal:sn,gfm:yl,pedantic:bl},je={normal:on,gfm:Mt,breaks:Ul,pedantic:Vl},Wl={"&":"&","<":"<",">":">",'"':""","'":"'"},Nn=e=>Wl[e];function ce(e,t){if(t){if(J.escapeTest.test(e))return e.replace(J.escapeReplace,Nn)}else if(J.escapeTestNoEncode.test(e))return e.replace(J.escapeReplaceNoEncode,Nn);return e}function $n(e){try{e=encodeURI(e).replace(J.percentDecode,"%")}catch{return null}return e}function Bn(e,t){let n=e.replace(J.findPipe,(s,l,a)=>{let o=!1,u=l;for(;--u>=0&&a[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split(J.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(J.slashPipe,"|");return r}function Me(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function Ql(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Zl(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function On(e,t,n,r,i){let s=t.href,l=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:l,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,o}function Gl(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
3
|
+
`).map(s=>{let l=s.match(n.other.beginningSpace);if(l===null)return s;let[a]=l;return a.length>=i.length?s.slice(i.length):s}).join(`
|
|
4
|
+
`)}var ut=class{options;rules;lexer;constructor(e){this.options=e||ze}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Me(n,`
|
|
5
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=Gl(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Me(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.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:Me(t[0],`
|
|
6
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Me(t[0],`
|
|
7
|
+
`).split(`
|
|
8
|
+
`),r="",i="",s=[];for(;n.length>0;){let l=!1,a=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))a.push(n[o]),l=!0;else if(!l)a.push(n[o]);else break;n=n.slice(o);let u=a.join(`
|
|
9
|
+
`),c=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
11
|
+
${u}`:u,i=i?`${i}
|
|
12
|
+
${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=h,n.length===0)break;let p=s.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let f=p,d=f.raw+`
|
|
13
|
+
`+n.join(`
|
|
14
|
+
`),S=this.blockquote(d);s[s.length-1]=S,r=r.substring(0,r.length-f.raw.length)+S.raw,i=i.substring(0,i.length-f.text.length)+S.text;break}else if(p?.type==="list"){let f=p,d=f.raw+`
|
|
15
|
+
`+n.join(`
|
|
16
|
+
`),S=this.list(d);s[s.length-1]=S,r=r.substring(0,r.length-p.raw.length)+S.raw,i=i.substring(0,i.length-f.raw.length)+S.raw,n=d.substring(s.at(-1).raw.length).split(`
|
|
17
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:s,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={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=this.rules.other.listItemRegex(n),l=!1;for(;e;){let o=!1,u="",c="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let h=Zl(t[2].split(`
|
|
18
|
+
`,1)[0],t[1].length),p=e.split(`
|
|
19
|
+
`,1)[0],f=!h.trim(),d=0;if(this.options.pedantic?(d=2,c=h.trimStart()):f?d=t[1].length+1:(d=h.search(this.rules.other.nonSpaceChar),d=d>4?1:d,c=h.slice(d),d+=t[1].length),f&&this.rules.other.blankLine.test(p)&&(u+=p+`
|
|
20
|
+
`,e=e.substring(p.length+1),o=!0),!o){let S=this.rules.other.nextBulletRegex(d),y=this.rules.other.hrRegex(d),k=this.rules.other.fencesBeginRegex(d),E=this.rules.other.headingBeginRegex(d),C=this.rules.other.htmlBeginRegex(d),F=this.rules.other.blockquoteBeginRegex(d);for(;e;){let L=e.split(`
|
|
21
|
+
`,1)[0],b;if(p=L,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),b=p):b=p.replace(this.rules.other.tabCharGlobal," "),k.test(p)||E.test(p)||C.test(p)||F.test(p)||S.test(p)||y.test(p))break;if(b.search(this.rules.other.nonSpaceChar)>=d||!p.trim())c+=`
|
|
22
|
+
`+b.slice(d);else{if(f||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(h)||E.test(h)||y.test(h))break;c+=`
|
|
23
|
+
`+p}f=!p.trim(),u+=L+`
|
|
24
|
+
`,e=e.substring(L.length+1),h=b.slice(d)}}i.loose||(l?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(l=!0)),i.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),i.raw+=u}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(o.raw);if(u){let c={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};o.checked=c.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=c.raw+o.tokens[0].raw,o.tokens[0].text=c.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(c)):o.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):o.tokens.unshift(c)}}if(!i.loose){let u=o.tokens.filter(h=>h.type==="space"),c=u.length>0&&u.some(h=>this.rules.other.anyLine.test(h.raw));i.loose=c}}if(i.loose)for(let o of i.items){o.loose=!0;for(let u of o.tokens)u.type==="text"&&(u.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=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:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Bn(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
+
`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let l of r)this.rules.other.tableAlignRight.test(l)?s.align.push("right"):this.rules.other.tableAlignCenter.test(l)?s.align.push("center"):this.rules.other.tableAlignLeft.test(l)?s.align.push("left"):s.align.push(null);for(let l=0;l<n.length;l++)s.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:s.align[l]});for(let l of i)s.rows.push(Bn(l,s.header.length).map((a,o)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:s.align[o]})));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)===`
|
|
26
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=Me(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=Ql(t[2],"()");if(s===-2)return;if(s>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),On(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return On(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,l,a=i,o=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(l=[...s].length,r[3]||r[4]){a+=l;continue}else if((r[5]||r[6])&&i%3&&!((i+l)%3)){o+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+o);let c=[...r[0]][0].length,h=e.slice(0,i+r.index+c+l);if(Math.min(i,l)%2){let f=h.slice(1,-1);return{type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}let p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,s,l,a=i,o=this.rules.inline.delRDelim;for(o.lastIndex=0,t=t.slice(-1*e.length+i);(r=o.exec(t))!=null;){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(l=[...s].length,l!==i))continue;if(r[3]||r[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let u=[...r[0]][0].length,c=e.slice(0,i+r.index+u+l),h=c.slice(i,-i);return{type:"del",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=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=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=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=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},ae=class qt{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ze,this.options.tokenizer=this.options.tokenizer||new ut,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 n={other:J,block:nt.normal,inline:je.normal};this.options.pedantic?(n.block=nt.pedantic,n.inline=je.pedantic):this.options.gfm&&(n.block=nt.gfm,this.options.breaks?n.inline=je.breaks:n.inline=je.gfm),this.tokenizer.rules=n}static get rules(){return{block:nt,inline:je}}static lex(t,n){return new qt(n).lex(t)}static lexInline(t,n){return new qt(n).inlineTokens(t)}lex(t){t=t.replace(J.carriageReturn,`
|
|
27
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(J.tabCharGlobal," ").replace(J.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let l=n.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
|
|
28
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
29
|
+
`)?"":`
|
|
30
|
+
`)+i.raw,l.text+=`
|
|
31
|
+
`+i.text,this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
32
|
+
`)?"":`
|
|
33
|
+
`)+i.raw,l.text+=`
|
|
34
|
+
`+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let s=t;if(this.options.extensions?.startBlock){let l=1/0,a=t.slice(1),o;this.options.extensions.startBlock.forEach(u=>{o=u.call({lexer:this},a),typeof o=="number"&&o>=0&&(l=Math.min(l,o))}),l<1/0&&l>=0&&(s=t.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
35
|
+
`)?"":`
|
|
36
|
+
`)+i.raw,l.text+=`
|
|
37
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),r=s.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
38
|
+
`)?"":`
|
|
39
|
+
`)+i.raw,l.text+=`
|
|
40
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let l=!1,a="";for(;t;){l||(a=""),l=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let c=n.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,a)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t,r,a)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let u=t;if(this.options.extensions?.startInline){let c=1/0,h=t.slice(1),p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},h),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(u=t.substring(0,c+1))}if(o=this.tokenizer.inlineText(u)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(a=o.raw.slice(-1)),l=!0;let c=n.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):n.push(o);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}},ct=class{options;parser;constructor(e){this.options=e||ze}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(J.notSpaceStart)?.[0],i=e.replace(J.endingNewline,"")+`
|
|
41
|
+
`;return r?'<pre><code class="language-'+ce(r)+'">'+(n?i:ce(i,!0))+`</code></pre>
|
|
42
|
+
`:"<pre><code>"+(n?i:ce(i,!0))+`</code></pre>
|
|
43
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
44
|
+
${this.parser.parse(e)}</blockquote>
|
|
45
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
46
|
+
`}hr(e){return`<hr>
|
|
47
|
+
`}list(e){let t=e.ordered,n=e.start,r="";for(let l=0;l<e.items.length;l++){let a=e.items[l];r+=this.listitem(a)}let i=t?"ol":"ul",s=t&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
|
|
48
|
+
`+r+"</"+i+`>
|
|
49
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
50
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
51
|
+
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let s=e.rows[i];n="";for(let l=0;l<s.length;l++)n+=this.tablecell(s[l]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
52
|
+
<thead>
|
|
53
|
+
`+t+`</thead>
|
|
54
|
+
`+r+`</table>
|
|
55
|
+
`}tablerow({text:e}){return`<tr>
|
|
56
|
+
${e}</tr>
|
|
57
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
58
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ce(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=$n(e);if(i===null)return r;e=i;let s='<a href="'+e+'"';return t&&(s+=' title="'+ce(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=$n(e);if(i===null)return ce(n);e=i;let s=`<img src="${e}" alt="${ce(n)}"`;return t&&(s+=` title="${ce(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ce(e.text)}},un=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},oe=class Ht{options;renderer;textRenderer;constructor(t){this.options=t||ze,this.options.renderer=this.options.renderer||new ct,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new un}static parse(t,n){return new Ht(n).parse(t)}static parseInline(t,n){return new Ht(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let l=i,a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=a||"";continue}}let s=i;switch(s.type){case"space":{n+=this.renderer.space(s);break}case"hr":{n+=this.renderer.hr(s);break}case"heading":{n+=this.renderer.heading(s);break}case"code":{n+=this.renderer.code(s);break}case"table":{n+=this.renderer.table(s);break}case"blockquote":{n+=this.renderer.blockquote(s);break}case"list":{n+=this.renderer.list(s);break}case"checkbox":{n+=this.renderer.checkbox(s);break}case"html":{n+=this.renderer.html(s);break}case"def":{n+=this.renderer.def(s);break}case"paragraph":{n+=this.renderer.paragraph(s);break}case"text":{n+=this.renderer.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){let r="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=a||"";continue}}let l=s;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let a='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}},We=class{options;block;constructor(e){this.options=e||ze}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ae.lex:ae.lexInline}provideParser(){return this.block?oe.parse:oe.parseInline}},Xl=class{defaults=en();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=oe;Renderer=ct;TextRenderer=un;Lexer=ae;Tokenizer=ut;Hooks=We;constructor(...e){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 i=r;for(let s of i.header)n=n.concat(this.walkTokens(s.tokens,t));for(let s of i.rows)for(let l of s)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,t));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let l=i[s].flat(1/0);n=n.concat(this.walkTokens(l,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.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(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...l){let a=i.renderer.apply(this,l);return a===!1&&(a=s.apply(this,l)),a}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new ct(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let l=s,a=n.renderer[l],o=i[l];i[l]=(...u)=>{let c=a.apply(i,u);return c===!1&&(c=o.apply(i,u)),c||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new ut(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let l=s,a=n.tokenizer[l],o=i[l];i[l]=(...u)=>{let c=a.apply(i,u);return c===!1&&(c=o.apply(i,u)),c}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new We;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let l=s,a=n.hooks[l],o=i[l];We.passThroughHooks.has(s)?i[l]=u=>{if(this.defaults.async&&We.passThroughHooksRespectAsync.has(s))return(async()=>{let h=await a.call(i,u);return o.call(i,h)})();let c=a.call(i,u);return o.call(i,c)}:i[l]=(...u)=>{if(this.defaults.async)return(async()=>{let h=await a.apply(i,u);return h===!1&&(h=await o.apply(i,u)),h})();let c=a.apply(i,u);return c===!1&&(c=o.apply(i,u)),c}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;r.walkTokens=function(l){let a=[];return a.push(s.call(this,l)),i&&(a=a.concat(i.call(this,l))),a}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ae.lex(e,t??this.defaults)}parser(e,t){return oe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let l=i.hooks?await i.hooks.preprocess(t):t,a=await(i.hooks?await i.hooks.provideLexer():e?ae.lex:ae.lexInline)(l,i),o=i.hooks?await i.hooks.processAllTokens(a):a;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let u=await(i.hooks?await i.hooks.provideParser():e?oe.parse:oe.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(u):u})().catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let l=(i.hooks?i.hooks.provideLexer():e?ae.lex:ae.lexInline)(t,i);i.hooks&&(l=i.hooks.processAllTokens(l)),i.walkTokens&&this.walkTokens(l,i.walkTokens);let a=(i.hooks?i.hooks.provideParser():e?oe.parse:oe.parseInline)(l,i);return i.hooks&&(a=i.hooks.postprocess(a)),a}catch(l){return s(l)}}}onError(e,t){return n=>{if(n.message+=`
|
|
59
|
+
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+ce(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},Te=new Xl;function H(e,t){return Te.parse(e,t)}H.options=H.setOptions=function(e){return Te.setOptions(e),H.defaults=Te.defaults,Tr(H.defaults),H};H.getDefaults=en;H.defaults=ze;H.use=function(...e){return Te.use(...e),H.defaults=Te.defaults,Tr(H.defaults),H};H.walkTokens=function(e,t){return Te.walkTokens(e,t)};H.parseInline=Te.parseInline;H.Parser=oe;H.parser=oe.parse;H.Renderer=ct;H.TextRenderer=un;H.Lexer=ae;H.lexer=ae.lex;H.Tokenizer=ut;H.Hooks=We;H.parse=H;H.options;H.setOptions;H.use;H.walkTokens;H.parseInline;oe.parse;ae.lex;const Yl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Kl={};function jn(e,t){return(Kl.jsx?Jl:Yl).test(e)}const es={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var Le={},Et,Mn;function ts(){if(Mn)return Et;Mn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,o=`
|
|
60
|
+
`,u="/",c="*",h="",p="comment",f="declaration";function d(y,k){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];k=k||{};var E=1,C=1;function F(P){var T=P.match(t);T&&(E+=T.length);var V=P.lastIndexOf(o);C=~V?P.length-V:C+P.length}function L(){var P={line:E,column:C};return function(T){return T.position=new b(P),j(),T}}function b(P){this.start=P,this.end={line:E,column:C},this.source=k.source}b.prototype.content=y;function N(P){var T=new Error(k.source+":"+E+":"+C+": "+P);if(T.reason=P,T.filename=k.source,T.line=E,T.column=C,T.source=y,!k.silent)throw T}function M(P){var T=P.exec(y);if(T){var V=T[0];return F(V),y=y.slice(V.length),T}}function j(){M(n)}function x(P){var T;for(P=P||[];T=A();)T!==!1&&P.push(T);return P}function A(){var P=L();if(!(u!=y.charAt(0)||c!=y.charAt(1))){for(var T=2;h!=y.charAt(T)&&(c!=y.charAt(T)||u!=y.charAt(T+1));)++T;if(T+=2,h===y.charAt(T-1))return N("End of comment missing");var V=y.slice(2,T-2);return C+=2,F(V),y=y.slice(T),C+=2,P({type:p,comment:V})}}function z(){var P=L(),T=M(r);if(T){if(A(),!M(i))return N("property missing ':'");var V=M(s),Q=P({type:f,property:S(T[0].replace(e,h)),value:V?S(V[0].replace(e,h)):h});return M(l),Q}}function q(){var P=[];x(P);for(var T;T=z();)T!==!1&&(P.push(T),x(P));return P}return j(),q()}function S(y){return y?y.replace(a,h):h}return Et=d,Et}var qn;function ns(){if(qn)return Le;qn=1;var e=Le&&Le.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.default=n;const t=e(ts());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(o=>{if(o.type!=="declaration")return;const{property:u,value:c}=o;a?i(u,c,o):c&&(s=s||{},s[u]=c)}),s}return Le}var qe={},Hn;function rs(){if(Hn)return qe;Hn=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||n.test(u)||e.test(u)},l=function(u,c){return c.toUpperCase()},a=function(u,c){return"".concat(c,"-")},o=function(u,c){return c===void 0&&(c={}),s(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return qe.camelCase=o,qe}var He,Vn;function is(){if(Vn)return He;Vn=1;var e=He&&He.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ns()),n=rs();function r(i,s){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,o){a&&o&&(l[(0,n.camelCase)(a,s)]=o)}),l}return r.default=r,He=r,He}var ls=is();const ss=Ir(ls),Br=Or("end"),cn=Or("start");function Or(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function as(e){const t=cn(e),n=Br(e);if(t&&n)return{start:t,end:n}}function Qe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Un(e.position):"start"in e||"end"in e?Un(e):"line"in e||"column"in e?Vt(e):""}function Vt(e){return Wn(e&&e.line)+":"+Wn(e&&e.column)}function Un(e){return Vt(e&&e.start)+"-"+Vt(e&&e.end)}function Wn(e){return e&&typeof e=="number"?e:1}class X extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(l=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?s.ruleId=r:(s.source=r.slice(0,o),s.ruleId=r.slice(o+1))}if(!s.place&&s.ancestors&&s.ancestors){const o=s.ancestors[s.ancestors.length-1];o&&(s.place=o.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Qe(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}X.prototype.file="";X.prototype.name="";X.prototype.reason="";X.prototype.message="";X.prototype.stack="";X.prototype.column=void 0;X.prototype.line=void 0;X.prototype.ancestors=void 0;X.prototype.cause=void 0;X.prototype.fatal=void 0;X.prototype.place=void 0;X.prototype.ruleId=void 0;X.prototype.source=void 0;const hn={}.hasOwnProperty,os=new Map,us=/[A-Z]/g,cs=new Set(["table","tbody","thead","tfoot","tr"]),hs=new Set(["td","th"]),jr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fs(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=bs(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ys(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Kt:rl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Mr(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Mr(e,t,n){if(t.type==="element")return ps(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ms(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ds(e,t,n);if(t.type==="mdxjsEsm")return gs(e,t);if(t.type==="root")return ks(e,t,n);if(t.type==="text")return xs(e,t)}function ps(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Kt,e.schema=i),e.ancestors.push(t);const s=Hr(e,t.tagName,!1),l=ws(e,t);let a=pn(e,t);return cs.has(t.tagName)&&(a=a.filter(function(o){return typeof o=="string"?!il(o):!0})),qr(e,l,s,t),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,s,l,n)}function ms(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Xe(e,t.position)}function gs(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xe(e,t.position)}function ds(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Kt,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Hr(e,t.name,!0),l=Ss(e,t),a=pn(e,t);return qr(e,l,s,t),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,s,l,n)}function ks(e,t,n){const r={};return fn(r,pn(e,t)),e.create(t,e.Fragment,r,n)}function xs(e,t){return t.value}function qr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ys(e,t,n){return r;function r(i,s,l,a){const u=Array.isArray(l.children)?n:t;return a?u(s,l,a):u(s,l)}}function bs(e,t){return n;function n(r,i,s,l){const a=Array.isArray(s.children),o=cn(r);return t(i,s,l,a,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function ws(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&hn.call(t.properties,i)){const s=Cs(e,i,t.properties[i]);if(s){const[l,a]=s;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&hs.has(t.tagName)?r=a:n[l]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Ss(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const l=s.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Xe(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else Xe(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function pn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:os;for(;++r<t.children.length;){const s=t.children[r];let l;if(e.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const u=i.get(o)||0;l=o+"-"+u,i.set(o,u+1)}}const a=Mr(e,s,l);a!==void 0&&n.push(a)}return n}function Cs(e,t,n){const r=ll(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?sl(n):al(n)),r.property==="style"){let i=typeof n=="object"?n:Es(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Is(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?es[r.property]||r.property:r.attribute,n]}}function Es(e,t){try{return ss(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new X("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=jr+"#cannot-parse-style-attribute",i}}function Hr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,l;for(;++s<i.length;){const a=jn(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=l}else r=jn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return hn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xe(e)}function Xe(e,t){const n=new X("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=jr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Is(e){const t={};let n;for(n in e)hn.call(e,n)&&(t[Ts(n)]=e[n]);return t}function Ts(e){let t=e.replace(us,As);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function As(e){return"-"+e.toLowerCase()}const It={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},zs={};function mn(e,t){const n=zs,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Vr(e,r,i)}function Vr(e,t,n){if(Rs(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Qn(e.children,t,n)}return Array.isArray(e)?Qn(e,t,n):""}function Qn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Vr(e[i],t,n);return r.join("")}function Rs(e){return!!(e&&typeof e=="object")}const Zn=document.createElement("i");function gn(e){const t="&"+e+";";Zn.innerHTML=t;const n=Zn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function te(e,t,n,r){const i=e.length;let s=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<r.length;)l=r.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function ne(e,t){return e.length>0?(te(e,e.length,0,t),e):t}const Gn={}.hasOwnProperty;function Ur(e){const t={};let n=-1;for(;++n<e.length;)Ps(t,e[n]);return t}function Ps(e,t){let n;for(n in t){const i=(Gn.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){Gn.call(i,l)||(i[l]=[]);const a=s[l];_s(i[l],Array.isArray(a)?a:a?[a]:[])}}}function _s(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);te(e,0,0,r)}function Wr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ue(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Y=we(/[A-Za-z]/),G=we(/[\dA-Za-z]/),Ls=we(/[#-'*+\--9=?A-Z^-~]/);function ht(e){return e!==null&&(e<32||e===127)}const Ut=we(/\d/),Fs=we(/[\dA-Fa-f]/),Ds=we(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function v(e){return e===-2||e===-1||e===32}const xt=we(new RegExp("\\p{P}|\\p{S}","u")),Ae=we(/\s/);function we(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ne(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&G(e.charCodeAt(n+1))&&G(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(l=String.fromCharCode(s,a),i=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function B(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(o){return v(o)?(e.enter(n),a(o)):t(o)}function a(o){return v(o)&&s++<i?(e.consume(o),a):(e.exit(n),t(o))}}const vs={tokenize:Ns};function Ns(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),B(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return R(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),l)}}const $s={tokenize:Bs},Xn={tokenize:Os};function Bs(e){const t=this,n=[];let r=0,i,s,l;return a;function a(C){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,o,u)(C)}return u(C)}function o(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const F=t.events.length;let L=F,b;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){b=t.events[L][1].end;break}k(r);let N=F;for(;N<t.events.length;)t.events[N][1].end={...b},N++;return te(t.events,L+1,0,t.events.slice(F)),t.events.length=N,u(C)}return a(C)}function u(C){if(r===n.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return d(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Xn,c,h)(C)}function c(C){return i&&E(),k(r),p(C)}function h(C){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,d(C)}function p(C){return t.containerState={},e.attempt(Xn,f,d)(C)}function f(C){return r++,n.push([t.currentConstruct,t.containerState]),p(C)}function d(C){if(C===null){i&&E(),k(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),S(C)}function S(C){if(C===null){y(e.exit("chunkFlow"),!0),k(0),e.consume(C);return}return R(C)?(e.consume(C),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(C),S)}function y(C,F){const L=t.sliceStream(C);if(F&&L.push(null),C.previous=s,s&&(s.next=C),s=C,i.defineSkip(C.start),i.write(L),t.parser.lazy[C.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const N=t.events.length;let M=N,j,x;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(j){x=t.events[M][1].end;break}j=!0}for(k(r),b=N;b<t.events.length;)t.events[b][1].end={...x},b++;te(t.events,M+1,0,t.events.slice(N)),t.events.length=b}}function k(C){let F=n.length;for(;F-- >C;){const L=n[F];t.containerState=L[1],L[0].exit.call(t,e)}n.length=C}function E(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Os(e,t,n){return B(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ve(e){if(e===null||W(e)||Ae(e))return 1;if(xt(e))return 2}function yt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Wt={name:"attention",resolveAll:js,tokenize:Ms};function js(e,t){let n=-1,r,i,s,l,a,o,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};Yn(h,-o),Yn(p,o),l={type:o>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ne(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ne(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",s,t]]),u=ne(u,yt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ne(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=ne(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,te(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ms(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ve(r);let s;return l;function l(o){return s=o,e.enter("attentionSequence"),a(o)}function a(o){if(o===s)return e.consume(o),a;const u=e.exit("attentionSequence"),c=ve(o),h=!c||c===2&&i||n.includes(o),p=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?h:h&&(i||!p)),u._close=!!(s===42?p:p&&(c||!h)),t(o)}}function Yn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qs={name:"autolink",tokenize:Hs};function Hs(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return Y(f)?(e.consume(f),l):f===64?n(f):u(f)}function l(f){return f===43||f===45||f===46||G(f)?(r=1,a(f)):u(f)}function a(f){return f===58?(e.consume(f),r=0,o):(f===43||f===45||f===46||G(f))&&r++<32?(e.consume(f),a):(r=0,u(f))}function o(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||ht(f)?n(f):(e.consume(f),o)}function u(f){return f===64?(e.consume(f),c):Ls(f)?(e.consume(f),u):n(f)}function c(f){return G(f)?h(f):n(f)}function h(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||G(f))&&r++<63){const d=f===45?p:h;return e.consume(f),d}return n(f)}}const Ke={partial:!0,tokenize:Vs};function Vs(e,t,n){return r;function r(s){return v(s)?B(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||R(s)?t(s):n(s)}}const Qr={continuation:{tokenize:Ws},exit:Qs,name:"blockQuote",tokenize:Us};function Us(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return v(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Ws(e,t,n){const r=this;return i;function i(l){return v(l)?B(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(Qr,t,n)(l)}}function Qs(e){e.exit("blockQuote")}const Zr={name:"characterEscape",tokenize:Zs};function Zs(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Ds(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Gr={name:"characterReference",tokenize:Gs};function Gs(e,t,n){const r=this;let i=0,s,l;return a;function a(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),o}function o(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,l=G,c(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=Fs,c):(e.enter("characterReferenceValue"),s=7,l=Ut,c(h))}function c(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return l===G&&!gn(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(h)&&i++<s?(e.consume(h),c):n(h)}}const Jn={partial:!0,tokenize:Ys},Kn={concrete:!0,name:"codeFenced",tokenize:Xs};function Xs(e,t,n){const r=this,i={partial:!0,tokenize:L};let s=0,l=0,a;return o;function o(b){return u(b)}function u(b){const N=r.events[r.events.length-1];return s=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(b)}function c(b){return b===a?(l++,e.consume(b),c):l<3?n(b):(e.exit("codeFencedFenceSequence"),v(b)?B(e,h,"whitespace")(b):h(b))}function h(b){return b===null||R(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(Jn,S,F)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||R(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(b)):v(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),B(e,f,"whitespace")(b)):b===96&&b===a?n(b):(e.consume(b),p)}function f(b){return b===null||R(b)?h(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||R(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(b)):b===96&&b===a?n(b):(e.consume(b),d)}function S(b){return e.attempt(i,F,y)(b)}function y(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),k}function k(b){return s>0&&v(b)?B(e,E,"linePrefix",s+1)(b):E(b)}function E(b){return b===null||R(b)?e.check(Jn,S,F)(b):(e.enter("codeFlowValue"),C(b))}function C(b){return b===null||R(b)?(e.exit("codeFlowValue"),E(b)):(e.consume(b),C)}function F(b){return e.exit("codeFenced"),t(b)}function L(b,N,M){let j=0;return x;function x(T){return b.enter("lineEnding"),b.consume(T),b.exit("lineEnding"),A}function A(T){return b.enter("codeFencedFence"),v(T)?B(b,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):z(T)}function z(T){return T===a?(b.enter("codeFencedFenceSequence"),q(T)):M(T)}function q(T){return T===a?(j++,b.consume(T),q):j>=l?(b.exit("codeFencedFenceSequence"),v(T)?B(b,P,"whitespace")(T):P(T)):M(T)}function P(T){return T===null||R(T)?(b.exit("codeFencedFence"),N(T)):M(T)}}}function Ys(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Tt={name:"codeIndented",tokenize:Ks},Js={partial:!0,tokenize:ea};function Ks(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),B(e,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?o(u):R(u)?e.attempt(Js,l,o)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||R(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function o(u){return e.exit("codeIndented"),t(u)}}function ea(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):B(e,s,"linePrefix",5)(l)}function s(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):R(l)?i(l):n(l)}}const ta={name:"codeText",previous:ra,resolve:na,tokenize:ia};function na(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ra(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ia(e,t,n){let r=0,i,s;return l;function l(h){return e.enter("codeText"),e.enter("codeTextSequence"),a(h)}function a(h){return h===96?(e.consume(h),r++,a):(e.exit("codeTextSequence"),o(h))}function o(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),o):h===96?(s=e.enter("codeTextSequence"),i=0,c(h)):R(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||R(h)?(e.exit("codeTextData"),o(h)):(e.consume(h),u)}function c(h){return h===96?(e.consume(h),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",u(h))}}class la{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ve(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ve(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ve(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ve(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ve(this.left,n.reverse())}}}function Ve(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Xr(e){const t={};let n=-1,r,i,s,l,a,o,u;const c=new la(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,sa(c,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(l=c.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return te(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function sa(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,o=[],u={};let c,h,p=-1,f=n,d=0,S=0;const y=[S];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),h&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(S=p+1,y.push(S),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),p=y.length;p--;){const k=a.slice(y[p],y[p+1]),E=s.pop();o.push([E,E+k.length-1]),e.splice(E,2,k)}for(o.reverse(),p=-1;++p<o.length;)u[d+o[p][0]]=d+o[p][1],d+=o[p][1]-o[p][0]-1;return u}const aa={resolve:ua,tokenize:ca},oa={partial:!0,tokenize:ha};function ua(e){return Xr(e),e}function ca(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):R(a)?e.check(oa,l,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ha(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),B(e,s,"linePrefix")}function s(l){if(l===null||R(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Yr(e,t,n,r,i,s,l,a,o){const u=o||Number.POSITIVE_INFINITY;let c=0;return h;function h(k){return k===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(k),e.exit(s),p):k===null||k===32||k===41||ht(k)?n(k):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),S(k))}function p(k){return k===62?(e.enter(s),e.consume(k),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===62?(e.exit("chunkString"),e.exit(a),p(k)):k===null||k===60||R(k)?n(k):(e.consume(k),k===92?d:f)}function d(k){return k===60||k===62||k===92?(e.consume(k),f):f(k)}function S(k){return!c&&(k===null||k===41||W(k))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(k)):c<u&&k===40?(e.consume(k),c++,S):k===41?(e.consume(k),c--,S):k===null||k===32||k===40||ht(k)?n(k):(e.consume(k),k===92?y:S)}function y(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function Jr(e,t,n,r,i,s){const l=this;let a=0,o;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),c}function c(f){return a>999||f===null||f===91||f===93&&!o||f===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):R(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||R(f)||a++>999?(e.exit("chunkString"),c(f)):(e.consume(f),o||(o=!v(f)),f===92?p:h)}function p(f){return f===91||f===92||f===93?(e.consume(f),a++,h):h(f)}}function Kr(e,t,n,r,i,s){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,o):n(p)}function o(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),u(p))}function u(p){return p===l?(e.exit(s),o(l)):p===null?n(p):R(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),B(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===l||p===null||R(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?h:c)}function h(p){return p===l||p===92?(e.consume(p),c):c(p)}}function Ze(e,t){let n;return r;function r(i){return R(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):v(i)?B(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const fa={name:"definition",tokenize:ma},pa={partial:!0,tokenize:ga};function ma(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),l(f)}function l(f){return Jr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=ue(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),o):n(f)}function o(f){return W(f)?Ze(e,u)(f):u(f)}function u(f){return Yr(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(pa,h,h)(f)}function h(f){return v(f)?B(e,p,"whitespace")(f):p(f)}function p(f){return f===null||R(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function ga(e,t,n){return r;function r(a){return W(a)?Ze(e,i)(a):n(a)}function i(a){return Kr(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return v(a)?B(e,l,"whitespace")(a):l(a)}function l(a){return a===null||R(a)?t(a):n(a)}}const da={name:"hardBreakEscape",tokenize:ka};function ka(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return R(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const xa={name:"headingAtx",resolve:ya,tokenize:ba};function ya(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},te(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function ba(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&r++<6?(e.consume(c),l):c===null||W(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),o(c)):c===null||R(c)?(e.exit("atxHeading"),t(c)):v(c)?B(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function o(c){return c===35?(e.consume(c),o):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||W(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const wa=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],er=["pre","script","style","textarea"],Sa={concrete:!0,name:"htmlFlow",resolveTo:Ia,tokenize:Ta},Ca={partial:!0,tokenize:za},Ea={partial:!0,tokenize:Aa};function Ia(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ta(e,t,n){const r=this;let i,s,l,a,o;return u;function u(g){return c(g)}function c(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),h}function h(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),s=!0,S):g===63?(e.consume(g),i=3,r.interrupt?t:m):Y(g)?(e.consume(g),l=String.fromCharCode(g),y):n(g)}function p(g){return g===45?(e.consume(g),i=2,f):g===91?(e.consume(g),i=5,a=0,d):Y(g)?(e.consume(g),i=4,r.interrupt?t:m):n(g)}function f(g){return g===45?(e.consume(g),r.interrupt?t:m):n(g)}function d(g){const le="CDATA[";return g===le.charCodeAt(a++)?(e.consume(g),a===le.length?r.interrupt?t:z:d):n(g)}function S(g){return Y(g)?(e.consume(g),l=String.fromCharCode(g),y):n(g)}function y(g){if(g===null||g===47||g===62||W(g)){const le=g===47,Se=l.toLowerCase();return!le&&!s&&er.includes(Se)?(i=1,r.interrupt?t(g):z(g)):wa.includes(l.toLowerCase())?(i=6,le?(e.consume(g),k):r.interrupt?t(g):z(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(g):s?E(g):C(g))}return g===45||G(g)?(e.consume(g),l+=String.fromCharCode(g),y):n(g)}function k(g){return g===62?(e.consume(g),r.interrupt?t:z):n(g)}function E(g){return v(g)?(e.consume(g),E):x(g)}function C(g){return g===47?(e.consume(g),x):g===58||g===95||Y(g)?(e.consume(g),F):v(g)?(e.consume(g),C):x(g)}function F(g){return g===45||g===46||g===58||g===95||G(g)?(e.consume(g),F):L(g)}function L(g){return g===61?(e.consume(g),b):v(g)?(e.consume(g),L):C(g)}function b(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),o=g,N):v(g)?(e.consume(g),b):M(g)}function N(g){return g===o?(e.consume(g),o=null,j):g===null||R(g)?n(g):(e.consume(g),N)}function M(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||W(g)?L(g):(e.consume(g),M)}function j(g){return g===47||g===62||v(g)?C(g):n(g)}function x(g){return g===62?(e.consume(g),A):n(g)}function A(g){return g===null||R(g)?z(g):v(g)?(e.consume(g),A):n(g)}function z(g){return g===45&&i===2?(e.consume(g),V):g===60&&i===1?(e.consume(g),Q):g===62&&i===4?(e.consume(g),ie):g===63&&i===3?(e.consume(g),m):g===93&&i===5?(e.consume(g),me):R(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ca,ge,q)(g)):g===null||R(g)?(e.exit("htmlFlowData"),q(g)):(e.consume(g),z)}function q(g){return e.check(Ea,P,ge)(g)}function P(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),T}function T(g){return g===null||R(g)?q(g):(e.enter("htmlFlowData"),z(g))}function V(g){return g===45?(e.consume(g),m):z(g)}function Q(g){return g===47?(e.consume(g),l="",re):z(g)}function re(g){if(g===62){const le=l.toLowerCase();return er.includes(le)?(e.consume(g),ie):z(g)}return Y(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),re):z(g)}function me(g){return g===93?(e.consume(g),m):z(g)}function m(g){return g===62?(e.consume(g),ie):g===45&&i===2?(e.consume(g),m):z(g)}function ie(g){return g===null||R(g)?(e.exit("htmlFlowData"),ge(g)):(e.consume(g),ie)}function ge(g){return e.exit("htmlFlow"),t(g)}}function Aa(e,t,n){const r=this;return i;function i(l){return R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function za(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ke,t,n)}}const Ra={name:"htmlText",tokenize:Pa};function Pa(e,t,n){const r=this;let i,s,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),o}function o(m){return m===33?(e.consume(m),u):m===47?(e.consume(m),L):m===63?(e.consume(m),C):Y(m)?(e.consume(m),M):n(m)}function u(m){return m===45?(e.consume(m),c):m===91?(e.consume(m),s=0,d):Y(m)?(e.consume(m),E):n(m)}function c(m){return m===45?(e.consume(m),f):n(m)}function h(m){return m===null?n(m):m===45?(e.consume(m),p):R(m)?(l=h,Q(m)):(e.consume(m),h)}function p(m){return m===45?(e.consume(m),f):h(m)}function f(m){return m===62?V(m):m===45?p(m):h(m)}function d(m){const ie="CDATA[";return m===ie.charCodeAt(s++)?(e.consume(m),s===ie.length?S:d):n(m)}function S(m){return m===null?n(m):m===93?(e.consume(m),y):R(m)?(l=S,Q(m)):(e.consume(m),S)}function y(m){return m===93?(e.consume(m),k):S(m)}function k(m){return m===62?V(m):m===93?(e.consume(m),k):S(m)}function E(m){return m===null||m===62?V(m):R(m)?(l=E,Q(m)):(e.consume(m),E)}function C(m){return m===null?n(m):m===63?(e.consume(m),F):R(m)?(l=C,Q(m)):(e.consume(m),C)}function F(m){return m===62?V(m):C(m)}function L(m){return Y(m)?(e.consume(m),b):n(m)}function b(m){return m===45||G(m)?(e.consume(m),b):N(m)}function N(m){return R(m)?(l=N,Q(m)):v(m)?(e.consume(m),N):V(m)}function M(m){return m===45||G(m)?(e.consume(m),M):m===47||m===62||W(m)?j(m):n(m)}function j(m){return m===47?(e.consume(m),V):m===58||m===95||Y(m)?(e.consume(m),x):R(m)?(l=j,Q(m)):v(m)?(e.consume(m),j):V(m)}function x(m){return m===45||m===46||m===58||m===95||G(m)?(e.consume(m),x):A(m)}function A(m){return m===61?(e.consume(m),z):R(m)?(l=A,Q(m)):v(m)?(e.consume(m),A):j(m)}function z(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),i=m,q):R(m)?(l=z,Q(m)):v(m)?(e.consume(m),z):(e.consume(m),P)}function q(m){return m===i?(e.consume(m),i=void 0,T):m===null?n(m):R(m)?(l=q,Q(m)):(e.consume(m),q)}function P(m){return m===null||m===34||m===39||m===60||m===61||m===96?n(m):m===47||m===62||W(m)?j(m):(e.consume(m),P)}function T(m){return m===47||m===62||W(m)?j(m):n(m)}function V(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):n(m)}function Q(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),re}function re(m){return v(m)?B(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):me(m)}function me(m){return e.enter("htmlTextData"),l(m)}}const dn={name:"labelEnd",resolveAll:Da,resolveTo:va,tokenize:Na},_a={tokenize:$a},La={tokenize:Ba},Fa={tokenize:Oa};function Da(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&te(e,0,e.length,n),e}function va(e,t){let n=e.length,r=0,i,s,l,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const o={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",o,t],["enter",u,t]],a=ne(a,e.slice(s+1,s+r+3)),a=ne(a,[["enter",c,t]]),a=ne(a,yt(t.parser.constructs.insideSpan.null,e.slice(s+r+4,l-3),t)),a=ne(a,[["exit",c,t],e[l-2],e[l-1],["exit",u,t]]),a=ne(a,e.slice(l+1)),a=ne(a,[["exit",o,t]]),te(e,s,e.length,a),e}function Na(e,t,n){const r=this;let i=r.events.length,s,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(p){return s?s._inactive?h(p):(l=r.parser.defined.includes(ue(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(_a,c,l?c:h)(p):p===91?e.attempt(La,c,l?u:h)(p):l?c(p):h(p)}function u(p){return e.attempt(Fa,c,h)(p)}function c(p){return t(p)}function h(p){return s._balanced=!0,n(p)}}function $a(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return W(h)?Ze(e,s)(h):s(h)}function s(h){return h===41?c(h):Yr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return W(h)?Ze(e,o)(h):c(h)}function a(h){return n(h)}function o(h){return h===34||h===39||h===40?Kr(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):c(h)}function u(h){return W(h)?Ze(e,c)(h):c(h)}function c(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function Ba(e,t,n){const r=this;return i;function i(a){return Jr.call(r,e,s,l,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(ue(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Oa(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const ja={name:"labelStartImage",resolveAll:dn.resolveAll,tokenize:Ma};function Ma(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const qa={name:"labelStartLink",resolveAll:dn.resolveAll,tokenize:Ha};function Ha(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const At={name:"lineEnding",tokenize:Va};function Va(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),B(e,t,"linePrefix")}}const at={name:"thematicBreak",tokenize:Ua};function Ua(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):r>=3&&(u===null||R(u))?(e.exit("thematicBreak"),t(u)):n(u)}function o(u){return u===i?(e.consume(u),r++,o):(e.exit("thematicBreakSequence"),v(u)?B(e,a,"whitespace")(u):a(u))}}const K={continuation:{tokenize:Ga},exit:Ya,name:"list",tokenize:Za},Wa={partial:!0,tokenize:Ja},Qa={partial:!0,tokenize:Xa};function Za(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(f){const d=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Ut(f)){if(r.containerState.type||(r.containerState.type=d,e.enter(d,{_container:!0})),d==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(at,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(f)}return n(f)}function o(f){return Ut(f)&&++l<10?(e.consume(f),o):(!r.interrupt||l<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Ke,r.interrupt?n:c,e.attempt(Wa,p,h))}function c(f){return r.containerState.initialBlankLine=!0,s++,p(f)}function h(f){return v(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Ga(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ke,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,B(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!v(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Qa,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,B(e,e.attempt(K,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Xa(e,t,n){const r=this;return B(e,i,"listItemIndent",r.containerState.size+1);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(s):n(s)}}function Ya(e){e.exit(this.containerState.type)}function Ja(e,t,n){const r=this;return B(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const l=r.events[r.events.length-1];return!v(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const tr={name:"setextUnderline",resolveTo:Ka,tokenize:eo};function Ka(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",l,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function eo(e,t,n){const r=this;let i;return s;function s(u){let c=r.events.length,h;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){h=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),v(u)?B(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||R(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const to={tokenize:no};function no(e){const t=this,n=e.attempt(Ke,r,e.attempt(this.parser.constructs.flowInitial,i,B(e,e.attempt(this.parser.constructs.flow,i,e.attempt(aa,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ro={resolveAll:ti()},io=ei("string"),lo=ei("text");function ei(e){return{resolveAll:ti(e==="text"?so:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,l,a);return l;function l(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),o}function o(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),o)}function u(c){if(c===null)return!0;const h=i[c];let p=-1;if(h)for(;++p<h.length;){const f=h[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function ti(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function so(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,l=-1,a=0,o;for(;s--;){const u=i[s];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)o=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||o||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:r.start._bufferIndex+l,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const ao={42:K,43:K,45:K,48:K,49:K,50:K,51:K,52:K,53:K,54:K,55:K,56:K,57:K,62:Qr},oo={91:fa},uo={[-2]:Tt,[-1]:Tt,32:Tt},co={35:xa,42:at,45:[tr,at],60:Sa,61:tr,95:at,96:Kn,126:Kn},ho={38:Gr,92:Zr},fo={[-5]:At,[-4]:At,[-3]:At,33:ja,38:Gr,42:Wt,60:[qs,Ra],91:qa,92:[da,Zr],93:dn,95:Wt,96:ta},po={null:[Wt,ro]},mo={null:[42,95]},go={null:[]},ko=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:mo,contentInitial:oo,disable:go,document:ao,flow:co,flowInitial:uo,insideSpan:po,string:ho,text:fo},Symbol.toStringTag,{value:"Module"}));function xo(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let l=[],a=[];const o={attempt:N(L),check:N(b),consume:E,enter:C,exit:F,interrupt:N(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:S,events:[],now:d,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:h};let c=t.tokenize.call(u,o);return t.resolveAll&&s.push(t),u;function h(A){return l=ne(l,A),y(),l[l.length-1]!==null?[]:(M(t,0),u.events=yt(s,u.events,u),u.events)}function p(A,z){return bo(f(A),z)}function f(A){return yo(l,A)}function d(){const{_bufferIndex:A,_index:z,line:q,column:P,offset:T}=r;return{_bufferIndex:A,_index:z,line:q,column:P,offset:T}}function S(A){i[A.line]=A.column,x()}function y(){let A;for(;r._index<l.length;){const z=l[r._index];if(typeof z=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<z.length;)k(z.charCodeAt(r._bufferIndex));else k(z)}}function k(A){c=c(A)}function E(A){R(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,x()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=A}function C(A,z){const q=z||{};return q.type=A,q.start=d(),u.events.push(["enter",q,u]),a.push(q),q}function F(A){const z=a.pop();return z.end=d(),u.events.push(["exit",z,u]),z}function L(A,z){M(A,z.from)}function b(A,z){z.restore()}function N(A,z){return q;function q(P,T,V){let Q,re,me,m;return Array.isArray(P)?ge(P):"tokenize"in P?ge([P]):ie(P);function ie(Z){return $e;function $e(ye){const Re=ye!==null&&Z[ye],Pe=ye!==null&&Z.null,tt=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return ge(tt)(ye)}}function ge(Z){return Q=Z,re=0,Z.length===0?V:g(Z[re])}function g(Z){return $e;function $e(ye){return m=j(),me=Z,Z.partial||(u.currentConstruct=Z),Z.name&&u.parser.constructs.disable.null.includes(Z.name)?Se():Z.tokenize.call(z?Object.assign(Object.create(u),z):u,o,le,Se)(ye)}}function le(Z){return A(me,m),T}function Se(Z){return m.restore(),++re<Q.length?g(Q[re]):V}}}function M(A,z){A.resolveAll&&!s.includes(A)&&s.push(A),A.resolve&&te(u.events,z,u.events.length-z,A.resolve(u.events.slice(z),u)),A.resolveTo&&(u.events=A.resolveTo(u.events,u))}function j(){const A=d(),z=u.previous,q=u.currentConstruct,P=u.events.length,T=Array.from(a);return{from:P,restore:V};function V(){r=A,u.previous=z,u.currentConstruct=q,u.events.length=P,a=T,x()}}function x(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function yo(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,s)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}s>0&&l.push(e[i].slice(0,s))}return l}function bo(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
|
|
61
|
+
`;break}case-3:{l=`\r
|
|
62
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(s)}i=s===-2,r.push(l)}return r.join("")}function wo(e){const r={constructs:Ur([ko,...(e||{}).extensions||[]]),content:i(vs),defined:[],document:i($s),flow:i(to),lazy:{},string:i(io),text:i(lo)};return r;function i(s){return l;function l(a){return xo(r,s,a)}}}function So(e){for(;!Xr(e););return e}const nr=/[\0\t\n\r]/g;function Co(){let e=1,t="",n=!0,r;return i;function i(s,l,a){const o=[];let u,c,h,p,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),h=0,t="",n&&(s.charCodeAt(0)===65279&&h++,n=void 0);h<s.length;){if(nr.lastIndex=h,u=nr.exec(s),p=u&&u.index!==void 0?u.index:s.length,f=s.charCodeAt(p),!u){t=s.slice(h);break}if(f===10&&h===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),h<p&&(o.push(s.slice(h,p)),e+=p-h),f){case 0:{o.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,o.push(-2);e++<c;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return a&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const Eo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Io(e){return e.replace(Eo,To)}function To(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Wr(n.slice(s?2:1),s?16:10)}return gn(n)||e}const ni={}.hasOwnProperty;function Ao(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),zo(n)(So(wo(n).document().write(Co()(e,t,!0))))}function zo(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Rn),autolinkProtocol:j,autolinkEmail:j,atxHeading:s(Tn),blockQuote:s(Pe),characterEscape:j,characterReference:j,codeFenced:s(tt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(tt,l),codeText:s(Mi,l),codeTextData:j,data:j,codeFlowValue:j,definition:s(qi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Hi),hardBreakEscape:s(An),hardBreakTrailing:s(An),htmlFlow:s(zn,l),htmlFlowData:j,htmlText:s(zn,l),htmlTextData:j,image:s(Vi),label:l,link:s(Rn),listItem:s(Ui),listItemValue:p,listOrdered:s(Pn,h),listUnordered:s(Pn),paragraph:s(Wi),reference:g,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Tn),strong:s(Qi),thematicBreak:s(Gi)},exit:{atxHeading:o(),atxHeadingSequence:L,autolink:o(),autolinkEmail:Re,autolinkProtocol:ye,blockQuote:o(),characterEscapeValue:x,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:Z,characterReference:$e,codeFenced:o(y),codeFencedFence:S,codeFencedFenceInfo:f,codeFencedFenceMeta:d,codeFlowValue:x,codeIndented:o(k),codeText:o(T),codeTextData:x,data:x,definition:o(),definitionDestinationString:F,definitionLabelString:E,definitionTitleString:C,emphasis:o(),hardBreakEscape:o(z),hardBreakTrailing:o(z),htmlFlow:o(q),htmlFlowData:x,htmlText:o(P),htmlTextData:x,image:o(Q),label:me,labelText:re,lineEnding:A,link:o(V),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:le,resourceDestinationString:m,resourceTitleString:ie,resource:ge,setextHeading:o(M),setextHeadingLineSequence:N,setextHeadingText:b,strong:o(),thematicBreak:o()}};ri(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let I={type:"root",children:[]};const D={stack:[I],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:c,data:n},$=[];let U=-1;for(;++U<w.length;)if(w[U][1].type==="listOrdered"||w[U][1].type==="listUnordered")if(w[U][0]==="enter")$.push(U);else{const se=$.pop();U=i(w,se,U)}for(U=-1;++U<w.length;){const se=t[w[U][0]];ni.call(se,w[U][1].type)&&se[w[U][1].type].call(Object.assign({sliceSerialize:w[U][2].sliceSerialize},D),w[U][1])}if(D.tokenStack.length>0){const se=D.tokenStack[D.tokenStack.length-1];(se[1]||rr).call(D,void 0,se[0])}for(I.position={start:be(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:be(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},U=-1;++U<t.transforms.length;)I=t.transforms[U](I)||I;return I}function i(w,I,D){let $=I-1,U=-1,se=!1,Ce,de,Be,Oe;for(;++$<=D;){const ee=w[$];switch(ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ee[0]==="enter"?U++:U--,Oe=void 0;break}case"lineEndingBlank":{ee[0]==="enter"&&(Ce&&!Oe&&!U&&!Be&&(Be=$),Oe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Oe=void 0}if(!U&&ee[0]==="enter"&&ee[1].type==="listItemPrefix"||U===-1&&ee[0]==="exit"&&(ee[1].type==="listUnordered"||ee[1].type==="listOrdered")){if(Ce){let _e=$;for(de=void 0;_e--;){const ke=w[_e];if(ke[1].type==="lineEnding"||ke[1].type==="lineEndingBlank"){if(ke[0]==="exit")continue;de&&(w[de][1].type="lineEndingBlank",se=!0),ke[1].type="lineEnding",de=_e}else if(!(ke[1].type==="linePrefix"||ke[1].type==="blockQuotePrefix"||ke[1].type==="blockQuotePrefixWhitespace"||ke[1].type==="blockQuoteMarker"||ke[1].type==="listItemIndent"))break}Be&&(!de||Be<de)&&(Ce._spread=!0),Ce.end=Object.assign({},de?w[de][1].start:ee[1].end),w.splice(de||$,0,["exit",Ce,ee[2]]),$++,D++}if(ee[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},ee[1].start),end:void 0};Ce=_e,w.splice($,0,["enter",_e,ee[2]]),$++,D++,Be=void 0,Oe=!0}}}return w[I][1]._spread=se,D}function s(w,I){return D;function D($){a.call(this,w($),$),I&&I.call(this,$)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,I,D){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([I,D||void 0]),w.position={start:be(I.start),end:void 0}}function o(w){return I;function I(D){w&&w.call(this,D),u.call(this,D)}}function u(w,I){const D=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==w.type&&(I?I.call(this,w,$[0]):($[1]||rr).call(this,w,$[0]));else throw new Error("Cannot close `"+w.type+"` ("+Qe({start:w.start,end:w.end})+"): it’s not open");D.position.end=be(w.end)}function c(){return mn(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(w){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function f(){const w=this.resume(),I=this.stack[this.stack.length-1];I.lang=w}function d(){const w=this.resume(),I=this.stack[this.stack.length-1];I.meta=w}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/(\r?\n|\r)$/g,"")}function E(w){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=ue(this.sliceSerialize(w)).toLowerCase()}function C(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function F(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function L(w){const I=this.stack[this.stack.length-1];if(!I.depth){const D=this.sliceSerialize(w).length;I.depth=D}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function N(w){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function j(w){const D=this.stack[this.stack.length-1].children;let $=D[D.length-1];(!$||$.type!=="text")&&($=Zi(),$.position={start:be(w.start),end:void 0},D.push($)),this.stack.push($)}function x(w){const I=this.stack.pop();I.value+=this.sliceSerialize(w),I.position.end=be(w.end)}function A(w){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const D=I.children[I.children.length-1];D.position.end=be(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(j.call(this,w),x.call(this,w))}function z(){this.data.atHardBreak=!0}function q(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function P(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function T(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function V(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function Q(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function re(w){const I=this.sliceSerialize(w),D=this.stack[this.stack.length-2];D.label=Io(I),D.identifier=ue(I).toLowerCase()}function me(){const w=this.stack[this.stack.length-1],I=this.resume(),D=this.stack[this.stack.length-1];if(this.data.inReference=!0,D.type==="link"){const $=w.children;D.children=$}else D.alt=I}function m(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function ie(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function ge(){this.data.inReference=void 0}function g(){this.data.referenceType="collapsed"}function le(w){const I=this.resume(),D=this.stack[this.stack.length-1];D.label=I,D.identifier=ue(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Se(w){this.data.characterReferenceType=w.type}function Z(w){const I=this.sliceSerialize(w),D=this.data.characterReferenceType;let $;D?($=Wr(I,D==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=gn(I);const U=this.stack[this.stack.length-1];U.value+=$}function $e(w){const I=this.stack.pop();I.position.end=be(w.end)}function ye(w){x.call(this,w);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(w)}function Re(w){x.call(this,w);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(w)}function Pe(){return{type:"blockquote",children:[]}}function tt(){return{type:"code",lang:null,meta:null,value:""}}function Mi(){return{type:"inlineCode",value:""}}function qi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Hi(){return{type:"emphasis",children:[]}}function Tn(){return{type:"heading",depth:0,children:[]}}function An(){return{type:"break"}}function zn(){return{type:"html",value:""}}function Vi(){return{type:"image",title:null,url:"",alt:null}}function Rn(){return{type:"link",title:null,url:"",children:[]}}function Pn(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Ui(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Wi(){return{type:"paragraph",children:[]}}function Qi(){return{type:"strong",children:[]}}function Zi(){return{type:"text",value:""}}function Gi(){return{type:"thematicBreak"}}}function be(e){return{line:e.line,column:e.column,offset:e.offset}}function ri(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ri(e,r):Ro(e,r)}}function Ro(e,t){let n;for(n in t)if(ni.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function rr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qe({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qe({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qe({start:t.start,end:t.end})+") is still open")}function Po(e){const t=this;t.parser=n;function n(r){return Ao(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function _o(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Lo(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
63
|
+
`}]}function Fo(e,t){const n=t.value?t.value+`
|
|
64
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Do(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vo(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function No(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ne(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=s+1,a+=1,e.footnoteCounts.set(r,a);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}function $o(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bo(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ii(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Oo(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ii(e,t);const i={src:Ne(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function jo(e,t){const n={src:Ne(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Mo(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function qo(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ii(e,t);const i={href:Ne(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Ho(e,t){const n={href:Ne(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vo(e,t,n){const r=e.all(t),i=n?Uo(n):li(t),s={},l=[];if(typeof t.checked=="boolean"){const c=r[0];let h;c&&c.type==="element"&&c.tagName==="p"?h=c:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
|
|
65
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?l.push(...c.children):l.push(c)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&l.push({type:"text",value:`
|
|
66
|
+
`});const u={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,u),e.applyData(t,u)}function Uo(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=li(n[r])}return t}function li(e){const t=e.spread;return t??e.children.length>1}function Wo(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Qo(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zo(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Go(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xo(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=cn(t.children[1]),o=Br(t.children[t.children.length-1]);a&&o&&(l.position={start:a,end:o}),i.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function Yo(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let o=-1;const u=[];for(;++o<a;){const h=t.children[o],p={},f=l?l[o]:void 0;f&&(p.align=f);let d={type:"element",tagName:s,properties:p,children:[]};h&&(d.children=e.all(h),e.patch(h,d),d=e.applyData(h,d)),u.push(d)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function Jo(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ir=9,lr=32;function Ko(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(sr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(sr(t.slice(i),i>0,!1)),s.join("")}function sr(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===ir||s===lr;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===ir||s===lr;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function eu(e,t){const n={type:"text",value:Ko(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function tu(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const nu={blockquote:_o,break:Lo,code:Fo,delete:Do,emphasis:vo,footnoteReference:No,heading:$o,html:Bo,imageReference:Oo,image:jo,inlineCode:Mo,linkReference:qo,link:Ho,listItem:Vo,list:Wo,paragraph:Qo,root:Zo,strong:Go,table:Xo,tableCell:Jo,tableRow:Yo,text:eu,thematicBreak:tu,toml:rt,yaml:rt,definition:rt,footnoteDefinition:rt};function rt(){}const si=-1,bt=0,Ge=1,ft=2,kn=3,xn=4,yn=5,bn=6,ai=7,oi=8,ar=typeof self=="object"?self:globalThis,ru=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,l]=t[i];switch(s){case bt:case si:return n(l,i);case Ge:{const a=n([],i);for(const o of l)a.push(r(o));return a}case ft:{const a=n({},i);for(const[o,u]of l)a[r(o)]=r(u);return a}case kn:return n(new Date(l),i);case xn:{const{source:a,flags:o}=l;return n(new RegExp(a,o),i)}case yn:{const a=n(new Map,i);for(const[o,u]of l)a.set(r(o),r(u));return a}case bn:{const a=n(new Set,i);for(const o of l)a.add(r(o));return a}case ai:{const{name:a,message:o}=l;return n(new ar[a](o),i)}case oi:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new ar[s](l),i)};return r},or=e=>ru(new Map,e)(0),Fe="",{toString:iu}={},{keys:lu}=Object,Ue=e=>{const t=typeof e;if(t!=="object"||!e)return[bt,t];const n=iu.call(e).slice(8,-1);switch(n){case"Array":return[Ge,Fe];case"Object":return[ft,Fe];case"Date":return[kn,Fe];case"RegExp":return[xn,Fe];case"Map":return[yn,Fe];case"Set":return[bn,Fe];case"DataView":return[Ge,n]}return n.includes("Array")?[Ge,n]:n.includes("Error")?[ai,n]:[ft,n]},it=([e,t])=>e===bt&&(t==="function"||t==="symbol"),su=(e,t,n,r)=>{const i=(l,a)=>{const o=r.push(l)-1;return n.set(a,o),o},s=l=>{if(n.has(l))return n.get(l);let[a,o]=Ue(l);switch(a){case bt:{let c=l;switch(o){case"bigint":a=oi,c=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);c=null;break;case"undefined":return i([si],l)}return i([a,c],l)}case Ge:{if(o){let p=l;return o==="DataView"?p=new Uint8Array(l.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(l)),i([o,[...p]],l)}const c=[],h=i([a,c],l);for(const p of l)c.push(s(p));return h}case ft:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const c=[],h=i([a,c],l);for(const p of lu(l))(e||!it(Ue(l[p])))&&c.push([s(p),s(l[p])]);return h}case kn:return i([a,l.toISOString()],l);case xn:{const{source:c,flags:h}=l;return i([a,{source:c,flags:h}],l)}case yn:{const c=[],h=i([a,c],l);for(const[p,f]of l)(e||!(it(Ue(p))||it(Ue(f))))&&c.push([s(p),s(f)]);return h}case bn:{const c=[],h=i([a,c],l);for(const p of l)(e||!it(Ue(p)))&&c.push(s(p));return h}}const{message:u}=l;return i([a,{name:o,message:u}],l)};return s},ur=(e,{json:t,lossy:n}={})=>{const r=[];return su(!(t||n),!!t,new Map,r)(e),r},pt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?or(ur(e,t)):structuredClone(e):(e,t)=>or(ur(e,t));function au(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function ou(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function uu(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||au,r=e.options.footnoteBackLabel||ou,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const c=e.all(u),h=String(u.identifier).toUpperCase(),p=Ne(h.toLowerCase());let f=0;const d=[],S=e.footnoteCounts.get(h);for(;S!==void 0&&++f<=S;){d.length>0&&d.push({type:"text",value:" "});let E=typeof n=="string"?n:n(o,f);typeof E=="string"&&(E={type:"text",value:E}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,f),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const E=y.children[y.children.length-1];E&&E.type==="text"?E.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...d)}else c.push(...d);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(u,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...pt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
67
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
68
|
+
`}]}}const wt=(function(e){if(e==null)return pu;if(typeof e=="function")return St(e);if(typeof e=="object")return Array.isArray(e)?cu(e):hu(e);if(typeof e=="string")return fu(e);throw new Error("Expected function, string, or object as test")});function cu(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wt(e[n]);return St(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function hu(e){const t=e;return St(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function fu(e){return St(t);function t(n){return n&&n.type===e}}function St(e){return t;function t(n,r,i){return!!(mu(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function pu(){return!0}function mu(e){return e!==null&&typeof e=="object"&&"type"in e}const ui=[],gu=!0,Qt=!1,du="skip";function ci(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=wt(i),l=r?-1:1;a(e,void 0,[])();function a(o,u,c){const h=o&&typeof o=="object"?o:{};if(typeof h.type=="string"){const f=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=ui,d,S,y;if((!t||s(o,u,c[c.length-1]||void 0))&&(f=ku(n(o,c)),f[0]===Qt))return f;if("children"in o&&o.children){const k=o;if(k.children&&f[0]!==du)for(S=(r?k.children.length:-1)+l,y=c.concat(k);S>-1&&S<k.children.length;){const E=k.children[S];if(d=a(E,S,y)(),d[0]===Qt)return d;S=typeof d[1]=="number"?d[1]:S+l}}return f}}}function ku(e){return Array.isArray(e)?e:typeof e=="number"?[gu,e]:e==null?ui:[e]}function wn(e,t,n,r){let i,s,l;typeof t=="function"&&typeof n!="function"?(s=void 0,l=t,i=n):(s=t,l=n,i=r),ci(e,s,a,i);function a(o,u){const c=u[u.length-1],h=c?c.children.indexOf(o):void 0;return l(o,h,c)}}const Zt={}.hasOwnProperty,xu={};function yu(e,t){const n=t||xu,r=new Map,i=new Map,s=new Map,l={...nu,...n.handlers},a={all:u,applyData:wu,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:l,one:o,options:n,patch:bu,wrap:Cu};return wn(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const h=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();h.has(p)||h.set(p,c)}}),a;function o(c,h){const p=c.type,f=a.handlers[p];if(Zt.call(a.handlers,p)&&f)return f(a,c,h);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in c){const{children:S,...y}=c,k=pt(y);return k.children=a.all(c),k}return pt(c)}return(a.options.unknownHandler||Su)(a,c,h)}function u(c){const h=[];if("children"in c){const p=c.children;let f=-1;for(;++f<p.length;){const d=a.one(p[f],c);if(d){if(f&&p[f-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=cr(d.value)),!Array.isArray(d)&&d.type==="element")){const S=d.children[0];S&&S.type==="text"&&(S.value=cr(S.value))}Array.isArray(d)?h.push(...d):h.push(d)}}}return h}}function bu(e,t){e.position&&(t.position=as(e))}function wu(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,pt(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Su(e,t){const n=t.data||{},r="value"in t&&!(Zt.call(n,"hProperties")||Zt.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Cu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
69
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
70
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
71
|
+
`}),n}function cr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function hr(e,t){const n=yu(e,t),r=n.one(e,void 0),i=uu(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
72
|
+
`},i),s}function Eu(e,t){return e&&"run"in e?async function(n,r){const i=hr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return hr(n,{file:r,...e||t})}}function fr(e){if(e)throw e}var zt,pr;function Iu(){if(pr)return zt;pr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},s=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var c=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!h)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},l=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},a=function(u,c){if(c==="__proto__")if(e.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return zt=function o(){var u,c,h,p,f,d,S=arguments[0],y=1,k=arguments.length,E=!1;for(typeof S=="boolean"&&(E=S,S=arguments[1]||{},y=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});y<k;++y)if(u=arguments[y],u!=null)for(c in u)h=a(S,c),p=a(u,c),S!==p&&(E&&p&&(s(p)||(f=i(p)))?(f?(f=!1,d=h&&i(h)?h:[]):d=h&&s(h)?h:{},l(S,{name:c,newValue:o(E,d,p)})):typeof p<"u"&&l(S,{name:c,newValue:p}));return S},zt}var Tu=Iu();const Rt=Ir(Tu);function Gt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Au(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(o,...u){const c=e[++s];let h=-1;if(o){l(o);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,c?zu(c,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function zu(e,t){let n;return r;function r(...l){const a=e.length>l.length;let o;a&&l.push(i);try{o=e.apply(this,l)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(l,...a){n||(n=!0,t(l,...a))}function s(l){i(null,l)}}const fe={basename:Ru,dirname:Pu,extname:_u,join:Lu,sep:"/"};function Ru(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');et(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else l<0&&(s=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Pu(e){if(et(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function _u(e){et(e);let t=e.length,n=-1,r=0,i=-1,s=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Lu(...e){let t=-1,n;for(;++t<e.length;)et(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Fu(n)}function Fu(e){et(e);const t=e.codePointAt(0)===47;let n=Du(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Du(e,t){let n="",r=0,i=-1,s=0,l=-1,a,o;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||s===1))if(i!==l-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=l,s=0;continue}}else if(n.length>0){n="",r=0,i=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,s=0}else a===46&&s>-1?s++:s=-1}return n}function et(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const vu={cwd:Nu};function Nu(){return"/"}function Xt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $u(e){if(typeof e=="string")e=new URL(e);else if(!Xt(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Bu(e)}function Bu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pt=["history","path","basename","stem","extname","dirname"];class hi{constructor(t){let n;t?Xt(t)?n={path:t}:typeof t=="string"||Ou(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":vu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pt.length;){const s=Pt[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Pt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?fe.basename(this.path):void 0}set basename(t){Lt(t,"basename"),_t(t,"basename"),this.path=fe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?fe.dirname(this.path):void 0}set dirname(t){mr(this.basename,"dirname"),this.path=fe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?fe.extname(this.path):void 0}set extname(t){if(_t(t,"extname"),mr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=fe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Xt(t)&&(t=$u(t)),Lt(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?fe.basename(this.path,this.extname):void 0}set stem(t){Lt(t,"stem"),_t(t,"stem"),this.path=fe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new X(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function _t(e,t){if(e&&e.includes(fe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+fe.sep+"`")}function Lt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function mr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Ou(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ju=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),Mu={}.hasOwnProperty;class Sn extends ju{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Au()}copy(){const t=new Sn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(vt("data",this.frozen),this.namespace[t]=n,this):Mu.call(this.namespace,t)&&this.namespace[t]||void 0:t?(vt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=lt(t),r=this.parser||this.Parser;return Ft("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ft("process",this.parser||this.Parser),Dt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,l){const a=lt(t),o=r.parse(a);r.run(o,a,function(c,h,p){if(c||!h||!p)return u(c);const f=h,d=r.stringify(f,p);Vu(d)?p.value=d:p.result=d,u(c,p)});function u(c,h){c||!h?l(c):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Ft("processSync",this.parser||this.Parser),Dt("processSync",this.compiler||this.Compiler),this.process(t,i),dr("processSync","process",n),r;function i(s,l){n=!0,fr(s),r=l}}run(t,n,r){gr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(l,a){const o=lt(n);i.run(t,o,u);function u(c,h,p){const f=h||t;c?a(c):l?l(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),dr("runSync","run",r),i;function s(l,a){fr(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=lt(n),i=this.compiler||this.Compiler;return Dt("stringify",i),gr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(vt("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...h]=u;o(c,h)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Rt(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const h=u[c];s(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,c){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===u){p=h;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[f,...d]=c;const S=r[p][1];Gt(S)&&Gt(f)&&(f=Rt(!0,S,f)),r[p]=[u,f,...d]}}}}const qu=new Sn().freeze();function Ft(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Dt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function vt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gr(e){if(!Gt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function lt(e){return Hu(e)?e:new hi(e)}function Hu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Vu(e){return typeof e=="string"||Uu(e)}function Uu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",kr=[],xr={allowDangerousHtml:!0},Qu=/^(https?|ircs?|mailto|xmpp)$/i,Zu=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Gu(e){const t=Xu(e),n=Yu(e);return Ju(t.runSync(t.parse(n),n),e)}function Xu(e){const t=e.rehypePlugins||kr,n=e.remarkPlugins||kr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xr}:xr;return qu().use(Po).use(n).use(Eu,r).use(t)}function Yu(e){const t=e.children||"",n=new hi;return typeof t=="string"&&(n.value=t),n}function Ju(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,o=t.urlTransform||Ku;for(const c of Zu)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+Wu+c.id,void 0);return wn(e,u),fs(e,{Fragment:_.Fragment,components:i,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function u(c,h,p){if(c.type==="raw"&&p&&typeof h=="number")return l?p.children.splice(h,1):p.children[h]={type:"text",value:c.value},h;if(c.type==="element"){let f;for(f in It)if(Object.hasOwn(It,f)&&Object.hasOwn(c.properties,f)){const d=c.properties[f],S=It[f];(S===null||S.includes(c.tagName))&&(c.properties[f]=o(String(d||""),f,c))}}if(c.type==="element"){let f=n?!n.includes(c.tagName):s?s.includes(c.tagName):!1;if(!f&&r&&typeof h=="number"&&(f=!r(c,h,p)),f&&p&&typeof h=="number")return a&&c.children?p.children.splice(h,1,...c.children):p.children.splice(h,1),h}}}function Ku(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Qu.test(e.slice(0,t))?e:""}function ec(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function fi(e,t,n){const i=wt((n||{}).ignore||[]),s=tc(t);let l=-1;for(;++l<s.length;)ci(e,"text",a);function a(u,c){let h=-1,p;for(;++h<c.length;){const f=c[h],d=p?p.children:void 0;if(i(f,d?d.indexOf(f):void 0,p))return;p=f}if(p)return o(u,c)}function o(u,c){const h=c[c.length-1],p=s[l][0],f=s[l][1];let d=0;const y=h.children.indexOf(u);let k=!1,E=[];p.lastIndex=0;let C=p.exec(u.value);for(;C;){const F=C.index,L={index:C.index,input:C.input,stack:[...c,u]};let b=f(...C,L);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?p.lastIndex=F+1:(d!==F&&E.push({type:"text",value:u.value.slice(d,F)}),Array.isArray(b)?E.push(...b):b&&E.push(b),d=F+C[0].length,k=!0),!p.global)break;C=p.exec(u.value)}return k?(d<u.value.length&&E.push({type:"text",value:u.value.slice(d)}),h.children.splice(y,1,...E)):E=[u],y+E.length}}function tc(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([nc(i[0]),rc(i[1])])}return t}function nc(e){return typeof e=="string"?new RegExp(ec(e),"g"):e}function rc(e){return typeof e=="function"?e:function(){return e}}function ic(e){fi(e,[/\r?\n|\r/g,lc])}function lc(){return{type:"break"}}function sc(){return function(e){ic(e)}}const Nt="phrasing",$t=["autolink","link","image","label"];function ac(){return{transforms:[mc],enter:{literalAutolink:uc,literalAutolinkEmail:Bt,literalAutolinkHttp:Bt,literalAutolinkWww:Bt},exit:{literalAutolink:pc,literalAutolinkEmail:fc,literalAutolinkHttp:cc,literalAutolinkWww:hc}}}function oc(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nt,notInConstruct:$t},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nt,notInConstruct:$t},{character:":",before:"[ps]",after:"\\/",inConstruct:Nt,notInConstruct:$t}]}}function uc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Bt(e){this.config.enter.autolinkProtocol.call(this,e)}function cc(e){this.config.exit.autolinkProtocol.call(this,e)}function hc(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function fc(e){this.config.exit.autolinkEmail.call(this,e)}function pc(e){this.exit(e)}function mc(e){fi(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,gc],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),dc]],{ignore:["link","linkReference"]})}function gc(e,t,n,r,i){let s="";if(!pi(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!kc(n)))return!1;const l=xc(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:s+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function dc(e,t,n,r){return!pi(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function kc(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function xc(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Fn(e,"(");let s=Fn(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function pi(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ae(n)||xt(n))&&(!t||n!==47)}mi.peek=Ac;function yc(){this.buffer()}function bc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wc(){this.buffer()}function Sc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Cc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ue(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ec(e){this.exit(e)}function Ic(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ue(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Tc(e){this.exit(e)}function Ac(){return"["}function mi(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),l(),s+=i.move("]"),s}function zc(){return{enter:{gfmFootnoteCallString:yc,gfmFootnoteCall:bc,gfmFootnoteDefinitionLabelString:wc,gfmFootnoteDefinition:Sc},exit:{gfmFootnoteCallString:Cc,gfmFootnoteCall:Ec,gfmFootnoteDefinitionLabelString:Ic,gfmFootnoteDefinition:Tc}}}function Rc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:mi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,l){const a=s.createTracker(l);let o=a.move("[^");const u=s.enter("footnoteDefinition"),c=s.enter("label");return o+=a.move(s.safe(s.associationId(r),{before:o,after:"]"})),c(),o+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
73
|
+
`:" ")+s.indentLines(s.containerFlow(r,a.current()),t?gi:Pc))),u(),o}}function Pc(e,t,n){return t===0?e:gi(e,t,n)}function gi(e,t,n){return(n?"":" ")+e}const _c=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];di.peek=Nc;function Lc(){return{canContainEols:["delete"],enter:{strikethrough:Dc},exit:{strikethrough:vc}}}function Fc(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:_c}],handlers:{delete:di}}}function Dc(e){this.enter({type:"delete",children:[]},e)}function vc(e){this.exit(e)}function di(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),s(),l}function Nc(){return"~"}function $c(e){return e.length}function Bc(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||$c,s=[],l=[],a=[],o=[];let u=0,c=-1;for(;++c<e.length;){const S=[],y=[];let k=-1;for(e[c].length>u&&(u=e[c].length);++k<e[c].length;){const E=Oc(e[c][k]);if(n.alignDelimiters!==!1){const C=i(E);y[k]=C,(o[k]===void 0||C>o[k])&&(o[k]=C)}S.push(E)}l[c]=S,a[c]=y}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)s[h]=yr(r[h]);else{const S=yr(r);for(;++h<u;)s[h]=S}h=-1;const p=[],f=[];for(;++h<u;){const S=s[h];let y="",k="";S===99?(y=":",k=":"):S===108?y=":":S===114&&(k=":");let E=n.alignDelimiters===!1?1:Math.max(1,o[h]-y.length-k.length);const C=y+"-".repeat(E)+k;n.alignDelimiters!==!1&&(E=y.length+E+k.length,E>o[h]&&(o[h]=E),f[h]=E),p[h]=C}l.splice(1,0,p),a.splice(1,0,f),c=-1;const d=[];for(;++c<l.length;){const S=l[c],y=a[c];h=-1;const k=[];for(;++h<u;){const E=S[h]||"";let C="",F="";if(n.alignDelimiters!==!1){const L=o[h]-(y[h]||0),b=s[h];b===114?C=" ".repeat(L):b===99?L%2?(C=" ".repeat(L/2+.5),F=" ".repeat(L/2-.5)):(C=" ".repeat(L/2),F=C):F=" ".repeat(L)}n.delimiterStart!==!1&&!h&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||h)&&k.push(" "),n.alignDelimiters!==!1&&k.push(C),k.push(E),n.alignDelimiters!==!1&&k.push(F),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&k.push("|")}d.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return d.join(`
|
|
74
|
+
`)}function Oc(e){return e==null?"":String(e)}function yr(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function jc(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const l=n.indentLines(n.containerFlow(e,s.current()),Mc);return i(),l}function Mc(e,t,n){return">"+(n?"":" ")+e}function qc(e,t){return br(e,t.inConstruct,!0)&&!br(e,t.notInConstruct,!1)}function br(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function wr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
75
|
+
`&&qc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
76
|
+
`}function Hc(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>l&&(l=s):s=1,i=r+t.length,r=n.indexOf(t,i);return l}function Vc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Uc(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Wc(e,t,n,r){const i=Uc(n),s=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(Vc(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(s,Qc);return h(),p}const a=n.createTracker(r),o=i.repeat(Math.max(Hc(s,i)+1,3)),u=n.enter("codeFenced");let c=a.move(o);if(e.lang){const h=n.enter(`codeFencedLang${l}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${l}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:`
|
|
77
|
+
`,encode:["`"],...a.current()})),h()}return c+=a.move(`
|
|
78
|
+
`),s&&(c+=a.move(s+`
|
|
79
|
+
`)),c+=a.move(o),u(),c}function Qc(e,t,n){return(n?"":" ")+e}function Cn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Zc(e,t,n,r){const i=Cn(n),s=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("[");return u+=o.move(n.safe(n.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
80
|
+
`,...o.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),l(),u}function Gc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ye(e){return"&#x"+e.toString(16).toUpperCase()+";"}function mt(e,t,n){const r=ve(e),i=ve(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ki.peek=Xc;function ki(e,t,n,r){const i=Gc(n),s=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let o=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=o.charCodeAt(0),c=mt(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(o=Ye(u)+o.slice(1));const h=o.charCodeAt(o.length-1),p=mt(r.after.charCodeAt(0),h,i);p.inside&&(o=o.slice(0,-1)+Ye(h));const f=l.move(i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+o+f}function Xc(e,t,n){return n.options.emphasis||"*"}function Yc(e,t){let n=!1;return wn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Qt}),!!((!e.depth||e.depth<3)&&mn(e)&&(t.options.setext||n))}function Jc(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Yc(e,n)){const c=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...s.current(),before:`
|
|
81
|
+
`,after:`
|
|
82
|
+
`});return h(),c(),p+`
|
|
83
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
84
|
+
`))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),o=n.enter("phrasing");s.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
85
|
+
`,...s.current()});return/^[\t ]/.test(u)&&(u=Ye(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),o(),a(),u}xi.peek=Kc;function xi(e){return e.value||""}function Kc(){return"<"}yi.peek=eh;function yi(e,t,n,r){const i=Cn(n),s=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("![");return u+=o.move(n.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),l(),u}function eh(){return"!"}bi.peek=th;function bi(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let o=a.move("![");const u=n.safe(e.alt,{before:o,after:"]",...a.current()});o+=a.move(u+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const h=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return l(),n.stack=c,s(),i==="full"||!u||u!==h?o+=a.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function th(){return"!"}wi.peek=nh;function wi(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const l=n.unsafe[s],a=n.compilePattern(l);let o;if(l.atBreak)for(;o=a.exec(r);){let u=o.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(o.index+1)}}return i+r+i}function nh(){return"`"}function Si(e,t){const n=mn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ci.peek=rh;function Ci(e,t,n,r){const i=Cn(n),s=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,o;if(Si(e,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let h=l.move("<");return h+=l.move(n.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),a(),n.stack=c,h}a=n.enter("link"),o=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function rh(e,t,n){return Si(e,n)?"<":"["}Ei.peek=ih;function Ei(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let o=a.move("[");const u=n.containerPhrasing(e,{before:o,after:"]",...a.current()});o+=a.move(u+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const h=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return l(),n.stack=c,s(),i==="full"||!u||u!==h?o+=a.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function ih(){return"["}function En(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function lh(e){const t=En(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function sh(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ii(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function ah(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let l=e.ordered?sh(n):En(n);const a=e.ordered?l==="."?")":".":lh(n);let o=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),Ii(n)===l&&c){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=s,i(),u}function oh(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function uh(e,t,n,r){const i=oh(n);let s=n.bulletCurrent||En(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let l=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(l-s.length)),a.shift(l);const o=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),c);return o(),u;function c(h,p,f){return p?(f?"":" ".repeat(l))+h:(f?s:s+" ".repeat(l-s.length))+h}}function ch(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,r);return s(),i(),l}const hh=wt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fh(e,t,n,r){return(e.children.some(function(l){return hh(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ph(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ti.peek=mh;function Ti(e,t,n,r){const i=ph(n),s=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let o=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=o.charCodeAt(0),c=mt(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(o=Ye(u)+o.slice(1));const h=o.charCodeAt(o.length-1),p=mt(r.after.charCodeAt(0),h,i);p.inside&&(o=o.slice(0,-1)+Ye(h));const f=l.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+o+f}function mh(e,t,n){return n.options.strong||"*"}function gh(e,t,n,r){return n.safe(e.value,r)}function dh(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kh(e,t,n){const r=(Ii(n)+(n.options.ruleSpaces?" ":"")).repeat(dh(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Ai={blockquote:jc,break:wr,code:Wc,definition:Zc,emphasis:ki,hardBreak:wr,heading:Jc,html:xi,image:yi,imageReference:bi,inlineCode:wi,link:Ci,linkReference:Ei,list:ah,listItem:uh,paragraph:ch,root:fh,strong:Ti,text:gh,thematicBreak:kh};function xh(){return{enter:{table:yh,tableData:Sr,tableHeader:Sr,tableRow:wh},exit:{codeText:Sh,table:bh,tableData:Ot,tableHeader:Ot,tableRow:Ot}}}function yh(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function bh(e){this.exit(e),this.data.inTable=void 0}function wh(e){this.enter({type:"tableRow",children:[]},e)}function Ot(e){this.exit(e)}function Sr(e){this.enter({type:"tableCell",children:[]},e)}function Sh(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ch));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ch(e,t){return t==="|"?t:e}function Eh(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
86
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:o,tableRow:a}};function l(f,d,S,y){return u(c(f,S,y),f.align)}function a(f,d,S,y){const k=h(f,S,y),E=u([k]);return E.slice(0,E.indexOf(`
|
|
87
|
+
`))}function o(f,d,S,y){const k=S.enter("tableCell"),E=S.enter("phrasing"),C=S.containerPhrasing(f,{...y,before:s,after:s});return E(),k(),C}function u(f,d){return Bc(f,{align:d,alignDelimiters:r,padding:n,stringLength:i})}function c(f,d,S){const y=f.children;let k=-1;const E=[],C=d.enter("table");for(;++k<y.length;)E[k]=h(y[k],d,S);return C(),E}function h(f,d,S){const y=f.children;let k=-1;const E=[],C=d.enter("tableRow");for(;++k<y.length;)E[k]=o(y[k],f,d,S);return C(),E}function p(f,d,S){let y=Ai.inlineCode(f,d,S);return S.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Ih(){return{exit:{taskListCheckValueChecked:Cr,taskListCheckValueUnchecked:Cr,paragraph:Ah}}}function Th(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:zh}}}function Cr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Ah(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,l;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function zh(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(l);let o=Ai.listItem(e,t,n,{...r,...a.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(c){return c+l}}function Rh(){return[ac(),zc(),Lc(),xh(),Ih()]}function Ph(e){return{extensions:[oc(),Rc(e),Fc(),Eh(e),Th()]}}const _h={tokenize:$h,partial:!0},zi={tokenize:Bh,partial:!0},Ri={tokenize:Oh,partial:!0},Pi={tokenize:jh,partial:!0},Lh={tokenize:Mh,partial:!0},_i={name:"wwwAutolink",tokenize:vh,previous:Fi},Li={name:"protocolAutolink",tokenize:Nh,previous:Di},xe={name:"emailAutolink",tokenize:Dh,previous:vi},pe={};function Fh(){return{text:pe}}let Ee=48;for(;Ee<123;)pe[Ee]=xe,Ee++,Ee===58?Ee=65:Ee===91&&(Ee=97);pe[43]=xe;pe[45]=xe;pe[46]=xe;pe[95]=xe;pe[72]=[xe,Li];pe[104]=[xe,Li];pe[87]=[xe,_i];pe[119]=[xe,_i];function Dh(e,t,n){const r=this;let i,s;return l;function l(h){return!Yt(h)||!vi.call(r,r.previous)||In(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return Yt(h)?(e.consume(h),a):h===64?(e.consume(h),o):n(h)}function o(h){return h===46?e.check(Lh,c,u)(h):h===45||h===95||G(h)?(s=!0,e.consume(h),o):c(h)}function u(h){return e.consume(h),i=!0,o}function c(h){return s&&i&&Y(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function vh(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Fi.call(r,r.previous)||In(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_h,e.attempt(zi,e.attempt(Ri,s),n),n)(l))}function s(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Nh(e,t,n){const r=this;let i="",s=!1;return l;function l(h){return(h===72||h===104)&&Di.call(r,r.previous)&&!In(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):n(h)}function a(h){if(Y(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),a;if(h===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(h),o}return n(h)}function o(h){return h===47?(e.consume(h),s?u:(s=!0,o)):n(h)}function u(h){return h===null||ht(h)||W(h)||Ae(h)||xt(h)?n(h):e.attempt(zi,e.attempt(Ri,c),n)(h)}function c(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function $h(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),s):n(l)}function s(l){return l===null?n(l):t(l)}}function Bh(e,t,n){let r,i,s;return l;function l(u){return u===46||u===95?e.check(Pi,o,a)(u):u===null||W(u)||Ae(u)||u!==45&&xt(u)?o(u):(s=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function o(u){return i||r||!s?n(u):t(u)}}function Oh(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Pi,t,s)(l):l===null||W(l)||Ae(l)?t(l):(e.consume(l),i)}function s(l){return l===41&&r++,e.consume(l),i}}function jh(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||W(a)||Ae(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||W(a)||Ae(a)?t(a):r(a)}function s(a){return Y(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):Y(a)?(e.consume(a),l):n(a)}}function Mh(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return G(s)?n(s):t(s)}}function Fi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function Di(e){return!Y(e)}function vi(e){return!(e===47||Yt(e))}function Yt(e){return e===43||e===45||e===46||e===95||G(e)}function In(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const qh={tokenize:Xh,partial:!0};function Hh(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Qh,continuation:{tokenize:Zh},exit:Gh}},text:{91:{name:"gfmFootnoteCall",tokenize:Wh},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Vh,resolveTo:Uh}}}}function Vh(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){l=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return a;function a(o){if(!l||!l._balanced)return n(o);const u=ue(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function Uh(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Wh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return a;function a(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),o}function o(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(s>999||h===93&&!l||h===null||h===91||W(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ue(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return W(h)||(l=!0),s++,e.consume(h),h===92?c:u}function c(h){return h===91||h===92||h===93?(e.consume(h),s++,u):u(h)}}function Qh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,a;return o;function o(d){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(d){return d===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(d)}function c(d){if(l>999||d===93&&!a||d===null||d===91||W(d))return n(d);if(d===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return s=ue(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(d),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return W(d)||(a=!0),l++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),l++,c):c(d)}function p(d){return d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),i.includes(s)||i.push(s),B(e,f,"gfmFootnoteDefinitionWhitespace")):n(d)}function f(d){return t(d)}}function Zh(e,t,n){return e.check(Ke,t,e.attempt(qh,t,n))}function Gh(e){e.exit("gfmFootnoteDefinition")}function Xh(e,t,n){const r=this;return B(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(s):n(s)}}function Yh(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let o=-1;for(;++o<l.length;)if(l[o][0]==="enter"&&l[o][1].type==="strikethroughSequenceTemporary"&&l[o][1]._close){let u=o;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[o][1].end.offset-l[o][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[o][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[o][1].end)},h={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[o][1].start)},p=[["enter",c,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",h,a]],f=a.parser.constructs.insideSpan.null;f&&te(p,p.length,0,yt(f,l.slice(u+1,o),a)),te(p,p.length,0,[["exit",h,a],["enter",l[o][1],a],["exit",l[o][1],a],["exit",c,a]]),te(l,u-1,o-u+3,p),o=u+p.length-2;break}}for(o=-1;++o<l.length;)l[o][1].type==="strikethroughSequenceTemporary"&&(l[o][1].type="data");return l}function s(l,a,o){const u=this.previous,c=this.events;let h=0;return p;function p(d){return u===126&&c[c.length-1][1].type!=="characterEscape"?o(d):(l.enter("strikethroughSequenceTemporary"),f(d))}function f(d){const S=ve(u);if(d===126)return h>1?o(d):(l.consume(d),h++,f);if(h<2&&!n)return o(d);const y=l.exit("strikethroughSequenceTemporary"),k=ve(d);return y._open=!k||k===2&&!!S,y._close=!S||S===2&&!!k,a(d)}}}class Jh{constructor(){this.map=[]}add(t,n,r){Kh(this,t,n,r)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function Kh(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function ef(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function tf(){return{flow:{null:{name:"table",tokenize:nf,resolveAll:rf}}}}function nf(e,t,n){const r=this;let i=0,s=0,l;return a;function a(x){let A=r.events.length-1;for(;A>-1;){const P=r.events[A][1].type;if(P==="lineEnding"||P==="linePrefix")A--;else break}const z=A>-1?r.events[A][1].type:null,q=z==="tableHead"||z==="tableRow"?b:o;return q===b&&r.parser.lazy[r.now().line]?n(x):q(x)}function o(x){return e.enter("tableHead"),e.enter("tableRow"),u(x)}function u(x){return x===124||(l=!0,s+=1),c(x)}function c(x){return x===null?n(x):R(x)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),f):n(x):v(x)?B(e,c,"whitespace")(x):(s+=1,l&&(l=!1,i+=1),x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),l=!0,c):(e.enter("data"),h(x)))}function h(x){return x===null||x===124||W(x)?(e.exit("data"),c(x)):(e.consume(x),x===92?p:h)}function p(x){return x===92||x===124?(e.consume(x),h):h(x)}function f(x){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(x):(e.enter("tableDelimiterRow"),l=!1,v(x)?B(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):d(x))}function d(x){return x===45||x===58?y(x):x===124?(l=!0,e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),S):L(x)}function S(x){return v(x)?B(e,y,"whitespace")(x):y(x)}function y(x){return x===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),k):x===45?(s+=1,k(x)):x===null||R(x)?F(x):L(x)}function k(x){return x===45?(e.enter("tableDelimiterFiller"),E(x)):L(x)}function E(x){return x===45?(e.consume(x),E):x===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(x),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(x))}function C(x){return v(x)?B(e,F,"whitespace")(x):F(x)}function F(x){return x===124?d(x):x===null||R(x)?!l||i!==s?L(x):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(x)):L(x)}function L(x){return n(x)}function b(x){return e.enter("tableRow"),N(x)}function N(x){return x===124?(e.enter("tableCellDivider"),e.consume(x),e.exit("tableCellDivider"),N):x===null||R(x)?(e.exit("tableRow"),t(x)):v(x)?B(e,N,"whitespace")(x):(e.enter("data"),M(x))}function M(x){return x===null||x===124||W(x)?(e.exit("data"),N(x)):(e.consume(x),x===92?j:M)}function j(x){return x===92||x===124?(e.consume(x),M):M(x)}}function rf(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],l=[0,0,0,0],a=!1,o=0,u,c,h;const p=new Jh;for(;++n<e.length;){const f=e[n],d=f[1];f[0]==="enter"?d.type==="tableHead"?(a=!1,o!==0&&(Er(p,t,o,u,c),c=void 0,o=0),u={type:"table",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",u,t]])):d.type==="tableRow"||d.type==="tableDelimiterRow"?(r=!0,h=void 0,s=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},d.start),end:Object.assign({},d.end)},p.add(n,0,[["enter",c,t]])),i=d.type==="tableDelimiterRow"?2:c?3:1):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],h=st(p,t,s,i,void 0,h),s=[0,0,0,0]),l[2]=n)):d.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(l[0]=l[1],h=st(p,t,s,i,void 0,h)),s=l,l=[s[1],n,0,0])):d.type==="tableHead"?(a=!0,o=n):d.type==="tableRow"||d.type==="tableDelimiterRow"?(o=n,s[1]!==0?(l[0]=l[1],h=st(p,t,s,i,n,h)):l[1]!==0&&(h=st(p,t,l,i,n,h)),i=0):i&&(d.type==="data"||d.type==="tableDelimiterMarker"||d.type==="tableDelimiterFiller")&&(l[3]=n)}for(o!==0&&Er(p,t,o,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=ef(t.events,n))}return e}function st(e,t,n,r,i,s){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},De(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const o=De(t.events,n[1]);if(s={type:l,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=De(t.events,n[2]),c=De(t.events,n[3]),h={type:a,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const d=n[2]+1,S=n[3]-n[2]-1;e.add(d,S,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},De(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Er(e,t,n,r,i){const s=[],l=De(t.events,n);i&&(i.end=Object.assign({},l),s.push(["exit",i,t])),r.end=Object.assign({},l),s.push(["exit",r,t]),e.add(n+1,0,s)}function De(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const lf={name:"tasklistCheck",tokenize:af};function sf(){return{text:{91:lf}}}function af(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),s)}function s(o){return W(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),l):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),l):n(o)}function l(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(o)}function a(o){return R(o)?t(o):v(o)?e.check({tokenize:of},t,n)(o):n(o)}}function of(e,t,n){return B(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function uf(e){return Ur([Fh(),Hh(),Yh(e),tf(),sf()])}const cf={};function hf(e){const t=this,n=e||cf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(uf(n)),s.push(Rh()),l.push(Ph(n))}const ff=["md","txt","json","yaml","yml","toml","py","js","ts","tsx","jsx","css","scss","html","xml","sh","bash","go","rs","rb","php","java","kt","swift","c","cpp","h","hpp","sql","graphql","dockerfile","env","conf","cfg","ini","log","csv"],pf=ff.join("|"),mf="(?:~\\/[A-Za-z0-9._\\-\\/]*[A-Za-z0-9._\\-\\/]|\\/(?:[\\w.\\-]+\\/)*[\\w.\\-]+\\/?)",gf="(?:[A-Za-z0-9._\\-]+(?:\\/[A-Za-z0-9._\\-]+)+\\/?)",df=`(?:[A-Za-z0-9_-][A-Za-z0-9._-]*[A-Za-z0-9_-]\\.(?:${pf})|dockerfile)`,gt=new RegExp(`(^|[\\s"'(,;:])(${mf}|${gf}|${df})(?=$|[\\s"'),;:!?])`,"gi");function kf(e){if(!e)return{path:e??"",trailing:""};const t=e.match(/^(.*?)([),.;:!?]+)?$/);return t?{path:t[1]||e,trailing:t[2]||""}:{path:e,trailing:""}}function xf(e){if(!e)return!1;gt.lastIndex=0;const t=gt.exec(e);if(!t)return!1;const n=t[1]||"",r=t[2]||"",i=t.index+n.length,s=i+r.length;return i===0&&s===e.length}function yf(e){if(!e)return[{type:"text",value:e}];const t=[];let n=0;gt.lastIndex=0;let r;for(;(r=gt.exec(e))!==null;){const i=r[1]||"",s=r[2]||"",l=r[0],a=r.index,o=a,u=a+i.length;o>n&&t.push({type:"text",value:e.slice(n,o)}),i&&t.push({type:"text",value:i});const{path:c,trailing:h}=kf(s);c.length>1?(t.push({type:"path",value:c}),h&&t.push({type:"text",value:h})):t.push({type:"text",value:l}),n=u+s.length}return n<e.length&&t.push({type:"text",value:e.slice(n)}),t.length>0?t:[{type:"text",value:e}]}function bf(e){return`openclaw-file://${encodeURIComponent(e)}`}function Ni(e){if(!e?.startsWith("openclaw-file://"))return null;try{return decodeURIComponent(e.slice(16))}catch{return null}}function wf(){return e=>{function t(n,r){if(n){if(n.type==="text"&&r&&r.type!=="link"&&r.type!=="inlineCode"&&r.type!=="code"){const i=yf(String(n.value||""));if(!i.some(o=>o.type==="path"))return;const l=i.map(o=>o.type==="text"?{type:"text",value:o.value}:{type:"link",url:bf(o.value),children:[{type:"text",value:o.value}]}),a=r.children.indexOf(n);a>=0&&r.children.splice(a,1,...l);return}if(Array.isArray(n.children))for(const i of[...n.children])t(i,n)}}t(e,null)}}const Sf={py:"python",ts:"typescript",js:"javascript",jsx:"jsx",tsx:"tsx",json:"json",md:"markdown",yml:"yaml",yaml:"yaml",sh:"bash",bash:"bash",zsh:"bash",html:"html",css:"css",sql:"sql",xml:"xml",toml:"toml",rs:"rust",go:"go",java:"java",c:"c",cpp:"cpp",cs:"csharp",php:"php",rb:"ruby",graphql:"graphql",diff:"diff",patch:"diff",env:"text"};function Cf(e){if(!e)return"text";const n=(e.split("/").pop()||"").toLowerCase();if(n==="dockerfile")return"dockerfile";if(n==="makefile")return"text";const r=n.split("."),i=r.length>1&&r.pop()||"",s=Sf[i]||i||"text";return Yi(s)}const Ef=100*1024;function $i(e){return e?e.includes("/")?e:`/${e}`:"/"}function jt(e){let t=$i(e);const n=["/root/clawd/","/root/"];for(const r of n)if(t.startsWith(r)){t="/"+t.slice(r.length);break}return t.startsWith("/")?t:`/${t}`}function If(e){const n=e.replace(/\/+$/,"").split("/").pop()||"";return!n||n.startsWith(".")?!1:n.includes(".")}function Tf(e){return e?e.endsWith("/")||!If(e):!1}function Af(e,t){const n=String(e||"").toUpperCase(),r=String(t||"").toLowerCase();return n.includes("DIRECTORY")||r.includes("is a directory")||r.includes("directory")}function zf(e){return H.lexer(e).map(n=>n.raw)}function Bi(e){if(!e)return"text";const t=e.match(/language-([\w-]+)/);return t?t[1]:"text"}function Oi(e){const t=e?.trim();return t&&t.split(/\s+/)[0]||void 0}const Rf={code:function({className:t,children:n,node:r}){if(!t?.includes("language-"))return _.jsx("code",{className:"rounded bg-primary-100 px-1.5 py-1 text-sm font-mono text-primary-900 border border-primary-200",children:n});const s=Bi(t),l=Oi(r?.data?.meta);return _.jsx(Jt,{content:String(n??""),language:s,filename:l,className:"w-full"})},pre:function({children:t}){return _.jsx(_.Fragment,{children:t})},h1:function({children:t}){return _.jsx("h1",{className:"text-xl font-medium text-primary-950",children:t})},h2:function({children:t}){return _.jsx("h2",{className:"text-lg font-medium text-primary-900",children:t})},h3:function({children:t}){return _.jsx("h3",{className:"font-medium text-primary-900",children:t})},p:function({children:t}){return _.jsx("p",{className:"text-primary-950 text-pretty leading-relaxed",children:t})},ul:function({children:t}){return _.jsx("ul",{className:"ml-4 list-disc text-primary-950 marker:text-primary-400",children:t})},ol:function({children:t}){return _.jsx("ol",{className:"ml-4 list-decimal text-primary-950 marker:text-primary-500",children:t})},li:function({children:t}){return _.jsx("li",{className:"leading-relaxed",children:t})},blockquote:function({children:t}){return _.jsx("blockquote",{className:"border-l-2 border-primary-300 pl-4 text-primary-900 italic",children:t})},strong:function({children:t}){return _.jsx("strong",{className:"font-medium text-primary-950",children:t})},em:function({children:t}){return _.jsx("em",{className:"italic text-primary-950",children:t})},hr:function(){return _.jsx("hr",{className:"my-3 border-primary-200"})},table:function({children:t}){return _.jsx("div",{className:"overflow-x-auto",children:_.jsx("table",{className:"w-full border-collapse text-sm",children:t})})},thead:function({children:t}){return _.jsx("thead",{className:"border-b border-primary-200 bg-primary-50",children:t})},tbody:function({children:t}){return _.jsx("tbody",{className:"divide-y divide-primary-100",children:t})},tr:function({children:t}){return _.jsx("tr",{className:"transition-colors hover:bg-primary-50/50",children:t})},th:function({children:t}){return _.jsx("th",{className:"px-3 py-2 text-left font-medium text-primary-950",children:t})},td:function({children:t}){return _.jsx("td",{className:"px-3 py-2 text-primary-950",children:t})}};function Pf(e,t=!1){return{...Rf,a:function({children:r,href:i}){const s=Ni(i);return s?_.jsx("button",{type:"button",onClick:()=>e(s),className:"font-mono text-[var(--opencami-accent)] underline decoration-[var(--opencami-accent-light)] underline-offset-4 hover:opacity-90 cursor-pointer",children:r}):_.jsx("a",{href:i,onClick:l=>{i?.startsWith("openclaw-file://")&&l.preventDefault()},className:"text-[var(--opencami-accent)] underline decoration-[var(--opencami-accent-light)] underline-offset-4 transition-opacity hover:opacity-90",target:"_blank",rel:"noopener noreferrer",children:r})},code:function({children:r,className:i,node:s}){if(i?.includes("language-")){const a=Bi(i),o=Oi(s?.data?.meta);return _.jsx(Jt,{content:String(r??""),language:a,filename:o,className:"w-full",isStreaming:t})}const l=typeof r=="string"?r:Array.isArray(r)?r.filter(a=>typeof a=="string").join(""):String(r??"");return l&&xf(l)?_.jsx("button",{type:"button",onClick:()=>e(l),className:"font-mono text-sm bg-primary-100 rounded px-1.5 py-0.5 text-primary-900 underline decoration-primary-300 underline-offset-4 hover:decoration-primary-600 cursor-pointer",children:r}):_.jsx("code",{className:"font-mono text-sm bg-primary-100 rounded px-1.5 py-0.5 text-primary-900",children:r})}}}const ji=he.memo(function({content:t,components:n}){return _.jsx(Gu,{remarkPlugins:[hf,sc,wf],components:n,children:t})},function(t,n){return t.content===n.content});ji.displayName="MemoizedMarkdownBlock";function _f(e,t){return t==="NOT_FOUND"||e===404?"File not found":t==="UNSUPPORTED_TYPE"?"Binary file":t==="FILE_TOO_LARGE"||e===413?"File too large":"Failed to load file preview"}function Lf({children:e,id:t,className:n,components:r,isStreaming:i=!1}){const s=he.useId(),l=t??s,a=he.useMemo(()=>zf(e),[e]),[o,u]=he.useState({status:"idle"}),c=Xi(),h=he.useCallback(y=>{const k=jt(y);Ct.getState().navigateTo(k),u({status:"idle"}),c({to:"/files"})},[c]),p=he.useCallback(y=>{const k=$i(y);if(Tf(k)){h(k);return}u({status:"loading",path:k})},[h]),f=he.useMemo(()=>Pf(p,i),[i,p]),d=he.useMemo(()=>({...f,...r||{}}),[f,r]);he.useEffect(()=>{if(o.status!=="loading")return;const y=o.path,k=new AbortController;return fetch(`/api/files/read?path=${encodeURIComponent(y)}`,{signal:k.signal}).then(async E=>{const C=await E.json().catch(()=>({}));if(!E.ok){if(Af(C.code,C.message)){h(y);return}const b=_f(E.status,C.code);u({status:"error",path:y,message:b});return}if(Number(C.size??0)>Ef){u({status:"error",path:y,message:"File too large"});return}const L=String(C.content??"");u({status:"success",path:y,content:L,language:Cf(y)})}).catch(()=>{k.signal.aborted||u({status:"error",path:y,message:"Failed to load file preview"})}),()=>k.abort()},[o,h]);const S=o.status!=="idle";return _.jsxs(_.Fragment,{children:[_.jsx("div",{className:nl("flex min-w-0 max-w-full flex-col gap-2 overflow-x-hidden",n),onClickCapture:y=>{const E=y.target?.closest?.('a[href^="openclaw-file://"]');if(!E)return;const C=Ni(E.getAttribute("href")??void 0);C&&(y.preventDefault(),y.stopPropagation(),p(C))},children:a.map((y,k)=>_.jsx(ji,{content:y,components:d},`${l}-block-${k}`))}),_.jsx(Ji,{open:S,onOpenChange:y=>{y||u({status:"idle"})},children:_.jsxs(Ki,{className:"w-[min(1000px,95vw)] max-h-[88vh] overflow-hidden p-0",children:[_.jsxs("div",{className:"border-b border-primary-200 px-4 py-3 flex items-start justify-between gap-3",children:[_.jsxs("div",{className:"min-w-0",children:[_.jsx(el,{className:"text-base",children:"File Preview"}),o.status!=="idle"&&_.jsx("p",{className:"text-xs text-primary-600 font-mono truncate",children:o.path})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[o.status!=="idle"&&_.jsx(Ln,{variant:"ghost",size:"sm",asChild:!0,children:_.jsx(_n,{to:"/files",onClick:()=>{const y=o.status!=="idle"?jt(o.path):"";if(y){const k=y.includes("/")&&y.slice(0,y.lastIndexOf("/"))||"/";Ct.getState().navigateTo(k)}u({status:"idle"})},children:"Open in Explorer"})}),o.status!=="idle"&&_.jsx(Ln,{variant:"ghost",size:"sm",asChild:!0,children:_.jsx(_n,{to:"/files",onClick:()=>{const y=o.status!=="idle"?jt(o.path):"";y&&Ct.getState().openInEditor(y),u({status:"idle"})},children:"Open in Editor"})}),_.jsx(tl,{children:"Close"})]})]}),_.jsxs("div",{className:"p-4 overflow-auto max-h-[calc(88vh-72px)]",children:[o.status==="loading"&&_.jsx("p",{className:"text-sm text-primary-600",children:"Loading preview…"}),o.status==="error"&&_.jsx("p",{className:"text-sm text-red-600",children:o.message}),o.status==="success"&&_.jsx(Jt,{content:o.content,language:o.language,className:"w-full"})]})]})})]})}const Ff=he.memo(Lf);Ff.displayName="Markdown";export{Ff as M};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/memory-screen-GBzowsnE.js","assets/main-_1IghVZn.js","assets/useQuery-BdjM5kzn.js","assets/useMutation-TzgejsE_.js","assets/button-BcUmP7JL.js","assets/markdown-CqIcraPO.js","assets/index-BTtT4Vbb.js","assets/react-BRYbnjMp.js","assets/use-file-explorer-state-eXs92yKN.js","assets/useOnFirstRender-S4-xcV93.js","assets/useBaseUiId-DN9cOflS.js","assets/event-BxzjTPjG.js","assets/visuallyHidden-COI6QeQH.js","assets/composite--BBbKdxm.js","assets/index-T4TOjvD0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as e,r,_ as s}from"./main-_1IghVZn.js";const n=r.lazy(()=>s(()=>import("./memory-screen-GBzowsnE.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.MemoryScreen})));function a(){return e.jsx(r.Suspense,{fallback:e.jsx("div",{className:"flex h-screen items-center justify-center text-primary-500 text-sm",children:"Loading…"}),children:e.jsx(n,{})})}export{a as component};
|