china-mobile-international-custom-components 0.1.23 → 0.1.24

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 (59) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +2 -2
  2. package/es/AgentDetail.mjs +5 -5
  3. package/es/ApplicationTypeTag.mjs +3 -3
  4. package/es/AuthSection.mjs +2 -2
  5. package/es/AutoShowTooltip.mjs +1 -1
  6. package/es/AvailableRangePreview.mjs +1 -1
  7. package/es/AvailableRangeSetting.mjs +5 -5
  8. package/es/CodeView.mjs +1 -1
  9. package/es/CommonTagsList.mjs +62 -62
  10. package/es/CreateMcpForm.mjs +6 -6
  11. package/es/CustomSidebar.mjs +1 -1
  12. package/es/CustomTitle.mjs +1 -1
  13. package/es/CustomToggle.mjs +11 -11
  14. package/es/DialogContainer.mjs +5 -5
  15. package/es/DocSyncSelect.mjs +2 -2
  16. package/es/FileDisplay.mjs +1 -1
  17. package/es/FilePreview.mjs +9 -9
  18. package/es/FileUploader.mjs +2 -2
  19. package/es/ImageComponent.mjs +5 -0
  20. package/es/Logo.mjs +2 -2
  21. package/es/McpFormDialog.mjs +1 -1
  22. package/es/McpParamsSet.mjs +4 -4
  23. package/es/MdEditor.mjs +3 -3
  24. package/es/PageContainer.mjs +2 -2
  25. package/es/ParameterTable.mjs +2 -2
  26. package/es/PublishRecord.mjs +6 -6
  27. package/es/RadioGroup.mjs +5 -5
  28. package/es/SourcePublish.mjs +6 -6
  29. package/es/Table.mjs +2 -2
  30. package/es/WorkFlowDialog.mjs +3 -3
  31. package/es/WorkflowComponent.mjs +1 -1
  32. package/es/assets/ImageComponent.css +0 -0
  33. package/es/chunks/AddAgentDialog.BEDSZ4er.js +244 -0
  34. package/es/chunks/AddDialog.RuOrCghd.js +1969 -0
  35. package/es/chunks/BackBar.Ck5CV5ZM.js +629 -0
  36. package/es/chunks/CreatePluginDialog.DbQIt3Mz.js +775 -0
  37. package/es/chunks/CreateWorkflow.CIYJ3nGZ.js +268 -0
  38. package/es/chunks/ImageComponent.BgYVT3ZJ.js +74 -0
  39. package/es/chunks/ToolList.2k07ztsY.js +106 -0
  40. package/es/chunks/config.B_uTnClF.js +47 -0
  41. package/es/chunks/config.e_OOovlY.js +358 -0
  42. package/es/chunks/i18n.9cHOVn6X.js +4049 -0
  43. package/es/chunks/index.BGLAHzZm.js +398 -0
  44. package/es/chunks/index.CCNAKdQj.js +1279 -0
  45. package/es/chunks/index.CXIY0q5X.js +172 -0
  46. package/es/chunks/index.Cv9pn5nk.js +4 -0
  47. package/es/chunks/index.CyiNa6lr.js +256 -0
  48. package/es/chunks/index.JG8-HCzk.js +29609 -0
  49. package/es/chunks/layout.BAvYghmE.js +650 -0
  50. package/es/chunks/layout.Iob_aYQ7.js +26 -0
  51. package/es/chunks/view.BSjGhafy.js +824 -0
  52. package/es/index.mjs +66 -66
  53. package/lib/CommonTagsList.js +1 -1
  54. package/lib/ImageComponent.js +1 -0
  55. package/lib/assets/ImageComponent.css +0 -0
  56. package/lib/chunks/ImageComponent.CdPLM_LX.js +1 -0
  57. package/lib/chunks/index.Cbkv4rXa.js +1 -0
  58. package/lib/index.js +1 -1
  59. package/package.json +3 -3
@@ -0,0 +1,1279 @@
1
+ import { ref as Ae, resolveDirective as ne, openBlock as y, createElementBlock as z, Fragment as Ie, renderList as Be, withDirectives as le, unref as $, createBlock as C, withCtx as ie, resolveDynamicComponent as Le, createElementVNode as Q, createTextVNode as Pe, toDisplayString as ae, createVNode as Ce, createCommentVNode as oe } from "vue";
2
+ import { n as Ee, c as ce, u as qe } from "./usePreview.K_Ffcf49.js";
3
+ import { ElImage as Ze, ElIcon as he } from "element-plus";
4
+ import { Error as De } from "color-message-aibox-vue";
5
+ import { _ as Me } from "./_plugin-vue_export-helper.CHgC5LLL.js";
6
+ import '../assets/index3.css';function G() {
7
+ return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
8
+ }
9
+ var T = G();
10
+ function xe(s) {
11
+ T = s;
12
+ }
13
+ var L = { exec: () => null };
14
+ function u(s, e = "") {
15
+ let r = typeof s == "string" ? s : s.source, n = { replace: (t, i) => {
16
+ let l = typeof i == "string" ? i : i.source;
17
+ return l = l.replace(x.caret, "$1"), r = r.replace(t, l), n;
18
+ }, getRegex: () => new RegExp(r, e) };
19
+ return n;
20
+ }
21
+ var Ne = (() => {
22
+ try {
23
+ return !!new RegExp("(?<=1)(?<!1)");
24
+ } catch {
25
+ return !1;
26
+ }
27
+ })(), x = { 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]\] +\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: (s) => new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}#`), htmlBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}<(?:[a-z].*>|!--)`, "i") }, Oe = /^(?:[ \t]*(?:\n|$))+/, Qe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, He = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, P = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Fe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, U = /(?:[*+-]|\d{1,9}[.)])/, be = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, me = u(be).replace(/bull/g, U).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(), je = u(be).replace(/bull/g, U).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(), V = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ge = /^[^\n]+/, W = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ue = u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ve = u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, U).getRegex(), M = "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", X = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, We = u("^ {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", X).replace("tag", M).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), we = u(V).replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", M).getRegex(), Xe = u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", we).getRegex(), J = { blockquote: Xe, code: Qe, def: Ue, fences: He, heading: Fe, hr: P, html: We, lheading: me, list: Ve, newline: Oe, paragraph: we, table: L, text: Ge }, pe = u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {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", M).getRegex(), Je = { ...J, lheading: je, table: pe, paragraph: u(V).replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", pe).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", M).getRegex() }, Ke = { ...J, html: u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", X).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: L, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: u(V).replace("hr", P).replace("heading", ` *#{1,6} *[^
28
+ ]`).replace("lheading", me).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ye = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, et = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ye = /^( {2,}|\\)\n(?!\s*$)/, tt = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, N = /[\p{P}\p{S}]/u, K = /[\s\p{P}\p{S}]/u, Se = /[^\s\p{P}\p{S}]/u, rt = u(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, K).getRegex(), $e = /(?!~)[\p{P}\p{S}]/u, st = /(?!~)[\s\p{P}\p{S}]/u, nt = /(?:[^\s\p{P}\p{S}]|~)/u, lt = u(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Ne ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Re = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, it = u(Re, "u").replace(/punct/g, N).getRegex(), at = u(Re, "u").replace(/punct/g, $e).getRegex(), Te = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ot = u(Te, "gu").replace(/notPunctSpace/g, Se).replace(/punctSpace/g, K).replace(/punct/g, N).getRegex(), ct = u(Te, "gu").replace(/notPunctSpace/g, nt).replace(/punctSpace/g, st).replace(/punct/g, $e).getRegex(), ht = u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Se).replace(/punctSpace/g, K).replace(/punct/g, N).getRegex(), pt = u(/\\(punct)/, "gu").replace(/punct/g, N).getRegex(), ut = u(/^<(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(), gt = u(X).replace("(?:-->|$)", "-->").getRegex(), kt = u("^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", gt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, dt = u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), _e = u(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", W).getRegex(), ve = u(/^!?\[(ref)\](?:\[\])?/).replace("ref", W).getRegex(), ft = u("reflink|nolink(?!\\()", "g").replace("reflink", _e).replace("nolink", ve).getRegex(), ue = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Y = { _backpedal: L, anyPunctuation: pt, autolink: ut, blockSkip: lt, br: ye, code: et, del: L, emStrongLDelim: it, emStrongRDelimAst: ot, emStrongRDelimUnd: ht, escape: Ye, link: dt, nolink: ve, punctuation: rt, reflink: _e, reflinkSearch: ft, tag: kt, text: tt, url: L }, xt = { ...Y, link: u(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, H = { ...Y, emStrongRDelimAst: ct, emStrongLDelim: at, url: u(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ue).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: u(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ue).getRegex() }, bt = { ...H, br: u(ye).replace("{2,}", "*").getRegex(), text: u(H.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, E = { normal: J, gfm: Je, pedantic: Ke }, A = { normal: Y, gfm: H, breaks: bt, pedantic: xt }, mt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (s) => mt[s];
29
+ function S(s, e) {
30
+ if (e) {
31
+ if (x.escapeTest.test(s)) return s.replace(x.escapeReplace, ge);
32
+ } else if (x.escapeTestNoEncode.test(s)) return s.replace(x.escapeReplaceNoEncode, ge);
33
+ return s;
34
+ }
35
+ function ke(s) {
36
+ try {
37
+ s = encodeURI(s).replace(x.percentDecode, "%");
38
+ } catch {
39
+ return null;
40
+ }
41
+ return s;
42
+ }
43
+ function de(s, e) {
44
+ let r = s.replace(x.findPipe, (i, l, o) => {
45
+ let a = !1, h = l;
46
+ for (; --h >= 0 && o[h] === "\\"; ) a = !a;
47
+ return a ? "|" : " |";
48
+ }), n = r.split(x.splitPipe), t = 0;
49
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
50
+ else for (; n.length < e; ) n.push("");
51
+ for (; t < n.length; t++) n[t] = n[t].trim().replace(x.slashPipe, "|");
52
+ return n;
53
+ }
54
+ function I(s, e, r) {
55
+ let n = s.length;
56
+ if (n === 0) return "";
57
+ let t = 0;
58
+ for (; t < n && s.charAt(n - t - 1) === e; )
59
+ t++;
60
+ return s.slice(0, n - t);
61
+ }
62
+ function wt(s, e) {
63
+ if (s.indexOf(e[1]) === -1) return -1;
64
+ let r = 0;
65
+ for (let n = 0; n < s.length; n++) if (s[n] === "\\") n++;
66
+ else if (s[n] === e[0]) r++;
67
+ else if (s[n] === e[1] && (r--, r < 0)) return n;
68
+ return r > 0 ? -2 : -1;
69
+ }
70
+ function fe(s, e, r, n, t) {
71
+ let i = e.href, l = e.title || null, o = s[1].replace(t.other.outputLinkReplace, "$1");
72
+ n.state.inLink = !0;
73
+ let a = { type: s[0].charAt(0) === "!" ? "image" : "link", raw: r, href: i, title: l, text: o, tokens: n.inlineTokens(o) };
74
+ return n.state.inLink = !1, a;
75
+ }
76
+ function yt(s, e, r) {
77
+ let n = s.match(r.other.indentCodeCompensation);
78
+ if (n === null) return e;
79
+ let t = n[1];
80
+ return e.split(`
81
+ `).map((i) => {
82
+ let l = i.match(r.other.beginningSpace);
83
+ if (l === null) return i;
84
+ let [o] = l;
85
+ return o.length >= t.length ? i.slice(t.length) : i;
86
+ }).join(`
87
+ `);
88
+ }
89
+ var Z = class {
90
+ options;
91
+ rules;
92
+ lexer;
93
+ constructor(s) {
94
+ this.options = s || T;
95
+ }
96
+ space(s) {
97
+ let e = this.rules.block.newline.exec(s);
98
+ if (e && e[0].length > 0) return { type: "space", raw: e[0] };
99
+ }
100
+ code(s) {
101
+ let e = this.rules.block.code.exec(s);
102
+ if (e) {
103
+ let r = e[0].replace(this.rules.other.codeRemoveIndent, "");
104
+ return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : I(r, `
105
+ `) };
106
+ }
107
+ }
108
+ fences(s) {
109
+ let e = this.rules.block.fences.exec(s);
110
+ if (e) {
111
+ let r = e[0], n = yt(r, e[3] || "", this.rules);
112
+ return { type: "code", raw: r, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: n };
113
+ }
114
+ }
115
+ heading(s) {
116
+ let e = this.rules.block.heading.exec(s);
117
+ if (e) {
118
+ let r = e[2].trim();
119
+ if (this.rules.other.endingHash.test(r)) {
120
+ let n = I(r, "#");
121
+ (this.options.pedantic || !n || this.rules.other.endingSpaceChar.test(n)) && (r = n.trim());
122
+ }
123
+ return { type: "heading", raw: e[0], depth: e[1].length, text: r, tokens: this.lexer.inline(r) };
124
+ }
125
+ }
126
+ hr(s) {
127
+ let e = this.rules.block.hr.exec(s);
128
+ if (e) return { type: "hr", raw: I(e[0], `
129
+ `) };
130
+ }
131
+ blockquote(s) {
132
+ let e = this.rules.block.blockquote.exec(s);
133
+ if (e) {
134
+ let r = I(e[0], `
135
+ `).split(`
136
+ `), n = "", t = "", i = [];
137
+ for (; r.length > 0; ) {
138
+ let l = !1, o = [], a;
139
+ for (a = 0; a < r.length; a++) if (this.rules.other.blockquoteStart.test(r[a])) o.push(r[a]), l = !0;
140
+ else if (!l) o.push(r[a]);
141
+ else break;
142
+ r = r.slice(a);
143
+ let h = o.join(`
144
+ `), c = h.replace(this.rules.other.blockquoteSetextReplace, `
145
+ $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
146
+ n = n ? `${n}
147
+ ${h}` : h, t = t ? `${t}
148
+ ${c}` : c;
149
+ let g = this.lexer.state.top;
150
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = g, r.length === 0) break;
151
+ let p = i.at(-1);
152
+ if (p?.type === "code") break;
153
+ if (p?.type === "blockquote") {
154
+ let f = p, d = f.raw + `
155
+ ` + r.join(`
156
+ `), b = this.blockquote(d);
157
+ i[i.length - 1] = b, n = n.substring(0, n.length - f.raw.length) + b.raw, t = t.substring(0, t.length - f.text.length) + b.text;
158
+ break;
159
+ } else if (p?.type === "list") {
160
+ let f = p, d = f.raw + `
161
+ ` + r.join(`
162
+ `), b = this.list(d);
163
+ i[i.length - 1] = b, n = n.substring(0, n.length - p.raw.length) + b.raw, t = t.substring(0, t.length - f.raw.length) + b.raw, r = d.substring(i.at(-1).raw.length).split(`
164
+ `);
165
+ continue;
166
+ }
167
+ }
168
+ return { type: "blockquote", raw: n, tokens: i, text: t };
169
+ }
170
+ }
171
+ list(s) {
172
+ let e = this.rules.block.list.exec(s);
173
+ if (e) {
174
+ let r = e[1].trim(), n = r.length > 1, t = { type: "list", raw: "", ordered: n, start: n ? +r.slice(0, -1) : "", loose: !1, items: [] };
175
+ r = n ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = n ? r : "[*+-]");
176
+ let i = this.rules.other.listItemRegex(r), l = !1;
177
+ for (; s; ) {
178
+ let a = !1, h = "", c = "";
179
+ if (!(e = i.exec(s)) || this.rules.block.hr.test(s)) break;
180
+ h = e[0], s = s.substring(h.length);
181
+ let g = e[2].split(`
182
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (b) => " ".repeat(3 * b.length)), p = s.split(`
183
+ `, 1)[0], f = !g.trim(), d = 0;
184
+ if (this.options.pedantic ? (d = 2, c = g.trimStart()) : f ? d = e[1].length + 1 : (d = e[2].search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, c = g.slice(d), d += e[1].length), f && this.rules.other.blankLine.test(p) && (h += p + `
185
+ `, s = s.substring(p.length + 1), a = !0), !a) {
186
+ let b = this.rules.other.nextBulletRegex(d), te = this.rules.other.hrRegex(d), re = this.rules.other.fencesBeginRegex(d), se = this.rules.other.headingBeginRegex(d), ze = this.rules.other.htmlBeginRegex(d);
187
+ for (; s; ) {
188
+ let O = s.split(`
189
+ `, 1)[0], v;
190
+ if (p = O, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), v = p) : v = p.replace(this.rules.other.tabCharGlobal, " "), re.test(p) || se.test(p) || ze.test(p) || b.test(p) || te.test(p)) break;
191
+ if (v.search(this.rules.other.nonSpaceChar) >= d || !p.trim()) c += `
192
+ ` + v.slice(d);
193
+ else {
194
+ if (f || g.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || re.test(g) || se.test(g) || te.test(g)) break;
195
+ c += `
196
+ ` + p;
197
+ }
198
+ !f && !p.trim() && (f = !0), h += O + `
199
+ `, s = s.substring(O.length + 1), g = v.slice(d);
200
+ }
201
+ }
202
+ t.loose || (l ? t.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (l = !0)), t.items.push({ type: "list_item", raw: h, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: !1, text: c, tokens: [] }), t.raw += h;
203
+ }
204
+ let o = t.items.at(-1);
205
+ if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
206
+ else return;
207
+ t.raw = t.raw.trimEnd();
208
+ for (let a of t.items) {
209
+ if (this.lexer.state.top = !1, a.tokens = this.lexer.blockTokens(a.text, []), a.task) {
210
+ if (a.text = a.text.replace(this.rules.other.listReplaceTask, ""), a.tokens[0]?.type === "text" || a.tokens[0]?.type === "paragraph") {
211
+ a.tokens[0].raw = a.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), a.tokens[0].text = a.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
212
+ for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
213
+ this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
214
+ break;
215
+ }
216
+ }
217
+ let h = this.rules.other.listTaskCheckbox.exec(a.raw);
218
+ if (h) {
219
+ let c = { type: "checkbox", raw: h[0] + " ", checked: h[0] !== "[ ]" };
220
+ a.checked = c.checked, t.loose ? a.tokens[0] && ["paragraph", "text"].includes(a.tokens[0].type) && "tokens" in a.tokens[0] && a.tokens[0].tokens ? (a.tokens[0].raw = c.raw + a.tokens[0].raw, a.tokens[0].text = c.raw + a.tokens[0].text, a.tokens[0].tokens.unshift(c)) : a.tokens.unshift({ type: "paragraph", raw: c.raw, text: c.raw, tokens: [c] }) : a.tokens.unshift(c);
221
+ }
222
+ }
223
+ if (!t.loose) {
224
+ let h = a.tokens.filter((g) => g.type === "space"), c = h.length > 0 && h.some((g) => this.rules.other.anyLine.test(g.raw));
225
+ t.loose = c;
226
+ }
227
+ }
228
+ if (t.loose) for (let a of t.items) {
229
+ a.loose = !0;
230
+ for (let h of a.tokens) h.type === "text" && (h.type = "paragraph");
231
+ }
232
+ return t;
233
+ }
234
+ }
235
+ html(s) {
236
+ let e = this.rules.block.html.exec(s);
237
+ if (e) return { type: "html", block: !0, raw: e[0], pre: e[1] === "pre" || e[1] === "script" || e[1] === "style", text: e[0] };
238
+ }
239
+ def(s) {
240
+ let e = this.rules.block.def.exec(s);
241
+ if (e) {
242
+ let r = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", t = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
243
+ return { type: "def", tag: r, raw: e[0], href: n, title: t };
244
+ }
245
+ }
246
+ table(s) {
247
+ let e = this.rules.block.table.exec(s);
248
+ if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
249
+ let r = de(e[1]), n = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), t = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
250
+ `) : [], i = { type: "table", raw: e[0], header: [], align: [], rows: [] };
251
+ if (r.length === n.length) {
252
+ for (let l of n) this.rules.other.tableAlignRight.test(l) ? i.align.push("right") : this.rules.other.tableAlignCenter.test(l) ? i.align.push("center") : this.rules.other.tableAlignLeft.test(l) ? i.align.push("left") : i.align.push(null);
253
+ for (let l = 0; l < r.length; l++) i.header.push({ text: r[l], tokens: this.lexer.inline(r[l]), header: !0, align: i.align[l] });
254
+ for (let l of t) i.rows.push(de(l, i.header.length).map((o, a) => ({ text: o, tokens: this.lexer.inline(o), header: !1, align: i.align[a] })));
255
+ return i;
256
+ }
257
+ }
258
+ lheading(s) {
259
+ let e = this.rules.block.lheading.exec(s);
260
+ if (e) return { type: "heading", raw: e[0], depth: e[2].charAt(0) === "=" ? 1 : 2, text: e[1], tokens: this.lexer.inline(e[1]) };
261
+ }
262
+ paragraph(s) {
263
+ let e = this.rules.block.paragraph.exec(s);
264
+ if (e) {
265
+ let r = e[1].charAt(e[1].length - 1) === `
266
+ ` ? e[1].slice(0, -1) : e[1];
267
+ return { type: "paragraph", raw: e[0], text: r, tokens: this.lexer.inline(r) };
268
+ }
269
+ }
270
+ text(s) {
271
+ let e = this.rules.block.text.exec(s);
272
+ if (e) return { type: "text", raw: e[0], text: e[0], tokens: this.lexer.inline(e[0]) };
273
+ }
274
+ escape(s) {
275
+ let e = this.rules.inline.escape.exec(s);
276
+ if (e) return { type: "escape", raw: e[0], text: e[1] };
277
+ }
278
+ tag(s) {
279
+ let e = this.rules.inline.tag.exec(s);
280
+ if (e) return !this.lexer.state.inLink && this.rules.other.startATag.test(e[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(e[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(e[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(e[0]) && (this.lexer.state.inRawBlock = !1), { type: "html", raw: e[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: !1, text: e[0] };
281
+ }
282
+ link(s) {
283
+ let e = this.rules.inline.link.exec(s);
284
+ if (e) {
285
+ let r = e[2].trim();
286
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
287
+ if (!this.rules.other.endAngleBracket.test(r)) return;
288
+ let i = I(r.slice(0, -1), "\\");
289
+ if ((r.length - i.length) % 2 === 0) return;
290
+ } else {
291
+ let i = wt(e[2], "()");
292
+ if (i === -2) return;
293
+ if (i > -1) {
294
+ let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
295
+ e[2] = e[2].substring(0, i), e[0] = e[0].substring(0, l).trim(), e[3] = "";
296
+ }
297
+ }
298
+ let n = e[2], t = "";
299
+ if (this.options.pedantic) {
300
+ let i = this.rules.other.pedanticHrefTitle.exec(n);
301
+ i && (n = i[1], t = i[3]);
302
+ } else t = e[3] ? e[3].slice(1, -1) : "";
303
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? n = n.slice(1) : n = n.slice(1, -1)), fe(e, { href: n && n.replace(this.rules.inline.anyPunctuation, "$1"), title: t && t.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
304
+ }
305
+ }
306
+ reflink(s, e) {
307
+ let r;
308
+ if ((r = this.rules.inline.reflink.exec(s)) || (r = this.rules.inline.nolink.exec(s))) {
309
+ let n = (r[2] || r[1]).replace(this.rules.other.multipleSpaceGlobal, " "), t = e[n.toLowerCase()];
310
+ if (!t) {
311
+ let i = r[0].charAt(0);
312
+ return { type: "text", raw: i, text: i };
313
+ }
314
+ return fe(r, t, r[0], this.lexer, this.rules);
315
+ }
316
+ }
317
+ emStrong(s, e, r = "") {
318
+ let n = this.rules.inline.emStrongLDelim.exec(s);
319
+ if (!(!n || n[3] && r.match(this.rules.other.unicodeAlphaNumeric)) && (!(n[1] || n[2]) || !r || this.rules.inline.punctuation.exec(r))) {
320
+ let t = [...n[0]].length - 1, i, l, o = t, a = 0, h = n[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
321
+ for (h.lastIndex = 0, e = e.slice(-1 * s.length + t); (n = h.exec(e)) != null; ) {
322
+ if (i = n[1] || n[2] || n[3] || n[4] || n[5] || n[6], !i) continue;
323
+ if (l = [...i].length, n[3] || n[4]) {
324
+ o += l;
325
+ continue;
326
+ } else if ((n[5] || n[6]) && t % 3 && !((t + l) % 3)) {
327
+ a += l;
328
+ continue;
329
+ }
330
+ if (o -= l, o > 0) continue;
331
+ l = Math.min(l, l + o + a);
332
+ let c = [...n[0]][0].length, g = s.slice(0, t + n.index + c + l);
333
+ if (Math.min(t, l) % 2) {
334
+ let f = g.slice(1, -1);
335
+ return { type: "em", raw: g, text: f, tokens: this.lexer.inlineTokens(f) };
336
+ }
337
+ let p = g.slice(2, -2);
338
+ return { type: "strong", raw: g, text: p, tokens: this.lexer.inlineTokens(p) };
339
+ }
340
+ }
341
+ }
342
+ codespan(s) {
343
+ let e = this.rules.inline.code.exec(s);
344
+ if (e) {
345
+ let r = e[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(r), t = this.rules.other.startingSpaceChar.test(r) && this.rules.other.endingSpaceChar.test(r);
346
+ return n && t && (r = r.substring(1, r.length - 1)), { type: "codespan", raw: e[0], text: r };
347
+ }
348
+ }
349
+ br(s) {
350
+ let e = this.rules.inline.br.exec(s);
351
+ if (e) return { type: "br", raw: e[0] };
352
+ }
353
+ del(s) {
354
+ let e = this.rules.inline.del.exec(s);
355
+ if (e) return { type: "del", raw: e[0], text: e[2], tokens: this.lexer.inlineTokens(e[2]) };
356
+ }
357
+ autolink(s) {
358
+ let e = this.rules.inline.autolink.exec(s);
359
+ if (e) {
360
+ let r, n;
361
+ return e[2] === "@" ? (r = e[1], n = "mailto:" + r) : (r = e[1], n = r), { type: "link", raw: e[0], text: r, href: n, tokens: [{ type: "text", raw: r, text: r }] };
362
+ }
363
+ }
364
+ url(s) {
365
+ let e;
366
+ if (e = this.rules.inline.url.exec(s)) {
367
+ let r, n;
368
+ if (e[2] === "@") r = e[0], n = "mailto:" + r;
369
+ else {
370
+ let t;
371
+ do
372
+ t = e[0], e[0] = this.rules.inline._backpedal.exec(e[0])?.[0] ?? "";
373
+ while (t !== e[0]);
374
+ r = e[0], e[1] === "www." ? n = "http://" + e[0] : n = e[0];
375
+ }
376
+ return { type: "link", raw: e[0], text: r, href: n, tokens: [{ type: "text", raw: r, text: r }] };
377
+ }
378
+ }
379
+ inlineText(s) {
380
+ let e = this.rules.inline.text.exec(s);
381
+ if (e) {
382
+ let r = this.lexer.state.inRawBlock;
383
+ return { type: "text", raw: e[0], text: e[0], escaped: r };
384
+ }
385
+ }
386
+ }, m = class F {
387
+ tokens;
388
+ options;
389
+ state;
390
+ inlineQueue;
391
+ tokenizer;
392
+ constructor(e) {
393
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || T, this.options.tokenizer = this.options.tokenizer || new Z(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
394
+ let r = { other: x, block: E.normal, inline: A.normal };
395
+ this.options.pedantic ? (r.block = E.pedantic, r.inline = A.pedantic) : this.options.gfm && (r.block = E.gfm, this.options.breaks ? r.inline = A.breaks : r.inline = A.gfm), this.tokenizer.rules = r;
396
+ }
397
+ static get rules() {
398
+ return { block: E, inline: A };
399
+ }
400
+ static lex(e, r) {
401
+ return new F(r).lex(e);
402
+ }
403
+ static lexInline(e, r) {
404
+ return new F(r).inlineTokens(e);
405
+ }
406
+ lex(e) {
407
+ e = e.replace(x.carriageReturn, `
408
+ `), this.blockTokens(e, this.tokens);
409
+ for (let r = 0; r < this.inlineQueue.length; r++) {
410
+ let n = this.inlineQueue[r];
411
+ this.inlineTokens(n.src, n.tokens);
412
+ }
413
+ return this.inlineQueue = [], this.tokens;
414
+ }
415
+ blockTokens(e, r = [], n = !1) {
416
+ for (this.options.pedantic && (e = e.replace(x.tabCharGlobal, " ").replace(x.spaceLine, "")); e; ) {
417
+ let t;
418
+ if (this.options.extensions?.block?.some((l) => (t = l.call({ lexer: this }, e, r)) ? (e = e.substring(t.raw.length), r.push(t), !0) : !1)) continue;
419
+ if (t = this.tokenizer.space(e)) {
420
+ e = e.substring(t.raw.length);
421
+ let l = r.at(-1);
422
+ t.raw.length === 1 && l !== void 0 ? l.raw += `
423
+ ` : r.push(t);
424
+ continue;
425
+ }
426
+ if (t = this.tokenizer.code(e)) {
427
+ e = e.substring(t.raw.length);
428
+ let l = r.at(-1);
429
+ l?.type === "paragraph" || l?.type === "text" ? (l.raw += (l.raw.endsWith(`
430
+ `) ? "" : `
431
+ `) + t.raw, l.text += `
432
+ ` + t.text, this.inlineQueue.at(-1).src = l.text) : r.push(t);
433
+ continue;
434
+ }
435
+ if (t = this.tokenizer.fences(e)) {
436
+ e = e.substring(t.raw.length), r.push(t);
437
+ continue;
438
+ }
439
+ if (t = this.tokenizer.heading(e)) {
440
+ e = e.substring(t.raw.length), r.push(t);
441
+ continue;
442
+ }
443
+ if (t = this.tokenizer.hr(e)) {
444
+ e = e.substring(t.raw.length), r.push(t);
445
+ continue;
446
+ }
447
+ if (t = this.tokenizer.blockquote(e)) {
448
+ e = e.substring(t.raw.length), r.push(t);
449
+ continue;
450
+ }
451
+ if (t = this.tokenizer.list(e)) {
452
+ e = e.substring(t.raw.length), r.push(t);
453
+ continue;
454
+ }
455
+ if (t = this.tokenizer.html(e)) {
456
+ e = e.substring(t.raw.length), r.push(t);
457
+ continue;
458
+ }
459
+ if (t = this.tokenizer.def(e)) {
460
+ e = e.substring(t.raw.length);
461
+ let l = r.at(-1);
462
+ l?.type === "paragraph" || l?.type === "text" ? (l.raw += (l.raw.endsWith(`
463
+ `) ? "" : `
464
+ `) + t.raw, l.text += `
465
+ ` + t.raw, this.inlineQueue.at(-1).src = l.text) : this.tokens.links[t.tag] || (this.tokens.links[t.tag] = { href: t.href, title: t.title }, r.push(t));
466
+ continue;
467
+ }
468
+ if (t = this.tokenizer.table(e)) {
469
+ e = e.substring(t.raw.length), r.push(t);
470
+ continue;
471
+ }
472
+ if (t = this.tokenizer.lheading(e)) {
473
+ e = e.substring(t.raw.length), r.push(t);
474
+ continue;
475
+ }
476
+ let i = e;
477
+ if (this.options.extensions?.startBlock) {
478
+ let l = 1 / 0, o = e.slice(1), a;
479
+ this.options.extensions.startBlock.forEach((h) => {
480
+ a = h.call({ lexer: this }, o), typeof a == "number" && a >= 0 && (l = Math.min(l, a));
481
+ }), l < 1 / 0 && l >= 0 && (i = e.substring(0, l + 1));
482
+ }
483
+ if (this.state.top && (t = this.tokenizer.paragraph(i))) {
484
+ let l = r.at(-1);
485
+ n && l?.type === "paragraph" ? (l.raw += (l.raw.endsWith(`
486
+ `) ? "" : `
487
+ `) + t.raw, l.text += `
488
+ ` + t.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(t), n = i.length !== e.length, e = e.substring(t.raw.length);
489
+ continue;
490
+ }
491
+ if (t = this.tokenizer.text(e)) {
492
+ e = e.substring(t.raw.length);
493
+ let l = r.at(-1);
494
+ l?.type === "text" ? (l.raw += (l.raw.endsWith(`
495
+ `) ? "" : `
496
+ `) + t.raw, l.text += `
497
+ ` + t.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(t);
498
+ continue;
499
+ }
500
+ if (e) {
501
+ let l = "Infinite loop on byte: " + e.charCodeAt(0);
502
+ if (this.options.silent) {
503
+ console.error(l);
504
+ break;
505
+ } else throw new Error(l);
506
+ }
507
+ }
508
+ return this.state.top = !0, r;
509
+ }
510
+ inline(e, r = []) {
511
+ return this.inlineQueue.push({ src: e, tokens: r }), r;
512
+ }
513
+ inlineTokens(e, r = []) {
514
+ let n = e, t = null;
515
+ if (this.tokens.links) {
516
+ let a = Object.keys(this.tokens.links);
517
+ if (a.length > 0) for (; (t = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) a.includes(t[0].slice(t[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, t.index) + "[" + "a".repeat(t[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
518
+ }
519
+ for (; (t = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, t.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
520
+ let i;
521
+ for (; (t = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = t[2] ? t[2].length : 0, n = n.slice(0, t.index + i) + "[" + "a".repeat(t[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
522
+ n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
523
+ let l = !1, o = "";
524
+ for (; e; ) {
525
+ l || (o = ""), l = !1;
526
+ let a;
527
+ if (this.options.extensions?.inline?.some((c) => (a = c.call({ lexer: this }, e, r)) ? (e = e.substring(a.raw.length), r.push(a), !0) : !1)) continue;
528
+ if (a = this.tokenizer.escape(e)) {
529
+ e = e.substring(a.raw.length), r.push(a);
530
+ continue;
531
+ }
532
+ if (a = this.tokenizer.tag(e)) {
533
+ e = e.substring(a.raw.length), r.push(a);
534
+ continue;
535
+ }
536
+ if (a = this.tokenizer.link(e)) {
537
+ e = e.substring(a.raw.length), r.push(a);
538
+ continue;
539
+ }
540
+ if (a = this.tokenizer.reflink(e, this.tokens.links)) {
541
+ e = e.substring(a.raw.length);
542
+ let c = r.at(-1);
543
+ a.type === "text" && c?.type === "text" ? (c.raw += a.raw, c.text += a.text) : r.push(a);
544
+ continue;
545
+ }
546
+ if (a = this.tokenizer.emStrong(e, n, o)) {
547
+ e = e.substring(a.raw.length), r.push(a);
548
+ continue;
549
+ }
550
+ if (a = this.tokenizer.codespan(e)) {
551
+ e = e.substring(a.raw.length), r.push(a);
552
+ continue;
553
+ }
554
+ if (a = this.tokenizer.br(e)) {
555
+ e = e.substring(a.raw.length), r.push(a);
556
+ continue;
557
+ }
558
+ if (a = this.tokenizer.del(e)) {
559
+ e = e.substring(a.raw.length), r.push(a);
560
+ continue;
561
+ }
562
+ if (a = this.tokenizer.autolink(e)) {
563
+ e = e.substring(a.raw.length), r.push(a);
564
+ continue;
565
+ }
566
+ if (!this.state.inLink && (a = this.tokenizer.url(e))) {
567
+ e = e.substring(a.raw.length), r.push(a);
568
+ continue;
569
+ }
570
+ let h = e;
571
+ if (this.options.extensions?.startInline) {
572
+ let c = 1 / 0, g = e.slice(1), p;
573
+ this.options.extensions.startInline.forEach((f) => {
574
+ p = f.call({ lexer: this }, g), typeof p == "number" && p >= 0 && (c = Math.min(c, p));
575
+ }), c < 1 / 0 && c >= 0 && (h = e.substring(0, c + 1));
576
+ }
577
+ if (a = this.tokenizer.inlineText(h)) {
578
+ e = e.substring(a.raw.length), a.raw.slice(-1) !== "_" && (o = a.raw.slice(-1)), l = !0;
579
+ let c = r.at(-1);
580
+ c?.type === "text" ? (c.raw += a.raw, c.text += a.text) : r.push(a);
581
+ continue;
582
+ }
583
+ if (e) {
584
+ let c = "Infinite loop on byte: " + e.charCodeAt(0);
585
+ if (this.options.silent) {
586
+ console.error(c);
587
+ break;
588
+ } else throw new Error(c);
589
+ }
590
+ }
591
+ return r;
592
+ }
593
+ }, D = class {
594
+ options;
595
+ parser;
596
+ constructor(s) {
597
+ this.options = s || T;
598
+ }
599
+ space(s) {
600
+ return "";
601
+ }
602
+ code({ text: s, lang: e, escaped: r }) {
603
+ let n = (e || "").match(x.notSpaceStart)?.[0], t = s.replace(x.endingNewline, "") + `
604
+ `;
605
+ return n ? '<pre><code class="language-' + S(n) + '">' + (r ? t : S(t, !0)) + `</code></pre>
606
+ ` : "<pre><code>" + (r ? t : S(t, !0)) + `</code></pre>
607
+ `;
608
+ }
609
+ blockquote({ tokens: s }) {
610
+ return `<blockquote>
611
+ ${this.parser.parse(s)}</blockquote>
612
+ `;
613
+ }
614
+ html({ text: s }) {
615
+ return s;
616
+ }
617
+ def(s) {
618
+ return "";
619
+ }
620
+ heading({ tokens: s, depth: e }) {
621
+ return `<h${e}>${this.parser.parseInline(s)}</h${e}>
622
+ `;
623
+ }
624
+ hr(s) {
625
+ return `<hr>
626
+ `;
627
+ }
628
+ list(s) {
629
+ let e = s.ordered, r = s.start, n = "";
630
+ for (let l = 0; l < s.items.length; l++) {
631
+ let o = s.items[l];
632
+ n += this.listitem(o);
633
+ }
634
+ let t = e ? "ol" : "ul", i = e && r !== 1 ? ' start="' + r + '"' : "";
635
+ return "<" + t + i + `>
636
+ ` + n + "</" + t + `>
637
+ `;
638
+ }
639
+ listitem(s) {
640
+ return `<li>${this.parser.parse(s.tokens)}</li>
641
+ `;
642
+ }
643
+ checkbox({ checked: s }) {
644
+ return "<input " + (s ? 'checked="" ' : "") + 'disabled="" type="checkbox"> ';
645
+ }
646
+ paragraph({ tokens: s }) {
647
+ return `<p>${this.parser.parseInline(s)}</p>
648
+ `;
649
+ }
650
+ table(s) {
651
+ let e = "", r = "";
652
+ for (let t = 0; t < s.header.length; t++) r += this.tablecell(s.header[t]);
653
+ e += this.tablerow({ text: r });
654
+ let n = "";
655
+ for (let t = 0; t < s.rows.length; t++) {
656
+ let i = s.rows[t];
657
+ r = "";
658
+ for (let l = 0; l < i.length; l++) r += this.tablecell(i[l]);
659
+ n += this.tablerow({ text: r });
660
+ }
661
+ return n && (n = `<tbody>${n}</tbody>`), `<table>
662
+ <thead>
663
+ ` + e + `</thead>
664
+ ` + n + `</table>
665
+ `;
666
+ }
667
+ tablerow({ text: s }) {
668
+ return `<tr>
669
+ ${s}</tr>
670
+ `;
671
+ }
672
+ tablecell(s) {
673
+ let e = this.parser.parseInline(s.tokens), r = s.header ? "th" : "td";
674
+ return (s.align ? `<${r} align="${s.align}">` : `<${r}>`) + e + `</${r}>
675
+ `;
676
+ }
677
+ strong({ tokens: s }) {
678
+ return `<strong>${this.parser.parseInline(s)}</strong>`;
679
+ }
680
+ em({ tokens: s }) {
681
+ return `<em>${this.parser.parseInline(s)}</em>`;
682
+ }
683
+ codespan({ text: s }) {
684
+ return `<code>${S(s, !0)}</code>`;
685
+ }
686
+ br(s) {
687
+ return "<br>";
688
+ }
689
+ del({ tokens: s }) {
690
+ return `<del>${this.parser.parseInline(s)}</del>`;
691
+ }
692
+ link({ href: s, title: e, tokens: r }) {
693
+ let n = this.parser.parseInline(r), t = ke(s);
694
+ if (t === null) return n;
695
+ s = t;
696
+ let i = '<a href="' + s + '"';
697
+ return e && (i += ' title="' + S(e) + '"'), i += ">" + n + "</a>", i;
698
+ }
699
+ image({ href: s, title: e, text: r, tokens: n }) {
700
+ n && (r = this.parser.parseInline(n, this.parser.textRenderer));
701
+ let t = ke(s);
702
+ if (t === null) return S(r);
703
+ s = t;
704
+ let i = `<img src="${s}" alt="${r}"`;
705
+ return e && (i += ` title="${S(e)}"`), i += ">", i;
706
+ }
707
+ text(s) {
708
+ return "tokens" in s && s.tokens ? this.parser.parseInline(s.tokens) : "escaped" in s && s.escaped ? s.text : S(s.text);
709
+ }
710
+ }, ee = class {
711
+ strong({ text: s }) {
712
+ return s;
713
+ }
714
+ em({ text: s }) {
715
+ return s;
716
+ }
717
+ codespan({ text: s }) {
718
+ return s;
719
+ }
720
+ del({ text: s }) {
721
+ return s;
722
+ }
723
+ html({ text: s }) {
724
+ return s;
725
+ }
726
+ text({ text: s }) {
727
+ return s;
728
+ }
729
+ link({ text: s }) {
730
+ return "" + s;
731
+ }
732
+ image({ text: s }) {
733
+ return "" + s;
734
+ }
735
+ br() {
736
+ return "";
737
+ }
738
+ checkbox({ raw: s }) {
739
+ return s;
740
+ }
741
+ }, w = class j {
742
+ options;
743
+ renderer;
744
+ textRenderer;
745
+ constructor(e) {
746
+ this.options = e || T, this.options.renderer = this.options.renderer || new D(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ee();
747
+ }
748
+ static parse(e, r) {
749
+ return new j(r).parse(e);
750
+ }
751
+ static parseInline(e, r) {
752
+ return new j(r).parseInline(e);
753
+ }
754
+ parse(e) {
755
+ let r = "";
756
+ for (let n = 0; n < e.length; n++) {
757
+ let t = e[n];
758
+ if (this.options.extensions?.renderers?.[t.type]) {
759
+ let l = t, o = this.options.extensions.renderers[l.type].call({ parser: this }, l);
760
+ if (o !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(l.type)) {
761
+ r += o || "";
762
+ continue;
763
+ }
764
+ }
765
+ let i = t;
766
+ switch (i.type) {
767
+ case "space": {
768
+ r += this.renderer.space(i);
769
+ break;
770
+ }
771
+ case "hr": {
772
+ r += this.renderer.hr(i);
773
+ break;
774
+ }
775
+ case "heading": {
776
+ r += this.renderer.heading(i);
777
+ break;
778
+ }
779
+ case "code": {
780
+ r += this.renderer.code(i);
781
+ break;
782
+ }
783
+ case "table": {
784
+ r += this.renderer.table(i);
785
+ break;
786
+ }
787
+ case "blockquote": {
788
+ r += this.renderer.blockquote(i);
789
+ break;
790
+ }
791
+ case "list": {
792
+ r += this.renderer.list(i);
793
+ break;
794
+ }
795
+ case "checkbox": {
796
+ r += this.renderer.checkbox(i);
797
+ break;
798
+ }
799
+ case "html": {
800
+ r += this.renderer.html(i);
801
+ break;
802
+ }
803
+ case "def": {
804
+ r += this.renderer.def(i);
805
+ break;
806
+ }
807
+ case "paragraph": {
808
+ r += this.renderer.paragraph(i);
809
+ break;
810
+ }
811
+ case "text": {
812
+ r += this.renderer.text(i);
813
+ break;
814
+ }
815
+ default: {
816
+ let l = 'Token with "' + i.type + '" type was not found.';
817
+ if (this.options.silent) return console.error(l), "";
818
+ throw new Error(l);
819
+ }
820
+ }
821
+ }
822
+ return r;
823
+ }
824
+ parseInline(e, r = this.renderer) {
825
+ let n = "";
826
+ for (let t = 0; t < e.length; t++) {
827
+ let i = e[t];
828
+ if (this.options.extensions?.renderers?.[i.type]) {
829
+ let o = this.options.extensions.renderers[i.type].call({ parser: this }, i);
830
+ if (o !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
831
+ n += o || "";
832
+ continue;
833
+ }
834
+ }
835
+ let l = i;
836
+ switch (l.type) {
837
+ case "escape": {
838
+ n += r.text(l);
839
+ break;
840
+ }
841
+ case "html": {
842
+ n += r.html(l);
843
+ break;
844
+ }
845
+ case "link": {
846
+ n += r.link(l);
847
+ break;
848
+ }
849
+ case "image": {
850
+ n += r.image(l);
851
+ break;
852
+ }
853
+ case "checkbox": {
854
+ n += r.checkbox(l);
855
+ break;
856
+ }
857
+ case "strong": {
858
+ n += r.strong(l);
859
+ break;
860
+ }
861
+ case "em": {
862
+ n += r.em(l);
863
+ break;
864
+ }
865
+ case "codespan": {
866
+ n += r.codespan(l);
867
+ break;
868
+ }
869
+ case "br": {
870
+ n += r.br(l);
871
+ break;
872
+ }
873
+ case "del": {
874
+ n += r.del(l);
875
+ break;
876
+ }
877
+ case "text": {
878
+ n += r.text(l);
879
+ break;
880
+ }
881
+ default: {
882
+ let o = 'Token with "' + l.type + '" type was not found.';
883
+ if (this.options.silent) return console.error(o), "";
884
+ throw new Error(o);
885
+ }
886
+ }
887
+ }
888
+ return n;
889
+ }
890
+ }, B = class {
891
+ options;
892
+ block;
893
+ constructor(s) {
894
+ this.options = s || T;
895
+ }
896
+ static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
897
+ static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
898
+ preprocess(s) {
899
+ return s;
900
+ }
901
+ postprocess(s) {
902
+ return s;
903
+ }
904
+ processAllTokens(s) {
905
+ return s;
906
+ }
907
+ emStrongMask(s) {
908
+ return s;
909
+ }
910
+ provideLexer() {
911
+ return this.block ? m.lex : m.lexInline;
912
+ }
913
+ provideParser() {
914
+ return this.block ? w.parse : w.parseInline;
915
+ }
916
+ }, St = class {
917
+ defaults = G();
918
+ options = this.setOptions;
919
+ parse = this.parseMarkdown(!0);
920
+ parseInline = this.parseMarkdown(!1);
921
+ Parser = w;
922
+ Renderer = D;
923
+ TextRenderer = ee;
924
+ Lexer = m;
925
+ Tokenizer = Z;
926
+ Hooks = B;
927
+ constructor(...s) {
928
+ this.use(...s);
929
+ }
930
+ walkTokens(s, e) {
931
+ let r = [];
932
+ for (let n of s) switch (r = r.concat(e.call(this, n)), n.type) {
933
+ case "table": {
934
+ let t = n;
935
+ for (let i of t.header) r = r.concat(this.walkTokens(i.tokens, e));
936
+ for (let i of t.rows) for (let l of i) r = r.concat(this.walkTokens(l.tokens, e));
937
+ break;
938
+ }
939
+ case "list": {
940
+ let t = n;
941
+ r = r.concat(this.walkTokens(t.items, e));
942
+ break;
943
+ }
944
+ default: {
945
+ let t = n;
946
+ this.defaults.extensions?.childTokens?.[t.type] ? this.defaults.extensions.childTokens[t.type].forEach((i) => {
947
+ let l = t[i].flat(1 / 0);
948
+ r = r.concat(this.walkTokens(l, e));
949
+ }) : t.tokens && (r = r.concat(this.walkTokens(t.tokens, e)));
950
+ }
951
+ }
952
+ return r;
953
+ }
954
+ use(...s) {
955
+ let e = this.defaults.extensions || { renderers: {}, childTokens: {} };
956
+ return s.forEach((r) => {
957
+ let n = { ...r };
958
+ if (n.async = this.defaults.async || n.async || !1, r.extensions && (r.extensions.forEach((t) => {
959
+ if (!t.name) throw new Error("extension name required");
960
+ if ("renderer" in t) {
961
+ let i = e.renderers[t.name];
962
+ i ? e.renderers[t.name] = function(...l) {
963
+ let o = t.renderer.apply(this, l);
964
+ return o === !1 && (o = i.apply(this, l)), o;
965
+ } : e.renderers[t.name] = t.renderer;
966
+ }
967
+ if ("tokenizer" in t) {
968
+ if (!t.level || t.level !== "block" && t.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
969
+ let i = e[t.level];
970
+ i ? i.unshift(t.tokenizer) : e[t.level] = [t.tokenizer], t.start && (t.level === "block" ? e.startBlock ? e.startBlock.push(t.start) : e.startBlock = [t.start] : t.level === "inline" && (e.startInline ? e.startInline.push(t.start) : e.startInline = [t.start]));
971
+ }
972
+ "childTokens" in t && t.childTokens && (e.childTokens[t.name] = t.childTokens);
973
+ }), n.extensions = e), r.renderer) {
974
+ let t = this.defaults.renderer || new D(this.defaults);
975
+ for (let i in r.renderer) {
976
+ if (!(i in t)) throw new Error(`renderer '${i}' does not exist`);
977
+ if (["options", "parser"].includes(i)) continue;
978
+ let l = i, o = r.renderer[l], a = t[l];
979
+ t[l] = (...h) => {
980
+ let c = o.apply(t, h);
981
+ return c === !1 && (c = a.apply(t, h)), c || "";
982
+ };
983
+ }
984
+ n.renderer = t;
985
+ }
986
+ if (r.tokenizer) {
987
+ let t = this.defaults.tokenizer || new Z(this.defaults);
988
+ for (let i in r.tokenizer) {
989
+ if (!(i in t)) throw new Error(`tokenizer '${i}' does not exist`);
990
+ if (["options", "rules", "lexer"].includes(i)) continue;
991
+ let l = i, o = r.tokenizer[l], a = t[l];
992
+ t[l] = (...h) => {
993
+ let c = o.apply(t, h);
994
+ return c === !1 && (c = a.apply(t, h)), c;
995
+ };
996
+ }
997
+ n.tokenizer = t;
998
+ }
999
+ if (r.hooks) {
1000
+ let t = this.defaults.hooks || new B();
1001
+ for (let i in r.hooks) {
1002
+ if (!(i in t)) throw new Error(`hook '${i}' does not exist`);
1003
+ if (["options", "block"].includes(i)) continue;
1004
+ let l = i, o = r.hooks[l], a = t[l];
1005
+ B.passThroughHooks.has(i) ? t[l] = (h) => {
1006
+ if (this.defaults.async && B.passThroughHooksRespectAsync.has(i)) return (async () => {
1007
+ let g = await o.call(t, h);
1008
+ return a.call(t, g);
1009
+ })();
1010
+ let c = o.call(t, h);
1011
+ return a.call(t, c);
1012
+ } : t[l] = (...h) => {
1013
+ if (this.defaults.async) return (async () => {
1014
+ let g = await o.apply(t, h);
1015
+ return g === !1 && (g = await a.apply(t, h)), g;
1016
+ })();
1017
+ let c = o.apply(t, h);
1018
+ return c === !1 && (c = a.apply(t, h)), c;
1019
+ };
1020
+ }
1021
+ n.hooks = t;
1022
+ }
1023
+ if (r.walkTokens) {
1024
+ let t = this.defaults.walkTokens, i = r.walkTokens;
1025
+ n.walkTokens = function(l) {
1026
+ let o = [];
1027
+ return o.push(i.call(this, l)), t && (o = o.concat(t.call(this, l))), o;
1028
+ };
1029
+ }
1030
+ this.defaults = { ...this.defaults, ...n };
1031
+ }), this;
1032
+ }
1033
+ setOptions(s) {
1034
+ return this.defaults = { ...this.defaults, ...s }, this;
1035
+ }
1036
+ lexer(s, e) {
1037
+ return m.lex(s, e ?? this.defaults);
1038
+ }
1039
+ parser(s, e) {
1040
+ return w.parse(s, e ?? this.defaults);
1041
+ }
1042
+ parseMarkdown(s) {
1043
+ return (e, r) => {
1044
+ let n = { ...r }, t = { ...this.defaults, ...n }, i = this.onError(!!t.silent, !!t.async);
1045
+ if (this.defaults.async === !0 && n.async === !1) return i(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."));
1046
+ if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
1047
+ if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
1048
+ if (t.hooks && (t.hooks.options = t, t.hooks.block = s), t.async) return (async () => {
1049
+ let l = t.hooks ? await t.hooks.preprocess(e) : e, o = await (t.hooks ? await t.hooks.provideLexer() : s ? m.lex : m.lexInline)(l, t), a = t.hooks ? await t.hooks.processAllTokens(o) : o;
1050
+ t.walkTokens && await Promise.all(this.walkTokens(a, t.walkTokens));
1051
+ let h = await (t.hooks ? await t.hooks.provideParser() : s ? w.parse : w.parseInline)(a, t);
1052
+ return t.hooks ? await t.hooks.postprocess(h) : h;
1053
+ })().catch(i);
1054
+ try {
1055
+ t.hooks && (e = t.hooks.preprocess(e));
1056
+ let l = (t.hooks ? t.hooks.provideLexer() : s ? m.lex : m.lexInline)(e, t);
1057
+ t.hooks && (l = t.hooks.processAllTokens(l)), t.walkTokens && this.walkTokens(l, t.walkTokens);
1058
+ let o = (t.hooks ? t.hooks.provideParser() : s ? w.parse : w.parseInline)(l, t);
1059
+ return t.hooks && (o = t.hooks.postprocess(o)), o;
1060
+ } catch (l) {
1061
+ return i(l);
1062
+ }
1063
+ };
1064
+ }
1065
+ onError(s, e) {
1066
+ return (r) => {
1067
+ if (r.message += `
1068
+ Please report this to https://github.com/markedjs/marked.`, s) {
1069
+ let n = "<p>An error occurred:</p><pre>" + S(r.message + "", !0) + "</pre>";
1070
+ return e ? Promise.resolve(n) : n;
1071
+ }
1072
+ if (e) return Promise.reject(r);
1073
+ throw r;
1074
+ };
1075
+ }
1076
+ }, R = new St();
1077
+ function k(s, e) {
1078
+ return R.parse(s, e);
1079
+ }
1080
+ k.options = k.setOptions = function(s) {
1081
+ return R.setOptions(s), k.defaults = R.defaults, xe(k.defaults), k;
1082
+ };
1083
+ k.getDefaults = G;
1084
+ k.defaults = T;
1085
+ k.use = function(...s) {
1086
+ return R.use(...s), k.defaults = R.defaults, xe(k.defaults), k;
1087
+ };
1088
+ k.walkTokens = function(s, e) {
1089
+ return R.walkTokens(s, e);
1090
+ };
1091
+ k.parseInline = R.parseInline;
1092
+ k.Parser = w;
1093
+ k.parser = w.parse;
1094
+ k.Renderer = D;
1095
+ k.TextRenderer = ee;
1096
+ k.Lexer = m;
1097
+ k.lexer = m.lex;
1098
+ k.Tokenizer = Z;
1099
+ k.Hooks = B;
1100
+ k.parse = k;
1101
+ k.options;
1102
+ k.setOptions;
1103
+ k.use;
1104
+ k.walkTokens;
1105
+ k.parseInline;
1106
+ w.parse;
1107
+ m.lex;
1108
+ const Ct = (s, e) => {
1109
+ let r;
1110
+ return function() {
1111
+ const n = this, t = arguments;
1112
+ r && clearTimeout(r), r = setTimeout(() => {
1113
+ s.apply(n, t);
1114
+ }, e);
1115
+ };
1116
+ }, Et = (s, e) => {
1117
+ let r, n = !0;
1118
+ return function() {
1119
+ const t = this, i = arguments;
1120
+ if (n) {
1121
+ s.apply(t, i), n = !1, r = setTimeout(() => {
1122
+ r = null, n = !0;
1123
+ }, e);
1124
+ return;
1125
+ }
1126
+ r || (r = setTimeout(() => {
1127
+ s.apply(t, i), r = null, n = !0;
1128
+ }, e));
1129
+ };
1130
+ };
1131
+ function qt(s, e) {
1132
+ return window.sessionStorage.setItem(s, JSON.stringify(e));
1133
+ }
1134
+ function Zt(s) {
1135
+ return JSON.parse(window.sessionStorage.getItem(s));
1136
+ }
1137
+ function Dt(s) {
1138
+ return window.sessionStorage.removeItem(s);
1139
+ }
1140
+ function Mt() {
1141
+ return window.sessionStorage.clear();
1142
+ }
1143
+ function Nt(s) {
1144
+ const e = Number(s);
1145
+ return e ? e / 1e3 + "s" : "";
1146
+ }
1147
+ const $t = (s) => {
1148
+ if (!s) return "";
1149
+ let e = 0;
1150
+ for (; Math.abs(s) >= 1024 && (s = s / 1024, e++, e !== 4); )
1151
+ ;
1152
+ const r = ["B", "KB", "MB", "GB", "TB"];
1153
+ return Math.round(s * 100) / 100 + " " + r[e];
1154
+ }, _ = Ae({}), Ot = (s) => {
1155
+ if (!s) return "";
1156
+ let e = k.parse(s).replace(/>(\s+)</g, "><");
1157
+ const r = e.match(/<img[^>]+src="([^"]+)"[^>]*>/g);
1158
+ return r && r.forEach((n) => {
1159
+ const t = n.match(/src="([^"]+)"/);
1160
+ if (t && t[1]) {
1161
+ const i = t[1];
1162
+ if (!_.value[i]) {
1163
+ _.value[i] = "loading";
1164
+ const o = new Image();
1165
+ o.onload = () => {
1166
+ _.value[i] = "loaded";
1167
+ }, o.onerror = () => {
1168
+ _.value[i] = "error";
1169
+ }, o.src = i;
1170
+ }
1171
+ let l;
1172
+ _.value[i] === "loaded" ? l = n : _.value[i] === "error" ? l = `<div class="el-image__error" data-src='${t[1]}'><div class="image-slot"><i class="el-icon"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" t="1742463877500" class="icon" viewBox="0 0 1356 1024" version="1.1" p-id="4463" width="264.84375" height="200"><path d="M564.44449572 836.7634306l128.677796-204.53166511-78.14075901-43.48311004-67.64039324 78.75274348a32.20971115 32.20971115 0 0 1-45.96325785 2.995503l-111.12350325-99.68905577a32.20971115 32.20971115 0 0 0-45.83441924 2.83445505l-103.32875321 118.85383398-28.28012581-404.36071319q-3.3498102-48.18572778 44.83591758-51.53553797l311.72558369-21.838184L597.23398201 164.38571167 254.26497816 188.38194626A96.62913347 96.62913347 0 0 0 164.62535234 291.51744152l33.17600217 474.03031841a96.62913347 96.62913347 0 0 0 103.10328527 89.63962582l263.57206593-18.42395514z m84.90479874 1.67490545l299.45368385 20.93631228a96.62913347 96.62913347 0 0 0 103.13549526-89.63962649l33.14379285-474.03031771A96.62913347 96.62913347 0 0 0 995.41043062 192.56920886L772.32597104 176.94749877 737.70053205 223.00738594l254.36008835 17.77976067q48.18572778 3.38201953 44.83591824 51.56774731l-28.24791716 403.90977733-181.179625-210.97360762a32.20971115 32.20971115 0 0 0-45.70557994-3.18876161l-78.14075902 68.76773284 115.02087861 86.96622006-169.32645166 200.63429045z m-159.1159731-480.63330951a88.15797897 88.15797897 0 1 0-59.33028802 107.35496719l59.36249802-107.35496719z" p-id="4464"/></svg></i></div></div>` : l = '<div class="el-space__item"><div class="el-skeleton is-animated"><div class="el-skeleton__item el-skeleton__image" style="width: 120px; height: 120px;"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" t="1742463703310" class="icon" viewBox="0 0 1282 1024" version="1.1" p-id="4321" width="250.390625" height="200"><path d="M164.38571167 759.1138438V264.8861562a100.50044453 100.50044453 0 0 1 100.50044453-100.50044453h670.00296545a100.50044453 100.50044453 0 0 1 100.50044454 100.50044453v494.22768759a100.50044453 100.50044453 0 0 1-100.50044454 100.50044454H264.8861562a100.50044453 100.50044453 0 0 1-100.50044453-100.50044454z m820.75363192-73.0973238V264.8861562q0-50.25022262-50.25022194-50.25022191H264.8861562Q214.63593429 214.63593429 214.63593429 264.8861562v421.59936608l115.84351257-115.84351258a33.50014841 33.50014841 0 0 1 47.73771135 0.3685017l108.03797766 111.52199347a33.50014841 33.50014841 0 0 0 47.90521187 0.23450113l200.06288588-202.50839652a33.50014841 33.50014841 0 0 1 47.63721077 0l203.2788992 205.75791052zM407.46278744 466.69104932a91.68990581 91.68990581 0 1 0-1e-8-183.34631097 91.68990581 91.68990581 0 0 0 0 183.34631097z" p-id="4322"/></svg></div></div></div>', e = e.replace(n, l);
1173
+ }
1174
+ }), e;
1175
+ }, Qt = (s) => {
1176
+ if (typeof s != "string") return !1;
1177
+ const e = s.trim().toLowerCase();
1178
+ if (/^<!doctype\s+html[\s>]/.test(e) || /^<html[\s>]/.test(e)) return !0;
1179
+ const r = e.indexOf("<head"), n = e.indexOf("<body");
1180
+ return !!(r !== -1 && n !== -1 && r < n || e.includes("<html") && e.includes("<head") && e.includes("<body"));
1181
+ }, Ht = (s) => {
1182
+ s && (s.onload = () => {
1183
+ try {
1184
+ const e = s.contentDocument || s.contentWindow.document;
1185
+ s.style.height = e.body.scrollHeight + 100 + "px";
1186
+ } catch {
1187
+ s.style.height = "800px";
1188
+ }
1189
+ });
1190
+ }, Rt = {
1191
+ key: 0,
1192
+ class: "file-display"
1193
+ }, Tt = { class: "file-img overflow-hidden" }, _t = { class: "file-display__item--name ellipsis" }, vt = { class: "file-display__item--size" }, zt = {
1194
+ __name: "index",
1195
+ props: {
1196
+ fileList: {
1197
+ type: Array,
1198
+ default: () => []
1199
+ },
1200
+ showRemove: {
1201
+ type: Boolean,
1202
+ default: !0
1203
+ }
1204
+ },
1205
+ emits: ["remove-file"],
1206
+ setup(s, { emit: e }) {
1207
+ const { previewImage: r } = Ee(), n = e, t = (l, o) => {
1208
+ n("remove-file", l, o);
1209
+ }, i = (l) => {
1210
+ ce(l.suffix, l.url) ? r(l.url) : window.open(l.url, "_blank");
1211
+ };
1212
+ return (l, o) => {
1213
+ const a = ne("loading"), h = ne("ellipsis-tooltip");
1214
+ return s.fileList.length ? (y(), z("div", Rt, [
1215
+ (y(!0), z(Ie, null, Be(s.fileList, (c, g) => (y(), z("div", {
1216
+ key: g,
1217
+ class: "file-display__item"
1218
+ }, [
1219
+ le((y(), z("div", Tt, [
1220
+ $(ce)(c.suffix, c.url) ? (y(), C($(Ze), {
1221
+ key: 0,
1222
+ src: c.url,
1223
+ "zoom-rate": 1.2,
1224
+ "max-scale": 7,
1225
+ "min-scale": 0.2,
1226
+ onClick: (p) => i(c),
1227
+ fit: "cover"
1228
+ }, null, 8, ["src", "onClick"])) : (y(), C($(he), {
1229
+ key: 1,
1230
+ size: "38px"
1231
+ }, {
1232
+ default: ie(() => [
1233
+ (y(), C(Le($(qe)(c))))
1234
+ ]),
1235
+ _: 2
1236
+ }, 1024))
1237
+ ])), [
1238
+ [a, !c.url]
1239
+ ]),
1240
+ Q("div", null, [
1241
+ le((y(), z("p", _t, [
1242
+ Pe(ae(c.name), 1)
1243
+ ])), [
1244
+ [h, c.name]
1245
+ ]),
1246
+ Q("p", vt, [
1247
+ Q("span", null, ae($($t)(c.size)), 1)
1248
+ ])
1249
+ ]),
1250
+ s.showRemove ? (y(), C($(he), {
1251
+ key: 0,
1252
+ class: "icon",
1253
+ size: "18",
1254
+ onClick: (p) => t(g, c.bnid)
1255
+ }, {
1256
+ default: ie(() => [
1257
+ Ce($(De))
1258
+ ]),
1259
+ _: 1
1260
+ }, 8, ["onClick"])) : oe("", !0)
1261
+ ]))), 128))
1262
+ ])) : oe("", !0);
1263
+ };
1264
+ }
1265
+ }, Ft = /* @__PURE__ */ Me(zt, [["__scopeId", "data-v-605e6cc3"]]);
1266
+ export {
1267
+ Ft as F,
1268
+ Dt as a,
1269
+ qt as b,
1270
+ Nt as c,
1271
+ Ct as d,
1272
+ $t as f,
1273
+ Zt as g,
1274
+ Qt as i,
1275
+ Ot as m,
1276
+ Mt as r,
1277
+ Ht as s,
1278
+ Et as t
1279
+ };