@burdenoff/microfe-store 2026.720.3 → 2026.720.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +20 -0
- package/dist/components/MarkdownEditor.js +5 -5
- package/dist/components/MarkdownEditor.js.map +1 -1
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +63 -0
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js.map +1 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +8 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js.map +1 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +93 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js.map +1 -0
- package/dist/node_modules/bail/index.js +8 -0
- package/dist/node_modules/bail/index.js.map +1 -0
- package/dist/node_modules/comma-separated-tokens/index.js +9 -0
- package/dist/node_modules/comma-separated-tokens/index.js.map +1 -0
- package/dist/node_modules/decode-named-character-reference/index.dom.js +12 -0
- package/dist/node_modules/decode-named-character-reference/index.dom.js.map +1 -0
- package/dist/node_modules/devlop/lib/default.js +7 -0
- package/dist/node_modules/devlop/lib/default.js.map +1 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +9 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js.map +1 -0
- package/dist/node_modules/extend/index.js +42 -0
- package/dist/node_modules/extend/index.js.map +1 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +255 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js.map +1 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js +12 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js.map +1 -0
- package/dist/node_modules/html-url-attributes/lib/index.js +38 -0
- package/dist/node_modules/html-url-attributes/lib/index.js.map +1 -0
- package/dist/node_modules/inline-style-parser/cjs/index.js +92 -0
- package/dist/node_modules/inline-style-parser/cjs/index.js.map +1 -0
- package/dist/node_modules/is-plain-obj/index.js +10 -0
- package/dist/node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +559 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +105 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +24 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +32 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +23 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +58 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +19 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +20 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +61 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +22 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +26 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +37 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +21 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +22 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +110 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js.map +1 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js +26 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js.map +1 -0
- package/dist/node_modules/micromark/lib/constructs.js +82 -0
- package/dist/node_modules/micromark/lib/constructs.js.map +1 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +179 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +36 -0
- package/dist/node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +104 -0
- package/dist/node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +27 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +88 -0
- package/dist/node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/dist/node_modules/micromark/lib/parse.js +31 -0
- package/dist/node_modules/micromark/lib/parse.js.map +1 -0
- package/dist/node_modules/micromark/lib/postprocess.js +10 -0
- package/dist/node_modules/micromark/lib/postprocess.js.map +1 -0
- package/dist/node_modules/micromark/lib/preprocess.js +34 -0
- package/dist/node_modules/micromark/lib/preprocess.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +116 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +45 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +20 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +40 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +19 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +31 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +91 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +45 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +45 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +49 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +62 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +19 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +69 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +143 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +102 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +160 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +25 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +22 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +16 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +80 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +61 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +27 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/dist/node_modules/micromark-factory-destination/index.js +28 -0
- package/dist/node_modules/micromark-factory-destination/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-label/index.js +22 -0
- package/dist/node_modules/micromark-factory-label/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-space/index.js +16 -0
- package/dist/node_modules/micromark-factory-space/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-title/index.js +26 -0
- package/dist/node_modules/micromark-factory-title/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +14 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/dist/node_modules/micromark-util-character/index.js +26 -0
- package/dist/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-chunked/index.js +13 -0
- package/dist/node_modules/micromark-util-chunked/index.js.map +1 -0
- package/dist/node_modules/micromark-util-classify-character/index.js +10 -0
- package/dist/node_modules/micromark-util-classify-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js +28 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js.map +1 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +9 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +19 -0
- package/dist/node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +11 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +8 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js +13 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js.map +1 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +20 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js.map +1 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js +37 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +59 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js.map +1 -0
- package/dist/node_modules/property-information/index.js +28 -0
- package/dist/node_modules/property-information/index.js.map +1 -0
- package/dist/node_modules/property-information/lib/aria.js +63 -0
- package/dist/node_modules/property-information/lib/aria.js.map +1 -0
- package/dist/node_modules/property-information/lib/find.js +33 -0
- package/dist/node_modules/property-information/lib/find.js.map +1 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js +24 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js.map +1 -0
- package/dist/node_modules/property-information/lib/html.js +328 -0
- package/dist/node_modules/property-information/lib/html.js.map +1 -0
- package/dist/node_modules/property-information/lib/normalize.js +8 -0
- package/dist/node_modules/property-information/lib/normalize.js.map +1 -0
- package/dist/node_modules/property-information/lib/svg.js +566 -0
- package/dist/node_modules/property-information/lib/svg.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +9 -0
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +8 -0
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/create.js +16 -0
- package/dist/node_modules/property-information/lib/util/create.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/defined-info.js +20 -0
- package/dist/node_modules/property-information/lib/util/defined-info.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/info.js +11 -0
- package/dist/node_modules/property-information/lib/util/info.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/merge.js +11 -0
- package/dist/node_modules/property-information/lib/util/merge.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/schema.js +11 -0
- package/dist/node_modules/property-information/lib/util/schema.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/types.js +18 -0
- package/dist/node_modules/property-information/lib/util/types.js.map +1 -0
- package/dist/node_modules/property-information/lib/xlink.js +21 -0
- package/dist/node_modules/property-information/lib/xlink.js.map +1 -0
- package/dist/node_modules/property-information/lib/xml.js +17 -0
- package/dist/node_modules/property-information/lib/xml.js.map +1 -0
- package/dist/node_modules/property-information/lib/xmlns.js +16 -0
- package/dist/node_modules/property-information/lib/xmlns.js.map +1 -0
- package/dist/node_modules/react-markdown/lib/index.js +142 -0
- package/dist/node_modules/react-markdown/lib/index.js.map +1 -0
- package/dist/node_modules/remark-parse/lib/index.js +18 -0
- package/dist/node_modules/remark-parse/lib/index.js.map +1 -0
- package/dist/node_modules/remark-rehype/lib/index.js +20 -0
- package/dist/node_modules/remark-rehype/lib/index.js.map +1 -0
- package/dist/node_modules/space-separated-tokens/index.js +8 -0
- package/dist/node_modules/space-separated-tokens/index.js.map +1 -0
- package/dist/node_modules/style-to-js/cjs/index.js +21 -0
- package/dist/node_modules/style-to-js/cjs/index.js.map +1 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +20 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js.map +1 -0
- package/dist/node_modules/style-to-object/cjs/index.js +25 -0
- package/dist/node_modules/style-to-object/cjs/index.js.map +1 -0
- package/dist/node_modules/trim-lines/index.js +23 -0
- package/dist/node_modules/trim-lines/index.js.map +1 -0
- package/dist/node_modules/trough/lib/index.js +52 -0
- package/dist/node_modules/trough/lib/index.js.map +1 -0
- package/dist/node_modules/unified/lib/callable-instance.js +11 -0
- package/dist/node_modules/unified/lib/callable-instance.js.map +1 -0
- package/dist/node_modules/unified/lib/index.js +163 -0
- package/dist/node_modules/unified/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-is/lib/index.js +49 -0
- package/dist/node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-position/lib/index.js +24 -0
- package/dist/node_modules/unist-util-position/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +17 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-visit/lib/index.js +14 -0
- package/dist/node_modules/unist-util-visit/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-visit-parents/lib/color.js +8 -0
- package/dist/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
- package/dist/node_modules/unist-util-visit-parents/lib/index.js +38 -0
- package/dist/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/node_modules/vfile/lib/index.js +91 -0
- package/dist/node_modules/vfile/lib/index.js.map +1 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js +101 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js +9 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js +33 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js +8 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/dist/node_modules/vfile-message/lib/index.js +26 -0
- package/dist/node_modules/vfile-message/lib/index.js.map +1 -0
- package/dist/pages/AdminSubmissionsQueuePage.js +174 -174
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/MarketplaceHomePage.js +472 -422
- package/dist/pages/MarketplaceHomePage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +16 -16
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preprocess.js","names":[],"sources":["../../../../node_modules/micromark/lib/preprocess.js"],"sourcesContent":["/**\n * @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'\n */\n\n/**\n * @callback Preprocessor\n * Preprocess a value.\n * @param {Value} value\n * Value.\n * @param {Encoding | null | undefined} [encoding]\n * Encoding when `value` is a typed array (optional).\n * @param {boolean | null | undefined} [end=false]\n * Whether this is the last chunk (default: `false`).\n * @returns {Array<Chunk>}\n * Chunks.\n */\n\nconst search = /[\\0\\t\\n\\r]/g;\n\n/**\n * @returns {Preprocessor}\n * Preprocess a value.\n */\nexport function preprocess() {\n let column = 1;\n let buffer = '';\n /** @type {boolean | undefined} */\n let start = true;\n /** @type {boolean | undefined} */\n let atCarriageReturn;\n return preprocessor;\n\n /** @type {Preprocessor} */\n // eslint-disable-next-line complexity\n function preprocessor(value, encoding, end) {\n /** @type {Array<Chunk>} */\n const chunks = [];\n /** @type {RegExpMatchArray | null} */\n let match;\n /** @type {number} */\n let next;\n /** @type {number} */\n let startPosition;\n /** @type {number} */\n let endPosition;\n /** @type {Code} */\n let code;\n value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));\n startPosition = 0;\n buffer = '';\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++;\n }\n start = undefined;\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition;\n match = search.exec(value);\n endPosition = match && match.index !== undefined ? match.index : value.length;\n code = value.charCodeAt(endPosition);\n if (!match) {\n buffer = value.slice(startPosition);\n break;\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3);\n atCarriageReturn = undefined;\n } else {\n if (atCarriageReturn) {\n chunks.push(-5);\n atCarriageReturn = undefined;\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition));\n column += endPosition - startPosition;\n }\n switch (code) {\n case 0:\n {\n chunks.push(65533);\n column++;\n break;\n }\n case 9:\n {\n next = Math.ceil(column / 4) * 4;\n chunks.push(-2);\n while (column++ < next) chunks.push(-1);\n break;\n }\n case 10:\n {\n chunks.push(-4);\n column = 1;\n break;\n }\n default:\n {\n atCarriageReturn = true;\n column = 1;\n }\n }\n }\n startPosition = endPosition + 1;\n }\n if (end) {\n if (atCarriageReturn) chunks.push(-5);\n if (buffer) chunks.push(buffer);\n chunks.push(null);\n }\n return chunks;\n }\n}"],"x_google_ignoreList":[0],"mappings":";AAiBA,IAAM,IAAS;AAMf,SAAgB,IAAa;CAC3B,IAAI,IAAS,GACT,IAAS,IAET,IAAQ,IAER;AACJ,QAAO;CAIP,SAAS,EAAa,GAAO,GAAU,GAAK;EAE1C,IAAM,IAAS,EAAE,EAEb,GAEA,GAEA,GAEA,GAEA;AAWJ,OAVA,IAAQ,KAAU,OAAO,KAAU,WAAW,EAAM,UAAU,GAAG,IAAI,YAAY,KAAY,KAAA,EAAU,CAAC,OAAO,EAAM,GACrH,IAAgB,GAChB,IAAS,IACT,AAKE,OAHI,EAAM,WAAW,EAAE,KAAK,SAC1B,KAEM,KAAA,IAEH,IAAgB,EAAM,SAAQ;AAKnC,OAJA,EAAO,YAAY,GACnB,IAAQ,EAAO,KAAK,EAAM,EAC1B,IAAc,KAAS,EAAM,UAAU,KAAA,IAAY,EAAM,QAAQ,EAAM,QACvE,IAAO,EAAM,WAAW,EAAY,EAChC,CAAC,GAAO;AACV,QAAS,EAAM,MAAM,EAAc;AACnC;;AAEF,OAAI,MAAS,MAAM,MAAkB,KAAe,EAElD,CADA,EAAO,KAAK,GAAG,EACf,IAAmB,KAAA;OAUnB,SARA,AAEE,OADA,EAAO,KAAK,GAAG,EACI,KAAA,IAEjB,IAAgB,MAClB,EAAO,KAAK,EAAM,MAAM,GAAe,EAAY,CAAC,EACpD,KAAU,IAAc,IAElB,GAAR;IACE,KAAK;AAGD,KADA,EAAO,KAAK,MAAM,EAClB;AACA;IAEJ,KAAK;AAID,UAFA,IAAO,KAAK,KAAK,IAAS,EAAE,GAAG,GAC/B,EAAO,KAAK,GAAG,EACR,MAAW,GAAM,GAAO,KAAK,GAAG;AACvC;IAEJ,KAAK;AAGD,KADA,EAAO,KAAK,GAAG,EACf,IAAS;AACT;IAEJ,QAGI,CADA,IAAmB,IACnB,IAAS;;AAIjB,OAAgB,IAAc;;AAOhC,SALI,MACE,KAAkB,EAAO,KAAK,GAAG,EACjC,KAAQ,EAAO,KAAK,EAAO,EAC/B,EAAO,KAAK,KAAK,GAEZ"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { push as e, splice as t } from "../../micromark-util-chunked/index.js";
|
|
2
|
+
import { classifyCharacter as n } from "../../micromark-util-classify-character/index.js";
|
|
3
|
+
import { resolveAll as r } from "../../micromark-util-resolve-all/index.js";
|
|
4
|
+
//#region node_modules/micromark-core-commonmark/lib/attention.js
|
|
5
|
+
var i = {
|
|
6
|
+
name: "attention",
|
|
7
|
+
resolveAll: a,
|
|
8
|
+
tokenize: o
|
|
9
|
+
};
|
|
10
|
+
function a(n, i) {
|
|
11
|
+
let a = -1, o, c, l, u, d, f, p, m;
|
|
12
|
+
for (; ++a < n.length;) if (n[a][0] === "enter" && n[a][1].type === "attentionSequence" && n[a][1]._close) {
|
|
13
|
+
for (o = a; o--;) if (n[o][0] === "exit" && n[o][1].type === "attentionSequence" && n[o][1]._open && i.sliceSerialize(n[o][1]).charCodeAt(0) === i.sliceSerialize(n[a][1]).charCodeAt(0)) {
|
|
14
|
+
if ((n[o][1]._close || n[a][1]._open) && (n[a][1].end.offset - n[a][1].start.offset) % 3 && !((n[o][1].end.offset - n[o][1].start.offset + n[a][1].end.offset - n[a][1].start.offset) % 3)) continue;
|
|
15
|
+
f = n[o][1].end.offset - n[o][1].start.offset > 1 && n[a][1].end.offset - n[a][1].start.offset > 1 ? 2 : 1;
|
|
16
|
+
let h = { ...n[o][1].end }, g = { ...n[a][1].start };
|
|
17
|
+
s(h, -f), s(g, f), u = {
|
|
18
|
+
type: f > 1 ? "strongSequence" : "emphasisSequence",
|
|
19
|
+
start: h,
|
|
20
|
+
end: { ...n[o][1].end }
|
|
21
|
+
}, d = {
|
|
22
|
+
type: f > 1 ? "strongSequence" : "emphasisSequence",
|
|
23
|
+
start: { ...n[a][1].start },
|
|
24
|
+
end: g
|
|
25
|
+
}, l = {
|
|
26
|
+
type: f > 1 ? "strongText" : "emphasisText",
|
|
27
|
+
start: { ...n[o][1].end },
|
|
28
|
+
end: { ...n[a][1].start }
|
|
29
|
+
}, c = {
|
|
30
|
+
type: f > 1 ? "strong" : "emphasis",
|
|
31
|
+
start: { ...u.start },
|
|
32
|
+
end: { ...d.end }
|
|
33
|
+
}, n[o][1].end = { ...u.start }, n[a][1].start = { ...d.end }, p = [], n[o][1].end.offset - n[o][1].start.offset && (p = e(p, [[
|
|
34
|
+
"enter",
|
|
35
|
+
n[o][1],
|
|
36
|
+
i
|
|
37
|
+
], [
|
|
38
|
+
"exit",
|
|
39
|
+
n[o][1],
|
|
40
|
+
i
|
|
41
|
+
]])), p = e(p, [
|
|
42
|
+
[
|
|
43
|
+
"enter",
|
|
44
|
+
c,
|
|
45
|
+
i
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"enter",
|
|
49
|
+
u,
|
|
50
|
+
i
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"exit",
|
|
54
|
+
u,
|
|
55
|
+
i
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
"enter",
|
|
59
|
+
l,
|
|
60
|
+
i
|
|
61
|
+
]
|
|
62
|
+
]), p = e(p, r(i.parser.constructs.insideSpan.null, n.slice(o + 1, a), i)), p = e(p, [
|
|
63
|
+
[
|
|
64
|
+
"exit",
|
|
65
|
+
l,
|
|
66
|
+
i
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
"enter",
|
|
70
|
+
d,
|
|
71
|
+
i
|
|
72
|
+
],
|
|
73
|
+
[
|
|
74
|
+
"exit",
|
|
75
|
+
d,
|
|
76
|
+
i
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
"exit",
|
|
80
|
+
c,
|
|
81
|
+
i
|
|
82
|
+
]
|
|
83
|
+
]), n[a][1].end.offset - n[a][1].start.offset ? (m = 2, p = e(p, [[
|
|
84
|
+
"enter",
|
|
85
|
+
n[a][1],
|
|
86
|
+
i
|
|
87
|
+
], [
|
|
88
|
+
"exit",
|
|
89
|
+
n[a][1],
|
|
90
|
+
i
|
|
91
|
+
]])) : m = 0, t(n, o - 1, a - o + 3, p), a = o + p.length - m - 2;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
for (a = -1; ++a < n.length;) n[a][1].type === "attentionSequence" && (n[a][1].type = "data");
|
|
96
|
+
return n;
|
|
97
|
+
}
|
|
98
|
+
function o(e, t) {
|
|
99
|
+
let r = this.parser.constructs.attentionMarkers.null, i = this.previous, a = n(i), o;
|
|
100
|
+
return s;
|
|
101
|
+
function s(t) {
|
|
102
|
+
return o = t, e.enter("attentionSequence"), c(t);
|
|
103
|
+
}
|
|
104
|
+
function c(s) {
|
|
105
|
+
if (s === o) return e.consume(s), c;
|
|
106
|
+
let l = e.exit("attentionSequence"), u = n(s), d = !u || u === 2 && a || r.includes(s), f = !a || a === 2 && u || r.includes(i);
|
|
107
|
+
return l._open = !!(o === 42 ? d : d && (a || !f)), l._close = !!(o === 42 ? f : f && (u || !d)), t(s);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function s(e, t) {
|
|
111
|
+
e.column += t, e.offset += t, e._bufferIndex += t;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { i as attention };
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=attention.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attention.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/attention.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * Construct,\n * Event,\n * Point,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { push, splice } from 'micromark-util-chunked';\nimport { classifyCharacter } from 'micromark-util-classify-character';\nimport { resolveAll } from 'micromark-util-resolve-all';\n/** @type {Construct} */\nexport const attention = {\n name: 'attention',\n resolveAll: resolveAllAttention,\n tokenize: tokenizeAttention\n};\n\n/**\n * Take all events and resolve attention to emphasis or strong.\n *\n * @type {Resolver}\n */\n// eslint-disable-next-line complexity\nfunction resolveAllAttention(events, context) {\n let index = -1;\n /** @type {number} */\n let open;\n /** @type {Token} */\n let group;\n /** @type {Token} */\n let text;\n /** @type {Token} */\n let openingSequence;\n /** @type {Token} */\n let closingSequence;\n /** @type {number} */\n let use;\n /** @type {Array<Event>} */\n let nextEvents;\n /** @type {number} */\n let offset;\n\n // Walk through all events.\n //\n // Note: performance of this is fine on an mb of normal markdown, but it’s\n // a bottleneck for malicious stuff.\n while (++index < events.length) {\n // Find a token that can close.\n if (events[index][0] === 'enter' && events[index][1].type === 'attentionSequence' && events[index][1]._close) {\n open = index;\n\n // Now walk back to find an opener.\n while (open--) {\n // Find a token that can open the closer.\n if (events[open][0] === 'exit' && events[open][1].type === 'attentionSequence' && events[open][1]._open &&\n // If the markers are the same:\n context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {\n // If the opening can close or the closing can open,\n // and the close size *is not* a multiple of three,\n // but the sum of the opening and closing size *is* multiple of three,\n // then don’t match.\n 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)) {\n continue;\n }\n\n // Number of markers to use from the sequence.\n 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;\n const start = {\n ...events[open][1].end\n };\n const end = {\n ...events[index][1].start\n };\n movePoint(start, -use);\n movePoint(end, use);\n openingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start,\n end: {\n ...events[open][1].end\n }\n };\n closingSequence = {\n type: use > 1 ? \"strongSequence\" : \"emphasisSequence\",\n start: {\n ...events[index][1].start\n },\n end\n };\n text = {\n type: use > 1 ? \"strongText\" : \"emphasisText\",\n start: {\n ...events[open][1].end\n },\n end: {\n ...events[index][1].start\n }\n };\n group = {\n type: use > 1 ? \"strong\" : \"emphasis\",\n start: {\n ...openingSequence.start\n },\n end: {\n ...closingSequence.end\n }\n };\n events[open][1].end = {\n ...openingSequence.start\n };\n events[index][1].start = {\n ...closingSequence.end\n };\n nextEvents = [];\n\n // If there are more markers in the opening, add them before.\n if (events[open][1].end.offset - events[open][1].start.offset) {\n nextEvents = push(nextEvents, [['enter', events[open][1], context], ['exit', events[open][1], context]]);\n }\n\n // Opening.\n nextEvents = push(nextEvents, [['enter', group, context], ['enter', openingSequence, context], ['exit', openingSequence, context], ['enter', text, context]]);\n\n // Always populated by defaults.\n\n // Between.\n nextEvents = push(nextEvents, resolveAll(context.parser.constructs.insideSpan.null, events.slice(open + 1, index), context));\n\n // Closing.\n nextEvents = push(nextEvents, [['exit', text, context], ['enter', closingSequence, context], ['exit', closingSequence, context], ['exit', group, context]]);\n\n // If there are more markers in the closing, add them after.\n if (events[index][1].end.offset - events[index][1].start.offset) {\n offset = 2;\n nextEvents = push(nextEvents, [['enter', events[index][1], context], ['exit', events[index][1], context]]);\n } else {\n offset = 0;\n }\n splice(events, open - 1, index - open + 3, nextEvents);\n index = open + nextEvents.length - offset - 2;\n break;\n }\n }\n }\n }\n\n // Remove remaining sequences.\n index = -1;\n while (++index < events.length) {\n if (events[index][1].type === 'attentionSequence') {\n events[index][1].type = 'data';\n }\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeAttention(effects, ok) {\n const attentionMarkers = this.parser.constructs.attentionMarkers.null;\n const previous = this.previous;\n const before = classifyCharacter(previous);\n\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Before a sequence.\n *\n * ```markdown\n * > | **\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n marker = code;\n effects.enter('attentionSequence');\n return inside(code);\n }\n\n /**\n * In a sequence.\n *\n * ```markdown\n * > | **\n * ^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === marker) {\n effects.consume(code);\n return inside;\n }\n const token = effects.exit('attentionSequence');\n\n // To do: next major: move this to resolver, just like `markdown-rs`.\n const after = classifyCharacter(code);\n\n // Always populated by defaults.\n\n const open = !after || after === 2 && before || attentionMarkers.includes(code);\n const close = !before || before === 2 && after || attentionMarkers.includes(previous);\n token._open = Boolean(marker === 42 ? open : open && (before || !close));\n token._close = Boolean(marker === 42 ? close : close && (after || !open));\n return ok(code);\n }\n}\n\n/**\n * Move a point a bit.\n *\n * Note: `move` only works inside lines! It’s not possible to move past other\n * chunks (replacement characters, tabs, or line endings).\n *\n * @param {Point} point\n * Point.\n * @param {number} offset\n * Amount to move.\n * @returns {undefined}\n * Nothing.\n */\nfunction movePoint(point, offset) {\n point.column += offset;\n point.offset += offset;\n point._bufferIndex += offset;\n}"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { asciiAlpha as e, asciiAlphanumeric as t, asciiAtext as n, asciiControl as r } from "../../micromark-util-character/index.js";
|
|
2
|
+
//#region node_modules/micromark-core-commonmark/lib/autolink.js
|
|
3
|
+
var i = {
|
|
4
|
+
name: "autolink",
|
|
5
|
+
tokenize: a
|
|
6
|
+
};
|
|
7
|
+
function a(i, a, o) {
|
|
8
|
+
let s = 0;
|
|
9
|
+
return c;
|
|
10
|
+
function c(e) {
|
|
11
|
+
return i.enter("autolink"), i.enter("autolinkMarker"), i.consume(e), i.exit("autolinkMarker"), i.enter("autolinkProtocol"), l;
|
|
12
|
+
}
|
|
13
|
+
function l(t) {
|
|
14
|
+
return e(t) ? (i.consume(t), u) : t === 64 ? o(t) : p(t);
|
|
15
|
+
}
|
|
16
|
+
function u(e) {
|
|
17
|
+
return e === 43 || e === 45 || e === 46 || t(e) ? (s = 1, d(e)) : p(e);
|
|
18
|
+
}
|
|
19
|
+
function d(e) {
|
|
20
|
+
return e === 58 ? (i.consume(e), s = 0, f) : (e === 43 || e === 45 || e === 46 || t(e)) && s++ < 32 ? (i.consume(e), d) : (s = 0, p(e));
|
|
21
|
+
}
|
|
22
|
+
function f(e) {
|
|
23
|
+
return e === 62 ? (i.exit("autolinkProtocol"), i.enter("autolinkMarker"), i.consume(e), i.exit("autolinkMarker"), i.exit("autolink"), a) : e === null || e === 32 || e === 60 || r(e) ? o(e) : (i.consume(e), f);
|
|
24
|
+
}
|
|
25
|
+
function p(e) {
|
|
26
|
+
return e === 64 ? (i.consume(e), m) : n(e) ? (i.consume(e), p) : o(e);
|
|
27
|
+
}
|
|
28
|
+
function m(e) {
|
|
29
|
+
return t(e) ? h(e) : o(e);
|
|
30
|
+
}
|
|
31
|
+
function h(e) {
|
|
32
|
+
return e === 46 ? (i.consume(e), s = 0, m) : e === 62 ? (i.exit("autolinkProtocol").type = "autolinkEmail", i.enter("autolinkMarker"), i.consume(e), i.exit("autolinkMarker"), i.exit("autolink"), a) : g(e);
|
|
33
|
+
}
|
|
34
|
+
function g(e) {
|
|
35
|
+
if ((e === 45 || t(e)) && s++ < 63) {
|
|
36
|
+
let t = e === 45 ? g : h;
|
|
37
|
+
return i.consume(e), t;
|
|
38
|
+
}
|
|
39
|
+
return o(e);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { i as autolink };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=autolink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autolink.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/autolink.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiAlphanumeric, asciiAlpha, asciiAtext, asciiControl } from 'micromark-util-character';\n/** @type {Construct} */\nexport const autolink = {\n name: 'autolink',\n tokenize: tokenizeAutolink\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeAutolink(effects, ok, nok) {\n let size = 0;\n return start;\n\n /**\n * Start of an autolink.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"autolink\");\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.enter(\"autolinkProtocol\");\n return open;\n }\n\n /**\n * After `<`, at protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (asciiAlpha(code)) {\n effects.consume(code);\n return schemeOrEmailAtext;\n }\n if (code === 64) {\n return nok(code);\n }\n return emailAtext(code);\n }\n\n /**\n * At second byte of protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeOrEmailAtext(code) {\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {\n // Count the previous alphabetical from `open` too.\n size = 1;\n return schemeInsideOrEmailAtext(code);\n }\n return emailAtext(code);\n }\n\n /**\n * In ambiguous protocol or atext.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * > | a<user@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function schemeInsideOrEmailAtext(code) {\n if (code === 58) {\n effects.consume(code);\n size = 0;\n return urlInside;\n }\n\n // ASCII alphanumeric and `+`, `-`, and `.`.\n if ((code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) && size++ < 32) {\n effects.consume(code);\n return schemeInsideOrEmailAtext;\n }\n size = 0;\n return emailAtext(code);\n }\n\n /**\n * After protocol, in URL.\n *\n * ```markdown\n * > | a<https://example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function urlInside(code) {\n if (code === 62) {\n effects.exit(\"autolinkProtocol\");\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.exit(\"autolink\");\n return ok;\n }\n\n // ASCII control, space, or `<`.\n if (code === null || code === 32 || code === 60 || asciiControl(code)) {\n return nok(code);\n }\n effects.consume(code);\n return urlInside;\n }\n\n /**\n * In email atext.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailAtext(code) {\n if (code === 64) {\n effects.consume(code);\n return emailAtSignOrDot;\n }\n if (asciiAtext(code)) {\n effects.consume(code);\n return emailAtext;\n }\n return nok(code);\n }\n\n /**\n * In label, after at-sign or dot.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function emailAtSignOrDot(code) {\n return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);\n }\n\n /**\n * In label, where `.` and `>` are allowed.\n *\n * ```markdown\n * > | a<user.name@example.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailLabel(code) {\n if (code === 46) {\n effects.consume(code);\n size = 0;\n return emailAtSignOrDot;\n }\n if (code === 62) {\n // Exit, then change the token type.\n effects.exit(\"autolinkProtocol\").type = \"autolinkEmail\";\n effects.enter(\"autolinkMarker\");\n effects.consume(code);\n effects.exit(\"autolinkMarker\");\n effects.exit(\"autolink\");\n return ok;\n }\n return emailValue(code);\n }\n\n /**\n * In label, where `.` and `>` are *not* allowed.\n *\n * Though, this is also used in `emailLabel` to parse other values.\n *\n * ```markdown\n * > | a<user.name@ex-ample.com>b\n * ^\n * ```\n *\n * @type {State}\n */\n function emailValue(code) {\n // ASCII alphanumeric or `-`.\n if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {\n const next = code === 45 ? emailValue : emailLabel;\n effects.consume(code);\n return next;\n }\n return nok(code);\n }\n}"],"x_google_ignoreList":[0],"mappings":";;AAWA,IAAa,IAAW;CACtB,MAAM;CACN,UAAU;CACX;AAOD,SAAS,EAAiB,GAAS,GAAI,GAAK;CAC1C,IAAI,IAAO;AACX,QAAO;CAcP,SAAS,EAAM,GAAM;AAMnB,SALA,EAAQ,MAAM,WAAW,EACzB,EAAQ,MAAM,iBAAiB,EAC/B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,iBAAiB,EAC9B,EAAQ,MAAM,mBAAmB,EAC1B;;CAeT,SAAS,EAAK,GAAM;AAQlB,SAPI,EAAW,EAAK,IAClB,EAAQ,QAAQ,EAAK,EACd,KAEL,MAAS,KACJ,EAAI,EAAK,GAEX,EAAW,EAAK;;CAezB,SAAS,EAAmB,GAAM;AAOhC,SALI,MAAS,MAAM,MAAS,MAAM,MAAS,MAAM,EAAkB,EAAK,IAEtE,IAAO,GACA,EAAyB,EAAK,IAEhC,EAAW,EAAK;;CAezB,SAAS,EAAyB,GAAM;AAatC,SAZI,MAAS,MACX,EAAQ,QAAQ,EAAK,EACrB,IAAO,GACA,MAIJ,MAAS,MAAM,MAAS,MAAM,MAAS,MAAM,EAAkB,EAAK,KAAK,MAAS,MACrF,EAAQ,QAAQ,EAAK,EACd,MAET,IAAO,GACA,EAAW,EAAK;;CAazB,SAAS,EAAU,GAAM;AAevB,SAdI,MAAS,MACX,EAAQ,KAAK,mBAAmB,EAChC,EAAQ,MAAM,iBAAiB,EAC/B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,iBAAiB,EAC9B,EAAQ,KAAK,WAAW,EACjB,KAIL,MAAS,QAAQ,MAAS,MAAM,MAAS,MAAM,EAAa,EAAK,GAC5D,EAAI,EAAK,IAElB,EAAQ,QAAQ,EAAK,EACd;;CAaT,SAAS,EAAW,GAAM;AASxB,SARI,MAAS,MACX,EAAQ,QAAQ,EAAK,EACd,KAEL,EAAW,EAAK,IAClB,EAAQ,QAAQ,EAAK,EACd,KAEF,EAAI,EAAK;;CAalB,SAAS,EAAiB,GAAM;AAC9B,SAAO,EAAkB,EAAK,GAAG,EAAW,EAAK,GAAG,EAAI,EAAK;;CAa/D,SAAS,EAAW,GAAM;AAexB,SAdI,MAAS,MACX,EAAQ,QAAQ,EAAK,EACrB,IAAO,GACA,KAEL,MAAS,MAEX,EAAQ,KAAK,mBAAmB,CAAC,OAAO,iBACxC,EAAQ,MAAM,iBAAiB,EAC/B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,iBAAiB,EAC9B,EAAQ,KAAK,WAAW,EACjB,KAEF,EAAW,EAAK;;CAezB,SAAS,EAAW,GAAM;AAExB,OAAK,MAAS,MAAM,EAAkB,EAAK,KAAK,MAAS,IAAI;GAC3D,IAAM,IAAO,MAAS,KAAK,IAAa;AAExC,UADA,EAAQ,QAAQ,EAAK,EACd;;AAET,SAAO,EAAI,EAAK"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { markdownLineEnding as e, markdownSpace as t } from "../../micromark-util-character/index.js";
|
|
2
|
+
import { factorySpace as n } from "../../micromark-factory-space/index.js";
|
|
3
|
+
//#region node_modules/micromark-core-commonmark/lib/blank-line.js
|
|
4
|
+
var r = {
|
|
5
|
+
partial: !0,
|
|
6
|
+
tokenize: i
|
|
7
|
+
};
|
|
8
|
+
function i(r, i, a) {
|
|
9
|
+
return o;
|
|
10
|
+
function o(e) {
|
|
11
|
+
return t(e) ? n(r, s, "linePrefix")(e) : s(e);
|
|
12
|
+
}
|
|
13
|
+
function s(t) {
|
|
14
|
+
return t === null || e(t) ? i(t) : a(t);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as blankLine };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=blank-line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blank-line.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/blank-line.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const blankLine = {\n partial: true,\n tokenize: tokenizeBlankLine\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlankLine(effects, ok, nok) {\n return start;\n\n /**\n * Start of blank line.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n return markdownSpace(code) ? factorySpace(effects, after, \"linePrefix\")(code) : after(code);\n }\n\n /**\n * At eof/eol, after optional whitespace.\n *\n * > 👉 **Note**: `␠` represents a space character.\n *\n * ```markdown\n * > | ␠␠␊\n * ^\n * > | ␊\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n return code === null || markdownLineEnding(code) ? ok(code) : nok(code);\n }\n}"],"x_google_ignoreList":[0],"mappings":";;;AAYA,IAAa,IAAY;CACvB,SAAS;CACT,UAAU;CACX;AAOD,SAAS,EAAkB,GAAS,GAAI,GAAK;AAC3C,QAAO;CAgBP,SAAS,EAAM,GAAM;AACnB,SAAO,EAAc,EAAK,GAAG,EAAa,GAAS,GAAO,aAAa,CAAC,EAAK,GAAG,EAAM,EAAK;;CAiB7F,SAAS,EAAM,GAAM;AACnB,SAAO,MAAS,QAAQ,EAAmB,EAAK,GAAG,EAAG,EAAK,GAAG,EAAI,EAAK"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { markdownSpace as e } from "../../micromark-util-character/index.js";
|
|
2
|
+
import { factorySpace as t } from "../../micromark-factory-space/index.js";
|
|
3
|
+
//#region node_modules/micromark-core-commonmark/lib/block-quote.js
|
|
4
|
+
var n = {
|
|
5
|
+
continuation: { tokenize: i },
|
|
6
|
+
exit: a,
|
|
7
|
+
name: "blockQuote",
|
|
8
|
+
tokenize: r
|
|
9
|
+
};
|
|
10
|
+
function r(t, n, r) {
|
|
11
|
+
let i = this;
|
|
12
|
+
return a;
|
|
13
|
+
function a(e) {
|
|
14
|
+
if (e === 62) {
|
|
15
|
+
let n = i.containerState;
|
|
16
|
+
return n.open ||= (t.enter("blockQuote", { _container: !0 }), !0), t.enter("blockQuotePrefix"), t.enter("blockQuoteMarker"), t.consume(e), t.exit("blockQuoteMarker"), o;
|
|
17
|
+
}
|
|
18
|
+
return r(e);
|
|
19
|
+
}
|
|
20
|
+
function o(r) {
|
|
21
|
+
return e(r) ? (t.enter("blockQuotePrefixWhitespace"), t.consume(r), t.exit("blockQuotePrefixWhitespace"), t.exit("blockQuotePrefix"), n) : (t.exit("blockQuotePrefix"), n(r));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function i(r, i, a) {
|
|
25
|
+
let o = this;
|
|
26
|
+
return s;
|
|
27
|
+
function s(n) {
|
|
28
|
+
return e(n) ? t(r, c, "linePrefix", o.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(n) : c(n);
|
|
29
|
+
}
|
|
30
|
+
function c(e) {
|
|
31
|
+
return r.attempt(n, i, a)(e);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function a(e) {
|
|
35
|
+
e.exit("blockQuote");
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { n as blockQuote };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=block-quote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-quote.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/block-quote.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * Exiter,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const blockQuote = {\n continuation: {\n tokenize: tokenizeBlockQuoteContinuation\n },\n exit,\n name: 'blockQuote',\n tokenize: tokenizeBlockQuoteStart\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteStart(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of block quote.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n if (code === 62) {\n const state = self.containerState;\n if (!state.open) {\n effects.enter(\"blockQuote\", {\n _container: true\n });\n state.open = true;\n }\n effects.enter(\"blockQuotePrefix\");\n effects.enter(\"blockQuoteMarker\");\n effects.consume(code);\n effects.exit(\"blockQuoteMarker\");\n return after;\n }\n return nok(code);\n }\n\n /**\n * After `>`, before optional whitespace.\n *\n * ```markdown\n * > | > a\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n if (markdownSpace(code)) {\n effects.enter(\"blockQuotePrefixWhitespace\");\n effects.consume(code);\n effects.exit(\"blockQuotePrefixWhitespace\");\n effects.exit(\"blockQuotePrefix\");\n return ok;\n }\n effects.exit(\"blockQuotePrefix\");\n return ok(code);\n }\n}\n\n/**\n * Start of block quote continuation.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeBlockQuoteContinuation(effects, ok, nok) {\n const self = this;\n return contStart;\n\n /**\n * Start of block quote continuation.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contStart(code) {\n if (markdownSpace(code)) {\n // Always populated by defaults.\n\n return factorySpace(effects, contBefore, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code);\n }\n return contBefore(code);\n }\n\n /**\n * At `>`, after optional whitespace.\n *\n * Also used to parse the first block quote opening.\n *\n * ```markdown\n * | > a\n * > | > b\n * ^\n * ```\n *\n * @type {State}\n */\n function contBefore(code) {\n return effects.attempt(blockQuote, ok, nok)(code);\n }\n}\n\n/** @type {Exiter} */\nfunction exit(effects) {\n effects.exit(\"blockQuote\");\n}"],"x_google_ignoreList":[0],"mappings":";;;AAaA,IAAa,IAAa;CACxB,cAAc,EACZ,UAAU,GACX;CACD;CACA,MAAM;CACN,UAAU;CACX;AAOD,SAAS,EAAwB,GAAS,GAAI,GAAK;CACjD,IAAM,IAAO;AACb,QAAO;CAYP,SAAS,EAAM,GAAM;AACnB,MAAI,MAAS,IAAI;GACf,IAAM,IAAQ,EAAK;AAWnB,UAVA,AAIE,EAAM,UAHN,EAAQ,MAAM,cAAc,EAC1B,YAAY,IACb,CAAC,EACW,KAEf,EAAQ,MAAM,mBAAmB,EACjC,EAAQ,MAAM,mBAAmB,EACjC,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,mBAAmB,EACzB;;AAET,SAAO,EAAI,EAAK;;CAalB,SAAS,EAAM,GAAM;AASnB,SARI,EAAc,EAAK,IACrB,EAAQ,MAAM,6BAA6B,EAC3C,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,6BAA6B,EAC1C,EAAQ,KAAK,mBAAmB,EACzB,MAET,EAAQ,KAAK,mBAAmB,EACzB,EAAG,EAAK;;;AAiBnB,SAAS,EAA+B,GAAS,GAAI,GAAK;CACxD,IAAM,IAAO;AACb,QAAO;CAeP,SAAS,EAAU,GAAM;AAMvB,SALI,EAAc,EAAK,GAGd,EAAa,GAAS,GAAY,cAAc,EAAK,OAAO,WAAW,QAAQ,KAAK,SAAS,eAAe,GAAG,KAAA,IAAY,EAAE,CAAC,EAAK,GAErI,EAAW,EAAK;;CAgBzB,SAAS,EAAW,GAAM;AACxB,SAAO,EAAQ,QAAQ,GAAY,GAAI,EAAI,CAAC,EAAK;;;AAKrD,SAAS,EAAK,GAAS;AACrB,GAAQ,KAAK,aAAa"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { asciiPunctuation as e } from "../../micromark-util-character/index.js";
|
|
2
|
+
//#region node_modules/micromark-core-commonmark/lib/character-escape.js
|
|
3
|
+
var t = {
|
|
4
|
+
name: "characterEscape",
|
|
5
|
+
tokenize: n
|
|
6
|
+
};
|
|
7
|
+
function n(t, n, r) {
|
|
8
|
+
return i;
|
|
9
|
+
function i(e) {
|
|
10
|
+
return t.enter("characterEscape"), t.enter("escapeMarker"), t.consume(e), t.exit("escapeMarker"), a;
|
|
11
|
+
}
|
|
12
|
+
function a(i) {
|
|
13
|
+
return e(i) ? (t.enter("characterEscapeValue"), t.consume(i), t.exit("characterEscapeValue"), t.exit("characterEscape"), n) : r(i);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as characterEscape };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=character-escape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-escape.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/character-escape.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { asciiPunctuation } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterEscape = {\n name: 'characterEscape',\n tokenize: tokenizeCharacterEscape\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterEscape(effects, ok, nok) {\n return start;\n\n /**\n * Start of character escape.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"characterEscape\");\n effects.enter(\"escapeMarker\");\n effects.consume(code);\n effects.exit(\"escapeMarker\");\n return inside;\n }\n\n /**\n * After `\\`, at punctuation.\n *\n * ```markdown\n * > | a\\*b\n * ^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n // ASCII punctuation.\n if (asciiPunctuation(code)) {\n effects.enter(\"characterEscapeValue\");\n effects.consume(code);\n effects.exit(\"characterEscapeValue\");\n effects.exit(\"characterEscape\");\n return ok;\n }\n return nok(code);\n }\n}"],"x_google_ignoreList":[0],"mappings":";;AAWA,IAAa,IAAkB;CAC7B,MAAM;CACN,UAAU;CACX;AAOD,SAAS,EAAwB,GAAS,GAAI,GAAK;AACjD,QAAO;CAYP,SAAS,EAAM,GAAM;AAKnB,SAJA,EAAQ,MAAM,kBAAkB,EAChC,EAAQ,MAAM,eAAe,EAC7B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,eAAe,EACrB;;CAaT,SAAS,EAAO,GAAM;AASpB,SAPI,EAAiB,EAAK,IACxB,EAAQ,MAAM,uBAAuB,EACrC,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,uBAAuB,EACpC,EAAQ,KAAK,kBAAkB,EACxB,KAEF,EAAI,EAAK"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { decodeNamedCharacterReference as e } from "../../decode-named-character-reference/index.dom.js";
|
|
2
|
+
import { asciiAlphanumeric as t, asciiDigit as n, asciiHexDigit as r } from "../../micromark-util-character/index.js";
|
|
3
|
+
//#region node_modules/micromark-core-commonmark/lib/character-reference.js
|
|
4
|
+
var i = {
|
|
5
|
+
name: "characterReference",
|
|
6
|
+
tokenize: a
|
|
7
|
+
};
|
|
8
|
+
function a(i, a, o) {
|
|
9
|
+
let s = this, c = 0, l, u;
|
|
10
|
+
return d;
|
|
11
|
+
function d(e) {
|
|
12
|
+
return i.enter("characterReference"), i.enter("characterReferenceMarker"), i.consume(e), i.exit("characterReferenceMarker"), f;
|
|
13
|
+
}
|
|
14
|
+
function f(e) {
|
|
15
|
+
return e === 35 ? (i.enter("characterReferenceMarkerNumeric"), i.consume(e), i.exit("characterReferenceMarkerNumeric"), p) : (i.enter("characterReferenceValue"), l = 31, u = t, m(e));
|
|
16
|
+
}
|
|
17
|
+
function p(e) {
|
|
18
|
+
return e === 88 || e === 120 ? (i.enter("characterReferenceMarkerHexadecimal"), i.consume(e), i.exit("characterReferenceMarkerHexadecimal"), i.enter("characterReferenceValue"), l = 6, u = r, m) : (i.enter("characterReferenceValue"), l = 7, u = n, m(e));
|
|
19
|
+
}
|
|
20
|
+
function m(n) {
|
|
21
|
+
if (n === 59 && c) {
|
|
22
|
+
let r = i.exit("characterReferenceValue");
|
|
23
|
+
return u === t && !e(s.sliceSerialize(r)) ? o(n) : (i.enter("characterReferenceMarker"), i.consume(n), i.exit("characterReferenceMarker"), i.exit("characterReference"), a);
|
|
24
|
+
}
|
|
25
|
+
return u(n) && c++ < l ? (i.consume(n), m) : o(n);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { i as characterReference };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=character-reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-reference.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/character-reference.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { decodeNamedCharacterReference } from 'decode-named-character-reference';\nimport { asciiAlphanumeric, asciiDigit, asciiHexDigit } from 'micromark-util-character';\n/** @type {Construct} */\nexport const characterReference = {\n name: 'characterReference',\n tokenize: tokenizeCharacterReference\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCharacterReference(effects, ok, nok) {\n const self = this;\n let size = 0;\n /** @type {number} */\n let max;\n /** @type {(code: Code) => boolean} */\n let test;\n return start;\n\n /**\n * Start of character reference.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"characterReference\");\n effects.enter(\"characterReferenceMarker\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarker\");\n return open;\n }\n\n /**\n * After `&`, at `#` for numeric references or alphanumeric for named\n * references.\n *\n * ```markdown\n * > | a&b\n * ^\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function open(code) {\n if (code === 35) {\n effects.enter(\"characterReferenceMarkerNumeric\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarkerNumeric\");\n return numeric;\n }\n effects.enter(\"characterReferenceValue\");\n max = 31;\n test = asciiAlphanumeric;\n return value(code);\n }\n\n /**\n * After `#`, at `x` for hexadecimals or digit for decimals.\n *\n * ```markdown\n * > | a{b\n * ^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function numeric(code) {\n if (code === 88 || code === 120) {\n effects.enter(\"characterReferenceMarkerHexadecimal\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarkerHexadecimal\");\n effects.enter(\"characterReferenceValue\");\n max = 6;\n test = asciiHexDigit;\n return value;\n }\n effects.enter(\"characterReferenceValue\");\n max = 7;\n test = asciiDigit;\n return value(code);\n }\n\n /**\n * After markers (`&#x`, `&#`, or `&`), in value, before `;`.\n *\n * The character reference kind defines what and how many characters are\n * allowed.\n *\n * ```markdown\n * > | a&b\n * ^^^\n * > | a{b\n * ^^^\n * > | a	b\n * ^\n * ```\n *\n * @type {State}\n */\n function value(code) {\n if (code === 59 && size) {\n const token = effects.exit(\"characterReferenceValue\");\n if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) {\n return nok(code);\n }\n\n // To do: `markdown-rs` uses a different name:\n // `CharacterReferenceMarkerSemi`.\n effects.enter(\"characterReferenceMarker\");\n effects.consume(code);\n effects.exit(\"characterReferenceMarker\");\n effects.exit(\"characterReference\");\n return ok;\n }\n if (test(code) && size++ < max) {\n effects.consume(code);\n return value;\n }\n return nok(code);\n }\n}"],"x_google_ignoreList":[0],"mappings":";;;AAaA,IAAa,IAAqB;CAChC,MAAM;CACN,UAAU;CACX;AAOD,SAAS,EAA2B,GAAS,GAAI,GAAK;CACpD,IAAM,IAAO,MACT,IAAO,GAEP,GAEA;AACJ,QAAO;CAgBP,SAAS,EAAM,GAAM;AAKnB,SAJA,EAAQ,MAAM,qBAAqB,EACnC,EAAQ,MAAM,2BAA2B,EACzC,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,2BAA2B,EACjC;;CAkBT,SAAS,EAAK,GAAM;AAUlB,SATI,MAAS,MACX,EAAQ,MAAM,kCAAkC,EAChD,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,kCAAkC,EACxC,MAET,EAAQ,MAAM,0BAA0B,EACxC,IAAM,IACN,IAAO,GACA,EAAM,EAAK;;CAepB,SAAS,EAAQ,GAAM;AAarB,SAZI,MAAS,MAAM,MAAS,OAC1B,EAAQ,MAAM,sCAAsC,EACpD,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,sCAAsC,EACnD,EAAQ,MAAM,0BAA0B,EACxC,IAAM,GACN,IAAO,GACA,MAET,EAAQ,MAAM,0BAA0B,EACxC,IAAM,GACN,IAAO,GACA,EAAM,EAAK;;CAoBpB,SAAS,EAAM,GAAM;AACnB,MAAI,MAAS,MAAM,GAAM;GACvB,IAAM,IAAQ,EAAQ,KAAK,0BAA0B;AAWrD,UAVI,MAAS,KAAqB,CAAC,EAA8B,EAAK,eAAe,EAAM,CAAC,GACnF,EAAI,EAAK,IAKlB,EAAQ,MAAM,2BAA2B,EACzC,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,2BAA2B,EACxC,EAAQ,KAAK,qBAAqB,EAC3B;;AAMT,SAJI,EAAK,EAAK,IAAI,MAAS,KACzB,EAAQ,QAAQ,EAAK,EACd,KAEF,EAAI,EAAK"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { markdownLineEnding as e, markdownSpace as t } from "../../micromark-util-character/index.js";
|
|
2
|
+
import { factorySpace as n } from "../../micromark-factory-space/index.js";
|
|
3
|
+
//#region node_modules/micromark-core-commonmark/lib/code-fenced.js
|
|
4
|
+
var r = {
|
|
5
|
+
partial: !0,
|
|
6
|
+
tokenize: o
|
|
7
|
+
}, i = {
|
|
8
|
+
concrete: !0,
|
|
9
|
+
name: "codeFenced",
|
|
10
|
+
tokenize: a
|
|
11
|
+
};
|
|
12
|
+
function a(i, a, o) {
|
|
13
|
+
let s = this, c = {
|
|
14
|
+
partial: !0,
|
|
15
|
+
tokenize: T
|
|
16
|
+
}, l = 0, u = 0, d;
|
|
17
|
+
return f;
|
|
18
|
+
function f(e) {
|
|
19
|
+
return p(e);
|
|
20
|
+
}
|
|
21
|
+
function p(e) {
|
|
22
|
+
let t = s.events[s.events.length - 1];
|
|
23
|
+
return l = t && t[1].type === "linePrefix" ? t[2].sliceSerialize(t[1], !0).length : 0, d = e, i.enter("codeFenced"), i.enter("codeFencedFence"), i.enter("codeFencedFenceSequence"), m(e);
|
|
24
|
+
}
|
|
25
|
+
function m(e) {
|
|
26
|
+
return e === d ? (u++, i.consume(e), m) : u < 3 ? o(e) : (i.exit("codeFencedFenceSequence"), t(e) ? n(i, h, "whitespace")(e) : h(e));
|
|
27
|
+
}
|
|
28
|
+
function h(t) {
|
|
29
|
+
return t === null || e(t) ? (i.exit("codeFencedFence"), s.interrupt ? a(t) : i.check(r, y, w)(t)) : (i.enter("codeFencedFenceInfo"), i.enter("chunkString", { contentType: "string" }), g(t));
|
|
30
|
+
}
|
|
31
|
+
function g(r) {
|
|
32
|
+
return r === null || e(r) ? (i.exit("chunkString"), i.exit("codeFencedFenceInfo"), h(r)) : t(r) ? (i.exit("chunkString"), i.exit("codeFencedFenceInfo"), n(i, _, "whitespace")(r)) : r === 96 && r === d ? o(r) : (i.consume(r), g);
|
|
33
|
+
}
|
|
34
|
+
function _(t) {
|
|
35
|
+
return t === null || e(t) ? h(t) : (i.enter("codeFencedFenceMeta"), i.enter("chunkString", { contentType: "string" }), v(t));
|
|
36
|
+
}
|
|
37
|
+
function v(t) {
|
|
38
|
+
return t === null || e(t) ? (i.exit("chunkString"), i.exit("codeFencedFenceMeta"), h(t)) : t === 96 && t === d ? o(t) : (i.consume(t), v);
|
|
39
|
+
}
|
|
40
|
+
function y(e) {
|
|
41
|
+
return i.attempt(c, w, b)(e);
|
|
42
|
+
}
|
|
43
|
+
function b(e) {
|
|
44
|
+
return i.enter("lineEnding"), i.consume(e), i.exit("lineEnding"), x;
|
|
45
|
+
}
|
|
46
|
+
function x(e) {
|
|
47
|
+
return l > 0 && t(e) ? n(i, S, "linePrefix", l + 1)(e) : S(e);
|
|
48
|
+
}
|
|
49
|
+
function S(t) {
|
|
50
|
+
return t === null || e(t) ? i.check(r, y, w)(t) : (i.enter("codeFlowValue"), C(t));
|
|
51
|
+
}
|
|
52
|
+
function C(t) {
|
|
53
|
+
return t === null || e(t) ? (i.exit("codeFlowValue"), S(t)) : (i.consume(t), C);
|
|
54
|
+
}
|
|
55
|
+
function w(e) {
|
|
56
|
+
return i.exit("codeFenced"), a(e);
|
|
57
|
+
}
|
|
58
|
+
function T(r, i, a) {
|
|
59
|
+
let o = 0;
|
|
60
|
+
return c;
|
|
61
|
+
function c(e) {
|
|
62
|
+
return r.enter("lineEnding"), r.consume(e), r.exit("lineEnding"), l;
|
|
63
|
+
}
|
|
64
|
+
function l(e) {
|
|
65
|
+
return r.enter("codeFencedFence"), t(e) ? n(r, f, "linePrefix", s.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(e) : f(e);
|
|
66
|
+
}
|
|
67
|
+
function f(e) {
|
|
68
|
+
return e === d ? (r.enter("codeFencedFenceSequence"), p(e)) : a(e);
|
|
69
|
+
}
|
|
70
|
+
function p(e) {
|
|
71
|
+
return e === d ? (o++, r.consume(e), p) : o >= u ? (r.exit("codeFencedFenceSequence"), t(e) ? n(r, m, "whitespace")(e) : m(e)) : a(e);
|
|
72
|
+
}
|
|
73
|
+
function m(t) {
|
|
74
|
+
return t === null || e(t) ? (r.exit("codeFencedFence"), i(t)) : a(t);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function o(e, t, n) {
|
|
79
|
+
let r = this;
|
|
80
|
+
return i;
|
|
81
|
+
function i(t) {
|
|
82
|
+
return t === null ? n(t) : (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), a);
|
|
83
|
+
}
|
|
84
|
+
function a(e) {
|
|
85
|
+
return r.parser.lazy[r.now().line] ? n(e) : t(e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { i as codeFenced };
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=code-fenced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-fenced.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/code-fenced.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nconst nonLazyContinuation = {\n partial: true,\n tokenize: tokenizeNonLazyContinuation\n};\n\n/** @type {Construct} */\nexport const codeFenced = {\n concrete: true,\n name: 'codeFenced',\n tokenize: tokenizeCodeFenced\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeFenced(effects, ok, nok) {\n const self = this;\n /** @type {Construct} */\n const closeStart = {\n partial: true,\n tokenize: tokenizeCloseStart\n };\n let initialPrefix = 0;\n let sizeOpen = 0;\n /** @type {NonNullable<Code>} */\n let marker;\n return start;\n\n /**\n * Start of code.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: parse whitespace like `markdown-rs`.\n return beforeSequenceOpen(code);\n }\n\n /**\n * In opening fence, after prefix, at sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeSequenceOpen(code) {\n const tail = self.events[self.events.length - 1];\n initialPrefix = tail && tail[1].type === \"linePrefix\" ? tail[2].sliceSerialize(tail[1], true).length : 0;\n marker = code;\n effects.enter(\"codeFenced\");\n effects.enter(\"codeFencedFence\");\n effects.enter(\"codeFencedFenceSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening fence sequence.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === marker) {\n sizeOpen++;\n effects.consume(code);\n return sequenceOpen;\n }\n if (sizeOpen < 3) {\n return nok(code);\n }\n effects.exit(\"codeFencedFenceSequence\");\n return markdownSpace(code) ? factorySpace(effects, infoBefore, \"whitespace\")(code) : infoBefore(code);\n }\n\n /**\n * In opening fence, after the sequence (and optional whitespace), before info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function infoBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFencedFence\");\n return self.interrupt ? ok(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);\n }\n effects.enter(\"codeFencedFenceInfo\");\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return info(code);\n }\n\n /**\n * In info.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function info(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceInfo\");\n return infoBefore(code);\n }\n if (markdownSpace(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceInfo\");\n return factorySpace(effects, metaBefore, \"whitespace\")(code);\n }\n if (code === 96 && code === marker) {\n return nok(code);\n }\n effects.consume(code);\n return info;\n }\n\n /**\n * In opening fence, after info and whitespace, before meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function metaBefore(code) {\n if (code === null || markdownLineEnding(code)) {\n return infoBefore(code);\n }\n effects.enter(\"codeFencedFenceMeta\");\n effects.enter(\"chunkString\", {\n contentType: \"string\"\n });\n return meta(code);\n }\n\n /**\n * In meta.\n *\n * ```markdown\n * > | ~~~js eval\n * ^\n * | alert(1)\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function meta(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"chunkString\");\n effects.exit(\"codeFencedFenceMeta\");\n return infoBefore(code);\n }\n if (code === 96 && code === marker) {\n return nok(code);\n }\n effects.consume(code);\n return meta;\n }\n\n /**\n * At eol/eof in code, before a non-lazy closing fence or content.\n *\n * ```markdown\n * > | ~~~js\n * ^\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function atNonLazyBreak(code) {\n return effects.attempt(closeStart, after, contentBefore)(code);\n }\n\n /**\n * Before code content, not a closing fence, at eol.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentBefore(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return contentStart;\n }\n\n /**\n * Before code content, not a closing fence.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentStart(code) {\n return initialPrefix > 0 && markdownSpace(code) ? factorySpace(effects, beforeContentChunk, \"linePrefix\", initialPrefix + 1)(code) : beforeContentChunk(code);\n }\n\n /**\n * Before code content, after optional prefix.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function beforeContentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);\n }\n effects.enter(\"codeFlowValue\");\n return contentChunk(code);\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * | ~~~js\n * > | alert(1)\n * ^^^^^^^^\n * | ~~~\n * ```\n *\n * @type {State}\n */\n function contentChunk(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFlowValue\");\n return beforeContentChunk(code);\n }\n effects.consume(code);\n return contentChunk;\n }\n\n /**\n * After code.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function after(code) {\n effects.exit(\"codeFenced\");\n return ok(code);\n }\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\n function tokenizeCloseStart(effects, ok, nok) {\n let size = 0;\n return startBefore;\n\n /**\n *\n *\n * @type {State}\n */\n function startBefore(code) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return start;\n }\n\n /**\n * Before closing fence, at optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // Always populated by defaults.\n\n // To do: `enter` here or in next state?\n effects.enter(\"codeFencedFence\");\n return markdownSpace(code) ? factorySpace(effects, beforeSequenceClose, \"linePrefix\", self.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4)(code) : beforeSequenceClose(code);\n }\n\n /**\n * In closing fence, after optional whitespace, at sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function beforeSequenceClose(code) {\n if (code === marker) {\n effects.enter(\"codeFencedFenceSequence\");\n return sequenceClose(code);\n }\n return nok(code);\n }\n\n /**\n * In closing fence sequence.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n if (code === marker) {\n size++;\n effects.consume(code);\n return sequenceClose;\n }\n if (size >= sizeOpen) {\n effects.exit(\"codeFencedFenceSequence\");\n return markdownSpace(code) ? factorySpace(effects, sequenceCloseAfter, \"whitespace\")(code) : sequenceCloseAfter(code);\n }\n return nok(code);\n }\n\n /**\n * After closing fence sequence, after optional whitespace.\n *\n * ```markdown\n * | ~~~js\n * | alert(1)\n * > | ~~~\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceCloseAfter(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFencedFence\");\n return ok(code);\n }\n return nok(code);\n }\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeNonLazyContinuation(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n *\n *\n * @type {State}\n */\n function start(code) {\n if (code === null) {\n return nok(code);\n }\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return lineStart;\n }\n\n /**\n *\n *\n * @type {State}\n */\n function lineStart(code) {\n return self.parser.lazy[self.now().line] ? nok(code) : ok(code);\n }\n}"],"x_google_ignoreList":[0],"mappings":";;;AAaA,IAAM,IAAsB;CAC1B,SAAS;CACT,UAAU;CACX,EAGY,IAAa;CACxB,UAAU;CACV,MAAM;CACN,UAAU;CACX;AAOD,SAAS,EAAmB,GAAS,GAAI,GAAK;CAC5C,IAAM,IAAO,MAEP,IAAa;EACjB,SAAS;EACT,UAAU;EACX,EACG,IAAgB,GAChB,IAAW,GAEX;AACJ,QAAO;CAcP,SAAS,EAAM,GAAM;AAEnB,SAAO,EAAmB,EAAK;;CAejC,SAAS,EAAmB,GAAM;EAChC,IAAM,IAAO,EAAK,OAAO,EAAK,OAAO,SAAS;AAM9C,SALA,IAAgB,KAAQ,EAAK,GAAG,SAAS,eAAe,EAAK,GAAG,eAAe,EAAK,IAAI,GAAK,CAAC,SAAS,GACvG,IAAS,GACT,EAAQ,MAAM,aAAa,EAC3B,EAAQ,MAAM,kBAAkB,EAChC,EAAQ,MAAM,0BAA0B,EACjC,EAAa,EAAK;;CAe3B,SAAS,EAAa,GAAM;AAU1B,SATI,MAAS,KACX,KACA,EAAQ,QAAQ,EAAK,EACd,KAEL,IAAW,IACN,EAAI,EAAK,IAElB,EAAQ,KAAK,0BAA0B,EAChC,EAAc,EAAK,GAAG,EAAa,GAAS,GAAY,aAAa,CAAC,EAAK,GAAG,EAAW,EAAK;;CAevG,SAAS,EAAW,GAAM;AASxB,SARI,MAAS,QAAQ,EAAmB,EAAK,IAC3C,EAAQ,KAAK,kBAAkB,EACxB,EAAK,YAAY,EAAG,EAAK,GAAG,EAAQ,MAAM,GAAqB,GAAgB,EAAM,CAAC,EAAK,KAEpG,EAAQ,MAAM,sBAAsB,EACpC,EAAQ,MAAM,eAAe,EAC3B,aAAa,UACd,CAAC,EACK,EAAK,EAAK;;CAenB,SAAS,EAAK,GAAM;AAelB,SAdI,MAAS,QAAQ,EAAmB,EAAK,IAC3C,EAAQ,KAAK,cAAc,EAC3B,EAAQ,KAAK,sBAAsB,EAC5B,EAAW,EAAK,IAErB,EAAc,EAAK,IACrB,EAAQ,KAAK,cAAc,EAC3B,EAAQ,KAAK,sBAAsB,EAC5B,EAAa,GAAS,GAAY,aAAa,CAAC,EAAK,IAE1D,MAAS,MAAM,MAAS,IACnB,EAAI,EAAK,IAElB,EAAQ,QAAQ,EAAK,EACd;;CAeT,SAAS,EAAW,GAAM;AAQxB,SAPI,MAAS,QAAQ,EAAmB,EAAK,GACpC,EAAW,EAAK,IAEzB,EAAQ,MAAM,sBAAsB,EACpC,EAAQ,MAAM,eAAe,EAC3B,aAAa,UACd,CAAC,EACK,EAAK,EAAK;;CAenB,SAAS,EAAK,GAAM;AAUlB,SATI,MAAS,QAAQ,EAAmB,EAAK,IAC3C,EAAQ,KAAK,cAAc,EAC3B,EAAQ,KAAK,sBAAsB,EAC5B,EAAW,EAAK,IAErB,MAAS,MAAM,MAAS,IACnB,EAAI,EAAK,IAElB,EAAQ,QAAQ,EAAK,EACd;;CAgBT,SAAS,EAAe,GAAM;AAC5B,SAAO,EAAQ,QAAQ,GAAY,GAAO,EAAc,CAAC,EAAK;;CAehE,SAAS,EAAc,GAAM;AAI3B,SAHA,EAAQ,MAAM,aAAa,EAC3B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,aAAa,EACnB;;CAeT,SAAS,EAAa,GAAM;AAC1B,SAAO,IAAgB,KAAK,EAAc,EAAK,GAAG,EAAa,GAAS,GAAoB,cAAc,IAAgB,EAAE,CAAC,EAAK,GAAG,EAAmB,EAAK;;CAe/J,SAAS,EAAmB,GAAM;AAKhC,SAJI,MAAS,QAAQ,EAAmB,EAAK,GACpC,EAAQ,MAAM,GAAqB,GAAgB,EAAM,CAAC,EAAK,IAExE,EAAQ,MAAM,gBAAgB,EACvB,EAAa,EAAK;;CAe3B,SAAS,EAAa,GAAM;AAM1B,SALI,MAAS,QAAQ,EAAmB,EAAK,IAC3C,EAAQ,KAAK,gBAAgB,EACtB,EAAmB,EAAK,KAEjC,EAAQ,QAAQ,EAAK,EACd;;CAeT,SAAS,EAAM,GAAM;AAEnB,SADA,EAAQ,KAAK,aAAa,EACnB,EAAG,EAAK;;CAQjB,SAAS,EAAmB,GAAS,GAAI,GAAK;EAC5C,IAAI,IAAO;AACX,SAAO;EAOP,SAAS,EAAY,GAAM;AAIzB,UAHA,EAAQ,MAAM,aAAa,EAC3B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,aAAa,EACnB;;EAeT,SAAS,EAAM,GAAM;AAKnB,UADA,EAAQ,MAAM,kBAAkB,EACzB,EAAc,EAAK,GAAG,EAAa,GAAS,GAAqB,cAAc,EAAK,OAAO,WAAW,QAAQ,KAAK,SAAS,eAAe,GAAG,KAAA,IAAY,EAAE,CAAC,EAAK,GAAG,EAAoB,EAAK;;EAevM,SAAS,EAAoB,GAAM;AAKjC,UAJI,MAAS,KACX,EAAQ,MAAM,0BAA0B,EACjC,EAAc,EAAK,IAErB,EAAI,EAAK;;EAelB,SAAS,EAAc,GAAM;AAU3B,UATI,MAAS,KACX,KACA,EAAQ,QAAQ,EAAK,EACd,KAEL,KAAQ,KACV,EAAQ,KAAK,0BAA0B,EAChC,EAAc,EAAK,GAAG,EAAa,GAAS,GAAoB,aAAa,CAAC,EAAK,GAAG,EAAmB,EAAK,IAEhH,EAAI,EAAK;;EAelB,SAAS,EAAmB,GAAM;AAKhC,UAJI,MAAS,QAAQ,EAAmB,EAAK,IAC3C,EAAQ,KAAK,kBAAkB,EACxB,EAAG,EAAK,IAEV,EAAI,EAAK;;;;AAUtB,SAAS,EAA4B,GAAS,GAAI,GAAK;CACrD,IAAM,IAAO;AACb,QAAO;CAOP,SAAS,EAAM,GAAM;AAOnB,SANI,MAAS,OACJ,EAAI,EAAK,IAElB,EAAQ,MAAM,aAAa,EAC3B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,aAAa,EACnB;;CAQT,SAAS,EAAU,GAAM;AACvB,SAAO,EAAK,OAAO,KAAK,EAAK,KAAK,CAAC,QAAQ,EAAI,EAAK,GAAG,EAAG,EAAK"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { markdownLineEnding as e } from "../../micromark-util-character/index.js";
|
|
2
|
+
import { factorySpace as t } from "../../micromark-factory-space/index.js";
|
|
3
|
+
//#region node_modules/micromark-core-commonmark/lib/code-indented.js
|
|
4
|
+
var n = {
|
|
5
|
+
name: "codeIndented",
|
|
6
|
+
tokenize: i
|
|
7
|
+
}, r = {
|
|
8
|
+
partial: !0,
|
|
9
|
+
tokenize: a
|
|
10
|
+
};
|
|
11
|
+
function i(n, i, a) {
|
|
12
|
+
let o = this;
|
|
13
|
+
return s;
|
|
14
|
+
function s(e) {
|
|
15
|
+
return n.enter("codeIndented"), t(n, c, "linePrefix", 5)(e);
|
|
16
|
+
}
|
|
17
|
+
function c(e) {
|
|
18
|
+
let t = o.events[o.events.length - 1];
|
|
19
|
+
return t && t[1].type === "linePrefix" && t[2].sliceSerialize(t[1], !0).length >= 4 ? l(e) : a(e);
|
|
20
|
+
}
|
|
21
|
+
function l(t) {
|
|
22
|
+
return t === null ? d(t) : e(t) ? n.attempt(r, l, d)(t) : (n.enter("codeFlowValue"), u(t));
|
|
23
|
+
}
|
|
24
|
+
function u(t) {
|
|
25
|
+
return t === null || e(t) ? (n.exit("codeFlowValue"), l(t)) : (n.consume(t), u);
|
|
26
|
+
}
|
|
27
|
+
function d(e) {
|
|
28
|
+
return n.exit("codeIndented"), i(e);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function a(n, r, i) {
|
|
32
|
+
let a = this;
|
|
33
|
+
return o;
|
|
34
|
+
function o(r) {
|
|
35
|
+
return a.parser.lazy[a.now().line] ? i(r) : e(r) ? (n.enter("lineEnding"), n.consume(r), n.exit("lineEnding"), o) : t(n, s, "linePrefix", 5)(r);
|
|
36
|
+
}
|
|
37
|
+
function s(t) {
|
|
38
|
+
let n = a.events[a.events.length - 1];
|
|
39
|
+
return n && n[1].type === "linePrefix" && n[2].sliceSerialize(n[1], !0).length >= 4 ? r(t) : e(t) ? o(t) : i(t);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { n as codeIndented };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=code-indented.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-indented.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/code-indented.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * State,\n * TokenizeContext,\n * Tokenizer\n * } from 'micromark-util-types'\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding, markdownSpace } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeIndented = {\n name: 'codeIndented',\n tokenize: tokenizeCodeIndented\n};\n\n/** @type {Construct} */\nconst furtherStart = {\n partial: true,\n tokenize: tokenizeFurtherStart\n};\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeIndented(effects, ok, nok) {\n const self = this;\n return start;\n\n /**\n * Start of code (indented).\n *\n * > **Parsing note**: it is not needed to check if this first line is a\n * > filled line (that it has a non-whitespace character), because blank lines\n * > are parsed already, so we never run into that.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n // To do: manually check if interrupting like `markdown-rs`.\n\n effects.enter(\"codeIndented\");\n // To do: use an improved `space_or_tab` function like `markdown-rs`,\n // so that we can drop the next state.\n return factorySpace(effects, afterPrefix, \"linePrefix\", 4 + 1)(code);\n }\n\n /**\n * At start, after 1 or 4 spaces.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === \"linePrefix\" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? atBreak(code) : nok(code);\n }\n\n /**\n * At a break.\n *\n * ```markdown\n * > | aaa\n * ^ ^\n * ```\n *\n * @type {State}\n */\n function atBreak(code) {\n if (code === null) {\n return after(code);\n }\n if (markdownLineEnding(code)) {\n return effects.attempt(furtherStart, atBreak, after)(code);\n }\n effects.enter(\"codeFlowValue\");\n return inside(code);\n }\n\n /**\n * In code content.\n *\n * ```markdown\n * > | aaa\n * ^^^^\n * ```\n *\n * @type {State}\n */\n function inside(code) {\n if (code === null || markdownLineEnding(code)) {\n effects.exit(\"codeFlowValue\");\n return atBreak(code);\n }\n effects.consume(code);\n return inside;\n }\n\n /** @type {State} */\n function after(code) {\n effects.exit(\"codeIndented\");\n // To do: allow interrupting like `markdown-rs`.\n // Feel free to interrupt.\n // tokenizer.interrupt = false\n return ok(code);\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeFurtherStart(effects, ok, nok) {\n const self = this;\n return furtherStart;\n\n /**\n * At eol, trying to parse another indent.\n *\n * ```markdown\n * > | aaa\n * ^\n * | bbb\n * ```\n *\n * @type {State}\n */\n function furtherStart(code) {\n // To do: improve `lazy` / `pierce` handling.\n // If this is a lazy line, it can’t be code.\n if (self.parser.lazy[self.now().line]) {\n return nok(code);\n }\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return furtherStart;\n }\n\n // To do: the code here in `micromark-js` is a bit different from\n // `markdown-rs` because there it can attempt spaces.\n // We can’t yet.\n //\n // To do: use an improved `space_or_tab` function like `markdown-rs`,\n // so that we can drop the next state.\n return factorySpace(effects, afterPrefix, \"linePrefix\", 4 + 1)(code);\n }\n\n /**\n * At start, after 1 or 4 spaces.\n *\n * ```markdown\n * > | aaa\n * ^\n * ```\n *\n * @type {State}\n */\n function afterPrefix(code) {\n const tail = self.events[self.events.length - 1];\n return tail && tail[1].type === \"linePrefix\" && tail[2].sliceSerialize(tail[1], true).length >= 4 ? ok(code) : markdownLineEnding(code) ? furtherStart(code) : nok(code);\n }\n}"],"x_google_ignoreList":[0],"mappings":";;;AAYA,IAAa,IAAe;CAC1B,MAAM;CACN,UAAU;CACX,EAGK,IAAe;CACnB,SAAS;CACT,UAAU;CACX;AAOD,SAAS,EAAqB,GAAS,GAAI,GAAK;CAC9C,IAAM,IAAO;AACb,QAAO;CAgBP,SAAS,EAAM,GAAM;AAMnB,SAHA,EAAQ,MAAM,eAAe,EAGtB,EAAa,GAAS,GAAa,cAAc,EAAM,CAAC,EAAK;;CAatE,SAAS,EAAY,GAAM;EACzB,IAAM,IAAO,EAAK,OAAO,EAAK,OAAO,SAAS;AAC9C,SAAO,KAAQ,EAAK,GAAG,SAAS,gBAAgB,EAAK,GAAG,eAAe,EAAK,IAAI,GAAK,CAAC,UAAU,IAAI,EAAQ,EAAK,GAAG,EAAI,EAAK;;CAa/H,SAAS,EAAQ,GAAM;AAQrB,SAPI,MAAS,OACJ,EAAM,EAAK,GAEhB,EAAmB,EAAK,GACnB,EAAQ,QAAQ,GAAc,GAAS,EAAM,CAAC,EAAK,IAE5D,EAAQ,MAAM,gBAAgB,EACvB,EAAO,EAAK;;CAarB,SAAS,EAAO,GAAM;AAMpB,SALI,MAAS,QAAQ,EAAmB,EAAK,IAC3C,EAAQ,KAAK,gBAAgB,EACtB,EAAQ,EAAK,KAEtB,EAAQ,QAAQ,EAAK,EACd;;CAIT,SAAS,EAAM,GAAM;AAKnB,SAJA,EAAQ,KAAK,eAAe,EAIrB,EAAG,EAAK;;;AASnB,SAAS,EAAqB,GAAS,GAAI,GAAK;CAC9C,IAAM,IAAO;AACb,QAAO;CAaP,SAAS,EAAa,GAAM;AAmB1B,SAhBI,EAAK,OAAO,KAAK,EAAK,KAAK,CAAC,QACvB,EAAI,EAAK,GAEd,EAAmB,EAAK,IAC1B,EAAQ,MAAM,aAAa,EAC3B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,aAAa,EACnB,KASF,EAAa,GAAS,GAAa,cAAc,EAAM,CAAC,EAAK;;CAatE,SAAS,EAAY,GAAM;EACzB,IAAM,IAAO,EAAK,OAAO,EAAK,OAAO,SAAS;AAC9C,SAAO,KAAQ,EAAK,GAAG,SAAS,gBAAgB,EAAK,GAAG,eAAe,EAAK,IAAI,GAAK,CAAC,UAAU,IAAI,EAAG,EAAK,GAAG,EAAmB,EAAK,GAAG,EAAa,EAAK,GAAG,EAAI,EAAK"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { markdownLineEnding as e } from "../../micromark-util-character/index.js";
|
|
2
|
+
//#region node_modules/micromark-core-commonmark/lib/code-text.js
|
|
3
|
+
var t = {
|
|
4
|
+
name: "codeText",
|
|
5
|
+
previous: r,
|
|
6
|
+
resolve: n,
|
|
7
|
+
tokenize: i
|
|
8
|
+
};
|
|
9
|
+
function n(e) {
|
|
10
|
+
let t = e.length - 4, n = 3, r, i;
|
|
11
|
+
if ((e[n][1].type === "lineEnding" || e[n][1].type === "space") && (e[t][1].type === "lineEnding" || e[t][1].type === "space")) {
|
|
12
|
+
for (r = n; ++r < t;) if (e[r][1].type === "codeTextData") {
|
|
13
|
+
e[n][1].type = "codeTextPadding", e[t][1].type = "codeTextPadding", n += 2, t -= 2;
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
for (r = n - 1, t++; ++r <= t;) i === void 0 ? r !== t && e[r][1].type !== "lineEnding" && (i = r) : (r === t || e[r][1].type === "lineEnding") && (e[i][1].type = "codeTextData", r !== i + 2 && (e[i][1].end = e[r - 1][1].end, e.splice(i + 2, r - i - 2), t -= r - i - 2, r = i + 2), i = void 0);
|
|
18
|
+
return e;
|
|
19
|
+
}
|
|
20
|
+
function r(e) {
|
|
21
|
+
return e !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
|
|
22
|
+
}
|
|
23
|
+
function i(t, n, r) {
|
|
24
|
+
let i = 0, a, o;
|
|
25
|
+
return s;
|
|
26
|
+
function s(e) {
|
|
27
|
+
return t.enter("codeText"), t.enter("codeTextSequence"), c(e);
|
|
28
|
+
}
|
|
29
|
+
function c(e) {
|
|
30
|
+
return e === 96 ? (t.consume(e), i++, c) : (t.exit("codeTextSequence"), l(e));
|
|
31
|
+
}
|
|
32
|
+
function l(n) {
|
|
33
|
+
return n === null ? r(n) : n === 32 ? (t.enter("space"), t.consume(n), t.exit("space"), l) : n === 96 ? (o = t.enter("codeTextSequence"), a = 0, d(n)) : e(n) ? (t.enter("lineEnding"), t.consume(n), t.exit("lineEnding"), l) : (t.enter("codeTextData"), u(n));
|
|
34
|
+
}
|
|
35
|
+
function u(n) {
|
|
36
|
+
return n === null || n === 32 || n === 96 || e(n) ? (t.exit("codeTextData"), l(n)) : (t.consume(n), u);
|
|
37
|
+
}
|
|
38
|
+
function d(e) {
|
|
39
|
+
return e === 96 ? (t.consume(e), a++, d) : a === i ? (t.exit("codeTextSequence"), t.exit("codeText"), n(e)) : (o.type = "codeTextData", u(e));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { t as codeText };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=code-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-text.js","names":[],"sources":["../../../../node_modules/micromark-core-commonmark/lib/code-text.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * Previous,\n * Resolver,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\nimport { markdownLineEnding } from 'micromark-util-character';\n/** @type {Construct} */\nexport const codeText = {\n name: 'codeText',\n previous,\n resolve: resolveCodeText,\n tokenize: tokenizeCodeText\n};\n\n// To do: next major: don’t resolve, like `markdown-rs`.\n/** @type {Resolver} */\nfunction resolveCodeText(events) {\n let tailExitIndex = events.length - 4;\n let headEnterIndex = 3;\n /** @type {number} */\n let index;\n /** @type {number | undefined} */\n let enter;\n\n // If we start and end with an EOL or a space.\n if ((events[headEnterIndex][1].type === \"lineEnding\" || events[headEnterIndex][1].type === 'space') && (events[tailExitIndex][1].type === \"lineEnding\" || events[tailExitIndex][1].type === 'space')) {\n index = headEnterIndex;\n\n // And we have data.\n while (++index < tailExitIndex) {\n if (events[index][1].type === \"codeTextData\") {\n // Then we have padding.\n events[headEnterIndex][1].type = \"codeTextPadding\";\n events[tailExitIndex][1].type = \"codeTextPadding\";\n headEnterIndex += 2;\n tailExitIndex -= 2;\n break;\n }\n }\n }\n\n // Merge adjacent spaces and data.\n index = headEnterIndex - 1;\n tailExitIndex++;\n while (++index <= tailExitIndex) {\n if (enter === undefined) {\n if (index !== tailExitIndex && events[index][1].type !== \"lineEnding\") {\n enter = index;\n }\n } else if (index === tailExitIndex || events[index][1].type === \"lineEnding\") {\n events[enter][1].type = \"codeTextData\";\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n tailExitIndex -= index - enter - 2;\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return events;\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Previous}\n */\nfunction previous(code) {\n // If there is a previous code, there will always be a tail.\n return code !== 96 || this.events[this.events.length - 1][1].type === \"characterEscape\";\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n */\nfunction tokenizeCodeText(effects, ok, nok) {\n const self = this;\n let sizeOpen = 0;\n /** @type {number} */\n let size;\n /** @type {Token} */\n let token;\n return start;\n\n /**\n * Start of code (text).\n *\n * ```markdown\n * > | `a`\n * ^\n * > | \\`a`\n * ^\n * ```\n *\n * @type {State}\n */\n function start(code) {\n effects.enter(\"codeText\");\n effects.enter(\"codeTextSequence\");\n return sequenceOpen(code);\n }\n\n /**\n * In opening sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceOpen(code) {\n if (code === 96) {\n effects.consume(code);\n sizeOpen++;\n return sequenceOpen;\n }\n effects.exit(\"codeTextSequence\");\n return between(code);\n }\n\n /**\n * Between something and something else.\n *\n * ```markdown\n * > | `a`\n * ^^\n * ```\n *\n * @type {State}\n */\n function between(code) {\n // EOF.\n if (code === null) {\n return nok(code);\n }\n\n // To do: next major: don’t do spaces in resolve, but when compiling,\n // like `markdown-rs`.\n // Tabs don’t work, and virtual spaces don’t make sense.\n if (code === 32) {\n effects.enter('space');\n effects.consume(code);\n effects.exit('space');\n return between;\n }\n\n // Closing fence? Could also be data.\n if (code === 96) {\n token = effects.enter(\"codeTextSequence\");\n size = 0;\n return sequenceClose(code);\n }\n if (markdownLineEnding(code)) {\n effects.enter(\"lineEnding\");\n effects.consume(code);\n effects.exit(\"lineEnding\");\n return between;\n }\n\n // Data.\n effects.enter(\"codeTextData\");\n return data(code);\n }\n\n /**\n * In data.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function data(code) {\n if (code === null || code === 32 || code === 96 || markdownLineEnding(code)) {\n effects.exit(\"codeTextData\");\n return between(code);\n }\n effects.consume(code);\n return data;\n }\n\n /**\n * In closing sequence.\n *\n * ```markdown\n * > | `a`\n * ^\n * ```\n *\n * @type {State}\n */\n function sequenceClose(code) {\n // More.\n if (code === 96) {\n effects.consume(code);\n size++;\n return sequenceClose;\n }\n\n // Done!\n if (size === sizeOpen) {\n effects.exit(\"codeTextSequence\");\n effects.exit(\"codeText\");\n return ok(code);\n }\n\n // More or less accents: mark as data.\n token.type = \"codeTextData\";\n return data(code);\n }\n}"],"x_google_ignoreList":[0],"mappings":";;AAcA,IAAa,IAAW;CACtB,MAAM;CACN;CACA,SAAS;CACT,UAAU;CACX;AAID,SAAS,EAAgB,GAAQ;CAC/B,IAAI,IAAgB,EAAO,SAAS,GAChC,IAAiB,GAEjB,GAEA;AAGJ,MAAK,EAAO,GAAgB,GAAG,SAAS,gBAAgB,EAAO,GAAgB,GAAG,SAAS,aAAa,EAAO,GAAe,GAAG,SAAS,gBAAgB,EAAO,GAAe,GAAG,SAAS,UAI1L;OAHA,IAAQ,GAGD,EAAE,IAAQ,GACf,KAAI,EAAO,GAAO,GAAG,SAAS,gBAAgB;AAK5C,GAHA,EAAO,GAAgB,GAAG,OAAO,mBACjC,EAAO,GAAe,GAAG,OAAO,mBAChC,KAAkB,GAClB,KAAiB;AACjB;;;AAQN,MAFA,IAAQ,IAAiB,GACzB,KACO,EAAE,KAAS,GAChB,CAAI,MAAU,KAAA,IACR,MAAU,KAAiB,EAAO,GAAO,GAAG,SAAS,iBACvD,IAAQ,MAED,MAAU,KAAiB,EAAO,GAAO,GAAG,SAAS,kBAC9D,EAAO,GAAO,GAAG,OAAO,gBACpB,MAAU,IAAQ,MACpB,EAAO,GAAO,GAAG,MAAM,EAAO,IAAQ,GAAG,GAAG,KAC5C,EAAO,OAAO,IAAQ,GAAG,IAAQ,IAAQ,EAAE,EAC3C,KAAiB,IAAQ,IAAQ,GACjC,IAAQ,IAAQ,IAElB,IAAQ,KAAA;AAGZ,QAAO;;AAQT,SAAS,EAAS,GAAM;AAEtB,QAAO,MAAS,MAAM,KAAK,OAAO,KAAK,OAAO,SAAS,GAAG,GAAG,SAAS;;AAQxE,SAAS,EAAiB,GAAS,GAAI,GAAK;CAE1C,IAAI,IAAW,GAEX,GAEA;AACJ,QAAO;CAcP,SAAS,EAAM,GAAM;AAGnB,SAFA,EAAQ,MAAM,WAAW,EACzB,EAAQ,MAAM,mBAAmB,EAC1B,EAAa,EAAK;;CAa3B,SAAS,EAAa,GAAM;AAO1B,SANI,MAAS,MACX,EAAQ,QAAQ,EAAK,EACrB,KACO,MAET,EAAQ,KAAK,mBAAmB,EACzB,EAAQ,EAAK;;CAatB,SAAS,EAAQ,GAAM;AA+BrB,SA7BI,MAAS,OACJ,EAAI,EAAK,GAMd,MAAS,MACX,EAAQ,MAAM,QAAQ,EACtB,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,QAAQ,EACd,KAIL,MAAS,MACX,IAAQ,EAAQ,MAAM,mBAAmB,EACzC,IAAO,GACA,EAAc,EAAK,IAExB,EAAmB,EAAK,IAC1B,EAAQ,MAAM,aAAa,EAC3B,EAAQ,QAAQ,EAAK,EACrB,EAAQ,KAAK,aAAa,EACnB,MAIT,EAAQ,MAAM,eAAe,EACtB,EAAK,EAAK;;CAanB,SAAS,EAAK,GAAM;AAMlB,SALI,MAAS,QAAQ,MAAS,MAAM,MAAS,MAAM,EAAmB,EAAK,IACzE,EAAQ,KAAK,eAAe,EACrB,EAAQ,EAAK,KAEtB,EAAQ,QAAQ,EAAK,EACd;;CAaT,SAAS,EAAc,GAAM;AAiB3B,SAfI,MAAS,MACX,EAAQ,QAAQ,EAAK,EACrB,KACO,KAIL,MAAS,KACX,EAAQ,KAAK,mBAAmB,EAChC,EAAQ,KAAK,WAAW,EACjB,EAAG,EAAK,KAIjB,EAAM,OAAO,gBACN,EAAK,EAAK"}
|