@sakura-ui/sakura-ui 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/packages/forms/.turbo/turbo-build.log +2 -2
- package/packages/helper/.turbo/turbo-build.log +1 -1
- package/packages/markdown/.turbo/turbo-build.log +3 -3
- package/packages/markdown/dist/index.cjs.js +1 -1
- package/packages/markdown/dist/index.es.js +155 -149
- package/packages/markdown/dist/types/components/Markdown.d.ts.map +1 -1
- package/packages/markdown/dist/types/decorate.d.ts +2 -5
- package/packages/markdown/dist/types/decorate.d.ts.map +1 -1
- package/packages/markdown/dist/types/marked/attributes.d.ts +4 -7
- package/packages/markdown/dist/types/marked/attributes.d.ts.map +1 -1
- package/packages/markdown/dist/types/marked/registry.d.ts.map +1 -1
- package/packages/markdown/dist/types/marked/renderer.d.ts +4 -6
- package/packages/markdown/dist/types/marked/renderer.d.ts.map +1 -1
- package/packages/markdown/dist/types/marked/tokenizer.d.ts.map +1 -1
- package/packages/markdown/package.json +1 -1
- package/packages/markdown/src/components/Markdown.tsx +18 -4
- package/packages/markdown/src/decorate.ts +3 -8
- package/packages/markdown/src/marked/attributes.ts +4 -7
- package/packages/markdown/src/marked/directives/card.ts +2 -2
- package/packages/markdown/src/marked/html.ts +3 -3
- package/packages/markdown/src/marked/registry.ts +2 -5
- package/packages/markdown/src/marked/renderer.ts +4 -6
- package/packages/markdown/src/marked/tokenizer.ts +5 -7
- package/packages/markdown/tests/__snapshots__/Markdown.test.tsx.snap +50 -55
- package/packages/tailwind-theme-plugin/.turbo/turbo-build.log +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { styles as E,
|
|
1
|
+
import { styles as E, Ul as Er, Link as ss } from "@sakura-ui/core";
|
|
2
2
|
import St from "react";
|
|
3
3
|
var _t = { exports: {} }, et = {};
|
|
4
4
|
var Zn;
|
|
5
|
-
function
|
|
5
|
+
function is() {
|
|
6
6
|
if (Zn) return et;
|
|
7
7
|
Zn = 1;
|
|
8
8
|
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
@@ -25,7 +25,7 @@ function us() {
|
|
|
25
25
|
}
|
|
26
26
|
var tt = {};
|
|
27
27
|
var Xn;
|
|
28
|
-
function
|
|
28
|
+
function us() {
|
|
29
29
|
return Xn || (Xn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
30
|
function t(f) {
|
|
31
31
|
if (f == null) return null;
|
|
@@ -256,10 +256,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
256
256
|
})()), tt;
|
|
257
257
|
}
|
|
258
258
|
var Vn;
|
|
259
|
-
function
|
|
260
|
-
return Vn || (Vn = 1, process.env.NODE_ENV === "production" ? _t.exports =
|
|
259
|
+
function os() {
|
|
260
|
+
return Vn || (Vn = 1, process.env.NODE_ENV === "production" ? _t.exports = is() : _t.exports = us()), _t.exports;
|
|
261
261
|
}
|
|
262
|
-
var ee =
|
|
262
|
+
var ee = os();
|
|
263
263
|
function pn() {
|
|
264
264
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
265
265
|
}
|
|
@@ -282,14 +282,14 @@ function x(t, e = "") {
|
|
|
282
282
|
}, getRegex: () => new RegExp(n, e) };
|
|
283
283
|
return r;
|
|
284
284
|
}
|
|
285
|
-
var
|
|
285
|
+
var ls = ((t = "") => {
|
|
286
286
|
try {
|
|
287
287
|
return !!new RegExp("(?<=1)(?<!1)" + t);
|
|
288
288
|
} catch {
|
|
289
289
|
return !1;
|
|
290
290
|
}
|
|
291
|
-
})(), H = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: je((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: je((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: je((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: je((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: je((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: je((t) => new RegExp(`^ {0,${t}}>`)) },
|
|
292
|
-
]`).replace("lheading", Cr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() },
|
|
291
|
+
})(), H = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: je((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: je((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: je((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: je((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: je((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: je((t) => new RegExp(`^ {0,${t}}>`)) }, as = /^(?:[ \t]*(?:\n|$))+/, cs = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ps = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, at = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, fs = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, fn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, kr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Cr = x(kr).replace(/bull/g, fn).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}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), hs = x(kr).replace(/bull/g, fn).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}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), hn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, ds = /^[^\n]+/, dn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ds = x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", dn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gs = x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, fn).getRegex(), $t = "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", Dn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ms = x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\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", Dn).replace("tag", $t).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), xr = (t) => x(hn).replace("hr", at).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", t).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $t).getRegex(), Fs = xr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), As = xr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Es = x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", As).getRegex(), gn = { blockquote: Es, code: cs, def: Ds, fences: ps, heading: fs, hr: at, html: ms, lheading: Cr, list: gs, newline: as, paragraph: Fs, table: Re, text: ds }, Qn = x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", at).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $t).getRegex(), bs = { ...gn, lheading: hs, table: Qn, paragraph: x(hn).replace("hr", at).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Qn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $t).getRegex() }, ks = { ...gn, html: x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Dn).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: Re, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: x(hn).replace("hr", at).replace("heading", ` *#{1,6} *[^
|
|
292
|
+
]`).replace("lheading", Cr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Cs = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, xs = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Tr = /^( {2,}|\\)\n(?!\s*$)/, Ts = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, he = /[\p{P}\p{S}]/u, Ge = /[\s\p{P}\p{S}]/u, ct = /[^\s\p{P}\p{S}]/u, _s = x(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ge).getRegex(), ys = /[\p{Pi}\p{Ps}"']/u, _r = /(?!~)[\p{P}\p{S}]/u, ws = /(?!~)[\s\p{P}\p{S}]/u, Ss = /(?:[^\s\p{P}\p{S}]|~)/u, Rs = x(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ls ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), yr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Bs = x(yr, "u").replace(/punct/g, he).getRegex(), vs = x(yr, "u").replace(/punct/g, _r).getRegex(), Os = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, Ls = x(Os, "u").replace(/openQuote/g, ys).replace(/punct/g, he).getRegex(), wr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", $s = x(wr, "gu").replace(/notPunctSpace/g, ct).replace(/punctSpace/g, Ge).replace(/punct/g, he).getRegex(), Is = x(wr, "gu").replace(/notPunctSpace/g, Ss).replace(/punctSpace/g, ws).replace(/punct/g, _r).getRegex(), Ps = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", Ns = x(Ps, "gu").replace(/notPunctSpace/g, ct).replace(/punctSpace/g, Ge).replace(/punct/g, he).getRegex(), Ms = x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ct).replace(/punctSpace/g, Ge).replace(/punct/g, he).getRegex(), zs = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", Us = x(zs, "gu").replace(/notPunctSpace/g, ct).replace(/punctSpace/g, Ge).replace(/punct/g, he).getRegex(), js = x(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, he).getRegex(), Hs = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", qs = x(Hs, "gu").replace(/notPunctSpace/g, ct).replace(/punctSpace/g, Ge).replace(/punct/g, he).getRegex(), Gs = x(/\\(punct)/, "gu").replace(/punct/g, he).getRegex(), Ws = x(/^<(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(), Ys = x(Dn).replace("(?:-->|$)", "-->").getRegex(), Zs = x("^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", Ys).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Rt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Xs = x(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Rt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Sr = x(/^!?\[(label)\]\[(ref)\]/).replace("label", Rt).replace("ref", dn).getRegex(), Rr = x(/^!?\[(ref)\](?:\[\])?/).replace("ref", dn).getRegex(), Vs = x("reflink|nolink(?!\\()", "g").replace("reflink", Sr).replace("nolink", Rr).getRegex(), Kn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: Re, anyPunctuation: Gs, autolink: Ws, blockSkip: Rs, br: Tr, code: xs, del: Re, delLDelim: Re, delRDelim: Re, emStrongLDelim: Bs, emStrongRDelimAst: $s, emStrongRDelimUnd: Ms, escape: Cs, link: Xs, nolink: Rr, punctuation: _s, reflink: Sr, reflinkSearch: Vs, tag: Zs, text: Ts, url: Re }, Qs = { ...mn, emStrongLDelim: Ls, emStrongRDelimAst: Ns, emStrongRDelimUnd: Us, link: x(/^!?\[(label)\]\((.*?)\)/).replace("label", Rt).getRegex(), reflink: x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Rt).getRegex() }, un = { ...mn, emStrongRDelimAst: Is, emStrongLDelim: vs, delLDelim: js, delRDelim: qs, url: x(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Kn).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: x(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Kn).getRegex() }, Ks = { ...un, br: x(Tr).replace("{2,}", "*").getRegex(), text: x(un.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, yt = { normal: gn, gfm: bs, pedantic: ks }, nt = { normal: mn, gfm: un, breaks: Ks, pedantic: Qs }, Js = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Jn = (t) => Js[t];
|
|
293
293
|
function ce(t, e) {
|
|
294
294
|
if (e) {
|
|
295
295
|
if (H.escapeTest.test(t)) return t.replace(H.escapeReplace, Jn);
|
|
@@ -330,7 +330,7 @@ function nr(t) {
|
|
|
330
330
|
return e.length - n <= 2 ? t : e.slice(0, n + 1).join(`
|
|
331
331
|
`);
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function ei(t, e) {
|
|
334
334
|
if (t.indexOf(e[1]) === -1) return -1;
|
|
335
335
|
let n = 0;
|
|
336
336
|
for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
|
|
@@ -338,7 +338,7 @@ function ti(t, e) {
|
|
|
338
338
|
else if (t[r] === e[1] && (n--, n < 0)) return r;
|
|
339
339
|
return n > 0 ? -2 : -1;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function ti(t, e = 0) {
|
|
342
342
|
let n = e, r = "";
|
|
343
343
|
for (let s of t) if (s === " ") {
|
|
344
344
|
let u = 4 - n % 4;
|
|
@@ -352,7 +352,7 @@ function rr(t, e, n, r, s) {
|
|
|
352
352
|
let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: u, title: l, text: o, tokens: r.inlineTokens(o) };
|
|
353
353
|
return r.state.inLink = !1, c;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function ni(t, e, n) {
|
|
356
356
|
let r = t.match(n.other.indentCodeCompensation);
|
|
357
357
|
if (r === null) return e;
|
|
358
358
|
let s = r[1];
|
|
@@ -386,7 +386,7 @@ var Bt = class {
|
|
|
386
386
|
fences(t) {
|
|
387
387
|
let e = this.rules.block.fences.exec(t);
|
|
388
388
|
if (e) {
|
|
389
|
-
let n = e[0], r =
|
|
389
|
+
let n = e[0], r = ni(n, e[3] || "", this.rules);
|
|
390
390
|
return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
|
|
391
391
|
}
|
|
392
392
|
}
|
|
@@ -458,7 +458,7 @@ ${T}`, s = s.substring(0, s.length - O.text.length) + U.text;
|
|
|
458
458
|
let c = !1, h = "", g = "";
|
|
459
459
|
if (!(e = u.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
460
460
|
h = e[0], t = t.substring(h.length);
|
|
461
|
-
let m =
|
|
461
|
+
let m = ti(e[2].split(`
|
|
462
462
|
`, 1)[0], e[1].length), k = t.split(`
|
|
463
463
|
`, 1)[0], O = !m.trim(), T = 0;
|
|
464
464
|
if (this.options.pedantic ? (T = 2, g = m.trimStart()) : O ? T = e[1].length + 1 : (T = m.search(this.rules.other.nonSpaceChar), T = T > 4 ? 1 : T, g = m.slice(T), T += e[1].length), O && this.rules.other.blankLine.test(k) && (h += k + `
|
|
@@ -576,7 +576,7 @@ ${T}`, s = s.substring(0, s.length - O.text.length) + U.text;
|
|
|
576
576
|
let u = Ae(n.slice(0, -1), "\\");
|
|
577
577
|
if ((n.length - u.length) % 2 === 0) return;
|
|
578
578
|
} else {
|
|
579
|
-
let u =
|
|
579
|
+
let u = ei(e[2], "()");
|
|
580
580
|
if (u === -2) return;
|
|
581
581
|
if (u > -1) {
|
|
582
582
|
let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + u;
|
|
@@ -1400,10 +1400,10 @@ y.options = y.setOptions = function(t) {
|
|
|
1400
1400
|
};
|
|
1401
1401
|
y.getDefaults = pn;
|
|
1402
1402
|
y.defaults = ve;
|
|
1403
|
-
function
|
|
1403
|
+
function ri(...t) {
|
|
1404
1404
|
return Be.use(...t), y.defaults = Be.defaults, br(y.defaults), y;
|
|
1405
1405
|
}
|
|
1406
|
-
y.use =
|
|
1406
|
+
y.use = ri;
|
|
1407
1407
|
y.walkTokens = function(t, e) {
|
|
1408
1408
|
return Be.walkTokens(t, e);
|
|
1409
1409
|
};
|
|
@@ -1423,8 +1423,8 @@ y.walkTokens;
|
|
|
1423
1423
|
y.parseInline;
|
|
1424
1424
|
ie.parse;
|
|
1425
1425
|
se.lex;
|
|
1426
|
-
const
|
|
1427
|
-
class
|
|
1426
|
+
const si = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, ii = Object.hasOwnProperty;
|
|
1427
|
+
class ui {
|
|
1428
1428
|
/**
|
|
1429
1429
|
* Create a new slug class.
|
|
1430
1430
|
*/
|
|
@@ -1447,9 +1447,9 @@ class oi {
|
|
|
1447
1447
|
*/
|
|
1448
1448
|
slug(e, n) {
|
|
1449
1449
|
const r = this;
|
|
1450
|
-
let s =
|
|
1450
|
+
let s = oi(e, n === !0);
|
|
1451
1451
|
const u = s;
|
|
1452
|
-
for (;
|
|
1452
|
+
for (; ii.call(r.occurrences, s); )
|
|
1453
1453
|
r.occurrences[u]++, s = u + "-" + r.occurrences[u];
|
|
1454
1454
|
return r.occurrences[s] = 0, s;
|
|
1455
1455
|
}
|
|
@@ -1462,24 +1462,24 @@ class oi {
|
|
|
1462
1462
|
this.occurrences = /* @__PURE__ */ Object.create(null);
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1466
|
-
return typeof t != "string" ? "" : (e || (t = t.toLowerCase()), t.replace(
|
|
1465
|
+
function oi(t, e) {
|
|
1466
|
+
return typeof t != "string" ? "" : (e || (t = t.toLowerCase()), t.replace(si, "").replace(/ /g, "-"));
|
|
1467
1467
|
}
|
|
1468
|
-
const
|
|
1468
|
+
const li = {
|
|
1469
1469
|
"&": "&",
|
|
1470
1470
|
"<": "<",
|
|
1471
1471
|
">": ">",
|
|
1472
1472
|
'"': """,
|
|
1473
1473
|
"'": "'"
|
|
1474
|
-
},
|
|
1474
|
+
}, ai = (t) => String(t).replace(/[&<>"']/g, (e) => li[e] ?? e), ci = (t) => Array.from(t).filter((e) => {
|
|
1475
1475
|
const n = e.codePointAt(0) ?? 0;
|
|
1476
1476
|
return n > 31 && n !== 127;
|
|
1477
1477
|
}).join(""), Ot = (t) => {
|
|
1478
1478
|
if (t == null || t === "") return;
|
|
1479
|
-
const e =
|
|
1479
|
+
const e = ci(String(t)).trim();
|
|
1480
1480
|
if (!/^(?:javascript|vbscript|file):/i.test(e) && !/^data:/i.test(e))
|
|
1481
1481
|
return e;
|
|
1482
|
-
},
|
|
1482
|
+
}, pi = (t) => Object.entries(t).filter(([, e]) => e != null && e !== !1 && e !== "").map(([e, n]) => n === !0 ? ` ${e}` : ` ${e}="${ai(n)}"`).join(""), L = (...t) => t.filter(Boolean).join(" ").split(/\s+/).filter(Boolean).join(" "), fi = {
|
|
1483
1483
|
h1: E.headingStyle.h1,
|
|
1484
1484
|
h2: E.headingStyle.h2,
|
|
1485
1485
|
h3: E.headingStyle.h3,
|
|
@@ -1496,10 +1496,10 @@ const ai = {
|
|
|
1496
1496
|
tr: E.tableBorderStyle,
|
|
1497
1497
|
td: L(E.tdStyle, E.tableBorderStyle),
|
|
1498
1498
|
a: E.linkStyle
|
|
1499
|
-
},
|
|
1499
|
+
}, hi = (t) => t.hasAttribute("data-sakura"), di = (t, e) => {
|
|
1500
1500
|
const n = L(t.getAttribute("class") ?? "", e);
|
|
1501
1501
|
n && t.setAttribute("class", n);
|
|
1502
|
-
},
|
|
1502
|
+
}, Di = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]), gi = (t, e) => {
|
|
1503
1503
|
if (t.querySelector("[data-sakura-new-tab]")) return;
|
|
1504
1504
|
const n = e.createElement("span");
|
|
1505
1505
|
n.setAttribute("aria-hidden", "true"), n.setAttribute("data-sakura-new-tab", "true"), n.setAttribute(
|
|
@@ -1508,14 +1508,14 @@ const ai = {
|
|
|
1508
1508
|
), n.textContent = "open_in_new";
|
|
1509
1509
|
const r = e.createElement("span");
|
|
1510
1510
|
r.setAttribute("class", "sr-only"), r.textContent = "Opens in new tab", t.append(n, r);
|
|
1511
|
-
},
|
|
1512
|
-
const { shiftHeading: r, tocMaxDepth: s } = n, u = new
|
|
1511
|
+
}, mi = (t) => Math.min(6, Math.max(1, t)), Fi = (t, e, n) => {
|
|
1512
|
+
const { shiftHeading: r, tocMaxDepth: s } = n, u = new ui(), l = [];
|
|
1513
1513
|
if (r !== 0)
|
|
1514
1514
|
for (const o of Array.from(
|
|
1515
1515
|
t.querySelectorAll("h1,h2,h3,h4,h5,h6")
|
|
1516
1516
|
)) {
|
|
1517
1517
|
const c = Number(o.tagName[1]), h = e.createElement(
|
|
1518
|
-
`h${
|
|
1518
|
+
`h${mi(c + r)}`
|
|
1519
1519
|
);
|
|
1520
1520
|
for (const g of Array.from(o.attributes))
|
|
1521
1521
|
h.setAttribute(g.name, g.value);
|
|
@@ -1523,16 +1523,16 @@ const ai = {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
for (const o of Array.from(t.querySelectorAll("*"))) {
|
|
1525
1525
|
const c = o.tagName.toLowerCase();
|
|
1526
|
-
if (
|
|
1526
|
+
if (Di.has(c)) {
|
|
1527
1527
|
const g = o.textContent ?? "", m = o.getAttribute("id");
|
|
1528
1528
|
m && u.slug(m);
|
|
1529
1529
|
const k = m || u.slug(g);
|
|
1530
1530
|
o.setAttribute("id", k), l.push({ id: k, depth: Number(c[1]) - r, value: g });
|
|
1531
1531
|
}
|
|
1532
|
-
if (
|
|
1533
|
-
c === "a" && ((o.getAttribute("href") ?? "").startsWith("http") || o.getAttribute("target") === "_blank") && (o.setAttribute("target", "_blank"), o.setAttribute("rel", "noopener noreferrer"),
|
|
1534
|
-
const h =
|
|
1535
|
-
h &&
|
|
1532
|
+
if (hi(o)) continue;
|
|
1533
|
+
c === "a" && ((o.getAttribute("href") ?? "").startsWith("http") || o.getAttribute("target") === "_blank") && (o.setAttribute("target", "_blank"), o.setAttribute("rel", "noopener noreferrer"), gi(o, e));
|
|
1534
|
+
const h = fi[c];
|
|
1535
|
+
h && di(o, h);
|
|
1536
1536
|
}
|
|
1537
1537
|
for (const o of Array.from(t.querySelectorAll("table"))) {
|
|
1538
1538
|
if (o.parentElement?.dataset?.sakuraTableContainer === "true") continue;
|
|
@@ -1542,7 +1542,7 @@ const ai = {
|
|
|
1542
1542
|
return {
|
|
1543
1543
|
headings: l.filter((o) => o.depth <= s)
|
|
1544
1544
|
};
|
|
1545
|
-
}, Kt = /([#.])?([A-Za-z_:][-A-Za-z0-9_.:]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'{}]+)))?/g, vr = "#id",
|
|
1545
|
+
}, Kt = /([#.])?([A-Za-z_:][-A-Za-z0-9_.:]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'{}]+)))?/g, vr = "#id", Ai = (t) => {
|
|
1546
1546
|
const e = {};
|
|
1547
1547
|
if (!t) return e;
|
|
1548
1548
|
Kt.lastIndex = 0;
|
|
@@ -1575,8 +1575,8 @@ const ai = {
|
|
|
1575
1575
|
r && (n = r.value, e = r.end);
|
|
1576
1576
|
let s = {};
|
|
1577
1577
|
const u = sr(t, e, "{", "}");
|
|
1578
|
-
return u && (s =
|
|
1579
|
-
}, J = "container", pe = "leaf", Lt = "text",
|
|
1578
|
+
return u && (s = Ai(u.value), e = u.end), { label: n, attrs: s, end: e };
|
|
1579
|
+
}, J = "container", pe = "leaf", Lt = "text", Ei = {
|
|
1580
1580
|
card: [J],
|
|
1581
1581
|
"card-img": [pe],
|
|
1582
1582
|
"card-title": [pe, J],
|
|
@@ -1589,10 +1589,10 @@ const ai = {
|
|
|
1589
1589
|
"cell-img": [pe],
|
|
1590
1590
|
youtube: [pe, J],
|
|
1591
1591
|
"link-button": [Lt]
|
|
1592
|
-
}, Lr = /^grid-cols-(?:1[0-2]|[1-9])$/, $r = (t, e) => Lr.test(t) ? e === J : (
|
|
1592
|
+
}, Lr = /^grid-cols-(?:1[0-2]|[1-9])$/, $r = (t, e) => Lr.test(t) ? e === J : (Ei[t] ?? []).includes(e), bi = L(E.cardImgStyle, "w-full aspect-[352/226]"), ki = (t, e) => `<span aria-hidden="true" class="${L(
|
|
1593
1593
|
E.iconSizeStyle[16],
|
|
1594
1594
|
E.iconStyle
|
|
1595
|
-
)}">${t}</span><span class="sr-only">${e}</span>`,
|
|
1595
|
+
)}">${t}</span><span class="sr-only">${e}</span>`, Ci = {
|
|
1596
1596
|
card: ({ token: t, attrs: e, root: n, body: r, nl: s }) => {
|
|
1597
1597
|
const u = !!t.linked, l = L(
|
|
1598
1598
|
E.cardStyle,
|
|
@@ -1604,7 +1604,7 @@ const ai = {
|
|
|
1604
1604
|
return t.listed ? `<li class="sm:grid">${o}</li>${s}` : `${o}${s}`;
|
|
1605
1605
|
},
|
|
1606
1606
|
"card-img": ({ attrs: t, root: e, nl: n }) => `<img${e({
|
|
1607
|
-
class: L(
|
|
1607
|
+
class: L(bi, t.class),
|
|
1608
1608
|
src: Ot(t.src),
|
|
1609
1609
|
alt: t.alt ?? ""
|
|
1610
1610
|
})}>${n}`,
|
|
@@ -1633,12 +1633,12 @@ const ai = {
|
|
|
1633
1633
|
const o = `<span class="${L(
|
|
1634
1634
|
E.linkCardArrowStyle,
|
|
1635
1635
|
E.linkCardArrowHoverStyle
|
|
1636
|
-
)}">${
|
|
1636
|
+
)}">${ki("arrow_forward", "")}</span>`;
|
|
1637
1637
|
return `<div${n({ class: l })}><span>${r()}</span>${o}</div>${s}`;
|
|
1638
1638
|
}
|
|
1639
1639
|
return `<div${n({ class: l })}>${r()}</div>${s}`;
|
|
1640
1640
|
}
|
|
1641
|
-
},
|
|
1641
|
+
}, xi = {
|
|
1642
1642
|
faq: ({ root: t, body: e, nl: n }) => `<dl${t({ class: L(E.faqStyle) })}>${e()}</dl>${n}`,
|
|
1643
1643
|
"faq-q": ({ root: t, body: e, nl: n }) => `<dt${t({
|
|
1644
1644
|
class: L(E.questionStyle, E.faqMarkerStyle)
|
|
@@ -1649,7 +1649,7 @@ const ai = {
|
|
|
1649
1649
|
E.faqMarkerStyle,
|
|
1650
1650
|
"!leading-none"
|
|
1651
1651
|
)}" aria-hidden="true">A</span><span>${e()}</span></dd>${n}`
|
|
1652
|
-
},
|
|
1652
|
+
}, Ti = {
|
|
1653
1653
|
1: "md:grid-cols-1",
|
|
1654
1654
|
2: "md:grid-cols-2",
|
|
1655
1655
|
3: "md:grid-cols-3",
|
|
@@ -1662,54 +1662,54 @@ const ai = {
|
|
|
1662
1662
|
10: "md:grid-cols-6",
|
|
1663
1663
|
11: "md:grid-cols-6",
|
|
1664
1664
|
12: "md:grid-cols-12"
|
|
1665
|
-
},
|
|
1665
|
+
}, _i = ({ token: t, root: e, body: n, nl: r }) => {
|
|
1666
1666
|
const s = Number(t.name.slice(10)), u = L(
|
|
1667
1667
|
"flex flex-col md:grid",
|
|
1668
|
-
|
|
1668
|
+
Ti[s],
|
|
1669
1669
|
"gap-8"
|
|
1670
1670
|
), l = t.listed ? "ul" : "div";
|
|
1671
1671
|
return `<${l}${e({ class: u })}>${n()}</${l}>${r}`;
|
|
1672
|
-
},
|
|
1672
|
+
}, yi = {
|
|
1673
1673
|
cell: ({ attrs: t, root: e, body: n, nl: r }) => `<div${e({ class: t.class })}>${n()}</div>${r}`,
|
|
1674
1674
|
"cell-img": ({ attrs: t, root: e, nl: n }) => `<img${e({
|
|
1675
1675
|
class: L("mb-4", t.class),
|
|
1676
1676
|
src: Ot(t.src),
|
|
1677
1677
|
alt: t.alt ?? ""
|
|
1678
1678
|
})}>${n}`
|
|
1679
|
-
},
|
|
1679
|
+
}, wi = L(
|
|
1680
1680
|
E.buttonBaseStyle,
|
|
1681
1681
|
E.getButtonVariantStyle("secondary"),
|
|
1682
1682
|
E.getButtonSizeStyle("lg")
|
|
1683
|
-
),
|
|
1683
|
+
), Si = {
|
|
1684
1684
|
"link-button": ({ attrs: t, root: e, body: n }) => `<a${e({
|
|
1685
|
-
class:
|
|
1685
|
+
class: wi,
|
|
1686
1686
|
href: Ot(t.href)
|
|
1687
1687
|
})}>${n()}</a>`
|
|
1688
|
-
},
|
|
1688
|
+
}, Ri = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", Bi = "strict-origin-when-cross-origin", vi = /^[\w-]{11}$/, Oi = /(?:youtu\.be\/|[?&]v=|\/embed\/|\/shorts\/)([\w-]{11})/, Li = (t) => t ? vi.test(t) ? t : Oi.exec(t)?.[1] ?? t : "", $i = {
|
|
1689
1689
|
youtube: ({ token: t, attrs: e, root: n, nl: r, parser: s }) => {
|
|
1690
1690
|
const u = s.parseInline(t.tokens, s.textRenderer);
|
|
1691
1691
|
return `<iframe${n({
|
|
1692
1692
|
title: u,
|
|
1693
|
-
src: `https://www.youtube-nocookie.com/embed/${encodeURIComponent(
|
|
1693
|
+
src: `https://www.youtube-nocookie.com/embed/${encodeURIComponent(Li(e.video))}`,
|
|
1694
1694
|
class: "aspect-video w-full max-w-[470px]",
|
|
1695
1695
|
style: e.width ? `width:${e.width}px` : void 0,
|
|
1696
1696
|
frameborder: "0",
|
|
1697
|
-
allow:
|
|
1698
|
-
referrerpolicy:
|
|
1697
|
+
allow: Ri,
|
|
1698
|
+
referrerpolicy: Bi,
|
|
1699
1699
|
allowfullscreen: !0,
|
|
1700
1700
|
loading: "lazy"
|
|
1701
1701
|
})}></iframe>${r}`;
|
|
1702
1702
|
}
|
|
1703
|
-
},
|
|
1703
|
+
}, Ii = {
|
|
1704
|
+
...Ci,
|
|
1705
|
+
...yi,
|
|
1704
1706
|
...xi,
|
|
1705
|
-
|
|
1706
|
-
...
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
}, Ni = (t) => Pi[t] ?? (Lr.test(t) ? yi : void 0);
|
|
1710
|
-
function Mi(t, e) {
|
|
1707
|
+
...$i,
|
|
1708
|
+
...Si
|
|
1709
|
+
}, Pi = (t) => Ii[t] ?? (Lr.test(t) ? _i : void 0);
|
|
1710
|
+
function Ni(t, e) {
|
|
1711
1711
|
const { name: n, kind: r, attrs: s, tokens: u } = t, l = r === Lt ? "" : `
|
|
1712
|
-
`, o = (g) =>
|
|
1712
|
+
`, o = (g) => pi({ ...g, "data-sakura": n }), c = {
|
|
1713
1713
|
token: t,
|
|
1714
1714
|
attrs: s,
|
|
1715
1715
|
nl: l,
|
|
@@ -1718,10 +1718,10 @@ function Mi(t, e) {
|
|
|
1718
1718
|
body: () => r === J ? this.parser.parse(u) : this.parser.parseInline(u),
|
|
1719
1719
|
parser: this.parser,
|
|
1720
1720
|
options: e
|
|
1721
|
-
}, h =
|
|
1721
|
+
}, h = Pi(n);
|
|
1722
1722
|
return h ? h(c) : c.body() + l;
|
|
1723
1723
|
}
|
|
1724
|
-
const
|
|
1724
|
+
const Mi = /^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/, zi = /^:([A-Za-z][A-Za-z0-9_-]*)/, Ui = (t, e) => {
|
|
1725
1725
|
const n = new RegExp(`^:{${e},}[ \\t]*$`);
|
|
1726
1726
|
let r = 0;
|
|
1727
1727
|
for (const s of t.split(`
|
|
@@ -1734,13 +1734,13 @@ const zi = /^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/, Ui = /^:([A-Za-z][A-Za-z0-9_-]*)/
|
|
|
1734
1734
|
r += s.length + 1;
|
|
1735
1735
|
}
|
|
1736
1736
|
return null;
|
|
1737
|
-
},
|
|
1737
|
+
}, ji = (t) => {
|
|
1738
1738
|
const e = /\n:{2,}[A-Za-z]/.exec(t);
|
|
1739
1739
|
return e ? e.index : void 0;
|
|
1740
|
-
},
|
|
1740
|
+
}, Hi = (t) => {
|
|
1741
1741
|
const e = /:[A-Za-z][A-Za-z0-9_-]*\[/.exec(t);
|
|
1742
1742
|
return e ? e.index : void 0;
|
|
1743
|
-
},
|
|
1743
|
+
}, qi = (t) => {
|
|
1744
1744
|
if (!/^grid-cols-\d+$/.test(t.name)) return;
|
|
1745
1745
|
const e = t.tokens.filter((r) => r.type !== "space"), n = e.filter(
|
|
1746
1746
|
(r) => r.type === "directive" && r.name === "card"
|
|
@@ -1749,7 +1749,7 @@ const zi = /^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/, Ui = /^:([A-Za-z][A-Za-z0-9_-]*)/
|
|
|
1749
1749
|
t.listed = !0;
|
|
1750
1750
|
for (const r of n) r.listed = !0;
|
|
1751
1751
|
}
|
|
1752
|
-
},
|
|
1752
|
+
}, Gi = (t) => {
|
|
1753
1753
|
if (t.name !== "card" || !t.attrs.href) return;
|
|
1754
1754
|
const e = t.tokens;
|
|
1755
1755
|
if (e.some(
|
|
@@ -1760,8 +1760,8 @@ const zi = /^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/, Ui = /^:([A-Za-z][A-Za-z0-9_-]*)/
|
|
|
1760
1760
|
r.type === "directive" && (r.name === "card-title" || r.name === "card-footer") && (r.inherited = { behavior: "link", href: t.attrs.href ?? "" });
|
|
1761
1761
|
}
|
|
1762
1762
|
};
|
|
1763
|
-
function
|
|
1764
|
-
const e =
|
|
1763
|
+
function Wi(t) {
|
|
1764
|
+
const e = Mi.exec(t);
|
|
1765
1765
|
if (!e) return;
|
|
1766
1766
|
const [, n, r] = e, s = n.length >= 3 ? J : pe;
|
|
1767
1767
|
if (!$r(r, s)) return;
|
|
@@ -1777,13 +1777,13 @@ function Yi(t) {
|
|
|
1777
1777
|
};
|
|
1778
1778
|
if (s === pe)
|
|
1779
1779
|
return u.label && this.lexer.inline(u.label, c.tokens), c;
|
|
1780
|
-
const h = t.slice(o), g =
|
|
1780
|
+
const h = t.slice(o), g = Ui(h, n.length);
|
|
1781
1781
|
return c.raw = t.slice(0, o + (g ? g.rawEnd : h.length)), c.tokens = this.lexer.blockTokens(
|
|
1782
1782
|
g ? h.slice(0, g.contentEnd) : h
|
|
1783
|
-
),
|
|
1783
|
+
), Gi(c), qi(c), c;
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1786
|
-
const e =
|
|
1785
|
+
function Yi(t) {
|
|
1786
|
+
const e = zi.exec(t);
|
|
1787
1787
|
if (!e) return;
|
|
1788
1788
|
const [, n] = e;
|
|
1789
1789
|
if (!$r(n, Lt)) return;
|
|
@@ -1798,21 +1798,21 @@ function Zi(t) {
|
|
|
1798
1798
|
raw: t.slice(0, r.end)
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
|
-
const
|
|
1801
|
+
const Zi = (t) => ({
|
|
1802
1802
|
extensions: [
|
|
1803
1803
|
{
|
|
1804
1804
|
name: "directive",
|
|
1805
1805
|
level: "inline",
|
|
1806
|
-
start:
|
|
1807
|
-
tokenizer:
|
|
1806
|
+
start: Hi,
|
|
1807
|
+
tokenizer: Yi
|
|
1808
1808
|
},
|
|
1809
1809
|
{
|
|
1810
1810
|
name: "directive",
|
|
1811
1811
|
level: "block",
|
|
1812
|
-
start:
|
|
1813
|
-
tokenizer:
|
|
1812
|
+
start: ji,
|
|
1813
|
+
tokenizer: Wi,
|
|
1814
1814
|
renderer(e) {
|
|
1815
|
-
return
|
|
1815
|
+
return Ni.call(
|
|
1816
1816
|
this,
|
|
1817
1817
|
e,
|
|
1818
1818
|
t
|
|
@@ -1826,10 +1826,10 @@ function ir(t, e) {
|
|
|
1826
1826
|
for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
|
|
1827
1827
|
return r;
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1829
|
+
function Xi(t) {
|
|
1830
1830
|
if (Array.isArray(t)) return t;
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1832
|
+
function Vi(t, e) {
|
|
1833
1833
|
var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
1834
1834
|
if (n != null) {
|
|
1835
1835
|
var r, s, u, l, o = [], c = !0, h = !1;
|
|
@@ -1847,21 +1847,21 @@ function Qi(t, e) {
|
|
|
1847
1847
|
return o;
|
|
1848
1848
|
}
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function Qi() {
|
|
1851
1851
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1852
1852
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1853
1853
|
}
|
|
1854
|
-
function
|
|
1855
|
-
return
|
|
1854
|
+
function Ki(t, e) {
|
|
1855
|
+
return Xi(t) || Vi(t, e) || Ji(t, e) || Qi();
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function Ji(t, e) {
|
|
1858
1858
|
if (t) {
|
|
1859
1859
|
if (typeof t == "string") return ir(t, e);
|
|
1860
1860
|
var n = {}.toString.call(t).slice(8, -1);
|
|
1861
1861
|
return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ir(t, e) : void 0;
|
|
1862
1862
|
}
|
|
1863
1863
|
}
|
|
1864
|
-
const Ir = Object.entries, ur = Object.setPrototypeOf,
|
|
1864
|
+
const Ir = Object.entries, ur = Object.setPrototypeOf, eu = Object.isFrozen, tu = Object.getPrototypeOf, nu = Object.getOwnPropertyDescriptor;
|
|
1865
1865
|
let N = Object.freeze, z = Object.seal, He = Object.create, Pr = typeof Reflect < "u" && Reflect, an = Pr.apply, cn = Pr.construct;
|
|
1866
1866
|
N || (N = function(e) {
|
|
1867
1867
|
return e;
|
|
@@ -1879,7 +1879,7 @@ cn || (cn = function(e) {
|
|
|
1879
1879
|
r[s - 1] = arguments[s];
|
|
1880
1880
|
return new e(...r);
|
|
1881
1881
|
});
|
|
1882
|
-
const Se = P(Array.prototype.forEach),
|
|
1882
|
+
const Se = P(Array.prototype.forEach), ru = P(Array.prototype.lastIndexOf), or = P(Array.prototype.pop), rt = P(Array.prototype.push), su = P(Array.prototype.splice), qe = Array.isArray, lt = P(String.prototype.toLowerCase), Jt = P(String.prototype.toString), lr = P(String.prototype.match), st = P(String.prototype.replace), ar = P(String.prototype.indexOf), iu = P(String.prototype.trim), uu = P(Number.prototype.toString), ou = P(Boolean.prototype.toString), cr = typeof BigInt > "u" ? null : P(BigInt.prototype.toString), pr = typeof Symbol > "u" ? null : P(Symbol.prototype.toString), Z = P(Object.prototype.hasOwnProperty), it = P(Object.prototype.toString), j = P(RegExp.prototype.test), we = lu(TypeError);
|
|
1883
1883
|
function P(t) {
|
|
1884
1884
|
return function(e) {
|
|
1885
1885
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -1888,7 +1888,7 @@ function P(t) {
|
|
|
1888
1888
|
return an(t, e, r);
|
|
1889
1889
|
};
|
|
1890
1890
|
}
|
|
1891
|
-
function
|
|
1891
|
+
function lu(t) {
|
|
1892
1892
|
return function() {
|
|
1893
1893
|
for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
|
|
1894
1894
|
n[r] = arguments[r];
|
|
@@ -1904,13 +1904,13 @@ function _(t, e) {
|
|
|
1904
1904
|
let s = e[r];
|
|
1905
1905
|
if (typeof s == "string") {
|
|
1906
1906
|
const u = n(s);
|
|
1907
|
-
u !== s && (
|
|
1907
|
+
u !== s && (eu(e) || (e[r] = u), s = u);
|
|
1908
1908
|
}
|
|
1909
1909
|
t[s] = !0;
|
|
1910
1910
|
}
|
|
1911
1911
|
return t;
|
|
1912
1912
|
}
|
|
1913
|
-
function
|
|
1913
|
+
function au(t) {
|
|
1914
1914
|
for (let e = 0; e < t.length; e++)
|
|
1915
1915
|
Z(t, e) || (t[e] = null);
|
|
1916
1916
|
return t;
|
|
@@ -1918,20 +1918,20 @@ function cu(t) {
|
|
|
1918
1918
|
function V(t) {
|
|
1919
1919
|
const e = He(null);
|
|
1920
1920
|
for (const r of Ir(t)) {
|
|
1921
|
-
var n =
|
|
1921
|
+
var n = Ki(r, 2);
|
|
1922
1922
|
const s = n[0], u = n[1];
|
|
1923
|
-
Z(t, s) && (qe(u) ? e[s] =
|
|
1923
|
+
Z(t, s) && (qe(u) ? e[s] = au(u) : u && typeof u == "object" && u.constructor === Object ? e[s] = V(u) : e[s] = u);
|
|
1924
1924
|
}
|
|
1925
1925
|
return e;
|
|
1926
1926
|
}
|
|
1927
|
-
function
|
|
1927
|
+
function cu(t) {
|
|
1928
1928
|
switch (typeof t) {
|
|
1929
1929
|
case "string":
|
|
1930
1930
|
return t;
|
|
1931
1931
|
case "number":
|
|
1932
|
-
return
|
|
1932
|
+
return uu(t);
|
|
1933
1933
|
case "boolean":
|
|
1934
|
-
return
|
|
1934
|
+
return ou(t);
|
|
1935
1935
|
case "bigint":
|
|
1936
1936
|
return cr ? cr(t) : "0";
|
|
1937
1937
|
case "symbol":
|
|
@@ -1955,34 +1955,34 @@ function pu(t) {
|
|
|
1955
1955
|
}
|
|
1956
1956
|
function re(t, e) {
|
|
1957
1957
|
for (; t !== null; ) {
|
|
1958
|
-
const r =
|
|
1958
|
+
const r = nu(t, e);
|
|
1959
1959
|
if (r) {
|
|
1960
1960
|
if (r.get)
|
|
1961
1961
|
return P(r.get);
|
|
1962
1962
|
if (typeof r.value == "function")
|
|
1963
1963
|
return P(r.value);
|
|
1964
1964
|
}
|
|
1965
|
-
t =
|
|
1965
|
+
t = tu(t);
|
|
1966
1966
|
}
|
|
1967
1967
|
function n() {
|
|
1968
1968
|
return null;
|
|
1969
1969
|
}
|
|
1970
1970
|
return n;
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1972
|
+
function pu(t) {
|
|
1973
1973
|
try {
|
|
1974
1974
|
return j(t, ""), !0;
|
|
1975
1975
|
} catch {
|
|
1976
1976
|
return !1;
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
|
-
const fr = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), en = N(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), tn = N(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]),
|
|
1979
|
+
const fr = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), en = N(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), tn = N(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), fu = N(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), nn = N(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), hu = N(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), hr = N(["#text"]), dr = N(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), rn = N(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Dr = N(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), wt = N(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), du = z(/{{[\w\W]*|^[\w\W]*}}/g), Du = z(/<%[\w\W]*|^[\w\W]*%>/g), gu = z(/\${[\w\W]*/g), mu = z(/^data-[\-\w.\u00B7-\uFFFF]+$/), Fu = z(/^aria-[\-\w]+$/), gr = z(
|
|
1980
1980
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
1981
1981
|
// eslint-disable-line no-useless-escape
|
|
1982
|
-
),
|
|
1982
|
+
), Au = z(/^(?:\w+script|data):/i), Eu = z(
|
|
1983
1983
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
1984
1984
|
// eslint-disable-line no-control-regex
|
|
1985
|
-
),
|
|
1985
|
+
), bu = z(/^html$/i), ku = z(/^[a-z][.\w]*(-[.\w]+)+$/i), mr = z(/<[/\w!]/g), Fr = z(/<[/\w]/g), Cu = z(/<\/no(script|embed|frames)/i), xu = z(/\/>/i), X = {
|
|
1986
1986
|
element: 1,
|
|
1987
1987
|
attribute: 2,
|
|
1988
1988
|
text: 3,
|
|
@@ -1998,14 +1998,14 @@ const fr = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
1998
1998
|
documentFragment: 11,
|
|
1999
1999
|
notation: 12
|
|
2000
2000
|
// Deprecated
|
|
2001
|
-
}, Nr = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"],
|
|
2001
|
+
}, Nr = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], Tu = N(_({}, Nr)), _u = (function() {
|
|
2002
2002
|
const t = {};
|
|
2003
2003
|
return Se(Nr, (e) => {
|
|
2004
2004
|
t[e] = z(new RegExp("</" + e + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
2005
2005
|
}), N(t);
|
|
2006
|
-
})(),
|
|
2006
|
+
})(), yu = function() {
|
|
2007
2007
|
return typeof window > "u" ? null : window;
|
|
2008
|
-
},
|
|
2008
|
+
}, wu = function(e, n) {
|
|
2009
2009
|
if (typeof e != "object" || typeof e.createPolicy != "function")
|
|
2010
2010
|
return null;
|
|
2011
2011
|
let r = null;
|
|
@@ -2043,7 +2043,7 @@ const fr = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
2043
2043
|
return s && typeof s == "object" ? V(s) : r();
|
|
2044
2044
|
};
|
|
2045
2045
|
function Mr() {
|
|
2046
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
2046
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : yu();
|
|
2047
2047
|
const e = (d) => Mr(d);
|
|
2048
2048
|
if (e.version = "3.4.14", e.removed = [], !t || !t.document || t.document.nodeType !== X.document || !t.Element)
|
|
2049
2049
|
return e.isSupported = !1, e;
|
|
@@ -2080,11 +2080,11 @@ function Mr() {
|
|
|
2080
2080
|
de--;
|
|
2081
2081
|
}
|
|
2082
2082
|
}, ht = function() {
|
|
2083
|
-
return Oe || (Ye =
|
|
2083
|
+
return Oe || (Ye = wu(m, s), Oe = !0), Ye;
|
|
2084
2084
|
}, xe = n, Le = xe.implementation, Ze = xe.createNodeIterator, f = xe.createDocumentFragment, C = xe.getElementsByTagName, S = r.importNode;
|
|
2085
2085
|
let b = Ar();
|
|
2086
2086
|
e.isSupported = typeof Ir == "function" && typeof te == "function" && Le && Le.createHTMLDocument !== void 0;
|
|
2087
|
-
const $e =
|
|
2087
|
+
const $e = du, Xe = Du, $ = gu, De = mu, Ve = Fu, It = Au, An = Eu, Ur = ku;
|
|
2088
2088
|
let En = gr, R = null;
|
|
2089
2089
|
const Pt = _({}, [...fr, ...en, ...tn, ...nn, ...hr]);
|
|
2090
2090
|
let B = null;
|
|
@@ -2201,7 +2201,7 @@ function Mr() {
|
|
|
2201
2201
|
transform: I
|
|
2202
2202
|
}), bn = Ee(i, "FORBID_ATTR", V({}), {
|
|
2203
2203
|
transform: I
|
|
2204
|
-
}), Pe = Z(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? V(i.USE_PROFILES) : i.USE_PROFILES : !1, kn = i.ALLOW_ARIA_ATTR !== !1, Mt = i.ALLOW_DATA_ATTR !== !1, Cn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, xn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, me = i.SAFE_FOR_TEMPLATES || !1, Te = i.SAFE_FOR_XML !== !1, _e = i.WHOLE_DOCUMENT || !1, Ie = i.RETURN_DOM || !1, gt = i.RETURN_DOM_FRAGMENT || !1, mt = i.RETURN_TRUSTED_TYPE || !1, Ut = i.FORCE_BODY || !1, Tn = i.SANITIZE_DOM !== !1, _n = i.SANITIZE_NAMED_PROPS || !1, jt = i.KEEP_CONTENT !== !1, Ht = i.IN_PLACE || !1, En =
|
|
2204
|
+
}), Pe = Z(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? V(i.USE_PROFILES) : i.USE_PROFILES : !1, kn = i.ALLOW_ARIA_ATTR !== !1, Mt = i.ALLOW_DATA_ATTR !== !1, Cn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, xn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, me = i.SAFE_FOR_TEMPLATES || !1, Te = i.SAFE_FOR_XML !== !1, _e = i.WHOLE_DOCUMENT || !1, Ie = i.RETURN_DOM || !1, gt = i.RETURN_DOM_FRAGMENT || !1, mt = i.RETURN_TRUSTED_TYPE || !1, Ut = i.FORCE_BODY || !1, Tn = i.SANITIZE_DOM !== !1, _n = i.SANITIZE_NAMED_PROPS || !1, jt = i.KEEP_CONTENT !== !1, Ht = i.IN_PLACE || !1, En = pu(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : gr, Me = typeof i.NAMESPACE == "string" ? i.NAMESPACE : le, Wt = sn(
|
|
2205
2205
|
i,
|
|
2206
2206
|
"MATHML_TEXT_INTEGRATION_POINTS",
|
|
2207
2207
|
() => _({}, On)
|
|
@@ -2227,7 +2227,7 @@ function Mr() {
|
|
|
2227
2227
|
}
|
|
2228
2228
|
} else i.TRUSTED_TYPES_POLICY === null ? (M = void 0, fe = "") : (M === void 0 && (M = ht()), M && typeof fe == "string" && (fe = ue("")));
|
|
2229
2229
|
N && N(i), ze = i;
|
|
2230
|
-
}, In = _({}, [...en, ...tn, ...
|
|
2230
|
+
}, In = _({}, [...en, ...tn, ...fu]), Pn = _({}, [...nn, ...hu]), Yr = function(i, a, p) {
|
|
2231
2231
|
return a.namespaceURI === le ? i === "svg" : a.namespaceURI === Ft ? i === "svg" && (p === "annotation-xml" || Wt[p]) : !!In[i];
|
|
2232
2232
|
}, Zr = function(i, a, p) {
|
|
2233
2233
|
return a.namespaceURI === le ? i === "math" : a.namespaceURI === At ? i === "math" && Yt[p] : !!Pn[i];
|
|
@@ -2455,7 +2455,7 @@ function Mr() {
|
|
|
2455
2455
|
});
|
|
2456
2456
|
}
|
|
2457
2457
|
const Jr = function(i, a) {
|
|
2458
|
-
return !!(Te && i.hasChildNodes() && !Je(i.firstElementChild) && j(mr, i.textContent) && j(mr, i.innerHTML) || Te && i.namespaceURI === le &&
|
|
2458
|
+
return !!(Te && i.hasChildNodes() && !Je(i.firstElementChild) && j(mr, i.textContent) && j(mr, i.innerHTML) || Te && i.namespaceURI === le && Tu[a] && (Je(i.firstElementChild) || typeof i.textContent == "string" && j(_u[a], i.textContent)) || i.nodeType === X.processingInstruction || Te && i.nodeType === X.comment && j(Fr, i.data));
|
|
2459
2459
|
}, xt = function(i, a) {
|
|
2460
2460
|
if (i instanceof RegExp)
|
|
2461
2461
|
return j(i, a);
|
|
@@ -2500,7 +2500,7 @@ function Mr() {
|
|
|
2500
2500
|
const F = es(i, p, a);
|
|
2501
2501
|
return F === !1 && ae(b.afterSanitizeElements, i, null), F;
|
|
2502
2502
|
}
|
|
2503
|
-
if (Ce(i) === X.element && !Vr(i) || (p === "noscript" || p === "noembed" || p === "noframes") && j(
|
|
2503
|
+
if (Ce(i) === X.element && !Vr(i) || (p === "noscript" || p === "noembed" || p === "noframes") && j(Cu, i.innerHTML))
|
|
2504
2504
|
return Fe(i), !0;
|
|
2505
2505
|
if (me && i.nodeType === X.text) {
|
|
2506
2506
|
const F = kt(i.textContent);
|
|
@@ -2556,7 +2556,7 @@ function Mr() {
|
|
|
2556
2556
|
const F = I(i.nodeName);
|
|
2557
2557
|
for (; D--; ) {
|
|
2558
2558
|
const A = a[D], w = A.name, v = A.namespaceURI, W = A.value, Y = I(w), Qt = W;
|
|
2559
|
-
let q = w === "value" ? Qt :
|
|
2559
|
+
let q = w === "value" ? Qt : iu(Qt);
|
|
2560
2560
|
if (p.attrName = Y, p.attrValue = q, p.keepAttr = !0, p.forceKeepAttr = void 0, ae(b.uponSanitizeAttribute, i, p), q = p.attrValue, _n && (Y === "id" || Y === "name") && ar(q, yn) !== 0 && (ye(w, i, A), q = yn + q), Te && j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, q)) {
|
|
2561
2561
|
ye(w, i, A);
|
|
2562
2562
|
continue;
|
|
@@ -2570,7 +2570,7 @@ function Mr() {
|
|
|
2570
2570
|
ye(w, i, A);
|
|
2571
2571
|
continue;
|
|
2572
2572
|
}
|
|
2573
|
-
if (!xn && j(
|
|
2573
|
+
if (!xn && j(xu, q)) {
|
|
2574
2574
|
ye(w, i, A);
|
|
2575
2575
|
continue;
|
|
2576
2576
|
}
|
|
@@ -2633,7 +2633,7 @@ function Mr() {
|
|
|
2633
2633
|
};
|
|
2634
2634
|
return e.sanitize = function(d) {
|
|
2635
2635
|
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, p = null, D = null, F = null;
|
|
2636
|
-
if (qt = !d, qt && (d = "<!-->"), typeof d != "string" && !Je(d) && (d =
|
|
2636
|
+
if (qt = !d, qt && (d = "<!-->"), typeof d != "string" && !Je(d) && (d = cu(d), typeof d != "string"))
|
|
2637
2637
|
throw we("dirty is not a string, aborting");
|
|
2638
2638
|
if (!e.isSupported)
|
|
2639
2639
|
return d;
|
|
@@ -2687,7 +2687,7 @@ function Mr() {
|
|
|
2687
2687
|
return (B.shadowroot || B.shadowrootmode) && (F = S.call(r, F, !0)), F;
|
|
2688
2688
|
}
|
|
2689
2689
|
let v = _e ? a.outerHTML : a.innerHTML;
|
|
2690
|
-
return _e && R["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && j(
|
|
2690
|
+
return _e && R["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && j(bu, a.ownerDocument.doctype.name) && (v = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
|
|
2691
2691
|
` + v), me && (v = kt(v)), M && mt ? ue(v) : v;
|
|
2692
2692
|
}, e.setConfig = function() {
|
|
2693
2693
|
let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -2703,8 +2703,8 @@ function Mr() {
|
|
|
2703
2703
|
}, e.removeHook = function(d, i) {
|
|
2704
2704
|
if (Z(b, d)) {
|
|
2705
2705
|
if (i !== void 0) {
|
|
2706
|
-
const a =
|
|
2707
|
-
return a === -1 ? void 0 :
|
|
2706
|
+
const a = ru(b[d], i);
|
|
2707
|
+
return a === -1 ? void 0 : su(b[d], a, 1)[0];
|
|
2708
2708
|
}
|
|
2709
2709
|
return or(b[d]);
|
|
2710
2710
|
}
|
|
@@ -2714,8 +2714,8 @@ function Mr() {
|
|
|
2714
2714
|
b = Ar();
|
|
2715
2715
|
}, e;
|
|
2716
2716
|
}
|
|
2717
|
-
var
|
|
2718
|
-
const
|
|
2717
|
+
var Su = Mr();
|
|
2718
|
+
const Ru = ["caption", "col", "colgroup", "small", "u", "iframe"], Bu = [
|
|
2719
2719
|
"target",
|
|
2720
2720
|
"role",
|
|
2721
2721
|
"colspan",
|
|
@@ -2726,14 +2726,14 @@ const Bu = ["caption", "col", "colgroup", "small", "u", "iframe"], vu = [
|
|
|
2726
2726
|
"frameborder",
|
|
2727
2727
|
"referrerpolicy",
|
|
2728
2728
|
"loading"
|
|
2729
|
-
],
|
|
2729
|
+
], vu = /* @__PURE__ */ new Set(["www.youtube-nocookie.com"]), Ou = (t) => {
|
|
2730
2730
|
if (!t) return !1;
|
|
2731
2731
|
try {
|
|
2732
|
-
return
|
|
2732
|
+
return vu.has(new URL(t).host);
|
|
2733
2733
|
} catch {
|
|
2734
2734
|
return !1;
|
|
2735
2735
|
}
|
|
2736
|
-
},
|
|
2736
|
+
}, Lu = /* @__PURE__ */ new Set([
|
|
2737
2737
|
"background-color",
|
|
2738
2738
|
"border",
|
|
2739
2739
|
"border-bottom",
|
|
@@ -2769,74 +2769,80 @@ const Bu = ["caption", "col", "colgroup", "small", "u", "iframe"], vu = [
|
|
|
2769
2769
|
"white-space",
|
|
2770
2770
|
"width",
|
|
2771
2771
|
"writing-mode"
|
|
2772
|
-
]),
|
|
2772
|
+
]), $u = {
|
|
2773
2773
|
position: /* @__PURE__ */ new Set(["relative", "static"])
|
|
2774
|
-
},
|
|
2774
|
+
}, Iu = (t) => t.split(";").map((e) => e.trim()).filter(Boolean).filter((e) => {
|
|
2775
2775
|
const [n, ...r] = e.split(":"), s = n.trim().toLowerCase(), u = r.join(":").trim().toLowerCase();
|
|
2776
|
-
return /url\(|expression\(|@import|behavior:/i.test(u) ? !1 :
|
|
2777
|
-
}).map((e) => `${e};`).join(" "),
|
|
2776
|
+
return /url\(|expression\(|@import|behavior:/i.test(u) ? !1 : Lu.has(s) ? !0 : !!$u[s]?.has(u);
|
|
2777
|
+
}).map((e) => `${e};`).join(" "), Pu = (t) => Array.from(t).filter((e) => (e.codePointAt(0) ?? 0) > 32).join("").toLowerCase();
|
|
2778
2778
|
let ut = null;
|
|
2779
|
-
const
|
|
2779
|
+
const Nu = () => ut || (ut = Su(window), ut.addHook("afterSanitizeAttributes", (t) => {
|
|
2780
2780
|
const e = t;
|
|
2781
2781
|
if (!e.getAttribute) return;
|
|
2782
|
-
if (e.tagName === "IFRAME" && !
|
|
2782
|
+
if (e.tagName === "IFRAME" && !Ou(e.getAttribute("src"))) {
|
|
2783
2783
|
e.remove();
|
|
2784
2784
|
return;
|
|
2785
2785
|
}
|
|
2786
2786
|
for (const r of ["src", "href"]) {
|
|
2787
2787
|
const s = e.getAttribute(r);
|
|
2788
|
-
s &&
|
|
2788
|
+
s && Pu(s).startsWith("data:") && e.removeAttribute(r);
|
|
2789
2789
|
}
|
|
2790
2790
|
const n = e.getAttribute("style");
|
|
2791
2791
|
if (n) {
|
|
2792
|
-
const r =
|
|
2792
|
+
const r = Iu(n);
|
|
2793
2793
|
r ? e.setAttribute("style", r) : e.removeAttribute("style");
|
|
2794
2794
|
}
|
|
2795
2795
|
e.getAttribute("target") === "_blank" && e.setAttribute("rel", "noopener noreferrer");
|
|
2796
|
-
}), ut),
|
|
2797
|
-
ADD_TAGS:
|
|
2798
|
-
ADD_ATTR:
|
|
2796
|
+
}), ut), Mu = (t) => Nu().sanitize(t, {
|
|
2797
|
+
ADD_TAGS: Ru,
|
|
2798
|
+
ADD_ATTR: Bu,
|
|
2799
2799
|
RETURN_DOM_FRAGMENT: !0,
|
|
2800
2800
|
ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i
|
|
2801
|
-
}),
|
|
2801
|
+
}), zu = (t) => Math.min(6, Math.max(1, t)), Uu = (t, e = {}) => {
|
|
2802
2802
|
const { shiftHeading: n = 0, tocMaxDepth: r = 2 } = e, s = new Br(
|
|
2803
2803
|
{ gfm: !0, breaks: !0 },
|
|
2804
|
-
|
|
2804
|
+
Zi({
|
|
2805
2805
|
// The card title is a heading too, and the shift has to reach it.
|
|
2806
|
-
cardHeadingLevel: `h${
|
|
2806
|
+
cardHeadingLevel: `h${zu(3 + n)}`
|
|
2807
2807
|
})
|
|
2808
|
-
), u =
|
|
2808
|
+
), u = Mu(s.parse(t, { async: !1 })), { headings: l } = Fi(u, document, {
|
|
2809
2809
|
shiftHeading: n,
|
|
2810
2810
|
tocMaxDepth: r
|
|
2811
2811
|
}), o = document.createElement("div");
|
|
2812
2812
|
return o.appendChild(u), { html: o.innerHTML, headings: l };
|
|
2813
|
-
},
|
|
2814
|
-
/* @__PURE__ */ ee.jsx(
|
|
2813
|
+
}, ju = { html: "", headings: [] }, zr = ({ items: t }) => /* @__PURE__ */ ee.jsx(ee.Fragment, { children: t.map((e) => /* @__PURE__ */ ee.jsxs("li", { children: [
|
|
2814
|
+
/* @__PURE__ */ ee.jsx(ss, { href: `#${e.id}`, children: e.value }),
|
|
2815
2815
|
e.children ? /* @__PURE__ */ ee.jsx(Er, { children: /* @__PURE__ */ ee.jsx(zr, { items: e.children }) }) : null
|
|
2816
|
-
] }, e.id)) }),
|
|
2816
|
+
] }, e.id)) }), Gu = ({
|
|
2817
2817
|
children: t,
|
|
2818
2818
|
showToc: e,
|
|
2819
2819
|
tocTitle: n = "目次",
|
|
2820
2820
|
shiftHeading: r = 0,
|
|
2821
2821
|
tocMaxDepth: s = 2
|
|
2822
2822
|
}) => {
|
|
2823
|
-
const [{ html: u, headings: l }, o] = St.useState(
|
|
2823
|
+
const [{ html: u, headings: l }, o] = St.useState(ju);
|
|
2824
2824
|
return St.useEffect(() => {
|
|
2825
|
-
o(
|
|
2825
|
+
o(Uu(t, { shiftHeading: r, tocMaxDepth: s }));
|
|
2826
2826
|
}, [t, r, s]), St.useEffect(() => {
|
|
2827
2827
|
if (!u) return;
|
|
2828
2828
|
const c = decodeURI(window.location.hash.slice(1));
|
|
2829
2829
|
c && document.getElementById(c)?.scrollIntoView();
|
|
2830
2830
|
}, [u]), /* @__PURE__ */ ee.jsxs("div", { className: "py-8 flex flex-col gap-8", children: [
|
|
2831
2831
|
e && l.length > 0 && /* @__PURE__ */ ee.jsxs("nav", { className: "rounded-3xl p-10 bg-yellow-50", children: [
|
|
2832
|
-
/* @__PURE__ */ ee.jsx(
|
|
2832
|
+
/* @__PURE__ */ ee.jsx("h2", { className: "mb-4 font-bold text-h-xs-m sm:text-h-xs", children: n }),
|
|
2833
2833
|
/* @__PURE__ */ ee.jsx(Er, { children: /* @__PURE__ */ ee.jsx(zr, { items: l }) })
|
|
2834
2834
|
] }),
|
|
2835
|
-
/* @__PURE__ */ ee.jsx(
|
|
2835
|
+
/* @__PURE__ */ ee.jsx(
|
|
2836
|
+
"div",
|
|
2837
|
+
{
|
|
2838
|
+
className: "flex flex-col gap-8",
|
|
2839
|
+
dangerouslySetInnerHTML: { __html: u }
|
|
2840
|
+
}
|
|
2841
|
+
)
|
|
2836
2842
|
] });
|
|
2837
2843
|
};
|
|
2838
2844
|
export {
|
|
2839
|
-
|
|
2845
|
+
Gu as Markdown,
|
|
2840
2846
|
zr as TableOfContents,
|
|
2841
|
-
|
|
2847
|
+
Uu as render
|
|
2842
2848
|
};
|