diff --git a/README.md b/README.md index c38856b..f0208af 100644 --- a/README.md +++ b/README.md @@ -98,12 +98,13 @@ The module itself requires no permissions to run. ## Limitations - No syntax highlight -- No \~\~strikethrough\~\~ or underline - No multiline tables cells -- Possible hiccups with more complex markdowns +- Possible hiccups with more complex markdowns (Please open an issue about it) These could change in the future, but the aim is to keep the module's complexity minimal. > Also, many of these should also be solvable using extensions. +> +> [syntax highlight example](https://github.com/littletof/charmd/issues/2#issuecomment-832771746) ## Notes @@ -123,7 +124,7 @@ Feedback and contributions are always welcome. Open an issue or a PR, or contact - [x] remove dots from codeblock backgrounds - [x] links with images - [x] ```# Header with *italic*``` +- [x] strikethrough, ~~-underline~~ - [ ] tests - [ ] fmt, lint -- [ ] strikethrough, underline and combinations - [ ] Look into alternatives for the AST generation. diff --git a/deps.ts b/deps.ts index eb8c4bc..1b5ee03 100644 --- a/deps.ts +++ b/deps.ts @@ -1,6 +1,7 @@ export * as colors from 'https://deno.land/std@0.82.0/fmt/colors.ts'; -// import * as mdast from 'https://jspm.dev/mdast-util-from-markdown@0.8.4'; -import {mdast} from './mdast-util-from-markdown@0_8_4-shimmed.js'; -export type mdastFromMarkdownFn = (markdown: string, encodig?: any, options?: {extensions?: any[], mdastExtensions?: any[]}) => any; -export const fromMarkdown: mdastFromMarkdownFn = mdast as mdastFromMarkdownFn; +import { mdast, gfmStrikethroughFromMarkdown, gfmStrikethrough } from './mdast-util-from-markdown@1_2_0-shimmed.js'; +export const strikethroughExt = gfmStrikethroughFromMarkdown; +export const strike = gfmStrikethrough; +export type mdastFromMarkdownFn = (markdown: string, encodig?: string, options?: {extensions?: any[], mdastExtensions?: any[]}) => any; +export const fromMarkdown: mdastFromMarkdownFn = mdast; diff --git a/docs/docs.md b/docs/docs.md index a590b21..c0d3509 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -6,7 +6,7 @@ ###### h6 Heading ## `inline` *italic* -**bold** __text__ *italic* _text_ ***bold and italic*** +**bold** __text__ *italic* _text_ ***bold and italic*** ~~striketrough~~ > Some quote with **bold** and `block` > > and Another quote diff --git a/docs/showcase.png b/docs/showcase.png index c1fdc5d..8b01f27 100644 Binary files a/docs/showcase.png and b/docs/showcase.png differ diff --git a/docs/snapper.ts b/docs/snapper.ts index f43f073..aaec369 100644 --- a/docs/snapper.ts +++ b/docs/snapper.ts @@ -1,4 +1,4 @@ -import {snap} from 'https://deno.land/x/snapper@v0.0.5/mod.ts'; +import {snap} from 'https://deno.land/x/snapper@v0.0.6/mod.ts'; import { renderMarkdown } from "../mod.ts"; // Usage: diff --git a/example.ts b/example.ts index 7cd7c20..ff9d570 100644 --- a/example.ts +++ b/example.ts @@ -1,14 +1,13 @@ -import { colors } from "./deps.ts"; import {renderMarkdown} from './mod.ts'; const demoText = ` -# deno terminal markdown +# deno charmd -This is an example, to showcase https://github.com/littletof/terminal_markdown +This is an example, to showcase https://github.com/littletof/charmd If you want to test the module with your own markdown, provide its \`path\` as an argument and make sure \`--allow-read\` is also provided. \`\`\`bash -deno run --allow-read https://raw.githubusercontent.com/littletof/terminal_markdown/master/mod.ts .\/README.md +deno run --allow-read https://raw.githubusercontent.com/littletof/charmd/master/mod.ts .\/README.md \`\`\` ## Headers @@ -40,8 +39,12 @@ __This is bold text \`\_\_\`__ _This is italic text \`\_\`_ +~~This is strikethrough~~ \`\~\~\` + **an *italic* in bold** +~~**an *italic* in bold with \`striketrough\`**~~ + ## Blockquotes > Blockquotes can also be nested... diff --git a/generator.ts b/generator.ts index beabfc8..6ec1cb4 100644 --- a/generator.ts +++ b/generator.ts @@ -18,27 +18,37 @@ export function generator(node: Node, parent: Node, options: Options): string | case 'root': return node.children?.map((child: Node) => generator(child, node, options)).join('\n'); - case 'definition': + case 'definition': { const def = `${colors.cyan(`[${node.label}]`)}: [${node.title ?? ''}](${node.url})`; return colors.gray(colors.italic(`${def}\n`)); - case 'image': + } + case 'image': { const imageLink = `![${node.alt}](${node.url})`; return colors.gray(colors.italic(`Image: ${imageLink}`)); - case 'imageReference': + } + case 'imageReference': { const ref = `![${node.alt}]${colors.cyan(`[${node.label}]`)}`; return colors.gray(colors.italic(`Image reference: ${ref}`)); - case 'link': + } + case 'link': { const linkText = node.children?.map(ch => generator(ch, node, options)).join(''); - const link = `[${linkText}](${node.url})` + const link = `[${linkText}](${node.url})`; return colors.cyan(link); - case 'strong': + } + case 'strong': { const strongContent = node.children?.map((child: Node) => generator(child, node, options)).join(''); return colors.bold(strongContent || ''); - case 'emphasis': + } + case 'emphasis': { const emphasisContent = node.children?.map((child: Node) => generator(child, node, options)).join(''); return colors.italic(emphasisContent || ''); + } + case 'delete': { + const strikeTroughContent = node.children?.map((child: Node) => generator(child, node, options)).join(''); + return colors.strikethrough(strikeTroughContent || ''); + } case 'heading': - return getHeaderFormatter(node.depth || 0)('#'.repeat(node.depth!) + ' ' + node.children?.map((ch: Node) => generator(ch, node, options)).join('')) + '\n' + return getHeaderFormatter(node.depth || 0)('#'.repeat(node.depth!) + ' ' + node.children?.map((ch: Node) => generator(ch, node, options)).join('')) + '\n'; case 'linkReference': return ( @@ -59,13 +69,13 @@ export function generator(node: Node, parent: Node, options: Options): string | // then add horizontal line to the start of all generated chidren lines, except last \n .map((l,i,a) => (i != a.length-1 && l.trim() ? '┃ ' : '') + l).join('\n')).join(''); - case 'list': + case 'list': { const generateList = (icon: (i: number) => string) => { const tabForList = ' '; return node.children?.map((child: Node, i: number) => { const tabForMultiline = ' '.repeat(colors.stripColor(icon(i)).length || 2); return (icon(i) + generator(child, node, options)) - ?.replace(/\n$/, '').split('\n').map((l,i) => tabForList + (i ? tabForMultiline +l: l)).join('\n') + '\n'; // indent full list + ?.replace(/\n$/, '').split('\n').map((l,i) => tabForList + (i ? tabForMultiline +l: l)).join('\n') + '\n'; // indent full list }).join('').split('\n').map((l: string) => l.replace(tabForList, '')).join('\n'); // remove outermost indent from each line -> level 0 ha 0 indent }; @@ -76,11 +86,12 @@ export function generator(node: Node, parent: Node, options: Options): string | const icon = icons[Math.min(node.listLevel!, icons.length-1)]; return generateList(i => colors.gray(`${icon} `)); } + } case 'listItem': return node.children?.map((ch: Node) => generator(ch, parent, options)).join(node.spread? '\n' : ''); - case 'code': + case 'code': { let codeBlock = ''; const xPadding = 2; const padString = (length: number) => colors.bgBrightBlack(colors.gray(' '.repeat(length))); @@ -107,6 +118,7 @@ export function generator(node: Node, parent: Node, options: Options): string | codeBlock += colors.bgBrightBlack(' ')+padString(max + 2*xPadding-1) + "\n"; return codeBlock; + } case 'inlineCode': // return colors.inverse(colors.bgBrightWhite(colors.black(` ${node.value} `))); @@ -114,9 +126,10 @@ export function generator(node: Node, parent: Node, options: Options): string | // return colors.white(colors.inverse(colors.bgBlack(` ${node.value} `))); // best return colors.inverse(` ${node.value} `); - case 'table': + case 'table': { const t = node.children?.map((child: Node) => generator(child, node, options)).join('') || ''; return generateTable(t, options.tableBorder ?? true) + '\n'; + } case 'thematicBreak': return node.value; diff --git a/mdast-util-from-markdown@0_8_4-shimmed.js b/mdast-util-from-markdown@0_8_4-shimmed.js deleted file mode 100644 index 4e041fc..0000000 --- a/mdast-util-from-markdown@0_8_4-shimmed.js +++ /dev/null @@ -1,4778 +0,0 @@ -var exports = { -}; -exports = toString; -function toString(node) { - return node && (node.value || node.alt || node.title || "children" in node && all(node.children) || "length" in node && all(node)) || ""; -} -function all(values) { - var result = []; - var index = -1; - while((++index) < values.length){ - result[index] = toString(values[index]); - } - return result.join(""); -} -var exports$1 = exports; -var exports1 = { -}; -var assign = Object.assign; -exports1 = assign; -var _assign = exports1; -var exports2 = { -}; -var own = { -}.hasOwnProperty; -exports2 = own; -var _hasOwnProperty = exports2; -var exports3 = { -}; -function normalizeIdentifier(value) { - return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); -} -exports3 = normalizeIdentifier; -var _normalizeIdentifier = exports3; -var exports4 = { -}; -var fromCharCode = String.fromCharCode; -exports4 = fromCharCode; -var _fromCharCode = exports4; -var exports5 = { -}; -var fromCharCode1 = _fromCharCode; -function safeFromInt(value, base) { - var code = parseInt(value, base); - if (code < 9 || code === 11 || code > 13 && code < 32 || code > 126 && code < 160 || code > 55295 && code < 57344 || code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || code > 1114111) { - return "\uFFFD"; - } - return fromCharCode1(code); -} -exports5 = safeFromInt; -var _safeFromInt = exports5; -var exports6 = { -}; -function miniflat(value) { - return value === null || value === undefined ? [] : "length" in value ? value : [ - value - ]; -} -exports6 = miniflat; -var _miniflat = exports6; -var exports$11 = { -}; -var hasOwnProperty = _hasOwnProperty; -var exports7 = { -}; -var splice = [].splice; -exports7 = splice; -var _splice = exports7; -var exports$12 = { -}; -var splice$1 = _splice; -function chunkedSplice(list, start, remove, items) { - var end = list.length; - var chunkStart = 0; - var parameters; - if (start < 0) { - start = -start > end ? 0 : end + start; - } else { - start = start > end ? end : start; - } - remove = remove > 0 ? remove : 0; - if (items.length < 10000) { - parameters = Array.from(items); - parameters.unshift(start, remove); - splice$1.apply(list, parameters); - } else { - if (remove) splice$1.apply(list, [ - start, - remove - ]); - while(chunkStart < items.length){ - parameters = items.slice(chunkStart, chunkStart + 10000); - parameters.unshift(start, 0); - splice$1.apply(list, parameters); - chunkStart += 10000; - start += 10000; - } - } -} -exports$12 = chunkedSplice; -var _chunkedSplice = exports$12; -var chunkedSplice1 = _chunkedSplice; -var miniflat$1 = _miniflat; -function combineExtensions(extensions) { - var all1 = { - }; - var index = -1; - while((++index) < extensions.length){ - extension1(all1, extensions[index]); - } - return all1; -} -function extension1(all1, extension1) { - var hook; - var left; - var right; - var code; - for(hook in extension1){ - left = hasOwnProperty.call(all1, hook) ? all1[hook] : all1[hook] = { - }; - right = extension1[hook]; - for(code in right){ - left[code] = constructs(miniflat$1(right[code]), hasOwnProperty.call(left, code) ? left[code] : []); - } - } -} -function constructs(list, existing) { - var index = -1; - var before = []; - while((++index) < list.length){ - (list[index].add === "after" ? existing : before).push(list[index]); - } - chunkedSplice1(existing, 0, 0, before); - return existing; -} -exports$11 = combineExtensions; -var _combineExtensions = exports$11; -var exports8 = { -}; -var exports9 = { -}; -var fromCharCode2 = _fromCharCode; -function regexCheck(regex) { - return check; - function check(code) { - return regex.test(fromCharCode2(code)); - } -} -exports9 = regexCheck; -var _regexCheck = exports9; -var regexCheck1 = _regexCheck; -var asciiAlphanumeric = regexCheck1(/[\dA-Za-z]/); -exports8 = asciiAlphanumeric; -var _asciiAlphanumeric = exports8; -var exports10 = { -}; -var exports11 = { -}; -function markdownLineEnding(code) { - return code < -2; -} -exports11 = markdownLineEnding; -var _markdownLineEnding = exports11; -var markdownLineEnding1 = _markdownLineEnding; -var exports12 = { -}; -var exports13 = { -}; -function markdownSpace(code) { - return code === -2 || code === -1 || code === 32; -} -exports13 = markdownSpace; -var _markdownSpace = exports13; -var markdownSpace1 = _markdownSpace; -function spaceFactory(effects, ok, type, max) { - var limit = max ? max - 1 : Infinity; - var size = 0; - return start; - function start(code) { - if (markdownSpace1(code)) { - effects.enter(type); - return prefix(code); - } - return ok(code); - } - function prefix(code) { - if (markdownSpace1(code) && (size++) < limit) { - effects.consume(code); - return prefix; - } - effects.exit(type); - return ok(code); - } -} -exports12 = spaceFactory; -var _factorySpace = exports12; -var factorySpace = _factorySpace; -var partialBlankLine = { - tokenize: tokenizePartialBlankLine, - partial: true -}; -function tokenizePartialBlankLine(effects, ok, nok) { - return factorySpace(effects, afterWhitespace, "linePrefix"); - function afterWhitespace(code) { - return code === null || markdownLineEnding1(code) ? ok(code) : nok(code); - } -} -exports10 = partialBlankLine; -var _partialBlankLine = exports10; -var exports14 = { -}; -function sizeChunks(chunks) { - var index = -1; - var size = 0; - while((++index) < chunks.length){ - size += typeof chunks[index] === "string" ? chunks[index].length : 1; - } - return size; -} -exports14 = sizeChunks; -var _sizeChunks = exports14; -var exports$13 = { -}; -var sizeChunks$1 = _sizeChunks; -function prefixSize(events, type) { - var tail = events[events.length - 1]; - if (!tail || tail[1].type !== type) return 0; - return sizeChunks$1(tail[2].sliceStream(tail[1])); -} -exports$13 = prefixSize; -var _prefixSize = exports$13; -var exports15 = { -}; -var assign1 = _assign; -var chunkedSplice2 = _chunkedSplice; -var exports16 = { -}; -var assign2 = _assign; -function shallow(object) { - return assign2({ - }, object); -} -exports16 = shallow; -var _shallow = exports16; -var shallow1 = _shallow; -function subtokenize(events) { - var jumps = { - }; - var index = -1; - var event; - var lineIndex; - var otherIndex; - var otherEvent; - var parameters; - var subevents; - var more; - while((++index) < events.length){ - while(index in jumps){ - index = jumps[index]; - } - event = events[index]; - if (index && event[1].type === "chunkFlow" && events[index - 1][1].type === "listItemPrefix") { - subevents = event[1]._tokenizer.events; - otherIndex = 0; - if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") { - otherIndex += 2; - } - if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") { - while((++otherIndex) < subevents.length){ - if (subevents[otherIndex][1].type === "content") { - break; - } - if (subevents[otherIndex][1].type === "chunkText") { - subevents[otherIndex][1].isInFirstContentOfListItem = true; - otherIndex++; - } - } - } - } - if (event[0] === "enter") { - if (event[1].contentType) { - assign1(jumps, subcontent(events, index)); - index = jumps[index]; - more = true; - } - } else if (event[1]._container || event[1]._movePreviousLineEndings) { - otherIndex = index; - lineIndex = undefined; - while(otherIndex--){ - otherEvent = events[otherIndex]; - if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") { - if (otherEvent[0] === "enter") { - if (lineIndex) { - events[lineIndex][1].type = "lineEndingBlank"; - } - otherEvent[1].type = "lineEnding"; - lineIndex = otherIndex; - } - } else { - break; - } - } - if (lineIndex) { - event[1].end = shallow1(events[lineIndex][1].start); - parameters = events.slice(lineIndex, index); - parameters.unshift(event); - chunkedSplice2(events, lineIndex, index - lineIndex + 1, parameters); - } - } - } - return !more; -} -function subcontent(events, eventIndex) { - var token = events[eventIndex][1]; - var context = events[eventIndex][2]; - var startPosition = eventIndex - 1; - var startPositions = []; - var tokenizer = token._tokenizer || context.parser[token.contentType](token.start); - var childEvents = tokenizer.events; - var jumps = []; - var gaps = { - }; - var stream; - var previous; - var index; - var entered; - var end; - var adjust; - while(token){ - while(events[++startPosition][1] !== token){ - } - startPositions.push(startPosition); - if (!token._tokenizer) { - stream = context.sliceStream(token); - if (!token.next) { - stream.push(null); - } - if (previous) { - tokenizer.defineSkip(token.start); - } - if (token.isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = true; - } - tokenizer.write(stream); - if (token.isInFirstContentOfListItem) { - tokenizer._gfmTasklistFirstContentOfListItem = undefined; - } - } - previous = token; - token = token.next; - } - token = previous; - index = childEvents.length; - while(index--){ - if (childEvents[index][0] === "enter") { - entered = true; - } else if (entered && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line) { - add(childEvents.slice(index + 1, end)); - token._tokenizer = token.next = undefined; - token = token.previous; - end = index + 1; - } - } - tokenizer.events = token._tokenizer = token.next = undefined; - add(childEvents.slice(0, end)); - index = -1; - adjust = 0; - while((++index) < jumps.length){ - gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]; - adjust += jumps[index][1] - jumps[index][0] - 1; - } - return gaps; - function add(slice) { - var start = startPositions.pop(); - jumps.unshift([ - start, - start + slice.length - 1 - ]); - chunkedSplice2(events, start, 2, slice); - } -} -exports15 = subtokenize; -var _subtokenize = exports15; -var exports17 = { -}; -function resolveAll(constructs1, events, context) { - var called = []; - var index = -1; - var resolve; - while((++index) < constructs1.length){ - resolve = constructs1[index].resolveAll; - if (resolve && called.indexOf(resolve) < 0) { - events = resolve(events, context); - called.push(resolve); - } - } - return events; -} -exports17 = resolveAll; -var _resolveAll = exports17; -var exports18 = { -}; -function markdownLineEndingOrSpace(code) { - return code < 0 || code === 32; -} -exports18 = markdownLineEndingOrSpace; -var _markdownLineEndingOrSpace = exports18; -var exports19 = { -}; -var regexCheck2 = _regexCheck; -var unicodeWhitespace = regexCheck2(/\s/); -exports19 = unicodeWhitespace; -var _unicodeWhitespace = exports19; -var exports20 = { -}; -var unicodePunctuation = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/; -exports20 = unicodePunctuation; -var _unicodePunctuationRegex = exports20; -var exports$14 = { -}; -var regexCheck3 = _regexCheck; -var unicodePunctuationRegex = _unicodePunctuationRegex; -var unicodePunctuation$1 = regexCheck3(unicodePunctuationRegex); -exports$14 = unicodePunctuation$1; -var _unicodePunctuation = exports$14; -var exports$2 = { -}; -var markdownLineEndingOrSpace1 = _markdownLineEndingOrSpace; -var unicodePunctuation$2 = _unicodePunctuation; -var unicodeWhitespace1 = _unicodeWhitespace; -function classifyCharacter(code) { - if (code === null || markdownLineEndingOrSpace1(code) || unicodeWhitespace1(code)) { - return 1; - } - if (unicodePunctuation$2(code)) { - return 2; - } -} -exports$2 = classifyCharacter; -var _classifyCharacter = exports$2; -var exports21 = { -}; -var regexCheck4 = _regexCheck; -var asciiAlpha = regexCheck4(/[A-Za-z]/); -exports21 = asciiAlpha; -var _asciiAlpha = exports21; -var exports22 = { -}; -var markdownLineEnding2 = _markdownLineEnding; -var markdownSpace2 = _markdownSpace; -var factorySpace1 = _factorySpace; -function whitespaceFactory(effects, ok) { - var seen; - return start; - function start(code) { - if (markdownLineEnding2(code)) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - seen = true; - return start; - } - if (markdownSpace2(code)) { - return factorySpace1(effects, start, seen ? "linePrefix" : "lineSuffix")(code); - } - return ok(code); - } -} -exports22 = whitespaceFactory; -var _factoryWhitespace = exports22; -var exports23 = { -}; -var chunkedSplice3 = _chunkedSplice; -function chunkedPush(list, items) { - if (list.length) { - chunkedSplice3(list, list.length, 0, items); - return list; - } - return items; -} -exports23 = chunkedPush; -var _chunkedPush = exports23; -var exports$15 = { -}; -Object.defineProperty(exports$15, "__esModule", { - value: true -}); -var markdownLineEnding3 = _markdownLineEnding; -var factorySpace2 = _factorySpace; -var tokenize = initializeContent; -function initializeContent(effects) { - var contentStart = effects.attempt(this.parser.constructs.contentInitial, afterContentStartConstruct, paragraphInitial); - var previous; - return contentStart; - function afterContentStartConstruct(code) { - if (code === null) { - effects.consume(code); - return; - } - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return factorySpace2(effects, contentStart, "linePrefix"); - } - function paragraphInitial(code) { - effects.enter("paragraph"); - return lineStart(code); - } - function lineStart(code) { - var token = effects.enter("chunkText", { - contentType: "text", - previous: previous - }); - if (previous) { - previous.next = token; - } - previous = token; - return data(code); - } - function data(code) { - if (code === null) { - effects.exit("chunkText"); - effects.exit("paragraph"); - effects.consume(code); - return; - } - if (markdownLineEnding3(code)) { - effects.consume(code); - effects.exit("chunkText"); - return lineStart; - } - effects.consume(code); - return data; - } -} -exports$15.tokenize = tokenize; -var exports$21 = { -}; -Object.defineProperty(exports$21, "__esModule", { - value: true -}); -var markdownLineEnding$1 = _markdownLineEnding; -var factorySpace$1 = _factorySpace; -var partialBlankLine1 = _partialBlankLine; -var tokenize$1 = initializeDocument; -var containerConstruct = { - tokenize: tokenizeContainer -}; -var lazyFlowConstruct = { - tokenize: tokenizeLazyFlow -}; -function initializeDocument(effects) { - var self = this; - var stack = []; - var continued = 0; - var inspectConstruct = { - tokenize: tokenizeInspect, - partial: true - }; - var inspectResult; - var childFlow; - var childToken; - return start; - function start(code) { - if (continued < stack.length) { - self.containerState = stack[continued][1]; - return effects.attempt(stack[continued][0].continuation, documentContinue, documentContinued)(code); - } - return documentContinued(code); - } - function documentContinue(code) { - continued++; - return start(code); - } - function documentContinued(code) { - if (inspectResult && inspectResult.flowContinue) { - return flowStart(code); - } - self.interrupt = childFlow && childFlow.currentConstruct && childFlow.currentConstruct.interruptible; - self.containerState = { - }; - return effects.attempt(containerConstruct, containerContinue, flowStart)(code); - } - function containerContinue(code) { - stack.push([ - self.currentConstruct, - self.containerState - ]); - self.containerState = undefined; - return documentContinued(code); - } - function flowStart(code) { - if (code === null) { - exitContainers(0, true); - effects.consume(code); - return; - } - childFlow = childFlow || self.parser.flow(self.now()); - effects.enter("chunkFlow", { - contentType: "flow", - previous: childToken, - _tokenizer: childFlow - }); - return flowContinue(code); - } - function flowContinue(code) { - if (code === null) { - continueFlow(effects.exit("chunkFlow")); - return flowStart(code); - } - if (markdownLineEnding$1(code)) { - effects.consume(code); - continueFlow(effects.exit("chunkFlow")); - return effects.check(inspectConstruct, documentAfterPeek); - } - effects.consume(code); - return flowContinue; - } - function documentAfterPeek(code) { - exitContainers(inspectResult.continued, inspectResult && inspectResult.flowEnd); - continued = 0; - return start(code); - } - function continueFlow(token) { - if (childToken) childToken.next = token; - childToken = token; - childFlow.lazy = inspectResult && inspectResult.lazy; - childFlow.defineSkip(token.start); - childFlow.write(self.sliceStream(token)); - } - function exitContainers(size, end) { - var index = stack.length; - if (childFlow && end) { - childFlow.write([ - null - ]); - childToken = childFlow = undefined; - } - while((index--) > size){ - self.containerState = stack[index][1]; - stack[index][0].exit.call(self, effects); - } - stack.length = size; - } - function tokenizeInspect(effects1, ok) { - var subcontinued = 0; - inspectResult = { - }; - return inspectStart; - function inspectStart(code) { - if (subcontinued < stack.length) { - self.containerState = stack[subcontinued][1]; - return effects1.attempt(stack[subcontinued][0].continuation, inspectContinue, inspectLess)(code); - } - if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) { - inspectResult.flowContinue = true; - return inspectDone(code); - } - self.interrupt = childFlow.currentConstruct && childFlow.currentConstruct.interruptible; - self.containerState = { - }; - return effects1.attempt(containerConstruct, inspectFlowEnd, inspectDone)(code); - } - function inspectContinue(code) { - subcontinued++; - return self.containerState._closeFlow ? inspectFlowEnd(code) : inspectStart(code); - } - function inspectLess(code) { - if (childFlow.currentConstruct && childFlow.currentConstruct.lazy) { - self.containerState = { - }; - return effects1.attempt(containerConstruct, inspectFlowEnd, effects1.attempt(lazyFlowConstruct, inspectFlowEnd, effects1.check(partialBlankLine1, inspectFlowEnd, inspectLazy)))(code); - } - return inspectFlowEnd(code); - } - function inspectLazy(code) { - subcontinued = stack.length; - inspectResult.lazy = true; - inspectResult.flowContinue = true; - return inspectDone(code); - } - function inspectFlowEnd(code) { - inspectResult.flowEnd = true; - return inspectDone(code); - } - function inspectDone(code) { - inspectResult.continued = subcontinued; - self.interrupt = self.containerState = undefined; - return ok(code); - } - } -} -function tokenizeContainer(effects, ok, nok) { - return factorySpace$1(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.indexOf("codeIndented") > -1 ? undefined : 4); -} -function tokenizeLazyFlow(effects, ok, nok) { - return factorySpace$1(effects, effects.lazy(this.parser.constructs.flow, ok, nok), "linePrefix", this.parser.constructs.disable.null.indexOf("codeIndented") > -1 ? undefined : 4); -} -exports$21.tokenize = tokenize$1; -var exports$3 = { -}; -var markdownLineEnding$2 = _markdownLineEnding; -var factorySpace$2 = _factorySpace; -var prefixSize1 = _prefixSize; -var subtokenize1 = _subtokenize; -var content1 = { - tokenize: tokenizeContent, - resolve: resolveContent, - interruptible: true, - lazy: true -}; -var continuationConstruct = { - tokenize: tokenizeContinuation, - partial: true -}; -function resolveContent(events) { - subtokenize1(events); - return events; -} -function tokenizeContent(effects, ok) { - var previous; - return start; - function start(code) { - effects.enter("content"); - previous = effects.enter("chunkContent", { - contentType: "content" - }); - return data(code); - } - function data(code) { - if (code === null) { - return contentEnd(code); - } - if (markdownLineEnding$2(code)) { - return effects.check(continuationConstruct, contentContinue, contentEnd)(code); - } - effects.consume(code); - return data; - } - function contentEnd(code) { - effects.exit("chunkContent"); - effects.exit("content"); - return ok(code); - } - function contentContinue(code) { - effects.consume(code); - effects.exit("chunkContent"); - previous = previous.next = effects.enter("chunkContent", { - contentType: "content", - previous: previous - }); - return data; - } -} -function tokenizeContinuation(effects, ok, nok) { - var self = this; - return startLookahead; - function startLookahead(code) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return factorySpace$2(effects, prefixed, "linePrefix"); - } - function prefixed(code) { - if (code === null || markdownLineEnding$2(code)) { - return nok(code); - } - if (self.parser.constructs.disable.null.indexOf("codeIndented") > -1 || prefixSize1(self.events, "linePrefix") < 4) { - return effects.interrupt(self.parser.constructs.flow, nok, ok)(code); - } - return ok(code); - } -} -exports$3 = content1; -var _content = exports$3; -var exports$4 = { -}; -Object.defineProperty(exports$4, "__esModule", { - value: true -}); -var factorySpace$3 = _factorySpace; -var partialBlankLine$1 = _partialBlankLine; -var content$1 = _content; -var tokenize$2 = initializeFlow; -function initializeFlow(effects) { - var self = this; - var initial = effects.attempt(partialBlankLine$1, atBlankEnding, effects.attempt(this.parser.constructs.flowInitial, afterConstruct, factorySpace$3(effects, effects.attempt(this.parser.constructs.flow, afterConstruct, effects.attempt(content$1, afterConstruct)), "linePrefix"))); - return initial; - function atBlankEnding(code) { - if (code === null) { - effects.consume(code); - return; - } - effects.enter("lineEndingBlank"); - effects.consume(code); - effects.exit("lineEndingBlank"); - self.currentConstruct = undefined; - return initial; - } - function afterConstruct(code) { - if (code === null) { - effects.consume(code); - return; - } - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - self.currentConstruct = undefined; - return initial; - } -} -exports$4.tokenize = tokenize$2; -var exports$5 = { -}; -Object.defineProperty(exports$5, "__esModule", { - value: true -}); -var assign3 = _assign; -var shallow2 = _shallow; -var text1 = initializeFactory("text"); -var string = initializeFactory("string"); -var resolver = { - resolveAll: createResolver() -}; -function initializeFactory(field) { - return { - tokenize: initializeText, - resolveAll: createResolver(field === "text" ? resolveAllLineSuffixes : undefined) - }; - function initializeText(effects) { - var self = this; - var constructs1 = this.parser.constructs[field]; - var text1 = effects.attempt(constructs1, start, notText); - return start; - function start(code) { - return atBreak(code) ? text1(code) : notText(code); - } - function notText(code) { - if (code === null) { - effects.consume(code); - return; - } - effects.enter("data"); - effects.consume(code); - return data; - } - function data(code) { - if (atBreak(code)) { - effects.exit("data"); - return text1(code); - } - effects.consume(code); - return data; - } - function atBreak(code) { - var list = constructs1[code]; - var index = -1; - if (code === null) { - return true; - } - if (list) { - while((++index) < list.length){ - if (!list[index].previous || list[index].previous.call(self, self.previous)) { - return true; - } - } - } - } - } -} -function createResolver(extraResolver) { - return resolveAllText; - function resolveAllText(events, context) { - var index = -1; - var enter; - while((++index) <= events.length){ - if (enter === undefined) { - if (events[index] && events[index][1].type === "data") { - enter = index; - index++; - } - } else if (!events[index] || events[index][1].type !== "data") { - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end; - events.splice(enter + 2, index - enter - 2); - index = enter + 2; - } - enter = undefined; - } - } - return extraResolver ? extraResolver(events, context) : events; - } -} -function resolveAllLineSuffixes(events, context) { - var eventIndex = -1; - var chunks; - var data; - var chunk; - var index; - var bufferIndex; - var size; - var tabs; - var token; - while((++eventIndex) <= events.length){ - if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") { - data = events[eventIndex - 1][1]; - chunks = context.sliceStream(data); - index = chunks.length; - bufferIndex = -1; - size = 0; - tabs = undefined; - while(index--){ - chunk = chunks[index]; - if (typeof chunk === "string") { - bufferIndex = chunk.length; - while(chunk.charCodeAt(bufferIndex - 1) === 32){ - size++; - bufferIndex--; - } - if (bufferIndex) break; - bufferIndex = -1; - } else if (chunk === -2) { - tabs = true; - size++; - } else if (chunk === -1) ; - else { - index++; - break; - } - } - if (size) { - token = { - type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing", - start: { - line: data.end.line, - column: data.end.column - size, - offset: data.end.offset - size, - _index: data.start._index + index, - _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex - }, - end: shallow2(data.end) - }; - data.end = shallow2(token.start); - if (data.start.offset === data.end.offset) { - assign3(data, token); - } else { - events.splice(eventIndex, 0, [ - "enter", - token, - context - ], [ - "exit", - token, - context - ]); - eventIndex += 2; - } - } - eventIndex++; - } - } - return events; -} -exports$5.resolver = resolver; -exports$5.string = string; -exports$5.text = text1; -var exports$6 = { -}; -var fromCharCode3 = _fromCharCode; -function serializeChunks(chunks) { - var index = -1; - var result = []; - var chunk; - var value; - var atTab; - while((++index) < chunks.length){ - chunk = chunks[index]; - if (typeof chunk === "string") { - value = chunk; - } else if (chunk === -5) { - value = "\r"; - } else if (chunk === -4) { - value = "\n"; - } else if (chunk === -3) { - value = "\r" + "\n"; - } else if (chunk === -2) { - value = "\t"; - } else if (chunk === -1) { - if (atTab) continue; - value = " "; - } else { - value = fromCharCode3(chunk); - } - atTab = chunk === -2; - result.push(value); - } - return result.join(""); -} -exports$6 = serializeChunks; -var _serializeChunks = exports$6; -var exports$7 = { -}; -function sliceChunks(chunks, token) { - var startIndex = token.start._index; - var startBufferIndex = token.start._bufferIndex; - var endIndex = token.end._index; - var endBufferIndex = token.end._bufferIndex; - var view; - if (startIndex === endIndex) { - view = [ - chunks[startIndex].slice(startBufferIndex, endBufferIndex) - ]; - } else { - view = chunks.slice(startIndex, endIndex); - if (startBufferIndex > -1) { - view[0] = view[0].slice(startBufferIndex); - } - if (endBufferIndex > 0) { - view.push(chunks[endIndex].slice(0, endBufferIndex)); - } - } - return view; -} -exports$7 = sliceChunks; -var _sliceChunks = exports$7; -var exports$8 = { -}; -var assign$1 = _assign; -var chunkedSplice$1 = _chunkedSplice; -var chunkedPush$1 = _chunkedPush; -var miniflat1 = _miniflat; -var markdownLineEnding$3 = _markdownLineEnding; -var shallow$1 = _shallow; -var resolveAll1 = _resolveAll; -var serializeChunks$1 = _serializeChunks; -var sliceChunks$1 = _sliceChunks; -function createTokenizer(parser, initialize, from) { - var point = from ? shallow$1(from) : { - line: 1, - column: 1, - offset: 0 - }; - var columnStart = { - }; - var resolveAllConstructs = []; - var chunks = []; - var stack = []; - var effects = { - consume: consume, - enter: enter, - exit: exit, - attempt: constructFactory(onsuccessfulconstruct), - check: constructFactory(onsuccessfulcheck), - interrupt: constructFactory(onsuccessfulcheck, { - interrupt: true - }), - lazy: constructFactory(onsuccessfulcheck, { - lazy: true - }) - }; - var context = { - previous: null, - events: [], - parser: parser, - sliceStream: sliceStream, - sliceSerialize: sliceSerialize, - now: now, - defineSkip: skip, - write: write - }; - var state = initialize.tokenize.call(context, effects); - if (initialize.resolveAll) { - resolveAllConstructs.push(initialize); - } - point._index = 0; - point._bufferIndex = -1; - return context; - function write(slice) { - chunks = chunkedPush$1(chunks, slice); - main(); - if (chunks[chunks.length - 1] !== null) { - return []; - } - addResult(initialize, 0); - context.events = resolveAll1(resolveAllConstructs, context.events, context); - return context.events; - } - function sliceSerialize(token) { - return serializeChunks$1(sliceStream(token)); - } - function sliceStream(token) { - return sliceChunks$1(chunks, token); - } - function now() { - return shallow$1(point); - } - function skip(value) { - columnStart[value.line] = value.column; - accountForPotentialSkip(); - } - function main() { - var chunkIndex; - var chunk; - while(point._index < chunks.length){ - chunk = chunks[point._index]; - if (typeof chunk === "string") { - chunkIndex = point._index; - if (point._bufferIndex < 0) { - point._bufferIndex = 0; - } - while(point._index === chunkIndex && point._bufferIndex < chunk.length){ - go(chunk.charCodeAt(point._bufferIndex)); - } - } else { - go(chunk); - } - } - } - function go(code) { - state = state(code); - } - function consume(code) { - if (markdownLineEnding$3(code)) { - point.line++; - point.column = 1; - point.offset += code === -3 ? 2 : 1; - accountForPotentialSkip(); - } else if (code !== -1) { - point.column++; - point.offset++; - } - if (point._bufferIndex < 0) { - point._index++; - } else { - point._bufferIndex++; - if (point._bufferIndex === chunks[point._index].length) { - point._bufferIndex = -1; - point._index++; - } - } - context.previous = code; - } - function enter(type, fields) { - var token = fields || { - }; - token.type = type; - token.start = now(); - context.events.push([ - "enter", - token, - context - ]); - stack.push(token); - return token; - } - function exit(type) { - var token = stack.pop(); - token.end = now(); - context.events.push([ - "exit", - token, - context - ]); - return token; - } - function onsuccessfulconstruct(construct, info) { - addResult(construct, info.from); - } - function onsuccessfulcheck(construct, info) { - info.restore(); - } - function constructFactory(onreturn, fields) { - return hook; - function hook(constructs1, returnState, bogusState) { - var listOfConstructs; - var constructIndex; - var currentConstruct; - var info; - return constructs1.tokenize || "length" in constructs1 ? handleListOfConstructs(miniflat1(constructs1)) : handleMapOfConstructs; - function handleMapOfConstructs(code) { - if (code in constructs1 || null in constructs1) { - return handleListOfConstructs(constructs1.null ? miniflat1(constructs1[code]).concat(miniflat1(constructs1.null)) : constructs1[code])(code); - } - return bogusState(code); - } - function handleListOfConstructs(list) { - listOfConstructs = list; - constructIndex = 0; - return handleConstruct(list[constructIndex]); - } - function handleConstruct(construct) { - return start; - function start(code) { - info = store(); - currentConstruct = construct; - if (!construct.partial) { - context.currentConstruct = construct; - } - if (construct.name && context.parser.constructs.disable.null.indexOf(construct.name) > -1) { - return nok(); - } - return construct.tokenize.call(fields ? assign$1({ - }, context, fields) : context, effects, ok, nok)(code); - } - } - function ok(code) { - onreturn(currentConstruct, info); - return returnState; - } - function nok(code) { - info.restore(); - if ((++constructIndex) < listOfConstructs.length) { - return handleConstruct(listOfConstructs[constructIndex]); - } - return bogusState; - } - } - } - function addResult(construct, from1) { - if (construct.resolveAll && resolveAllConstructs.indexOf(construct) < 0) { - resolveAllConstructs.push(construct); - } - if (construct.resolve) { - chunkedSplice$1(context.events, from1, context.events.length - from1, construct.resolve(context.events.slice(from1), context)); - } - if (construct.resolveTo) { - context.events = construct.resolveTo(context.events, context); - } - } - function store() { - var startPoint = now(); - var startPrevious = context.previous; - var startCurrentConstruct = context.currentConstruct; - var startEventsIndex = context.events.length; - var startStack = Array.from(stack); - return { - restore: restore, - from: startEventsIndex - }; - function restore() { - point = startPoint; - context.previous = startPrevious; - context.currentConstruct = startCurrentConstruct; - context.events.length = startEventsIndex; - stack = startStack; - accountForPotentialSkip(); - } - } - function accountForPotentialSkip() { - if (point.line in columnStart && point.column < 2) { - point.column = columnStart[point.line]; - point.offset += columnStart[point.line] - 1; - } - } -} -exports$8 = createTokenizer; -var _createTokenizer = exports$8; -var exports$9 = { -}; -function movePoint(point, offset) { - point.column += offset; - point.offset += offset; - point._bufferIndex += offset; - return point; -} -exports$9 = movePoint; -var _movePoint = exports$9; -var exports$a = { -}; -var chunkedSplice$2 = _chunkedSplice; -var chunkedPush$2 = _chunkedPush; -var shallow$2 = _shallow; -var resolveAll$1 = _resolveAll; -var classifyCharacter1 = _classifyCharacter; -var movePoint$1 = _movePoint; -var attention = { - name: "attention", - tokenize: tokenizeAttention, - resolveAll: resolveAllAttention -}; -function resolveAllAttention(events, context) { - var index = -1; - var open; - var group; - var text1; - var openingSequence; - var closingSequence; - var use; - var nextEvents; - var offset; - while((++index) < events.length){ - if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) { - open = index; - while(open--){ - if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) { - if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) { - continue; - } - use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1; - openingSequence = { - type: use > 1 ? "strongSequence" : "emphasisSequence", - start: movePoint$1(shallow$2(events[open][1].end), -use), - end: shallow$2(events[open][1].end) - }; - closingSequence = { - type: use > 1 ? "strongSequence" : "emphasisSequence", - start: shallow$2(events[index][1].start), - end: movePoint$1(shallow$2(events[index][1].start), use) - }; - text1 = { - type: use > 1 ? "strongText" : "emphasisText", - start: shallow$2(events[open][1].end), - end: shallow$2(events[index][1].start) - }; - group = { - type: use > 1 ? "strong" : "emphasis", - start: shallow$2(openingSequence.start), - end: shallow$2(closingSequence.end) - }; - events[open][1].end = shallow$2(openingSequence.start); - events[index][1].start = shallow$2(closingSequence.end); - nextEvents = []; - if (events[open][1].end.offset - events[open][1].start.offset) { - nextEvents = chunkedPush$2(nextEvents, [ - [ - "enter", - events[open][1], - context - ], - [ - "exit", - events[open][1], - context - ] - ]); - } - nextEvents = chunkedPush$2(nextEvents, [ - [ - "enter", - group, - context - ], - [ - "enter", - openingSequence, - context - ], - [ - "exit", - openingSequence, - context - ], - [ - "enter", - text1, - context - ] - ]); - nextEvents = chunkedPush$2(nextEvents, resolveAll$1(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context)); - nextEvents = chunkedPush$2(nextEvents, [ - [ - "exit", - text1, - context - ], - [ - "enter", - closingSequence, - context - ], - [ - "exit", - closingSequence, - context - ], - [ - "exit", - group, - context - ] - ]); - if (events[index][1].end.offset - events[index][1].start.offset) { - offset = 2; - nextEvents = chunkedPush$2(nextEvents, [ - [ - "enter", - events[index][1], - context - ], - [ - "exit", - events[index][1], - context - ] - ]); - } else { - offset = 0; - } - chunkedSplice$2(events, open - 1, index - open + 3, nextEvents); - index = open + nextEvents.length - offset - 2; - break; - } - } - } - } - index = -1; - while((++index) < events.length){ - if (events[index][1].type === "attentionSequence") { - events[index][1].type = "data"; - } - } - return events; -} -function tokenizeAttention(effects, ok) { - var before = classifyCharacter1(this.previous); - var marker; - return start; - function start(code) { - effects.enter("attentionSequence"); - marker = code; - return sequence(code); - } - function sequence(code) { - var token; - var after; - var open; - var close; - if (code === marker) { - effects.consume(code); - return sequence; - } - token = effects.exit("attentionSequence"); - after = classifyCharacter1(code); - open = !after || after === 2 && before; - close = !before || before === 2 && after; - token._open = marker === 42 ? open : open && (before || !close); - token._close = marker === 42 ? close : close && (after || !open); - return ok(code); - } -} -exports$a = attention; -var _attention = exports$a; -var exports$b = { -}; -var regexCheck5 = _regexCheck; -var asciiAtext = regexCheck5(/[#-'*+\--9=?A-Z^-~]/); -exports$b = asciiAtext; -var _asciiAtext = exports$b; -var exports$c = { -}; -function asciiControl(code) { - return code < 32 || code === 127; -} -exports$c = asciiControl; -var _asciiControl = exports$c; -var exports$d = { -}; -var asciiAlphanumeric1 = _asciiAlphanumeric; -var asciiAlpha1 = _asciiAlpha; -var asciiAtext$1 = _asciiAtext; -var asciiControl$1 = _asciiControl; -var autolink = { - name: "autolink", - tokenize: tokenizeAutolink -}; -function tokenizeAutolink(effects, ok, nok) { - var size = 1; - return start; - function start(code) { - effects.enter("autolink"); - effects.enter("autolinkMarker"); - effects.consume(code); - effects.exit("autolinkMarker"); - effects.enter("autolinkProtocol"); - return open; - } - function open(code) { - if (asciiAlpha1(code)) { - effects.consume(code); - return schemeOrEmailAtext; - } - return asciiAtext$1(code) ? emailAtext(code) : nok(code); - } - function schemeOrEmailAtext(code) { - return code === 43 || code === 45 || code === 46 || asciiAlphanumeric1(code) ? schemeInsideOrEmailAtext(code) : emailAtext(code); - } - function schemeInsideOrEmailAtext(code) { - if (code === 58) { - effects.consume(code); - return urlInside; - } - if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric1(code)) && (size++) < 32) { - effects.consume(code); - return schemeInsideOrEmailAtext; - } - return emailAtext(code); - } - function urlInside(code) { - if (code === 62) { - effects.exit("autolinkProtocol"); - return end(code); - } - if (code === 32 || code === 60 || asciiControl$1(code)) { - return nok(code); - } - effects.consume(code); - return urlInside; - } - function emailAtext(code) { - if (code === 64) { - effects.consume(code); - size = 0; - return emailAtSignOrDot; - } - if (asciiAtext$1(code)) { - effects.consume(code); - return emailAtext; - } - return nok(code); - } - function emailAtSignOrDot(code) { - return asciiAlphanumeric1(code) ? emailLabel(code) : nok(code); - } - function emailLabel(code) { - if (code === 46) { - effects.consume(code); - size = 0; - return emailAtSignOrDot; - } - if (code === 62) { - effects.exit("autolinkProtocol").type = "autolinkEmail"; - return end(code); - } - return emailValue(code); - } - function emailValue(code) { - if ((code === 45 || asciiAlphanumeric1(code)) && (size++) < 63) { - effects.consume(code); - return code === 45 ? emailValue : emailLabel; - } - return nok(code); - } - function end(code) { - effects.enter("autolinkMarker"); - effects.consume(code); - effects.exit("autolinkMarker"); - effects.exit("autolink"); - return ok; - } -} -exports$d = autolink; -var _autolink = exports$d; -var exports$e = { -}; -var markdownSpace3 = _markdownSpace; -var factorySpace$4 = _factorySpace; -var blockQuote1 = { - name: "blockQuote", - tokenize: tokenizeBlockQuoteStart, - continuation: { - tokenize: tokenizeBlockQuoteContinuation - }, - exit: exit1 -}; -function tokenizeBlockQuoteStart(effects, ok, nok) { - var self = this; - return start; - function start(code) { - if (code === 62) { - if (!self.containerState.open) { - effects.enter("blockQuote", { - _container: true - }); - self.containerState.open = true; - } - effects.enter("blockQuotePrefix"); - effects.enter("blockQuoteMarker"); - effects.consume(code); - effects.exit("blockQuoteMarker"); - return after; - } - return nok(code); - } - function after(code) { - if (markdownSpace3(code)) { - effects.enter("blockQuotePrefixWhitespace"); - effects.consume(code); - effects.exit("blockQuotePrefixWhitespace"); - effects.exit("blockQuotePrefix"); - return ok; - } - effects.exit("blockQuotePrefix"); - return ok(code); - } -} -function tokenizeBlockQuoteContinuation(effects, ok, nok) { - return factorySpace$4(effects, effects.attempt(blockQuote1, ok, nok), "linePrefix", this.parser.constructs.disable.null.indexOf("codeIndented") > -1 ? undefined : 4); -} -function exit1(effects) { - effects.exit("blockQuote"); -} -exports$e = blockQuote1; -var _blockQuote = exports$e; -var exports$f = { -}; -var regexCheck$1 = _regexCheck; -var asciiPunctuation = regexCheck$1(/[!-/:-@[-`{-~]/); -exports$f = asciiPunctuation; -var _asciiPunctuation = exports$f; -var exports$g = { -}; -var asciiPunctuation$1 = _asciiPunctuation; -var characterEscape = { - name: "characterEscape", - tokenize: tokenizeCharacterEscape -}; -function tokenizeCharacterEscape(effects, ok, nok) { - return start; - function start(code) { - effects.enter("characterEscape"); - effects.enter("escapeMarker"); - effects.consume(code); - effects.exit("escapeMarker"); - return open; - } - function open(code) { - if (asciiPunctuation$1(code)) { - effects.enter("characterEscapeValue"); - effects.consume(code); - effects.exit("characterEscapeValue"); - effects.exit("characterEscape"); - return ok; - } - return nok(code); - } -} -exports$g = characterEscape; -var _characterEscape = exports$g; -var exports$h = { -}; -var regexCheck$2 = _regexCheck; -var asciiDigit = regexCheck$2(/\d/); -exports$h = asciiDigit; -var _asciiDigit = exports$h; -var exports$i = { -}; -var regexCheck$3 = _regexCheck; -var asciiHexDigit = regexCheck$3(/[\dA-Fa-f]/); -exports$i = asciiHexDigit; -var _asciiHexDigit = exports$i; -var exports$j = { -}; -var exports24 = { -}; -var el; -var semicolon = 59; -exports24 = decodeEntity; -function decodeEntity(characters) { - var entity = "&" + characters + ";"; - var __char; - el = el || document.createElement("i"); - el.innerHTML = entity; - __char = el.textContent; - if (__char.charCodeAt(__char.length - 1) === semicolon && characters !== "semi") { - return false; - } - return __char === entity ? false : __char; -} -var _decodeEntity = exports24; -var decodeEntity1 = _decodeEntity; -var asciiAlphanumeric$1 = _asciiAlphanumeric; -var asciiDigit$1 = _asciiDigit; -var asciiHexDigit$1 = _asciiHexDigit; -function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { - default: e - }; -} -var decodeEntity__default = _interopDefaultLegacy(decodeEntity1); -var characterReference = { - name: "characterReference", - tokenize: tokenizeCharacterReference -}; -function tokenizeCharacterReference(effects, ok, nok) { - var self = this; - var size = 0; - var max; - var test; - return start; - function start(code) { - effects.enter("characterReference"); - effects.enter("characterReferenceMarker"); - effects.consume(code); - effects.exit("characterReferenceMarker"); - return open; - } - function open(code) { - if (code === 35) { - effects.enter("characterReferenceMarkerNumeric"); - effects.consume(code); - effects.exit("characterReferenceMarkerNumeric"); - return numeric; - } - effects.enter("characterReferenceValue"); - max = 31; - test = asciiAlphanumeric$1; - return value(code); - } - function numeric(code) { - if (code === 88 || code === 120) { - effects.enter("characterReferenceMarkerHexadecimal"); - effects.consume(code); - effects.exit("characterReferenceMarkerHexadecimal"); - effects.enter("characterReferenceValue"); - max = 6; - test = asciiHexDigit$1; - return value; - } - effects.enter("characterReferenceValue"); - max = 7; - test = asciiDigit$1; - return value(code); - } - function value(code) { - var token; - if (code === 59 && size) { - token = effects.exit("characterReferenceValue"); - if (test === asciiAlphanumeric$1 && !decodeEntity__default["default"](self.sliceSerialize(token))) { - return nok(code); - } - effects.enter("characterReferenceMarker"); - effects.consume(code); - effects.exit("characterReferenceMarker"); - effects.exit("characterReference"); - return ok; - } - if (test(code) && (size++) < max) { - effects.consume(code); - return value; - } - return nok(code); - } -} -exports$j = characterReference; -var _characterReference = exports$j; -var exports$k = { -}; -var markdownLineEnding$4 = _markdownLineEnding; -var factorySpace$5 = _factorySpace; -var prefixSize$1 = _prefixSize; -var markdownLineEndingOrSpace2 = _markdownLineEndingOrSpace; -var codeFenced = { - name: "codeFenced", - tokenize: tokenizeCodeFenced, - concrete: true -}; -function tokenizeCodeFenced(effects, ok, nok) { - var self = this; - var closingFenceConstruct = { - tokenize: tokenizeClosingFence, - partial: true - }; - var initialPrefix = prefixSize$1(this.events, "linePrefix"); - var sizeOpen = 0; - var marker; - return start; - function start(code) { - effects.enter("codeFenced"); - effects.enter("codeFencedFence"); - effects.enter("codeFencedFenceSequence"); - marker = code; - return sequenceOpen(code); - } - function sequenceOpen(code) { - if (code === marker) { - effects.consume(code); - sizeOpen++; - return sequenceOpen; - } - effects.exit("codeFencedFenceSequence"); - return sizeOpen < 3 ? nok(code) : factorySpace$5(effects, infoOpen, "whitespace")(code); - } - function infoOpen(code) { - if (code === null || markdownLineEnding$4(code)) { - return openAfter(code); - } - effects.enter("codeFencedFenceInfo"); - effects.enter("chunkString", { - contentType: "string" - }); - return info(code); - } - function info(code) { - if (code === null || markdownLineEndingOrSpace2(code)) { - effects.exit("chunkString"); - effects.exit("codeFencedFenceInfo"); - return factorySpace$5(effects, infoAfter, "whitespace")(code); - } - if (code === 96 && code === marker) return nok(code); - effects.consume(code); - return info; - } - function infoAfter(code) { - if (code === null || markdownLineEnding$4(code)) { - return openAfter(code); - } - effects.enter("codeFencedFenceMeta"); - effects.enter("chunkString", { - contentType: "string" - }); - return meta(code); - } - function meta(code) { - if (code === null || markdownLineEnding$4(code)) { - effects.exit("chunkString"); - effects.exit("codeFencedFenceMeta"); - return openAfter(code); - } - if (code === 96 && code === marker) return nok(code); - effects.consume(code); - return meta; - } - function openAfter(code) { - effects.exit("codeFencedFence"); - return self.interrupt ? ok(code) : content2(code); - } - function content2(code) { - if (code === null) { - return after(code); - } - if (markdownLineEnding$4(code)) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return effects.attempt(closingFenceConstruct, after, initialPrefix ? factorySpace$5(effects, content2, "linePrefix", initialPrefix + 1) : content2); - } - effects.enter("codeFlowValue"); - return contentContinue(code); - } - function contentContinue(code) { - if (code === null || markdownLineEnding$4(code)) { - effects.exit("codeFlowValue"); - return content2(code); - } - effects.consume(code); - return contentContinue; - } - function after(code) { - effects.exit("codeFenced"); - return ok(code); - } - function tokenizeClosingFence(effects1, ok1, nok1) { - var size = 0; - return factorySpace$5(effects1, closingSequenceStart, "linePrefix", this.parser.constructs.disable.null.indexOf("codeIndented") > -1 ? undefined : 4); - function closingSequenceStart(code) { - effects1.enter("codeFencedFence"); - effects1.enter("codeFencedFenceSequence"); - return closingSequence(code); - } - function closingSequence(code) { - if (code === marker) { - effects1.consume(code); - size++; - return closingSequence; - } - if (size < sizeOpen) return nok1(code); - effects1.exit("codeFencedFenceSequence"); - return factorySpace$5(effects1, closingSequenceEnd, "whitespace")(code); - } - function closingSequenceEnd(code) { - if (code === null || markdownLineEnding$4(code)) { - effects1.exit("codeFencedFence"); - return ok1(code); - } - return nok1(code); - } - } -} -exports$k = codeFenced; -var _codeFenced = exports$k; -var exports$l = { -}; -var chunkedSplice$3 = _chunkedSplice; -var markdownLineEnding$5 = _markdownLineEnding; -var factorySpace$6 = _factorySpace; -var prefixSize$2 = _prefixSize; -var codeIndented = { - name: "codeIndented", - tokenize: tokenizeCodeIndented, - resolve: resolveCodeIndented -}; -var indentedContentConstruct = { - tokenize: tokenizeIndentedContent, - partial: true -}; -function resolveCodeIndented(events, context) { - var code = { - type: "codeIndented", - start: events[0][1].start, - end: events[events.length - 1][1].end - }; - chunkedSplice$3(events, 0, 0, [ - [ - "enter", - code, - context - ] - ]); - chunkedSplice$3(events, events.length, 0, [ - [ - "exit", - code, - context - ] - ]); - return events; -} -function tokenizeCodeIndented(effects, ok, nok) { - return effects.attempt(indentedContentConstruct, afterPrefix, nok); - function afterPrefix(code) { - if (code === null) { - return ok(code); - } - if (markdownLineEnding$5(code)) { - return effects.attempt(indentedContentConstruct, afterPrefix, ok)(code); - } - effects.enter("codeFlowValue"); - return content2(code); - } - function content2(code) { - if (code === null || markdownLineEnding$5(code)) { - effects.exit("codeFlowValue"); - return afterPrefix(code); - } - effects.consume(code); - return content2; - } -} -function tokenizeIndentedContent(effects, ok, nok) { - var self = this; - return factorySpace$6(effects, afterPrefix, "linePrefix", 4 + 1); - function afterPrefix(code) { - if (markdownLineEnding$5(code)) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return factorySpace$6(effects, afterPrefix, "linePrefix", 4 + 1); - } - return prefixSize$2(self.events, "linePrefix") < 4 ? nok(code) : ok(code); - } -} -exports$l = codeIndented; -var _codeIndented = exports$l; -var exports$m = { -}; -var markdownLineEnding$6 = _markdownLineEnding; -var codeText1 = { - name: "codeText", - tokenize: tokenizeCodeText, - resolve: resolveCodeText, - previous: previous -}; -function resolveCodeText(events) { - var tailExitIndex = events.length - 4; - var headEnterIndex = 3; - var index; - var enter; - if ((events[headEnterIndex][1].type === "lineEnding" || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === "lineEnding" || events[tailExitIndex][1].type === "space")) { - index = headEnterIndex; - while((++index) < tailExitIndex){ - if (events[index][1].type === "codeTextData") { - events[tailExitIndex][1].type = events[headEnterIndex][1].type = "codeTextPadding"; - headEnterIndex += 2; - tailExitIndex -= 2; - break; - } - } - } - index = headEnterIndex - 1; - tailExitIndex++; - while((++index) <= tailExitIndex){ - if (enter === undefined) { - if (index !== tailExitIndex && events[index][1].type !== "lineEnding") { - enter = index; - } - } else if (index === tailExitIndex || events[index][1].type === "lineEnding") { - events[enter][1].type = "codeTextData"; - if (index !== enter + 2) { - events[enter][1].end = events[index - 1][1].end; - events.splice(enter + 2, index - enter - 2); - tailExitIndex -= index - enter - 2; - index = enter + 2; - } - enter = undefined; - } - } - return events; -} -function previous(code) { - return code !== 96 || this.events[this.events.length - 1][1].type === "characterEscape"; -} -function tokenizeCodeText(effects, ok, nok) { - var sizeOpen = 0; - var size; - var token; - return start; - function start(code) { - effects.enter("codeText"); - effects.enter("codeTextSequence"); - return openingSequence(code); - } - function openingSequence(code) { - if (code === 96) { - effects.consume(code); - sizeOpen++; - return openingSequence; - } - effects.exit("codeTextSequence"); - return gap(code); - } - function gap(code) { - if (code === null) { - return nok(code); - } - if (code === 96) { - token = effects.enter("codeTextSequence"); - size = 0; - return closingSequence(code); - } - if (code === 32) { - effects.enter("space"); - effects.consume(code); - effects.exit("space"); - return gap; - } - if (markdownLineEnding$6(code)) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return gap; - } - effects.enter("codeTextData"); - return data(code); - } - function data(code) { - if (code === null || code === 32 || code === 96 || markdownLineEnding$6(code)) { - effects.exit("codeTextData"); - return gap(code); - } - effects.consume(code); - return data; - } - function closingSequence(code) { - if (code === 96) { - effects.consume(code); - size++; - return closingSequence; - } - if (size === sizeOpen) { - effects.exit("codeTextSequence"); - effects.exit("codeText"); - return ok(code); - } - token.type = "codeTextData"; - return data(code); - } -} -exports$m = codeText1; -var _codeText = exports$m; -var exports$n = { -}; -var markdownLineEnding$7 = _markdownLineEnding; -var markdownLineEndingOrSpace$1 = _markdownLineEndingOrSpace; -var asciiControl$2 = _asciiControl; -function destinationFactory(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) { - var limit = max || Infinity; - var balance = 0; - return start; - function start(code) { - if (code === 60) { - effects.enter(type); - effects.enter(literalType); - effects.enter(literalMarkerType); - effects.consume(code); - effects.exit(literalMarkerType); - return destinationEnclosedBefore; - } - if (asciiControl$2(code)) { - return nok(code); - } - effects.enter(type); - effects.enter(rawType); - effects.enter(stringType); - effects.enter("chunkString", { - contentType: "string" - }); - return destinationRaw(code); - } - function destinationEnclosedBefore(code) { - if (code === 62) { - effects.enter(literalMarkerType); - effects.consume(code); - effects.exit(literalMarkerType); - effects.exit(literalType); - effects.exit(type); - return ok; - } - effects.enter(stringType); - effects.enter("chunkString", { - contentType: "string" - }); - return destinationEnclosed(code); - } - function destinationEnclosed(code) { - if (code === 62) { - effects.exit("chunkString"); - effects.exit(stringType); - return destinationEnclosedBefore(code); - } - if (code === null || code === 60 || markdownLineEnding$7(code)) { - return nok(code); - } - effects.consume(code); - return code === 92 ? destinationEnclosedEscape : destinationEnclosed; - } - function destinationEnclosedEscape(code) { - if (code === 60 || code === 62 || code === 92) { - effects.consume(code); - return destinationEnclosed; - } - return destinationEnclosed(code); - } - function destinationRaw(code) { - if (code === 40) { - if ((++balance) > limit) return nok(code); - effects.consume(code); - return destinationRaw; - } - if (code === 41) { - if (!balance--) { - effects.exit("chunkString"); - effects.exit(stringType); - effects.exit(rawType); - effects.exit(type); - return ok(code); - } - effects.consume(code); - return destinationRaw; - } - if (code === null || markdownLineEndingOrSpace$1(code)) { - if (balance) return nok(code); - effects.exit("chunkString"); - effects.exit(stringType); - effects.exit(rawType); - effects.exit(type); - return ok(code); - } - if (asciiControl$2(code)) return nok(code); - effects.consume(code); - return code === 92 ? destinationRawEscape : destinationRaw; - } - function destinationRawEscape(code) { - if (code === 40 || code === 41 || code === 92) { - effects.consume(code); - return destinationRaw; - } - return destinationRaw(code); - } -} -exports$n = destinationFactory; -var _factoryDestination = exports$n; -var exports$o = { -}; -var markdownLineEnding$8 = _markdownLineEnding; -var markdownSpace$1 = _markdownSpace; -function labelFactory(effects, ok, nok, type, markerType, stringType) { - var self = this; - var size = 0; - var data; - return start; - function start(code) { - effects.enter(type); - effects.enter(markerType); - effects.consume(code); - effects.exit(markerType); - effects.enter(stringType); - return atBreak; - } - function atBreak(code) { - if (code === null || code === 91 || code === 93 && !data || code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs || size > 999) { - return nok(code); - } - if (code === 93) { - effects.exit(stringType); - effects.enter(markerType); - effects.consume(code); - effects.exit(markerType); - effects.exit(type); - return ok; - } - if (markdownLineEnding$8(code)) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return atBreak; - } - effects.enter("chunkString", { - contentType: "string" - }); - return label(code); - } - function label(code) { - if (code === null || code === 91 || code === 93 || markdownLineEnding$8(code) || (size++) > 999) { - effects.exit("chunkString"); - return atBreak(code); - } - effects.consume(code); - data = data || !markdownSpace$1(code); - return code === 92 ? labelEscape : label; - } - function labelEscape(code) { - if (code === 91 || code === 92 || code === 93) { - effects.consume(code); - size++; - return label; - } - return label(code); - } -} -exports$o = labelFactory; -var _factoryLabel = exports$o; -var exports$p = { -}; -var markdownLineEnding$9 = _markdownLineEnding; -var factorySpace$7 = _factorySpace; -function titleFactory(effects, ok, nok, type, markerType, stringType) { - var marker; - return start; - function start(code) { - effects.enter(type); - effects.enter(markerType); - effects.consume(code); - effects.exit(markerType); - marker = code === 40 ? 41 : code; - return atFirstTitleBreak; - } - function atFirstTitleBreak(code) { - if (code === marker) { - effects.enter(markerType); - effects.consume(code); - effects.exit(markerType); - effects.exit(type); - return ok; - } - effects.enter(stringType); - return atTitleBreak(code); - } - function atTitleBreak(code) { - if (code === marker) { - effects.exit(stringType); - return atFirstTitleBreak(marker); - } - if (code === null) { - return nok(code); - } - if (markdownLineEnding$9(code)) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return factorySpace$7(effects, atTitleBreak, "linePrefix"); - } - effects.enter("chunkString", { - contentType: "string" - }); - return title(code); - } - function title(code) { - if (code === marker || code === null || markdownLineEnding$9(code)) { - effects.exit("chunkString"); - return atTitleBreak(code); - } - effects.consume(code); - return code === 92 ? titleEscape : title; - } - function titleEscape(code) { - if (code === marker || code === 92) { - effects.consume(code); - return title; - } - return title(code); - } -} -exports$p = titleFactory; -var _factoryTitle = exports$p; -var exports$q = { -}; -var normalizeIdentifier1 = _normalizeIdentifier; -var markdownLineEnding$a = _markdownLineEnding; -var factorySpace$8 = _factorySpace; -var markdownLineEndingOrSpace$2 = _markdownLineEndingOrSpace; -var factoryDestination = _factoryDestination; -var factoryLabel = _factoryLabel; -var factoryWhitespace = _factoryWhitespace; -var factoryTitle = _factoryTitle; -var definition1 = { - name: "definition", - tokenize: tokenizeDefinition -}; -var titleConstruct = { - tokenize: tokenizeTitle, - partial: true -}; -function tokenizeDefinition(effects, ok, nok) { - var self = this; - var identifier; - return start; - function start(code) { - effects.enter("definition"); - return factoryLabel.call(self, effects, labelAfter, nok, "definitionLabel", "definitionLabelMarker", "definitionLabelString")(code); - } - function labelAfter(code) { - identifier = normalizeIdentifier1(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)); - if (code === 58) { - effects.enter("definitionMarker"); - effects.consume(code); - effects.exit("definitionMarker"); - return factoryWhitespace(effects, factoryDestination(effects, effects.attempt(titleConstruct, factorySpace$8(effects, after, "whitespace"), factorySpace$8(effects, after, "whitespace")), nok, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", "definitionDestinationRaw", "definitionDestinationString")); - } - return nok(code); - } - function after(code) { - if (code === null || markdownLineEnding$a(code)) { - effects.exit("definition"); - if (self.parser.defined.indexOf(identifier) < 0) { - self.parser.defined.push(identifier); - } - return ok(code); - } - return nok(code); - } -} -function tokenizeTitle(effects, ok, nok) { - return start; - function start(code) { - return markdownLineEndingOrSpace$2(code) ? factoryWhitespace(effects, before)(code) : nok(code); - } - function before(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle(effects, factorySpace$8(effects, after, "whitespace"), nok, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(code); - } - return nok(code); - } - function after(code) { - return code === null || markdownLineEnding$a(code) ? ok(code) : nok(code); - } -} -exports$q = definition1; -var _definition = exports$q; -var exports$r = { -}; -var markdownLineEnding$b = _markdownLineEnding; -var hardBreakEscape = { - name: "hardBreakEscape", - tokenize: tokenizeHardBreakEscape -}; -function tokenizeHardBreakEscape(effects, ok, nok) { - return start; - function start(code) { - effects.enter("hardBreakEscape"); - effects.enter("escapeMarker"); - effects.consume(code); - return open; - } - function open(code) { - if (markdownLineEnding$b(code)) { - effects.exit("escapeMarker"); - effects.exit("hardBreakEscape"); - return ok(code); - } - return nok(code); - } -} -exports$r = hardBreakEscape; -var _hardBreakEscape = exports$r; -var exports$s = { -}; -var chunkedSplice$4 = _chunkedSplice; -var markdownLineEnding$c = _markdownLineEnding; -var markdownSpace$2 = _markdownSpace; -var factorySpace$9 = _factorySpace; -var markdownLineEndingOrSpace$3 = _markdownLineEndingOrSpace; -var headingAtx = { - name: "headingAtx", - tokenize: tokenizeHeadingAtx, - resolve: resolveHeadingAtx -}; -function resolveHeadingAtx(events, context) { - var contentEnd = events.length - 2; - var contentStart = 3; - var content2; - var text1; - if (events[contentStart][1].type === "whitespace") { - contentStart += 2; - } - if (contentEnd - 2 > contentStart && events[contentEnd][1].type === "whitespace") { - contentEnd -= 2; - } - if (events[contentEnd][1].type === "atxHeadingSequence" && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === "whitespace")) { - contentEnd -= contentStart + 1 === contentEnd ? 2 : 4; - } - if (contentEnd > contentStart) { - content2 = { - type: "atxHeadingText", - start: events[contentStart][1].start, - end: events[contentEnd][1].end - }; - text1 = { - type: "chunkText", - start: events[contentStart][1].start, - end: events[contentEnd][1].end, - contentType: "text" - }; - chunkedSplice$4(events, contentStart, contentEnd - contentStart + 1, [ - [ - "enter", - content2, - context - ], - [ - "enter", - text1, - context - ], - [ - "exit", - text1, - context - ], - [ - "exit", - content2, - context - ] - ]); - } - return events; -} -function tokenizeHeadingAtx(effects, ok, nok) { - var self = this; - var size = 0; - return start; - function start(code) { - effects.enter("atxHeading"); - effects.enter("atxHeadingSequence"); - return fenceOpenInside(code); - } - function fenceOpenInside(code) { - if (code === 35 && (size++) < 6) { - effects.consume(code); - return fenceOpenInside; - } - if (code === null || markdownLineEndingOrSpace$3(code)) { - effects.exit("atxHeadingSequence"); - return self.interrupt ? ok(code) : headingBreak(code); - } - return nok(code); - } - function headingBreak(code) { - if (code === 35) { - effects.enter("atxHeadingSequence"); - return sequence(code); - } - if (code === null || markdownLineEnding$c(code)) { - effects.exit("atxHeading"); - return ok(code); - } - if (markdownSpace$2(code)) { - return factorySpace$9(effects, headingBreak, "whitespace")(code); - } - effects.enter("atxHeadingText"); - return data(code); - } - function sequence(code) { - if (code === 35) { - effects.consume(code); - return sequence; - } - effects.exit("atxHeadingSequence"); - return headingBreak(code); - } - function data(code) { - if (code === null || code === 35 || markdownLineEndingOrSpace$3(code)) { - effects.exit("atxHeadingText"); - return headingBreak(code); - } - effects.consume(code); - return data; - } -} -exports$s = headingAtx; -var _headingAtx = exports$s; -var exports$t = { -}; -var basics = [ - "address", - "article", - "aside", - "base", - "basefont", - "blockquote", - "body", - "caption", - "center", - "col", - "colgroup", - "dd", - "details", - "dialog", - "dir", - "div", - "dl", - "dt", - "fieldset", - "figcaption", - "figure", - "footer", - "form", - "frame", - "frameset", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "hr", - "html", - "iframe", - "legend", - "li", - "link", - "main", - "menu", - "menuitem", - "nav", - "noframes", - "ol", - "optgroup", - "option", - "p", - "param", - "section", - "source", - "summary", - "table", - "tbody", - "td", - "tfoot", - "th", - "thead", - "title", - "tr", - "track", - "ul" -]; -exports$t = basics; -var _htmlBlockNames = exports$t; -var exports$u = { -}; -var raws = [ - "pre", - "script", - "style", - "textarea" -]; -exports$u = raws; -var _htmlRawNames = exports$u; -var exports$v = { -}; -var fromCharCode$1 = _fromCharCode; -var asciiAlphanumeric$2 = _asciiAlphanumeric; -var markdownLineEnding$d = _markdownLineEnding; -var markdownSpace$3 = _markdownSpace; -var partialBlankLine$2 = _partialBlankLine; -var markdownLineEndingOrSpace$4 = _markdownLineEndingOrSpace; -var asciiAlpha$1 = _asciiAlpha; -var htmlBlockNames = _htmlBlockNames; -var htmlRawNames = _htmlRawNames; -var htmlFlow = { - name: "htmlFlow", - tokenize: tokenizeHtmlFlow, - resolveTo: resolveToHtmlFlow, - concrete: true -}; -var nextBlankConstruct = { - tokenize: tokenizeNextBlank, - partial: true -}; -function resolveToHtmlFlow(events) { - var index = events.length; - while(index--){ - if (events[index][0] === "enter" && events[index][1].type === "htmlFlow") { - break; - } - } - if (index > 1 && events[index - 2][1].type === "linePrefix") { - events[index][1].start = events[index - 2][1].start; - events[index + 1][1].start = events[index - 2][1].start; - events.splice(index - 2, 2); - } - return events; -} -function tokenizeHtmlFlow(effects, ok, nok) { - var self = this; - var kind; - var startTag; - var buffer; - var index; - var marker; - return start; - function start(code) { - effects.enter("htmlFlow"); - effects.enter("htmlFlowData"); - effects.consume(code); - return open; - } - function open(code) { - if (code === 33) { - effects.consume(code); - return declarationStart; - } - if (code === 47) { - effects.consume(code); - return tagCloseStart; - } - if (code === 63) { - effects.consume(code); - kind = 3; - return self.interrupt ? ok : continuationDeclarationInside; - } - if (asciiAlpha$1(code)) { - effects.consume(code); - buffer = fromCharCode$1(code); - startTag = true; - return tagName; - } - return nok(code); - } - function declarationStart(code) { - if (code === 45) { - effects.consume(code); - kind = 2; - return commentOpenInside; - } - if (code === 91) { - effects.consume(code); - kind = 5; - buffer = "CDATA["; - index = 0; - return cdataOpenInside; - } - if (asciiAlpha$1(code)) { - effects.consume(code); - kind = 4; - return self.interrupt ? ok : continuationDeclarationInside; - } - return nok(code); - } - function commentOpenInside(code) { - if (code === 45) { - effects.consume(code); - return self.interrupt ? ok : continuationDeclarationInside; - } - return nok(code); - } - function cdataOpenInside(code) { - if (code === buffer.charCodeAt(index++)) { - effects.consume(code); - return index === buffer.length ? self.interrupt ? ok : continuation : cdataOpenInside; - } - return nok(code); - } - function tagCloseStart(code) { - if (asciiAlpha$1(code)) { - effects.consume(code); - buffer = fromCharCode$1(code); - return tagName; - } - return nok(code); - } - function tagName(code) { - if (code === null || code === 47 || code === 62 || markdownLineEndingOrSpace$4(code)) { - if (code !== 47 && startTag && htmlRawNames.indexOf(buffer.toLowerCase()) > -1) { - kind = 1; - return self.interrupt ? ok(code) : continuation(code); - } - if (htmlBlockNames.indexOf(buffer.toLowerCase()) > -1) { - kind = 6; - if (code === 47) { - effects.consume(code); - return basicSelfClosing; - } - return self.interrupt ? ok(code) : continuation(code); - } - kind = 7; - return self.interrupt ? nok(code) : startTag ? completeAttributeNameBefore(code) : completeClosingTagAfter(code); - } - if (code === 45 || asciiAlphanumeric$2(code)) { - effects.consume(code); - buffer += fromCharCode$1(code); - return tagName; - } - return nok(code); - } - function basicSelfClosing(code) { - if (code === 62) { - effects.consume(code); - return self.interrupt ? ok : continuation; - } - return nok(code); - } - function completeClosingTagAfter(code) { - if (markdownSpace$3(code)) { - effects.consume(code); - return completeClosingTagAfter; - } - return completeEnd(code); - } - function completeAttributeNameBefore(code) { - if (code === 47) { - effects.consume(code); - return completeEnd; - } - if (code === 58 || code === 95 || asciiAlpha$1(code)) { - effects.consume(code); - return completeAttributeName; - } - if (markdownSpace$3(code)) { - effects.consume(code); - return completeAttributeNameBefore; - } - return completeEnd(code); - } - function completeAttributeName(code) { - if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric$2(code)) { - effects.consume(code); - return completeAttributeName; - } - return completeAttributeNameAfter(code); - } - function completeAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code); - return completeAttributeValueBefore; - } - if (markdownSpace$3(code)) { - effects.consume(code); - return completeAttributeNameAfter; - } - return completeAttributeNameBefore(code); - } - function completeAttributeValueBefore(code) { - if (code === null || code === 60 || code === 61 || code === 62 || code === 96) { - return nok(code); - } - if (code === 34 || code === 39) { - effects.consume(code); - marker = code; - return completeAttributeValueQuoted; - } - if (markdownSpace$3(code)) { - effects.consume(code); - return completeAttributeValueBefore; - } - marker = undefined; - return completeAttributeValueUnquoted(code); - } - function completeAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code); - return completeAttributeValueQuotedAfter; - } - if (code === null || markdownLineEnding$d(code)) { - return nok(code); - } - effects.consume(code); - return completeAttributeValueQuoted; - } - function completeAttributeValueUnquoted(code) { - if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 62 || code === 96 || markdownLineEndingOrSpace$4(code)) { - return completeAttributeNameAfter(code); - } - effects.consume(code); - return completeAttributeValueUnquoted; - } - function completeAttributeValueQuotedAfter(code) { - if (code === 47 || code === 62 || markdownSpace$3(code)) { - return completeAttributeNameBefore(code); - } - return nok(code); - } - function completeEnd(code) { - if (code === 62) { - effects.consume(code); - return completeAfter; - } - return nok(code); - } - function completeAfter(code) { - if (markdownSpace$3(code)) { - effects.consume(code); - return completeAfter; - } - return code === null || markdownLineEnding$d(code) ? continuation(code) : nok(code); - } - function continuation(code) { - if (code === 45 && kind === 2) { - effects.consume(code); - return continuationCommentInside; - } - if (code === 60 && kind === 1) { - effects.consume(code); - return continuationRawTagOpen; - } - if (code === 62 && kind === 4) { - effects.consume(code); - return continuationClose; - } - if (code === 63 && kind === 3) { - effects.consume(code); - return continuationDeclarationInside; - } - if (code === 93 && kind === 5) { - effects.consume(code); - return continuationCharacterDataInside; - } - if (markdownLineEnding$d(code) && (kind === 6 || kind === 7)) { - return effects.check(nextBlankConstruct, continuationClose, continuationAtLineEnding)(code); - } - if (code === null || markdownLineEnding$d(code)) { - return continuationAtLineEnding(code); - } - effects.consume(code); - return continuation; - } - function continuationAtLineEnding(code) { - effects.exit("htmlFlowData"); - return htmlContinueStart(code); - } - function htmlContinueStart(code) { - if (code === null) { - return done(code); - } - if (markdownLineEnding$d(code)) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return htmlContinueStart; - } - effects.enter("htmlFlowData"); - return continuation(code); - } - function continuationCommentInside(code) { - if (code === 45) { - effects.consume(code); - return continuationDeclarationInside; - } - return continuation(code); - } - function continuationRawTagOpen(code) { - if (code === 47) { - effects.consume(code); - buffer = ""; - return continuationRawEndTag; - } - return continuation(code); - } - function continuationRawEndTag(code) { - if (code === 62 && htmlRawNames.indexOf(buffer.toLowerCase()) > -1) { - effects.consume(code); - return continuationClose; - } - if (asciiAlpha$1(code) && buffer.length < 8) { - effects.consume(code); - buffer += fromCharCode$1(code); - return continuationRawEndTag; - } - return continuation(code); - } - function continuationCharacterDataInside(code) { - if (code === 93) { - effects.consume(code); - return continuationDeclarationInside; - } - return continuation(code); - } - function continuationDeclarationInside(code) { - if (code === 62) { - effects.consume(code); - return continuationClose; - } - return continuation(code); - } - function continuationClose(code) { - if (code === null || markdownLineEnding$d(code)) { - effects.exit("htmlFlowData"); - return done(code); - } - effects.consume(code); - return continuationClose; - } - function done(code) { - effects.exit("htmlFlow"); - return ok(code); - } -} -function tokenizeNextBlank(effects, ok, nok) { - return start; - function start(code) { - effects.exit("htmlFlowData"); - effects.enter("lineEndingBlank"); - effects.consume(code); - effects.exit("lineEndingBlank"); - return effects.attempt(partialBlankLine$2, ok, nok); - } -} -exports$v = htmlFlow; -var _htmlFlow = exports$v; -var exports$w = { -}; -var asciiAlphanumeric$3 = _asciiAlphanumeric; -var markdownLineEnding$e = _markdownLineEnding; -var markdownSpace$4 = _markdownSpace; -var factorySpace$a = _factorySpace; -var markdownLineEndingOrSpace$5 = _markdownLineEndingOrSpace; -var asciiAlpha$2 = _asciiAlpha; -var htmlText = { - name: "htmlText", - tokenize: tokenizeHtmlText -}; -function tokenizeHtmlText(effects, ok, nok) { - var self = this; - var marker; - var buffer; - var index; - var returnState; - return start; - function start(code) { - effects.enter("htmlText"); - effects.enter("htmlTextData"); - effects.consume(code); - return open; - } - function open(code) { - if (code === 33) { - effects.consume(code); - return declarationOpen; - } - if (code === 47) { - effects.consume(code); - return tagCloseStart; - } - if (code === 63) { - effects.consume(code); - return instruction; - } - if (asciiAlpha$2(code)) { - effects.consume(code); - return tagOpen; - } - return nok(code); - } - function declarationOpen(code) { - if (code === 45) { - effects.consume(code); - return commentOpen; - } - if (code === 91) { - effects.consume(code); - buffer = "CDATA["; - index = 0; - return cdataOpen; - } - if (asciiAlpha$2(code)) { - effects.consume(code); - return declaration; - } - return nok(code); - } - function commentOpen(code) { - if (code === 45) { - effects.consume(code); - return commentStart; - } - return nok(code); - } - function commentStart(code) { - if (code === null || code === 62) { - return nok(code); - } - if (code === 45) { - effects.consume(code); - return commentStartDash; - } - return comment(code); - } - function commentStartDash(code) { - if (code === null || code === 62) { - return nok(code); - } - return comment(code); - } - function comment(code) { - if (code === null) { - return nok(code); - } - if (code === 45) { - effects.consume(code); - return commentClose; - } - if (markdownLineEnding$e(code)) { - returnState = comment; - return atLineEnding(code); - } - effects.consume(code); - return comment; - } - function commentClose(code) { - if (code === 45) { - effects.consume(code); - return end; - } - return comment(code); - } - function cdataOpen(code) { - if (code === buffer.charCodeAt(index++)) { - effects.consume(code); - return index === buffer.length ? cdata : cdataOpen; - } - return nok(code); - } - function cdata(code) { - if (code === null) { - return nok(code); - } - if (code === 93) { - effects.consume(code); - return cdataClose; - } - if (markdownLineEnding$e(code)) { - returnState = cdata; - return atLineEnding(code); - } - effects.consume(code); - return cdata; - } - function cdataClose(code) { - if (code === 93) { - effects.consume(code); - return cdataEnd; - } - return cdata(code); - } - function cdataEnd(code) { - if (code === 62) { - return end(code); - } - if (code === 93) { - effects.consume(code); - return cdataEnd; - } - return cdata(code); - } - function declaration(code) { - if (code === null || code === 62) { - return end(code); - } - if (markdownLineEnding$e(code)) { - returnState = declaration; - return atLineEnding(code); - } - effects.consume(code); - return declaration; - } - function instruction(code) { - if (code === null) { - return nok(code); - } - if (code === 63) { - effects.consume(code); - return instructionClose; - } - if (markdownLineEnding$e(code)) { - returnState = instruction; - return atLineEnding(code); - } - effects.consume(code); - return instruction; - } - function instructionClose(code) { - return code === 62 ? end(code) : instruction(code); - } - function tagCloseStart(code) { - if (asciiAlpha$2(code)) { - effects.consume(code); - return tagClose; - } - return nok(code); - } - function tagClose(code) { - if (code === 45 || asciiAlphanumeric$3(code)) { - effects.consume(code); - return tagClose; - } - return tagCloseBetween(code); - } - function tagCloseBetween(code) { - if (markdownLineEnding$e(code)) { - returnState = tagCloseBetween; - return atLineEnding(code); - } - if (markdownSpace$4(code)) { - effects.consume(code); - return tagCloseBetween; - } - return end(code); - } - function tagOpen(code) { - if (code === 45 || asciiAlphanumeric$3(code)) { - effects.consume(code); - return tagOpen; - } - if (code === 47 || code === 62 || markdownLineEndingOrSpace$5(code)) { - return tagOpenBetween(code); - } - return nok(code); - } - function tagOpenBetween(code) { - if (code === 47) { - effects.consume(code); - return end; - } - if (code === 58 || code === 95 || asciiAlpha$2(code)) { - effects.consume(code); - return tagOpenAttributeName; - } - if (markdownLineEnding$e(code)) { - returnState = tagOpenBetween; - return atLineEnding(code); - } - if (markdownSpace$4(code)) { - effects.consume(code); - return tagOpenBetween; - } - return end(code); - } - function tagOpenAttributeName(code) { - if (code === 45 || code === 46 || code === 58 || code === 95 || asciiAlphanumeric$3(code)) { - effects.consume(code); - return tagOpenAttributeName; - } - return tagOpenAttributeNameAfter(code); - } - function tagOpenAttributeNameAfter(code) { - if (code === 61) { - effects.consume(code); - return tagOpenAttributeValueBefore; - } - if (markdownLineEnding$e(code)) { - returnState = tagOpenAttributeNameAfter; - return atLineEnding(code); - } - if (markdownSpace$4(code)) { - effects.consume(code); - return tagOpenAttributeNameAfter; - } - return tagOpenBetween(code); - } - function tagOpenAttributeValueBefore(code) { - if (code === null || code === 60 || code === 61 || code === 62 || code === 96) { - return nok(code); - } - if (code === 34 || code === 39) { - effects.consume(code); - marker = code; - return tagOpenAttributeValueQuoted; - } - if (markdownLineEnding$e(code)) { - returnState = tagOpenAttributeValueBefore; - return atLineEnding(code); - } - if (markdownSpace$4(code)) { - effects.consume(code); - return tagOpenAttributeValueBefore; - } - effects.consume(code); - marker = undefined; - return tagOpenAttributeValueUnquoted; - } - function tagOpenAttributeValueQuoted(code) { - if (code === marker) { - effects.consume(code); - return tagOpenAttributeValueQuotedAfter; - } - if (code === null) { - return nok(code); - } - if (markdownLineEnding$e(code)) { - returnState = tagOpenAttributeValueQuoted; - return atLineEnding(code); - } - effects.consume(code); - return tagOpenAttributeValueQuoted; - } - function tagOpenAttributeValueQuotedAfter(code) { - if (code === 62 || code === 47 || markdownLineEndingOrSpace$5(code)) { - return tagOpenBetween(code); - } - return nok(code); - } - function tagOpenAttributeValueUnquoted(code) { - if (code === null || code === 34 || code === 39 || code === 60 || code === 61 || code === 96) { - return nok(code); - } - if (code === 62 || markdownLineEndingOrSpace$5(code)) { - return tagOpenBetween(code); - } - effects.consume(code); - return tagOpenAttributeValueUnquoted; - } - function atLineEnding(code) { - effects.exit("htmlTextData"); - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return factorySpace$a(effects, afterPrefix, "linePrefix", self.parser.constructs.disable.null.indexOf("codeIndented") > -1 ? undefined : 4); - } - function afterPrefix(code) { - effects.enter("htmlTextData"); - return returnState(code); - } - function end(code) { - if (code === 62) { - effects.consume(code); - effects.exit("htmlTextData"); - effects.exit("htmlText"); - return ok; - } - return nok(code); - } -} -exports$w = htmlText; -var _htmlText = exports$w; -var exports$x = { -}; -var chunkedSplice$5 = _chunkedSplice; -var chunkedPush$3 = _chunkedPush; -var normalizeIdentifier$1 = _normalizeIdentifier; -var shallow$3 = _shallow; -var resolveAll$2 = _resolveAll; -var markdownLineEndingOrSpace$6 = _markdownLineEndingOrSpace; -var factoryDestination$1 = _factoryDestination; -var factoryLabel$1 = _factoryLabel; -var factoryWhitespace$1 = _factoryWhitespace; -var factoryTitle$1 = _factoryTitle; -var labelEnd = { - name: "labelEnd", - tokenize: tokenizeLabelEnd, - resolveTo: resolveToLabelEnd, - resolveAll: resolveAllLabelEnd -}; -var resourceConstruct = { - tokenize: tokenizeResource -}; -var fullReferenceConstruct = { - tokenize: tokenizeFullReference -}; -var collapsedReferenceConstruct = { - tokenize: tokenizeCollapsedReference -}; -function resolveAllLabelEnd(events) { - var index = -1; - var token; - while((++index) < events.length){ - token = events[index][1]; - if (!token._used && (token.type === "labelImage" || token.type === "labelLink" || token.type === "labelEnd")) { - events.splice(index + 1, token.type === "labelImage" ? 4 : 2); - token.type = "data"; - index++; - } - } - return events; -} -function resolveToLabelEnd(events, context) { - var index = events.length; - var offset = 0; - var group; - var label; - var text1; - var token; - var open; - var close; - var media; - while(index--){ - token = events[index][1]; - if (open) { - if (token.type === "link" || token.type === "labelLink" && token._inactive) { - break; - } - if (events[index][0] === "enter" && token.type === "labelLink") { - token._inactive = true; - } - } else if (close) { - if (events[index][0] === "enter" && (token.type === "labelImage" || token.type === "labelLink") && !token._balanced) { - open = index; - if (token.type !== "labelLink") { - offset = 2; - break; - } - } - } else if (token.type === "labelEnd") { - close = index; - } - } - group = { - type: events[open][1].type === "labelLink" ? "link" : "image", - start: shallow$3(events[open][1].start), - end: shallow$3(events[events.length - 1][1].end) - }; - label = { - type: "label", - start: shallow$3(events[open][1].start), - end: shallow$3(events[close][1].end) - }; - text1 = { - type: "labelText", - start: shallow$3(events[open + offset + 2][1].end), - end: shallow$3(events[close - 2][1].start) - }; - media = [ - [ - "enter", - group, - context - ], - [ - "enter", - label, - context - ] - ]; - media = chunkedPush$3(media, events.slice(open + 1, open + offset + 3)); - media = chunkedPush$3(media, [ - [ - "enter", - text1, - context - ] - ]); - media = chunkedPush$3(media, resolveAll$2(context.parser.constructs.insideSpan.null, events.slice(open + offset + 4, close - 3), context)); - media = chunkedPush$3(media, [ - [ - "exit", - text1, - context - ], - events[close - 2], - events[close - 1], - [ - "exit", - label, - context - ] - ]); - media = chunkedPush$3(media, events.slice(close + 1)); - media = chunkedPush$3(media, [ - [ - "exit", - group, - context - ] - ]); - chunkedSplice$5(events, open, events.length, media); - return events; -} -function tokenizeLabelEnd(effects, ok, nok) { - var self = this; - var index = self.events.length; - var labelStart; - var defined; - while(index--){ - if ((self.events[index][1].type === "labelImage" || self.events[index][1].type === "labelLink") && !self.events[index][1]._balanced) { - labelStart = self.events[index][1]; - break; - } - } - return start; - function start(code) { - if (!labelStart) { - return nok(code); - } - if (labelStart._inactive) return balanced(code); - defined = self.parser.defined.indexOf(normalizeIdentifier$1(self.sliceSerialize({ - start: labelStart.end, - end: self.now() - }))) > -1; - effects.enter("labelEnd"); - effects.enter("labelMarker"); - effects.consume(code); - effects.exit("labelMarker"); - effects.exit("labelEnd"); - return afterLabelEnd; - } - function afterLabelEnd(code) { - if (code === 40) { - return effects.attempt(resourceConstruct, ok, defined ? ok : balanced)(code); - } - if (code === 91) { - return effects.attempt(fullReferenceConstruct, ok, defined ? effects.attempt(collapsedReferenceConstruct, ok, balanced) : balanced)(code); - } - return defined ? ok(code) : balanced(code); - } - function balanced(code) { - labelStart._balanced = true; - return nok(code); - } -} -function tokenizeResource(effects, ok, nok) { - return start; - function start(code) { - effects.enter("resource"); - effects.enter("resourceMarker"); - effects.consume(code); - effects.exit("resourceMarker"); - return factoryWhitespace$1(effects, open); - } - function open(code) { - if (code === 41) { - return end(code); - } - return factoryDestination$1(effects, destinationAfter, nok, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 3)(code); - } - function destinationAfter(code) { - return markdownLineEndingOrSpace$6(code) ? factoryWhitespace$1(effects, between)(code) : end(code); - } - function between(code) { - if (code === 34 || code === 39 || code === 40) { - return factoryTitle$1(effects, factoryWhitespace$1(effects, end), nok, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(code); - } - return end(code); - } - function end(code) { - if (code === 41) { - effects.enter("resourceMarker"); - effects.consume(code); - effects.exit("resourceMarker"); - effects.exit("resource"); - return ok; - } - return nok(code); - } -} -function tokenizeFullReference(effects, ok, nok) { - var self = this; - return start; - function start(code) { - return factoryLabel$1.call(self, effects, afterLabel, nok, "reference", "referenceMarker", "referenceString")(code); - } - function afterLabel(code) { - return self.parser.defined.indexOf(normalizeIdentifier$1(self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1))) < 0 ? nok(code) : ok(code); - } -} -function tokenizeCollapsedReference(effects, ok, nok) { - return start; - function start(code) { - effects.enter("reference"); - effects.enter("referenceMarker"); - effects.consume(code); - effects.exit("referenceMarker"); - return open; - } - function open(code) { - if (code === 93) { - effects.enter("referenceMarker"); - effects.consume(code); - effects.exit("referenceMarker"); - effects.exit("reference"); - return ok; - } - return nok(code); - } -} -exports$x = labelEnd; -var _labelEnd = exports$x; -var exports$y = { -}; -var labelEnd$1 = _labelEnd; -var labelStartImage = { - name: "labelStartImage", - tokenize: tokenizeLabelStartImage, - resolveAll: labelEnd$1.resolveAll -}; -function tokenizeLabelStartImage(effects, ok, nok) { - var self = this; - return start; - function start(code) { - effects.enter("labelImage"); - effects.enter("labelImageMarker"); - effects.consume(code); - effects.exit("labelImageMarker"); - return open; - } - function open(code) { - if (code === 91) { - effects.enter("labelMarker"); - effects.consume(code); - effects.exit("labelMarker"); - effects.exit("labelImage"); - return after; - } - return nok(code); - } - function after(code) { - return code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok(code); - } -} -exports$y = labelStartImage; -var _labelStartImage = exports$y; -var exports$z = { -}; -var labelEnd$2 = _labelEnd; -var labelStartLink = { - name: "labelStartLink", - tokenize: tokenizeLabelStartLink, - resolveAll: labelEnd$2.resolveAll -}; -function tokenizeLabelStartLink(effects, ok, nok) { - var self = this; - return start; - function start(code) { - effects.enter("labelLink"); - effects.enter("labelMarker"); - effects.consume(code); - effects.exit("labelMarker"); - effects.exit("labelLink"); - return after; - } - function after(code) { - return code === 94 && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok(code); - } -} -exports$z = labelStartLink; -var _labelStartLink = exports$z; -var exports$A = { -}; -var factorySpace$b = _factorySpace; -var lineEnding = { - name: "lineEnding", - tokenize: tokenizeLineEnding -}; -function tokenizeLineEnding(effects, ok) { - return start; - function start(code) { - effects.enter("lineEnding"); - effects.consume(code); - effects.exit("lineEnding"); - return factorySpace$b(effects, ok, "linePrefix"); - } -} -exports$A = lineEnding; -var _lineEnding = exports$A; -var exports$B = { -}; -var markdownLineEnding$f = _markdownLineEnding; -var markdownSpace$5 = _markdownSpace; -var factorySpace$c = _factorySpace; -var thematicBreak1 = { - name: "thematicBreak", - tokenize: tokenizeThematicBreak -}; -function tokenizeThematicBreak(effects, ok, nok) { - var size = 0; - var marker; - return start; - function start(code) { - effects.enter("thematicBreak"); - marker = code; - return atBreak(code); - } - function atBreak(code) { - if (code === marker) { - effects.enter("thematicBreakSequence"); - return sequence(code); - } - if (markdownSpace$5(code)) { - return factorySpace$c(effects, atBreak, "whitespace")(code); - } - if (size < 3 || code !== null && !markdownLineEnding$f(code)) { - return nok(code); - } - effects.exit("thematicBreak"); - return ok(code); - } - function sequence(code) { - if (code === marker) { - effects.consume(code); - size++; - return sequence; - } - effects.exit("thematicBreakSequence"); - return atBreak(code); - } -} -exports$B = thematicBreak1; -var _thematicBreak = exports$B; -var exports$C = { -}; -var markdownSpace$6 = _markdownSpace; -var factorySpace$d = _factorySpace; -var partialBlankLine$3 = _partialBlankLine; -var sizeChunks1 = _sizeChunks; -var prefixSize$3 = _prefixSize; -var asciiDigit$2 = _asciiDigit; -var thematicBreak$1 = _thematicBreak; -var list1 = { - name: "list", - tokenize: tokenizeListStart, - continuation: { - tokenize: tokenizeListContinuation - }, - exit: tokenizeListEnd -}; -var listItemPrefixWhitespaceConstruct = { - tokenize: tokenizeListItemPrefixWhitespace, - partial: true -}; -var indentConstruct = { - tokenize: tokenizeIndent, - partial: true -}; -function tokenizeListStart(effects, ok, nok) { - var self = this; - var initialSize = prefixSize$3(self.events, "linePrefix"); - var size = 0; - return start; - function start(code) { - var kind = self.containerState.type || (code === 42 || code === 43 || code === 45 ? "listUnordered" : "listOrdered"); - if (kind === "listUnordered" ? !self.containerState.marker || code === self.containerState.marker : asciiDigit$2(code)) { - if (!self.containerState.type) { - self.containerState.type = kind; - effects.enter(kind, { - _container: true - }); - } - if (kind === "listUnordered") { - effects.enter("listItemPrefix"); - return code === 42 || code === 45 ? effects.check(thematicBreak$1, nok, atMarker)(code) : atMarker(code); - } - if (!self.interrupt || code === 49) { - effects.enter("listItemPrefix"); - effects.enter("listItemValue"); - return inside(code); - } - } - return nok(code); - } - function inside(code) { - if (asciiDigit$2(code) && (++size) < 10) { - effects.consume(code); - return inside; - } - if ((!self.interrupt || size < 2) && (self.containerState.marker ? code === self.containerState.marker : code === 41 || code === 46)) { - effects.exit("listItemValue"); - return atMarker(code); - } - return nok(code); - } - function atMarker(code) { - effects.enter("listItemMarker"); - effects.consume(code); - effects.exit("listItemMarker"); - self.containerState.marker = self.containerState.marker || code; - return effects.check(partialBlankLine$3, self.interrupt ? nok : onBlank, effects.attempt(listItemPrefixWhitespaceConstruct, endOfPrefix, otherPrefix)); - } - function onBlank(code) { - self.containerState.initialBlankLine = true; - initialSize++; - return endOfPrefix(code); - } - function otherPrefix(code) { - if (markdownSpace$6(code)) { - effects.enter("listItemPrefixWhitespace"); - effects.consume(code); - effects.exit("listItemPrefixWhitespace"); - return endOfPrefix; - } - return nok(code); - } - function endOfPrefix(code) { - self.containerState.size = initialSize + sizeChunks1(self.sliceStream(effects.exit("listItemPrefix"))); - return ok(code); - } -} -function tokenizeListContinuation(effects, ok, nok) { - var self = this; - self.containerState._closeFlow = undefined; - return effects.check(partialBlankLine$3, onBlank, notBlank); - function onBlank(code) { - self.containerState.furtherBlankLines = self.containerState.furtherBlankLines || self.containerState.initialBlankLine; - return ok(code); - } - function notBlank(code) { - if (self.containerState.furtherBlankLines || !markdownSpace$6(code)) { - self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined; - return notInCurrentItem(code); - } - self.containerState.furtherBlankLines = self.containerState.initialBlankLine = undefined; - return effects.attempt(indentConstruct, ok, notInCurrentItem)(code); - } - function notInCurrentItem(code) { - self.containerState._closeFlow = true; - self.interrupt = undefined; - return factorySpace$d(effects, effects.attempt(list1, ok, nok), "linePrefix", self.parser.constructs.disable.null.indexOf("codeIndented") > -1 ? undefined : 4)(code); - } -} -function tokenizeIndent(effects, ok, nok) { - var self = this; - return factorySpace$d(effects, afterPrefix, "listItemIndent", self.containerState.size + 1); - function afterPrefix(code) { - return prefixSize$3(self.events, "listItemIndent") === self.containerState.size ? ok(code) : nok(code); - } -} -function tokenizeListEnd(effects) { - effects.exit(this.containerState.type); -} -function tokenizeListItemPrefixWhitespace(effects, ok, nok) { - var self = this; - return factorySpace$d(effects, afterPrefix, "listItemPrefixWhitespace", self.parser.constructs.disable.null.indexOf("codeIndented") > -1 ? undefined : 4 + 1); - function afterPrefix(code) { - return markdownSpace$6(code) || !prefixSize$3(self.events, "listItemPrefixWhitespace") ? nok(code) : ok(code); - } -} -exports$C = list1; -var _list = exports$C; -var exports$D = { -}; -var markdownLineEnding$g = _markdownLineEnding; -var factorySpace$e = _factorySpace; -var shallow$4 = _shallow; -var setextUnderline = { - name: "setextUnderline", - tokenize: tokenizeSetextUnderline, - resolveTo: resolveToSetextUnderline -}; -function resolveToSetextUnderline(events, context) { - var index = events.length; - var content2; - var text1; - var definition1; - var heading; - while(index--){ - if (events[index][0] === "enter") { - if (events[index][1].type === "content") { - content2 = index; - break; - } - if (events[index][1].type === "paragraph") { - text1 = index; - } - } else { - if (events[index][1].type === "content") { - events.splice(index, 1); - } - if (!definition1 && events[index][1].type === "definition") { - definition1 = index; - } - } - } - heading = { - type: "setextHeading", - start: shallow$4(events[text1][1].start), - end: shallow$4(events[events.length - 1][1].end) - }; - events[text1][1].type = "setextHeadingText"; - if (definition1) { - events.splice(text1, 0, [ - "enter", - heading, - context - ]); - events.splice(definition1 + 1, 0, [ - "exit", - events[content2][1], - context - ]); - events[content2][1].end = shallow$4(events[definition1][1].end); - } else { - events[content2][1] = heading; - } - events.push([ - "exit", - heading, - context - ]); - return events; -} -function tokenizeSetextUnderline(effects, ok, nok) { - var self = this; - var index = self.events.length; - var marker; - var paragraph; - while(index--){ - if (self.events[index][1].type !== "lineEnding" && self.events[index][1].type !== "linePrefix" && self.events[index][1].type !== "content") { - paragraph = self.events[index][1].type === "paragraph"; - break; - } - } - return start; - function start(code) { - if (!self.lazy && (self.interrupt || paragraph)) { - effects.enter("setextHeadingLine"); - effects.enter("setextHeadingLineSequence"); - marker = code; - return closingSequence(code); - } - return nok(code); - } - function closingSequence(code) { - if (code === marker) { - effects.consume(code); - return closingSequence; - } - effects.exit("setextHeadingLineSequence"); - return factorySpace$e(effects, closingSequenceEnd, "lineSuffix")(code); - } - function closingSequenceEnd(code) { - if (code === null || markdownLineEnding$g(code)) { - effects.exit("setextHeadingLine"); - return ok(code); - } - return nok(code); - } -} -exports$D = setextUnderline; -var _setextUnderline = exports$D; -var exports$E = { -}; -Object.defineProperty(exports$E, "__esModule", { - value: true -}); -var text$1 = exports$5; -var attention$1 = _attention; -var autolink$1 = _autolink; -var blockQuote$1 = _blockQuote; -var characterEscape$1 = _characterEscape; -var characterReference$1 = _characterReference; -var codeFenced$1 = _codeFenced; -var codeIndented$1 = _codeIndented; -var codeText$1 = _codeText; -var definition$1 = _definition; -var hardBreakEscape$1 = _hardBreakEscape; -var headingAtx$1 = _headingAtx; -var htmlFlow$1 = _htmlFlow; -var htmlText$1 = _htmlText; -var labelEnd$3 = _labelEnd; -var labelStartImage$1 = _labelStartImage; -var labelStartLink$1 = _labelStartLink; -var lineEnding$1 = _lineEnding; -var thematicBreak$2 = _thematicBreak; -var list$1 = _list; -var setextUnderline$1 = _setextUnderline; -var document1 = { - 42: list$1, - 43: list$1, - 45: list$1, - 48: list$1, - 49: list$1, - 50: list$1, - 51: list$1, - 52: list$1, - 53: list$1, - 54: list$1, - 55: list$1, - 56: list$1, - 57: list$1, - 62: blockQuote$1 -}; -var contentInitial = { - 91: definition$1 -}; -var flowInitial = { - "-2": codeIndented$1, - "-1": codeIndented$1, - 32: codeIndented$1 -}; -var flow = { - 35: headingAtx$1, - 42: thematicBreak$2, - 45: [ - setextUnderline$1, - thematicBreak$2 - ], - 60: htmlFlow$1, - 61: setextUnderline$1, - 95: thematicBreak$2, - 96: codeFenced$1, - 126: codeFenced$1 -}; -var string$1 = { - 38: characterReference$1, - 92: characterEscape$1 -}; -var text$2 = { - "-5": lineEnding$1, - "-4": lineEnding$1, - "-3": lineEnding$1, - 33: labelStartImage$1, - 38: characterReference$1, - 42: attention$1, - 60: [ - autolink$1, - htmlText$1 - ], - 91: labelStartLink$1, - 92: [ - hardBreakEscape$1, - characterEscape$1 - ], - 93: labelEnd$3, - 95: attention$1, - 96: codeText$1 -}; -var insideSpan = { - null: [ - attention$1, - text$1.resolver - ] -}; -var disable = { - null: [] -}; -exports$E.contentInitial = contentInitial; -exports$E.disable = disable; -exports$E.document = document1; -exports$E.flow = flow; -exports$E.flowInitial = flowInitial; -exports$E.insideSpan = insideSpan; -exports$E.string = string$1; -exports$E.text = text$2; -var exports$F = { -}; -var miniflat$11 = _miniflat; -var content$2 = exports$15; -var document$1 = exports$21; -var flow$1 = exports$4; -var text$3 = exports$5; -var combineExtensions1 = _combineExtensions; -var createTokenizer$1 = _createTokenizer; -var constructs1 = exports$E; -function parse(options) { - var settings = options || { - }; - var parser = { - defined: [], - constructs: combineExtensions1([ - constructs1 - ].concat(miniflat$11(settings.extensions))), - content: create(content$2), - document: create(document$1), - flow: create(flow$1), - string: create(text$3.string), - text: create(text$3.text) - }; - return parser; - function create(initializer) { - return creator; - function creator(from) { - return createTokenizer$1(parser, initializer, from); - } - } -} -exports$F = parse; -var _parse = exports$F; -const a = _parse; -var exports25 = { -}; -var search = /[\0\t\n\r]/g; -function preprocess() { - var start = true; - var column = 1; - var buffer = ""; - var atCarriageReturn; - return preprocessor; - function preprocessor(value, encoding, end) { - var chunks = []; - var match; - var next; - var startPosition; - var endPosition; - var code; - value = buffer + value.toString(encoding); - startPosition = 0; - buffer = ""; - if (start) { - if (value.charCodeAt(0) === 65279) { - startPosition++; - } - start = undefined; - } - while(startPosition < value.length){ - search.lastIndex = startPosition; - match = search.exec(value); - endPosition = match ? match.index : value.length; - code = value.charCodeAt(endPosition); - if (!match) { - buffer = value.slice(startPosition); - break; - } - if (code === 10 && startPosition === endPosition && atCarriageReturn) { - chunks.push(-3); - atCarriageReturn = undefined; - } else { - if (atCarriageReturn) { - chunks.push(-5); - atCarriageReturn = undefined; - } - if (startPosition < endPosition) { - chunks.push(value.slice(startPosition, endPosition)); - column += endPosition - startPosition; - } - if (code === 0) { - chunks.push(65533); - column++; - } else if (code === 9) { - next = Math.ceil(column / 4) * 4; - chunks.push(-2); - while((column++) < next)chunks.push(-1); - } else if (code === 10) { - chunks.push(-4); - column = 1; - } else { - atCarriageReturn = true; - column = 1; - } - } - startPosition = endPosition + 1; - } - if (end) { - if (atCarriageReturn) chunks.push(-5); - if (buffer) chunks.push(buffer); - chunks.push(null); - } - return chunks; - } -} -exports25 = preprocess; -var _preprocess = exports25; -var exports26 = { -}; -var subtokenize2 = _subtokenize; -function postprocess(events) { - while(!subtokenize2(events)){ - } - return events; -} -exports26 = postprocess; -var _postprocess = exports26; -var exports27 = { -}; -var own1 = { -}.hasOwnProperty; -exports27 = stringify; -function stringify(value) { - if (!value || typeof value !== "object") { - return ""; - } - if (own1.call(value, "position") || own1.call(value, "type")) { - return position(value.position); - } - if (own1.call(value, "start") || own1.call(value, "end")) { - return position(value); - } - if (own1.call(value, "line") || own1.call(value, "column")) { - return point1(value); - } - return ""; -} -function point1(point1) { - if (!point1 || typeof point1 !== "object") { - point1 = { - }; - } - return index(point1.line) + ":" + index(point1.column); -} -function position(pos) { - if (!pos || typeof pos !== "object") { - pos = { - }; - } - return point1(pos.start) + "-" + point1(pos.end); -} -function index(value) { - return value && typeof value === "number" ? value : 1; -} -var exports$16 = exports27; -var exports28 = { -}; -exports28 = fromMarkdown; -var toString1 = exports$1; -var assign4 = _assign; -var own2 = _hasOwnProperty; -var normalizeIdentifier2 = _normalizeIdentifier; -var safeFromInt1 = _safeFromInt; -var parser = a; -var preprocessor = _preprocess; -var postprocess1 = _postprocess; -var decode = _decodeEntity; -var stringifyPosition = exports$16; -function fromMarkdown(value, encoding, options) { - if (typeof encoding !== "string") { - options = encoding; - encoding = undefined; - } - return compiler(options)(postprocess1(parser(options).document().write(preprocessor()(value, encoding, true)))); -} -function compiler(options) { - var settings = options || { - }; - var config = configure({ - canContainEols: [ - "emphasis", - "fragment", - "heading", - "paragraph", - "strong" - ], - enter: { - autolink: opener(link), - autolinkProtocol: onenterdata, - autolinkEmail: onenterdata, - atxHeading: opener(heading), - blockQuote: opener(blockQuote2), - characterEscape: onenterdata, - characterReference: onenterdata, - codeFenced: opener(codeFlow), - codeFencedFenceInfo: buffer, - codeFencedFenceMeta: buffer, - codeIndented: opener(codeFlow, buffer), - codeText: opener(codeText2, buffer), - codeTextData: onenterdata, - data: onenterdata, - codeFlowValue: onenterdata, - definition: opener(definition2), - definitionDestinationString: buffer, - definitionLabelString: buffer, - definitionTitleString: buffer, - emphasis: opener(emphasis), - hardBreakEscape: opener(hardBreak), - hardBreakTrailing: opener(hardBreak), - htmlFlow: opener(html, buffer), - htmlFlowData: onenterdata, - htmlText: opener(html, buffer), - htmlTextData: onenterdata, - image: opener(image), - label: buffer, - link: opener(link), - listItem: opener(listItem), - listItemValue: onenterlistitemvalue, - listOrdered: opener(list2, onenterlistordered), - listUnordered: opener(list2), - paragraph: opener(paragraph), - reference: onenterreference, - referenceString: buffer, - resourceDestinationString: buffer, - resourceTitleString: buffer, - setextHeading: opener(heading), - strong: opener(strong), - thematicBreak: opener(thematicBreak2) - }, - exit: { - atxHeading: closer(), - atxHeadingSequence: onexitatxheadingsequence, - autolink: closer(), - autolinkEmail: onexitautolinkemail, - autolinkProtocol: onexitautolinkprotocol, - blockQuote: closer(), - characterEscapeValue: onexitdata, - characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker, - characterReferenceMarkerNumeric: onexitcharacterreferencemarker, - characterReferenceValue: onexitcharacterreferencevalue, - codeFenced: closer(onexitcodefenced), - codeFencedFence: onexitcodefencedfence, - codeFencedFenceInfo: onexitcodefencedfenceinfo, - codeFencedFenceMeta: onexitcodefencedfencemeta, - codeFlowValue: onexitdata, - codeIndented: closer(onexitcodeindented), - codeText: closer(onexitcodetext), - codeTextData: onexitdata, - data: onexitdata, - definition: closer(), - definitionDestinationString: onexitdefinitiondestinationstring, - definitionLabelString: onexitdefinitionlabelstring, - definitionTitleString: onexitdefinitiontitlestring, - emphasis: closer(), - hardBreakEscape: closer(onexithardbreak), - hardBreakTrailing: closer(onexithardbreak), - htmlFlow: closer(onexithtmlflow), - htmlFlowData: onexitdata, - htmlText: closer(onexithtmltext), - htmlTextData: onexitdata, - image: closer(onexitimage), - label: onexitlabel, - labelText: onexitlabeltext, - lineEnding: onexitlineending, - link: closer(onexitlink), - listItem: closer(), - listOrdered: closer(), - listUnordered: closer(), - paragraph: closer(), - referenceString: onexitreferencestring, - resourceDestinationString: onexitresourcedestinationstring, - resourceTitleString: onexitresourcetitlestring, - resource: onexitresource, - setextHeading: closer(onexitsetextheading), - setextHeadingLineSequence: onexitsetextheadinglinesequence, - setextHeadingText: onexitsetextheadingtext, - strong: closer(), - thematicBreak: closer() - } - }, settings.mdastExtensions || []); - var data = { - }; - return compile; - function compile(events) { - var stack = [ - { - type: "root", - children: [] - } - ]; - var tokenStack = []; - var listStack = []; - var index1 = -1; - var handler; - var listStart; - var context = { - stack: stack, - tokenStack: tokenStack, - config: config, - enter: enter, - exit: exit2, - buffer: buffer, - resume: resume, - setData: setData, - getData: getData - }; - while((++index1) < events.length){ - if (events[index1][1].type === "listOrdered" || events[index1][1].type === "listUnordered") { - if (events[index1][0] === "enter") { - listStack.push(index1); - } else { - listStart = listStack.pop(index1); - index1 = prepareList(events, listStart, index1); - } - } - } - index1 = -1; - while((++index1) < events.length){ - handler = config[events[index1][0]]; - if (own2.call(handler, events[index1][1].type)) { - handler[events[index1][1].type].call(assign4({ - sliceSerialize: events[index1][2].sliceSerialize - }, context), events[index1][1]); - } - } - if (tokenStack.length) { - throw new Error("Cannot close document, a token (`" + tokenStack[tokenStack.length - 1].type + "`, " + stringifyPosition({ - start: tokenStack[tokenStack.length - 1].start, - end: tokenStack[tokenStack.length - 1].end - }) + ") is still open"); - } - stack[0].position = { - start: point2(events.length ? events[0][1].start : { - line: 1, - column: 1, - offset: 0 - }), - end: point2(events.length ? events[events.length - 2][1].end : { - line: 1, - column: 1, - offset: 0 - }) - }; - return stack[0]; - } - function prepareList(events, start, length) { - var index1 = start - 1; - var containerBalance = -1; - var listSpread = false; - var listItem; - var tailIndex; - var lineIndex; - var tailEvent; - var event; - var firstBlankLineIndex; - var atMarker; - while((++index1) <= length){ - event = events[index1]; - if (event[1].type === "listUnordered" || event[1].type === "listOrdered" || event[1].type === "blockQuote") { - if (event[0] === "enter") { - containerBalance++; - } else { - containerBalance--; - } - atMarker = undefined; - } else if (event[1].type === "lineEndingBlank") { - if (event[0] === "enter") { - if (listItem && !atMarker && !containerBalance && !firstBlankLineIndex) { - firstBlankLineIndex = index1; - } - atMarker = undefined; - } - } else if (event[1].type === "linePrefix" || event[1].type === "listItemValue" || event[1].type === "listItemMarker" || event[1].type === "listItemPrefix" || event[1].type === "listItemPrefixWhitespace") { - } else { - atMarker = undefined; - } - if (!containerBalance && event[0] === "enter" && event[1].type === "listItemPrefix" || containerBalance === -1 && event[0] === "exit" && (event[1].type === "listUnordered" || event[1].type === "listOrdered")) { - if (listItem) { - tailIndex = index1; - lineIndex = undefined; - while(tailIndex--){ - tailEvent = events[tailIndex]; - if (tailEvent[1].type === "lineEnding" || tailEvent[1].type === "lineEndingBlank") { - if (tailEvent[0] === "exit") continue; - if (lineIndex) { - events[lineIndex][1].type = "lineEndingBlank"; - listSpread = true; - } - tailEvent[1].type = "lineEnding"; - lineIndex = tailIndex; - } else if (tailEvent[1].type === "linePrefix" || tailEvent[1].type === "blockQuotePrefix" || tailEvent[1].type === "blockQuotePrefixWhitespace" || tailEvent[1].type === "blockQuoteMarker" || tailEvent[1].type === "listItemIndent") { - } else { - break; - } - } - if (firstBlankLineIndex && (!lineIndex || firstBlankLineIndex < lineIndex)) { - listItem._spread = true; - } - listItem.end = point2(lineIndex ? events[lineIndex][1].start : event[1].end); - events.splice(lineIndex || index1, 0, [ - "exit", - listItem, - event[2] - ]); - index1++; - length++; - } - if (event[1].type === "listItemPrefix") { - listItem = { - type: "listItem", - _spread: false, - start: point2(event[1].start) - }; - events.splice(index1, 0, [ - "enter", - listItem, - event[2] - ]); - index1++; - length++; - firstBlankLineIndex = undefined; - atMarker = true; - } - } - } - events[start][1]._spread = listSpread; - return length; - } - function setData(key, value) { - data[key] = value; - } - function getData(key) { - return data[key]; - } - function point2(d) { - return { - line: d.line, - column: d.column, - offset: d.offset - }; - } - function opener(create, and) { - return open; - function open(token) { - enter.call(this, create(token), token); - if (and) and.call(this, token); - } - } - function buffer() { - this.stack.push({ - type: "fragment", - children: [] - }); - } - function enter(node, token) { - this.stack[this.stack.length - 1].children.push(node); - this.stack.push(node); - this.tokenStack.push(token); - node.position = { - start: point2(token.start) - }; - return node; - } - function closer(and) { - return close; - function close(token) { - if (and) and.call(this, token); - exit2.call(this, token); - } - } - function exit2(token) { - var node = this.stack.pop(); - var open = this.tokenStack.pop(); - if (!open) { - throw new Error("Cannot close `" + token.type + "` (" + stringifyPosition({ - start: token.start, - end: token.end - }) + "): it\u2019s not open"); - } else if (open.type !== token.type) { - throw new Error("Cannot close `" + token.type + "` (" + stringifyPosition({ - start: token.start, - end: token.end - }) + "): a different token (`" + open.type + "`, " + stringifyPosition({ - start: open.start, - end: open.end - }) + ") is open"); - } - node.position.end = point2(token.end); - return node; - } - function resume() { - return toString1(this.stack.pop()); - } - function onenterlistordered() { - setData("expectingFirstListItemValue", true); - } - function onenterlistitemvalue(token) { - if (getData("expectingFirstListItemValue")) { - this.stack[this.stack.length - 2].start = parseInt(this.sliceSerialize(token), 10); - setData("expectingFirstListItemValue"); - } - } - function onexitcodefencedfenceinfo() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].lang = data1; - } - function onexitcodefencedfencemeta() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].meta = data1; - } - function onexitcodefencedfence() { - if (getData("flowCodeInside")) return; - this.buffer(); - setData("flowCodeInside", true); - } - function onexitcodefenced() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].value = data1.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""); - setData("flowCodeInside"); - } - function onexitcodeindented() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].value = data1; - } - function onexitdefinitionlabelstring(token) { - var label = this.resume(); - this.stack[this.stack.length - 1].label = label; - this.stack[this.stack.length - 1].identifier = normalizeIdentifier2(this.sliceSerialize(token)).toLowerCase(); - } - function onexitdefinitiontitlestring() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].title = data1; - } - function onexitdefinitiondestinationstring() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].url = data1; - } - function onexitatxheadingsequence(token) { - if (!this.stack[this.stack.length - 1].depth) { - this.stack[this.stack.length - 1].depth = this.sliceSerialize(token).length; - } - } - function onexitsetextheadingtext() { - setData("setextHeadingSlurpLineEnding", true); - } - function onexitsetextheadinglinesequence(token) { - this.stack[this.stack.length - 1].depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2; - } - function onexitsetextheading() { - setData("setextHeadingSlurpLineEnding"); - } - function onenterdata(token) { - var siblings = this.stack[this.stack.length - 1].children; - var tail = siblings[siblings.length - 1]; - if (!tail || tail.type !== "text") { - tail = text2(); - tail.position = { - start: point2(token.start) - }; - this.stack[this.stack.length - 1].children.push(tail); - } - this.stack.push(tail); - } - function onexitdata(token) { - var tail = this.stack.pop(); - tail.value += this.sliceSerialize(token); - tail.position.end = point2(token.end); - } - function onexitlineending(token) { - var context = this.stack[this.stack.length - 1]; - if (getData("atHardBreak")) { - context.children[context.children.length - 1].position.end = point2(token.end); - setData("atHardBreak"); - return; - } - if (!getData("setextHeadingSlurpLineEnding") && config.canContainEols.indexOf(context.type) > -1) { - onenterdata.call(this, token); - onexitdata.call(this, token); - } - } - function onexithardbreak() { - setData("atHardBreak", true); - } - function onexithtmlflow() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].value = data1; - } - function onexithtmltext() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].value = data1; - } - function onexitcodetext() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].value = data1; - } - function onexitlink() { - var context = this.stack[this.stack.length - 1]; - if (getData("inReference")) { - context.type += "Reference"; - context.referenceType = getData("referenceType") || "shortcut"; - delete context.url; - delete context.title; - } else { - delete context.identifier; - delete context.label; - delete context.referenceType; - } - setData("referenceType"); - } - function onexitimage() { - var context = this.stack[this.stack.length - 1]; - if (getData("inReference")) { - context.type += "Reference"; - context.referenceType = getData("referenceType") || "shortcut"; - delete context.url; - delete context.title; - } else { - delete context.identifier; - delete context.label; - delete context.referenceType; - } - setData("referenceType"); - } - function onexitlabeltext(token) { - this.stack[this.stack.length - 2].identifier = normalizeIdentifier2(this.sliceSerialize(token)).toLowerCase(); - } - function onexitlabel() { - var fragment = this.stack[this.stack.length - 1]; - var value = this.resume(); - this.stack[this.stack.length - 1].label = value; - setData("inReference", true); - if (this.stack[this.stack.length - 1].type === "link") { - this.stack[this.stack.length - 1].children = fragment.children; - } else { - this.stack[this.stack.length - 1].alt = value; - } - } - function onexitresourcedestinationstring() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].url = data1; - } - function onexitresourcetitlestring() { - var data1 = this.resume(); - this.stack[this.stack.length - 1].title = data1; - } - function onexitresource() { - setData("inReference"); - } - function onenterreference() { - setData("referenceType", "collapsed"); - } - function onexitreferencestring(token) { - var label = this.resume(); - this.stack[this.stack.length - 1].label = label; - this.stack[this.stack.length - 1].identifier = normalizeIdentifier2(this.sliceSerialize(token)).toLowerCase(); - setData("referenceType", "full"); - } - function onexitcharacterreferencemarker(token) { - setData("characterReferenceType", token.type); - } - function onexitcharacterreferencevalue(token) { - var data1 = this.sliceSerialize(token); - var type = getData("characterReferenceType"); - var value; - var tail; - if (type) { - value = safeFromInt1(data1, type === "characterReferenceMarkerNumeric" ? 10 : 16); - setData("characterReferenceType"); - } else { - value = decode(data1); - } - tail = this.stack.pop(); - tail.value += value; - tail.position.end = point2(token.end); - } - function onexitautolinkprotocol(token) { - onexitdata.call(this, token); - this.stack[this.stack.length - 1].url = this.sliceSerialize(token); - } - function onexitautolinkemail(token) { - onexitdata.call(this, token); - this.stack[this.stack.length - 1].url = "mailto:" + this.sliceSerialize(token); - } - function blockQuote2() { - return { - type: "blockquote", - children: [] - }; - } - function codeFlow() { - return { - type: "code", - lang: null, - meta: null, - value: "" - }; - } - function codeText2() { - return { - type: "inlineCode", - value: "" - }; - } - function definition2() { - return { - type: "definition", - identifier: "", - label: null, - title: null, - url: "" - }; - } - function emphasis() { - return { - type: "emphasis", - children: [] - }; - } - function heading() { - return { - type: "heading", - depth: undefined, - children: [] - }; - } - function hardBreak() { - return { - type: "break" - }; - } - function html() { - return { - type: "html", - value: "" - }; - } - function image() { - return { - type: "image", - title: null, - url: "", - alt: null - }; - } - function link() { - return { - type: "link", - title: null, - url: "", - children: [] - }; - } - function list2(token) { - return { - type: "list", - ordered: token.type === "listOrdered", - start: null, - spread: token._spread, - children: [] - }; - } - function listItem(token) { - return { - type: "listItem", - spread: token._spread, - checked: null, - children: [] - }; - } - function paragraph() { - return { - type: "paragraph", - children: [] - }; - } - function strong() { - return { - type: "strong", - children: [] - }; - } - function text2() { - return { - type: "text", - value: "" - }; - } - function thematicBreak2() { - return { - type: "thematicBreak" - }; - } -} -function configure(config, extensions) { - var index1 = -1; - while((++index1) < extensions.length){ - extension2(config, extensions[index1]); - } - return config; -} -function extension2(config, extension3) { - var key; - var left; - for(key in extension3){ - left = own2.call(config, key) ? config[key] : config[key] = { - }; - if (key === "canContainEols") { - config[key] = [].concat(left, extension3[key]); - } else { - Object.assign(left, extension3[key]); - } - } -} -var exports$17 = exports28; -globalThis.document = { - createElement: (...data1)=>{ - return new class { - set innerHTML(data) { - this.textContent = data; - } - textContent = ''; - }(); - } -}; -document.createElement(); -const mdast1 = exports$17; -export { mdast1 as mdast }; diff --git a/mdast-util-from-markdown@1_2_0-shimmed.js b/mdast-util-from-markdown@1_2_0-shimmed.js new file mode 100644 index 0000000..1da4ee8 --- /dev/null +++ b/mdast-util-from-markdown@1_2_0-shimmed.js @@ -0,0 +1,4794 @@ +// deno-fmt-ignore-file +// deno-lint-ignore-file +// This code was bundled using `deno bundle` and it's not recommended to edit it manually + +function l(r, t) { + var { includeImageAlt: i = !0 } = t || {}; + return a(r, i); +} +function a(r, t) { + return r && typeof r == "object" && (r.value || (t ? r.alt : "") || "children" in r && u(r.children, t) || Array.isArray(r) && u(r, t)) || ""; +} +function u(r, t) { + for(var i = [], n = -1; ++n < r.length;)i[n] = a(r[n], t); + return i.join(""); +} +function u1(p, n, l, h) { + let c = p.length, f = 0, e; + if (n < 0 ? n = -n > c ? 0 : c + n : n = n > c ? c : n, l = l > 0 ? l : 0, h.length < 1e4) e = Array.from(h), e.unshift(n, l), [].splice.apply(p, e); + else for(l && [].splice.apply(p, [ + n, + l + ]); f < h.length;)e = h.slice(f, f + 1e4), e.unshift(n, 0), [].splice.apply(p, e), f += 1e4, n += 1e4; +} +function g(p, n) { + return p.length > 0 ? (u1(p, p.length, 0, n), p) : n; +} +var l1 = {}.hasOwnProperty; +function y(t) { + let e = {}, n = -1; + for(; ++n < t.length;)h(e, t[n]); + return e; +} +function h(t, e) { + let n; + for(n in e){ + let c = (l1.call(t, n) ? t[n] : void 0) || (t[n] = {}), r = e[n], o; + for(o in r){ + l1.call(c, o) || (c[o] = []); + let f = r[o]; + a1(c[o], Array.isArray(f) ? f : f ? [ + f + ] : []); + } + } +} +function a1(t, e) { + let n = -1, i = []; + for(; ++n < e.length;)(e[n].add === "after" ? t : i).push(e[n]); + u1(t, 0, 0, i); +} +var n = /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/; +var o = F(/[A-Za-z]/), r = F(/\d/), D = F(/[\dA-Fa-f]/), C = F(/[\dA-Za-z]/), e = F(/[!-/:-@[-`{-~]/), c = F(/[#-'*+\--9=?A-Z^-~]/); +function B(u) { + return u !== null && (u < 32 || u === 127); +} +function a2(u) { + return u !== null && (u < 0 || u === 32); +} +function p(u) { + return u !== null && u < -2; +} +function s(u) { + return u === -2 || u === -1 || u === 32; +} +var x = F(/\s/), l2 = F(n); +function F(u) { + return t; + function t(A) { + return A !== null && u.test(String.fromCharCode(A)); + } +} +function p1(n, t, i, u) { + let o = u ? u - 1 : Number.POSITIVE_INFINITY, I = 0; + return a; + function a(r) { + return s(r) ? (n.enter(i), e(r)) : t(r); + } + function e(r) { + return s(r) && (I++) < o ? (n.consume(r), e) : (n.exit(i), t(r)); + } +} +function a3(n) { + if (n === null || a2(n) || x(n)) return 1; + if (l2(n)) return 2; +} +function c1(o, e, r) { + let i = [], n = -1; + for(; ++n < o.length;){ + let l = o[n].resolveAll; + l && !i.includes(l) && (e = l(e, r), i.push(l)); + } + return e; +} +var r1 = { + AElig: "\xC6", + AMP: "&", + Aacute: "\xC1", + Abreve: "\u0102", + Acirc: "\xC2", + Acy: "\u0410", + Afr: "\u{1D504}", + Agrave: "\xC0", + Alpha: "\u0391", + Amacr: "\u0100", + And: "\u2A53", + Aogon: "\u0104", + Aopf: "\u{1D538}", + ApplyFunction: "\u2061", + Aring: "\xC5", + Ascr: "\u{1D49C}", + Assign: "\u2254", + Atilde: "\xC3", + Auml: "\xC4", + Backslash: "\u2216", + Barv: "\u2AE7", + Barwed: "\u2306", + Bcy: "\u0411", + Because: "\u2235", + Bernoullis: "\u212C", + Beta: "\u0392", + Bfr: "\u{1D505}", + Bopf: "\u{1D539}", + Breve: "\u02D8", + Bscr: "\u212C", + Bumpeq: "\u224E", + CHcy: "\u0427", + COPY: "\xA9", + Cacute: "\u0106", + Cap: "\u22D2", + CapitalDifferentialD: "\u2145", + Cayleys: "\u212D", + Ccaron: "\u010C", + Ccedil: "\xC7", + Ccirc: "\u0108", + Cconint: "\u2230", + Cdot: "\u010A", + Cedilla: "\xB8", + CenterDot: "\xB7", + Cfr: "\u212D", + Chi: "\u03A7", + CircleDot: "\u2299", + CircleMinus: "\u2296", + CirclePlus: "\u2295", + CircleTimes: "\u2297", + ClockwiseContourIntegral: "\u2232", + CloseCurlyDoubleQuote: "\u201D", + CloseCurlyQuote: "\u2019", + Colon: "\u2237", + Colone: "\u2A74", + Congruent: "\u2261", + Conint: "\u222F", + ContourIntegral: "\u222E", + Copf: "\u2102", + Coproduct: "\u2210", + CounterClockwiseContourIntegral: "\u2233", + Cross: "\u2A2F", + Cscr: "\u{1D49E}", + Cup: "\u22D3", + CupCap: "\u224D", + DD: "\u2145", + DDotrahd: "\u2911", + DJcy: "\u0402", + DScy: "\u0405", + DZcy: "\u040F", + Dagger: "\u2021", + Darr: "\u21A1", + Dashv: "\u2AE4", + Dcaron: "\u010E", + Dcy: "\u0414", + Del: "\u2207", + Delta: "\u0394", + Dfr: "\u{1D507}", + DiacriticalAcute: "\xB4", + DiacriticalDot: "\u02D9", + DiacriticalDoubleAcute: "\u02DD", + DiacriticalGrave: "`", + DiacriticalTilde: "\u02DC", + Diamond: "\u22C4", + DifferentialD: "\u2146", + Dopf: "\u{1D53B}", + Dot: "\xA8", + DotDot: "\u20DC", + DotEqual: "\u2250", + DoubleContourIntegral: "\u222F", + DoubleDot: "\xA8", + DoubleDownArrow: "\u21D3", + DoubleLeftArrow: "\u21D0", + DoubleLeftRightArrow: "\u21D4", + DoubleLeftTee: "\u2AE4", + DoubleLongLeftArrow: "\u27F8", + DoubleLongLeftRightArrow: "\u27FA", + DoubleLongRightArrow: "\u27F9", + DoubleRightArrow: "\u21D2", + DoubleRightTee: "\u22A8", + DoubleUpArrow: "\u21D1", + DoubleUpDownArrow: "\u21D5", + DoubleVerticalBar: "\u2225", + DownArrow: "\u2193", + DownArrowBar: "\u2913", + DownArrowUpArrow: "\u21F5", + DownBreve: "\u0311", + DownLeftRightVector: "\u2950", + DownLeftTeeVector: "\u295E", + DownLeftVector: "\u21BD", + DownLeftVectorBar: "\u2956", + DownRightTeeVector: "\u295F", + DownRightVector: "\u21C1", + DownRightVectorBar: "\u2957", + DownTee: "\u22A4", + DownTeeArrow: "\u21A7", + Downarrow: "\u21D3", + Dscr: "\u{1D49F}", + Dstrok: "\u0110", + ENG: "\u014A", + ETH: "\xD0", + Eacute: "\xC9", + Ecaron: "\u011A", + Ecirc: "\xCA", + Ecy: "\u042D", + Edot: "\u0116", + Efr: "\u{1D508}", + Egrave: "\xC8", + Element: "\u2208", + Emacr: "\u0112", + EmptySmallSquare: "\u25FB", + EmptyVerySmallSquare: "\u25AB", + Eogon: "\u0118", + Eopf: "\u{1D53C}", + Epsilon: "\u0395", + Equal: "\u2A75", + EqualTilde: "\u2242", + Equilibrium: "\u21CC", + Escr: "\u2130", + Esim: "\u2A73", + Eta: "\u0397", + Euml: "\xCB", + Exists: "\u2203", + ExponentialE: "\u2147", + Fcy: "\u0424", + Ffr: "\u{1D509}", + FilledSmallSquare: "\u25FC", + FilledVerySmallSquare: "\u25AA", + Fopf: "\u{1D53D}", + ForAll: "\u2200", + Fouriertrf: "\u2131", + Fscr: "\u2131", + GJcy: "\u0403", + GT: ">", + Gamma: "\u0393", + Gammad: "\u03DC", + Gbreve: "\u011E", + Gcedil: "\u0122", + Gcirc: "\u011C", + Gcy: "\u0413", + Gdot: "\u0120", + Gfr: "\u{1D50A}", + Gg: "\u22D9", + Gopf: "\u{1D53E}", + GreaterEqual: "\u2265", + GreaterEqualLess: "\u22DB", + GreaterFullEqual: "\u2267", + GreaterGreater: "\u2AA2", + GreaterLess: "\u2277", + GreaterSlantEqual: "\u2A7E", + GreaterTilde: "\u2273", + Gscr: "\u{1D4A2}", + Gt: "\u226B", + HARDcy: "\u042A", + Hacek: "\u02C7", + Hat: "^", + Hcirc: "\u0124", + Hfr: "\u210C", + HilbertSpace: "\u210B", + Hopf: "\u210D", + HorizontalLine: "\u2500", + Hscr: "\u210B", + Hstrok: "\u0126", + HumpDownHump: "\u224E", + HumpEqual: "\u224F", + IEcy: "\u0415", + IJlig: "\u0132", + IOcy: "\u0401", + Iacute: "\xCD", + Icirc: "\xCE", + Icy: "\u0418", + Idot: "\u0130", + Ifr: "\u2111", + Igrave: "\xCC", + Im: "\u2111", + Imacr: "\u012A", + ImaginaryI: "\u2148", + Implies: "\u21D2", + Int: "\u222C", + Integral: "\u222B", + Intersection: "\u22C2", + InvisibleComma: "\u2063", + InvisibleTimes: "\u2062", + Iogon: "\u012E", + Iopf: "\u{1D540}", + Iota: "\u0399", + Iscr: "\u2110", + Itilde: "\u0128", + Iukcy: "\u0406", + Iuml: "\xCF", + Jcirc: "\u0134", + Jcy: "\u0419", + Jfr: "\u{1D50D}", + Jopf: "\u{1D541}", + Jscr: "\u{1D4A5}", + Jsercy: "\u0408", + Jukcy: "\u0404", + KHcy: "\u0425", + KJcy: "\u040C", + Kappa: "\u039A", + Kcedil: "\u0136", + Kcy: "\u041A", + Kfr: "\u{1D50E}", + Kopf: "\u{1D542}", + Kscr: "\u{1D4A6}", + LJcy: "\u0409", + LT: "<", + Lacute: "\u0139", + Lambda: "\u039B", + Lang: "\u27EA", + Laplacetrf: "\u2112", + Larr: "\u219E", + Lcaron: "\u013D", + Lcedil: "\u013B", + Lcy: "\u041B", + LeftAngleBracket: "\u27E8", + LeftArrow: "\u2190", + LeftArrowBar: "\u21E4", + LeftArrowRightArrow: "\u21C6", + LeftCeiling: "\u2308", + LeftDoubleBracket: "\u27E6", + LeftDownTeeVector: "\u2961", + LeftDownVector: "\u21C3", + LeftDownVectorBar: "\u2959", + LeftFloor: "\u230A", + LeftRightArrow: "\u2194", + LeftRightVector: "\u294E", + LeftTee: "\u22A3", + LeftTeeArrow: "\u21A4", + LeftTeeVector: "\u295A", + LeftTriangle: "\u22B2", + LeftTriangleBar: "\u29CF", + LeftTriangleEqual: "\u22B4", + LeftUpDownVector: "\u2951", + LeftUpTeeVector: "\u2960", + LeftUpVector: "\u21BF", + LeftUpVectorBar: "\u2958", + LeftVector: "\u21BC", + LeftVectorBar: "\u2952", + Leftarrow: "\u21D0", + Leftrightarrow: "\u21D4", + LessEqualGreater: "\u22DA", + LessFullEqual: "\u2266", + LessGreater: "\u2276", + LessLess: "\u2AA1", + LessSlantEqual: "\u2A7D", + LessTilde: "\u2272", + Lfr: "\u{1D50F}", + Ll: "\u22D8", + Lleftarrow: "\u21DA", + Lmidot: "\u013F", + LongLeftArrow: "\u27F5", + LongLeftRightArrow: "\u27F7", + LongRightArrow: "\u27F6", + Longleftarrow: "\u27F8", + Longleftrightarrow: "\u27FA", + Longrightarrow: "\u27F9", + Lopf: "\u{1D543}", + LowerLeftArrow: "\u2199", + LowerRightArrow: "\u2198", + Lscr: "\u2112", + Lsh: "\u21B0", + Lstrok: "\u0141", + Lt: "\u226A", + Map: "\u2905", + Mcy: "\u041C", + MediumSpace: "\u205F", + Mellintrf: "\u2133", + Mfr: "\u{1D510}", + MinusPlus: "\u2213", + Mopf: "\u{1D544}", + Mscr: "\u2133", + Mu: "\u039C", + NJcy: "\u040A", + Nacute: "\u0143", + Ncaron: "\u0147", + Ncedil: "\u0145", + Ncy: "\u041D", + NegativeMediumSpace: "\u200B", + NegativeThickSpace: "\u200B", + NegativeThinSpace: "\u200B", + NegativeVeryThinSpace: "\u200B", + NestedGreaterGreater: "\u226B", + NestedLessLess: "\u226A", + NewLine: ` +`, + Nfr: "\u{1D511}", + NoBreak: "\u2060", + NonBreakingSpace: "\xA0", + Nopf: "\u2115", + Not: "\u2AEC", + NotCongruent: "\u2262", + NotCupCap: "\u226D", + NotDoubleVerticalBar: "\u2226", + NotElement: "\u2209", + NotEqual: "\u2260", + NotEqualTilde: "\u2242\u0338", + NotExists: "\u2204", + NotGreater: "\u226F", + NotGreaterEqual: "\u2271", + NotGreaterFullEqual: "\u2267\u0338", + NotGreaterGreater: "\u226B\u0338", + NotGreaterLess: "\u2279", + NotGreaterSlantEqual: "\u2A7E\u0338", + NotGreaterTilde: "\u2275", + NotHumpDownHump: "\u224E\u0338", + NotHumpEqual: "\u224F\u0338", + NotLeftTriangle: "\u22EA", + NotLeftTriangleBar: "\u29CF\u0338", + NotLeftTriangleEqual: "\u22EC", + NotLess: "\u226E", + NotLessEqual: "\u2270", + NotLessGreater: "\u2278", + NotLessLess: "\u226A\u0338", + NotLessSlantEqual: "\u2A7D\u0338", + NotLessTilde: "\u2274", + NotNestedGreaterGreater: "\u2AA2\u0338", + NotNestedLessLess: "\u2AA1\u0338", + NotPrecedes: "\u2280", + NotPrecedesEqual: "\u2AAF\u0338", + NotPrecedesSlantEqual: "\u22E0", + NotReverseElement: "\u220C", + NotRightTriangle: "\u22EB", + NotRightTriangleBar: "\u29D0\u0338", + NotRightTriangleEqual: "\u22ED", + NotSquareSubset: "\u228F\u0338", + NotSquareSubsetEqual: "\u22E2", + NotSquareSuperset: "\u2290\u0338", + NotSquareSupersetEqual: "\u22E3", + NotSubset: "\u2282\u20D2", + NotSubsetEqual: "\u2288", + NotSucceeds: "\u2281", + NotSucceedsEqual: "\u2AB0\u0338", + NotSucceedsSlantEqual: "\u22E1", + NotSucceedsTilde: "\u227F\u0338", + NotSuperset: "\u2283\u20D2", + NotSupersetEqual: "\u2289", + NotTilde: "\u2241", + NotTildeEqual: "\u2244", + NotTildeFullEqual: "\u2247", + NotTildeTilde: "\u2249", + NotVerticalBar: "\u2224", + Nscr: "\u{1D4A9}", + Ntilde: "\xD1", + Nu: "\u039D", + OElig: "\u0152", + Oacute: "\xD3", + Ocirc: "\xD4", + Ocy: "\u041E", + Odblac: "\u0150", + Ofr: "\u{1D512}", + Ograve: "\xD2", + Omacr: "\u014C", + Omega: "\u03A9", + Omicron: "\u039F", + Oopf: "\u{1D546}", + OpenCurlyDoubleQuote: "\u201C", + OpenCurlyQuote: "\u2018", + Or: "\u2A54", + Oscr: "\u{1D4AA}", + Oslash: "\xD8", + Otilde: "\xD5", + Otimes: "\u2A37", + Ouml: "\xD6", + OverBar: "\u203E", + OverBrace: "\u23DE", + OverBracket: "\u23B4", + OverParenthesis: "\u23DC", + PartialD: "\u2202", + Pcy: "\u041F", + Pfr: "\u{1D513}", + Phi: "\u03A6", + Pi: "\u03A0", + PlusMinus: "\xB1", + Poincareplane: "\u210C", + Popf: "\u2119", + Pr: "\u2ABB", + Precedes: "\u227A", + PrecedesEqual: "\u2AAF", + PrecedesSlantEqual: "\u227C", + PrecedesTilde: "\u227E", + Prime: "\u2033", + Product: "\u220F", + Proportion: "\u2237", + Proportional: "\u221D", + Pscr: "\u{1D4AB}", + Psi: "\u03A8", + QUOT: '"', + Qfr: "\u{1D514}", + Qopf: "\u211A", + Qscr: "\u{1D4AC}", + RBarr: "\u2910", + REG: "\xAE", + Racute: "\u0154", + Rang: "\u27EB", + Rarr: "\u21A0", + Rarrtl: "\u2916", + Rcaron: "\u0158", + Rcedil: "\u0156", + Rcy: "\u0420", + Re: "\u211C", + ReverseElement: "\u220B", + ReverseEquilibrium: "\u21CB", + ReverseUpEquilibrium: "\u296F", + Rfr: "\u211C", + Rho: "\u03A1", + RightAngleBracket: "\u27E9", + RightArrow: "\u2192", + RightArrowBar: "\u21E5", + RightArrowLeftArrow: "\u21C4", + RightCeiling: "\u2309", + RightDoubleBracket: "\u27E7", + RightDownTeeVector: "\u295D", + RightDownVector: "\u21C2", + RightDownVectorBar: "\u2955", + RightFloor: "\u230B", + RightTee: "\u22A2", + RightTeeArrow: "\u21A6", + RightTeeVector: "\u295B", + RightTriangle: "\u22B3", + RightTriangleBar: "\u29D0", + RightTriangleEqual: "\u22B5", + RightUpDownVector: "\u294F", + RightUpTeeVector: "\u295C", + RightUpVector: "\u21BE", + RightUpVectorBar: "\u2954", + RightVector: "\u21C0", + RightVectorBar: "\u2953", + Rightarrow: "\u21D2", + Ropf: "\u211D", + RoundImplies: "\u2970", + Rrightarrow: "\u21DB", + Rscr: "\u211B", + Rsh: "\u21B1", + RuleDelayed: "\u29F4", + SHCHcy: "\u0429", + SHcy: "\u0428", + SOFTcy: "\u042C", + Sacute: "\u015A", + Sc: "\u2ABC", + Scaron: "\u0160", + Scedil: "\u015E", + Scirc: "\u015C", + Scy: "\u0421", + Sfr: "\u{1D516}", + ShortDownArrow: "\u2193", + ShortLeftArrow: "\u2190", + ShortRightArrow: "\u2192", + ShortUpArrow: "\u2191", + Sigma: "\u03A3", + SmallCircle: "\u2218", + Sopf: "\u{1D54A}", + Sqrt: "\u221A", + Square: "\u25A1", + SquareIntersection: "\u2293", + SquareSubset: "\u228F", + SquareSubsetEqual: "\u2291", + SquareSuperset: "\u2290", + SquareSupersetEqual: "\u2292", + SquareUnion: "\u2294", + Sscr: "\u{1D4AE}", + Star: "\u22C6", + Sub: "\u22D0", + Subset: "\u22D0", + SubsetEqual: "\u2286", + Succeeds: "\u227B", + SucceedsEqual: "\u2AB0", + SucceedsSlantEqual: "\u227D", + SucceedsTilde: "\u227F", + SuchThat: "\u220B", + Sum: "\u2211", + Sup: "\u22D1", + Superset: "\u2283", + SupersetEqual: "\u2287", + Supset: "\u22D1", + THORN: "\xDE", + TRADE: "\u2122", + TSHcy: "\u040B", + TScy: "\u0426", + Tab: " ", + Tau: "\u03A4", + Tcaron: "\u0164", + Tcedil: "\u0162", + Tcy: "\u0422", + Tfr: "\u{1D517}", + Therefore: "\u2234", + Theta: "\u0398", + ThickSpace: "\u205F\u200A", + ThinSpace: "\u2009", + Tilde: "\u223C", + TildeEqual: "\u2243", + TildeFullEqual: "\u2245", + TildeTilde: "\u2248", + Topf: "\u{1D54B}", + TripleDot: "\u20DB", + Tscr: "\u{1D4AF}", + Tstrok: "\u0166", + Uacute: "\xDA", + Uarr: "\u219F", + Uarrocir: "\u2949", + Ubrcy: "\u040E", + Ubreve: "\u016C", + Ucirc: "\xDB", + Ucy: "\u0423", + Udblac: "\u0170", + Ufr: "\u{1D518}", + Ugrave: "\xD9", + Umacr: "\u016A", + UnderBar: "_", + UnderBrace: "\u23DF", + UnderBracket: "\u23B5", + UnderParenthesis: "\u23DD", + Union: "\u22C3", + UnionPlus: "\u228E", + Uogon: "\u0172", + Uopf: "\u{1D54C}", + UpArrow: "\u2191", + UpArrowBar: "\u2912", + UpArrowDownArrow: "\u21C5", + UpDownArrow: "\u2195", + UpEquilibrium: "\u296E", + UpTee: "\u22A5", + UpTeeArrow: "\u21A5", + Uparrow: "\u21D1", + Updownarrow: "\u21D5", + UpperLeftArrow: "\u2196", + UpperRightArrow: "\u2197", + Upsi: "\u03D2", + Upsilon: "\u03A5", + Uring: "\u016E", + Uscr: "\u{1D4B0}", + Utilde: "\u0168", + Uuml: "\xDC", + VDash: "\u22AB", + Vbar: "\u2AEB", + Vcy: "\u0412", + Vdash: "\u22A9", + Vdashl: "\u2AE6", + Vee: "\u22C1", + Verbar: "\u2016", + Vert: "\u2016", + VerticalBar: "\u2223", + VerticalLine: "|", + VerticalSeparator: "\u2758", + VerticalTilde: "\u2240", + VeryThinSpace: "\u200A", + Vfr: "\u{1D519}", + Vopf: "\u{1D54D}", + Vscr: "\u{1D4B1}", + Vvdash: "\u22AA", + Wcirc: "\u0174", + Wedge: "\u22C0", + Wfr: "\u{1D51A}", + Wopf: "\u{1D54E}", + Wscr: "\u{1D4B2}", + Xfr: "\u{1D51B}", + Xi: "\u039E", + Xopf: "\u{1D54F}", + Xscr: "\u{1D4B3}", + YAcy: "\u042F", + YIcy: "\u0407", + YUcy: "\u042E", + Yacute: "\xDD", + Ycirc: "\u0176", + Ycy: "\u042B", + Yfr: "\u{1D51C}", + Yopf: "\u{1D550}", + Yscr: "\u{1D4B4}", + Yuml: "\u0178", + ZHcy: "\u0416", + Zacute: "\u0179", + Zcaron: "\u017D", + Zcy: "\u0417", + Zdot: "\u017B", + ZeroWidthSpace: "\u200B", + Zeta: "\u0396", + Zfr: "\u2128", + Zopf: "\u2124", + Zscr: "\u{1D4B5}", + aacute: "\xE1", + abreve: "\u0103", + ac: "\u223E", + acE: "\u223E\u0333", + acd: "\u223F", + acirc: "\xE2", + acute: "\xB4", + acy: "\u0430", + aelig: "\xE6", + af: "\u2061", + afr: "\u{1D51E}", + agrave: "\xE0", + alefsym: "\u2135", + aleph: "\u2135", + alpha: "\u03B1", + amacr: "\u0101", + amalg: "\u2A3F", + amp: "&", + and: "\u2227", + andand: "\u2A55", + andd: "\u2A5C", + andslope: "\u2A58", + andv: "\u2A5A", + ang: "\u2220", + ange: "\u29A4", + angle: "\u2220", + angmsd: "\u2221", + angmsdaa: "\u29A8", + angmsdab: "\u29A9", + angmsdac: "\u29AA", + angmsdad: "\u29AB", + angmsdae: "\u29AC", + angmsdaf: "\u29AD", + angmsdag: "\u29AE", + angmsdah: "\u29AF", + angrt: "\u221F", + angrtvb: "\u22BE", + angrtvbd: "\u299D", + angsph: "\u2222", + angst: "\xC5", + angzarr: "\u237C", + aogon: "\u0105", + aopf: "\u{1D552}", + ap: "\u2248", + apE: "\u2A70", + apacir: "\u2A6F", + ape: "\u224A", + apid: "\u224B", + apos: "'", + approx: "\u2248", + approxeq: "\u224A", + aring: "\xE5", + ascr: "\u{1D4B6}", + ast: "*", + asymp: "\u2248", + asympeq: "\u224D", + atilde: "\xE3", + auml: "\xE4", + awconint: "\u2233", + awint: "\u2A11", + bNot: "\u2AED", + backcong: "\u224C", + backepsilon: "\u03F6", + backprime: "\u2035", + backsim: "\u223D", + backsimeq: "\u22CD", + barvee: "\u22BD", + barwed: "\u2305", + barwedge: "\u2305", + bbrk: "\u23B5", + bbrktbrk: "\u23B6", + bcong: "\u224C", + bcy: "\u0431", + bdquo: "\u201E", + becaus: "\u2235", + because: "\u2235", + bemptyv: "\u29B0", + bepsi: "\u03F6", + bernou: "\u212C", + beta: "\u03B2", + beth: "\u2136", + between: "\u226C", + bfr: "\u{1D51F}", + bigcap: "\u22C2", + bigcirc: "\u25EF", + bigcup: "\u22C3", + bigodot: "\u2A00", + bigoplus: "\u2A01", + bigotimes: "\u2A02", + bigsqcup: "\u2A06", + bigstar: "\u2605", + bigtriangledown: "\u25BD", + bigtriangleup: "\u25B3", + biguplus: "\u2A04", + bigvee: "\u22C1", + bigwedge: "\u22C0", + bkarow: "\u290D", + blacklozenge: "\u29EB", + blacksquare: "\u25AA", + blacktriangle: "\u25B4", + blacktriangledown: "\u25BE", + blacktriangleleft: "\u25C2", + blacktriangleright: "\u25B8", + blank: "\u2423", + blk12: "\u2592", + blk14: "\u2591", + blk34: "\u2593", + block: "\u2588", + bne: "=\u20E5", + bnequiv: "\u2261\u20E5", + bnot: "\u2310", + bopf: "\u{1D553}", + bot: "\u22A5", + bottom: "\u22A5", + bowtie: "\u22C8", + boxDL: "\u2557", + boxDR: "\u2554", + boxDl: "\u2556", + boxDr: "\u2553", + boxH: "\u2550", + boxHD: "\u2566", + boxHU: "\u2569", + boxHd: "\u2564", + boxHu: "\u2567", + boxUL: "\u255D", + boxUR: "\u255A", + boxUl: "\u255C", + boxUr: "\u2559", + boxV: "\u2551", + boxVH: "\u256C", + boxVL: "\u2563", + boxVR: "\u2560", + boxVh: "\u256B", + boxVl: "\u2562", + boxVr: "\u255F", + boxbox: "\u29C9", + boxdL: "\u2555", + boxdR: "\u2552", + boxdl: "\u2510", + boxdr: "\u250C", + boxh: "\u2500", + boxhD: "\u2565", + boxhU: "\u2568", + boxhd: "\u252C", + boxhu: "\u2534", + boxminus: "\u229F", + boxplus: "\u229E", + boxtimes: "\u22A0", + boxuL: "\u255B", + boxuR: "\u2558", + boxul: "\u2518", + boxur: "\u2514", + boxv: "\u2502", + boxvH: "\u256A", + boxvL: "\u2561", + boxvR: "\u255E", + boxvh: "\u253C", + boxvl: "\u2524", + boxvr: "\u251C", + bprime: "\u2035", + breve: "\u02D8", + brvbar: "\xA6", + bscr: "\u{1D4B7}", + bsemi: "\u204F", + bsim: "\u223D", + bsime: "\u22CD", + bsol: "\\", + bsolb: "\u29C5", + bsolhsub: "\u27C8", + bull: "\u2022", + bullet: "\u2022", + bump: "\u224E", + bumpE: "\u2AAE", + bumpe: "\u224F", + bumpeq: "\u224F", + cacute: "\u0107", + cap: "\u2229", + capand: "\u2A44", + capbrcup: "\u2A49", + capcap: "\u2A4B", + capcup: "\u2A47", + capdot: "\u2A40", + caps: "\u2229\uFE00", + caret: "\u2041", + caron: "\u02C7", + ccaps: "\u2A4D", + ccaron: "\u010D", + ccedil: "\xE7", + ccirc: "\u0109", + ccups: "\u2A4C", + ccupssm: "\u2A50", + cdot: "\u010B", + cedil: "\xB8", + cemptyv: "\u29B2", + cent: "\xA2", + centerdot: "\xB7", + cfr: "\u{1D520}", + chcy: "\u0447", + check: "\u2713", + checkmark: "\u2713", + chi: "\u03C7", + cir: "\u25CB", + cirE: "\u29C3", + circ: "\u02C6", + circeq: "\u2257", + circlearrowleft: "\u21BA", + circlearrowright: "\u21BB", + circledR: "\xAE", + circledS: "\u24C8", + circledast: "\u229B", + circledcirc: "\u229A", + circleddash: "\u229D", + cire: "\u2257", + cirfnint: "\u2A10", + cirmid: "\u2AEF", + cirscir: "\u29C2", + clubs: "\u2663", + clubsuit: "\u2663", + colon: ":", + colone: "\u2254", + coloneq: "\u2254", + comma: ",", + commat: "@", + comp: "\u2201", + compfn: "\u2218", + complement: "\u2201", + complexes: "\u2102", + cong: "\u2245", + congdot: "\u2A6D", + conint: "\u222E", + copf: "\u{1D554}", + coprod: "\u2210", + copy: "\xA9", + copysr: "\u2117", + crarr: "\u21B5", + cross: "\u2717", + cscr: "\u{1D4B8}", + csub: "\u2ACF", + csube: "\u2AD1", + csup: "\u2AD0", + csupe: "\u2AD2", + ctdot: "\u22EF", + cudarrl: "\u2938", + cudarrr: "\u2935", + cuepr: "\u22DE", + cuesc: "\u22DF", + cularr: "\u21B6", + cularrp: "\u293D", + cup: "\u222A", + cupbrcap: "\u2A48", + cupcap: "\u2A46", + cupcup: "\u2A4A", + cupdot: "\u228D", + cupor: "\u2A45", + cups: "\u222A\uFE00", + curarr: "\u21B7", + curarrm: "\u293C", + curlyeqprec: "\u22DE", + curlyeqsucc: "\u22DF", + curlyvee: "\u22CE", + curlywedge: "\u22CF", + curren: "\xA4", + curvearrowleft: "\u21B6", + curvearrowright: "\u21B7", + cuvee: "\u22CE", + cuwed: "\u22CF", + cwconint: "\u2232", + cwint: "\u2231", + cylcty: "\u232D", + dArr: "\u21D3", + dHar: "\u2965", + dagger: "\u2020", + daleth: "\u2138", + darr: "\u2193", + dash: "\u2010", + dashv: "\u22A3", + dbkarow: "\u290F", + dblac: "\u02DD", + dcaron: "\u010F", + dcy: "\u0434", + dd: "\u2146", + ddagger: "\u2021", + ddarr: "\u21CA", + ddotseq: "\u2A77", + deg: "\xB0", + delta: "\u03B4", + demptyv: "\u29B1", + dfisht: "\u297F", + dfr: "\u{1D521}", + dharl: "\u21C3", + dharr: "\u21C2", + diam: "\u22C4", + diamond: "\u22C4", + diamondsuit: "\u2666", + diams: "\u2666", + die: "\xA8", + digamma: "\u03DD", + disin: "\u22F2", + div: "\xF7", + divide: "\xF7", + divideontimes: "\u22C7", + divonx: "\u22C7", + djcy: "\u0452", + dlcorn: "\u231E", + dlcrop: "\u230D", + dollar: "$", + dopf: "\u{1D555}", + dot: "\u02D9", + doteq: "\u2250", + doteqdot: "\u2251", + dotminus: "\u2238", + dotplus: "\u2214", + dotsquare: "\u22A1", + doublebarwedge: "\u2306", + downarrow: "\u2193", + downdownarrows: "\u21CA", + downharpoonleft: "\u21C3", + downharpoonright: "\u21C2", + drbkarow: "\u2910", + drcorn: "\u231F", + drcrop: "\u230C", + dscr: "\u{1D4B9}", + dscy: "\u0455", + dsol: "\u29F6", + dstrok: "\u0111", + dtdot: "\u22F1", + dtri: "\u25BF", + dtrif: "\u25BE", + duarr: "\u21F5", + duhar: "\u296F", + dwangle: "\u29A6", + dzcy: "\u045F", + dzigrarr: "\u27FF", + eDDot: "\u2A77", + eDot: "\u2251", + eacute: "\xE9", + easter: "\u2A6E", + ecaron: "\u011B", + ecir: "\u2256", + ecirc: "\xEA", + ecolon: "\u2255", + ecy: "\u044D", + edot: "\u0117", + ee: "\u2147", + efDot: "\u2252", + efr: "\u{1D522}", + eg: "\u2A9A", + egrave: "\xE8", + egs: "\u2A96", + egsdot: "\u2A98", + el: "\u2A99", + elinters: "\u23E7", + ell: "\u2113", + els: "\u2A95", + elsdot: "\u2A97", + emacr: "\u0113", + empty: "\u2205", + emptyset: "\u2205", + emptyv: "\u2205", + emsp13: "\u2004", + emsp14: "\u2005", + emsp: "\u2003", + eng: "\u014B", + ensp: "\u2002", + eogon: "\u0119", + eopf: "\u{1D556}", + epar: "\u22D5", + eparsl: "\u29E3", + eplus: "\u2A71", + epsi: "\u03B5", + epsilon: "\u03B5", + epsiv: "\u03F5", + eqcirc: "\u2256", + eqcolon: "\u2255", + eqsim: "\u2242", + eqslantgtr: "\u2A96", + eqslantless: "\u2A95", + equals: "=", + equest: "\u225F", + equiv: "\u2261", + equivDD: "\u2A78", + eqvparsl: "\u29E5", + erDot: "\u2253", + erarr: "\u2971", + escr: "\u212F", + esdot: "\u2250", + esim: "\u2242", + eta: "\u03B7", + eth: "\xF0", + euml: "\xEB", + euro: "\u20AC", + excl: "!", + exist: "\u2203", + expectation: "\u2130", + exponentiale: "\u2147", + fallingdotseq: "\u2252", + fcy: "\u0444", + female: "\u2640", + ffilig: "\uFB03", + fflig: "\uFB00", + ffllig: "\uFB04", + ffr: "\u{1D523}", + filig: "\uFB01", + fjlig: "fj", + flat: "\u266D", + fllig: "\uFB02", + fltns: "\u25B1", + fnof: "\u0192", + fopf: "\u{1D557}", + forall: "\u2200", + fork: "\u22D4", + forkv: "\u2AD9", + fpartint: "\u2A0D", + frac12: "\xBD", + frac13: "\u2153", + frac14: "\xBC", + frac15: "\u2155", + frac16: "\u2159", + frac18: "\u215B", + frac23: "\u2154", + frac25: "\u2156", + frac34: "\xBE", + frac35: "\u2157", + frac38: "\u215C", + frac45: "\u2158", + frac56: "\u215A", + frac58: "\u215D", + frac78: "\u215E", + frasl: "\u2044", + frown: "\u2322", + fscr: "\u{1D4BB}", + gE: "\u2267", + gEl: "\u2A8C", + gacute: "\u01F5", + gamma: "\u03B3", + gammad: "\u03DD", + gap: "\u2A86", + gbreve: "\u011F", + gcirc: "\u011D", + gcy: "\u0433", + gdot: "\u0121", + ge: "\u2265", + gel: "\u22DB", + geq: "\u2265", + geqq: "\u2267", + geqslant: "\u2A7E", + ges: "\u2A7E", + gescc: "\u2AA9", + gesdot: "\u2A80", + gesdoto: "\u2A82", + gesdotol: "\u2A84", + gesl: "\u22DB\uFE00", + gesles: "\u2A94", + gfr: "\u{1D524}", + gg: "\u226B", + ggg: "\u22D9", + gimel: "\u2137", + gjcy: "\u0453", + gl: "\u2277", + glE: "\u2A92", + gla: "\u2AA5", + glj: "\u2AA4", + gnE: "\u2269", + gnap: "\u2A8A", + gnapprox: "\u2A8A", + gne: "\u2A88", + gneq: "\u2A88", + gneqq: "\u2269", + gnsim: "\u22E7", + gopf: "\u{1D558}", + grave: "`", + gscr: "\u210A", + gsim: "\u2273", + gsime: "\u2A8E", + gsiml: "\u2A90", + gt: ">", + gtcc: "\u2AA7", + gtcir: "\u2A7A", + gtdot: "\u22D7", + gtlPar: "\u2995", + gtquest: "\u2A7C", + gtrapprox: "\u2A86", + gtrarr: "\u2978", + gtrdot: "\u22D7", + gtreqless: "\u22DB", + gtreqqless: "\u2A8C", + gtrless: "\u2277", + gtrsim: "\u2273", + gvertneqq: "\u2269\uFE00", + gvnE: "\u2269\uFE00", + hArr: "\u21D4", + hairsp: "\u200A", + half: "\xBD", + hamilt: "\u210B", + hardcy: "\u044A", + harr: "\u2194", + harrcir: "\u2948", + harrw: "\u21AD", + hbar: "\u210F", + hcirc: "\u0125", + hearts: "\u2665", + heartsuit: "\u2665", + hellip: "\u2026", + hercon: "\u22B9", + hfr: "\u{1D525}", + hksearow: "\u2925", + hkswarow: "\u2926", + hoarr: "\u21FF", + homtht: "\u223B", + hookleftarrow: "\u21A9", + hookrightarrow: "\u21AA", + hopf: "\u{1D559}", + horbar: "\u2015", + hscr: "\u{1D4BD}", + hslash: "\u210F", + hstrok: "\u0127", + hybull: "\u2043", + hyphen: "\u2010", + iacute: "\xED", + ic: "\u2063", + icirc: "\xEE", + icy: "\u0438", + iecy: "\u0435", + iexcl: "\xA1", + iff: "\u21D4", + ifr: "\u{1D526}", + igrave: "\xEC", + ii: "\u2148", + iiiint: "\u2A0C", + iiint: "\u222D", + iinfin: "\u29DC", + iiota: "\u2129", + ijlig: "\u0133", + imacr: "\u012B", + image: "\u2111", + imagline: "\u2110", + imagpart: "\u2111", + imath: "\u0131", + imof: "\u22B7", + imped: "\u01B5", + in: "\u2208", + incare: "\u2105", + infin: "\u221E", + infintie: "\u29DD", + inodot: "\u0131", + int: "\u222B", + intcal: "\u22BA", + integers: "\u2124", + intercal: "\u22BA", + intlarhk: "\u2A17", + intprod: "\u2A3C", + iocy: "\u0451", + iogon: "\u012F", + iopf: "\u{1D55A}", + iota: "\u03B9", + iprod: "\u2A3C", + iquest: "\xBF", + iscr: "\u{1D4BE}", + isin: "\u2208", + isinE: "\u22F9", + isindot: "\u22F5", + isins: "\u22F4", + isinsv: "\u22F3", + isinv: "\u2208", + it: "\u2062", + itilde: "\u0129", + iukcy: "\u0456", + iuml: "\xEF", + jcirc: "\u0135", + jcy: "\u0439", + jfr: "\u{1D527}", + jmath: "\u0237", + jopf: "\u{1D55B}", + jscr: "\u{1D4BF}", + jsercy: "\u0458", + jukcy: "\u0454", + kappa: "\u03BA", + kappav: "\u03F0", + kcedil: "\u0137", + kcy: "\u043A", + kfr: "\u{1D528}", + kgreen: "\u0138", + khcy: "\u0445", + kjcy: "\u045C", + kopf: "\u{1D55C}", + kscr: "\u{1D4C0}", + lAarr: "\u21DA", + lArr: "\u21D0", + lAtail: "\u291B", + lBarr: "\u290E", + lE: "\u2266", + lEg: "\u2A8B", + lHar: "\u2962", + lacute: "\u013A", + laemptyv: "\u29B4", + lagran: "\u2112", + lambda: "\u03BB", + lang: "\u27E8", + langd: "\u2991", + langle: "\u27E8", + lap: "\u2A85", + laquo: "\xAB", + larr: "\u2190", + larrb: "\u21E4", + larrbfs: "\u291F", + larrfs: "\u291D", + larrhk: "\u21A9", + larrlp: "\u21AB", + larrpl: "\u2939", + larrsim: "\u2973", + larrtl: "\u21A2", + lat: "\u2AAB", + latail: "\u2919", + late: "\u2AAD", + lates: "\u2AAD\uFE00", + lbarr: "\u290C", + lbbrk: "\u2772", + lbrace: "{", + lbrack: "[", + lbrke: "\u298B", + lbrksld: "\u298F", + lbrkslu: "\u298D", + lcaron: "\u013E", + lcedil: "\u013C", + lceil: "\u2308", + lcub: "{", + lcy: "\u043B", + ldca: "\u2936", + ldquo: "\u201C", + ldquor: "\u201E", + ldrdhar: "\u2967", + ldrushar: "\u294B", + ldsh: "\u21B2", + le: "\u2264", + leftarrow: "\u2190", + leftarrowtail: "\u21A2", + leftharpoondown: "\u21BD", + leftharpoonup: "\u21BC", + leftleftarrows: "\u21C7", + leftrightarrow: "\u2194", + leftrightarrows: "\u21C6", + leftrightharpoons: "\u21CB", + leftrightsquigarrow: "\u21AD", + leftthreetimes: "\u22CB", + leg: "\u22DA", + leq: "\u2264", + leqq: "\u2266", + leqslant: "\u2A7D", + les: "\u2A7D", + lescc: "\u2AA8", + lesdot: "\u2A7F", + lesdoto: "\u2A81", + lesdotor: "\u2A83", + lesg: "\u22DA\uFE00", + lesges: "\u2A93", + lessapprox: "\u2A85", + lessdot: "\u22D6", + lesseqgtr: "\u22DA", + lesseqqgtr: "\u2A8B", + lessgtr: "\u2276", + lesssim: "\u2272", + lfisht: "\u297C", + lfloor: "\u230A", + lfr: "\u{1D529}", + lg: "\u2276", + lgE: "\u2A91", + lhard: "\u21BD", + lharu: "\u21BC", + lharul: "\u296A", + lhblk: "\u2584", + ljcy: "\u0459", + ll: "\u226A", + llarr: "\u21C7", + llcorner: "\u231E", + llhard: "\u296B", + lltri: "\u25FA", + lmidot: "\u0140", + lmoust: "\u23B0", + lmoustache: "\u23B0", + lnE: "\u2268", + lnap: "\u2A89", + lnapprox: "\u2A89", + lne: "\u2A87", + lneq: "\u2A87", + lneqq: "\u2268", + lnsim: "\u22E6", + loang: "\u27EC", + loarr: "\u21FD", + lobrk: "\u27E6", + longleftarrow: "\u27F5", + longleftrightarrow: "\u27F7", + longmapsto: "\u27FC", + longrightarrow: "\u27F6", + looparrowleft: "\u21AB", + looparrowright: "\u21AC", + lopar: "\u2985", + lopf: "\u{1D55D}", + loplus: "\u2A2D", + lotimes: "\u2A34", + lowast: "\u2217", + lowbar: "_", + loz: "\u25CA", + lozenge: "\u25CA", + lozf: "\u29EB", + lpar: "(", + lparlt: "\u2993", + lrarr: "\u21C6", + lrcorner: "\u231F", + lrhar: "\u21CB", + lrhard: "\u296D", + lrm: "\u200E", + lrtri: "\u22BF", + lsaquo: "\u2039", + lscr: "\u{1D4C1}", + lsh: "\u21B0", + lsim: "\u2272", + lsime: "\u2A8D", + lsimg: "\u2A8F", + lsqb: "[", + lsquo: "\u2018", + lsquor: "\u201A", + lstrok: "\u0142", + lt: "<", + ltcc: "\u2AA6", + ltcir: "\u2A79", + ltdot: "\u22D6", + lthree: "\u22CB", + ltimes: "\u22C9", + ltlarr: "\u2976", + ltquest: "\u2A7B", + ltrPar: "\u2996", + ltri: "\u25C3", + ltrie: "\u22B4", + ltrif: "\u25C2", + lurdshar: "\u294A", + luruhar: "\u2966", + lvertneqq: "\u2268\uFE00", + lvnE: "\u2268\uFE00", + mDDot: "\u223A", + macr: "\xAF", + male: "\u2642", + malt: "\u2720", + maltese: "\u2720", + map: "\u21A6", + mapsto: "\u21A6", + mapstodown: "\u21A7", + mapstoleft: "\u21A4", + mapstoup: "\u21A5", + marker: "\u25AE", + mcomma: "\u2A29", + mcy: "\u043C", + mdash: "\u2014", + measuredangle: "\u2221", + mfr: "\u{1D52A}", + mho: "\u2127", + micro: "\xB5", + mid: "\u2223", + midast: "*", + midcir: "\u2AF0", + middot: "\xB7", + minus: "\u2212", + minusb: "\u229F", + minusd: "\u2238", + minusdu: "\u2A2A", + mlcp: "\u2ADB", + mldr: "\u2026", + mnplus: "\u2213", + models: "\u22A7", + mopf: "\u{1D55E}", + mp: "\u2213", + mscr: "\u{1D4C2}", + mstpos: "\u223E", + mu: "\u03BC", + multimap: "\u22B8", + mumap: "\u22B8", + nGg: "\u22D9\u0338", + nGt: "\u226B\u20D2", + nGtv: "\u226B\u0338", + nLeftarrow: "\u21CD", + nLeftrightarrow: "\u21CE", + nLl: "\u22D8\u0338", + nLt: "\u226A\u20D2", + nLtv: "\u226A\u0338", + nRightarrow: "\u21CF", + nVDash: "\u22AF", + nVdash: "\u22AE", + nabla: "\u2207", + nacute: "\u0144", + nang: "\u2220\u20D2", + nap: "\u2249", + napE: "\u2A70\u0338", + napid: "\u224B\u0338", + napos: "\u0149", + napprox: "\u2249", + natur: "\u266E", + natural: "\u266E", + naturals: "\u2115", + nbsp: "\xA0", + nbump: "\u224E\u0338", + nbumpe: "\u224F\u0338", + ncap: "\u2A43", + ncaron: "\u0148", + ncedil: "\u0146", + ncong: "\u2247", + ncongdot: "\u2A6D\u0338", + ncup: "\u2A42", + ncy: "\u043D", + ndash: "\u2013", + ne: "\u2260", + neArr: "\u21D7", + nearhk: "\u2924", + nearr: "\u2197", + nearrow: "\u2197", + nedot: "\u2250\u0338", + nequiv: "\u2262", + nesear: "\u2928", + nesim: "\u2242\u0338", + nexist: "\u2204", + nexists: "\u2204", + nfr: "\u{1D52B}", + ngE: "\u2267\u0338", + nge: "\u2271", + ngeq: "\u2271", + ngeqq: "\u2267\u0338", + ngeqslant: "\u2A7E\u0338", + nges: "\u2A7E\u0338", + ngsim: "\u2275", + ngt: "\u226F", + ngtr: "\u226F", + nhArr: "\u21CE", + nharr: "\u21AE", + nhpar: "\u2AF2", + ni: "\u220B", + nis: "\u22FC", + nisd: "\u22FA", + niv: "\u220B", + njcy: "\u045A", + nlArr: "\u21CD", + nlE: "\u2266\u0338", + nlarr: "\u219A", + nldr: "\u2025", + nle: "\u2270", + nleftarrow: "\u219A", + nleftrightarrow: "\u21AE", + nleq: "\u2270", + nleqq: "\u2266\u0338", + nleqslant: "\u2A7D\u0338", + nles: "\u2A7D\u0338", + nless: "\u226E", + nlsim: "\u2274", + nlt: "\u226E", + nltri: "\u22EA", + nltrie: "\u22EC", + nmid: "\u2224", + nopf: "\u{1D55F}", + not: "\xAC", + notin: "\u2209", + notinE: "\u22F9\u0338", + notindot: "\u22F5\u0338", + notinva: "\u2209", + notinvb: "\u22F7", + notinvc: "\u22F6", + notni: "\u220C", + notniva: "\u220C", + notnivb: "\u22FE", + notnivc: "\u22FD", + npar: "\u2226", + nparallel: "\u2226", + nparsl: "\u2AFD\u20E5", + npart: "\u2202\u0338", + npolint: "\u2A14", + npr: "\u2280", + nprcue: "\u22E0", + npre: "\u2AAF\u0338", + nprec: "\u2280", + npreceq: "\u2AAF\u0338", + nrArr: "\u21CF", + nrarr: "\u219B", + nrarrc: "\u2933\u0338", + nrarrw: "\u219D\u0338", + nrightarrow: "\u219B", + nrtri: "\u22EB", + nrtrie: "\u22ED", + nsc: "\u2281", + nsccue: "\u22E1", + nsce: "\u2AB0\u0338", + nscr: "\u{1D4C3}", + nshortmid: "\u2224", + nshortparallel: "\u2226", + nsim: "\u2241", + nsime: "\u2244", + nsimeq: "\u2244", + nsmid: "\u2224", + nspar: "\u2226", + nsqsube: "\u22E2", + nsqsupe: "\u22E3", + nsub: "\u2284", + nsubE: "\u2AC5\u0338", + nsube: "\u2288", + nsubset: "\u2282\u20D2", + nsubseteq: "\u2288", + nsubseteqq: "\u2AC5\u0338", + nsucc: "\u2281", + nsucceq: "\u2AB0\u0338", + nsup: "\u2285", + nsupE: "\u2AC6\u0338", + nsupe: "\u2289", + nsupset: "\u2283\u20D2", + nsupseteq: "\u2289", + nsupseteqq: "\u2AC6\u0338", + ntgl: "\u2279", + ntilde: "\xF1", + ntlg: "\u2278", + ntriangleleft: "\u22EA", + ntrianglelefteq: "\u22EC", + ntriangleright: "\u22EB", + ntrianglerighteq: "\u22ED", + nu: "\u03BD", + num: "#", + numero: "\u2116", + numsp: "\u2007", + nvDash: "\u22AD", + nvHarr: "\u2904", + nvap: "\u224D\u20D2", + nvdash: "\u22AC", + nvge: "\u2265\u20D2", + nvgt: ">\u20D2", + nvinfin: "\u29DE", + nvlArr: "\u2902", + nvle: "\u2264\u20D2", + nvlt: "<\u20D2", + nvltrie: "\u22B4\u20D2", + nvrArr: "\u2903", + nvrtrie: "\u22B5\u20D2", + nvsim: "\u223C\u20D2", + nwArr: "\u21D6", + nwarhk: "\u2923", + nwarr: "\u2196", + nwarrow: "\u2196", + nwnear: "\u2927", + oS: "\u24C8", + oacute: "\xF3", + oast: "\u229B", + ocir: "\u229A", + ocirc: "\xF4", + ocy: "\u043E", + odash: "\u229D", + odblac: "\u0151", + odiv: "\u2A38", + odot: "\u2299", + odsold: "\u29BC", + oelig: "\u0153", + ofcir: "\u29BF", + ofr: "\u{1D52C}", + ogon: "\u02DB", + ograve: "\xF2", + ogt: "\u29C1", + ohbar: "\u29B5", + ohm: "\u03A9", + oint: "\u222E", + olarr: "\u21BA", + olcir: "\u29BE", + olcross: "\u29BB", + oline: "\u203E", + olt: "\u29C0", + omacr: "\u014D", + omega: "\u03C9", + omicron: "\u03BF", + omid: "\u29B6", + ominus: "\u2296", + oopf: "\u{1D560}", + opar: "\u29B7", + operp: "\u29B9", + oplus: "\u2295", + or: "\u2228", + orarr: "\u21BB", + ord: "\u2A5D", + order: "\u2134", + orderof: "\u2134", + ordf: "\xAA", + ordm: "\xBA", + origof: "\u22B6", + oror: "\u2A56", + orslope: "\u2A57", + orv: "\u2A5B", + oscr: "\u2134", + oslash: "\xF8", + osol: "\u2298", + otilde: "\xF5", + otimes: "\u2297", + otimesas: "\u2A36", + ouml: "\xF6", + ovbar: "\u233D", + par: "\u2225", + para: "\xB6", + parallel: "\u2225", + parsim: "\u2AF3", + parsl: "\u2AFD", + part: "\u2202", + pcy: "\u043F", + percnt: "%", + period: ".", + permil: "\u2030", + perp: "\u22A5", + pertenk: "\u2031", + pfr: "\u{1D52D}", + phi: "\u03C6", + phiv: "\u03D5", + phmmat: "\u2133", + phone: "\u260E", + pi: "\u03C0", + pitchfork: "\u22D4", + piv: "\u03D6", + planck: "\u210F", + planckh: "\u210E", + plankv: "\u210F", + plus: "+", + plusacir: "\u2A23", + plusb: "\u229E", + pluscir: "\u2A22", + plusdo: "\u2214", + plusdu: "\u2A25", + pluse: "\u2A72", + plusmn: "\xB1", + plussim: "\u2A26", + plustwo: "\u2A27", + pm: "\xB1", + pointint: "\u2A15", + popf: "\u{1D561}", + pound: "\xA3", + pr: "\u227A", + prE: "\u2AB3", + prap: "\u2AB7", + prcue: "\u227C", + pre: "\u2AAF", + prec: "\u227A", + precapprox: "\u2AB7", + preccurlyeq: "\u227C", + preceq: "\u2AAF", + precnapprox: "\u2AB9", + precneqq: "\u2AB5", + precnsim: "\u22E8", + precsim: "\u227E", + prime: "\u2032", + primes: "\u2119", + prnE: "\u2AB5", + prnap: "\u2AB9", + prnsim: "\u22E8", + prod: "\u220F", + profalar: "\u232E", + profline: "\u2312", + profsurf: "\u2313", + prop: "\u221D", + propto: "\u221D", + prsim: "\u227E", + prurel: "\u22B0", + pscr: "\u{1D4C5}", + psi: "\u03C8", + puncsp: "\u2008", + qfr: "\u{1D52E}", + qint: "\u2A0C", + qopf: "\u{1D562}", + qprime: "\u2057", + qscr: "\u{1D4C6}", + quaternions: "\u210D", + quatint: "\u2A16", + quest: "?", + questeq: "\u225F", + quot: '"', + rAarr: "\u21DB", + rArr: "\u21D2", + rAtail: "\u291C", + rBarr: "\u290F", + rHar: "\u2964", + race: "\u223D\u0331", + racute: "\u0155", + radic: "\u221A", + raemptyv: "\u29B3", + rang: "\u27E9", + rangd: "\u2992", + range: "\u29A5", + rangle: "\u27E9", + raquo: "\xBB", + rarr: "\u2192", + rarrap: "\u2975", + rarrb: "\u21E5", + rarrbfs: "\u2920", + rarrc: "\u2933", + rarrfs: "\u291E", + rarrhk: "\u21AA", + rarrlp: "\u21AC", + rarrpl: "\u2945", + rarrsim: "\u2974", + rarrtl: "\u21A3", + rarrw: "\u219D", + ratail: "\u291A", + ratio: "\u2236", + rationals: "\u211A", + rbarr: "\u290D", + rbbrk: "\u2773", + rbrace: "}", + rbrack: "]", + rbrke: "\u298C", + rbrksld: "\u298E", + rbrkslu: "\u2990", + rcaron: "\u0159", + rcedil: "\u0157", + rceil: "\u2309", + rcub: "}", + rcy: "\u0440", + rdca: "\u2937", + rdldhar: "\u2969", + rdquo: "\u201D", + rdquor: "\u201D", + rdsh: "\u21B3", + real: "\u211C", + realine: "\u211B", + realpart: "\u211C", + reals: "\u211D", + rect: "\u25AD", + reg: "\xAE", + rfisht: "\u297D", + rfloor: "\u230B", + rfr: "\u{1D52F}", + rhard: "\u21C1", + rharu: "\u21C0", + rharul: "\u296C", + rho: "\u03C1", + rhov: "\u03F1", + rightarrow: "\u2192", + rightarrowtail: "\u21A3", + rightharpoondown: "\u21C1", + rightharpoonup: "\u21C0", + rightleftarrows: "\u21C4", + rightleftharpoons: "\u21CC", + rightrightarrows: "\u21C9", + rightsquigarrow: "\u219D", + rightthreetimes: "\u22CC", + ring: "\u02DA", + risingdotseq: "\u2253", + rlarr: "\u21C4", + rlhar: "\u21CC", + rlm: "\u200F", + rmoust: "\u23B1", + rmoustache: "\u23B1", + rnmid: "\u2AEE", + roang: "\u27ED", + roarr: "\u21FE", + robrk: "\u27E7", + ropar: "\u2986", + ropf: "\u{1D563}", + roplus: "\u2A2E", + rotimes: "\u2A35", + rpar: ")", + rpargt: "\u2994", + rppolint: "\u2A12", + rrarr: "\u21C9", + rsaquo: "\u203A", + rscr: "\u{1D4C7}", + rsh: "\u21B1", + rsqb: "]", + rsquo: "\u2019", + rsquor: "\u2019", + rthree: "\u22CC", + rtimes: "\u22CA", + rtri: "\u25B9", + rtrie: "\u22B5", + rtrif: "\u25B8", + rtriltri: "\u29CE", + ruluhar: "\u2968", + rx: "\u211E", + sacute: "\u015B", + sbquo: "\u201A", + sc: "\u227B", + scE: "\u2AB4", + scap: "\u2AB8", + scaron: "\u0161", + sccue: "\u227D", + sce: "\u2AB0", + scedil: "\u015F", + scirc: "\u015D", + scnE: "\u2AB6", + scnap: "\u2ABA", + scnsim: "\u22E9", + scpolint: "\u2A13", + scsim: "\u227F", + scy: "\u0441", + sdot: "\u22C5", + sdotb: "\u22A1", + sdote: "\u2A66", + seArr: "\u21D8", + searhk: "\u2925", + searr: "\u2198", + searrow: "\u2198", + sect: "\xA7", + semi: ";", + seswar: "\u2929", + setminus: "\u2216", + setmn: "\u2216", + sext: "\u2736", + sfr: "\u{1D530}", + sfrown: "\u2322", + sharp: "\u266F", + shchcy: "\u0449", + shcy: "\u0448", + shortmid: "\u2223", + shortparallel: "\u2225", + shy: "\xAD", + sigma: "\u03C3", + sigmaf: "\u03C2", + sigmav: "\u03C2", + sim: "\u223C", + simdot: "\u2A6A", + sime: "\u2243", + simeq: "\u2243", + simg: "\u2A9E", + simgE: "\u2AA0", + siml: "\u2A9D", + simlE: "\u2A9F", + simne: "\u2246", + simplus: "\u2A24", + simrarr: "\u2972", + slarr: "\u2190", + smallsetminus: "\u2216", + smashp: "\u2A33", + smeparsl: "\u29E4", + smid: "\u2223", + smile: "\u2323", + smt: "\u2AAA", + smte: "\u2AAC", + smtes: "\u2AAC\uFE00", + softcy: "\u044C", + sol: "/", + solb: "\u29C4", + solbar: "\u233F", + sopf: "\u{1D564}", + spades: "\u2660", + spadesuit: "\u2660", + spar: "\u2225", + sqcap: "\u2293", + sqcaps: "\u2293\uFE00", + sqcup: "\u2294", + sqcups: "\u2294\uFE00", + sqsub: "\u228F", + sqsube: "\u2291", + sqsubset: "\u228F", + sqsubseteq: "\u2291", + sqsup: "\u2290", + sqsupe: "\u2292", + sqsupset: "\u2290", + sqsupseteq: "\u2292", + squ: "\u25A1", + square: "\u25A1", + squarf: "\u25AA", + squf: "\u25AA", + srarr: "\u2192", + sscr: "\u{1D4C8}", + ssetmn: "\u2216", + ssmile: "\u2323", + sstarf: "\u22C6", + star: "\u2606", + starf: "\u2605", + straightepsilon: "\u03F5", + straightphi: "\u03D5", + strns: "\xAF", + sub: "\u2282", + subE: "\u2AC5", + subdot: "\u2ABD", + sube: "\u2286", + subedot: "\u2AC3", + submult: "\u2AC1", + subnE: "\u2ACB", + subne: "\u228A", + subplus: "\u2ABF", + subrarr: "\u2979", + subset: "\u2282", + subseteq: "\u2286", + subseteqq: "\u2AC5", + subsetneq: "\u228A", + subsetneqq: "\u2ACB", + subsim: "\u2AC7", + subsub: "\u2AD5", + subsup: "\u2AD3", + succ: "\u227B", + succapprox: "\u2AB8", + succcurlyeq: "\u227D", + succeq: "\u2AB0", + succnapprox: "\u2ABA", + succneqq: "\u2AB6", + succnsim: "\u22E9", + succsim: "\u227F", + sum: "\u2211", + sung: "\u266A", + sup1: "\xB9", + sup2: "\xB2", + sup3: "\xB3", + sup: "\u2283", + supE: "\u2AC6", + supdot: "\u2ABE", + supdsub: "\u2AD8", + supe: "\u2287", + supedot: "\u2AC4", + suphsol: "\u27C9", + suphsub: "\u2AD7", + suplarr: "\u297B", + supmult: "\u2AC2", + supnE: "\u2ACC", + supne: "\u228B", + supplus: "\u2AC0", + supset: "\u2283", + supseteq: "\u2287", + supseteqq: "\u2AC6", + supsetneq: "\u228B", + supsetneqq: "\u2ACC", + supsim: "\u2AC8", + supsub: "\u2AD4", + supsup: "\u2AD6", + swArr: "\u21D9", + swarhk: "\u2926", + swarr: "\u2199", + swarrow: "\u2199", + swnwar: "\u292A", + szlig: "\xDF", + target: "\u2316", + tau: "\u03C4", + tbrk: "\u23B4", + tcaron: "\u0165", + tcedil: "\u0163", + tcy: "\u0442", + tdot: "\u20DB", + telrec: "\u2315", + tfr: "\u{1D531}", + there4: "\u2234", + therefore: "\u2234", + theta: "\u03B8", + thetasym: "\u03D1", + thetav: "\u03D1", + thickapprox: "\u2248", + thicksim: "\u223C", + thinsp: "\u2009", + thkap: "\u2248", + thksim: "\u223C", + thorn: "\xFE", + tilde: "\u02DC", + times: "\xD7", + timesb: "\u22A0", + timesbar: "\u2A31", + timesd: "\u2A30", + tint: "\u222D", + toea: "\u2928", + top: "\u22A4", + topbot: "\u2336", + topcir: "\u2AF1", + topf: "\u{1D565}", + topfork: "\u2ADA", + tosa: "\u2929", + tprime: "\u2034", + trade: "\u2122", + triangle: "\u25B5", + triangledown: "\u25BF", + triangleleft: "\u25C3", + trianglelefteq: "\u22B4", + triangleq: "\u225C", + triangleright: "\u25B9", + trianglerighteq: "\u22B5", + tridot: "\u25EC", + trie: "\u225C", + triminus: "\u2A3A", + triplus: "\u2A39", + trisb: "\u29CD", + tritime: "\u2A3B", + trpezium: "\u23E2", + tscr: "\u{1D4C9}", + tscy: "\u0446", + tshcy: "\u045B", + tstrok: "\u0167", + twixt: "\u226C", + twoheadleftarrow: "\u219E", + twoheadrightarrow: "\u21A0", + uArr: "\u21D1", + uHar: "\u2963", + uacute: "\xFA", + uarr: "\u2191", + ubrcy: "\u045E", + ubreve: "\u016D", + ucirc: "\xFB", + ucy: "\u0443", + udarr: "\u21C5", + udblac: "\u0171", + udhar: "\u296E", + ufisht: "\u297E", + ufr: "\u{1D532}", + ugrave: "\xF9", + uharl: "\u21BF", + uharr: "\u21BE", + uhblk: "\u2580", + ulcorn: "\u231C", + ulcorner: "\u231C", + ulcrop: "\u230F", + ultri: "\u25F8", + umacr: "\u016B", + uml: "\xA8", + uogon: "\u0173", + uopf: "\u{1D566}", + uparrow: "\u2191", + updownarrow: "\u2195", + upharpoonleft: "\u21BF", + upharpoonright: "\u21BE", + uplus: "\u228E", + upsi: "\u03C5", + upsih: "\u03D2", + upsilon: "\u03C5", + upuparrows: "\u21C8", + urcorn: "\u231D", + urcorner: "\u231D", + urcrop: "\u230E", + uring: "\u016F", + urtri: "\u25F9", + uscr: "\u{1D4CA}", + utdot: "\u22F0", + utilde: "\u0169", + utri: "\u25B5", + utrif: "\u25B4", + uuarr: "\u21C8", + uuml: "\xFC", + uwangle: "\u29A7", + vArr: "\u21D5", + vBar: "\u2AE8", + vBarv: "\u2AE9", + vDash: "\u22A8", + vangrt: "\u299C", + varepsilon: "\u03F5", + varkappa: "\u03F0", + varnothing: "\u2205", + varphi: "\u03D5", + varpi: "\u03D6", + varpropto: "\u221D", + varr: "\u2195", + varrho: "\u03F1", + varsigma: "\u03C2", + varsubsetneq: "\u228A\uFE00", + varsubsetneqq: "\u2ACB\uFE00", + varsupsetneq: "\u228B\uFE00", + varsupsetneqq: "\u2ACC\uFE00", + vartheta: "\u03D1", + vartriangleleft: "\u22B2", + vartriangleright: "\u22B3", + vcy: "\u0432", + vdash: "\u22A2", + vee: "\u2228", + veebar: "\u22BB", + veeeq: "\u225A", + vellip: "\u22EE", + verbar: "|", + vert: "|", + vfr: "\u{1D533}", + vltri: "\u22B2", + vnsub: "\u2282\u20D2", + vnsup: "\u2283\u20D2", + vopf: "\u{1D567}", + vprop: "\u221D", + vrtri: "\u22B3", + vscr: "\u{1D4CB}", + vsubnE: "\u2ACB\uFE00", + vsubne: "\u228A\uFE00", + vsupnE: "\u2ACC\uFE00", + vsupne: "\u228B\uFE00", + vzigzag: "\u299A", + wcirc: "\u0175", + wedbar: "\u2A5F", + wedge: "\u2227", + wedgeq: "\u2259", + weierp: "\u2118", + wfr: "\u{1D534}", + wopf: "\u{1D568}", + wp: "\u2118", + wr: "\u2240", + wreath: "\u2240", + wscr: "\u{1D4CC}", + xcap: "\u22C2", + xcirc: "\u25EF", + xcup: "\u22C3", + xdtri: "\u25BD", + xfr: "\u{1D535}", + xhArr: "\u27FA", + xharr: "\u27F7", + xi: "\u03BE", + xlArr: "\u27F8", + xlarr: "\u27F5", + xmap: "\u27FC", + xnis: "\u22FB", + xodot: "\u2A00", + xopf: "\u{1D569}", + xoplus: "\u2A01", + xotime: "\u2A02", + xrArr: "\u27F9", + xrarr: "\u27F6", + xscr: "\u{1D4CD}", + xsqcup: "\u2A06", + xuplus: "\u2A04", + xutri: "\u25B3", + xvee: "\u22C1", + xwedge: "\u22C0", + yacute: "\xFD", + yacy: "\u044F", + ycirc: "\u0177", + ycy: "\u044B", + yen: "\xA5", + yfr: "\u{1D536}", + yicy: "\u0457", + yopf: "\u{1D56A}", + yscr: "\u{1D4CE}", + yucy: "\u044E", + yuml: "\xFF", + zacute: "\u017A", + zcaron: "\u017E", + zcy: "\u0437", + zdot: "\u017C", + zeetrf: "\u2128", + zeta: "\u03B6", + zfr: "\u{1D537}", + zhcy: "\u0436", + zigrarr: "\u21DD", + zopf: "\u{1D56B}", + zscr: "\u{1D4CF}", + zwj: "\u200D", + zwnj: "\u200C" +}; +var t = {}.hasOwnProperty; +function n1(e) { + return t.call(r1, e) ? r1[e] : !1; +} +function I(l) { + let c = {}, e = -1, p, r, n, o, f, s, u; + for(; ++e < l.length;){ + for(; (e in c);)e = c[e]; + if (p = l[e], e && p[1].type === "chunkFlow" && l[e - 1][1].type === "listItemPrefix" && (s = p[1]._tokenizer.events, n = 0, n < s.length && s[n][1].type === "lineEndingBlank" && (n += 2), n < s.length && s[n][1].type === "content")) for(; ++n < s.length && s[n][1].type !== "content";)s[n][1].type === "chunkText" && (s[n][1]._isInFirstContentOfListItem = !0, n++); + if (p[0] === "enter") p[1].contentType && (Object.assign(c, _(l, e)), e = c[e], u = !0); + else if (p[1]._container) { + for(n = e, r = void 0; (n--) && (o = l[n], o[1].type === "lineEnding" || o[1].type === "lineEndingBlank");)o[0] === "enter" && (r && (l[r][1].type = "lineEndingBlank"), o[1].type = "lineEnding", r = n); + r && (p[1].end = Object.assign({}, l[r][1].start), f = l.slice(r, e), f.unshift(p), u1(l, r, e - r + 1, f)); + } + } + return !u; +} +function _(l, c) { + let e = l[c][1], p = l[c][2], r = c - 1, n = [], o = e._tokenizer || p.parser[e.contentType](e.start), f = o.events, s = [], u = {}, a, m, i = -1, t = e, d = 0, k = 0, h = [ + k + ]; + for(; t;){ + for(; l[++r][1] !== t;); + n.push(r), t._tokenizer || (a = p.sliceStream(t), t.next || a.push(null), m && o.defineSkip(t.start), t._isInFirstContentOfListItem && (o._gfmTasklistFirstContentOfListItem = !0), o.write(a), t._isInFirstContentOfListItem && (o._gfmTasklistFirstContentOfListItem = void 0)), m = t, t = t.next; + } + for(t = e; ++i < f.length;)f[i][0] === "exit" && f[i - 1][0] === "enter" && f[i][1].type === f[i - 1][1].type && f[i][1].start.line !== f[i][1].end.line && (k = i + 1, h.push(k), t._tokenizer = void 0, t.previous = void 0, t = t.next); + for(o.events = [], t ? (t._tokenizer = void 0, t.previous = void 0) : h.pop(), i = h.length; i--;){ + let y = f.slice(h[i], h[i + 1]), g = n.pop(); + s.unshift([ + g, + g + y.length - 1 + ]), u1(l, g, 2, y); + } + for(i = -1; ++i < s.length;)u[d + s[i][0]] = d + s[i][1], d += s[i][1] - s[i][0] - 1; + return u; +} +function D1(i, E, u, t, h, m, S, x, N) { + let b = N || Number.POSITIVE_INFINITY, g = 0; + return w; + function w(n) { + return n === 60 ? (i.enter(t), i.enter(h), i.enter(m), i.consume(n), i.exit(m), l) : n === null || n === 41 || B(n) ? u(n) : (i.enter(t), i.enter(S), i.enter(x), i.enter("chunkString", { + contentType: "string" + }), r(n)); + } + function l(n) { + return n === 62 ? (i.enter(m), i.consume(n), i.exit(m), i.exit(h), i.exit(t), E) : (i.enter(x), i.enter("chunkString", { + contentType: "string" + }), a(n)); + } + function a(n) { + return n === 62 ? (i.exit("chunkString"), i.exit(x), l(n)) : n === null || n === 60 || p(n) ? u(n) : (i.consume(n), n === 92 ? L : a); + } + function L(n) { + return n === 60 || n === 62 || n === 92 ? (i.consume(n), a) : a(n); + } + function r(n) { + return n === 40 ? ++g > b ? u(n) : (i.consume(n), r) : n === 41 ? g-- ? (i.consume(n), r) : (i.exit("chunkString"), i.exit(x), i.exit(S), i.exit(t), E(n)) : n === null || a2(n) ? g ? u(n) : (i.exit("chunkString"), i.exit(x), i.exit(S), i.exit(t), E(n)) : B(n) ? u(n) : (i.consume(n), n === 92 ? O : r); + } + function O(n) { + return n === 40 || n === 41 || n === 92 ? (i.consume(n), r) : r(n); + } +} +function w(r, h, E, x, t, m) { + let S = this, i = 0, l; + return b; + function b(n) { + return r.enter(x), r.enter(t), r.consume(n), r.exit(t), r.enter(m), a; + } + function a(n) { + return n === null || n === 91 || n === 93 && !l || n === 94 && !i && "_hiddenFootnoteSupport" in S.parser.constructs || i > 999 ? E(n) : n === 93 ? (r.exit(m), r.enter(t), r.consume(n), r.exit(t), r.exit(x), h) : p(n) ? (r.enter("lineEnding"), r.consume(n), r.exit("lineEnding"), a) : (r.enter("chunkString", { + contentType: "string" + }), u(n)); + } + function u(n) { + return n === null || n === 91 || n === 93 || p(n) || i++ > 999 ? (r.exit("chunkString"), a(n)) : (r.consume(n), l = l || !s(n), n === 92 ? o : u); + } + function o(n) { + return n === 91 || n === 92 || n === 93 ? (r.consume(n), i++, u) : u(n); + } +} +function w1(r, E, k, a, t, m) { + let i; + return o; + function o(n) { + return r.enter(a), r.enter(t), r.consume(n), r.exit(t), i = n === 40 ? 41 : n, x; + } + function x(n) { + return n === i ? (r.enter(t), r.consume(n), r.exit(t), r.exit(a), E) : (r.enter(m), l(n)); + } + function l(n) { + return n === i ? (r.exit(m), x(i)) : n === null ? k(n) : p(n) ? (r.enter("lineEnding"), r.consume(n), r.exit("lineEnding"), p1(r, l, "linePrefix")) : (r.enter("chunkString", { + contentType: "string" + }), u(n)); + } + function u(n) { + return n === i || n === null || p(n) ? (r.exit("chunkString"), l(n)) : (r.consume(n), n === 92 ? S : u); + } + function S(n) { + return n === i || n === 92 ? (r.consume(n), u) : u(n); + } +} +function f(r, e) { + let t; + return i; + function i(n) { + return p(n) ? (r.enter("lineEnding"), r.consume(n), r.exit("lineEnding"), t = !0, i) : s(n) ? p1(r, i, t ? "linePrefix" : "lineSuffix")(n) : e(n); + } +} +function r2(e) { + return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); +} +var e1 = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "section", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" +], t1 = [ + "pre", + "script", + "style", + "textarea" +]; +var On = { + name: "attention", + tokenize: Bn, + resolveAll: Pn +}; +function Pn(n, u) { + let r = -1, t, l, o, a, m, p, x, s; + for(; ++r < n.length;)if (n[r][0] === "enter" && n[r][1].type === "attentionSequence" && n[r][1]._close) { + for(t = r; t--;)if (n[t][0] === "exit" && n[t][1].type === "attentionSequence" && n[t][1]._open && u.sliceSerialize(n[t][1]).charCodeAt(0) === u.sliceSerialize(n[r][1]).charCodeAt(0)) { + if ((n[t][1]._close || n[r][1]._open) && (n[r][1].end.offset - n[r][1].start.offset) % 3 && !((n[t][1].end.offset - n[t][1].start.offset + n[r][1].end.offset - n[r][1].start.offset) % 3)) continue; + p = n[t][1].end.offset - n[t][1].start.offset > 1 && n[r][1].end.offset - n[r][1].start.offset > 1 ? 2 : 1; + let S = Object.assign({}, n[t][1].end), g1 = Object.assign({}, n[r][1].start); + mn(S, -p), mn(g1, p), a = { + type: p > 1 ? "strongSequence" : "emphasisSequence", + start: S, + end: Object.assign({}, n[t][1].end) + }, m = { + type: p > 1 ? "strongSequence" : "emphasisSequence", + start: Object.assign({}, n[r][1].start), + end: g1 + }, o = { + type: p > 1 ? "strongText" : "emphasisText", + start: Object.assign({}, n[t][1].end), + end: Object.assign({}, n[r][1].start) + }, l = { + type: p > 1 ? "strong" : "emphasis", + start: Object.assign({}, a.start), + end: Object.assign({}, m.end) + }, n[t][1].end = Object.assign({}, a.start), n[r][1].start = Object.assign({}, m.end), x = [], n[t][1].end.offset - n[t][1].start.offset && (x = g(x, [ + [ + "enter", + n[t][1], + u + ], + [ + "exit", + n[t][1], + u + ] + ])), x = g(x, [ + [ + "enter", + l, + u + ], + [ + "enter", + a, + u + ], + [ + "exit", + a, + u + ], + [ + "enter", + o, + u + ] + ]), x = g(x, c1(u.parser.constructs.insideSpan.null, n.slice(t + 1, r), u)), x = g(x, [ + [ + "exit", + o, + u + ], + [ + "enter", + m, + u + ], + [ + "exit", + m, + u + ], + [ + "exit", + l, + u + ] + ]), n[r][1].end.offset - n[r][1].start.offset ? (s = 2, x = g(x, [ + [ + "enter", + n[r][1], + u + ], + [ + "exit", + n[r][1], + u + ] + ])) : s = 0, u1(n, t - 1, r - t + 3, x), r = t + x.length - s - 2; + break; + } + } + for(r = -1; ++r < n.length;)n[r][1].type === "attentionSequence" && (n[r][1].type = "data"); + return n; +} +function Bn(n, u) { + let r = this.parser.constructs.attentionMarkers.null, t = this.previous, l = a3(t), o; + return a; + function a(p) { + return n.enter("attentionSequence"), o = p, m(p); + } + function m(p) { + if (p === o) return n.consume(p), m; + let x = n.exit("attentionSequence"), s = a3(p), S = !s || s === 2 && l || r.includes(p), g = !l || l === 2 && s || r.includes(t); + return x._open = Boolean(o === 42 ? S : S && (l || !g)), x._close = Boolean(o === 42 ? g : g && (s || !S)), u(p); + } +} +function mn(n, u) { + n.column += u, n.offset += u, n._bufferIndex += u; +} +var Rn = { + name: "autolink", + tokenize: Hn +}; +function Hn(n, u, r) { + let t = 1; + return l; + function l(h) { + return n.enter("autolink"), n.enter("autolinkMarker"), n.consume(h), n.exit("autolinkMarker"), n.enter("autolinkProtocol"), o1; + } + function o1(h) { + return o(h) ? (n.consume(h), a) : c(h) ? x(h) : r(h); + } + function a(h) { + return h === 43 || h === 45 || h === 46 || C(h) ? m(h) : x(h); + } + function m(h) { + return h === 58 ? (n.consume(h), p) : (h === 43 || h === 45 || h === 46 || C(h)) && t++ < 32 ? (n.consume(h), m) : x(h); + } + function p(h) { + return h === 62 ? (n.exit("autolinkProtocol"), c1(h)) : h === null || h === 32 || h === 60 || B(h) ? r(h) : (n.consume(h), p); + } + function x(h) { + return h === 64 ? (n.consume(h), t = 0, s) : c(h) ? (n.consume(h), x) : r(h); + } + function s(h) { + return C(h) ? S(h) : r(h); + } + function S(h) { + return h === 46 ? (n.consume(h), t = 0, s) : h === 62 ? (n.exit("autolinkProtocol").type = "autolinkEmail", c1(h)) : g(h); + } + function g(h) { + return (h === 45 || C(h)) && t++ < 63 ? (n.consume(h), h === 45 ? g : S) : r(h); + } + function c1(h) { + return n.enter("autolinkMarker"), n.consume(h), n.exit("autolinkMarker"), n.exit("autolink"), u; + } +} +var R = { + tokenize: _n, + partial: !0 +}; +function _n(n, u, r) { + return p1(n, t, "linePrefix"); + function t(l) { + return l === null || p(l) ? u(l) : r(l); + } +} +var sn = { + name: "blockQuote", + tokenize: Wn, + continuation: { + tokenize: Un + }, + exit: Gn +}; +function Wn(n, u, r) { + let t = this; + return l; + function l(a) { + if (a === 62) { + let m = t.containerState; + return m.open || (n.enter("blockQuote", { + _container: !0 + }), m.open = !0), n.enter("blockQuotePrefix"), n.enter("blockQuoteMarker"), n.consume(a), n.exit("blockQuoteMarker"), o; + } + return r(a); + } + function o(a) { + return s(a) ? (n.enter("blockQuotePrefixWhitespace"), n.consume(a), n.exit("blockQuotePrefixWhitespace"), n.exit("blockQuotePrefix"), u) : (n.exit("blockQuotePrefix"), u(a)); + } +} +function Un(n, u, r) { + return p1(n, n.attempt(sn, u, r), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4); +} +function Gn(n) { + n.exit("blockQuote"); +} +var Kn = { + name: "characterEscape", + tokenize: Xn +}; +function Xn(n, u, r) { + return t; + function t(o) { + return n.enter("characterEscape"), n.enter("escapeMarker"), n.consume(o), n.exit("escapeMarker"), l; + } + function l(o) { + return e(o) ? (n.enter("characterEscapeValue"), n.consume(o), n.exit("characterEscapeValue"), n.exit("characterEscape"), u) : r(o); + } +} +var vn = { + name: "characterReference", + tokenize: dn +}; +function dn(n, u, r1) { + let t = this, l = 0, o, a; + return m; + function m(S) { + return n.enter("characterReference"), n.enter("characterReferenceMarker"), n.consume(S), n.exit("characterReferenceMarker"), p; + } + function p(S) { + return S === 35 ? (n.enter("characterReferenceMarkerNumeric"), n.consume(S), n.exit("characterReferenceMarkerNumeric"), x) : (n.enter("characterReferenceValue"), o = 31, a = C, s(S)); + } + function x(S) { + return S === 88 || S === 120 ? (n.enter("characterReferenceMarkerHexadecimal"), n.consume(S), n.exit("characterReferenceMarkerHexadecimal"), n.enter("characterReferenceValue"), o = 6, a = D, s) : (n.enter("characterReferenceValue"), o = 7, a = r, s(S)); + } + function s(S) { + let g; + return S === 59 && l ? (g = n.exit("characterReferenceValue"), a === C && !n1(t.sliceSerialize(g)) ? r1(S) : (n.enter("characterReferenceMarker"), n.consume(S), n.exit("characterReferenceMarker"), n.exit("characterReference"), u)) : a(S) && (l++) < o ? (n.consume(S), s) : r1(S); + } +} +var tt = { + name: "codeFenced", + tokenize: rt, + concrete: !0 +}; +function rt(n, u, r) { + let t = this, l = { + tokenize: I, + partial: !0 + }, o = { + tokenize: A, + partial: !0 + }, a = this.events[this.events.length - 1], m = a && a[1].type === "linePrefix" ? a[2].sliceSerialize(a[1], !0).length : 0, p2 = 0, x; + return s; + function s(k) { + return n.enter("codeFenced"), n.enter("codeFencedFence"), n.enter("codeFencedFenceSequence"), x = k, S(k); + } + function S(k) { + return k === x ? (n.consume(k), p2++, S) : (n.exit("codeFencedFenceSequence"), p2 < 3 ? r(k) : p1(n, g, "whitespace")(k)); + } + function g(k) { + return k === null || p(k) ? q(k) : (n.enter("codeFencedFenceInfo"), n.enter("chunkString", { + contentType: "string" + }), c(k)); + } + function c(k) { + return k === null || a2(k) ? (n.exit("chunkString"), n.exit("codeFencedFenceInfo"), p1(n, h, "whitespace")(k)) : k === 96 && k === x ? r(k) : (n.consume(k), c); + } + function h(k) { + return k === null || p(k) ? q(k) : (n.enter("codeFencedFenceMeta"), n.enter("chunkString", { + contentType: "string" + }), B(k)); + } + function B(k) { + return k === null || p(k) ? (n.exit("chunkString"), n.exit("codeFencedFenceMeta"), q(k)) : k === 96 && k === x ? r(k) : (n.consume(k), B); + } + function q(k) { + return n.exit("codeFencedFence"), t.interrupt ? u(k) : z(k); + } + function z(k) { + return k === null ? T(k) : p(k) ? n.attempt(o, n.attempt(l, T, m ? p1(n, z, "linePrefix", m + 1) : z), T)(k) : (n.enter("codeFlowValue"), C(k)); + } + function C(k) { + return k === null || p(k) ? (n.exit("codeFlowValue"), z(k)) : (n.consume(k), C); + } + function T(k) { + return n.exit("codeFenced"), u(k); + } + function A(k, D, F) { + let y = this; + return M; + function M(w) { + return k.enter("lineEnding"), k.consume(w), k.exit("lineEnding"), b; + } + function b(w) { + return y.parser.lazy[y.now().line] ? F(w) : D(w); + } + } + function I(k, D, F) { + let y = 0; + return p1(k, M, "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4); + function M(f) { + return k.enter("codeFencedFence"), k.enter("codeFencedFenceSequence"), b(f); + } + function b(f) { + return f === x ? (k.consume(f), y++, b) : y < p2 ? F(f) : (k.exit("codeFencedFenceSequence"), p1(k, w, "whitespace")(f)); + } + function w(f) { + return f === null || p(f) ? (k.exit("codeFencedFence"), D(f)) : F(f); + } + } +} +var et = { + name: "codeIndented", + tokenize: ut +}, it = { + tokenize: at, + partial: !0 +}; +function ut(n, u, r) { + let t = this; + return l; + function l(x) { + return n.enter("codeIndented"), p1(n, o, "linePrefix", 4 + 1)(x); + } + function o(x) { + let s = t.events[t.events.length - 1]; + return s && s[1].type === "linePrefix" && s[2].sliceSerialize(s[1], !0).length >= 4 ? a(x) : r(x); + } + function a(x) { + return x === null ? p2(x) : p(x) ? n.attempt(it, a, p2)(x) : (n.enter("codeFlowValue"), m(x)); + } + function m(x) { + return x === null || p(x) ? (n.exit("codeFlowValue"), a(x)) : (n.consume(x), m); + } + function p2(x) { + return n.exit("codeIndented"), u(x); + } +} +function at(n, u, r) { + let t = this; + return l; + function l(a) { + return t.parser.lazy[t.now().line] ? r(a) : p(a) ? (n.enter("lineEnding"), n.consume(a), n.exit("lineEnding"), l) : p1(n, o, "linePrefix", 4 + 1)(a); + } + function o(a) { + let m = t.events[t.events.length - 1]; + return m && m[1].type === "linePrefix" && m[2].sliceSerialize(m[1], !0).length >= 4 ? u(a) : p(a) ? l(a) : r(a); + } +} +var lt = { + name: "codeText", + tokenize: pt, + resolve: ot, + previous: mt +}; +function ot(n) { + let u = n.length - 4, r = 3, t, l; + if ((n[r][1].type === "lineEnding" || n[r][1].type === "space") && (n[u][1].type === "lineEnding" || n[u][1].type === "space")) { + for(t = r; ++t < u;)if (n[t][1].type === "codeTextData") { + n[r][1].type = "codeTextPadding", n[u][1].type = "codeTextPadding", r += 2, u -= 2; + break; + } + } + for(t = r - 1, u++; ++t <= u;)l === void 0 ? t !== u && n[t][1].type !== "lineEnding" && (l = t) : (t === u || n[t][1].type === "lineEnding") && (n[l][1].type = "codeTextData", t !== l + 2 && (n[l][1].end = n[t - 1][1].end, n.splice(l + 2, t - l - 2), u -= t - l - 2, t = l + 2), l = void 0); + return n; +} +function mt(n) { + return n !== 96 || this.events[this.events.length - 1][1].type === "characterEscape"; +} +function pt(n, u, r) { + let l = 0, o, a; + return m; + function m(g) { + return n.enter("codeText"), n.enter("codeTextSequence"), p1(g); + } + function p1(g) { + return g === 96 ? (n.consume(g), l++, p1) : (n.exit("codeTextSequence"), x(g)); + } + function x(g) { + return g === null ? r(g) : g === 96 ? (a = n.enter("codeTextSequence"), o = 0, S(g)) : g === 32 ? (n.enter("space"), n.consume(g), n.exit("space"), x) : p(g) ? (n.enter("lineEnding"), n.consume(g), n.exit("lineEnding"), x) : (n.enter("codeTextData"), s(g)); + } + function s(g) { + return g === null || g === 32 || g === 96 || p(g) ? (n.exit("codeTextData"), x(g)) : (n.consume(g), s); + } + function S(g) { + return g === 96 ? (n.consume(g), o++, S) : o === l ? (n.exit("codeTextSequence"), n.exit("codeText"), u(g)) : (a.type = "codeTextData", s(g)); + } +} +var ht = { + tokenize: ct, + resolve: gt +}, kt = { + tokenize: St, + partial: !0 +}; +function gt(n) { + return I(n), n; +} +function ct(n, u) { + let r; + return t; + function t(m) { + return n.enter("content"), r = n.enter("chunkContent", { + contentType: "content" + }), l(m); + } + function l(m) { + return m === null ? o(m) : p(m) ? n.check(kt, a, o)(m) : (n.consume(m), l); + } + function o(m) { + return n.exit("chunkContent"), n.exit("content"), u(m); + } + function a(m) { + return n.consume(m), n.exit("chunkContent"), r.next = n.enter("chunkContent", { + contentType: "content", + previous: r + }), r = r.next, l; + } +} +function St(n, u, r) { + let t = this; + return l; + function l(a) { + return n.exit("chunkContent"), n.enter("lineEnding"), n.consume(a), n.exit("lineEnding"), p1(n, o, "linePrefix"); + } + function o(a) { + if (a === null || p(a)) return r(a); + let m = t.events[t.events.length - 1]; + return !t.parser.constructs.disable.null.includes("codeIndented") && m && m[1].type === "linePrefix" && m[2].sliceSerialize(m[1], !0).length >= 4 ? u(a) : n.interrupt(t.parser.constructs.flow, r, u)(a); + } +} +var wt = { + name: "definition", + tokenize: Ct +}, Lt = { + tokenize: Tt, + partial: !0 +}; +function Ct(n, u, r) { + let t = this, l; + return o; + function o(p) { + return n.enter("definition"), w.call(t, n, a, r, "definitionLabel", "definitionLabelMarker", "definitionLabelString")(p); + } + function a(p) { + return l = r2(t.sliceSerialize(t.events[t.events.length - 1][1]).slice(1, -1)), p === 58 ? (n.enter("definitionMarker"), n.consume(p), n.exit("definitionMarker"), f(n, D1(n, n.attempt(Lt, p1(n, m, "whitespace"), p1(n, m, "whitespace")), r, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", "definitionDestinationRaw", "definitionDestinationString"))) : r(p); + } + function m(p1) { + return p1 === null || p(p1) ? (n.exit("definition"), t.parser.defined.includes(l) || t.parser.defined.push(l), u(p1)) : r(p1); + } +} +function Tt(n, u, r) { + return t; + function t(a) { + return a2(a) ? f(n, l)(a) : r(a); + } + function l(a) { + return a === 34 || a === 39 || a === 40 ? w1(n, p1(n, o, "whitespace"), r, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(a) : r(a); + } + function o(a) { + return a === null || p(a) ? u(a) : r(a); + } +} +var It = { + name: "hardBreakEscape", + tokenize: Ft +}; +function Ft(n, u, r) { + return t; + function t(o) { + return n.enter("hardBreakEscape"), n.enter("escapeMarker"), n.consume(o), l; + } + function l(o) { + return p(o) ? (n.exit("escapeMarker"), n.exit("hardBreakEscape"), u(o)) : r(o); + } +} +var qt = { + name: "headingAtx", + tokenize: Rt, + resolve: Dt +}; +function Dt(n, u) { + let r = n.length - 2, t = 3, l, o; + return n[t][1].type === "whitespace" && (t += 2), r - 2 > t && n[r][1].type === "whitespace" && (r -= 2), n[r][1].type === "atxHeadingSequence" && (t === r - 1 || r - 4 > t && n[r - 2][1].type === "whitespace") && (r -= t + 1 === r ? 2 : 4), r > t && (l = { + type: "atxHeadingText", + start: n[t][1].start, + end: n[r][1].end + }, o = { + type: "chunkText", + start: n[t][1].start, + end: n[r][1].end, + contentType: "text" + }, u1(n, t, r - t + 1, [ + [ + "enter", + l, + u + ], + [ + "enter", + o, + u + ], + [ + "exit", + o, + u + ], + [ + "exit", + l, + u + ] + ])), n; +} +function Rt(n, u, r) { + let t = this, l = 0; + return o; + function o(s) { + return n.enter("atxHeading"), n.enter("atxHeadingSequence"), a(s); + } + function a(s) { + return s === 35 && l++ < 6 ? (n.consume(s), a) : s === null || a2(s) ? (n.exit("atxHeadingSequence"), t.interrupt ? u(s) : m(s)) : r(s); + } + function m(s1) { + return s1 === 35 ? (n.enter("atxHeadingSequence"), p2(s1)) : s1 === null || p(s1) ? (n.exit("atxHeading"), u(s1)) : s(s1) ? p1(n, m, "whitespace")(s1) : (n.enter("atxHeadingText"), x(s1)); + } + function p2(s) { + return s === 35 ? (n.consume(s), p2) : (n.exit("atxHeadingSequence"), m(s)); + } + function x(s) { + return s === null || s === 35 || a2(s) ? (n.exit("atxHeadingText"), m(s)) : (n.consume(s), x); + } +} +var Vt = { + name: "htmlFlow", + tokenize: Qt, + resolveTo: _t, + concrete: !0 +}, jt = { + tokenize: Nt, + partial: !0 +}; +function _t(n) { + let u = n.length; + for(; (u--) && !(n[u][0] === "enter" && n[u][1].type === "htmlFlow");); + return u > 1 && n[u - 2][1].type === "linePrefix" && (n[u][1].start = n[u - 2][1].start, n[u + 1][1].start = n[u - 2][1].start, n.splice(u - 2, 2)), n; +} +function Qt(n, u, r) { + let t = this, l, o1, a, m, p1; + return x; + function x(e) { + return n.enter("htmlFlow"), n.enter("htmlFlowData"), n.consume(e), s1; + } + function s1(e) { + return e === 33 ? (n.consume(e), S) : e === 47 ? (n.consume(e), h) : e === 63 ? (n.consume(e), l = 3, t.interrupt ? u : O) : o(e) ? (n.consume(e), a = String.fromCharCode(e), o1 = !0, B) : r(e); + } + function S(e) { + return e === 45 ? (n.consume(e), l = 2, g) : e === 91 ? (n.consume(e), l = 5, a = "CDATA[", m = 0, c) : o(e) ? (n.consume(e), l = 4, t.interrupt ? u : O) : r(e); + } + function g(e) { + return e === 45 ? (n.consume(e), t.interrupt ? u : O) : r(e); + } + function c(e) { + return e === a.charCodeAt(m++) ? (n.consume(e), m === a.length ? t.interrupt ? u : b : c) : r(e); + } + function h(e) { + return o(e) ? (n.consume(e), a = String.fromCharCode(e), B) : r(e); + } + function B(e) { + return e === null || e === 47 || e === 62 || a2(e) ? e !== 47 && o1 && t1.includes(a.toLowerCase()) ? (l = 1, t.interrupt ? u(e) : b(e)) : e1.includes(a.toLowerCase()) ? (l = 6, e === 47 ? (n.consume(e), q) : t.interrupt ? u(e) : b(e)) : (l = 7, t.interrupt && !t.parser.lazy[t.now().line] ? r(e) : o1 ? C1(e) : z(e)) : e === 45 || C(e) ? (n.consume(e), a += String.fromCharCode(e), B) : r(e); + } + function q(e) { + return e === 62 ? (n.consume(e), t.interrupt ? u : b) : r(e); + } + function z(e) { + return s(e) ? (n.consume(e), z) : y(e); + } + function C1(e) { + return e === 47 ? (n.consume(e), y) : e === 58 || e === 95 || o(e) ? (n.consume(e), T) : s(e) ? (n.consume(e), C1) : y(e); + } + function T(e) { + return e === 45 || e === 46 || e === 58 || e === 95 || C(e) ? (n.consume(e), T) : A(e); + } + function A(e) { + return e === 61 ? (n.consume(e), I) : s(e) ? (n.consume(e), A) : C1(e); + } + function I(e) { + return e === null || e === 60 || e === 61 || e === 62 || e === 96 ? r(e) : e === 34 || e === 39 ? (n.consume(e), p1 = e, k) : s(e) ? (n.consume(e), I) : (p1 = null, D(e)); + } + function k(e) { + return e === null || p(e) ? r(e) : e === p1 ? (n.consume(e), F) : (n.consume(e), k); + } + function D(e) { + return e === null || e === 34 || e === 39 || e === 60 || e === 61 || e === 62 || e === 96 || a2(e) ? A(e) : (n.consume(e), D); + } + function F(e) { + return e === 47 || e === 62 || s(e) ? C1(e) : r(e); + } + function y(e) { + return e === 62 ? (n.consume(e), M) : r(e); + } + function M(e) { + return s(e) ? (n.consume(e), M) : e === null || p(e) ? b(e) : r(e); + } + function b(e) { + return e === 45 && l === 2 ? (n.consume(e), N) : e === 60 && l === 1 ? (n.consume(e), nn) : e === 62 && l === 4 ? (n.consume(e), E) : e === 63 && l === 3 ? (n.consume(e), O) : e === 93 && l === 5 ? (n.consume(e), L) : p(e) && (l === 6 || l === 7) ? n.check(jt, E, w)(e) : e === null || p(e) ? w(e) : (n.consume(e), b); + } + function w(e) { + return n.exit("htmlFlowData"), f(e); + } + function f(e) { + return e === null ? i(e) : p(e) ? n.attempt({ + tokenize: Q, + partial: !0 + }, f, i)(e) : (n.enter("htmlFlowData"), b(e)); + } + function Q(e, Cn, Tn) { + return An; + function An(X) { + return e.enter("lineEnding"), e.consume(X), e.exit("lineEnding"), In; + } + function In(X) { + return t.parser.lazy[t.now().line] ? Tn(X) : Cn(X); + } + } + function N(e) { + return e === 45 ? (n.consume(e), O) : b(e); + } + function nn(e) { + return e === 47 ? (n.consume(e), a = "", W) : b(e); + } + function W(e) { + return e === 62 && t1.includes(a.toLowerCase()) ? (n.consume(e), E) : o(e) && a.length < 8 ? (n.consume(e), a += String.fromCharCode(e), W) : b(e); + } + function L(e) { + return e === 93 ? (n.consume(e), O) : b(e); + } + function O(e) { + return e === 62 ? (n.consume(e), E) : e === 45 && l === 2 ? (n.consume(e), O) : b(e); + } + function E(e) { + return e === null || p(e) ? (n.exit("htmlFlowData"), i(e)) : (n.consume(e), E); + } + function i(e) { + return n.exit("htmlFlow"), u(e); + } +} +function Nt(n, u, r) { + return t; + function t(l) { + return n.exit("htmlFlowData"), n.enter("lineEndingBlank"), n.consume(l), n.exit("lineEndingBlank"), n.attempt(R, u, r); + } +} +var Ut = { + name: "htmlText", + tokenize: Gt +}; +function Gt(n, u, r) { + let t = this, l, o1, a, m; + return p2; + function p2(i) { + return n.enter("htmlText"), n.enter("htmlTextData"), n.consume(i), x; + } + function x(i) { + return i === 33 ? (n.consume(i), s1) : i === 47 ? (n.consume(i), D) : i === 63 ? (n.consume(i), I) : o(i) ? (n.consume(i), M) : r(i); + } + function s1(i) { + return i === 45 ? (n.consume(i), S) : i === 91 ? (n.consume(i), o1 = "CDATA[", a = 0, q) : o(i) ? (n.consume(i), A) : r(i); + } + function S(i) { + return i === 45 ? (n.consume(i), g) : r(i); + } + function g(i) { + return i === null || i === 62 ? r(i) : i === 45 ? (n.consume(i), c) : h(i); + } + function c(i) { + return i === null || i === 62 ? r(i) : h(i); + } + function h(i) { + return i === null ? r(i) : i === 45 ? (n.consume(i), B) : p(i) ? (m = h, L(i)) : (n.consume(i), h); + } + function B(i) { + return i === 45 ? (n.consume(i), E) : h(i); + } + function q(i) { + return i === o1.charCodeAt(a++) ? (n.consume(i), a === o1.length ? z : q) : r(i); + } + function z(i) { + return i === null ? r(i) : i === 93 ? (n.consume(i), C1) : p(i) ? (m = z, L(i)) : (n.consume(i), z); + } + function C1(i) { + return i === 93 ? (n.consume(i), T) : z(i); + } + function T(i) { + return i === 62 ? E(i) : i === 93 ? (n.consume(i), T) : z(i); + } + function A(i) { + return i === null || i === 62 ? E(i) : p(i) ? (m = A, L(i)) : (n.consume(i), A); + } + function I(i) { + return i === null ? r(i) : i === 63 ? (n.consume(i), k) : p(i) ? (m = I, L(i)) : (n.consume(i), I); + } + function k(i) { + return i === 62 ? E(i) : I(i); + } + function D(i) { + return o(i) ? (n.consume(i), F) : r(i); + } + function F(i) { + return i === 45 || C(i) ? (n.consume(i), F) : y(i); + } + function y(i) { + return p(i) ? (m = y, L(i)) : s(i) ? (n.consume(i), y) : E(i); + } + function M(i) { + return i === 45 || C(i) ? (n.consume(i), M) : i === 47 || i === 62 || a2(i) ? b(i) : r(i); + } + function b(i) { + return i === 47 ? (n.consume(i), E) : i === 58 || i === 95 || o(i) ? (n.consume(i), w) : p(i) ? (m = b, L(i)) : s(i) ? (n.consume(i), b) : E(i); + } + function w(i) { + return i === 45 || i === 46 || i === 58 || i === 95 || C(i) ? (n.consume(i), w) : f(i); + } + function f(i) { + return i === 61 ? (n.consume(i), Q) : p(i) ? (m = f, L(i)) : s(i) ? (n.consume(i), f) : b(i); + } + function Q(i) { + return i === null || i === 60 || i === 61 || i === 62 || i === 96 ? r(i) : i === 34 || i === 39 ? (n.consume(i), l = i, N) : p(i) ? (m = Q, L(i)) : s(i) ? (n.consume(i), Q) : (n.consume(i), l = void 0, W); + } + function N(i) { + return i === l ? (n.consume(i), nn) : i === null ? r(i) : p(i) ? (m = N, L(i)) : (n.consume(i), N); + } + function nn(i) { + return i === 62 || i === 47 || a2(i) ? b(i) : r(i); + } + function W(i) { + return i === null || i === 34 || i === 39 || i === 60 || i === 61 || i === 96 ? r(i) : i === 62 || a2(i) ? b(i) : (n.consume(i), W); + } + function L(i) { + return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(i), n.exit("lineEnding"), p1(n, O, "linePrefix", t.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4); + } + function O(i) { + return n.enter("htmlTextData"), m(i); + } + function E(i) { + return i === 62 ? (n.consume(i), n.exit("htmlTextData"), n.exit("htmlText"), u) : r(i); + } +} +var K = { + name: "labelEnd", + tokenize: er, + resolveTo: rr, + resolveAll: tr +}, vt = { + tokenize: ir +}, dt = { + tokenize: ur +}, nr = { + tokenize: ar +}; +function tr(n) { + let u = -1, r; + for(; ++u < n.length;)r = n[u][1], (r.type === "labelImage" || r.type === "labelLink" || r.type === "labelEnd") && (n.splice(u + 1, r.type === "labelImage" ? 4 : 2), r.type = "data", u++); + return n; +} +function rr(n, u) { + let r = n.length, t = 0, l, o, a, m; + for(; r--;)if (l = n[r][1], o) { + if (l.type === "link" || l.type === "labelLink" && l._inactive) break; + n[r][0] === "enter" && l.type === "labelLink" && (l._inactive = !0); + } else if (a) { + if (n[r][0] === "enter" && (l.type === "labelImage" || l.type === "labelLink") && !l._balanced && (o = r, l.type !== "labelLink")) { + t = 2; + break; + } + } else l.type === "labelEnd" && (a = r); + let p = { + type: n[o][1].type === "labelLink" ? "link" : "image", + start: Object.assign({}, n[o][1].start), + end: Object.assign({}, n[n.length - 1][1].end) + }, x = { + type: "label", + start: Object.assign({}, n[o][1].start), + end: Object.assign({}, n[a][1].end) + }, s = { + type: "labelText", + start: Object.assign({}, n[o + t + 2][1].end), + end: Object.assign({}, n[a - 2][1].start) + }; + return m = [ + [ + "enter", + p, + u + ], + [ + "enter", + x, + u + ] + ], m = g(m, n.slice(o + 1, o + t + 3)), m = g(m, [ + [ + "enter", + s, + u + ] + ]), m = g(m, c1(u.parser.constructs.insideSpan.null, n.slice(o + t + 4, a - 3), u)), m = g(m, [ + [ + "exit", + s, + u + ], + n[a - 2], + n[a - 1], + [ + "exit", + x, + u + ] + ]), m = g(m, n.slice(a + 1)), m = g(m, [ + [ + "exit", + p, + u + ] + ]), u1(n, o, n.length, m), n; +} +function er(n, u, r) { + let t = this, l = t.events.length, o, a; + for(; l--;)if ((t.events[l][1].type === "labelImage" || t.events[l][1].type === "labelLink") && !t.events[l][1]._balanced) { + o = t.events[l][1]; + break; + } + return m; + function m(s) { + return o ? o._inactive ? x(s) : (a = t.parser.defined.includes(r2(t.sliceSerialize({ + start: o.end, + end: t.now() + }))), n.enter("labelEnd"), n.enter("labelMarker"), n.consume(s), n.exit("labelMarker"), n.exit("labelEnd"), p) : r(s); + } + function p(s) { + return s === 40 ? n.attempt(vt, u, a ? u : x)(s) : s === 91 ? n.attempt(dt, u, a ? n.attempt(nr, u, x) : x)(s) : a ? u(s) : x(s); + } + function x(s) { + return o._balanced = !0, r(s); + } +} +function ir(n, u, r) { + return t; + function t(p) { + return n.enter("resource"), n.enter("resourceMarker"), n.consume(p), n.exit("resourceMarker"), f(n, l); + } + function l(p) { + return p === 41 ? m(p) : D1(n, o, r, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(p); + } + function o(p) { + return a2(p) ? f(n, a)(p) : m(p); + } + function a(p) { + return p === 34 || p === 39 || p === 40 ? w1(n, f(n, m), r, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(p) : m(p); + } + function m(p) { + return p === 41 ? (n.enter("resourceMarker"), n.consume(p), n.exit("resourceMarker"), n.exit("resource"), u) : r(p); + } +} +function ur(n, u, r) { + let t = this; + return l; + function l(a) { + return w.call(t, n, o, r, "reference", "referenceMarker", "referenceString")(a); + } + function o(a) { + return t.parser.defined.includes(r2(t.sliceSerialize(t.events[t.events.length - 1][1]).slice(1, -1))) ? u(a) : r(a); + } +} +function ar(n, u, r) { + return t; + function t(o) { + return n.enter("reference"), n.enter("referenceMarker"), n.consume(o), n.exit("referenceMarker"), l; + } + function l(o) { + return o === 93 ? (n.enter("referenceMarker"), n.consume(o), n.exit("referenceMarker"), n.exit("reference"), u) : r(o); + } +} +var lr = { + name: "labelStartImage", + tokenize: or, + resolveAll: K.resolveAll +}; +function or(n, u, r) { + let t = this; + return l; + function l(m) { + return n.enter("labelImage"), n.enter("labelImageMarker"), n.consume(m), n.exit("labelImageMarker"), o; + } + function o(m) { + return m === 91 ? (n.enter("labelMarker"), n.consume(m), n.exit("labelMarker"), n.exit("labelImage"), a) : r(m); + } + function a(m) { + return m === 94 && "_hiddenFootnoteSupport" in t.parser.constructs ? r(m) : u(m); + } +} +var mr = { + name: "labelStartLink", + tokenize: pr, + resolveAll: K.resolveAll +}; +function pr(n, u, r) { + let t = this; + return l; + function l(a) { + return n.enter("labelLink"), n.enter("labelMarker"), n.consume(a), n.exit("labelMarker"), n.exit("labelLink"), o; + } + function o(a) { + return a === 94 && "_hiddenFootnoteSupport" in t.parser.constructs ? r(a) : u(a); + } +} +var xr = { + name: "lineEnding", + tokenize: hr +}; +function hr(n, u) { + return r; + function r(t) { + return n.enter("lineEnding"), n.consume(t), n.exit("lineEnding"), p1(n, u, "linePrefix"); + } +} +var an = { + name: "thematicBreak", + tokenize: Sr +}; +function Sr(n, u, r) { + let t = 0, l; + return o; + function o(p) { + return n.enter("thematicBreak"), l = p, a(p); + } + function a(p2) { + return p2 === l ? (n.enter("thematicBreakSequence"), m(p2)) : s(p2) ? p1(n, a, "whitespace")(p2) : t < 3 || p2 !== null && !p(p2) ? r(p2) : (n.exit("thematicBreak"), u(p2)); + } + function m(p) { + return p === l ? (n.consume(p), t++, m) : (n.exit("thematicBreakSequence"), a(p)); + } +} +var Ln = { + name: "list", + tokenize: zr, + continuation: { + tokenize: yr + }, + exit: wr +}, br = { + tokenize: Lr, + partial: !0 +}, fr = { + tokenize: Er, + partial: !0 +}; +function zr(n, u, r1) { + let t = this, l = t.events[t.events.length - 1], o = l && l[1].type === "linePrefix" ? l[2].sliceSerialize(l[1], !0).length : 0, a = 0; + return m; + function m(c) { + let h = t.containerState.type || (c === 42 || c === 43 || c === 45 ? "listUnordered" : "listOrdered"); + if (h === "listUnordered" ? !t.containerState.marker || c === t.containerState.marker : r(c)) { + if (t.containerState.type || (t.containerState.type = h, n.enter(h, { + _container: !0 + })), h === "listUnordered") return n.enter("listItemPrefix"), c === 42 || c === 45 ? n.check(an, r1, x)(c) : x(c); + if (!t.interrupt || c === 49) return n.enter("listItemPrefix"), n.enter("listItemValue"), p(c); + } + return r1(c); + } + function p(c) { + return r(c) && ++a < 10 ? (n.consume(c), p) : (!t.interrupt || a < 2) && (t.containerState.marker ? c === t.containerState.marker : c === 41 || c === 46) ? (n.exit("listItemValue"), x(c)) : r1(c); + } + function x(c) { + return n.enter("listItemMarker"), n.consume(c), n.exit("listItemMarker"), t.containerState.marker = t.containerState.marker || c, n.check(R, t.interrupt ? r1 : s1, n.attempt(br, g, S)); + } + function s1(c) { + return t.containerState.initialBlankLine = !0, o++, g(c); + } + function S(c) { + return s(c) ? (n.enter("listItemPrefixWhitespace"), n.consume(c), n.exit("listItemPrefixWhitespace"), g) : r1(c); + } + function g(c) { + return t.containerState.size = o + t.sliceSerialize(n.exit("listItemPrefix"), !0).length, u(c); + } +} +function yr(n, u, r) { + let t = this; + return t.containerState._closeFlow = void 0, n.check(R, l, o); + function l(m) { + return t.containerState.furtherBlankLines = t.containerState.furtherBlankLines || t.containerState.initialBlankLine, p1(n, u, "listItemIndent", t.containerState.size + 1)(m); + } + function o(m) { + return t.containerState.furtherBlankLines || !s(m) ? (t.containerState.furtherBlankLines = void 0, t.containerState.initialBlankLine = void 0, a(m)) : (t.containerState.furtherBlankLines = void 0, t.containerState.initialBlankLine = void 0, n.attempt(fr, u, a)(m)); + } + function a(m) { + return t.containerState._closeFlow = !0, t.interrupt = void 0, p1(n, n.attempt(Ln, u, r), "linePrefix", t.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(m); + } +} +function Er(n, u, r) { + let t = this; + return p1(n, l, "listItemIndent", t.containerState.size + 1); + function l(o) { + let a = t.events[t.events.length - 1]; + return a && a[1].type === "listItemIndent" && a[2].sliceSerialize(a[1], !0).length === t.containerState.size ? u(o) : r(o); + } +} +function wr(n) { + n.exit(this.containerState.type); +} +function Lr(n, u, r) { + let t = this; + return p1(n, l, "listItemPrefixWhitespace", t.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 + 1); + function l(o) { + let a = t.events[t.events.length - 1]; + return !s(o) && a && a[1].type === "listItemPrefixWhitespace" ? u(o) : r(o); + } +} +var Ar = { + name: "setextUnderline", + tokenize: Fr, + resolveTo: Ir +}; +function Ir(n, u) { + let r = n.length, t, l, o; + for(; r--;)if (n[r][0] === "enter") { + if (n[r][1].type === "content") { + t = r; + break; + } + n[r][1].type === "paragraph" && (l = r); + } else n[r][1].type === "content" && n.splice(r, 1), !o && n[r][1].type === "definition" && (o = r); + let a = { + type: "setextHeading", + start: Object.assign({}, n[l][1].start), + end: Object.assign({}, n[n.length - 1][1].end) + }; + return n[l][1].type = "setextHeadingText", o ? (n.splice(l, 0, [ + "enter", + a, + u + ]), n.splice(o + 1, 0, [ + "exit", + n[t][1], + u + ]), n[t][1].end = Object.assign({}, n[o][1].end)) : n[t][1] = a, n.push([ + "exit", + a, + u + ]), n; +} +function Fr(n, u, r) { + let t = this, l = t.events.length, o, a; + for(; l--;)if (t.events[l][1].type !== "lineEnding" && t.events[l][1].type !== "linePrefix" && t.events[l][1].type !== "content") { + a = t.events[l][1].type === "paragraph"; + break; + } + return m; + function m(s) { + return !t.parser.lazy[t.now().line] && (t.interrupt || a) ? (n.enter("setextHeadingLine"), n.enter("setextHeadingLineSequence"), o = s, p2(s)) : r(s); + } + function p2(s) { + return s === o ? (n.consume(s), p2) : (n.exit("setextHeadingLineSequence"), p1(n, x, "lineSuffix")(s)); + } + function x(s) { + return s === null || p(s) ? (n.exit("setextHeadingLine"), u(s)) : r(s); + } +} +var kn = Object.defineProperty; +var wn = (t, e)=>{ + for(var r in e)kn(t, r, { + get: e[r], + enumerable: !0 + }); +}; +var Z = { + tokenize: Cn +}; +function Cn(t) { + let e = t.attempt(this.parser.constructs.contentInitial, n, i), r; + return e; + function n(a) { + if (a === null) { + t.consume(a); + return; + } + return t.enter("lineEnding"), t.consume(a), t.exit("lineEnding"), p1(t, e, "linePrefix"); + } + function i(a) { + return t.enter("paragraph"), o(a); + } + function o(a) { + let p = t.enter("chunkText", { + contentType: "text", + previous: r + }); + return r && (r.next = p), r = p, l(a); + } + function l(a) { + if (a === null) { + t.exit("chunkText"), t.exit("paragraph"), t.consume(a); + return; + } + return p(a) ? (t.consume(a), t.exit("chunkText"), o) : (t.consume(a), l); + } +} +var tn = { + tokenize: Sn +}, nn = { + tokenize: _n1 +}; +function Sn(t) { + let e = this, r = [], n = 0, i, o, l; + return a; + function a(s) { + if (n < r.length) { + let h = r[n]; + return e.containerState = h[1], t.attempt(h[0].continuation, p1, d)(s); + } + return d(s); + } + function p1(s) { + if (n++, e.containerState._closeFlow) { + e.containerState._closeFlow = void 0, i && B(); + let h = e.events.length, g = h, m; + for(; g--;)if (e.events[g][0] === "exit" && e.events[g][1].type === "chunkFlow") { + m = e.events[g][1].end; + break; + } + _(n); + let w = h; + for(; w < e.events.length;)e.events[w][1].end = Object.assign({}, m), w++; + return u1(e.events, g + 1, 0, e.events.slice(h)), e.events.length = w, d(s); + } + return a(s); + } + function d(s) { + if (n === r.length) { + if (!i) return C(s); + if (i.currentConstruct && i.currentConstruct.concrete) return T(s); + e.interrupt = Boolean(i.currentConstruct && !i._gfmTableDynamicInterruptHack); + } + return e.containerState = {}, t.check(nn, u, b)(s); + } + function u(s) { + return i && B(), _(n), C(s); + } + function b(s) { + return e.parser.lazy[e.now().line] = n !== r.length, l = e.now().offset, T(s); + } + function C(s) { + return e.containerState = {}, t.attempt(nn, z, T)(s); + } + function z(s) { + return n++, r.push([ + e.currentConstruct, + e.containerState + ]), C(s); + } + function T(s) { + if (s === null) { + i && B(), _(0), t.consume(s); + return; + } + return i = i || e.parser.flow(e.now()), t.enter("chunkFlow", { + contentType: "flow", + previous: o, + _tokenizer: i + }), F(s); + } + function F(s) { + if (s === null) { + S(t.exit("chunkFlow"), !0), _(0), t.consume(s); + return; + } + return p(s) ? (t.consume(s), S(t.exit("chunkFlow")), n = 0, e.interrupt = void 0, a) : (t.consume(s), F); + } + function S(s, h) { + let g = e.sliceStream(s); + if (h && g.push(null), s.previous = o, o && (o.next = s), o = s, i.defineSkip(s.start), i.write(g), e.parser.lazy[s.start.line]) { + let m = i.events.length; + for(; m--;)if (i.events[m][1].start.offset < l && (!i.events[m][1].end || i.events[m][1].end.offset > l)) return; + let w = e.events.length, I = w, A, O; + for(; I--;)if (e.events[I][0] === "exit" && e.events[I][1].type === "chunkFlow") { + if (A) { + O = e.events[I][1].end; + break; + } + A = !0; + } + for(_(n), m = w; m < e.events.length;)e.events[m][1].end = Object.assign({}, O), m++; + u1(e.events, I + 1, 0, e.events.slice(w)), e.events.length = m; + } + } + function _(s) { + let h = r.length; + for(; (h--) > s;){ + let g = r[h]; + e.containerState = g[1], g[0].exit.call(e, t); + } + r.length = s; + } + function B() { + i.write([ + null + ]), o = void 0, i = void 0, e.containerState._closeFlow = void 0; + } +} +function _n1(t, e, r) { + return p1(t, t.attempt(this.parser.constructs.document, e, r), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4); +} +var en = { + tokenize: Tn +}; +function Tn(t) { + let e = this, r = t.attempt(R, n, t.attempt(this.parser.constructs.flowInitial, i, p1(t, t.attempt(this.parser.constructs.flow, i, t.attempt(ht, i)), "linePrefix"))); + return r; + function n(o) { + if (o === null) { + t.consume(o); + return; + } + return t.enter("lineEndingBlank"), t.consume(o), t.exit("lineEndingBlank"), e.currentConstruct = void 0, r; + } + function i(o) { + if (o === null) { + t.consume(o); + return; + } + return t.enter("lineEnding"), t.consume(o), t.exit("lineEnding"), e.currentConstruct = void 0, r; + } +} +var rn = { + resolveAll: sn1() +}, on = ln("string"), un = ln("text"); +function ln(t) { + return { + tokenize: e, + resolveAll: sn1(t === "text" ? Fn : void 0) + }; + function e(r) { + let n = this, i = this.parser.constructs[t], o = r.attempt(i, l, a); + return l; + function l(u) { + return d(u) ? o(u) : a(u); + } + function a(u) { + if (u === null) { + r.consume(u); + return; + } + return r.enter("data"), r.consume(u), p; + } + function p(u) { + return d(u) ? (r.exit("data"), o(u)) : (r.consume(u), p); + } + function d(u) { + if (u === null) return !0; + let b = i[u], C = -1; + if (b) for(; ++C < b.length;){ + let z = b[C]; + if (!z.previous || z.previous.call(n, n.previous)) return !0; + } + return !1; + } + } +} +function sn1(t) { + return e; + function e(r, n) { + let i = -1, o; + for(; ++i <= r.length;)o === void 0 ? r[i] && r[i][1].type === "data" && (o = i, i++) : (!r[i] || r[i][1].type !== "data") && (i !== o + 2 && (r[o][1].end = r[i - 1][1].end, r.splice(o + 2, i - o - 2), i = o + 2), o = void 0); + return t ? t(r, n) : r; + } +} +function Fn(t, e) { + let r = 0; + for(; ++r <= t.length;)if ((r === t.length || t[r][1].type === "lineEnding") && t[r - 1][1].type === "data") { + let n = t[r - 1][1], i = e.sliceStream(n), o = i.length, l = -1, a = 0, p; + for(; o--;){ + let d = i[o]; + if (typeof d == "string") { + for(l = d.length; d.charCodeAt(l - 1) === 32;)a++, l--; + if (l) break; + l = -1; + } else if (d === -2) p = !0, a++; + else if (d !== -1) { + o++; + break; + } + } + if (a) { + let d1 = { + type: r === t.length || p || a < 2 ? "lineSuffix" : "hardBreakTrailing", + start: { + line: n.end.line, + column: n.end.column - a, + offset: n.end.offset - a, + _index: n.start._index + o, + _bufferIndex: o ? l : n.start._bufferIndex + l + }, + end: Object.assign({}, n.end) + }; + n.end = Object.assign({}, d1.start), n.start.offset === n.end.offset ? Object.assign(n, d1) : (t.splice(r, 0, [ + "enter", + d1, + e + ], [ + "exit", + d1, + e + ]), r += 2); + } + r++; + } + return t; +} +function cn(t, e, r) { + let n = Object.assign(r ? Object.assign({}, r) : { + line: 1, + column: 1, + offset: 0 + }, { + _index: 0, + _bufferIndex: -1 + }), i = {}, o = [], l = [], a = [], d = { + consume: h, + enter: g1, + exit: m, + attempt: A(w), + check: A(I), + interrupt: A(I, { + interrupt: !0 + }) + }, u = { + previous: null, + code: null, + containerState: {}, + events: [], + parser: t, + sliceStream: F, + sliceSerialize: T, + now: S, + defineSkip: _, + write: z + }, b = e.tokenize.call(u, d); + return e.resolveAll && o.push(e), u; + function z(c) { + return l = g(l, c), B(), l[l.length - 1] !== null ? [] : (O(e, 0), u.events = c1(o, u.events, u), u.events); + } + function T(c, f) { + return Nn(F(c), f); + } + function F(c) { + return Pn1(l, c); + } + function S() { + return Object.assign({}, n); + } + function _(c) { + i[c.line] = c.column, D(); + } + function B() { + let c; + for(; n._index < l.length;){ + let f = l[n._index]; + if (typeof f == "string") for(c = n._index, n._bufferIndex < 0 && (n._bufferIndex = 0); n._index === c && n._bufferIndex < f.length;)s(f.charCodeAt(n._bufferIndex)); + else s(f); + } + } + function s(c) { + c, b = b(c); + } + function h(c) { + p(c) ? (n.line++, n.column = 1, n.offset += c === -3 ? 2 : 1, D()) : c !== -1 && (n.column++, n.offset++), n._bufferIndex < 0 ? n._index++ : (n._bufferIndex++, n._bufferIndex === l[n._index].length && (n._bufferIndex = -1, n._index++)), u.previous = c, !0; + } + function g1(c, f) { + let v = f || {}; + return v.type = c, v.start = S(), u.events.push([ + "enter", + v, + u + ]), a.push(v), v; + } + function m(c) { + let f = a.pop(); + return f.end = S(), u.events.push([ + "exit", + f, + u + ]), f; + } + function w(c, f) { + O(c, f.from); + } + function I(c, f) { + f.restore(); + } + function A(c, f) { + return v; + function v(y, M, j) { + let R, L, W, H; + return Array.isArray(y) ? Q(y) : "tokenize" in y ? Q([ + y + ]) : mn(y); + function mn(x) { + return U; + function U(E) { + let P = E !== null && x[E], N = E !== null && x.null, gn = [ + ...Array.isArray(P) ? P : P ? [ + P + ] : [], + ...Array.isArray(N) ? N : N ? [ + N + ] : [] + ]; + return Q(gn)(E); + } + } + function Q(x) { + return R = x, L = 0, x.length === 0 ? j : X(x[L]); + } + function X(x) { + return U; + function U(E) { + return H = xn(), W = x, x.partial || (u.currentConstruct = x), x.name && u.parser.constructs.disable.null.includes(x.name) ? Y(E) : x.tokenize.call(f ? Object.assign(Object.create(u), f) : u, d, hn, Y)(E); + } + } + function hn(x) { + return !0, c(W, H), M; + } + function Y(x) { + return !0, H.restore(), ++L < R.length ? X(R[L]) : j; + } + } + } + function O(c, f) { + c.resolveAll && !o.includes(c) && o.push(c), c.resolve && u1(u.events, f, u.events.length - f, c.resolve(u.events.slice(f), u)), c.resolveTo && (u.events = c.resolveTo(u.events, u)); + } + function xn() { + let c = S(), f = u.previous, v = u.currentConstruct, y = u.events.length, M = Array.from(a); + return { + restore: j, + from: y + }; + function j() { + n = c, u.previous = f, u.currentConstruct = v, u.events.length = y, a = M, D(); + } + } + function D() { + n.line in i && n.column < 2 && (n.column = i[n.line], n.offset += i[n.line] - 1); + } +} +function Pn1(t, e) { + let r = e.start._index, n = e.start._bufferIndex, i = e.end._index, o = e.end._bufferIndex, l; + return r === i ? l = [ + t[r].slice(n, o) + ] : (l = t.slice(r, i), n > -1 && (l[0] = l[0].slice(n)), o > 0 && l.push(t[i].slice(0, o))), l; +} +function Nn(t, e) { + let r = -1, n = [], i; + for(; ++r < t.length;){ + let o = t[r], l; + if (typeof o == "string") l = o; + else switch(o){ + case -5: + { + l = "\r"; + break; + } + case -4: + { + l = ` +`; + break; + } + case -3: + { + l = `\r +`; + break; + } + case -2: + { + l = e ? " " : " "; + break; + } + case -1: + { + if (!e && i) continue; + l = " "; + break; + } + default: + l = String.fromCharCode(o); + } + i = o === -2, n.push(l); + } + return n.join(""); +} +var V = {}; +wn(V, { + attentionMarkers: ()=>et1, + contentInitial: ()=>Xn1, + disable: ()=>rt1, + document: ()=>Wn1, + flow: ()=>Zn, + flowInitial: ()=>Yn, + insideSpan: ()=>tt1, + string: ()=>$n, + text: ()=>nt +}); +var Wn1 = { + [42]: Ln, + [43]: Ln, + [45]: Ln, + [48]: Ln, + [49]: Ln, + [50]: Ln, + [51]: Ln, + [52]: Ln, + [53]: Ln, + [54]: Ln, + [55]: Ln, + [56]: Ln, + [57]: Ln, + [62]: sn +}, Xn1 = { + [91]: wt +}, Yn = { + [-2]: et, + [-1]: et, + [32]: et +}, Zn = { + [35]: qt, + [42]: an, + [45]: [ + Ar, + an + ], + [60]: Vt, + [61]: Ar, + [95]: an, + [96]: tt, + [126]: tt +}, $n = { + [38]: vn, + [92]: Kn +}, nt = { + [-5]: xr, + [-4]: xr, + [-3]: xr, + [33]: lr, + [38]: vn, + [42]: On, + [60]: [ + Rn, + Ut + ], + [91]: mr, + [92]: [ + It, + Kn + ], + [93]: K, + [95]: On, + [96]: lt +}, tt1 = { + null: [ + On, + rn + ] +}, et1 = { + null: [ + 42, + 95 + ] +}, rt1 = { + null: [] +}; +function Ft1(t = {}) { + let e = y([ + V + ].concat(t.extensions || [])), r = { + defined: [], + lazy: {}, + constructs: e, + content: n(Z), + document: n(tn), + flow: n(en), + string: n(on), + text: n(un) + }; + return r; + function n(i) { + return o; + function o(l) { + return cn(r, i, l); + } + } +} +var d = /[\0\t\n\r]/g; +function x1() { + let i = 1, c = "", u = !0, r; + return p; + function p(n, l, a) { + let e = [], h, o, t, s, f; + for(n = c + n.toString(l), t = 0, c = "", u && (n.charCodeAt(0) === 65279 && t++, u = void 0); t < n.length;){ + if (d.lastIndex = t, h = d.exec(n), s = h && h.index !== void 0 ? h.index : n.length, f = n.charCodeAt(s), !h) { + c = n.slice(t); + break; + } + if (f === 10 && t === s && r) e.push(-3), r = void 0; + else switch(r && (e.push(-5), r = void 0), t < s && (e.push(n.slice(t, s)), i += s - t), f){ + case 0: + { + e.push(65533), i++; + break; + } + case 9: + { + for(o = Math.ceil(i / 4) * 4, e.push(-2); (i++) < o;)e.push(-1); + break; + } + case 10: + { + e.push(-4), i = 1; + break; + } + default: + r = !0, i = 1; + } + t = s + 1; + } + return a && (r && e.push(-5), c && e.push(c), e.push(null)), e; + } +} +function e2(o) { + for(; !I(o);); + return o; +} +function t2(r, n) { + let e = Number.parseInt(r, n); + return e < 9 || e === 11 || e > 13 && e < 32 || e > 126 && e < 160 || e > 55295 && e < 57344 || e > 64975 && e < 65008 || (e & 65535) === 65535 || (e & 65535) === 65534 || e > 1114111 ? "\uFFFD" : String.fromCharCode(e); +} +var n2 = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; +function m(r) { + return r.replace(n2, f1); +} +function f1(r, c, e) { + if (c) return c; + if (e.charCodeAt(0) === 35) { + let t = e.charCodeAt(1), d = t === 120 || t === 88; + return t2(e.slice(d ? 2 : 1), d ? 16 : 10); + } + return n1(e) || r; +} +function o1(n) { + return !n || typeof n != "object" ? "" : "position" in n || "type" in n ? t3(n.position) : "start" in n || "end" in n ? t3(n) : "line" in n || "column" in n ? i(n) : ""; +} +function i(n) { + return r3(n && n.line) + ":" + r3(n && n.column); +} +function t3(n) { + return i(n && n.start) + "-" + i(n && n.end); +} +function r3(n) { + return n && typeof n == "number" ? n : 1; +} +var B1 = {}.hasOwnProperty, Pe = function(h, s, d) { + return typeof s != "string" && (d = s, s = void 0), Me(d)(e2(Ft1(d).document().write(x1()(h, s, !0)))); +}; +function Me(h = {}) { + let s = N({ + transforms: [], + canContainEols: [ + "emphasis", + "fragment", + "heading", + "paragraph", + "strong" + ], + enter: { + autolink: a(V), + autolinkProtocol: m1, + autolinkEmail: m1, + atxHeading: a(O), + blockQuote: a(xe), + characterEscape: m1, + characterReference: m1, + codeFenced: a(D), + codeFencedFenceInfo: p, + codeFencedFenceMeta: p, + codeIndented: a(D, p), + codeText: a(ye, p), + codeTextData: m1, + data: m1, + codeFlowValue: m1, + definition: a(Se), + definitionDestinationString: p, + definitionLabelString: p, + definitionTitleString: p, + emphasis: a(be), + hardBreakEscape: a(P), + hardBreakTrailing: a(P), + htmlFlow: a(M, p), + htmlFlowData: m1, + htmlText: a(M, p), + htmlTextData: m1, + image: a(we), + label: p, + link: a(V), + listItem: a(Ie), + listItemValue: j, + listOrdered: a(Q, _), + listUnordered: a(Q), + paragraph: a(Te), + reference: fe, + referenceString: p, + resourceDestinationString: p, + resourceTitleString: p, + setextHeading: a(O), + strong: a(Ee), + thematicBreak: a(Be) + }, + exit: { + atxHeading: c(), + atxHeadingSequence: Z, + autolink: c(), + autolinkEmail: ke, + autolinkProtocol: me, + blockQuote: c(), + characterEscapeValue: k, + characterReferenceMarkerHexadecimal: z, + characterReferenceMarkerNumeric: z, + characterReferenceValue: ge, + codeFenced: c(G), + codeFencedFence: $, + codeFencedFenceInfo: A, + codeFencedFenceMeta: W, + codeFlowValue: k, + codeIndented: c(J), + codeText: c(se), + codeTextData: k, + data: k, + definition: c(), + definitionDestinationString: Y, + definitionLabelString: K, + definitionTitleString: X, + emphasis: c(), + hardBreakEscape: c(L), + hardBreakTrailing: c(L), + htmlFlow: c(ie), + htmlFlowData: k, + htmlText: c(re), + htmlTextData: k, + image: c(ce), + label: oe, + labelText: le, + lineEnding: ne, + link: c(ae), + listItem: c(), + listOrdered: c(), + listUnordered: c(), + paragraph: c(), + referenceString: pe, + resourceDestinationString: de, + resourceTitleString: he, + resource: ue, + setextHeading: c(te), + setextHeadingLineSequence: ee, + setextHeadingText: v, + strong: c(), + thematicBreak: c() + } + }, h.mdastExtensions || []), d = {}; + return y; + function y(e) { + let t = { + type: "root", + children: [] + }, n = [ + t + ], i = [], g = [], w = { + stack: n, + tokenStack: i, + config: s, + enter: R, + exit: H, + buffer: p, + resume: U, + setData: o, + getData: f + }, r = -1; + for(; ++r < e.length;)if (e[r][1].type === "listOrdered" || e[r][1].type === "listUnordered") if (e[r][0] === "enter") g.push(r); + else { + let u = g.pop(); + r = C(e, u, r); + } + for(r = -1; ++r < e.length;){ + let u1 = s[e[r][0]]; + B1.call(u1, e[r][1].type) && u1[e[r][1].type].call(Object.assign({ + sliceSerialize: e[r][2].sliceSerialize + }, w), e[r][1]); + } + if (i.length > 0) { + let u2 = i[i.length - 1]; + (u2[1] || q).call(w, void 0, u2[0]); + } + for(t.position = { + start: S(e.length > 0 ? e[0][1].start : { + line: 1, + column: 1, + offset: 0 + }), + end: S(e.length > 0 ? e[e.length - 2][1].end : { + line: 1, + column: 1, + offset: 0 + }) + }, r = -1; ++r < s.transforms.length;)t = s.transforms[r](t) || t; + return t; + } + function C(e, t, n) { + let i = t - 1, g = -1, w = !1, r, u, b, I; + for(; ++i <= n;){ + let l = e[i]; + if (l[1].type === "listUnordered" || l[1].type === "listOrdered" || l[1].type === "blockQuote" ? (l[0] === "enter" ? g++ : g--, I = void 0) : l[1].type === "lineEndingBlank" ? l[0] === "enter" && (r && !I && !g && !b && (b = i), I = void 0) : l[1].type === "linePrefix" || l[1].type === "listItemValue" || l[1].type === "listItemMarker" || l[1].type === "listItemPrefix" || l[1].type === "listItemPrefixWhitespace" || (I = void 0), !g && l[0] === "enter" && l[1].type === "listItemPrefix" || g === -1 && l[0] === "exit" && (l[1].type === "listUnordered" || l[1].type === "listOrdered")) { + if (r) { + let E = i; + for(u = void 0; E--;){ + let x = e[E]; + if (x[1].type === "lineEnding" || x[1].type === "lineEndingBlank") { + if (x[0] === "exit") continue; + u && (e[u][1].type = "lineEndingBlank", w = !0), x[1].type = "lineEnding", u = E; + } else if (!(x[1].type === "linePrefix" || x[1].type === "blockQuotePrefix" || x[1].type === "blockQuotePrefixWhitespace" || x[1].type === "blockQuoteMarker" || x[1].type === "listItemIndent")) break; + } + b && (!u || b < u) && (r._spread = !0), r.end = Object.assign({}, u ? e[u][1].start : l[1].end), e.splice(u || i, 0, [ + "exit", + r, + l[2] + ]), i++, n++; + } + l[1].type === "listItemPrefix" && (r = { + type: "listItem", + _spread: !1, + start: Object.assign({}, l[1].start) + }, e.splice(i, 0, [ + "enter", + r, + l[2] + ]), i++, n++, b = void 0, I = !0); + } + } + return e[t][1]._spread = w, n; + } + function o(e, t) { + d[e] = t; + } + function f(e) { + return d[e]; + } + function S(e) { + return { + line: e.line, + column: e.column, + offset: e.offset + }; + } + function a(e, t) { + return n; + function n(i) { + R.call(this, e(i), i), t && t.call(this, i); + } + } + function p() { + this.stack.push({ + type: "fragment", + children: [] + }); + } + function R(e, t, n) { + return this.stack[this.stack.length - 1].children.push(e), this.stack.push(e), this.tokenStack.push([ + t, + n + ]), e.position = { + start: S(t.start) + }, e; + } + function c(e) { + return t; + function t(n) { + e && e.call(this, n), H.call(this, n); + } + } + function H(e, t) { + let n = this.stack.pop(), i = this.tokenStack.pop(); + if (i) i[0].type !== e.type && (t ? t.call(this, e, i[0]) : (i[1] || q).call(this, e, i[0])); + else throw new Error("Cannot close `" + e.type + "` (" + o1({ + start: e.start, + end: e.end + }) + "): it\u2019s not open"); + return n.position.end = S(e.end), n; + } + function U() { + return l(this.stack.pop()); + } + function _() { + o("expectingFirstListItemValue", !0); + } + function j(e) { + if (f("expectingFirstListItemValue")) { + let t = this.stack[this.stack.length - 2]; + t.start = Number.parseInt(this.sliceSerialize(e), 10), o("expectingFirstListItemValue"); + } + } + function A() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.lang = e; + } + function W() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.meta = e; + } + function $() { + f("flowCodeInside") || (this.buffer(), o("flowCodeInside", !0)); + } + function G() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.value = e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), o("flowCodeInside"); + } + function J() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.value = e.replace(/(\r?\n|\r)$/g, ""); + } + function K(e) { + let t = this.resume(), n = this.stack[this.stack.length - 1]; + n.label = t, n.identifier = r2(this.sliceSerialize(e)).toLowerCase(); + } + function X() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.title = e; + } + function Y() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.url = e; + } + function Z(e) { + let t = this.stack[this.stack.length - 1]; + if (!t.depth) { + let n = this.sliceSerialize(e).length; + t.depth = n; + } + } + function v() { + o("setextHeadingSlurpLineEnding", !0); + } + function ee(e) { + let t = this.stack[this.stack.length - 1]; + t.depth = this.sliceSerialize(e).charCodeAt(0) === 61 ? 1 : 2; + } + function te() { + o("setextHeadingSlurpLineEnding"); + } + function m1(e) { + let t = this.stack[this.stack.length - 1], n = t.children[t.children.length - 1]; + (!n || n.type !== "text") && (n = Fe(), n.position = { + start: S(e.start) + }, t.children.push(n)), this.stack.push(n); + } + function k(e) { + let t = this.stack.pop(); + t.value += this.sliceSerialize(e), t.position.end = S(e.end); + } + function ne(e) { + let t = this.stack[this.stack.length - 1]; + if (f("atHardBreak")) { + let n = t.children[t.children.length - 1]; + n.position.end = S(e.end), o("atHardBreak"); + return; + } + !f("setextHeadingSlurpLineEnding") && s.canContainEols.includes(t.type) && (m1.call(this, e), k.call(this, e)); + } + function L() { + o("atHardBreak", !0); + } + function ie() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.value = e; + } + function re() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.value = e; + } + function se() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.value = e; + } + function ae() { + let e = this.stack[this.stack.length - 1]; + f("inReference") ? (e.type += "Reference", e.referenceType = f("referenceType") || "shortcut", delete e.url, delete e.title) : (delete e.identifier, delete e.label), o("referenceType"); + } + function ce() { + let e = this.stack[this.stack.length - 1]; + f("inReference") ? (e.type += "Reference", e.referenceType = f("referenceType") || "shortcut", delete e.url, delete e.title) : (delete e.identifier, delete e.label), o("referenceType"); + } + function le(e) { + let t = this.stack[this.stack.length - 2], n = this.sliceSerialize(e); + t.label = m(n), t.identifier = r2(n).toLowerCase(); + } + function oe() { + let e = this.stack[this.stack.length - 1], t = this.resume(), n = this.stack[this.stack.length - 1]; + o("inReference", !0), n.type === "link" ? n.children = e.children : n.alt = t; + } + function de() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.url = e; + } + function he() { + let e = this.resume(), t = this.stack[this.stack.length - 1]; + t.title = e; + } + function ue() { + o("inReference"); + } + function fe() { + o("referenceType", "collapsed"); + } + function pe(e) { + let t = this.resume(), n = this.stack[this.stack.length - 1]; + n.label = t, n.identifier = r2(this.sliceSerialize(e)).toLowerCase(), o("referenceType", "full"); + } + function z(e) { + o("characterReferenceType", e.type); + } + function ge(e) { + let t = this.sliceSerialize(e), n = f("characterReferenceType"), i; + n ? (i = t2(t, n === "characterReferenceMarkerNumeric" ? 10 : 16), o("characterReferenceType")) : i = n1(t); + let g = this.stack.pop(); + g.value += i, g.position.end = S(e.end); + } + function me(e) { + k.call(this, e); + let t = this.stack[this.stack.length - 1]; + t.url = this.sliceSerialize(e); + } + function ke(e) { + k.call(this, e); + let t = this.stack[this.stack.length - 1]; + t.url = "mailto:" + this.sliceSerialize(e); + } + function xe() { + return { + type: "blockquote", + children: [] + }; + } + function D() { + return { + type: "code", + lang: null, + meta: null, + value: "" + }; + } + function ye() { + return { + type: "inlineCode", + value: "" + }; + } + function Se() { + return { + type: "definition", + identifier: "", + label: null, + title: null, + url: "" + }; + } + function be() { + return { + type: "emphasis", + children: [] + }; + } + function O() { + return { + type: "heading", + depth: void 0, + children: [] + }; + } + function P() { + return { + type: "break" + }; + } + function M() { + return { + type: "html", + value: "" + }; + } + function we() { + return { + type: "image", + title: null, + url: "", + alt: null + }; + } + function V() { + return { + type: "link", + title: null, + url: "", + children: [] + }; + } + function Q(e) { + return { + type: "list", + ordered: e.type === "listOrdered", + start: null, + spread: e._spread, + children: [] + }; + } + function Ie(e) { + return { + type: "listItem", + spread: e._spread, + checked: null, + children: [] + }; + } + function Te() { + return { + type: "paragraph", + children: [] + }; + } + function Ee() { + return { + type: "strong", + children: [] + }; + } + function Fe() { + return { + type: "text", + value: "" + }; + } + function Be() { + return { + type: "thematicBreak" + }; + } +} +function N(h, s) { + let d = -1; + for(; ++d < s.length;){ + let y = s[d]; + Array.isArray(y) ? N(h, y) : Ve(h, y); + } + return h; +} +function Ve(h, s) { + let d; + for(d in s)if (B1.call(s, d)) { + let y = d === "canContainEols" || d === "transforms", o = (B1.call(h, d) ? h[d] : void 0) || (h[d] = y ? [] : {}), f = s[d]; + f && (y ? h[d] = [ + ...o, + ...f + ] : Object.assign(o, f)); + } +} +function q(h, s) { + throw h ? new Error("Cannot close `" + h.type + "` (" + o1({ + start: h.start, + end: h.end + }) + "): a different token (`" + s.type + "`, " + o1({ + start: s.start, + end: s.end + }) + ") is open") : new Error("Cannot close document, a token (`" + s.type + "`, " + o1({ + start: s.start, + end: s.end + }) + ") is still open"); +} +function g1(u) { + let l = u || {}, i = l.now || {}, e = l.lineShift || 0, c = i.line || 1, o = i.column || 1; + return { + move: f, + current: h, + shift: s + }; + function h() { + return { + now: { + line: c, + column: o + }, + lineShift: e + }; + } + function s(n) { + e += n; + } + function f(n = "") { + let t = n.split(/\r?\n|\r/g), r = t[t.length - 1]; + return c += t.length - 1, o = t.length === 1 ? o + r.length : 1 + r.length + e, n; + } +} +function k(d, n, i) { + let a = n.indexStack, t = d.children || [], e = [], r = -1, h = i.before; + a.push(-1); + let c = g1(i); + for(; ++r < t.length;){ + let f = t[r], o; + if (a[a.length - 1] = r, r + 1 < t.length) { + let l = n.handle.handlers[t[r + 1].type]; + l && l.peek && (l = l.peek), o = l ? l(t[r + 1], d, n, { + before: "", + after: "", + ...c.current() + }).charAt(0) : ""; + } else o = i.after; + e.length > 0 && (h === "\r" || h === ` +`) && f.type === "html" && (e[e.length - 1] = e[e.length - 1].replace(/(\r?\n|\r)$/, " "), h = " ", c = g1(i), c.move(e.join(""))), e.push(c.move(n.handle(f, d, n, { + ...c.current(), + before: h, + after: o + }))), h = e[e.length - 1].slice(-1); + } + return a.pop(), e.join(""); +} +var m1 = { + canContainEols: [ + "delete" + ], + enter: { + strikethrough: s1 + }, + exit: { + strikethrough: u2 + } +}, p2 = { + unsafe: [ + { + character: "~", + inConstruct: "phrasing" + } + ], + handlers: { + delete: o2 + } +}; +o2.peek = k1; +function s1(e) { + this.enter({ + type: "delete", + children: [] + }, e); +} +function u2(e) { + this.exit(e); +} +function o2(e, f, n, i) { + let r = g1(i), h = n.enter("emphasis"), t = r.move("~~"); + return t += k(e, n, { + ...r.current(), + before: t, + after: "~" + }), t += r.move("~~"), h(), t; +} +function k1() { + return "~"; +} +export { m1 as gfmStrikethroughFromMarkdown, p2 as gfmStrikethroughToMarkdown }; +({ + enter: { + strikethrough () { + this.tag(""); + } + }, + exit: { + strikethrough () { + this.tag(""); + } + } +}); +function x2(m = {}) { + let l = m.singleTilde, p = { + tokenize: S, + resolveAll: y + }; + return l == null && (l = !0), { + text: { + [126]: p + }, + insideSpan: { + null: [ + p + ] + }, + attentionMarkers: { + null: [ + 126 + ] + } + }; + function y(r, i) { + let t = -1; + for(; ++t < r.length;)if (r[t][0] === "enter" && r[t][1].type === "strikethroughSequenceTemporary" && r[t][1]._close) { + let e = t; + for(; e--;)if (r[e][0] === "exit" && r[e][1].type === "strikethroughSequenceTemporary" && r[e][1]._open && r[t][1].end.offset - r[t][1].start.offset === r[e][1].end.offset - r[e][1].start.offset) { + r[t][1].type = "strikethroughSequence", r[e][1].type = "strikethroughSequence"; + let u = { + type: "strikethrough", + start: Object.assign({}, r[e][1].start), + end: Object.assign({}, r[t][1].end) + }, h = { + type: "strikethroughText", + start: Object.assign({}, r[e][1].end), + end: Object.assign({}, r[t][1].start) + }, n = [ + [ + "enter", + u, + i + ], + [ + "enter", + r[e][1], + i + ], + [ + "exit", + r[e][1], + i + ], + [ + "enter", + h, + i + ] + ]; + u1(n, n.length, 0, c1(i.parser.constructs.insideSpan.null, r.slice(e + 1, t), i)), u1(n, n.length, 0, [ + [ + "exit", + h, + i + ], + [ + "enter", + r[t][1], + i + ], + [ + "exit", + r[t][1], + i + ], + [ + "exit", + u, + i + ] + ]), u1(r, e - 1, t - e + 3, n), t = e + n.length - 2; + break; + } + } + for(t = -1; ++t < r.length;)r[t][1].type === "strikethroughSequenceTemporary" && (r[t][1].type = "data"); + return r; + } + function S(r, i, t) { + let e = this.previous, u = this.events, h = 0; + return n; + function n(o) { + return e === 126 && u[u.length - 1][1].type !== "characterEscape" ? t(o) : (r.enter("strikethroughSequenceTemporary"), f(o)); + } + function f(o) { + let s = a3(e); + if (o === 126) return h > 1 ? t(o) : (r.consume(o), h++, f); + if (h < 2 && !l) return t(o); + let k = r.exit("strikethroughSequenceTemporary"), g = a3(o); + return k._open = !g || g === 2 && Boolean(s), k._close = !s || s === 2 && Boolean(g), i(o); + } + } +} +globalThis.document = { + createElement: (...data)=>{ + return new class { + set innerHTML(data) { + this.textContent = data; + } + textContent = ''; + }(); + } +}; +document.createElement(); +export { x2 as gfmStrikethrough }; +export { Pe as mdast }; diff --git a/mdast_shimmed_dep.ts b/mdast_shimmed_dep.ts index b3e893e..a14d8a5 100644 --- a/mdast_shimmed_dep.ts +++ b/mdast_shimmed_dep.ts @@ -1,4 +1,4 @@ -// deno bundle --no-check .\mdast_shimmed_dep.ts mdast-util-from-markdown@0_8_4-shimmed.js +// deno bundle --no-check .\mdast_shimmed_dep.ts mdast-util-from-markdown@1_2_0-shimmed.js // Shim document globalThis.document = { @@ -12,6 +12,6 @@ globalThis.document = { document.createElement(); // needed // --------- -import * as mdast_js from 'https://jspm.dev/mdast-util-from-markdown@0.8.4'; - -export const mdast = mdast_js.default; \ No newline at end of file +export {fromMarkdown as mdast} from 'https://esm.sh/mdast-util-from-markdown@1.2.0'; +export * from "https://esm.sh/mdast-util-gfm-strikethrough@1.0.1"; +export { gfmStrikethrough } from 'https://esm.sh/micromark-extension-gfm-strikethrough@1.0.4'; \ No newline at end of file diff --git a/renderer.ts b/renderer.ts index 208de55..f231061 100644 --- a/renderer.ts +++ b/renderer.ts @@ -1,6 +1,7 @@ import { Node, toAst } from './utils.ts'; import { transformer } from './transformer.ts'; import { generator } from './generator.ts'; +import { strike, strikethroughExt } from './deps.ts'; export interface Extension { @@ -52,8 +53,8 @@ export interface Options { * Currently https://github.com/syntax-tree/mdast-util-from-markdown is used as the AST generator */ mdast?: { - /** BufferEncoding */ - encoding?: any; + /** BufferEncoding https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings*/ + encoding?: string; options?: MdastOptions } } @@ -69,7 +70,14 @@ export function renderMarkdown(md: string, options: Options = {}): string { md = ext.init?.(md, options) || md; }); - const mdast = toAst(md, options?.mdast?.encoding, options?.mdast?.options); + const mdastOptions = { + mdastExtensions: [strikethroughExt, ...(options?.mdast?.options?.mdastExtensions || [])], + extensions: [strike(), ...(options?.mdast?.options?.extensions || [])] + }; + + const mdastEncoding = options.mdast?.encoding || 'utf8'; + + const mdast = toAst(md, mdastEncoding, mdastOptions); options?.extensions?.forEach(ext => { ext.postAST?.(mdast, options); diff --git a/transformer.ts b/transformer.ts index bae54c0..845efe0 100644 --- a/transformer.ts +++ b/transformer.ts @@ -40,10 +40,10 @@ function transformNode(node: Node, parent: Node, options: Options) { case 'list': node.listLevel = parent.type === 'listItem' ? parent.listLevel! + 1 : 0; - node.children?.forEach((ch: any) => ch.listLevel = node.listLevel); + node.children?.forEach(ch => ch.listLevel = node.listLevel); break; - case 'thematicBreak': + case 'thematicBreak': { let terminalWidth; try { terminalWidth = (Deno as any/* so --unstable is not needed */).consoleSize(Deno.stdout.rid).columns; @@ -54,6 +54,7 @@ function transformNode(node: Node, parent: Node, options: Options) { node.value = colors.reset('_'.repeat(width) + '\n'); break; + } case 'paragraph': checkForTable(node, parent, options) @@ -61,7 +62,7 @@ function transformNode(node: Node, parent: Node, options: Options) { } } -function checkForTable(node: Node, parent: Node, options: Options) { +function checkForTable(node: Node, _parent: Node, _options: Options) { if(node.type === "paragraph") { const table = node.children?.map(c => c.value).join("").trim(); if(isMarkdownTable(table || '')) {