@arcgis/coding-components 5.0.0-next.30 → 5.0.0-next.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addons.js +1 -1
- package/dist/cdn/{7NAORYAZ.js → 2FIPLTCQ.js} +2 -2
- package/dist/cdn/{ZPU5QNDE.js → 2FRPKA6L.js} +2 -2
- package/dist/cdn/{BU3Z676F.js → 2H4SANEZ.js} +2 -2
- package/dist/cdn/{NHLZHTF3.js → 2IFGR4VT.js} +2 -2
- package/dist/cdn/{LG6IQO74.js → 55TNDMUS.js} +1 -1
- package/dist/cdn/{KBGKCA65.js → 623JWHZD.js} +2 -2
- package/dist/cdn/{P2NSD43U.js → 6O6DECN2.js} +2 -2
- package/dist/cdn/{THPERLAL.js → 75L6ONUG.js} +2 -2
- package/dist/cdn/{JCNEM3D5.js → 7IUWYVBF.js} +2 -2
- package/dist/cdn/{GEQZYHV7.js → 7QLTA5YF.js} +2 -2
- package/dist/cdn/{NXYA2LOS.js → AF3K4LWT.js} +2 -2
- package/dist/cdn/{ZOF7TWI2.js → BLTIH4C2.js} +2 -2
- package/dist/cdn/{PQD3HJOC.js → CRWABB7C.js} +1 -1
- package/dist/cdn/{MLNZOGH7.js → CXFKQ4RE.js} +4 -4
- package/dist/cdn/{N6IRIGJO.js → DFE6VTKB.js} +2 -2
- package/dist/cdn/{ZB24XXBM.js → DGKJ3U7T.js} +2 -2
- package/dist/cdn/{GCWFAJFS.js → DOGEZWSP.js} +37 -37
- package/dist/cdn/{JDHV65YH.js → DTE6TU6M.js} +1 -1
- package/dist/cdn/{M243N3Q7.js → E5WGM3EO.js} +2 -2
- package/dist/cdn/{4KADJHVU.js → FPAMNZS7.js} +2 -2
- package/dist/cdn/{IHHWHGUQ.js → HJYSDD6H.js} +2 -2
- package/dist/cdn/{7TYFIEF2.js → HWMWCW6E.js} +2 -2
- package/dist/cdn/{RDBEDET7.js → IIXUV7FB.js} +1 -1
- package/dist/cdn/{QFDSR2PB.js → J7V5INZV.js} +2 -2
- package/dist/cdn/{PAF4QKPF.js → JVTZNZIA.js} +2 -2
- package/dist/cdn/{57DFPAFX.js → KSTEQHRA.js} +2 -2
- package/dist/cdn/{QYY2RIND.js → MGMYSTPB.js} +2 -2
- package/dist/cdn/{TNAKALJ2.js → N2K7THJ6.js} +2 -2
- package/dist/cdn/{TMJXDPXB.js → N6WHBWHN.js} +2 -2
- package/dist/cdn/{QCAYAP63.js → NC5BRE2K.js} +1 -1
- package/dist/cdn/{7EVHOSJF.js → NG6PGW6C.js} +2 -2
- package/dist/cdn/{OMUHTRR5.js → QA2X7GQW.js} +2 -2
- package/dist/cdn/{3XSZKD3O.js → RMQJXJ6Q.js} +2 -2
- package/dist/cdn/{K2GCVDRQ.js → RVJYSLUY.js} +1 -1
- package/dist/cdn/{5VHPSPLV.js → UFPUZUBG.js} +2 -2
- package/dist/cdn/{XYYECNMS.js → UV6OL7RM.js} +2 -2
- package/dist/cdn/{FSINX36P.js → VPY7US2U.js} +2 -2
- package/dist/cdn/{6C47GBMB.js → WEWH3FSF.js} +2 -2
- package/dist/cdn/{EXBRHBVR.js → WI3LQNXD.js} +2 -2
- package/dist/cdn/{F7SZRVN5.js → WJG47HSX.js} +1 -1
- package/dist/cdn/{QTIAVT5D.js → XUHZTHGB.js} +2 -2
- package/dist/cdn/YFVVVPG5.js +4 -0
- package/dist/cdn/{2LRH5FBP.js → YH2OCB5E.js} +2 -2
- package/dist/cdn/{ON46B4JQ.js → ZS3ZZP7C.js} +2 -2
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +1 -1
- package/dist/chunks/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +143 -133
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +1 -1
- package/dist/chunks/sql-expr-contribution.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/monacoStyles.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/34OGF6T2.js +0 -4
package/dist/chunks/markdown.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { StandaloneServices as
|
|
3
|
-
import { IStandaloneThemeService as
|
|
4
|
-
import { generateTokensCSSForColorMap as
|
|
1
|
+
import { i as we } from "./monaco-importer.js";
|
|
2
|
+
import { StandaloneServices as ie } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
|
|
3
|
+
import { IStandaloneThemeService as ae } from "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
4
|
+
import { generateTokensCSSForColorMap as ye } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
5
5
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
6
6
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
7
|
-
v5.0.0-next.
|
|
8
|
-
async function
|
|
9
|
-
return await (await
|
|
7
|
+
v5.0.0-next.32 */
|
|
8
|
+
async function Se(r, e) {
|
|
9
|
+
return await (await we()).colorize(r, e, { tabSize: 2 });
|
|
10
10
|
}
|
|
11
|
-
async function
|
|
11
|
+
async function ht(r, e) {
|
|
12
12
|
if (!r)
|
|
13
13
|
return;
|
|
14
14
|
const n = Array.from(
|
|
15
15
|
r.querySelectorAll("code.language-arcade, code.language-sql"),
|
|
16
|
-
async (s) => await
|
|
16
|
+
async (s) => await $e(s, s.textContent, e)
|
|
17
17
|
);
|
|
18
18
|
await Promise.all(n);
|
|
19
19
|
}
|
|
20
|
-
async function
|
|
21
|
-
!r || r.tagName !== "CODE" || (r.innerHTML = await
|
|
20
|
+
async function $e(r, e, n) {
|
|
21
|
+
!r || r.tagName !== "CODE" || (r.innerHTML = await Se(e ?? "", n));
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const e =
|
|
25
|
-
return
|
|
23
|
+
function pt() {
|
|
24
|
+
const e = ie.get(ae).getColorTheme();
|
|
25
|
+
return ye(e.tokenTheme.getColorMap());
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return
|
|
27
|
+
function ut(r) {
|
|
28
|
+
return ie.get(ae).onDidColorThemeChange(() => r());
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function H() {
|
|
31
31
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
32
32
|
}
|
|
33
|
-
var $ =
|
|
34
|
-
function
|
|
33
|
+
var $ = H();
|
|
34
|
+
function oe(r) {
|
|
35
35
|
$ = r;
|
|
36
36
|
}
|
|
37
37
|
var _ = { exec: () => null };
|
|
38
|
-
function
|
|
38
|
+
function p(r, e = "") {
|
|
39
39
|
let n = typeof r == "string" ? r : r.source, s = { replace: (t, i) => {
|
|
40
40
|
let l = typeof i == "string" ? i : i.source;
|
|
41
41
|
return l = l.replace(x.caret, "$1"), n = n.replace(t, l), s;
|
|
42
42
|
}, getRegex: () => new RegExp(n, e) };
|
|
43
43
|
return s;
|
|
44
44
|
}
|
|
45
|
-
var 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]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (r) => new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}#`), htmlBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}<(?:[a-z].*>|!--)`, "i") },
|
|
46
|
-
]`).replace("lheading",
|
|
47
|
-
function
|
|
45
|
+
var 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]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (r) => new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}#`), htmlBeginRegex: (r) => new RegExp(`^ {0,${Math.min(3, r - 1)}}<(?:[a-z].*>|!--)`, "i") }, Re = /^(?:[ \t]*(?:\n|$))+/, Te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ze = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ae = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, N = /(?:[*+-]|\d{1,9}[.)])/, ce = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, he = p(ce).replace(/bull/g, N).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(), _e = p(ce).replace(/bull/g, N).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(), Q = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ce = /^[^\n]+/, j = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Pe = p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", j).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ie = p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, N).getRegex(), E = "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", G = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ve = p("^ {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", G).replace("tag", E).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), pe = p(Q).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex(), Le = p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", pe).getRegex(), F = { blockquote: Le, code: Te, def: Pe, fences: ze, heading: Ae, hr: C, html: ve, lheading: he, list: Ie, newline: Re, paragraph: pe, table: _, text: Ce }, ee = p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex(), Ee = { ...F, lheading: _e, table: ee, paragraph: p(Q).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ee).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", E).getRegex() }, qe = { ...F, html: p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", G).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: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: p(Q).replace("hr", C).replace("heading", ` *#{1,6} *[^
|
|
46
|
+
]`).replace("lheading", he).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ue = /^( {2,}|\\)\n(?!\s*$)/, Me = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, q = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, ge = /[^\s\p{P}\p{S}]/u, De = p(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ke = /(?!~)[\p{P}\p{S}]/u, Oe = /(?!~)[\s\p{P}\p{S}]/u, He = /(?:[^\s\p{P}\p{S}]|~)/u, Ne = p(/link|code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<!`)(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("code", /(?<!`)(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), fe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Qe = p(fe, "u").replace(/punct/g, q).getRegex(), je = p(fe, "u").replace(/punct/g, ke).getRegex(), de = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ge = p(de, "gu").replace(/notPunctSpace/g, ge).replace(/punctSpace/g, W).replace(/punct/g, q).getRegex(), Fe = p(de, "gu").replace(/notPunctSpace/g, He).replace(/punctSpace/g, Oe).replace(/punct/g, ke).getRegex(), We = p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ge).replace(/punctSpace/g, W).replace(/punct/g, q).getRegex(), Xe = p(/\\(punct)/, "gu").replace(/punct/g, q).getRegex(), Ue = p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Je = p(G).replace("(?:-->|$)", "-->").getRegex(), Ke = p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), I = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ve = p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", I).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xe = p(/^!?\[(label)\]\[(ref)\]/).replace("label", I).replace("ref", j).getRegex(), be = p(/^!?\[(ref)\](?:\[\])?/).replace("ref", j).getRegex(), Ye = p("reflink|nolink(?!\\()", "g").replace("reflink", xe).replace("nolink", be).getRegex(), te = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = { _backpedal: _, anyPunctuation: Xe, autolink: Ue, blockSkip: Ne, br: ue, code: Ze, del: _, emStrongLDelim: Qe, emStrongRDelimAst: Ge, emStrongRDelimUnd: We, escape: Be, link: Ve, nolink: be, punctuation: De, reflink: xe, reflinkSearch: Ye, tag: Ke, text: Me, url: _ }, et = { ...X, link: p(/^!?\[(label)\]\((.*?)\)/).replace("label", I).getRegex(), reflink: p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", I).getRegex() }, M = { ...X, emStrongRDelimAst: Fe, emStrongLDelim: je, url: p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", te).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: p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", te).getRegex() }, tt = { ...M, br: p(ue).replace("{2,}", "*").getRegex(), text: p(M.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, P = { normal: F, gfm: Ee, pedantic: qe }, T = { normal: X, gfm: M, breaks: tt, pedantic: et }, rt = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, re = (r) => rt[r];
|
|
47
|
+
function y(r, e) {
|
|
48
48
|
if (e) {
|
|
49
|
-
if (x.escapeTest.test(r)) return r.replace(x.escapeReplace,
|
|
50
|
-
} else if (x.escapeTestNoEncode.test(r)) return r.replace(x.escapeReplaceNoEncode,
|
|
49
|
+
if (x.escapeTest.test(r)) return r.replace(x.escapeReplace, re);
|
|
50
|
+
} else if (x.escapeTestNoEncode.test(r)) return r.replace(x.escapeReplaceNoEncode, re);
|
|
51
51
|
return r;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function ne(r) {
|
|
54
54
|
try {
|
|
55
55
|
r = encodeURI(r).replace(x.percentDecode, "%");
|
|
56
56
|
} catch {
|
|
@@ -58,7 +58,7 @@ function re(r) {
|
|
|
58
58
|
}
|
|
59
59
|
return r;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function se(r, e) {
|
|
62
62
|
let n = r.replace(x.findPipe, (i, l, a) => {
|
|
63
63
|
let o = !1, c = l;
|
|
64
64
|
for (; --c >= 0 && a[c] === "\\"; ) o = !o;
|
|
@@ -77,7 +77,7 @@ function z(r, e, n) {
|
|
|
77
77
|
t++;
|
|
78
78
|
return r.slice(0, s - t);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function nt(r, e) {
|
|
81
81
|
if (r.indexOf(e[1]) === -1) return -1;
|
|
82
82
|
let n = 0;
|
|
83
83
|
for (let s = 0; s < r.length; s++) if (r[s] === "\\") s++;
|
|
@@ -85,13 +85,13 @@ function rt(r, e) {
|
|
|
85
85
|
else if (r[s] === e[1] && (n--, n < 0)) return s;
|
|
86
86
|
return n > 0 ? -2 : -1;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function le(r, e, n, s, t) {
|
|
89
89
|
let i = e.href, l = e.title || null, a = r[1].replace(t.other.outputLinkReplace, "$1");
|
|
90
90
|
s.state.inLink = !0;
|
|
91
91
|
let o = { type: r[0].charAt(0) === "!" ? "image" : "link", raw: n, href: i, title: l, text: a, tokens: s.inlineTokens(a) };
|
|
92
92
|
return s.state.inLink = !1, o;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function st(r, e, n) {
|
|
95
95
|
let s = r.match(n.other.indentCodeCompensation);
|
|
96
96
|
if (s === null) return e;
|
|
97
97
|
let t = s[1];
|
|
@@ -126,7 +126,7 @@ var v = class {
|
|
|
126
126
|
fences(r) {
|
|
127
127
|
let e = this.rules.block.fences.exec(r);
|
|
128
128
|
if (e) {
|
|
129
|
-
let n = e[0], s =
|
|
129
|
+
let n = e[0], s = st(n, e[3] || "", this.rules);
|
|
130
130
|
return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
|
|
131
131
|
}
|
|
132
132
|
}
|
|
@@ -164,21 +164,21 @@ var v = class {
|
|
|
164
164
|
s = s ? `${s}
|
|
165
165
|
${c}` : c, t = t ? `${t}
|
|
166
166
|
${h}` : h;
|
|
167
|
-
let
|
|
168
|
-
if (this.lexer.state.top = !0, this.lexer.blockTokens(h, i, !0), this.lexer.state.top =
|
|
169
|
-
let
|
|
170
|
-
if (
|
|
171
|
-
if (
|
|
172
|
-
let d =
|
|
167
|
+
let u = this.lexer.state.top;
|
|
168
|
+
if (this.lexer.state.top = !0, this.lexer.blockTokens(h, i, !0), this.lexer.state.top = u, n.length === 0) break;
|
|
169
|
+
let k = i.at(-1);
|
|
170
|
+
if (k?.type === "code") break;
|
|
171
|
+
if (k?.type === "blockquote") {
|
|
172
|
+
let d = k, f = d.raw + `
|
|
173
173
|
` + n.join(`
|
|
174
174
|
`), b = this.blockquote(f);
|
|
175
175
|
i[i.length - 1] = b, s = s.substring(0, s.length - d.raw.length) + b.raw, t = t.substring(0, t.length - d.text.length) + b.text;
|
|
176
176
|
break;
|
|
177
|
-
} else if (
|
|
178
|
-
let d =
|
|
177
|
+
} else if (k?.type === "list") {
|
|
178
|
+
let d = k, f = d.raw + `
|
|
179
179
|
` + n.join(`
|
|
180
180
|
`), b = this.list(f);
|
|
181
|
-
i[i.length - 1] = b, s = s.substring(0, s.length -
|
|
181
|
+
i[i.length - 1] = b, s = s.substring(0, s.length - k.raw.length) + b.raw, t = t.substring(0, t.length - d.raw.length) + b.raw, n = f.substring(i.at(-1).raw.length).split(`
|
|
182
182
|
`);
|
|
183
183
|
continue;
|
|
184
184
|
}
|
|
@@ -196,25 +196,25 @@ ${h}` : h;
|
|
|
196
196
|
let o = !1, c = "", h = "";
|
|
197
197
|
if (!(e = i.exec(r)) || this.rules.block.hr.test(r)) break;
|
|
198
198
|
c = e[0], r = r.substring(c.length);
|
|
199
|
-
let
|
|
200
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (B) => " ".repeat(3 * B.length)),
|
|
201
|
-
`, 1)[0], d = !
|
|
202
|
-
if (this.options.pedantic ? (f = 2, h =
|
|
203
|
-
`, r = r.substring(
|
|
204
|
-
let B = this.rules.other.nextBulletRegex(f), K = this.rules.other.hrRegex(f), V = this.rules.other.fencesBeginRegex(f), Y = this.rules.other.headingBeginRegex(f),
|
|
199
|
+
let u = e[2].split(`
|
|
200
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (B) => " ".repeat(3 * B.length)), k = r.split(`
|
|
201
|
+
`, 1)[0], d = !u.trim(), f = 0;
|
|
202
|
+
if (this.options.pedantic ? (f = 2, h = u.trimStart()) : d ? f = e[1].length + 1 : (f = e[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, h = u.slice(f), f += e[1].length), d && this.rules.other.blankLine.test(k) && (c += k + `
|
|
203
|
+
`, r = r.substring(k.length + 1), o = !0), !o) {
|
|
204
|
+
let B = this.rules.other.nextBulletRegex(f), K = this.rules.other.hrRegex(f), V = this.rules.other.fencesBeginRegex(f), Y = this.rules.other.headingBeginRegex(f), me = this.rules.other.htmlBeginRegex(f);
|
|
205
205
|
for (; r; ) {
|
|
206
206
|
let Z = r.split(`
|
|
207
207
|
`, 1)[0], R;
|
|
208
|
-
if (
|
|
209
|
-
if (R.search(this.rules.other.nonSpaceChar) >= f || !
|
|
208
|
+
if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), R = k) : R = k.replace(this.rules.other.tabCharGlobal, " "), V.test(k) || Y.test(k) || me.test(k) || B.test(k) || K.test(k)) break;
|
|
209
|
+
if (R.search(this.rules.other.nonSpaceChar) >= f || !k.trim()) h += `
|
|
210
210
|
` + R.slice(f);
|
|
211
211
|
else {
|
|
212
|
-
if (d ||
|
|
212
|
+
if (d || u.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || V.test(u) || Y.test(u) || K.test(u)) break;
|
|
213
213
|
h += `
|
|
214
|
-
` +
|
|
214
|
+
` + k;
|
|
215
215
|
}
|
|
216
|
-
!d && !
|
|
217
|
-
`, r = r.substring(Z.length + 1),
|
|
216
|
+
!d && !k.trim() && (d = !0), c += Z + `
|
|
217
|
+
`, r = r.substring(Z.length + 1), u = R.slice(f);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
t.loose || (l ? t.loose = !0 : this.rules.other.doubleBlankLine.test(c) && (l = !0));
|
|
@@ -226,7 +226,7 @@ ${h}` : h;
|
|
|
226
226
|
else return;
|
|
227
227
|
t.raw = t.raw.trimEnd();
|
|
228
228
|
for (let o = 0; o < t.items.length; o++) if (this.lexer.state.top = !1, t.items[o].tokens = this.lexer.blockTokens(t.items[o].text, []), !t.loose) {
|
|
229
|
-
let c = t.items[o].tokens.filter((
|
|
229
|
+
let c = t.items[o].tokens.filter((u) => u.type === "space"), h = c.length > 0 && c.some((u) => this.rules.other.anyLine.test(u.raw));
|
|
230
230
|
t.loose = h;
|
|
231
231
|
}
|
|
232
232
|
if (t.loose) for (let o = 0; o < t.items.length; o++) t.items[o].loose = !0;
|
|
@@ -247,12 +247,12 @@ ${h}` : h;
|
|
|
247
247
|
table(r) {
|
|
248
248
|
let e = this.rules.block.table.exec(r);
|
|
249
249
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
250
|
-
let n =
|
|
250
|
+
let n = se(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), t = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
251
251
|
`) : [], i = { type: "table", raw: e[0], header: [], align: [], rows: [] };
|
|
252
252
|
if (n.length === s.length) {
|
|
253
253
|
for (let l of s) 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);
|
|
254
254
|
for (let l = 0; l < n.length; l++) i.header.push({ text: n[l], tokens: this.lexer.inline(n[l]), header: !0, align: i.align[l] });
|
|
255
|
-
for (let l of t) i.rows.push(
|
|
255
|
+
for (let l of t) i.rows.push(se(l, i.header.length).map((a, o) => ({ text: a, tokens: this.lexer.inline(a), header: !1, align: i.align[o] })));
|
|
256
256
|
return i;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -289,7 +289,7 @@ ${h}` : h;
|
|
|
289
289
|
let i = z(n.slice(0, -1), "\\");
|
|
290
290
|
if ((n.length - i.length) % 2 === 0) return;
|
|
291
291
|
} else {
|
|
292
|
-
let i =
|
|
292
|
+
let i = nt(e[2], "()");
|
|
293
293
|
if (i === -2) return;
|
|
294
294
|
if (i > -1) {
|
|
295
295
|
let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
|
|
@@ -301,7 +301,7 @@ ${h}` : h;
|
|
|
301
301
|
let i = this.rules.other.pedanticHrefTitle.exec(s);
|
|
302
302
|
i && (s = i[1], t = i[3]);
|
|
303
303
|
} else t = e[3] ? e[3].slice(1, -1) : "";
|
|
304
|
-
return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)),
|
|
304
|
+
return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), le(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: t && t.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
reflink(r, e) {
|
|
@@ -312,7 +312,7 @@ ${h}` : h;
|
|
|
312
312
|
let i = n[0].charAt(0);
|
|
313
313
|
return { type: "text", raw: i, text: i };
|
|
314
314
|
}
|
|
315
|
-
return
|
|
315
|
+
return le(n, t, n[0], this.lexer, this.rules);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
emStrong(r, e, n = "") {
|
|
@@ -330,13 +330,13 @@ ${h}` : h;
|
|
|
330
330
|
}
|
|
331
331
|
if (a -= l, a > 0) continue;
|
|
332
332
|
l = Math.min(l, l + a + o);
|
|
333
|
-
let h = [...s[0]][0].length,
|
|
333
|
+
let h = [...s[0]][0].length, u = r.slice(0, t + s.index + h + l);
|
|
334
334
|
if (Math.min(t, l) % 2) {
|
|
335
|
-
let d =
|
|
336
|
-
return { type: "em", raw:
|
|
335
|
+
let d = u.slice(1, -1);
|
|
336
|
+
return { type: "em", raw: u, text: d, tokens: this.lexer.inlineTokens(d) };
|
|
337
337
|
}
|
|
338
|
-
let
|
|
339
|
-
return { type: "strong", raw:
|
|
338
|
+
let k = u.slice(2, -2);
|
|
339
|
+
return { type: "strong", raw: u, text: k, tokens: this.lexer.inlineTokens(k) };
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -384,7 +384,7 @@ ${h}` : h;
|
|
|
384
384
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
},
|
|
387
|
+
}, m = class D {
|
|
388
388
|
tokens;
|
|
389
389
|
options;
|
|
390
390
|
state;
|
|
@@ -569,9 +569,9 @@ ${h}` : h;
|
|
|
569
569
|
}
|
|
570
570
|
let o = e;
|
|
571
571
|
if (this.options.extensions?.startInline) {
|
|
572
|
-
let c = 1 / 0, h = e.slice(1),
|
|
573
|
-
this.options.extensions.startInline.forEach((
|
|
574
|
-
|
|
572
|
+
let c = 1 / 0, h = e.slice(1), u;
|
|
573
|
+
this.options.extensions.startInline.forEach((k) => {
|
|
574
|
+
u = k.call({ lexer: this }, h), typeof u == "number" && u >= 0 && (c = Math.min(c, u));
|
|
575
575
|
}), c < 1 / 0 && c >= 0 && (o = e.substring(0, c + 1));
|
|
576
576
|
}
|
|
577
577
|
if (a = this.tokenizer.inlineText(o)) {
|
|
@@ -602,8 +602,8 @@ ${h}` : h;
|
|
|
602
602
|
code({ text: r, lang: e, escaped: n }) {
|
|
603
603
|
let s = (e || "").match(x.notSpaceStart)?.[0], t = r.replace(x.endingNewline, "") + `
|
|
604
604
|
`;
|
|
605
|
-
return s ? '<pre><code class="language-' +
|
|
606
|
-
` : "<pre><code>" + (n ? t :
|
|
605
|
+
return s ? '<pre><code class="language-' + y(s) + '">' + (n ? t : y(t, !0)) + `</code></pre>
|
|
606
|
+
` : "<pre><code>" + (n ? t : y(t, !0)) + `</code></pre>
|
|
607
607
|
`;
|
|
608
608
|
}
|
|
609
609
|
blockquote({ tokens: r }) {
|
|
@@ -640,7 +640,7 @@ ${this.parser.parse(r)}</blockquote>
|
|
|
640
640
|
let e = "";
|
|
641
641
|
if (r.task) {
|
|
642
642
|
let n = this.checkbox({ checked: !!r.checked });
|
|
643
|
-
r.loose ? r.tokens[0]?.type === "paragraph" ? (r.tokens[0].text = n + " " + r.tokens[0].text, r.tokens[0].tokens && r.tokens[0].tokens.length > 0 && r.tokens[0].tokens[0].type === "text" && (r.tokens[0].tokens[0].text = n + " " +
|
|
643
|
+
r.loose ? r.tokens[0]?.type === "paragraph" ? (r.tokens[0].text = n + " " + r.tokens[0].text, r.tokens[0].tokens && r.tokens[0].tokens.length > 0 && r.tokens[0].tokens[0].type === "text" && (r.tokens[0].tokens[0].text = n + " " + y(r.tokens[0].tokens[0].text), r.tokens[0].tokens[0].escaped = !0)) : r.tokens.unshift({ type: "text", raw: n + " ", text: n + " ", escaped: !0 }) : e += n + " ";
|
|
644
644
|
}
|
|
645
645
|
return e += this.parser.parse(r.tokens, !!r.loose), `<li>${e}</li>
|
|
646
646
|
`;
|
|
@@ -686,7 +686,7 @@ ${r}</tr>
|
|
|
686
686
|
return `<em>${this.parser.parseInline(r)}</em>`;
|
|
687
687
|
}
|
|
688
688
|
codespan({ text: r }) {
|
|
689
|
-
return `<code>${
|
|
689
|
+
return `<code>${y(r, !0)}</code>`;
|
|
690
690
|
}
|
|
691
691
|
br(r) {
|
|
692
692
|
return "<br>";
|
|
@@ -695,22 +695,22 @@ ${r}</tr>
|
|
|
695
695
|
return `<del>${this.parser.parseInline(r)}</del>`;
|
|
696
696
|
}
|
|
697
697
|
link({ href: r, title: e, tokens: n }) {
|
|
698
|
-
let s = this.parser.parseInline(n), t =
|
|
698
|
+
let s = this.parser.parseInline(n), t = ne(r);
|
|
699
699
|
if (t === null) return s;
|
|
700
700
|
r = t;
|
|
701
701
|
let i = '<a href="' + r + '"';
|
|
702
|
-
return e && (i += ' title="' +
|
|
702
|
+
return e && (i += ' title="' + y(e) + '"'), i += ">" + s + "</a>", i;
|
|
703
703
|
}
|
|
704
704
|
image({ href: r, title: e, text: n, tokens: s }) {
|
|
705
705
|
s && (n = this.parser.parseInline(s, this.parser.textRenderer));
|
|
706
|
-
let t =
|
|
707
|
-
if (t === null) return
|
|
706
|
+
let t = ne(r);
|
|
707
|
+
if (t === null) return y(n);
|
|
708
708
|
r = t;
|
|
709
709
|
let i = `<img src="${r}" alt="${n}"`;
|
|
710
|
-
return e && (i += ` title="${
|
|
710
|
+
return e && (i += ` title="${y(e)}"`), i += ">", i;
|
|
711
711
|
}
|
|
712
712
|
text(r) {
|
|
713
|
-
return "tokens" in r && r.tokens ? this.parser.parseInline(r.tokens) : "escaped" in r && r.escaped ? r.text :
|
|
713
|
+
return "tokens" in r && r.tokens ? this.parser.parseInline(r.tokens) : "escaped" in r && r.escaped ? r.text : y(r.text);
|
|
714
714
|
}
|
|
715
715
|
}, U = class {
|
|
716
716
|
strong({ text: r }) {
|
|
@@ -740,7 +740,7 @@ ${r}</tr>
|
|
|
740
740
|
br() {
|
|
741
741
|
return "";
|
|
742
742
|
}
|
|
743
|
-
},
|
|
743
|
+
}, w = class O {
|
|
744
744
|
options;
|
|
745
745
|
renderer;
|
|
746
746
|
textRenderer;
|
|
@@ -748,10 +748,10 @@ ${r}</tr>
|
|
|
748
748
|
this.options = e || $, this.options.renderer = this.options.renderer || new L(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new U();
|
|
749
749
|
}
|
|
750
750
|
static parse(e, n) {
|
|
751
|
-
return new
|
|
751
|
+
return new O(n).parse(e);
|
|
752
752
|
}
|
|
753
753
|
static parseInline(e, n) {
|
|
754
|
-
return new
|
|
754
|
+
return new O(n).parseInline(e);
|
|
755
755
|
}
|
|
756
756
|
parse(e, n = !0) {
|
|
757
757
|
let s = "";
|
|
@@ -905,20 +905,20 @@ ${r}</tr>
|
|
|
905
905
|
return r;
|
|
906
906
|
}
|
|
907
907
|
provideLexer() {
|
|
908
|
-
return this.block ?
|
|
908
|
+
return this.block ? m.lex : m.lexInline;
|
|
909
909
|
}
|
|
910
910
|
provideParser() {
|
|
911
|
-
return this.block ?
|
|
911
|
+
return this.block ? w.parse : w.parseInline;
|
|
912
912
|
}
|
|
913
|
-
},
|
|
914
|
-
defaults =
|
|
913
|
+
}, lt = class {
|
|
914
|
+
defaults = H();
|
|
915
915
|
options = this.setOptions;
|
|
916
916
|
parse = this.parseMarkdown(!0);
|
|
917
917
|
parseInline = this.parseMarkdown(!1);
|
|
918
|
-
Parser =
|
|
918
|
+
Parser = w;
|
|
919
919
|
Renderer = L;
|
|
920
920
|
TextRenderer = U;
|
|
921
|
-
Lexer =
|
|
921
|
+
Lexer = m;
|
|
922
922
|
Tokenizer = v;
|
|
923
923
|
Hooks = A;
|
|
924
924
|
constructor(...r) {
|
|
@@ -1000,10 +1000,17 @@ ${r}</tr>
|
|
|
1000
1000
|
if (["options", "block"].includes(i)) continue;
|
|
1001
1001
|
let l = i, a = n.hooks[l], o = t[l];
|
|
1002
1002
|
A.passThroughHooks.has(i) ? t[l] = (c) => {
|
|
1003
|
-
if (this.defaults.async && A.passThroughHooksRespectAsync.has(i)) return
|
|
1003
|
+
if (this.defaults.async && A.passThroughHooksRespectAsync.has(i)) return (async () => {
|
|
1004
|
+
let u = await a.call(t, c);
|
|
1005
|
+
return o.call(t, u);
|
|
1006
|
+
})();
|
|
1004
1007
|
let h = a.call(t, c);
|
|
1005
1008
|
return o.call(t, h);
|
|
1006
1009
|
} : t[l] = (...c) => {
|
|
1010
|
+
if (this.defaults.async) return (async () => {
|
|
1011
|
+
let u = await a.apply(t, c);
|
|
1012
|
+
return u === !1 && (u = await o.apply(t, c)), u;
|
|
1013
|
+
})();
|
|
1007
1014
|
let h = a.apply(t, c);
|
|
1008
1015
|
return h === !1 && (h = o.apply(t, c)), h;
|
|
1009
1016
|
};
|
|
@@ -1024,10 +1031,10 @@ ${r}</tr>
|
|
|
1024
1031
|
return this.defaults = { ...this.defaults, ...r }, this;
|
|
1025
1032
|
}
|
|
1026
1033
|
lexer(r, e) {
|
|
1027
|
-
return
|
|
1034
|
+
return m.lex(r, e ?? this.defaults);
|
|
1028
1035
|
}
|
|
1029
1036
|
parser(r, e) {
|
|
1030
|
-
return
|
|
1037
|
+
return w.parse(r, e ?? this.defaults);
|
|
1031
1038
|
}
|
|
1032
1039
|
parseMarkdown(r) {
|
|
1033
1040
|
return (e, n) => {
|
|
@@ -1035,17 +1042,20 @@ ${r}</tr>
|
|
|
1035
1042
|
if (this.defaults.async === !0 && s.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."));
|
|
1036
1043
|
if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
|
|
1037
1044
|
if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1038
|
-
t.hooks && (t.hooks.options = t, t.hooks.block = r)
|
|
1039
|
-
|
|
1040
|
-
|
|
1045
|
+
if (t.hooks && (t.hooks.options = t, t.hooks.block = r), t.async) return (async () => {
|
|
1046
|
+
let l = t.hooks ? await t.hooks.preprocess(e) : e, a = await (t.hooks ? await t.hooks.provideLexer() : r ? m.lex : m.lexInline)(l, t), o = t.hooks ? await t.hooks.processAllTokens(a) : a;
|
|
1047
|
+
t.walkTokens && await Promise.all(this.walkTokens(o, t.walkTokens));
|
|
1048
|
+
let c = await (t.hooks ? await t.hooks.provideParser() : r ? w.parse : w.parseInline)(o, t);
|
|
1049
|
+
return t.hooks ? await t.hooks.postprocess(c) : c;
|
|
1050
|
+
})().catch(i);
|
|
1041
1051
|
try {
|
|
1042
1052
|
t.hooks && (e = t.hooks.preprocess(e));
|
|
1043
|
-
let
|
|
1044
|
-
t.hooks && (
|
|
1045
|
-
let
|
|
1046
|
-
return t.hooks && (
|
|
1047
|
-
} catch (
|
|
1048
|
-
return i(
|
|
1053
|
+
let l = (t.hooks ? t.hooks.provideLexer() : r ? m.lex : m.lexInline)(e, t);
|
|
1054
|
+
t.hooks && (l = t.hooks.processAllTokens(l)), t.walkTokens && this.walkTokens(l, t.walkTokens);
|
|
1055
|
+
let a = (t.hooks ? t.hooks.provideParser() : r ? w.parse : w.parseInline)(l, t);
|
|
1056
|
+
return t.hooks && (a = t.hooks.postprocess(a)), a;
|
|
1057
|
+
} catch (l) {
|
|
1058
|
+
return i(l);
|
|
1049
1059
|
}
|
|
1050
1060
|
};
|
|
1051
1061
|
}
|
|
@@ -1053,46 +1063,46 @@ ${r}</tr>
|
|
|
1053
1063
|
return (n) => {
|
|
1054
1064
|
if (n.message += `
|
|
1055
1065
|
Please report this to https://github.com/markedjs/marked.`, r) {
|
|
1056
|
-
let s = "<p>An error occurred:</p><pre>" +
|
|
1066
|
+
let s = "<p>An error occurred:</p><pre>" + y(n.message + "", !0) + "</pre>";
|
|
1057
1067
|
return e ? Promise.resolve(s) : s;
|
|
1058
1068
|
}
|
|
1059
1069
|
if (e) return Promise.reject(n);
|
|
1060
1070
|
throw n;
|
|
1061
1071
|
};
|
|
1062
1072
|
}
|
|
1063
|
-
}, S = new
|
|
1064
|
-
function
|
|
1073
|
+
}, S = new lt();
|
|
1074
|
+
function g(r, e) {
|
|
1065
1075
|
return S.parse(r, e);
|
|
1066
1076
|
}
|
|
1067
|
-
|
|
1068
|
-
return S.setOptions(r),
|
|
1077
|
+
g.options = g.setOptions = function(r) {
|
|
1078
|
+
return S.setOptions(r), g.defaults = S.defaults, oe(g.defaults), g;
|
|
1069
1079
|
};
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
return S.use(...r),
|
|
1080
|
+
g.getDefaults = H;
|
|
1081
|
+
g.defaults = $;
|
|
1082
|
+
g.use = function(...r) {
|
|
1083
|
+
return S.use(...r), g.defaults = S.defaults, oe(g.defaults), g;
|
|
1074
1084
|
};
|
|
1075
|
-
|
|
1085
|
+
g.walkTokens = function(r, e) {
|
|
1076
1086
|
return S.walkTokens(r, e);
|
|
1077
1087
|
};
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1088
|
+
g.parseInline = S.parseInline;
|
|
1089
|
+
g.Parser = w;
|
|
1090
|
+
g.parser = w.parse;
|
|
1091
|
+
g.Renderer = L;
|
|
1092
|
+
g.TextRenderer = U;
|
|
1093
|
+
g.Lexer = m;
|
|
1094
|
+
g.lexer = m.lex;
|
|
1095
|
+
g.Tokenizer = v;
|
|
1096
|
+
g.Hooks = A;
|
|
1097
|
+
g.parse = g;
|
|
1098
|
+
g.options;
|
|
1099
|
+
g.setOptions;
|
|
1100
|
+
g.use;
|
|
1101
|
+
g.walkTokens;
|
|
1102
|
+
g.parseInline;
|
|
1103
|
+
w.parse;
|
|
1104
|
+
m.lex;
|
|
1105
|
+
g.use({
|
|
1096
1106
|
gfm: !0,
|
|
1097
1107
|
breaks: !0,
|
|
1098
1108
|
async: !1,
|
|
@@ -1103,13 +1113,13 @@ p.use({
|
|
|
1103
1113
|
}
|
|
1104
1114
|
}
|
|
1105
1115
|
});
|
|
1106
|
-
function
|
|
1107
|
-
return r == null ? "" :
|
|
1116
|
+
function gt(r) {
|
|
1117
|
+
return r == null ? "" : g.parse(typeof r == "string" ? r : r.value, { async: !1 });
|
|
1108
1118
|
}
|
|
1109
1119
|
export {
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1120
|
+
ht as a,
|
|
1121
|
+
$e as b,
|
|
1122
|
+
gt as c,
|
|
1123
|
+
pt as g,
|
|
1124
|
+
ut as o
|
|
1115
1125
|
};
|
|
@@ -6,7 +6,7 @@ import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
|
|
|
6
6
|
import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
|
|
7
7
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
8
8
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
9
|
-
v5.0.0-next.
|
|
9
|
+
v5.0.0-next.32 */
|
|
10
10
|
function $(e, n, l, i) {
|
|
11
11
|
if (!n)
|
|
12
12
|
return [];
|
package/dist/chunks/runtime.js
CHANGED
|
@@ -3,7 +3,7 @@ import { makeRuntime as e } from "@arcgis/lumina";
|
|
|
3
3
|
import { trackAccess as s, createObservable as r, createTrackingTarget as a, runTracked as c } from "@arcgis/core/applications/Components/reactiveUtils.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
6
|
-
v5.0.0-next.
|
|
6
|
+
v5.0.0-next.32 */
|
|
7
7
|
const t = e({ defaultAssetPath: "https://jsdev.arcgis.com/next/coding-components/", hydratedAttribute: "hydrated" }), { customElement: n, getAssetPath: d, setAssetPath: i } = t;
|
|
8
8
|
t.t = s;
|
|
9
9
|
t.o = r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import w from "@arcgis/core/request.js";
|
|
2
2
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
-
v5.0.0-next.
|
|
4
|
+
v5.0.0-next.32 */
|
|
5
5
|
function d() {
|
|
6
6
|
return !!window.MonacoEnvironment?.getWorker;
|
|
7
7
|
}
|