@elmethis/core 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/code/ElmCodeBlock.vue2.mjs +5 -5
  3. package/dist/components/code/ElmMermaid.stories.d.ts +7 -0
  4. package/dist/components/code/ElmMermaid.vue.d.ts +7 -0
  5. package/dist/components/code/ElmMermaid.vue.mjs +10 -0
  6. package/dist/components/code/ElmMermaid.vue2.mjs +59 -0
  7. package/dist/components/code/ElmMermaid.vue3.mjs +26 -0
  8. package/dist/components/containments/ElmConfirmModal.vue2.mjs +2 -2
  9. package/dist/components/containments/ElmDesktopWindow.vue2.mjs +1 -1
  10. package/dist/components/containments/ElmModal.vue2.mjs +2 -2
  11. package/dist/components/containments/ElmParallax.vue2.mjs +2 -2
  12. package/dist/components/containments/ElmSimpleTooltip.vue2.mjs +3 -3
  13. package/dist/components/containments/ElmSnackbar.vue2.mjs +2 -2
  14. package/dist/components/containments/ElmSnackbarContainer.vue2.mjs +1 -1
  15. package/dist/components/containments/ElmToggle.vue2.mjs +3 -3
  16. package/dist/components/data/ElmMultiProgress.vue2.mjs +2 -2
  17. package/dist/components/data/ElmProgress.vue2.mjs +8 -8
  18. package/dist/components/data/ElmStatusMessage.vue2.mjs +7 -7
  19. package/dist/components/fallback/ElmSpinner.vue2.mjs +6 -6
  20. package/dist/components/fallback/ElmUnsupportedBlock.vue2.mjs +2 -2
  21. package/dist/components/form/ElmButton.vue2.mjs +10 -10
  22. package/dist/components/form/ElmCheckbox.vue2.mjs +1 -1
  23. package/dist/components/form/ElmSelect.vue2.mjs +3 -3
  24. package/dist/components/form/ElmSwitch.vue2.mjs +5 -5
  25. package/dist/components/form/ElmTextField.vue2.mjs +15 -15
  26. package/dist/components/form/ElmValidation.vue2.mjs +5 -5
  27. package/dist/components/icon/ElmArrowIcon.vue2.mjs +5 -5
  28. package/dist/components/icon/ElmBookmarkIcon.vue2.mjs +5 -5
  29. package/dist/components/icon/ElmCubeIcon.vue2.mjs +2 -2
  30. package/dist/components/icon/ElmDotLoadingIcon.vue2.mjs +2 -2
  31. package/dist/components/icon/ElmInlineIcon.vue2.mjs +1 -1
  32. package/dist/components/icon/ElmLanguageIcon.vue2.mjs +2 -2
  33. package/dist/components/icon/ElmLoginIcon.vue2.mjs +4 -4
  34. package/dist/components/icon/ElmMdiIcon.vue2.mjs +5 -5
  35. package/dist/components/icon/ElmSquareLoadingIcon.vue2.mjs +4 -4
  36. package/dist/components/icon/ElmToggleTheme.vue2.mjs +4 -4
  37. package/dist/components/icon/languages/Bash.vue2.mjs +2 -2
  38. package/dist/components/icon/languages/C.vue2.mjs +2 -2
  39. package/dist/components/icon/languages/Cplusplus.vue2.mjs +2 -2
  40. package/dist/components/icon/languages/Csharp.vue2.mjs +2 -2
  41. package/dist/components/icon/languages/Css.vue2.mjs +2 -2
  42. package/dist/components/icon/languages/Go.vue2.mjs +2 -2
  43. package/dist/components/icon/languages/Html.vue2.mjs +2 -2
  44. package/dist/components/icon/languages/Java.vue2.mjs +2 -2
  45. package/dist/components/icon/languages/Javascript.vue2.mjs +2 -2
  46. package/dist/components/icon/languages/Json.vue2.mjs +2 -2
  47. package/dist/components/icon/languages/Kotlin.vue2.mjs +2 -2
  48. package/dist/components/icon/languages/Lua.vue2.mjs +2 -2
  49. package/dist/components/icon/languages/Npm.vue2.mjs +2 -2
  50. package/dist/components/icon/languages/Python.vue2.mjs +2 -2
  51. package/dist/components/icon/languages/Rust.vue2.mjs +2 -2
  52. package/dist/components/icon/languages/Sql.vue2.mjs +2 -2
  53. package/dist/components/icon/languages/Terraform.vue2.mjs +2 -2
  54. package/dist/components/icon/languages/Typescript copy.vue2.mjs +2 -2
  55. package/dist/components/icon/languages/Typescript.vue2.mjs +2 -2
  56. package/dist/components/media/ElmFile.vue2.mjs +6 -6
  57. package/dist/components/media/ElmImage.vue2.mjs +11 -11
  58. package/dist/components/navigation/ElmBookmark.vue2.mjs +16 -16
  59. package/dist/components/navigation/ElmBreadcrumb.vue2.mjs +3 -3
  60. package/dist/components/navigation/ElmPagetop.vue2.mjs +2 -2
  61. package/dist/components/navigation/ElmTableOfContents.vue2.mjs +1 -1
  62. package/dist/components/others/ElmColorSample.vue2.mjs +2 -2
  63. package/dist/components/others/ElmColorTable.vue2.mjs +1 -1
  64. package/dist/components/others/ElmJsonComponentRenderer.vue.d.ts +1 -1
  65. package/dist/components/others/ElmJsonComponentRenderer.vue2.mjs +25 -10
  66. package/dist/components/others/ElmMarkdown.vue.d.ts +1 -1
  67. package/dist/components/others/ElmMarkdown.vue.mjs +12 -7
  68. package/dist/components/table/ElmTable.vue2.mjs +3 -3
  69. package/dist/components/table/ElmTableCell.vue2.mjs +4 -4
  70. package/dist/components/typography/ElmBlockQuote.vue2.mjs +4 -4
  71. package/dist/components/typography/ElmCallout.vue2.mjs +6 -6
  72. package/dist/components/typography/ElmDivider.vue2.mjs +1 -1
  73. package/dist/components/typography/ElmFragmentIdentifier.vue2.mjs +1 -1
  74. package/dist/components/typography/ElmHeading.vue2.mjs +6 -6
  75. package/dist/components/typography/ElmInlineText.vue2.mjs +9 -9
  76. package/dist/components/typography/ElmList.vue.mjs +2 -2
  77. package/dist/components/typography/ElmTypingAnimation.vue2.mjs +1 -1
  78. package/dist/node_modules/.pnpm/{marked@16.3.0 → marked@16.4.0}/node_modules/marked/lib/marked.esm.mjs +193 -183
  79. package/package.json +12 -11
@@ -1,39 +1,39 @@
1
1
  function L() {
2
2
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
3
3
  }
4
- var O = L();
5
- function G(l3) {
6
- O = l3;
4
+ var T = L();
5
+ function G(u3) {
6
+ T = u3;
7
7
  }
8
- var E = { exec: () => null };
9
- function h(l3, e = "") {
10
- let t = typeof l3 == "string" ? l3 : l3.source, n = { replace: (r, i) => {
8
+ var I = { exec: () => null };
9
+ function d(u3, e = "") {
10
+ let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
11
11
  let s = typeof i == "string" ? i : i.source;
12
12
  return s = s.replace(m.caret, "$1"), t = t.replace(r, s), n;
13
13
  }, getRegex: () => new RegExp(t, e) };
14
14
  return n;
15
15
  }
16
- var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}#`), htmlBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, xe = /^(?:[ \t]*(?:\n|$))+/, be = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Re = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, j = /(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = h(se).replace(/bull/g, j).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(), Te = h(se).replace(/bull/g, j).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(), F = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, we = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ye = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Pe = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, j).getRegex(), v = "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", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Se = h("^ {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", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), $e = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), K = { blockquote: $e, code: be, def: ye, fences: Re, heading: Oe, hr: C, html: Se, lheading: ie, list: Pe, newline: xe, paragraph: oe, table: E, text: we }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = { ...K, lheading: Te, table: re, paragraph: h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Le = { ...K, html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).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: E, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(F).replace("hr", C).replace("heading", ` *#{1,6} *[^
17
- ]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Me = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, le = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ue = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Ie = /(?:[^\s\p{P}\p{S}]|~)/u, Be = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, qe = h(pe, "u").replace(/punct/g, D).getRegex(), ve = h(pe, "u").replace(/punct/g, ue).getRegex(), ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = h(ce, "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), He = h(ce, "gu").replace(/notPunctSpace/g, Ie).replace(/punctSpace/g, Ce).replace(/punct/g, ue).getRegex(), Ze = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Ne = h(/^<(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(), je = h(U).replace("(?:-->|$)", "-->").getRegex(), Fe = h("^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", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/, Qe = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), he = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), de = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ue = h("reflink|nolink(?!\\()", "g").replace("reflink", he).replace("nolink", de).getRegex(), X = { _backpedal: E, anyPunctuation: Ge, autolink: Ne, blockSkip: Be, br: ae, code: ze, del: E, emStrongLDelim: qe, emStrongRDelimAst: De, emStrongRDelimUnd: Ze, escape: Me, link: Qe, nolink: de, punctuation: Ee, reflink: he, reflinkSearch: Ue, tag: Fe, text: Ae, url: E }, Ke = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: He, emStrongLDelim: ve, url: h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, We = { ...N, br: h(ae).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: K, gfm: _e, pedantic: Le }, M = { normal: X, gfm: N, breaks: We, pedantic: Ke };
18
- var Xe = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ke = (l3) => Xe[l3];
19
- function w(l3, e) {
16
+ var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, be = /^(?:[ \t]*(?:\n|$))+/, Re = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, E = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, F = /(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, oe = d(ie).replace(/bull/g, F).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(), we = d(ie).replace(/bull/g, F).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ye = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pe = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Se = d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, F).getRegex(), v = "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", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, $e = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = d(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), K = { blockquote: _e, code: Re, def: Pe, fences: Te, heading: Oe, hr: E, html: $e, lheading: oe, list: Se, newline: be, paragraph: ae, table: I, text: ye }, re = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Le = { ...K, lheading: we, table: re, paragraph: d(j).replace("hr", E).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Me = { ...K, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).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: I, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(j).replace("hr", E).replace("heading", ` *#{1,6} *[^
17
+ ]`).replace("lheading", oe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, ze = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ae = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, le = /^( {2,}|\\)\n(?!\s*$)/, Ie = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ue = /[^\s\p{P}\p{S}]/u, Ee = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Be = /(?:[^\s\p{P}\p{S}]|~)/u, qe = /\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, ce = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ve = d(ce, "u").replace(/punct/g, D).getRegex(), De = d(ce, "u").replace(/punct/g, pe).getRegex(), he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", He = d(he, "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ze = d(he, "gu").replace(/notPunctSpace/g, Be).replace(/punctSpace/g, Ce).replace(/punct/g, pe).getRegex(), Ge = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ue).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ne = d(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Fe = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), je = d(U).replace("(?:-->|$)", "-->").getRegex(), Qe = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ue = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), de = d(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), ke = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ke = d("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex(), se = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: I, anyPunctuation: Ne, autolink: Fe, blockSkip: qe, br: le, code: Ae, del: I, emStrongLDelim: ve, emStrongRDelimAst: He, emStrongRDelimUnd: Ge, escape: ze, link: Ue, nolink: ke, punctuation: Ee, reflink: de, reflinkSearch: Ke, tag: Qe, text: Ie, url: I }, We = { ...X, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: Ze, emStrongLDelim: De, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", se).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: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", se).getRegex() }, Xe = { ...N, br: d(le).replace("{2,}", "*").getRegex(), text: d(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, C = { normal: K, gfm: Le, pedantic: Me }, M = { normal: X, gfm: N, breaks: Xe, pedantic: We };
18
+ var Je = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (u3) => Je[u3];
19
+ function w(u3, e) {
20
20
  if (e) {
21
- if (m.escapeTest.test(l3)) return l3.replace(m.escapeReplace, ke);
22
- } else if (m.escapeTestNoEncode.test(l3)) return l3.replace(m.escapeReplaceNoEncode, ke);
23
- return l3;
21
+ if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ge);
22
+ } else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ge);
23
+ return u3;
24
24
  }
25
- function J(l3) {
25
+ function J(u3) {
26
26
  try {
27
- l3 = encodeURI(l3).replace(m.percentDecode, "%");
27
+ u3 = encodeURI(u3).replace(m.percentDecode, "%");
28
28
  } catch {
29
29
  return null;
30
30
  }
31
- return l3;
31
+ return u3;
32
32
  }
33
- function V(l3, e) {
34
- let t = l3.replace(m.findPipe, (i, s, o) => {
35
- let a = false, u = s;
36
- for (; --u >= 0 && o[u] === "\\"; ) a = !a;
33
+ function V(u3, e) {
34
+ let t = u3.replace(m.findPipe, (i, s, o) => {
35
+ let a = false, l = s;
36
+ for (; --l >= 0 && o[l] === "\\"; ) a = !a;
37
37
  return a ? "|" : " |";
38
38
  }), n = t.split(m.splitPipe), r = 0;
39
39
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
@@ -41,33 +41,33 @@ function V(l3, e) {
41
41
  for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
42
42
  return n;
43
43
  }
44
- function z(l3, e, t) {
45
- let n = l3.length;
44
+ function z(u3, e, t) {
45
+ let n = u3.length;
46
46
  if (n === 0) return "";
47
47
  let r = 0;
48
48
  for (; r < n; ) {
49
- let i = l3.charAt(n - r - 1);
49
+ let i = u3.charAt(n - r - 1);
50
50
  if (i === e && true) r++;
51
51
  else break;
52
52
  }
53
- return l3.slice(0, n - r);
53
+ return u3.slice(0, n - r);
54
54
  }
55
- function ge(l3, e) {
56
- if (l3.indexOf(e[1]) === -1) return -1;
55
+ function fe(u3, e) {
56
+ if (u3.indexOf(e[1]) === -1) return -1;
57
57
  let t = 0;
58
- for (let n = 0; n < l3.length; n++) if (l3[n] === "\\") n++;
59
- else if (l3[n] === e[0]) t++;
60
- else if (l3[n] === e[1] && (t--, t < 0)) return n;
58
+ for (let n = 0; n < u3.length; n++) if (u3[n] === "\\") n++;
59
+ else if (u3[n] === e[0]) t++;
60
+ else if (u3[n] === e[1] && (t--, t < 0)) return n;
61
61
  return t > 0 ? -2 : -1;
62
62
  }
63
- function fe(l3, e, t, n, r) {
64
- let i = e.href, s = e.title || null, o = l3[1].replace(r.other.outputLinkReplace, "$1");
63
+ function me(u3, e, t, n, r) {
64
+ let i = e.href, s = e.title || null, o = u3[1].replace(r.other.outputLinkReplace, "$1");
65
65
  n.state.inLink = true;
66
- let a = { type: l3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
66
+ let a = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: o, tokens: n.inlineTokens(o) };
67
67
  return n.state.inLink = false, a;
68
68
  }
69
- function Je(l3, e, t) {
70
- let n = l3.match(t.other.indentCodeCompensation);
69
+ function Ve(u3, e, t) {
70
+ let n = u3.match(t.other.indentCodeCompensation);
71
71
  if (n === null) return e;
72
72
  let r = n[1];
73
73
  return e.split(`
@@ -84,7 +84,7 @@ var y = class {
84
84
  rules;
85
85
  lexer;
86
86
  constructor(e) {
87
- this.options = e || O;
87
+ this.options = e || T;
88
88
  }
89
89
  space(e) {
90
90
  let t = this.rules.block.newline.exec(e);
@@ -101,7 +101,7 @@ var y = class {
101
101
  fences(e) {
102
102
  let t = this.rules.block.fences.exec(e);
103
103
  if (t) {
104
- let n = t[0], r = Je(n, t[3] || "", this.rules);
104
+ let n = t[0], r = Ve(n, t[3] || "", this.rules);
105
105
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
106
106
  }
107
107
  }
@@ -128,32 +128,32 @@ var y = class {
128
128
  `).split(`
129
129
  `), r = "", i = "", s = [];
130
130
  for (; n.length > 0; ) {
131
- let o = false, a = [], u;
132
- for (u = 0; u < n.length; u++) if (this.rules.other.blockquoteStart.test(n[u])) a.push(n[u]), o = true;
133
- else if (!o) a.push(n[u]);
131
+ let o = false, a = [], l;
132
+ for (l = 0; l < n.length; l++) if (this.rules.other.blockquoteStart.test(n[l])) a.push(n[l]), o = true;
133
+ else if (!o) a.push(n[l]);
134
134
  else break;
135
- n = n.slice(u);
136
- let p = a.join(`
137
- `), c = p.replace(this.rules.other.blockquoteSetextReplace, `
135
+ n = n.slice(l);
136
+ let c = a.join(`
137
+ `), p = c.replace(this.rules.other.blockquoteSetextReplace, `
138
138
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
139
139
  r = r ? `${r}
140
- ${p}` : p, i = i ? `${i}
141
- ${c}` : c;
142
- let f = this.lexer.state.top;
143
- if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = f, n.length === 0) break;
144
- let k = s.at(-1);
145
- if (k?.type === "code") break;
146
- if (k?.type === "blockquote") {
147
- let x = k, g = x.raw + `
140
+ ${c}` : c, i = i ? `${i}
141
+ ${p}` : p;
142
+ let g = this.lexer.state.top;
143
+ if (this.lexer.state.top = true, this.lexer.blockTokens(p, s, true), this.lexer.state.top = g, n.length === 0) break;
144
+ let h = s.at(-1);
145
+ if (h?.type === "code") break;
146
+ if (h?.type === "blockquote") {
147
+ let R = h, f = R.raw + `
148
148
  ` + n.join(`
149
- `), T = this.blockquote(g);
150
- s[s.length - 1] = T, r = r.substring(0, r.length - x.raw.length) + T.raw, i = i.substring(0, i.length - x.text.length) + T.text;
149
+ `), O = this.blockquote(f);
150
+ s[s.length - 1] = O, r = r.substring(0, r.length - R.raw.length) + O.raw, i = i.substring(0, i.length - R.text.length) + O.text;
151
151
  break;
152
- } else if (k?.type === "list") {
153
- let x = k, g = x.raw + `
152
+ } else if (h?.type === "list") {
153
+ let R = h, f = R.raw + `
154
154
  ` + n.join(`
155
- `), T = this.list(g);
156
- s[s.length - 1] = T, r = r.substring(0, r.length - k.raw.length) + T.raw, i = i.substring(0, i.length - x.raw.length) + T.raw, n = g.substring(s.at(-1).raw.length).split(`
155
+ `), O = this.list(f);
156
+ s[s.length - 1] = O, r = r.substring(0, r.length - h.raw.length) + O.raw, i = i.substring(0, i.length - R.raw.length) + O.raw, n = f.substring(s.at(-1).raw.length).split(`
157
157
  `);
158
158
  continue;
159
159
  }
@@ -168,43 +168,43 @@ ${c}` : c;
168
168
  n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
169
169
  let s = this.rules.other.listItemRegex(n), o = false;
170
170
  for (; e; ) {
171
- let u = false, p = "", c = "";
171
+ let l = false, c = "", p = "";
172
172
  if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
173
- p = t[0], e = e.substring(p.length);
174
- let f = t[2].split(`
175
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k = e.split(`
176
- `, 1)[0], x = !f.trim(), g = 0;
177
- if (this.options.pedantic ? (g = 2, c = f.trimStart()) : x ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c = f.slice(g), g += t[1].length), x && this.rules.other.blankLine.test(k) && (p += k + `
178
- `, e = e.substring(k.length + 1), u = true), !u) {
179
- let H = this.rules.other.nextBulletRegex(g), ee = this.rules.other.hrRegex(g), te = this.rules.other.fencesBeginRegex(g), ne = this.rules.other.headingBeginRegex(g), me = this.rules.other.htmlBeginRegex(g);
173
+ c = t[0], e = e.substring(c.length);
174
+ let g = t[2].split(`
175
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), h = e.split(`
176
+ `, 1)[0], R = !g.trim(), f = 0;
177
+ if (this.options.pedantic ? (f = 2, p = g.trimStart()) : R ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, p = g.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (c += h + `
178
+ `, e = e.substring(h.length + 1), l = true), !l) {
179
+ let H = this.rules.other.nextBulletRegex(f), ee = this.rules.other.hrRegex(f), te = this.rules.other.fencesBeginRegex(f), ne = this.rules.other.headingBeginRegex(f), xe = this.rules.other.htmlBeginRegex(f);
180
180
  for (; e; ) {
181
181
  let Z = e.split(`
182
182
  `, 1)[0], A;
183
- if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), A = k) : A = k.replace(this.rules.other.tabCharGlobal, " "), te.test(k) || ne.test(k) || me.test(k) || H.test(k) || ee.test(k)) break;
184
- if (A.search(this.rules.other.nonSpaceChar) >= g || !k.trim()) c += `
185
- ` + A.slice(g);
183
+ if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), te.test(h) || ne.test(h) || xe.test(h) || H.test(h) || ee.test(h)) break;
184
+ if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) p += `
185
+ ` + A.slice(f);
186
186
  else {
187
- if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(f) || ne.test(f) || ee.test(f)) break;
188
- c += `
189
- ` + k;
187
+ if (R || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || te.test(g) || ne.test(g) || ee.test(g)) break;
188
+ p += `
189
+ ` + h;
190
190
  }
191
- !x && !k.trim() && (x = true), p += Z + `
192
- `, e = e.substring(Z.length + 1), f = A.slice(g);
191
+ !R && !h.trim() && (R = true), c += Z + `
192
+ `, e = e.substring(Z.length + 1), g = A.slice(f);
193
193
  }
194
194
  }
195
- i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true));
196
- let T = null, Y;
197
- this.options.gfm && (T = this.rules.other.listIsTask.exec(c), T && (Y = T[0] !== "[ ] ", c = c.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: p, task: !!T, checked: Y, loose: false, text: c, tokens: [] }), i.raw += p;
195
+ i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(c) && (o = true));
196
+ let O = null, Y;
197
+ this.options.gfm && (O = this.rules.other.listIsTask.exec(p), O && (Y = O[0] !== "[ ] ", p = p.replace(this.rules.other.listReplaceTask, ""))), i.items.push({ type: "list_item", raw: c, task: !!O, checked: Y, loose: false, text: p, tokens: [] }), i.raw += c;
198
198
  }
199
199
  let a = i.items.at(-1);
200
200
  if (a) a.raw = a.raw.trimEnd(), a.text = a.text.trimEnd();
201
201
  else return;
202
202
  i.raw = i.raw.trimEnd();
203
- for (let u = 0; u < i.items.length; u++) if (this.lexer.state.top = false, i.items[u].tokens = this.lexer.blockTokens(i.items[u].text, []), !i.loose) {
204
- let p = i.items[u].tokens.filter((f) => f.type === "space"), c = p.length > 0 && p.some((f) => this.rules.other.anyLine.test(f.raw));
205
- i.loose = c;
203
+ for (let l = 0; l < i.items.length; l++) if (this.lexer.state.top = false, i.items[l].tokens = this.lexer.blockTokens(i.items[l].text, []), !i.loose) {
204
+ let c = i.items[l].tokens.filter((g) => g.type === "space"), p = c.length > 0 && c.some((g) => this.rules.other.anyLine.test(g.raw));
205
+ i.loose = p;
206
206
  }
207
- if (i.loose) for (let u = 0; u < i.items.length; u++) i.items[u].loose = true;
207
+ if (i.loose) for (let l = 0; l < i.items.length; l++) i.items[l].loose = true;
208
208
  return i;
209
209
  }
210
210
  }
@@ -227,7 +227,7 @@ ${c}` : c;
227
227
  if (n.length === r.length) {
228
228
  for (let o of r) this.rules.other.tableAlignRight.test(o) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? s.align.push("left") : s.align.push(null);
229
229
  for (let o = 0; o < n.length; o++) s.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: true, align: s.align[o] });
230
- for (let o of i) s.rows.push(V(o, s.header.length).map((a, u) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[u] })));
230
+ for (let o of i) s.rows.push(V(o, s.header.length).map((a, l) => ({ text: a, tokens: this.lexer.inline(a), header: false, align: s.align[l] })));
231
231
  return s;
232
232
  }
233
233
  }
@@ -264,7 +264,7 @@ ${c}` : c;
264
264
  let s = z(n.slice(0, -1), "\\");
265
265
  if ((n.length - s.length) % 2 === 0) return;
266
266
  } else {
267
- let s = ge(t[2], "()");
267
+ let s = fe(t[2], "()");
268
268
  if (s === -2) return;
269
269
  if (s > -1) {
270
270
  let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
@@ -276,7 +276,7 @@ ${c}` : c;
276
276
  let s = this.rules.other.pedanticHrefTitle.exec(r);
277
277
  s && (r = s[1], i = s[3]);
278
278
  } else i = t[3] ? t[3].slice(1, -1) : "";
279
- 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)), fe(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);
279
+ 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)), me(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);
280
280
  }
281
281
  }
282
282
  reflink(e, t) {
@@ -287,32 +287,32 @@ ${c}` : c;
287
287
  let s = n[0].charAt(0);
288
288
  return { type: "text", raw: s, text: s };
289
289
  }
290
- return fe(n, i, n[0], this.lexer, this.rules);
290
+ return me(n, i, n[0], this.lexer, this.rules);
291
291
  }
292
292
  }
293
293
  emStrong(e, t, n = "") {
294
294
  let r = this.rules.inline.emStrongLDelim.exec(e);
295
295
  if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
296
296
  if (!(r[1] || r[2] || "") || !n || this.rules.inline.punctuation.exec(n)) {
297
- let s = [...r[0]].length - 1, o, a, u = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
298
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) != null; ) {
297
+ let s = [...r[0]].length - 1, o, a, l = s, c = 0, p = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
298
+ for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) != null; ) {
299
299
  if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) continue;
300
300
  if (a = [...o].length, r[3] || r[4]) {
301
- u += a;
301
+ l += a;
302
302
  continue;
303
303
  } else if ((r[5] || r[6]) && s % 3 && !((s + a) % 3)) {
304
- p += a;
304
+ c += a;
305
305
  continue;
306
306
  }
307
- if (u -= a, u > 0) continue;
308
- a = Math.min(a, a + u + p);
309
- let f = [...r[0]][0].length, k = e.slice(0, s + r.index + f + a);
307
+ if (l -= a, l > 0) continue;
308
+ a = Math.min(a, a + l + c);
309
+ let g = [...r[0]][0].length, h = e.slice(0, s + r.index + g + a);
310
310
  if (Math.min(s, a) % 2) {
311
- let g = k.slice(1, -1);
312
- return { type: "em", raw: k, text: g, tokens: this.lexer.inlineTokens(g) };
311
+ let f = h.slice(1, -1);
312
+ return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
313
313
  }
314
- let x = k.slice(2, -2);
315
- return { type: "strong", raw: k, text: x, tokens: this.lexer.inlineTokens(x) };
314
+ let R = h.slice(2, -2);
315
+ return { type: "strong", raw: h, text: R, tokens: this.lexer.inlineTokens(R) };
316
316
  }
317
317
  }
318
318
  }
@@ -361,25 +361,25 @@ ${c}` : c;
361
361
  }
362
362
  }
363
363
  };
364
- var b = class l {
364
+ var x = class u {
365
365
  tokens;
366
366
  options;
367
367
  state;
368
368
  tokenizer;
369
369
  inlineQueue;
370
370
  constructor(e) {
371
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || O, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
372
- let t = { other: m, block: I.normal, inline: M.normal };
373
- this.options.pedantic ? (t.block = I.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = I.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
371
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
372
+ let t = { other: m, block: C.normal, inline: M.normal };
373
+ this.options.pedantic ? (t.block = C.pedantic, t.inline = M.pedantic) : this.options.gfm && (t.block = C.gfm, this.options.breaks ? t.inline = M.breaks : t.inline = M.gfm), this.tokenizer.rules = t;
374
374
  }
375
375
  static get rules() {
376
- return { block: I, inline: M };
376
+ return { block: C, inline: M };
377
377
  }
378
378
  static lex(e, t) {
379
- return new l(t).lex(e);
379
+ return new u(t).lex(e);
380
380
  }
381
381
  static lexInline(e, t) {
382
- return new l(t).inlineTokens(e);
382
+ return new u(t).inlineTokens(e);
383
383
  }
384
384
  lex(e) {
385
385
  e = e.replace(m.carriageReturn, `
@@ -454,8 +454,8 @@ var b = class l {
454
454
  let i = e;
455
455
  if (this.options.extensions?.startBlock) {
456
456
  let s = 1 / 0, o = e.slice(1), a;
457
- this.options.extensions.startBlock.forEach((u) => {
458
- a = u.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
457
+ this.options.extensions.startBlock.forEach((l) => {
458
+ a = l.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (s = Math.min(s, a));
459
459
  }), s < 1 / 0 && s >= 0 && (i = e.substring(0, s + 1));
460
460
  }
461
461
  if (this.state.top && (r = this.tokenizer.paragraph(i))) {
@@ -501,7 +501,7 @@ var b = class l {
501
501
  for (; e; ) {
502
502
  i || (s = ""), i = false;
503
503
  let o;
504
- if (this.options.extensions?.inline?.some((u) => (o = u.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
504
+ if (this.options.extensions?.inline?.some((l) => (o = l.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), true) : false)) continue;
505
505
  if (o = this.tokenizer.escape(e)) {
506
506
  e = e.substring(o.raw.length), t.push(o);
507
507
  continue;
@@ -516,8 +516,8 @@ var b = class l {
516
516
  }
517
517
  if (o = this.tokenizer.reflink(e, this.tokens.links)) {
518
518
  e = e.substring(o.raw.length);
519
- let u = t.at(-1);
520
- o.type === "text" && u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
519
+ let l = t.at(-1);
520
+ o.type === "text" && l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
521
521
  continue;
522
522
  }
523
523
  if (o = this.tokenizer.emStrong(e, n, s)) {
@@ -546,23 +546,23 @@ var b = class l {
546
546
  }
547
547
  let a = e;
548
548
  if (this.options.extensions?.startInline) {
549
- let u = 1 / 0, p = e.slice(1), c;
550
- this.options.extensions.startInline.forEach((f) => {
551
- c = f.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (u = Math.min(u, c));
552
- }), u < 1 / 0 && u >= 0 && (a = e.substring(0, u + 1));
549
+ let l = 1 / 0, c = e.slice(1), p;
550
+ this.options.extensions.startInline.forEach((g) => {
551
+ p = g.call({ lexer: this }, c), typeof p == "number" && p >= 0 && (l = Math.min(l, p));
552
+ }), l < 1 / 0 && l >= 0 && (a = e.substring(0, l + 1));
553
553
  }
554
554
  if (o = this.tokenizer.inlineText(a)) {
555
555
  e = e.substring(o.raw.length), o.raw.slice(-1) !== "_" && (s = o.raw.slice(-1)), i = true;
556
- let u = t.at(-1);
557
- u?.type === "text" ? (u.raw += o.raw, u.text += o.text) : t.push(o);
556
+ let l = t.at(-1);
557
+ l?.type === "text" ? (l.raw += o.raw, l.text += o.text) : t.push(o);
558
558
  continue;
559
559
  }
560
560
  if (e) {
561
- let u = "Infinite loop on byte: " + e.charCodeAt(0);
561
+ let l = "Infinite loop on byte: " + e.charCodeAt(0);
562
562
  if (this.options.silent) {
563
- console.error(u);
563
+ console.error(l);
564
564
  break;
565
- } else throw new Error(u);
565
+ } else throw new Error(l);
566
566
  }
567
567
  }
568
568
  return t;
@@ -572,7 +572,7 @@ var P = class {
572
572
  options;
573
573
  parser;
574
574
  constructor(e) {
575
- this.options = e || O;
575
+ this.options = e || T;
576
576
  }
577
577
  space(e) {
578
578
  return "";
@@ -720,18 +720,18 @@ var $ = class {
720
720
  return "";
721
721
  }
722
722
  };
723
- var R = class l2 {
723
+ var b = class u2 {
724
724
  options;
725
725
  renderer;
726
726
  textRenderer;
727
727
  constructor(e) {
728
- this.options = e || O, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
728
+ this.options = e || T, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
729
729
  }
730
730
  static parse(e, t) {
731
- return new l2(t).parse(e);
731
+ return new u2(t).parse(e);
732
732
  }
733
733
  static parseInline(e, t) {
734
- return new l2(t).parseInline(e);
734
+ return new u2(t).parseInline(e);
735
735
  }
736
736
  parse(e, t = true) {
737
737
  let n = "";
@@ -869,7 +869,7 @@ var S = class {
869
869
  options;
870
870
  block;
871
871
  constructor(e) {
872
- this.options = e || O;
872
+ this.options = e || T;
873
873
  }
874
874
  static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
875
875
  static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
@@ -886,10 +886,10 @@ var S = class {
886
886
  return e;
887
887
  }
888
888
  provideLexer() {
889
- return this.block ? b.lex : b.lexInline;
889
+ return this.block ? x.lex : x.lexInline;
890
890
  }
891
891
  provideParser() {
892
- return this.block ? R.parse : R.parseInline;
892
+ return this.block ? b.parse : b.parseInline;
893
893
  }
894
894
  };
895
895
  var B = class {
@@ -897,10 +897,10 @@ var B = class {
897
897
  options = this.setOptions;
898
898
  parse = this.parseMarkdown(true);
899
899
  parseInline = this.parseMarkdown(false);
900
- Parser = R;
900
+ Parser = b;
901
901
  Renderer = P;
902
902
  TextRenderer = $;
903
- Lexer = b;
903
+ Lexer = x;
904
904
  Tokenizer = y;
905
905
  Hooks = S;
906
906
  constructor(...e) {
@@ -954,10 +954,10 @@ var B = class {
954
954
  for (let s in n.renderer) {
955
955
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
956
956
  if (["options", "parser"].includes(s)) continue;
957
- let o = s, a = n.renderer[o], u = i[o];
958
- i[o] = (...p) => {
959
- let c = a.apply(i, p);
960
- return c === false && (c = u.apply(i, p)), c || "";
957
+ let o = s, a = n.renderer[o], l = i[o];
958
+ i[o] = (...c) => {
959
+ let p = a.apply(i, c);
960
+ return p === false && (p = l.apply(i, c)), p || "";
961
961
  };
962
962
  }
963
963
  r.renderer = i;
@@ -967,10 +967,10 @@ var B = class {
967
967
  for (let s in n.tokenizer) {
968
968
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
969
969
  if (["options", "rules", "lexer"].includes(s)) continue;
970
- let o = s, a = n.tokenizer[o], u = i[o];
971
- i[o] = (...p) => {
972
- let c = a.apply(i, p);
973
- return c === false && (c = u.apply(i, p)), c;
970
+ let o = s, a = n.tokenizer[o], l = i[o];
971
+ i[o] = (...c) => {
972
+ let p = a.apply(i, c);
973
+ return p === false && (p = l.apply(i, c)), p;
974
974
  };
975
975
  }
976
976
  r.tokenizer = i;
@@ -980,14 +980,21 @@ var B = class {
980
980
  for (let s in n.hooks) {
981
981
  if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
982
982
  if (["options", "block"].includes(s)) continue;
983
- let o = s, a = n.hooks[o], u = i[o];
984
- S.passThroughHooks.has(s) ? i[o] = (p) => {
985
- if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
986
- let c = a.call(i, p);
987
- return u.call(i, c);
988
- } : i[o] = (...p) => {
989
- let c = a.apply(i, p);
990
- return c === false && (c = u.apply(i, p)), c;
983
+ let o = s, a = n.hooks[o], l = i[o];
984
+ S.passThroughHooks.has(s) ? i[o] = (c) => {
985
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return (async () => {
986
+ let g = await a.call(i, c);
987
+ return l.call(i, g);
988
+ })();
989
+ let p = a.call(i, c);
990
+ return l.call(i, p);
991
+ } : i[o] = (...c) => {
992
+ if (this.defaults.async) return (async () => {
993
+ let g = await a.apply(i, c);
994
+ return g === false && (g = await l.apply(i, c)), g;
995
+ })();
996
+ let p = a.apply(i, c);
997
+ return p === false && (p = l.apply(i, c)), p;
991
998
  };
992
999
  }
993
1000
  r.hooks = i;
@@ -1006,10 +1013,10 @@ var B = class {
1006
1013
  return this.defaults = { ...this.defaults, ...e }, this;
1007
1014
  }
1008
1015
  lexer(e, t) {
1009
- return b.lex(e, t ?? this.defaults);
1016
+ return x.lex(e, t ?? this.defaults);
1010
1017
  }
1011
1018
  parser(e, t) {
1012
- return R.parse(e, t ?? this.defaults);
1019
+ return b.parse(e, t ?? this.defaults);
1013
1020
  }
1014
1021
  parseMarkdown(e) {
1015
1022
  return (n, r) => {
@@ -1017,17 +1024,20 @@ var B = class {
1017
1024
  if (this.defaults.async === true && i.async === false) return o(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."));
1018
1025
  if (typeof n > "u" || n === null) return o(new Error("marked(): input parameter is undefined or null"));
1019
1026
  if (typeof n != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
1020
- s.hooks && (s.hooks.options = s, s.hooks.block = e);
1021
- let a = s.hooks ? s.hooks.provideLexer() : e ? b.lex : b.lexInline, u = s.hooks ? s.hooks.provideParser() : e ? R.parse : R.parseInline;
1022
- if (s.async) return Promise.resolve(s.hooks ? s.hooks.preprocess(n) : n).then((p) => a(p, s)).then((p) => s.hooks ? s.hooks.processAllTokens(p) : p).then((p) => s.walkTokens ? Promise.all(this.walkTokens(p, s.walkTokens)).then(() => p) : p).then((p) => u(p, s)).then((p) => s.hooks ? s.hooks.postprocess(p) : p).catch(o);
1027
+ if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
1028
+ let a = s.hooks ? await s.hooks.preprocess(n) : n, c = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(a, s), p = s.hooks ? await s.hooks.processAllTokens(c) : c;
1029
+ s.walkTokens && await Promise.all(this.walkTokens(p, s.walkTokens));
1030
+ let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(p, s);
1031
+ return s.hooks ? await s.hooks.postprocess(h) : h;
1032
+ })().catch(o);
1023
1033
  try {
1024
1034
  s.hooks && (n = s.hooks.preprocess(n));
1025
- let p = a(n, s);
1026
- s.hooks && (p = s.hooks.processAllTokens(p)), s.walkTokens && this.walkTokens(p, s.walkTokens);
1027
- let c = u(p, s);
1028
- return s.hooks && (c = s.hooks.postprocess(c)), c;
1029
- } catch (p) {
1030
- return o(p);
1035
+ let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
1036
+ s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
1037
+ let p = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
1038
+ return s.hooks && (p = s.hooks.postprocess(p)), p;
1039
+ } catch (a) {
1040
+ return o(a);
1031
1041
  }
1032
1042
  };
1033
1043
  }
@@ -1044,46 +1054,46 @@ Please report this to https://github.com/markedjs/marked.`, e) {
1044
1054
  }
1045
1055
  };
1046
1056
  var _ = new B();
1047
- function d(l3, e) {
1048
- return _.parse(l3, e);
1057
+ function k(u3, e) {
1058
+ return _.parse(u3, e);
1049
1059
  }
1050
- d.options = d.setOptions = function(l3) {
1051
- return _.setOptions(l3), d.defaults = _.defaults, G(d.defaults), d;
1060
+ k.options = k.setOptions = function(u3) {
1061
+ return _.setOptions(u3), k.defaults = _.defaults, G(k.defaults), k;
1052
1062
  };
1053
- d.getDefaults = L;
1054
- d.defaults = O;
1055
- d.use = function(...l3) {
1056
- return _.use(...l3), d.defaults = _.defaults, G(d.defaults), d;
1063
+ k.getDefaults = L;
1064
+ k.defaults = T;
1065
+ k.use = function(...u3) {
1066
+ return _.use(...u3), k.defaults = _.defaults, G(k.defaults), k;
1057
1067
  };
1058
- d.walkTokens = function(l3, e) {
1059
- return _.walkTokens(l3, e);
1068
+ k.walkTokens = function(u3, e) {
1069
+ return _.walkTokens(u3, e);
1060
1070
  };
1061
- d.parseInline = _.parseInline;
1062
- d.Parser = R;
1063
- d.parser = R.parse;
1064
- d.Renderer = P;
1065
- d.TextRenderer = $;
1066
- d.Lexer = b;
1067
- d.lexer = b.lex;
1068
- d.Tokenizer = y;
1069
- d.Hooks = S;
1070
- d.parse = d;
1071
- d.options;
1072
- d.setOptions;
1073
- d.use;
1074
- d.walkTokens;
1075
- d.parseInline;
1076
- R.parse;
1077
- b.lex;
1071
+ k.parseInline = _.parseInline;
1072
+ k.Parser = b;
1073
+ k.parser = b.parse;
1074
+ k.Renderer = P;
1075
+ k.TextRenderer = $;
1076
+ k.Lexer = x;
1077
+ k.lexer = x.lex;
1078
+ k.Tokenizer = y;
1079
+ k.Hooks = S;
1080
+ k.parse = k;
1081
+ k.options;
1082
+ k.setOptions;
1083
+ k.use;
1084
+ k.walkTokens;
1085
+ k.parseInline;
1086
+ b.parse;
1087
+ x.lex;
1078
1088
  export {
1079
1089
  S as Hooks,
1080
- b as Lexer,
1090
+ x as Lexer,
1081
1091
  B as Marked,
1082
- R as Parser,
1092
+ b as Parser,
1083
1093
  P as Renderer,
1084
1094
  $ as TextRenderer,
1085
1095
  y as Tokenizer,
1086
- O as defaults,
1096
+ T as defaults,
1087
1097
  L as getDefaults,
1088
- d as marked
1098
+ k as marked
1089
1099
  };