@plumile/ui 0.1.75 → 0.1.76
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/lib/esm/BackofficeJsonViewerAsync-Dp6ZKmmh.js +10 -0
- package/lib/esm/{BackofficeJsonViewerAsync-BqnC0d9x.js.map → BackofficeJsonViewerAsync-Dp6ZKmmh.js.map} +1 -1
- package/lib/esm/{HighlightCode-D0K9Mu5z.js → HighlightCode-C-xPmbUz.js} +1 -1
- package/lib/esm/{HighlightCode-D0K9Mu5z.js.map → HighlightCode-C-xPmbUz.js.map} +1 -1
- package/lib/esm/{MarkdownCodeBlock-BDeLrln4.js → MarkdownCodeBlock-x4jjzmDF.js} +3 -3
- package/lib/esm/{MarkdownCodeBlock-BDeLrln4.js.map → MarkdownCodeBlock-x4jjzmDF.js.map} +1 -1
- package/lib/esm/{MarkdownRenderer-CcygHNM6.js → MarkdownRenderer-BchAuwsI.js} +4 -4
- package/lib/esm/MarkdownRenderer-BchAuwsI.js.map +1 -0
- package/lib/esm/{MarkdownShikiCodeBlock-DZHuMbsP.js → MarkdownShikiCodeBlock-Dj-585Pp.js} +2 -2
- package/lib/esm/{MarkdownShikiCodeBlock-DZHuMbsP.js.map → MarkdownShikiCodeBlock-Dj-585Pp.js.map} +1 -1
- package/lib/esm/{src-BVQTfa2M.js → src-DbOGCrwx.js} +17 -17
- package/lib/esm/src-DbOGCrwx.js.map +1 -0
- package/lib/esm/style.css +1 -1
- package/lib/esm/ui.js +5 -5
- package/lib/types/admin/theme/AdminThemeProvider.d.ts +2 -0
- package/lib/types/admin/theme/AdminThemeProvider.d.ts.map +1 -1
- package/lib/types/theme/ThemeProvider.d.ts +2 -0
- package/lib/types/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/types/theme/sprinkles.css.d.ts +532 -532
- package/package.json +4 -4
- package/src/i18n/locales/en/ui.json +23 -0
- package/src/i18n/locales/fr/ui.json +23 -0
- package/lib/esm/BackofficeJsonViewerAsync-BqnC0d9x.js +0 -10
- package/lib/esm/MarkdownRenderer-CcygHNM6.js.map +0 -1
- package/lib/esm/src-BVQTfa2M.js.map +0 -1
package/lib/esm/{MarkdownShikiCodeBlock-DZHuMbsP.js.map → MarkdownShikiCodeBlock-Dj-585Pp.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownShikiCodeBlock-DZHuMbsP.js","names":["stringify","emptyOptions","types","html","svg","cap","find","html","htmlBase","svgBase","stringify","point","own","html","one","element","root","text","find","commas","spaces","name","isIdentifierName","__defProp","ShikiError","ShikiError","Registry","toArray","ShikiError","codeToTokensBase","getLastGrammarState","codeToTokensWithThemes","own","own","emptyChildren","html","body","tbody","find","commas","spaces","html","splitLines$1","ShikiError$1","codeToTokensBase","codeToTokensBase$1","codeToTokens","codeToHast","codeToHtml","createShikiPrimitiveAsync$1","getLastGrammarState","useRef2","import__shikijs_engine_oniguruma"],"sources":["../../../../node_modules/comma-separated-tokens/index.js","../../../../node_modules/devlop/lib/default.js","../../../../node_modules/estree-util-is-identifier-name/lib/index.js","../../../../node_modules/hast-util-whitespace/lib/index.js","../../../../node_modules/property-information/lib/util/schema.js","../../../../node_modules/property-information/lib/util/merge.js","../../../../node_modules/property-information/lib/normalize.js","../../../../node_modules/property-information/lib/util/info.js","../../../../node_modules/property-information/lib/util/types.js","../../../../node_modules/property-information/lib/util/defined-info.js","../../../../node_modules/property-information/lib/util/create.js","../../../../node_modules/property-information/lib/aria.js","../../../../node_modules/property-information/lib/util/case-sensitive-transform.js","../../../../node_modules/property-information/lib/util/case-insensitive-transform.js","../../../../node_modules/property-information/lib/html.js","../../../../node_modules/property-information/lib/svg.js","../../../../node_modules/property-information/lib/xlink.js","../../../../node_modules/property-information/lib/xmlns.js","../../../../node_modules/property-information/lib/xml.js","../../../../node_modules/property-information/lib/hast-to-react.js","../../../../node_modules/property-information/lib/find.js","../../../../node_modules/property-information/index.js","../../../../node_modules/space-separated-tokens/index.js","../../../../node_modules/inline-style-parser/cjs/index.js","../../../../node_modules/style-to-object/cjs/index.js","../../../../node_modules/style-to-js/cjs/utilities.js","../../../../node_modules/style-to-js/cjs/index.js","../../../../node_modules/unist-util-position/lib/index.js","../../../../node_modules/unist-util-stringify-position/lib/index.js","../../../../node_modules/vfile-message/lib/index.js","../../../../node_modules/hast-util-to-jsx-runtime/lib/index.js","../../../../node_modules/shiki/dist/chunk-CtajNgzt.mjs","../../../../node_modules/@shikijs/core/node_modules/@shikijs/types/dist/index.mjs","../../../../node_modules/@shikijs/primitive/node_modules/@shikijs/types/dist/index.mjs","../../../../node_modules/@shikijs/vscode-textmate/dist/index.js","../../../../node_modules/@shikijs/primitive/dist/index.mjs","../../../../node_modules/html-void-elements/index.js","../../../../node_modules/zwitch/index.js","../../../../node_modules/stringify-entities/lib/core.js","../../../../node_modules/stringify-entities/lib/util/to-hexadecimal.js","../../../../node_modules/stringify-entities/lib/util/to-decimal.js","../../../../node_modules/character-entities-legacy/index.js","../../../../node_modules/character-entities-html4/index.js","../../../../node_modules/stringify-entities/lib/constant/dangerous.js","../../../../node_modules/stringify-entities/lib/util/to-named.js","../../../../node_modules/stringify-entities/lib/util/format-smart.js","../../../../node_modules/stringify-entities/lib/index.js","../../../../node_modules/hast-util-to-html/lib/handle/comment.js","../../../../node_modules/hast-util-to-html/lib/handle/doctype.js","../../../../node_modules/ccount/index.js","../../../../node_modules/hast-util-to-html/lib/omission/util/siblings.js","../../../../node_modules/hast-util-to-html/lib/omission/omission.js","../../../../node_modules/hast-util-to-html/lib/omission/closing.js","../../../../node_modules/hast-util-to-html/lib/omission/opening.js","../../../../node_modules/hast-util-to-html/lib/handle/element.js","../../../../node_modules/hast-util-to-html/lib/handle/text.js","../../../../node_modules/hast-util-to-html/lib/handle/raw.js","../../../../node_modules/hast-util-to-html/lib/handle/root.js","../../../../node_modules/hast-util-to-html/lib/handle/index.js","../../../../node_modules/hast-util-to-html/lib/index.js","../../../../node_modules/@shikijs/core/dist/index.mjs","../../../../node_modules/dequal/dist/index.mjs","../../../../node_modules/clsx/dist/clsx.mjs","../../../../node_modules/react-shiki/dist/chunk-QPJZGYHO.js","../../../../node_modules/shiki/dist/langs-bundle-full-DfKZStlK.mjs","../../../../node_modules/shiki/dist/themes.mjs","../../../../node_modules/shiki/node_modules/@shikijs/engine-oniguruma/dist/index.mjs","../../../../node_modules/shiki/dist/engine-oniguruma.mjs","../../../../node_modules/shiki/dist/bundle-full.mjs","../../../../node_modules/react-shiki/dist/index.js","../../src/atomic/molecules/markdown/components/MarkdownShikiCodeBlock.tsx"],"sourcesContent":["/**\n * @typedef Options\n * Configuration for `stringify`.\n * @property {boolean} [padLeft=true]\n * Whether to pad a space before a token.\n * @property {boolean} [padRight=false]\n * Whether to pad a space after a token.\n */\n\n/**\n * @typedef {Options} StringifyOptions\n * Please use `StringifyOptions` instead.\n */\n\n/**\n * Parse comma-separated tokens to an array.\n *\n * @param {string} value\n * Comma-separated tokens.\n * @returns {Array<string>}\n * List of tokens.\n */\nexport function parse(value) {\n /** @type {Array<string>} */\n const tokens = []\n const input = String(value || '')\n let index = input.indexOf(',')\n let start = 0\n /** @type {boolean} */\n let end = false\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n const token = input.slice(start, index).trim()\n\n if (token || !end) {\n tokens.push(token)\n }\n\n start = index + 1\n index = input.indexOf(',', start)\n }\n\n return tokens\n}\n\n/**\n * Serialize an array of strings or numbers to comma-separated tokens.\n *\n * @param {Array<string|number>} values\n * List of tokens.\n * @param {Options} [options]\n * Configuration for `stringify` (optional).\n * @returns {string}\n * Comma-separated tokens.\n */\nexport function stringify(values, options) {\n const settings = options || {}\n\n // Ensure the last empty entry is seen.\n const input = values[values.length - 1] === '' ? [...values, ''] : values\n\n return input\n .join(\n (settings.padRight ? ' ' : '') +\n ',' +\n (settings.padLeft === false ? '' : ' ')\n )\n .trim()\n}\n","export function deprecate(fn) {\n return fn\n}\n\nexport function equal() {}\n\nexport function ok() {}\n\nexport function unreachable() {}\n","/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [jsx=false]\n * Support JSX identifiers (default: `false`).\n */\n\nconst startRe = /[$_\\p{ID_Start}]/u\nconst contRe = /[$_\\u{200C}\\u{200D}\\p{ID_Continue}]/u\nconst contReJsx = /[-$_\\u{200C}\\u{200D}\\p{ID_Continue}]/u\nconst nameRe = /^[$_\\p{ID_Start}][$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u\nconst nameReJsx = /^[$_\\p{ID_Start}][-$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Checks if the given code point can start an identifier.\n *\n * @param {number | undefined} code\n * Code point to check.\n * @returns {boolean}\n * Whether `code` can start an identifier.\n */\n// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.\nexport function start(code) {\n return code ? startRe.test(String.fromCodePoint(code)) : false\n}\n\n/**\n * Checks if the given code point can continue an identifier.\n *\n * @param {number | undefined} code\n * Code point to check.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {boolean}\n * Whether `code` can continue an identifier.\n */\n// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.\nexport function cont(code, options) {\n const settings = options || emptyOptions\n const re = settings.jsx ? contReJsx : contRe\n return code ? re.test(String.fromCodePoint(code)) : false\n}\n\n/**\n * Checks if the given value is a valid identifier name.\n *\n * @param {string} name\n * Identifier to check.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {boolean}\n * Whether `name` can be an identifier.\n */\nexport function name(name, options) {\n const settings = options || emptyOptions\n const re = settings.jsx ? nameReJsx : nameRe\n return re.test(name)\n}\n","/**\n * @typedef {import('hast').Nodes} Nodes\n */\n\n// HTML whitespace expression.\n// See <https://infra.spec.whatwg.org/#ascii-whitespace>.\nconst re = /[ \\t\\n\\f\\r]/g\n\n/**\n * Check if the given value is *inter-element whitespace*.\n *\n * @param {Nodes | string} thing\n * Thing to check (`Node` or `string`).\n * @returns {boolean}\n * Whether the `value` is inter-element whitespace (`boolean`): consisting of\n * zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n * (`\\r`), or form feed (`\\f`); if a node is passed it must be a `Text` node,\n * whose `value` field is checked.\n */\nexport function whitespace(thing) {\n return typeof thing === 'object'\n ? thing.type === 'text'\n ? empty(thing.value)\n : false\n : empty(thing)\n}\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction empty(value) {\n return value.replace(re, '') === ''\n}\n","/**\n * @import {Schema as SchemaType, Space} from 'property-information'\n */\n\n/** @type {SchemaType} */\nexport class Schema {\n /**\n * @param {SchemaType['property']} property\n * Property.\n * @param {SchemaType['normal']} normal\n * Normal.\n * @param {Space | undefined} [space]\n * Space.\n * @returns\n * Schema.\n */\n constructor(property, normal, space) {\n this.normal = normal\n this.property = property\n\n if (space) {\n this.space = space\n }\n }\n}\n\nSchema.prototype.normal = {}\nSchema.prototype.property = {}\nSchema.prototype.space = undefined\n","/**\n * @import {Info, Space} from 'property-information'\n */\n\nimport {Schema} from './schema.js'\n\n/**\n * @param {ReadonlyArray<Schema>} definitions\n * Definitions.\n * @param {Space | undefined} [space]\n * Space.\n * @returns {Schema}\n * Schema.\n */\nexport function merge(definitions, space) {\n /** @type {Record<string, Info>} */\n const property = {}\n /** @type {Record<string, string>} */\n const normal = {}\n\n for (const definition of definitions) {\n Object.assign(property, definition.property)\n Object.assign(normal, definition.normal)\n }\n\n return new Schema(property, normal, space)\n}\n","/**\n * Get the cleaned case insensitive form of an attribute or property.\n *\n * @param {string} value\n * An attribute-like or property-like name.\n * @returns {string}\n * Value that can be used to look up the properly cased property on a\n * `Schema`.\n */\nexport function normalize(value) {\n return value.toLowerCase()\n}\n","/**\n * @import {Info as InfoType} from 'property-information'\n */\n\n/** @type {InfoType} */\nexport class Info {\n /**\n * @param {string} property\n * Property.\n * @param {string} attribute\n * Attribute.\n * @returns\n * Info.\n */\n constructor(property, attribute) {\n this.attribute = attribute\n this.property = property\n }\n}\n\nInfo.prototype.attribute = ''\nInfo.prototype.booleanish = false\nInfo.prototype.boolean = false\nInfo.prototype.commaOrSpaceSeparated = false\nInfo.prototype.commaSeparated = false\nInfo.prototype.defined = false\nInfo.prototype.mustUseProperty = false\nInfo.prototype.number = false\nInfo.prototype.overloadedBoolean = false\nInfo.prototype.property = ''\nInfo.prototype.spaceSeparated = false\nInfo.prototype.space = undefined\n","let powers = 0\n\nexport const boolean = increment()\nexport const booleanish = increment()\nexport const overloadedBoolean = increment()\nexport const number = increment()\nexport const spaceSeparated = increment()\nexport const commaSeparated = increment()\nexport const commaOrSpaceSeparated = increment()\n\nfunction increment() {\n return 2 ** ++powers\n}\n","/**\n * @import {Space} from 'property-information'\n */\n\nimport {Info} from './info.js'\nimport * as types from './types.js'\n\nconst checks = /** @type {ReadonlyArray<keyof typeof types>} */ (\n Object.keys(types)\n)\n\nexport class DefinedInfo extends Info {\n /**\n * @constructor\n * @param {string} property\n * Property.\n * @param {string} attribute\n * Attribute.\n * @param {number | null | undefined} [mask]\n * Mask.\n * @param {Space | undefined} [space]\n * Space.\n * @returns\n * Info.\n */\n constructor(property, attribute, mask, space) {\n let index = -1\n\n super(property, attribute)\n\n mark(this, 'space', space)\n\n if (typeof mask === 'number') {\n while (++index < checks.length) {\n const check = checks[index]\n mark(this, checks[index], (mask & types[check]) === types[check])\n }\n }\n }\n}\n\nDefinedInfo.prototype.defined = true\n\n/**\n * @template {keyof DefinedInfo} Key\n * Key type.\n * @param {DefinedInfo} values\n * Info.\n * @param {Key} key\n * Key.\n * @param {DefinedInfo[Key]} value\n * Value.\n * @returns {undefined}\n * Nothing.\n */\nfunction mark(values, key, value) {\n if (value) {\n values[key] = value\n }\n}\n","/**\n * @import {Info, Space} from 'property-information'\n */\n\n/**\n * @typedef Definition\n * Definition of a schema.\n * @property {Record<string, string> | undefined} [attributes]\n * Normalzed names to special attribute case.\n * @property {ReadonlyArray<string> | undefined} [mustUseProperty]\n * Normalized names that must be set as properties.\n * @property {Record<string, number | null>} properties\n * Property names to their types.\n * @property {Space | undefined} [space]\n * Space.\n * @property {Transform} transform\n * Transform a property name.\n */\n\n/**\n * @callback Transform\n * Transform.\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} property\n * Property.\n * @returns {string}\n * Attribute.\n */\n\nimport {normalize} from '../normalize.js'\nimport {DefinedInfo} from './defined-info.js'\nimport {Schema} from './schema.js'\n\n/**\n * @param {Definition} definition\n * Definition.\n * @returns {Schema}\n * Schema.\n */\nexport function create(definition) {\n /** @type {Record<string, Info>} */\n const properties = {}\n /** @type {Record<string, string>} */\n const normals = {}\n\n for (const [property, value] of Object.entries(definition.properties)) {\n const info = new DefinedInfo(\n property,\n definition.transform(definition.attributes || {}, property),\n value,\n definition.space\n )\n\n if (\n definition.mustUseProperty &&\n definition.mustUseProperty.includes(property)\n ) {\n info.mustUseProperty = true\n }\n\n properties[property] = info\n\n normals[normalize(property)] = property\n normals[normalize(info.attribute)] = property\n }\n\n return new Schema(properties, normals, definition.space)\n}\n","import {create} from './util/create.js'\nimport {booleanish, number, spaceSeparated} from './util/types.js'\n\nexport const aria = create({\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n },\n transform(_, property) {\n return property === 'role'\n ? property\n : 'aria-' + property.slice(4).toLowerCase()\n }\n})\n","/**\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} attribute\n * Attribute.\n * @returns {string}\n * Transformed attribute.\n */\nexport function caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute\n}\n","import {caseSensitiveTransform} from './case-sensitive-transform.js'\n\n/**\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} property\n * Property.\n * @returns {string}\n * Transformed property.\n */\nexport function caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n","import {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\nimport {create} from './util/create.js'\nimport {\n booleanish,\n boolean,\n commaSeparated,\n number,\n overloadedBoolean,\n spaceSeparated\n} from './util/types.js'\n\nexport const html = create({\n attributes: {\n acceptcharset: 'accept-charset',\n classname: 'class',\n htmlfor: 'for',\n httpequiv: 'http-equiv'\n },\n mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],\n properties: {\n // Standard Properties.\n abbr: null,\n accept: commaSeparated,\n acceptCharset: spaceSeparated,\n accessKey: spaceSeparated,\n action: null,\n allow: null,\n allowFullScreen: boolean,\n allowPaymentRequest: boolean,\n allowUserMedia: boolean,\n alt: null,\n as: null,\n async: boolean,\n autoCapitalize: null,\n autoComplete: spaceSeparated,\n autoFocus: boolean,\n autoPlay: boolean,\n blocking: spaceSeparated,\n capture: null,\n charSet: null,\n checked: boolean,\n cite: null,\n className: spaceSeparated,\n cols: number,\n colSpan: null,\n content: null,\n contentEditable: booleanish,\n controls: boolean,\n controlsList: spaceSeparated,\n coords: number | commaSeparated,\n crossOrigin: null,\n data: null,\n dateTime: null,\n decoding: null,\n default: boolean,\n defer: boolean,\n dir: null,\n dirName: null,\n disabled: boolean,\n download: overloadedBoolean,\n draggable: booleanish,\n encType: null,\n enterKeyHint: null,\n fetchPriority: null,\n form: null,\n formAction: null,\n formEncType: null,\n formMethod: null,\n formNoValidate: boolean,\n formTarget: null,\n headers: spaceSeparated,\n height: number,\n hidden: overloadedBoolean,\n high: number,\n href: null,\n hrefLang: null,\n htmlFor: spaceSeparated,\n httpEquiv: spaceSeparated,\n id: null,\n imageSizes: null,\n imageSrcSet: null,\n inert: boolean,\n inputMode: null,\n integrity: null,\n is: null,\n isMap: boolean,\n itemId: null,\n itemProp: spaceSeparated,\n itemRef: spaceSeparated,\n itemScope: boolean,\n itemType: spaceSeparated,\n kind: null,\n label: null,\n lang: null,\n language: null,\n list: null,\n loading: null,\n loop: boolean,\n low: number,\n manifest: null,\n max: null,\n maxLength: number,\n media: null,\n method: null,\n min: null,\n minLength: number,\n multiple: boolean,\n muted: boolean,\n name: null,\n nonce: null,\n noModule: boolean,\n noValidate: boolean,\n onAbort: null,\n onAfterPrint: null,\n onAuxClick: null,\n onBeforeMatch: null,\n onBeforePrint: null,\n onBeforeToggle: null,\n onBeforeUnload: null,\n onBlur: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onContextLost: null,\n onContextMenu: null,\n onContextRestored: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFormData: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLanguageChange: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadEnd: null,\n onLoadStart: null,\n onMessage: null,\n onMessageError: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRejectionHandled: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onScrollEnd: null,\n onSecurityPolicyViolation: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onSlotChange: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnhandledRejection: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onWheel: null,\n open: boolean,\n optimum: number,\n pattern: null,\n ping: spaceSeparated,\n placeholder: null,\n playsInline: boolean,\n popover: null,\n popoverTarget: null,\n popoverTargetAction: null,\n poster: null,\n preload: null,\n readOnly: boolean,\n referrerPolicy: null,\n rel: spaceSeparated,\n required: boolean,\n reversed: boolean,\n rows: number,\n rowSpan: number,\n sandbox: spaceSeparated,\n scope: null,\n scoped: boolean,\n seamless: boolean,\n selected: boolean,\n shadowRootClonable: boolean,\n shadowRootDelegatesFocus: boolean,\n shadowRootMode: null,\n shape: null,\n size: number,\n sizes: null,\n slot: null,\n span: number,\n spellCheck: booleanish,\n src: null,\n srcDoc: null,\n srcLang: null,\n srcSet: null,\n start: number,\n step: null,\n style: null,\n tabIndex: number,\n target: null,\n title: null,\n translate: null,\n type: null,\n typeMustMatch: boolean,\n useMap: null,\n value: booleanish,\n width: number,\n wrap: null,\n writingSuggestions: null,\n\n // Legacy.\n // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\n align: null, // Several. Use CSS `text-align` instead,\n aLink: null, // `<body>`. Use CSS `a:active {color}` instead\n archive: spaceSeparated, // `<object>`. List of URIs to archives\n axis: null, // `<td>` and `<th>`. Use `scope` on `<th>`\n background: null, // `<body>`. Use CSS `background-image` instead\n bgColor: null, // `<body>` and table elements. Use CSS `background-color` instead\n border: number, // `<table>`. Use CSS `border-width` instead,\n borderColor: null, // `<table>`. Use CSS `border-color` instead,\n bottomMargin: number, // `<body>`\n cellPadding: null, // `<table>`\n cellSpacing: null, // `<table>`\n char: null, // Several table elements. When `align=char`, sets the character to align on\n charOff: null, // Several table elements. When `char`, offsets the alignment\n classId: null, // `<object>`\n clear: null, // `<br>`. Use CSS `clear` instead\n code: null, // `<object>`\n codeBase: null, // `<object>`\n codeType: null, // `<object>`\n color: null, // `<font>` and `<hr>`. Use CSS instead\n compact: boolean, // Lists. Use CSS to reduce space between items instead\n declare: boolean, // `<object>`\n event: null, // `<script>`\n face: null, // `<font>`. Use CSS instead\n frame: null, // `<table>`\n frameBorder: null, // `<iframe>`. Use CSS `border` instead\n hSpace: number, // `<img>` and `<object>`\n leftMargin: number, // `<body>`\n link: null, // `<body>`. Use CSS `a:link {color: *}` instead\n longDesc: null, // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`\n lowSrc: null, // `<img>`. Use a `<picture>`\n marginHeight: number, // `<body>`\n marginWidth: number, // `<body>`\n noResize: boolean, // `<frame>`\n noHref: boolean, // `<area>`. Use no href instead of an explicit `nohref`\n noShade: boolean, // `<hr>`. Use background-color and height instead of borders\n noWrap: boolean, // `<td>` and `<th>`\n object: null, // `<applet>`\n profile: null, // `<head>`\n prompt: null, // `<isindex>`\n rev: null, // `<link>`\n rightMargin: number, // `<body>`\n rules: null, // `<table>`\n scheme: null, // `<meta>`\n scrolling: booleanish, // `<frame>`. Use overflow in the child context\n standby: null, // `<object>`\n summary: null, // `<table>`\n text: null, // `<body>`. Use CSS `color` instead\n topMargin: number, // `<body>`\n valueType: null, // `<param>`\n version: null, // `<html>`. Use a doctype.\n vAlign: null, // Several. Use CSS `vertical-align` instead\n vLink: null, // `<body>`. Use CSS `a:visited {color}` instead\n vSpace: number, // `<img>` and `<object>`\n\n // Non-standard Properties.\n allowTransparency: null,\n autoCorrect: null,\n autoSave: null,\n disablePictureInPicture: boolean,\n disableRemotePlayback: boolean,\n prefix: null,\n property: null,\n results: number,\n security: null,\n unselectable: null\n },\n space: 'html',\n transform: caseInsensitiveTransform\n})\n","import {caseSensitiveTransform} from './util/case-sensitive-transform.js'\nimport {create} from './util/create.js'\nimport {\n boolean,\n commaOrSpaceSeparated,\n commaSeparated,\n number,\n spaceSeparated\n} from './util/types.js'\n\nexport const svg = create({\n attributes: {\n accentHeight: 'accent-height',\n alignmentBaseline: 'alignment-baseline',\n arabicForm: 'arabic-form',\n baselineShift: 'baseline-shift',\n capHeight: 'cap-height',\n className: 'class',\n clipPath: 'clip-path',\n clipRule: 'clip-rule',\n colorInterpolation: 'color-interpolation',\n colorInterpolationFilters: 'color-interpolation-filters',\n colorProfile: 'color-profile',\n colorRendering: 'color-rendering',\n crossOrigin: 'crossorigin',\n dataType: 'datatype',\n dominantBaseline: 'dominant-baseline',\n enableBackground: 'enable-background',\n fillOpacity: 'fill-opacity',\n fillRule: 'fill-rule',\n floodColor: 'flood-color',\n floodOpacity: 'flood-opacity',\n fontFamily: 'font-family',\n fontSize: 'font-size',\n fontSizeAdjust: 'font-size-adjust',\n fontStretch: 'font-stretch',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n glyphName: 'glyph-name',\n glyphOrientationHorizontal: 'glyph-orientation-horizontal',\n glyphOrientationVertical: 'glyph-orientation-vertical',\n hrefLang: 'hreflang',\n horizAdvX: 'horiz-adv-x',\n horizOriginX: 'horiz-origin-x',\n horizOriginY: 'horiz-origin-y',\n imageRendering: 'image-rendering',\n letterSpacing: 'letter-spacing',\n lightingColor: 'lighting-color',\n markerEnd: 'marker-end',\n markerMid: 'marker-mid',\n markerStart: 'marker-start',\n navDown: 'nav-down',\n navDownLeft: 'nav-down-left',\n navDownRight: 'nav-down-right',\n navLeft: 'nav-left',\n navNext: 'nav-next',\n navPrev: 'nav-prev',\n navRight: 'nav-right',\n navUp: 'nav-up',\n navUpLeft: 'nav-up-left',\n navUpRight: 'nav-up-right',\n onAbort: 'onabort',\n onActivate: 'onactivate',\n onAfterPrint: 'onafterprint',\n onBeforePrint: 'onbeforeprint',\n onBegin: 'onbegin',\n onCancel: 'oncancel',\n onCanPlay: 'oncanplay',\n onCanPlayThrough: 'oncanplaythrough',\n onChange: 'onchange',\n onClick: 'onclick',\n onClose: 'onclose',\n onCopy: 'oncopy',\n onCueChange: 'oncuechange',\n onCut: 'oncut',\n onDblClick: 'ondblclick',\n onDrag: 'ondrag',\n onDragEnd: 'ondragend',\n onDragEnter: 'ondragenter',\n onDragExit: 'ondragexit',\n onDragLeave: 'ondragleave',\n onDragOver: 'ondragover',\n onDragStart: 'ondragstart',\n onDrop: 'ondrop',\n onDurationChange: 'ondurationchange',\n onEmptied: 'onemptied',\n onEnd: 'onend',\n onEnded: 'onended',\n onError: 'onerror',\n onFocus: 'onfocus',\n onFocusIn: 'onfocusin',\n onFocusOut: 'onfocusout',\n onHashChange: 'onhashchange',\n onInput: 'oninput',\n onInvalid: 'oninvalid',\n onKeyDown: 'onkeydown',\n onKeyPress: 'onkeypress',\n onKeyUp: 'onkeyup',\n onLoad: 'onload',\n onLoadedData: 'onloadeddata',\n onLoadedMetadata: 'onloadedmetadata',\n onLoadStart: 'onloadstart',\n onMessage: 'onmessage',\n onMouseDown: 'onmousedown',\n onMouseEnter: 'onmouseenter',\n onMouseLeave: 'onmouseleave',\n onMouseMove: 'onmousemove',\n onMouseOut: 'onmouseout',\n onMouseOver: 'onmouseover',\n onMouseUp: 'onmouseup',\n onMouseWheel: 'onmousewheel',\n onOffline: 'onoffline',\n onOnline: 'ononline',\n onPageHide: 'onpagehide',\n onPageShow: 'onpageshow',\n onPaste: 'onpaste',\n onPause: 'onpause',\n onPlay: 'onplay',\n onPlaying: 'onplaying',\n onPopState: 'onpopstate',\n onProgress: 'onprogress',\n onRateChange: 'onratechange',\n onRepeat: 'onrepeat',\n onReset: 'onreset',\n onResize: 'onresize',\n onScroll: 'onscroll',\n onSeeked: 'onseeked',\n onSeeking: 'onseeking',\n onSelect: 'onselect',\n onShow: 'onshow',\n onStalled: 'onstalled',\n onStorage: 'onstorage',\n onSubmit: 'onsubmit',\n onSuspend: 'onsuspend',\n onTimeUpdate: 'ontimeupdate',\n onToggle: 'ontoggle',\n onUnload: 'onunload',\n onVolumeChange: 'onvolumechange',\n onWaiting: 'onwaiting',\n onZoom: 'onzoom',\n overlinePosition: 'overline-position',\n overlineThickness: 'overline-thickness',\n paintOrder: 'paint-order',\n panose1: 'panose-1',\n pointerEvents: 'pointer-events',\n referrerPolicy: 'referrerpolicy',\n renderingIntent: 'rendering-intent',\n shapeRendering: 'shape-rendering',\n stopColor: 'stop-color',\n stopOpacity: 'stop-opacity',\n strikethroughPosition: 'strikethrough-position',\n strikethroughThickness: 'strikethrough-thickness',\n strokeDashArray: 'stroke-dasharray',\n strokeDashOffset: 'stroke-dashoffset',\n strokeLineCap: 'stroke-linecap',\n strokeLineJoin: 'stroke-linejoin',\n strokeMiterLimit: 'stroke-miterlimit',\n strokeOpacity: 'stroke-opacity',\n strokeWidth: 'stroke-width',\n tabIndex: 'tabindex',\n textAnchor: 'text-anchor',\n textDecoration: 'text-decoration',\n textRendering: 'text-rendering',\n transformOrigin: 'transform-origin',\n typeOf: 'typeof',\n underlinePosition: 'underline-position',\n underlineThickness: 'underline-thickness',\n unicodeBidi: 'unicode-bidi',\n unicodeRange: 'unicode-range',\n unitsPerEm: 'units-per-em',\n vAlphabetic: 'v-alphabetic',\n vHanging: 'v-hanging',\n vIdeographic: 'v-ideographic',\n vMathematical: 'v-mathematical',\n vectorEffect: 'vector-effect',\n vertAdvY: 'vert-adv-y',\n vertOriginX: 'vert-origin-x',\n vertOriginY: 'vert-origin-y',\n wordSpacing: 'word-spacing',\n writingMode: 'writing-mode',\n xHeight: 'x-height',\n // These were camelcased in Tiny. Now lowercased in SVG 2\n playbackOrder: 'playbackorder',\n timelineBegin: 'timelinebegin'\n },\n properties: {\n about: commaOrSpaceSeparated,\n accentHeight: number,\n accumulate: null,\n additive: null,\n alignmentBaseline: null,\n alphabetic: number,\n amplitude: number,\n arabicForm: null,\n ascent: number,\n attributeName: null,\n attributeType: null,\n azimuth: number,\n bandwidth: null,\n baselineShift: null,\n baseFrequency: null,\n baseProfile: null,\n bbox: null,\n begin: null,\n bias: number,\n by: null,\n calcMode: null,\n capHeight: number,\n className: spaceSeparated,\n clip: null,\n clipPath: null,\n clipPathUnits: null,\n clipRule: null,\n color: null,\n colorInterpolation: null,\n colorInterpolationFilters: null,\n colorProfile: null,\n colorRendering: null,\n content: null,\n contentScriptType: null,\n contentStyleType: null,\n crossOrigin: null,\n cursor: null,\n cx: null,\n cy: null,\n d: null,\n dataType: null,\n defaultAction: null,\n descent: number,\n diffuseConstant: number,\n direction: null,\n display: null,\n dur: null,\n divisor: number,\n dominantBaseline: null,\n download: boolean,\n dx: null,\n dy: null,\n edgeMode: null,\n editable: null,\n elevation: number,\n enableBackground: null,\n end: null,\n event: null,\n exponent: number,\n externalResourcesRequired: null,\n fill: null,\n fillOpacity: number,\n fillRule: null,\n filter: null,\n filterRes: null,\n filterUnits: null,\n floodColor: null,\n floodOpacity: null,\n focusable: null,\n focusHighlight: null,\n fontFamily: null,\n fontSize: null,\n fontSizeAdjust: null,\n fontStretch: null,\n fontStyle: null,\n fontVariant: null,\n fontWeight: null,\n format: null,\n fr: null,\n from: null,\n fx: null,\n fy: null,\n g1: commaSeparated,\n g2: commaSeparated,\n glyphName: commaSeparated,\n glyphOrientationHorizontal: null,\n glyphOrientationVertical: null,\n glyphRef: null,\n gradientTransform: null,\n gradientUnits: null,\n handler: null,\n hanging: number,\n hatchContentUnits: null,\n hatchUnits: null,\n height: null,\n href: null,\n hrefLang: null,\n horizAdvX: number,\n horizOriginX: number,\n horizOriginY: number,\n id: null,\n ideographic: number,\n imageRendering: null,\n initialVisibility: null,\n in: null,\n in2: null,\n intercept: number,\n k: number,\n k1: number,\n k2: number,\n k3: number,\n k4: number,\n kernelMatrix: commaOrSpaceSeparated,\n kernelUnitLength: null,\n keyPoints: null, // SEMI_COLON_SEPARATED\n keySplines: null, // SEMI_COLON_SEPARATED\n keyTimes: null, // SEMI_COLON_SEPARATED\n kerning: null,\n lang: null,\n lengthAdjust: null,\n letterSpacing: null,\n lightingColor: null,\n limitingConeAngle: number,\n local: null,\n markerEnd: null,\n markerMid: null,\n markerStart: null,\n markerHeight: null,\n markerUnits: null,\n markerWidth: null,\n mask: null,\n maskContentUnits: null,\n maskUnits: null,\n mathematical: null,\n max: null,\n media: null,\n mediaCharacterEncoding: null,\n mediaContentEncodings: null,\n mediaSize: number,\n mediaTime: null,\n method: null,\n min: null,\n mode: null,\n name: null,\n navDown: null,\n navDownLeft: null,\n navDownRight: null,\n navLeft: null,\n navNext: null,\n navPrev: null,\n navRight: null,\n navUp: null,\n navUpLeft: null,\n navUpRight: null,\n numOctaves: null,\n observer: null,\n offset: null,\n onAbort: null,\n onActivate: null,\n onAfterPrint: null,\n onBeforePrint: null,\n onBegin: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnd: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFocusIn: null,\n onFocusOut: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadStart: null,\n onMessage: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onMouseWheel: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRepeat: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onShow: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onZoom: null,\n opacity: null,\n operator: null,\n order: null,\n orient: null,\n orientation: null,\n origin: null,\n overflow: null,\n overlay: null,\n overlinePosition: number,\n overlineThickness: number,\n paintOrder: null,\n panose1: null,\n path: null,\n pathLength: number,\n patternContentUnits: null,\n patternTransform: null,\n patternUnits: null,\n phase: null,\n ping: spaceSeparated,\n pitch: null,\n playbackOrder: null,\n pointerEvents: null,\n points: null,\n pointsAtX: number,\n pointsAtY: number,\n pointsAtZ: number,\n preserveAlpha: null,\n preserveAspectRatio: null,\n primitiveUnits: null,\n propagate: null,\n property: commaOrSpaceSeparated,\n r: null,\n radius: null,\n referrerPolicy: null,\n refX: null,\n refY: null,\n rel: commaOrSpaceSeparated,\n rev: commaOrSpaceSeparated,\n renderingIntent: null,\n repeatCount: null,\n repeatDur: null,\n requiredExtensions: commaOrSpaceSeparated,\n requiredFeatures: commaOrSpaceSeparated,\n requiredFonts: commaOrSpaceSeparated,\n requiredFormats: commaOrSpaceSeparated,\n resource: null,\n restart: null,\n result: null,\n rotate: null,\n rx: null,\n ry: null,\n scale: null,\n seed: null,\n shapeRendering: null,\n side: null,\n slope: null,\n snapshotTime: null,\n specularConstant: number,\n specularExponent: number,\n spreadMethod: null,\n spacing: null,\n startOffset: null,\n stdDeviation: null,\n stemh: null,\n stemv: null,\n stitchTiles: null,\n stopColor: null,\n stopOpacity: null,\n strikethroughPosition: number,\n strikethroughThickness: number,\n string: null,\n stroke: null,\n strokeDashArray: commaOrSpaceSeparated,\n strokeDashOffset: null,\n strokeLineCap: null,\n strokeLineJoin: null,\n strokeMiterLimit: number,\n strokeOpacity: number,\n strokeWidth: null,\n style: null,\n surfaceScale: number,\n syncBehavior: null,\n syncBehaviorDefault: null,\n syncMaster: null,\n syncTolerance: null,\n syncToleranceDefault: null,\n systemLanguage: commaOrSpaceSeparated,\n tabIndex: number,\n tableValues: null,\n target: null,\n targetX: number,\n targetY: number,\n textAnchor: null,\n textDecoration: null,\n textRendering: null,\n textLength: null,\n timelineBegin: null,\n title: null,\n transformBehavior: null,\n type: null,\n typeOf: commaOrSpaceSeparated,\n to: null,\n transform: null,\n transformOrigin: null,\n u1: null,\n u2: null,\n underlinePosition: number,\n underlineThickness: number,\n unicode: null,\n unicodeBidi: null,\n unicodeRange: null,\n unitsPerEm: number,\n values: null,\n vAlphabetic: number,\n vMathematical: number,\n vectorEffect: null,\n vHanging: number,\n vIdeographic: number,\n version: null,\n vertAdvY: number,\n vertOriginX: number,\n vertOriginY: number,\n viewBox: null,\n viewTarget: null,\n visibility: null,\n width: null,\n widths: null,\n wordSpacing: null,\n writingMode: null,\n x: null,\n x1: null,\n x2: null,\n xChannelSelector: null,\n xHeight: number,\n y: null,\n y1: null,\n y2: null,\n yChannelSelector: null,\n z: null,\n zoomAndPan: null\n },\n space: 'svg',\n transform: caseSensitiveTransform\n})\n","import {create} from './util/create.js'\n\nexport const xlink = create({\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n },\n space: 'xlink',\n transform(_, property) {\n return 'xlink:' + property.slice(5).toLowerCase()\n }\n})\n","import {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const xmlns = create({\n attributes: {xmlnsxlink: 'xmlns:xlink'},\n properties: {xmlnsXLink: null, xmlns: null},\n space: 'xmlns',\n transform: caseInsensitiveTransform\n})\n","import {create} from './util/create.js'\n\nexport const xml = create({\n properties: {xmlBase: null, xmlLang: null, xmlSpace: null},\n space: 'xml',\n transform(_, property) {\n return 'xml:' + property.slice(3).toLowerCase()\n }\n})\n","/**\n * Special cases for React (`Record<string, string>`).\n *\n * `hast` is close to `React` but differs in a couple of cases.\n * To get a React property from a hast property,\n * check if it is in `hastToReact`.\n * If it is, use the corresponding value;\n * otherwise, use the hast property.\n *\n * @type {Record<string, string>}\n */\nexport const hastToReact = {\n classId: 'classID',\n dataType: 'datatype',\n itemId: 'itemID',\n strokeDashArray: 'strokeDasharray',\n strokeDashOffset: 'strokeDashoffset',\n strokeLineCap: 'strokeLinecap',\n strokeLineJoin: 'strokeLinejoin',\n strokeMiterLimit: 'strokeMiterlimit',\n typeOf: 'typeof',\n xLinkActuate: 'xlinkActuate',\n xLinkArcRole: 'xlinkArcrole',\n xLinkHref: 'xlinkHref',\n xLinkRole: 'xlinkRole',\n xLinkShow: 'xlinkShow',\n xLinkTitle: 'xlinkTitle',\n xLinkType: 'xlinkType',\n xmlnsXLink: 'xmlnsXlink'\n}\n","/**\n * @import {Schema} from 'property-information'\n */\n\nimport {DefinedInfo} from './util/defined-info.js'\nimport {Info} from './util/info.js'\nimport {normalize} from './normalize.js'\n\nconst cap = /[A-Z]/g\nconst dash = /-[a-z]/g\nconst valid = /^data[-\\w.:]+$/i\n\n/**\n * Look up info on a property.\n *\n * In most cases the given `schema` contains info on the property.\n * All standard,\n * most legacy,\n * and some non-standard properties are supported.\n * For these cases,\n * the returned `Info` has hints about the value of the property.\n *\n * `name` can also be a valid data attribute or property,\n * in which case an `Info` object with the correctly cased `attribute` and\n * `property` is returned.\n *\n * `name` can be an unknown attribute,\n * in which case an `Info` object with `attribute` and `property` set to the\n * given name is returned.\n * It is not recommended to provide unsupported legacy or recently specced\n * properties.\n *\n *\n * @param {Schema} schema\n * Schema;\n * either the `html` or `svg` export.\n * @param {string} value\n * An attribute-like or property-like name;\n * it will be passed through `normalize` to hopefully find the correct info.\n * @returns {Info}\n * Info.\n */\nexport function find(schema, value) {\n const normal = normalize(value)\n let property = value\n let Type = Info\n\n if (normal in schema.normal) {\n return schema.property[schema.normal[normal]]\n }\n\n if (normal.length > 4 && normal.slice(0, 4) === 'data' && valid.test(value)) {\n // Attribute or property.\n if (value.charAt(4) === '-') {\n // Turn it into a property.\n const rest = value.slice(5).replace(dash, camelcase)\n property = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1)\n } else {\n // Turn it into an attribute.\n const rest = value.slice(4)\n\n if (!dash.test(rest)) {\n let dashes = rest.replace(cap, kebab)\n\n if (dashes.charAt(0) !== '-') {\n dashes = '-' + dashes\n }\n\n value = 'data' + dashes\n }\n }\n\n Type = DefinedInfo\n }\n\n return new Type(property, value)\n}\n\n/**\n * @param {string} $0\n * Value.\n * @returns {string}\n * Kebab.\n */\nfunction kebab($0) {\n return '-' + $0.toLowerCase()\n}\n\n/**\n * @param {string} $0\n * Value.\n * @returns {string}\n * Camel.\n */\nfunction camelcase($0) {\n return $0.charAt(1).toUpperCase()\n}\n","// Note: types exposed from `index.d.ts`.\nimport {merge} from './lib/util/merge.js'\nimport {aria} from './lib/aria.js'\nimport {html as htmlBase} from './lib/html.js'\nimport {svg as svgBase} from './lib/svg.js'\nimport {xlink} from './lib/xlink.js'\nimport {xmlns} from './lib/xmlns.js'\nimport {xml} from './lib/xml.js'\n\nexport {hastToReact} from './lib/hast-to-react.js'\n\nexport const html = merge([aria, htmlBase, xlink, xmlns, xml], 'html')\n\nexport {find} from './lib/find.js'\nexport {normalize} from './lib/normalize.js'\n\nexport const svg = merge([aria, svgBase, xlink, xmlns, xml], 'svg')\n","/**\n * Parse space-separated tokens to an array of strings.\n *\n * @param {string} value\n * Space-separated tokens.\n * @returns {Array<string>}\n * List of tokens.\n */\nexport function parse(value) {\n const input = String(value || '').trim()\n return input ? input.split(/[ \\t\\n\\r\\f]+/g) : []\n}\n\n/**\n * Serialize an array of strings as space separated-tokens.\n *\n * @param {Array<string|number>} values\n * List of tokens.\n * @returns {string}\n * Space-separated tokens.\n */\nexport function stringify(values) {\n return values.join(' ').trim()\n}\n","'use strict';\n\n// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nfunction index (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) ; else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n}\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n\nmodule.exports = index;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = StyleToObject;\nconst inline_style_parser_1 = __importDefault(require(\"inline-style-parser\"));\n/**\n * Parses inline style to object.\n *\n * @param style - Inline style.\n * @param iterator - Iterator.\n * @returns - Style object or null.\n *\n * @example Parsing inline style to object:\n *\n * ```js\n * import parse from 'style-to-object';\n * parse('line-height: 42;'); // { 'line-height': '42' }\n * ```\n */\nfunction StyleToObject(style, iterator) {\n let styleObject = null;\n if (!style || typeof style !== 'string') {\n return styleObject;\n }\n const declarations = (0, inline_style_parser_1.default)(style);\n const hasIterator = typeof iterator === 'function';\n declarations.forEach((declaration) => {\n if (declaration.type !== 'declaration') {\n return;\n }\n const { property, value } = declaration;\n if (hasIterator) {\n iterator(property, value, declaration);\n }\n else if (value) {\n styleObject = styleObject || {};\n styleObject[property] = value;\n }\n });\n return styleObject;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.camelCase = void 0;\nvar CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;\nvar HYPHEN_REGEX = /-([a-z])/g;\nvar NO_HYPHEN_REGEX = /^[^-]+$/;\nvar VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;\nvar MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;\n/**\n * Checks whether to skip camelCase.\n */\nvar skipCamelCase = function (property) {\n return !property ||\n NO_HYPHEN_REGEX.test(property) ||\n CUSTOM_PROPERTY_REGEX.test(property);\n};\n/**\n * Replacer that capitalizes first character.\n */\nvar capitalize = function (match, character) {\n return character.toUpperCase();\n};\n/**\n * Replacer that removes beginning hyphen of vendor prefix property.\n */\nvar trimHyphen = function (match, prefix) { return \"\".concat(prefix, \"-\"); };\n/**\n * CamelCases a CSS property.\n */\nvar camelCase = function (property, options) {\n if (options === void 0) { options = {}; }\n if (skipCamelCase(property)) {\n return property;\n }\n property = property.toLowerCase();\n if (options.reactCompat) {\n // `-ms` vendor prefix should not be capitalized\n property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);\n }\n else {\n // for non-React, remove first hyphen so vendor prefix is not capitalized\n property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);\n }\n return property.replace(HYPHEN_REGEX, capitalize);\n};\nexports.camelCase = camelCase;\n//# sourceMappingURL=utilities.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar style_to_object_1 = __importDefault(require(\"style-to-object\"));\nvar utilities_1 = require(\"./utilities\");\n/**\n * Parses CSS inline style to JavaScript object (camelCased).\n */\nfunction StyleToJS(style, options) {\n var output = {};\n if (!style || typeof style !== 'string') {\n return output;\n }\n (0, style_to_object_1.default)(style, function (property, value) {\n // skip CSS comment\n if (property && value) {\n output[(0, utilities_1.camelCase)(property, options)] = value;\n }\n });\n return output;\n}\nStyleToJS.default = StyleToJS;\nmodule.exports = StyleToJS;\n//# sourceMappingURL=index.js.map","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n */\n\n/**\n * Get the ending point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointEnd = point('end')\n\n/**\n * Get the starting point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointStart = point('start')\n\n/**\n * Get the positional info of `node`.\n *\n * @param {'end' | 'start'} type\n * Side.\n * @returns\n * Getter.\n */\nfunction point(type) {\n return point\n\n /**\n * Get the point info of `node` at a bound side.\n *\n * @param {Node | NodeLike | null | undefined} [node]\n * @returns {Point | undefined}\n */\n function point(node) {\n const point = (node && node.position && node.position[type]) || {}\n\n if (\n typeof point.line === 'number' &&\n point.line > 0 &&\n typeof point.column === 'number' &&\n point.column > 0\n ) {\n return {\n line: point.line,\n column: point.column,\n offset:\n typeof point.offset === 'number' && point.offset > -1\n ? point.offset\n : undefined\n }\n }\n }\n}\n\n/**\n * Get the positional info of `node`.\n *\n * @param {Node | NodeLike | null | undefined} [node]\n * Node.\n * @returns {Position | undefined}\n * Position.\n */\nexport function position(node) {\n const start = pointStart(node)\n const end = pointEnd(node)\n\n if (start && end) {\n return {start, end}\n }\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n */\n\n/**\n * Serialize the positional info of a point, position (start and end points),\n * or node.\n *\n * @param {Node | NodeLike | Point | PointLike | Position | PositionLike | null | undefined} [value]\n * Node, position, or point.\n * @returns {string}\n * Pretty printed positional info of a node (`string`).\n *\n * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)\n * or a point `l:c` (when given `point`), where `l` stands for line, `c` for\n * column, `s` for `start`, and `e` for end.\n * An empty string (`''`) is returned if the given value is neither `node`,\n * `position`, nor `point`.\n */\nexport function stringifyPosition(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if ('position' in value || 'type' in value) {\n return position(value.position)\n }\n\n // Position.\n if ('start' in value || 'end' in value) {\n return position(value)\n }\n\n // Point.\n if ('line' in value || 'column' in value) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\n/**\n * @param {Point | PointLike | null | undefined} point\n * @returns {string}\n */\nfunction point(point) {\n return index(point && point.line) + ':' + index(point && point.column)\n}\n\n/**\n * @param {Position | PositionLike | null | undefined} pos\n * @returns {string}\n */\nfunction position(pos) {\n return point(pos && pos.start) + '-' + point(pos && pos.end)\n}\n\n/**\n * @param {number | null | undefined} value\n * @returns {number}\n */\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n","/**\n * @import {Node, Point, Position} from 'unist'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n *\n * @typedef Options\n * Configuration.\n * @property {Array<Node> | null | undefined} [ancestors]\n * Stack of (inclusive) ancestor nodes surrounding the message (optional).\n * @property {Error | null | undefined} [cause]\n * Original error cause of the message (optional).\n * @property {Point | Position | null | undefined} [place]\n * Place of message (optional).\n * @property {string | null | undefined} [ruleId]\n * Category of message (optional, example: `'my-rule'`).\n * @property {string | null | undefined} [source]\n * Namespace of who sent the message (optional, example: `'my-package'`).\n */\n\nimport {stringifyPosition} from 'unist-util-stringify-position'\n\n/**\n * Message.\n */\nexport class VFileMessage extends Error {\n /**\n * Create a message for `reason`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {Options | null | undefined} [options]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns\n * Instance of `VFileMessage`.\n */\n // eslint-disable-next-line complexity\n constructor(causeOrReason, optionsOrParentOrPlace, origin) {\n super()\n\n if (typeof optionsOrParentOrPlace === 'string') {\n origin = optionsOrParentOrPlace\n optionsOrParentOrPlace = undefined\n }\n\n /** @type {string} */\n let reason = ''\n /** @type {Options} */\n let options = {}\n let legacyCause = false\n\n if (optionsOrParentOrPlace) {\n // Point.\n if (\n 'line' in optionsOrParentOrPlace &&\n 'column' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Position.\n else if (\n 'start' in optionsOrParentOrPlace &&\n 'end' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Node.\n else if ('type' in optionsOrParentOrPlace) {\n options = {\n ancestors: [optionsOrParentOrPlace],\n place: optionsOrParentOrPlace.position\n }\n }\n // Options.\n else {\n options = {...optionsOrParentOrPlace}\n }\n }\n\n if (typeof causeOrReason === 'string') {\n reason = causeOrReason\n }\n // Error.\n else if (!options.cause && causeOrReason) {\n legacyCause = true\n reason = causeOrReason.message\n options.cause = causeOrReason\n }\n\n if (!options.ruleId && !options.source && typeof origin === 'string') {\n const index = origin.indexOf(':')\n\n if (index === -1) {\n options.ruleId = origin\n } else {\n options.source = origin.slice(0, index)\n options.ruleId = origin.slice(index + 1)\n }\n }\n\n if (!options.place && options.ancestors && options.ancestors) {\n const parent = options.ancestors[options.ancestors.length - 1]\n\n if (parent) {\n options.place = parent.position\n }\n }\n\n const start =\n options.place && 'start' in options.place\n ? options.place.start\n : options.place\n\n /**\n * Stack of ancestor nodes surrounding the message.\n *\n * @type {Array<Node> | undefined}\n */\n this.ancestors = options.ancestors || undefined\n\n /**\n * Original error cause of the message.\n *\n * @type {Error | undefined}\n */\n this.cause = options.cause || undefined\n\n /**\n * Starting column of message.\n *\n * @type {number | undefined}\n */\n this.column = start ? start.column : undefined\n\n /**\n * State of problem.\n *\n * * `true` — error, file not usable\n * * `false` — warning, change may be needed\n * * `undefined` — change likely not needed\n *\n * @type {boolean | null | undefined}\n */\n this.fatal = undefined\n\n /**\n * Path of a file (used throughout the `VFile` ecosystem).\n *\n * @type {string | undefined}\n */\n this.file = ''\n\n // Field from `Error`.\n /**\n * Reason for message.\n *\n * @type {string}\n */\n this.message = reason\n\n /**\n * Starting line of error.\n *\n * @type {number | undefined}\n */\n this.line = start ? start.line : undefined\n\n // Field from `Error`.\n /**\n * Serialized positional info of message.\n *\n * On normal errors, this would be something like `ParseError`, buit in\n * `VFile` messages we use this space to show where an error happened.\n */\n this.name = stringifyPosition(options.place) || '1:1'\n\n /**\n * Place of message.\n *\n * @type {Point | Position | undefined}\n */\n this.place = options.place || undefined\n\n /**\n * Reason for message, should use markdown.\n *\n * @type {string}\n */\n this.reason = this.message\n\n /**\n * Category of message (example: `'my-rule'`).\n *\n * @type {string | undefined}\n */\n this.ruleId = options.ruleId || undefined\n\n /**\n * Namespace of message (example: `'my-package'`).\n *\n * @type {string | undefined}\n */\n this.source = options.source || undefined\n\n // Field from `Error`.\n /**\n * Stack of message.\n *\n * This is used by normal errors to show where something happened in\n * programming code, irrelevant for `VFile` messages,\n *\n * @type {string}\n */\n this.stack =\n legacyCause && options.cause && typeof options.cause.stack === 'string'\n ? options.cause.stack\n : ''\n\n // The following fields are “well known”.\n // Not standard.\n // Feel free to add other non-standard fields to your messages.\n\n /**\n * Specify the source value that’s being reported, which is deemed\n * incorrect.\n *\n * @type {string | undefined}\n */\n this.actual = undefined\n\n /**\n * Suggest acceptable values that can be used instead of `actual`.\n *\n * @type {Array<string> | undefined}\n */\n this.expected = undefined\n\n /**\n * Long form description of the message (you should use markdown).\n *\n * @type {string | undefined}\n */\n this.note = undefined\n\n /**\n * Link to docs for the message.\n *\n * > 👉 **Note**: this must be an absolute URL that can be passed as `x`\n * > to `new URL(x)`.\n *\n * @type {string | undefined}\n */\n this.url = undefined\n }\n}\n\nVFileMessage.prototype.file = ''\nVFileMessage.prototype.name = ''\nVFileMessage.prototype.reason = ''\nVFileMessage.prototype.message = ''\nVFileMessage.prototype.stack = ''\nVFileMessage.prototype.column = undefined\nVFileMessage.prototype.line = undefined\nVFileMessage.prototype.ancestors = undefined\nVFileMessage.prototype.cause = undefined\nVFileMessage.prototype.fatal = undefined\nVFileMessage.prototype.place = undefined\nVFileMessage.prototype.ruleId = undefined\nVFileMessage.prototype.source = undefined\n","/**\n * @import {Identifier, Literal, MemberExpression} from 'estree'\n * @import {Jsx, JsxDev, Options, Props} from 'hast-util-to-jsx-runtime'\n * @import {Element, Nodes, Parents, Root, Text} from 'hast'\n * @import {MdxFlowExpressionHast, MdxTextExpressionHast} from 'mdast-util-mdx-expression'\n * @import {MdxJsxFlowElementHast, MdxJsxTextElementHast} from 'mdast-util-mdx-jsx'\n * @import {MdxjsEsmHast} from 'mdast-util-mdxjs-esm'\n * @import {Position} from 'unist'\n * @import {Child, Create, Field, JsxElement, State, Style} from './types.js'\n */\n\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {ok as assert} from 'devlop'\nimport {name as isIdentifierName} from 'estree-util-is-identifier-name'\nimport {whitespace} from 'hast-util-whitespace'\nimport {find, hastToReact, html, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport styleToJs from 'style-to-js'\nimport {pointStart} from 'unist-util-position'\nimport {VFileMessage} from 'vfile-message'\n\n// To do: next major: `Object.hasOwn`.\nconst own = {}.hasOwnProperty\n\n/** @type {Map<string, number>} */\nconst emptyMap = new Map()\n\nconst cap = /[A-Z]/g\n\n// `react-dom` triggers a warning for *any* white space in tables.\n// To follow GFM, `mdast-util-to-hast` injects line endings between elements.\n// Other tools might do so too, but they don’t do here, so we remove all of\n// that.\n\n// See: <https://github.com/facebook/react/pull/7081>.\n// See: <https://github.com/facebook/react/pull/7515>.\n// See: <https://github.com/remarkjs/remark-react/issues/64>.\n// See: <https://github.com/rehypejs/rehype-react/pull/29>.\n// See: <https://github.com/rehypejs/rehype-react/pull/32>.\n// See: <https://github.com/rehypejs/rehype-react/pull/45>.\nconst tableElements = new Set(['table', 'tbody', 'thead', 'tfoot', 'tr'])\n\nconst tableCellElement = new Set(['td', 'th'])\n\nconst docs = 'https://github.com/syntax-tree/hast-util-to-jsx-runtime'\n\n/**\n * Transform a hast tree to preact, react, solid, svelte, vue, etc.,\n * with an automatic JSX runtime.\n *\n * @param {Nodes} tree\n * Tree to transform.\n * @param {Options} options\n * Configuration (required).\n * @returns {JsxElement}\n * JSX element.\n */\n\nexport function toJsxRuntime(tree, options) {\n if (!options || options.Fragment === undefined) {\n throw new TypeError('Expected `Fragment` in options')\n }\n\n const filePath = options.filePath || undefined\n /** @type {Create} */\n let create\n\n if (options.development) {\n if (typeof options.jsxDEV !== 'function') {\n throw new TypeError(\n 'Expected `jsxDEV` in options when `development: true`'\n )\n }\n\n create = developmentCreate(filePath, options.jsxDEV)\n } else {\n if (typeof options.jsx !== 'function') {\n throw new TypeError('Expected `jsx` in production options')\n }\n\n if (typeof options.jsxs !== 'function') {\n throw new TypeError('Expected `jsxs` in production options')\n }\n\n create = productionCreate(filePath, options.jsx, options.jsxs)\n }\n\n /** @type {State} */\n const state = {\n Fragment: options.Fragment,\n ancestors: [],\n components: options.components || {},\n create,\n elementAttributeNameCase: options.elementAttributeNameCase || 'react',\n evaluater: options.createEvaluater ? options.createEvaluater() : undefined,\n filePath,\n ignoreInvalidStyle: options.ignoreInvalidStyle || false,\n passKeys: options.passKeys !== false,\n passNode: options.passNode || false,\n schema: options.space === 'svg' ? svg : html,\n stylePropertyNameCase: options.stylePropertyNameCase || 'dom',\n tableCellAlignToStyle: options.tableCellAlignToStyle !== false\n }\n\n const result = one(state, tree, undefined)\n\n // JSX element.\n if (result && typeof result !== 'string') {\n return result\n }\n\n // Text node or something that turned into nothing.\n return state.create(\n tree,\n state.Fragment,\n {children: result || undefined},\n undefined\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around.\n * @param {Nodes} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction one(state, node, key) {\n if (node.type === 'element') {\n return element(state, node, key)\n }\n\n if (node.type === 'mdxFlowExpression' || node.type === 'mdxTextExpression') {\n return mdxExpression(state, node)\n }\n\n if (node.type === 'mdxJsxFlowElement' || node.type === 'mdxJsxTextElement') {\n return mdxJsxElement(state, node, key)\n }\n\n if (node.type === 'mdxjsEsm') {\n return mdxEsm(state, node)\n }\n\n if (node.type === 'root') {\n return root(state, node, key)\n }\n\n if (node.type === 'text') {\n return text(state, node)\n }\n}\n\n/**\n * Handle element.\n *\n * @param {State} state\n * Info passed around.\n * @param {Element} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction element(state, node, key) {\n const parentSchema = state.schema\n let schema = parentSchema\n\n if (node.tagName.toLowerCase() === 'svg' && parentSchema.space === 'html') {\n schema = svg\n state.schema = schema\n }\n\n state.ancestors.push(node)\n\n const type = findComponentFromName(state, node.tagName, false)\n const props = createElementProps(state, node)\n let children = createChildren(state, node)\n\n if (tableElements.has(node.tagName)) {\n children = children.filter(function (child) {\n return typeof child === 'string' ? !whitespace(child) : true\n })\n }\n\n addNode(state, props, type, node)\n addChildren(props, children)\n\n // Restore.\n state.ancestors.pop()\n state.schema = parentSchema\n\n return state.create(node, type, props, key)\n}\n\n/**\n * Handle MDX expression.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxFlowExpressionHast | MdxTextExpressionHast} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxExpression(state, node) {\n if (node.data && node.data.estree && state.evaluater) {\n const program = node.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n\n // Assume result is a child.\n return /** @type {Child | undefined} */ (\n state.evaluater.evaluateExpression(expression.expression)\n )\n }\n\n crashEstree(state, node.position)\n}\n\n/**\n * Handle MDX ESM.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxjsEsmHast} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxEsm(state, node) {\n if (node.data && node.data.estree && state.evaluater) {\n // Assume result is a child.\n return /** @type {Child | undefined} */ (\n state.evaluater.evaluateProgram(node.data.estree)\n )\n }\n\n crashEstree(state, node.position)\n}\n\n/**\n * Handle MDX JSX.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxJsxElement(state, node, key) {\n const parentSchema = state.schema\n let schema = parentSchema\n\n if (node.name === 'svg' && parentSchema.space === 'html') {\n schema = svg\n state.schema = schema\n }\n\n state.ancestors.push(node)\n\n const type =\n node.name === null\n ? state.Fragment\n : findComponentFromName(state, node.name, true)\n const props = createJsxElementProps(state, node)\n const children = createChildren(state, node)\n\n addNode(state, props, type, node)\n addChildren(props, children)\n\n // Restore.\n state.ancestors.pop()\n state.schema = parentSchema\n\n return state.create(node, type, props, key)\n}\n\n/**\n * Handle root.\n *\n * @param {State} state\n * Info passed around.\n * @param {Root} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction root(state, node, key) {\n /** @type {Props} */\n const props = {}\n\n addChildren(props, createChildren(state, node))\n\n return state.create(node, state.Fragment, props, key)\n}\n\n/**\n * Handle text.\n *\n * @param {State} _\n * Info passed around.\n * @param {Text} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction text(_, node) {\n return node.value\n}\n\n/**\n * Add `node` to props.\n *\n * @param {State} state\n * Info passed around.\n * @param {Props} props\n * Props.\n * @param {unknown} type\n * Type.\n * @param {Element | MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Node.\n * @returns {undefined}\n * Nothing.\n */\nfunction addNode(state, props, type, node) {\n // If this is swapped out for a component:\n if (typeof type !== 'string' && type !== state.Fragment && state.passNode) {\n props.node = node\n }\n}\n\n/**\n * Add children to props.\n *\n * @param {Props} props\n * Props.\n * @param {Array<Child>} children\n * Children.\n * @returns {undefined}\n * Nothing.\n */\nfunction addChildren(props, children) {\n if (children.length > 0) {\n const value = children.length > 1 ? children : children[0]\n\n if (value) {\n props.children = value\n }\n }\n}\n\n/**\n * @param {string | undefined} _\n * Path to file.\n * @param {Jsx} jsx\n * Dynamic.\n * @param {Jsx} jsxs\n * Static.\n * @returns {Create}\n * Create a production element.\n */\nfunction productionCreate(_, jsx, jsxs) {\n return create\n /** @type {Create} */\n function create(_, type, props, key) {\n // Only an array when there are 2 or more children.\n const isStaticChildren = Array.isArray(props.children)\n const fn = isStaticChildren ? jsxs : jsx\n return key ? fn(type, props, key) : fn(type, props)\n }\n}\n\n/**\n * @param {string | undefined} filePath\n * Path to file.\n * @param {JsxDev} jsxDEV\n * Development.\n * @returns {Create}\n * Create a development element.\n */\nfunction developmentCreate(filePath, jsxDEV) {\n return create\n /** @type {Create} */\n function create(node, type, props, key) {\n // Only an array when there are 2 or more children.\n const isStaticChildren = Array.isArray(props.children)\n const point = pointStart(node)\n return jsxDEV(\n type,\n props,\n key,\n isStaticChildren,\n {\n columnNumber: point ? point.column - 1 : undefined,\n fileName: filePath,\n lineNumber: point ? point.line : undefined\n },\n undefined\n )\n }\n}\n\n/**\n * Create props from an element.\n *\n * @param {State} state\n * Info passed around.\n * @param {Element} node\n * Current element.\n * @returns {Props}\n * Props.\n */\nfunction createElementProps(state, node) {\n /** @type {Props} */\n const props = {}\n /** @type {string | undefined} */\n let alignValue\n /** @type {string} */\n let prop\n\n for (prop in node.properties) {\n if (prop !== 'children' && own.call(node.properties, prop)) {\n const result = createProperty(state, prop, node.properties[prop])\n\n if (result) {\n const [key, value] = result\n\n if (\n state.tableCellAlignToStyle &&\n key === 'align' &&\n typeof value === 'string' &&\n tableCellElement.has(node.tagName)\n ) {\n alignValue = value\n } else {\n props[key] = value\n }\n }\n }\n }\n\n if (alignValue) {\n // Assume style is an object.\n const style = /** @type {Style} */ (props.style || (props.style = {}))\n style[state.stylePropertyNameCase === 'css' ? 'text-align' : 'textAlign'] =\n alignValue\n }\n\n return props\n}\n\n/**\n * Create props from a JSX element.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Current JSX element.\n * @returns {Props}\n * Props.\n */\nfunction createJsxElementProps(state, node) {\n /** @type {Props} */\n const props = {}\n\n for (const attribute of node.attributes) {\n if (attribute.type === 'mdxJsxExpressionAttribute') {\n if (attribute.data && attribute.data.estree && state.evaluater) {\n const program = attribute.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n const objectExpression = expression.expression\n assert(objectExpression.type === 'ObjectExpression')\n const property = objectExpression.properties[0]\n assert(property.type === 'SpreadElement')\n\n Object.assign(\n props,\n state.evaluater.evaluateExpression(property.argument)\n )\n } else {\n crashEstree(state, node.position)\n }\n } else {\n // For JSX, the author is responsible of passing in the correct values.\n const name = attribute.name\n /** @type {unknown} */\n let value\n\n if (attribute.value && typeof attribute.value === 'object') {\n if (\n attribute.value.data &&\n attribute.value.data.estree &&\n state.evaluater\n ) {\n const program = attribute.value.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n value = state.evaluater.evaluateExpression(expression.expression)\n } else {\n crashEstree(state, node.position)\n }\n } else {\n value = attribute.value === null ? true : attribute.value\n }\n\n // Assume a prop.\n props[name] = /** @type {Props[keyof Props]} */ (value)\n }\n }\n\n return props\n}\n\n/**\n * Create children.\n *\n * @param {State} state\n * Info passed around.\n * @param {Parents} node\n * Current element.\n * @returns {Array<Child>}\n * Children.\n */\nfunction createChildren(state, node) {\n /** @type {Array<Child>} */\n const children = []\n let index = -1\n /** @type {Map<string, number>} */\n // Note: test this when Solid doesn’t want to merge my upcoming PR.\n /* c8 ignore next */\n const countsByName = state.passKeys ? new Map() : emptyMap\n\n while (++index < node.children.length) {\n const child = node.children[index]\n /** @type {string | undefined} */\n let key\n\n if (state.passKeys) {\n const name =\n child.type === 'element'\n ? child.tagName\n : child.type === 'mdxJsxFlowElement' ||\n child.type === 'mdxJsxTextElement'\n ? child.name\n : undefined\n\n if (name) {\n const count = countsByName.get(name) || 0\n key = name + '-' + count\n countsByName.set(name, count + 1)\n }\n }\n\n const result = one(state, child, key)\n if (result !== undefined) children.push(result)\n }\n\n return children\n}\n\n/**\n * Handle a property.\n *\n * @param {State} state\n * Info passed around.\n * @param {string} prop\n * Key.\n * @param {Array<number | string> | boolean | number | string | null | undefined} value\n * hast property value.\n * @returns {Field | undefined}\n * Field for runtime, optional.\n */\nfunction createProperty(state, prop, value) {\n const info = find(state.schema, prop)\n\n // Ignore nullish and `NaN` values.\n if (\n value === null ||\n value === undefined ||\n (typeof value === 'number' && Number.isNaN(value))\n ) {\n return\n }\n\n if (Array.isArray(value)) {\n // Accept `array`.\n // Most props are space-separated.\n value = info.commaSeparated ? commas(value) : spaces(value)\n }\n\n // React only accepts `style` as object.\n if (info.property === 'style') {\n let styleObject =\n typeof value === 'object' ? value : parseStyle(state, String(value))\n\n if (state.stylePropertyNameCase === 'css') {\n styleObject = transformStylesToCssCasing(styleObject)\n }\n\n return ['style', styleObject]\n }\n\n return [\n state.elementAttributeNameCase === 'react' && info.space\n ? hastToReact[info.property] || info.property\n : info.attribute,\n value\n ]\n}\n\n/**\n * Parse a CSS declaration to an object.\n *\n * @param {State} state\n * Info passed around.\n * @param {string} value\n * CSS declarations.\n * @returns {Style}\n * Properties.\n * @throws\n * Throws `VFileMessage` when CSS cannot be parsed.\n */\nfunction parseStyle(state, value) {\n try {\n return styleToJs(value, {reactCompat: true})\n } catch (error) {\n if (state.ignoreInvalidStyle) {\n return {}\n }\n\n const cause = /** @type {Error} */ (error)\n const message = new VFileMessage('Cannot parse `style` attribute', {\n ancestors: state.ancestors,\n cause,\n ruleId: 'style',\n source: 'hast-util-to-jsx-runtime'\n })\n message.file = state.filePath || undefined\n message.url = docs + '#cannot-parse-style-attribute'\n\n throw message\n }\n}\n\n/**\n * Create a JSX name from a string.\n *\n * @param {State} state\n * To do.\n * @param {string} name\n * Name.\n * @param {boolean} allowExpression\n * Allow member expressions and identifiers.\n * @returns {unknown}\n * To do.\n */\nfunction findComponentFromName(state, name, allowExpression) {\n /** @type {Identifier | Literal | MemberExpression} */\n let result\n\n if (!allowExpression) {\n result = {type: 'Literal', value: name}\n } else if (name.includes('.')) {\n const identifiers = name.split('.')\n let index = -1\n /** @type {Identifier | Literal | MemberExpression | undefined} */\n let node\n\n while (++index < identifiers.length) {\n /** @type {Identifier | Literal} */\n const prop = isIdentifierName(identifiers[index])\n ? {type: 'Identifier', name: identifiers[index]}\n : {type: 'Literal', value: identifiers[index]}\n node = node\n ? {\n type: 'MemberExpression',\n object: node,\n property: prop,\n computed: Boolean(index && prop.type === 'Literal'),\n optional: false\n }\n : prop\n }\n\n assert(node, 'always a result')\n result = node\n } else {\n result =\n isIdentifierName(name) && !/^[a-z]/.test(name)\n ? {type: 'Identifier', name}\n : {type: 'Literal', value: name}\n }\n\n // Only literals can be passed in `components` currently.\n // No identifiers / member expressions.\n if (result.type === 'Literal') {\n const name = /** @type {string | number} */ (result.value)\n return own.call(state.components, name) ? state.components[name] : name\n }\n\n // Assume component.\n if (state.evaluater) {\n return state.evaluater.evaluateExpression(result)\n }\n\n crashEstree(state)\n}\n\n/**\n * @param {State} state\n * @param {Position | undefined} [place]\n * @returns {never}\n */\nfunction crashEstree(state, place) {\n const message = new VFileMessage(\n 'Cannot handle MDX estrees without `createEvaluater`',\n {\n ancestors: state.ancestors,\n place,\n ruleId: 'mdx-estree',\n source: 'hast-util-to-jsx-runtime'\n }\n )\n message.file = state.filePath || undefined\n message.url = docs + '#cannot-handle-mdx-estrees-without-createevaluater'\n\n throw message\n}\n\n/**\n * Transform a DOM casing style object to a CSS casing style object.\n *\n * @param {Style} domCasing\n * @returns {Style}\n */\nfunction transformStylesToCssCasing(domCasing) {\n /** @type {Style} */\n const cssCasing = {}\n /** @type {string} */\n let from\n\n for (from in domCasing) {\n if (own.call(domCasing, from)) {\n cssCasing[transformStyleToCssCasing(from)] = domCasing[from]\n }\n }\n\n return cssCasing\n}\n\n/**\n * Transform a DOM casing style field to a CSS casing style field.\n *\n * @param {string} from\n * @returns {string}\n */\nfunction transformStyleToCssCasing(from) {\n let to = from.replace(cap, toDash)\n // Handle `ms-xxx` -> `-ms-xxx`.\n if (to.slice(0, 3) === 'ms-') to = '-' + to\n return to\n}\n\n/**\n * Make `$0` dash cased.\n *\n * @param {string} $0\n * Capitalized ASCII leter.\n * @returns {string}\n * Dash and lower letter.\n */\nfunction toDash($0) {\n return '-' + $0.toLowerCase()\n}\n","//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) {\n\t\t__defProp(target, name, {\n\t\t\tget: all[name],\n\t\t\tenumerable: true\n\t\t});\n\t}\n\tif (!no_symbols) {\n\t\t__defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\t}\n\treturn target;\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\t\tkey = keys[i];\n\t\t\tif (!__hasOwnProp.call(to, key) && key !== except) {\n\t\t\t\t__defProp(to, key, {\n\t\t\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\n\n//#endregion\nexport { __reExport as n, __exportAll as t };","//#region src/error.ts\nvar ShikiError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"ShikiError\";\n\t}\n};\n\n//#endregion\nexport { ShikiError };","//#region src/error.ts\nvar ShikiError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"ShikiError\";\n\t}\n};\n\n//#endregion\nexport { ShikiError };","// src/utils.ts\nfunction clone(something) {\n return doClone(something);\n}\nfunction doClone(something) {\n if (Array.isArray(something)) {\n return cloneArray(something);\n }\n if (something instanceof RegExp) {\n return something;\n }\n if (typeof something === \"object\") {\n return cloneObj(something);\n }\n return something;\n}\nfunction cloneArray(arr) {\n let r = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n r[i] = doClone(arr[i]);\n }\n return r;\n}\nfunction cloneObj(obj) {\n let r = {};\n for (let key in obj) {\n r[key] = doClone(obj[key]);\n }\n return r;\n}\nfunction mergeObjects(target, ...sources) {\n sources.forEach((source) => {\n for (let key in source) {\n target[key] = source[key];\n }\n });\n return target;\n}\nfunction basename(path) {\n const idx = ~path.lastIndexOf(\"/\") || ~path.lastIndexOf(\"\\\\\");\n if (idx === 0) {\n return path;\n } else if (~idx === path.length - 1) {\n return basename(path.substring(0, path.length - 1));\n } else {\n return path.substr(~idx + 1);\n }\n}\nvar CAPTURING_REGEX_SOURCE = /\\$(\\d+)|\\${(\\d+):\\/(downcase|upcase)}/g;\nvar RegexSource = class {\n static hasCaptures(regexSource) {\n if (regexSource === null) {\n return false;\n }\n CAPTURING_REGEX_SOURCE.lastIndex = 0;\n return CAPTURING_REGEX_SOURCE.test(regexSource);\n }\n static replaceCaptures(regexSource, captureSource, captureIndices) {\n return regexSource.replace(CAPTURING_REGEX_SOURCE, (match, index, commandIndex, command) => {\n let capture = captureIndices[parseInt(index || commandIndex, 10)];\n if (capture) {\n let result = captureSource.substring(capture.start, capture.end);\n while (result[0] === \".\") {\n result = result.substring(1);\n }\n switch (command) {\n case \"downcase\":\n return result.toLowerCase();\n case \"upcase\":\n return result.toUpperCase();\n default:\n return result;\n }\n } else {\n return match;\n }\n });\n }\n};\nfunction strcmp(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n}\nfunction strArrCmp(a, b) {\n if (a === null && b === null) {\n return 0;\n }\n if (!a) {\n return -1;\n }\n if (!b) {\n return 1;\n }\n let len1 = a.length;\n let len2 = b.length;\n if (len1 === len2) {\n for (let i = 0; i < len1; i++) {\n let res = strcmp(a[i], b[i]);\n if (res !== 0) {\n return res;\n }\n }\n return 0;\n }\n return len1 - len2;\n}\nfunction isValidHexColor(hex) {\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\n return true;\n }\n if (/^#[0-9a-f]{8}$/i.test(hex)) {\n return true;\n }\n if (/^#[0-9a-f]{3}$/i.test(hex)) {\n return true;\n }\n if (/^#[0-9a-f]{4}$/i.test(hex)) {\n return true;\n }\n return false;\n}\nfunction escapeRegExpCharacters(value) {\n return value.replace(/[\\-\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, \"\\\\$&\");\n}\nvar CachedFn = class {\n constructor(fn) {\n this.fn = fn;\n }\n cache = /* @__PURE__ */ new Map();\n get(key) {\n if (this.cache.has(key)) {\n return this.cache.get(key);\n }\n const value = this.fn(key);\n this.cache.set(key, value);\n return value;\n }\n};\n\n// src/theme.ts\nvar Theme = class {\n constructor(_colorMap, _defaults, _root) {\n this._colorMap = _colorMap;\n this._defaults = _defaults;\n this._root = _root;\n }\n static createFromRawTheme(source, colorMap) {\n return this.createFromParsedTheme(parseTheme(source), colorMap);\n }\n static createFromParsedTheme(source, colorMap) {\n return resolveParsedThemeRules(source, colorMap);\n }\n _cachedMatchRoot = new CachedFn(\n (scopeName) => this._root.match(scopeName)\n );\n getColorMap() {\n return this._colorMap.getColorMap();\n }\n getDefaults() {\n return this._defaults;\n }\n match(scopePath) {\n if (scopePath === null) {\n return this._defaults;\n }\n const scopeName = scopePath.scopeName;\n const matchingTrieElements = this._cachedMatchRoot.get(scopeName);\n const effectiveRule = matchingTrieElements.find(\n (v) => _scopePathMatchesParentScopes(scopePath.parent, v.parentScopes)\n );\n if (!effectiveRule) {\n return null;\n }\n return new StyleAttributes(\n effectiveRule.fontStyle,\n effectiveRule.foreground,\n effectiveRule.background\n );\n }\n};\nvar ScopeStack = class _ScopeStack {\n constructor(parent, scopeName) {\n this.parent = parent;\n this.scopeName = scopeName;\n }\n static push(path, scopeNames) {\n for (const name of scopeNames) {\n path = new _ScopeStack(path, name);\n }\n return path;\n }\n static from(...segments) {\n let result = null;\n for (let i = 0; i < segments.length; i++) {\n result = new _ScopeStack(result, segments[i]);\n }\n return result;\n }\n push(scopeName) {\n return new _ScopeStack(this, scopeName);\n }\n getSegments() {\n let item = this;\n const result = [];\n while (item) {\n result.push(item.scopeName);\n item = item.parent;\n }\n result.reverse();\n return result;\n }\n toString() {\n return this.getSegments().join(\" \");\n }\n extends(other) {\n if (this === other) {\n return true;\n }\n if (this.parent === null) {\n return false;\n }\n return this.parent.extends(other);\n }\n getExtensionIfDefined(base) {\n const result = [];\n let item = this;\n while (item && item !== base) {\n result.push(item.scopeName);\n item = item.parent;\n }\n return item === base ? result.reverse() : void 0;\n }\n};\nfunction _scopePathMatchesParentScopes(scopePath, parentScopes) {\n if (parentScopes.length === 0) {\n return true;\n }\n for (let index = 0; index < parentScopes.length; index++) {\n let scopePattern = parentScopes[index];\n let scopeMustMatch = false;\n if (scopePattern === \">\") {\n if (index === parentScopes.length - 1) {\n return false;\n }\n scopePattern = parentScopes[++index];\n scopeMustMatch = true;\n }\n while (scopePath) {\n if (_matchesScope(scopePath.scopeName, scopePattern)) {\n break;\n }\n if (scopeMustMatch) {\n return false;\n }\n scopePath = scopePath.parent;\n }\n if (!scopePath) {\n return false;\n }\n scopePath = scopePath.parent;\n }\n return true;\n}\nfunction _matchesScope(scopeName, scopePattern) {\n return scopePattern === scopeName || scopeName.startsWith(scopePattern) && scopeName[scopePattern.length] === \".\";\n}\nvar StyleAttributes = class {\n constructor(fontStyle, foregroundId, backgroundId) {\n this.fontStyle = fontStyle;\n this.foregroundId = foregroundId;\n this.backgroundId = backgroundId;\n }\n};\nfunction parseTheme(source) {\n if (!source) {\n return [];\n }\n if (!source.settings || !Array.isArray(source.settings)) {\n return [];\n }\n let settings = source.settings;\n let result = [], resultLen = 0;\n for (let i = 0, len = settings.length; i < len; i++) {\n let entry = settings[i];\n if (!entry.settings) {\n continue;\n }\n let scopes;\n if (typeof entry.scope === \"string\") {\n let _scope = entry.scope;\n _scope = _scope.replace(/^[,]+/, \"\");\n _scope = _scope.replace(/[,]+$/, \"\");\n scopes = _scope.split(\",\");\n } else if (Array.isArray(entry.scope)) {\n scopes = entry.scope;\n } else {\n scopes = [\"\"];\n }\n let fontStyle = -1 /* NotSet */;\n if (typeof entry.settings.fontStyle === \"string\") {\n fontStyle = 0 /* None */;\n let segments = entry.settings.fontStyle.split(\" \");\n for (let j = 0, lenJ = segments.length; j < lenJ; j++) {\n let segment = segments[j];\n switch (segment) {\n case \"italic\":\n fontStyle = fontStyle | 1 /* Italic */;\n break;\n case \"bold\":\n fontStyle = fontStyle | 2 /* Bold */;\n break;\n case \"underline\":\n fontStyle = fontStyle | 4 /* Underline */;\n break;\n case \"strikethrough\":\n fontStyle = fontStyle | 8 /* Strikethrough */;\n break;\n }\n }\n }\n let foreground = null;\n if (typeof entry.settings.foreground === \"string\" && isValidHexColor(entry.settings.foreground)) {\n foreground = entry.settings.foreground;\n }\n let background = null;\n if (typeof entry.settings.background === \"string\" && isValidHexColor(entry.settings.background)) {\n background = entry.settings.background;\n }\n for (let j = 0, lenJ = scopes.length; j < lenJ; j++) {\n let _scope = scopes[j].trim();\n let segments = _scope.split(\" \");\n let scope = segments[segments.length - 1];\n let parentScopes = null;\n if (segments.length > 1) {\n parentScopes = segments.slice(0, segments.length - 1);\n parentScopes.reverse();\n }\n result[resultLen++] = new ParsedThemeRule(\n scope,\n parentScopes,\n i,\n fontStyle,\n foreground,\n background\n );\n }\n }\n return result;\n}\nvar ParsedThemeRule = class {\n constructor(scope, parentScopes, index, fontStyle, foreground, background) {\n this.scope = scope;\n this.parentScopes = parentScopes;\n this.index = index;\n this.fontStyle = fontStyle;\n this.foreground = foreground;\n this.background = background;\n }\n};\nvar FontStyle = /* @__PURE__ */ ((FontStyle2) => {\n FontStyle2[FontStyle2[\"NotSet\"] = -1] = \"NotSet\";\n FontStyle2[FontStyle2[\"None\"] = 0] = \"None\";\n FontStyle2[FontStyle2[\"Italic\"] = 1] = \"Italic\";\n FontStyle2[FontStyle2[\"Bold\"] = 2] = \"Bold\";\n FontStyle2[FontStyle2[\"Underline\"] = 4] = \"Underline\";\n FontStyle2[FontStyle2[\"Strikethrough\"] = 8] = \"Strikethrough\";\n return FontStyle2;\n})(FontStyle || {});\nfunction resolveParsedThemeRules(parsedThemeRules, _colorMap) {\n parsedThemeRules.sort((a, b) => {\n let r = strcmp(a.scope, b.scope);\n if (r !== 0) {\n return r;\n }\n r = strArrCmp(a.parentScopes, b.parentScopes);\n if (r !== 0) {\n return r;\n }\n return a.index - b.index;\n });\n let defaultFontStyle = 0 /* None */;\n let defaultForeground = \"#000000\";\n let defaultBackground = \"#ffffff\";\n while (parsedThemeRules.length >= 1 && parsedThemeRules[0].scope === \"\") {\n let incomingDefaults = parsedThemeRules.shift();\n if (incomingDefaults.fontStyle !== -1 /* NotSet */) {\n defaultFontStyle = incomingDefaults.fontStyle;\n }\n if (incomingDefaults.foreground !== null) {\n defaultForeground = incomingDefaults.foreground;\n }\n if (incomingDefaults.background !== null) {\n defaultBackground = incomingDefaults.background;\n }\n }\n let colorMap = new ColorMap(_colorMap);\n let defaults = new StyleAttributes(defaultFontStyle, colorMap.getId(defaultForeground), colorMap.getId(defaultBackground));\n let root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, -1 /* NotSet */, 0, 0), []);\n for (let i = 0, len = parsedThemeRules.length; i < len; i++) {\n let rule = parsedThemeRules[i];\n root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));\n }\n return new Theme(colorMap, defaults, root);\n}\nvar ColorMap = class {\n _isFrozen;\n _lastColorId;\n _id2color;\n _color2id;\n constructor(_colorMap) {\n this._lastColorId = 0;\n this._id2color = [];\n this._color2id = /* @__PURE__ */ Object.create(null);\n if (Array.isArray(_colorMap)) {\n this._isFrozen = true;\n for (let i = 0, len = _colorMap.length; i < len; i++) {\n this._color2id[_colorMap[i]] = i;\n this._id2color[i] = _colorMap[i];\n }\n } else {\n this._isFrozen = false;\n }\n }\n getId(color) {\n if (color === null) {\n return 0;\n }\n color = color.toUpperCase();\n let value = this._color2id[color];\n if (value) {\n return value;\n }\n if (this._isFrozen) {\n throw new Error(`Missing color in color map - ${color}`);\n }\n value = ++this._lastColorId;\n this._color2id[color] = value;\n this._id2color[value] = color;\n return value;\n }\n getColorMap() {\n return this._id2color.slice(0);\n }\n};\nvar emptyParentScopes = Object.freeze([]);\nvar ThemeTrieElementRule = class _ThemeTrieElementRule {\n scopeDepth;\n parentScopes;\n fontStyle;\n foreground;\n background;\n constructor(scopeDepth, parentScopes, fontStyle, foreground, background) {\n this.scopeDepth = scopeDepth;\n this.parentScopes = parentScopes || emptyParentScopes;\n this.fontStyle = fontStyle;\n this.foreground = foreground;\n this.background = background;\n }\n clone() {\n return new _ThemeTrieElementRule(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);\n }\n static cloneArr(arr) {\n let r = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n r[i] = arr[i].clone();\n }\n return r;\n }\n acceptOverwrite(scopeDepth, fontStyle, foreground, background) {\n if (this.scopeDepth > scopeDepth) {\n console.log(\"how did this happen?\");\n } else {\n this.scopeDepth = scopeDepth;\n }\n if (fontStyle !== -1 /* NotSet */) {\n this.fontStyle = fontStyle;\n }\n if (foreground !== 0) {\n this.foreground = foreground;\n }\n if (background !== 0) {\n this.background = background;\n }\n }\n};\nvar ThemeTrieElement = class _ThemeTrieElement {\n constructor(_mainRule, rulesWithParentScopes = [], _children = {}) {\n this._mainRule = _mainRule;\n this._children = _children;\n this._rulesWithParentScopes = rulesWithParentScopes;\n }\n _rulesWithParentScopes;\n static _cmpBySpecificity(a, b) {\n if (a.scopeDepth !== b.scopeDepth) {\n return b.scopeDepth - a.scopeDepth;\n }\n let aParentIndex = 0;\n let bParentIndex = 0;\n while (true) {\n if (a.parentScopes[aParentIndex] === \">\") {\n aParentIndex++;\n }\n if (b.parentScopes[bParentIndex] === \">\") {\n bParentIndex++;\n }\n if (aParentIndex >= a.parentScopes.length || bParentIndex >= b.parentScopes.length) {\n break;\n }\n const parentScopeLengthDiff = b.parentScopes[bParentIndex].length - a.parentScopes[aParentIndex].length;\n if (parentScopeLengthDiff !== 0) {\n return parentScopeLengthDiff;\n }\n aParentIndex++;\n bParentIndex++;\n }\n return b.parentScopes.length - a.parentScopes.length;\n }\n match(scope) {\n if (scope !== \"\") {\n let dotIndex = scope.indexOf(\".\");\n let head;\n let tail;\n if (dotIndex === -1) {\n head = scope;\n tail = \"\";\n } else {\n head = scope.substring(0, dotIndex);\n tail = scope.substring(dotIndex + 1);\n }\n if (this._children.hasOwnProperty(head)) {\n return this._children[head].match(tail);\n }\n }\n const rules = this._rulesWithParentScopes.concat(this._mainRule);\n rules.sort(_ThemeTrieElement._cmpBySpecificity);\n return rules;\n }\n insert(scopeDepth, scope, parentScopes, fontStyle, foreground, background) {\n if (scope === \"\") {\n this._doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background);\n return;\n }\n let dotIndex = scope.indexOf(\".\");\n let head;\n let tail;\n if (dotIndex === -1) {\n head = scope;\n tail = \"\";\n } else {\n head = scope.substring(0, dotIndex);\n tail = scope.substring(dotIndex + 1);\n }\n let child;\n if (this._children.hasOwnProperty(head)) {\n child = this._children[head];\n } else {\n child = new _ThemeTrieElement(this._mainRule.clone(), ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes));\n this._children[head] = child;\n }\n child.insert(scopeDepth + 1, tail, parentScopes, fontStyle, foreground, background);\n }\n _doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background) {\n if (parentScopes === null) {\n this._mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\n return;\n }\n for (let i = 0, len = this._rulesWithParentScopes.length; i < len; i++) {\n let rule = this._rulesWithParentScopes[i];\n if (strArrCmp(rule.parentScopes, parentScopes) === 0) {\n rule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\n return;\n }\n }\n if (fontStyle === -1 /* NotSet */) {\n fontStyle = this._mainRule.fontStyle;\n }\n if (foreground === 0) {\n foreground = this._mainRule.foreground;\n }\n if (background === 0) {\n background = this._mainRule.background;\n }\n this._rulesWithParentScopes.push(new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background));\n }\n};\n\n// src/encodedTokenAttributes.ts\nvar EncodedTokenMetadata = class _EncodedTokenMetadata {\n static toBinaryStr(encodedTokenAttributes) {\n return encodedTokenAttributes.toString(2).padStart(32, \"0\");\n }\n static print(encodedTokenAttributes) {\n const languageId = _EncodedTokenMetadata.getLanguageId(encodedTokenAttributes);\n const tokenType = _EncodedTokenMetadata.getTokenType(encodedTokenAttributes);\n const fontStyle = _EncodedTokenMetadata.getFontStyle(encodedTokenAttributes);\n const foreground = _EncodedTokenMetadata.getForeground(encodedTokenAttributes);\n const background = _EncodedTokenMetadata.getBackground(encodedTokenAttributes);\n console.log({\n languageId,\n tokenType,\n fontStyle,\n foreground,\n background\n });\n }\n static getLanguageId(encodedTokenAttributes) {\n return (encodedTokenAttributes & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */;\n }\n static getTokenType(encodedTokenAttributes) {\n return (encodedTokenAttributes & 768 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */;\n }\n static containsBalancedBrackets(encodedTokenAttributes) {\n return (encodedTokenAttributes & 1024 /* BALANCED_BRACKETS_MASK */) !== 0;\n }\n static getFontStyle(encodedTokenAttributes) {\n return (encodedTokenAttributes & 30720 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */;\n }\n static getForeground(encodedTokenAttributes) {\n return (encodedTokenAttributes & 16744448 /* FOREGROUND_MASK */) >>> 15 /* FOREGROUND_OFFSET */;\n }\n static getBackground(encodedTokenAttributes) {\n return (encodedTokenAttributes & 4278190080 /* BACKGROUND_MASK */) >>> 24 /* BACKGROUND_OFFSET */;\n }\n /**\n * Updates the fields in `metadata`.\n * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.\n */\n static set(encodedTokenAttributes, languageId, tokenType, containsBalancedBrackets, fontStyle, foreground, background) {\n let _languageId = _EncodedTokenMetadata.getLanguageId(encodedTokenAttributes);\n let _tokenType = _EncodedTokenMetadata.getTokenType(encodedTokenAttributes);\n let _containsBalancedBracketsBit = _EncodedTokenMetadata.containsBalancedBrackets(encodedTokenAttributes) ? 1 : 0;\n let _fontStyle = _EncodedTokenMetadata.getFontStyle(encodedTokenAttributes);\n let _foreground = _EncodedTokenMetadata.getForeground(encodedTokenAttributes);\n let _background = _EncodedTokenMetadata.getBackground(encodedTokenAttributes);\n if (languageId !== 0) {\n _languageId = languageId;\n }\n if (tokenType !== 8 /* NotSet */) {\n _tokenType = fromOptionalTokenType(tokenType);\n }\n if (containsBalancedBrackets !== null) {\n _containsBalancedBracketsBit = containsBalancedBrackets ? 1 : 0;\n }\n if (fontStyle !== -1 /* NotSet */) {\n _fontStyle = fontStyle;\n }\n if (foreground !== 0) {\n _foreground = foreground;\n }\n if (background !== 0) {\n _background = background;\n }\n return (_languageId << 0 /* LANGUAGEID_OFFSET */ | _tokenType << 8 /* TOKEN_TYPE_OFFSET */ | _containsBalancedBracketsBit << 10 /* BALANCED_BRACKETS_OFFSET */ | _fontStyle << 11 /* FONT_STYLE_OFFSET */ | _foreground << 15 /* FOREGROUND_OFFSET */ | _background << 24 /* BACKGROUND_OFFSET */) >>> 0;\n }\n};\nfunction toOptionalTokenType(standardType) {\n return standardType;\n}\nfunction fromOptionalTokenType(standardType) {\n return standardType;\n}\n\n// src/matcher.ts\nfunction createMatchers(selector, matchesName) {\n const results = [];\n const tokenizer = newTokenizer(selector);\n let token = tokenizer.next();\n while (token !== null) {\n let priority = 0;\n if (token.length === 2 && token.charAt(1) === \":\") {\n switch (token.charAt(0)) {\n case \"R\":\n priority = 1;\n break;\n case \"L\":\n priority = -1;\n break;\n default:\n console.log(`Unknown priority ${token} in scope selector`);\n }\n token = tokenizer.next();\n }\n let matcher = parseConjunction();\n results.push({ matcher, priority });\n if (token !== \",\") {\n break;\n }\n token = tokenizer.next();\n }\n return results;\n function parseOperand() {\n if (token === \"-\") {\n token = tokenizer.next();\n const expressionToNegate = parseOperand();\n return (matcherInput) => !!expressionToNegate && !expressionToNegate(matcherInput);\n }\n if (token === \"(\") {\n token = tokenizer.next();\n const expressionInParents = parseInnerExpression();\n if (token === \")\") {\n token = tokenizer.next();\n }\n return expressionInParents;\n }\n if (isIdentifier(token)) {\n const identifiers = [];\n do {\n identifiers.push(token);\n token = tokenizer.next();\n } while (isIdentifier(token));\n return (matcherInput) => matchesName(identifiers, matcherInput);\n }\n return null;\n }\n function parseConjunction() {\n const matchers = [];\n let matcher = parseOperand();\n while (matcher) {\n matchers.push(matcher);\n matcher = parseOperand();\n }\n return (matcherInput) => matchers.every((matcher2) => matcher2(matcherInput));\n }\n function parseInnerExpression() {\n const matchers = [];\n let matcher = parseConjunction();\n while (matcher) {\n matchers.push(matcher);\n if (token === \"|\" || token === \",\") {\n do {\n token = tokenizer.next();\n } while (token === \"|\" || token === \",\");\n } else {\n break;\n }\n matcher = parseConjunction();\n }\n return (matcherInput) => matchers.some((matcher2) => matcher2(matcherInput));\n }\n}\nfunction isIdentifier(token) {\n return !!token && !!token.match(/[\\w\\.:]+/);\n}\nfunction newTokenizer(input) {\n let regex = /([LR]:|[\\w\\.:][\\w\\.:\\-]*|[\\,\\|\\-\\(\\)])/g;\n let match = regex.exec(input);\n return {\n next: () => {\n if (!match) {\n return null;\n }\n const res = match[0];\n match = regex.exec(input);\n return res;\n }\n };\n}\n\n// src/onigLib.ts\nvar FindOption = /* @__PURE__ */ ((FindOption2) => {\n FindOption2[FindOption2[\"None\"] = 0] = \"None\";\n FindOption2[FindOption2[\"NotBeginString\"] = 1] = \"NotBeginString\";\n FindOption2[FindOption2[\"NotEndString\"] = 2] = \"NotEndString\";\n FindOption2[FindOption2[\"NotBeginPosition\"] = 4] = \"NotBeginPosition\";\n FindOption2[FindOption2[\"DebugCall\"] = 8] = \"DebugCall\";\n return FindOption2;\n})(FindOption || {});\nfunction disposeOnigString(str) {\n if (typeof str.dispose === \"function\") {\n str.dispose();\n }\n}\n\n// src/grammar/grammarDependencies.ts\nvar TopLevelRuleReference = class {\n constructor(scopeName) {\n this.scopeName = scopeName;\n }\n toKey() {\n return this.scopeName;\n }\n};\nvar TopLevelRepositoryRuleReference = class {\n constructor(scopeName, ruleName) {\n this.scopeName = scopeName;\n this.ruleName = ruleName;\n }\n toKey() {\n return `${this.scopeName}#${this.ruleName}`;\n }\n};\nvar ExternalReferenceCollector = class {\n _references = [];\n _seenReferenceKeys = /* @__PURE__ */ new Set();\n get references() {\n return this._references;\n }\n visitedRule = /* @__PURE__ */ new Set();\n add(reference) {\n const key = reference.toKey();\n if (this._seenReferenceKeys.has(key)) {\n return;\n }\n this._seenReferenceKeys.add(key);\n this._references.push(reference);\n }\n};\nvar ScopeDependencyProcessor = class {\n constructor(repo, initialScopeName) {\n this.repo = repo;\n this.initialScopeName = initialScopeName;\n this.seenFullScopeRequests.add(this.initialScopeName);\n this.Q = [new TopLevelRuleReference(this.initialScopeName)];\n }\n seenFullScopeRequests = /* @__PURE__ */ new Set();\n seenPartialScopeRequests = /* @__PURE__ */ new Set();\n Q;\n processQueue() {\n const q = this.Q;\n this.Q = [];\n const deps = new ExternalReferenceCollector();\n for (const dep of q) {\n collectReferencesOfReference(dep, this.initialScopeName, this.repo, deps);\n }\n for (const dep of deps.references) {\n if (dep instanceof TopLevelRuleReference) {\n if (this.seenFullScopeRequests.has(dep.scopeName)) {\n continue;\n }\n this.seenFullScopeRequests.add(dep.scopeName);\n this.Q.push(dep);\n } else {\n if (this.seenFullScopeRequests.has(dep.scopeName)) {\n continue;\n }\n if (this.seenPartialScopeRequests.has(dep.toKey())) {\n continue;\n }\n this.seenPartialScopeRequests.add(dep.toKey());\n this.Q.push(dep);\n }\n }\n }\n};\nfunction collectReferencesOfReference(reference, baseGrammarScopeName, repo, result) {\n const selfGrammar = repo.lookup(reference.scopeName);\n if (!selfGrammar) {\n if (reference.scopeName === baseGrammarScopeName) {\n throw new Error(`No grammar provided for <${baseGrammarScopeName}>`);\n }\n return;\n }\n const baseGrammar = repo.lookup(baseGrammarScopeName);\n if (reference instanceof TopLevelRuleReference) {\n collectExternalReferencesInTopLevelRule({ baseGrammar, selfGrammar }, result);\n } else {\n collectExternalReferencesInTopLevelRepositoryRule(\n reference.ruleName,\n { baseGrammar, selfGrammar, repository: selfGrammar.repository },\n result\n );\n }\n const injections = repo.injections(reference.scopeName);\n if (injections) {\n for (const injection of injections) {\n result.add(new TopLevelRuleReference(injection));\n }\n }\n}\nfunction collectExternalReferencesInTopLevelRepositoryRule(ruleName, context, result) {\n if (context.repository && context.repository[ruleName]) {\n const rule = context.repository[ruleName];\n collectExternalReferencesInRules([rule], context, result);\n }\n}\nfunction collectExternalReferencesInTopLevelRule(context, result) {\n if (context.selfGrammar.patterns && Array.isArray(context.selfGrammar.patterns)) {\n collectExternalReferencesInRules(\n context.selfGrammar.patterns,\n { ...context, repository: context.selfGrammar.repository },\n result\n );\n }\n if (context.selfGrammar.injections) {\n collectExternalReferencesInRules(\n Object.values(context.selfGrammar.injections),\n { ...context, repository: context.selfGrammar.repository },\n result\n );\n }\n}\nfunction collectExternalReferencesInRules(rules, context, result) {\n for (const rule of rules) {\n if (result.visitedRule.has(rule)) {\n continue;\n }\n result.visitedRule.add(rule);\n const patternRepository = rule.repository ? mergeObjects({}, context.repository, rule.repository) : context.repository;\n if (Array.isArray(rule.patterns)) {\n collectExternalReferencesInRules(rule.patterns, { ...context, repository: patternRepository }, result);\n }\n const include = rule.include;\n if (!include) {\n continue;\n }\n const reference = parseInclude(include);\n switch (reference.kind) {\n case 0 /* Base */:\n collectExternalReferencesInTopLevelRule({ ...context, selfGrammar: context.baseGrammar }, result);\n break;\n case 1 /* Self */:\n collectExternalReferencesInTopLevelRule(context, result);\n break;\n case 2 /* RelativeReference */:\n collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, { ...context, repository: patternRepository }, result);\n break;\n case 3 /* TopLevelReference */:\n case 4 /* TopLevelRepositoryReference */:\n const selfGrammar = reference.scopeName === context.selfGrammar.scopeName ? context.selfGrammar : reference.scopeName === context.baseGrammar.scopeName ? context.baseGrammar : void 0;\n if (selfGrammar) {\n const newContext = { baseGrammar: context.baseGrammar, selfGrammar, repository: patternRepository };\n if (reference.kind === 4 /* TopLevelRepositoryReference */) {\n collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, newContext, result);\n } else {\n collectExternalReferencesInTopLevelRule(newContext, result);\n }\n } else {\n if (reference.kind === 4 /* TopLevelRepositoryReference */) {\n result.add(new TopLevelRepositoryRuleReference(reference.scopeName, reference.ruleName));\n } else {\n result.add(new TopLevelRuleReference(reference.scopeName));\n }\n }\n break;\n }\n }\n}\nvar BaseReference = class {\n kind = 0 /* Base */;\n};\nvar SelfReference = class {\n kind = 1 /* Self */;\n};\nvar RelativeReference = class {\n constructor(ruleName) {\n this.ruleName = ruleName;\n }\n kind = 2 /* RelativeReference */;\n};\nvar TopLevelReference = class {\n constructor(scopeName) {\n this.scopeName = scopeName;\n }\n kind = 3 /* TopLevelReference */;\n};\nvar TopLevelRepositoryReference = class {\n constructor(scopeName, ruleName) {\n this.scopeName = scopeName;\n this.ruleName = ruleName;\n }\n kind = 4 /* TopLevelRepositoryReference */;\n};\nfunction parseInclude(include) {\n if (include === \"$base\") {\n return new BaseReference();\n } else if (include === \"$self\") {\n return new SelfReference();\n }\n const indexOfSharp = include.indexOf(\"#\");\n if (indexOfSharp === -1) {\n return new TopLevelReference(include);\n } else if (indexOfSharp === 0) {\n return new RelativeReference(include.substring(1));\n } else {\n const scopeName = include.substring(0, indexOfSharp);\n const ruleName = include.substring(indexOfSharp + 1);\n return new TopLevelRepositoryReference(scopeName, ruleName);\n }\n}\n\n// src/rule.ts\nvar HAS_BACK_REFERENCES = /\\\\(\\d+)/;\nvar BACK_REFERENCING_END = /\\\\(\\d+)/g;\nvar ruleIdSymbol = Symbol(\"RuleId\");\nvar endRuleId = -1;\nvar whileRuleId = -2;\nfunction ruleIdFromNumber(id) {\n return id;\n}\nfunction ruleIdToNumber(id) {\n return id;\n}\nvar Rule = class {\n $location;\n id;\n _nameIsCapturing;\n _name;\n _contentNameIsCapturing;\n _contentName;\n constructor($location, id, name, contentName) {\n this.$location = $location;\n this.id = id;\n this._name = name || null;\n this._nameIsCapturing = RegexSource.hasCaptures(this._name);\n this._contentName = contentName || null;\n this._contentNameIsCapturing = RegexSource.hasCaptures(this._contentName);\n }\n get debugName() {\n const location = this.$location ? `${basename(this.$location.filename)}:${this.$location.line}` : \"unknown\";\n return `${this.constructor.name}#${this.id} @ ${location}`;\n }\n getName(lineText, captureIndices) {\n if (!this._nameIsCapturing || this._name === null || lineText === null || captureIndices === null) {\n return this._name;\n }\n return RegexSource.replaceCaptures(this._name, lineText, captureIndices);\n }\n getContentName(lineText, captureIndices) {\n if (!this._contentNameIsCapturing || this._contentName === null) {\n return this._contentName;\n }\n return RegexSource.replaceCaptures(this._contentName, lineText, captureIndices);\n }\n};\nvar CaptureRule = class extends Rule {\n retokenizeCapturedWithRuleId;\n constructor($location, id, name, contentName, retokenizeCapturedWithRuleId) {\n super($location, id, name, contentName);\n this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId;\n }\n dispose() {\n }\n collectPatterns(grammar, out) {\n throw new Error(\"Not supported!\");\n }\n compile(grammar, endRegexSource) {\n throw new Error(\"Not supported!\");\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n throw new Error(\"Not supported!\");\n }\n};\nvar MatchRule = class extends Rule {\n _match;\n captures;\n _cachedCompiledPatterns;\n constructor($location, id, name, match, captures) {\n super($location, id, name, null);\n this._match = new RegExpSource(match, this.id);\n this.captures = captures;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n get debugMatchRegExp() {\n return `${this._match.source}`;\n }\n collectPatterns(grammar, out) {\n out.push(this._match);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n this.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n return this._cachedCompiledPatterns;\n }\n};\nvar IncludeOnlyRule = class extends Rule {\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n constructor($location, id, name, contentName, patterns) {\n super($location, id, name, contentName);\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n collectPatterns(grammar, out) {\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, out);\n }\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n this.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n return this._cachedCompiledPatterns;\n }\n};\nvar BeginEndRule = class extends Rule {\n _begin;\n beginCaptures;\n _end;\n endHasBackReferences;\n endCaptures;\n applyEndPatternLast;\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n constructor($location, id, name, contentName, begin, beginCaptures, end, endCaptures, applyEndPatternLast, patterns) {\n super($location, id, name, contentName);\n this._begin = new RegExpSource(begin, this.id);\n this.beginCaptures = beginCaptures;\n this._end = new RegExpSource(end ? end : \"\\uFFFF\", -1);\n this.endHasBackReferences = this._end.hasBackReferences;\n this.endCaptures = endCaptures;\n this.applyEndPatternLast = applyEndPatternLast || false;\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n get debugBeginRegExp() {\n return `${this._begin.source}`;\n }\n get debugEndRegExp() {\n return `${this._end.source}`;\n }\n getEndWithResolvedBackReferences(lineText, captureIndices) {\n return this._end.resolveBackReferences(lineText, captureIndices);\n }\n collectPatterns(grammar, out) {\n out.push(this._begin);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar, endRegexSource).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar, endRegexSource) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n if (this.applyEndPatternLast) {\n this._cachedCompiledPatterns.push(this._end.hasBackReferences ? this._end.clone() : this._end);\n } else {\n this._cachedCompiledPatterns.unshift(this._end.hasBackReferences ? this._end.clone() : this._end);\n }\n }\n if (this._end.hasBackReferences) {\n if (this.applyEndPatternLast) {\n this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, endRegexSource);\n } else {\n this._cachedCompiledPatterns.setSource(0, endRegexSource);\n }\n }\n return this._cachedCompiledPatterns;\n }\n};\nvar BeginWhileRule = class extends Rule {\n _begin;\n beginCaptures;\n whileCaptures;\n _while;\n whileHasBackReferences;\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n _cachedCompiledWhilePatterns;\n constructor($location, id, name, contentName, begin, beginCaptures, _while, whileCaptures, patterns) {\n super($location, id, name, contentName);\n this._begin = new RegExpSource(begin, this.id);\n this.beginCaptures = beginCaptures;\n this.whileCaptures = whileCaptures;\n this._while = new RegExpSource(_while, whileRuleId);\n this.whileHasBackReferences = this._while.hasBackReferences;\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n this._cachedCompiledWhilePatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n if (this._cachedCompiledWhilePatterns) {\n this._cachedCompiledWhilePatterns.dispose();\n this._cachedCompiledWhilePatterns = null;\n }\n }\n get debugBeginRegExp() {\n return `${this._begin.source}`;\n }\n get debugWhileRegExp() {\n return `${this._while.source}`;\n }\n getWhileWithResolvedBackReferences(lineText, captureIndices) {\n return this._while.resolveBackReferences(lineText, captureIndices);\n }\n collectPatterns(grammar, out) {\n out.push(this._begin);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n }\n return this._cachedCompiledPatterns;\n }\n compileWhile(grammar, endRegexSource) {\n return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compile(grammar);\n }\n compileWhileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledWhilePatterns(grammar, endRegexSource) {\n if (!this._cachedCompiledWhilePatterns) {\n this._cachedCompiledWhilePatterns = new RegExpSourceList();\n this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while);\n }\n if (this._while.hasBackReferences) {\n this._cachedCompiledWhilePatterns.setSource(0, endRegexSource ? endRegexSource : \"\\uFFFF\");\n }\n return this._cachedCompiledWhilePatterns;\n }\n};\nvar RuleFactory = class _RuleFactory {\n static createCaptureRule(helper, $location, name, contentName, retokenizeCapturedWithRuleId) {\n return helper.registerRule((id) => {\n return new CaptureRule($location, id, name, contentName, retokenizeCapturedWithRuleId);\n });\n }\n static getCompiledRuleId(desc, helper, repository) {\n if (!desc.id) {\n helper.registerRule((id) => {\n desc.id = id;\n if (desc.match) {\n return new MatchRule(\n desc.$vscodeTextmateLocation,\n desc.id,\n desc.name,\n desc.match,\n _RuleFactory._compileCaptures(desc.captures, helper, repository)\n );\n }\n if (typeof desc.begin === \"undefined\") {\n if (desc.repository) {\n repository = mergeObjects({}, repository, desc.repository);\n }\n let patterns = desc.patterns;\n if (typeof patterns === \"undefined\" && desc.include) {\n patterns = [{ include: desc.include }];\n }\n return new IncludeOnlyRule(\n desc.$vscodeTextmateLocation,\n desc.id,\n desc.name,\n desc.contentName,\n _RuleFactory._compilePatterns(patterns, helper, repository)\n );\n }\n if (desc.while) {\n return new BeginWhileRule(\n desc.$vscodeTextmateLocation,\n desc.id,\n desc.name,\n desc.contentName,\n desc.begin,\n _RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository),\n desc.while,\n _RuleFactory._compileCaptures(desc.whileCaptures || desc.captures, helper, repository),\n _RuleFactory._compilePatterns(desc.patterns, helper, repository)\n );\n }\n return new BeginEndRule(\n desc.$vscodeTextmateLocation,\n desc.id,\n desc.name,\n desc.contentName,\n desc.begin,\n _RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository),\n desc.end,\n _RuleFactory._compileCaptures(desc.endCaptures || desc.captures, helper, repository),\n desc.applyEndPatternLast,\n _RuleFactory._compilePatterns(desc.patterns, helper, repository)\n );\n });\n }\n return desc.id;\n }\n static _compileCaptures(captures, helper, repository) {\n let r = [];\n if (captures) {\n let maximumCaptureId = 0;\n for (const captureId in captures) {\n if (captureId === \"$vscodeTextmateLocation\") {\n continue;\n }\n const numericCaptureId = parseInt(captureId, 10);\n if (numericCaptureId > maximumCaptureId) {\n maximumCaptureId = numericCaptureId;\n }\n }\n for (let i = 0; i <= maximumCaptureId; i++) {\n r[i] = null;\n }\n for (const captureId in captures) {\n if (captureId === \"$vscodeTextmateLocation\") {\n continue;\n }\n const numericCaptureId = parseInt(captureId, 10);\n let retokenizeCapturedWithRuleId = 0;\n if (captures[captureId].patterns) {\n retokenizeCapturedWithRuleId = _RuleFactory.getCompiledRuleId(captures[captureId], helper, repository);\n }\n r[numericCaptureId] = _RuleFactory.createCaptureRule(helper, captures[captureId].$vscodeTextmateLocation, captures[captureId].name, captures[captureId].contentName, retokenizeCapturedWithRuleId);\n }\n }\n return r;\n }\n static _compilePatterns(patterns, helper, repository) {\n let r = [];\n if (patterns) {\n for (let i = 0, len = patterns.length; i < len; i++) {\n const pattern = patterns[i];\n let ruleId = -1;\n if (pattern.include) {\n const reference = parseInclude(pattern.include);\n switch (reference.kind) {\n case 0 /* Base */:\n case 1 /* Self */:\n ruleId = _RuleFactory.getCompiledRuleId(repository[pattern.include], helper, repository);\n break;\n case 2 /* RelativeReference */:\n let localIncludedRule = repository[reference.ruleName];\n if (localIncludedRule) {\n ruleId = _RuleFactory.getCompiledRuleId(localIncludedRule, helper, repository);\n } else {\n }\n break;\n case 3 /* TopLevelReference */:\n case 4 /* TopLevelRepositoryReference */:\n const externalGrammarName = reference.scopeName;\n const externalGrammarInclude = reference.kind === 4 /* TopLevelRepositoryReference */ ? reference.ruleName : null;\n const externalGrammar = helper.getExternalGrammar(externalGrammarName, repository);\n if (externalGrammar) {\n if (externalGrammarInclude) {\n let externalIncludedRule = externalGrammar.repository[externalGrammarInclude];\n if (externalIncludedRule) {\n ruleId = _RuleFactory.getCompiledRuleId(externalIncludedRule, helper, externalGrammar.repository);\n } else {\n }\n } else {\n ruleId = _RuleFactory.getCompiledRuleId(externalGrammar.repository.$self, helper, externalGrammar.repository);\n }\n } else {\n }\n break;\n }\n } else {\n ruleId = _RuleFactory.getCompiledRuleId(pattern, helper, repository);\n }\n if (ruleId !== -1) {\n const rule = helper.getRule(ruleId);\n let skipRule = false;\n if (rule instanceof IncludeOnlyRule || rule instanceof BeginEndRule || rule instanceof BeginWhileRule) {\n if (rule.hasMissingPatterns && rule.patterns.length === 0) {\n skipRule = true;\n }\n }\n if (skipRule) {\n continue;\n }\n r.push(ruleId);\n }\n }\n }\n return {\n patterns: r,\n hasMissingPatterns: (patterns ? patterns.length : 0) !== r.length\n };\n }\n};\nvar RegExpSource = class _RegExpSource {\n source;\n ruleId;\n hasAnchor;\n hasBackReferences;\n _anchorCache;\n constructor(regExpSource, ruleId) {\n if (regExpSource && typeof regExpSource === \"string\") {\n const len = regExpSource.length;\n let lastPushedPos = 0;\n let output = [];\n let hasAnchor = false;\n for (let pos = 0; pos < len; pos++) {\n const ch = regExpSource.charAt(pos);\n if (ch === \"\\\\\") {\n if (pos + 1 < len) {\n const nextCh = regExpSource.charAt(pos + 1);\n if (nextCh === \"z\") {\n output.push(regExpSource.substring(lastPushedPos, pos));\n output.push(\"$(?!\\\\n)(?<!\\\\n)\");\n lastPushedPos = pos + 2;\n } else if (nextCh === \"A\" || nextCh === \"G\") {\n hasAnchor = true;\n }\n pos++;\n }\n }\n }\n this.hasAnchor = hasAnchor;\n if (lastPushedPos === 0) {\n this.source = regExpSource;\n } else {\n output.push(regExpSource.substring(lastPushedPos, len));\n this.source = output.join(\"\");\n }\n } else {\n this.hasAnchor = false;\n this.source = regExpSource;\n }\n if (this.hasAnchor) {\n this._anchorCache = this._buildAnchorCache();\n } else {\n this._anchorCache = null;\n }\n this.ruleId = ruleId;\n if (typeof this.source === \"string\") {\n this.hasBackReferences = HAS_BACK_REFERENCES.test(this.source);\n } else {\n this.hasBackReferences = false;\n }\n }\n clone() {\n return new _RegExpSource(this.source, this.ruleId);\n }\n setSource(newSource) {\n if (this.source === newSource) {\n return;\n }\n this.source = newSource;\n if (this.hasAnchor) {\n this._anchorCache = this._buildAnchorCache();\n }\n }\n resolveBackReferences(lineText, captureIndices) {\n if (typeof this.source !== \"string\") {\n throw new Error(\"This method should only be called if the source is a string\");\n }\n let capturedValues = captureIndices.map((capture) => {\n return lineText.substring(capture.start, capture.end);\n });\n BACK_REFERENCING_END.lastIndex = 0;\n return this.source.replace(BACK_REFERENCING_END, (match, g1) => {\n return escapeRegExpCharacters(capturedValues[parseInt(g1, 10)] || \"\");\n });\n }\n _buildAnchorCache() {\n if (typeof this.source !== \"string\") {\n throw new Error(\"This method should only be called if the source is a string\");\n }\n let A0_G0_result = [];\n let A0_G1_result = [];\n let A1_G0_result = [];\n let A1_G1_result = [];\n let pos, len, ch, nextCh;\n for (pos = 0, len = this.source.length; pos < len; pos++) {\n ch = this.source.charAt(pos);\n A0_G0_result[pos] = ch;\n A0_G1_result[pos] = ch;\n A1_G0_result[pos] = ch;\n A1_G1_result[pos] = ch;\n if (ch === \"\\\\\") {\n if (pos + 1 < len) {\n nextCh = this.source.charAt(pos + 1);\n if (nextCh === \"A\") {\n A0_G0_result[pos + 1] = \"\\uFFFF\";\n A0_G1_result[pos + 1] = \"\\uFFFF\";\n A1_G0_result[pos + 1] = \"A\";\n A1_G1_result[pos + 1] = \"A\";\n } else if (nextCh === \"G\") {\n A0_G0_result[pos + 1] = \"\\uFFFF\";\n A0_G1_result[pos + 1] = \"G\";\n A1_G0_result[pos + 1] = \"\\uFFFF\";\n A1_G1_result[pos + 1] = \"G\";\n } else {\n A0_G0_result[pos + 1] = nextCh;\n A0_G1_result[pos + 1] = nextCh;\n A1_G0_result[pos + 1] = nextCh;\n A1_G1_result[pos + 1] = nextCh;\n }\n pos++;\n }\n }\n }\n return {\n A0_G0: A0_G0_result.join(\"\"),\n A0_G1: A0_G1_result.join(\"\"),\n A1_G0: A1_G0_result.join(\"\"),\n A1_G1: A1_G1_result.join(\"\")\n };\n }\n resolveAnchors(allowA, allowG) {\n if (!this.hasAnchor || !this._anchorCache || typeof this.source !== \"string\") {\n return this.source;\n }\n if (allowA) {\n if (allowG) {\n return this._anchorCache.A1_G1;\n } else {\n return this._anchorCache.A1_G0;\n }\n } else {\n if (allowG) {\n return this._anchorCache.A0_G1;\n } else {\n return this._anchorCache.A0_G0;\n }\n }\n }\n};\nvar RegExpSourceList = class {\n _items;\n _hasAnchors;\n _cached;\n _anchorCache;\n constructor() {\n this._items = [];\n this._hasAnchors = false;\n this._cached = null;\n this._anchorCache = {\n A0_G0: null,\n A0_G1: null,\n A1_G0: null,\n A1_G1: null\n };\n }\n dispose() {\n this._disposeCaches();\n }\n _disposeCaches() {\n if (this._cached) {\n this._cached.dispose();\n this._cached = null;\n }\n if (this._anchorCache.A0_G0) {\n this._anchorCache.A0_G0.dispose();\n this._anchorCache.A0_G0 = null;\n }\n if (this._anchorCache.A0_G1) {\n this._anchorCache.A0_G1.dispose();\n this._anchorCache.A0_G1 = null;\n }\n if (this._anchorCache.A1_G0) {\n this._anchorCache.A1_G0.dispose();\n this._anchorCache.A1_G0 = null;\n }\n if (this._anchorCache.A1_G1) {\n this._anchorCache.A1_G1.dispose();\n this._anchorCache.A1_G1 = null;\n }\n }\n push(item) {\n this._items.push(item);\n this._hasAnchors = this._hasAnchors || item.hasAnchor;\n }\n unshift(item) {\n this._items.unshift(item);\n this._hasAnchors = this._hasAnchors || item.hasAnchor;\n }\n length() {\n return this._items.length;\n }\n setSource(index, newSource) {\n if (this._items[index].source !== newSource) {\n this._disposeCaches();\n this._items[index].setSource(newSource);\n }\n }\n compile(onigLib) {\n if (!this._cached) {\n let regExps = this._items.map((e) => e.source);\n this._cached = new CompiledRule(onigLib, regExps, this._items.map((e) => e.ruleId));\n }\n return this._cached;\n }\n compileAG(onigLib, allowA, allowG) {\n if (!this._hasAnchors) {\n return this.compile(onigLib);\n } else {\n if (allowA) {\n if (allowG) {\n if (!this._anchorCache.A1_G1) {\n this._anchorCache.A1_G1 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A1_G1;\n } else {\n if (!this._anchorCache.A1_G0) {\n this._anchorCache.A1_G0 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A1_G0;\n }\n } else {\n if (allowG) {\n if (!this._anchorCache.A0_G1) {\n this._anchorCache.A0_G1 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A0_G1;\n } else {\n if (!this._anchorCache.A0_G0) {\n this._anchorCache.A0_G0 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A0_G0;\n }\n }\n }\n }\n _resolveAnchors(onigLib, allowA, allowG) {\n let regExps = this._items.map((e) => e.resolveAnchors(allowA, allowG));\n return new CompiledRule(onigLib, regExps, this._items.map((e) => e.ruleId));\n }\n};\nvar CompiledRule = class {\n constructor(onigLib, regExps, rules) {\n this.regExps = regExps;\n this.rules = rules;\n this.scanner = onigLib.createOnigScanner(regExps);\n }\n scanner;\n dispose() {\n if (typeof this.scanner.dispose === \"function\") {\n this.scanner.dispose();\n }\n }\n toString() {\n const r = [];\n for (let i = 0, len = this.rules.length; i < len; i++) {\n r.push(\" - \" + this.rules[i] + \": \" + this.regExps[i]);\n }\n return r.join(\"\\n\");\n }\n findNextMatchSync(string, startPosition, options) {\n const result = this.scanner.findNextMatchSync(string, startPosition, options);\n if (!result) {\n return null;\n }\n return {\n ruleId: this.rules[result.index],\n captureIndices: result.captureIndices\n };\n }\n};\n\n// src/grammar/basicScopesAttributeProvider.ts\nvar BasicScopeAttributes = class {\n constructor(languageId, tokenType) {\n this.languageId = languageId;\n this.tokenType = tokenType;\n }\n};\nvar BasicScopeAttributesProvider = class _BasicScopeAttributesProvider {\n _defaultAttributes;\n _embeddedLanguagesMatcher;\n constructor(initialLanguageId, embeddedLanguages) {\n this._defaultAttributes = new BasicScopeAttributes(initialLanguageId, 8 /* NotSet */);\n this._embeddedLanguagesMatcher = new ScopeMatcher(Object.entries(embeddedLanguages || {}));\n }\n getDefaultAttributes() {\n return this._defaultAttributes;\n }\n getBasicScopeAttributes(scopeName) {\n if (scopeName === null) {\n return _BasicScopeAttributesProvider._NULL_SCOPE_METADATA;\n }\n return this._getBasicScopeAttributes.get(scopeName);\n }\n static _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0);\n _getBasicScopeAttributes = new CachedFn((scopeName) => {\n const languageId = this._scopeToLanguage(scopeName);\n const standardTokenType = this._toStandardTokenType(scopeName);\n return new BasicScopeAttributes(languageId, standardTokenType);\n });\n /**\n * Given a produced TM scope, return the language that token describes or null if unknown.\n * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null\n */\n _scopeToLanguage(scope) {\n return this._embeddedLanguagesMatcher.match(scope) || 0;\n }\n _toStandardTokenType(scopeName) {\n const m = scopeName.match(_BasicScopeAttributesProvider.STANDARD_TOKEN_TYPE_REGEXP);\n if (!m) {\n return 8 /* NotSet */;\n }\n switch (m[1]) {\n case \"comment\":\n return 1 /* Comment */;\n case \"string\":\n return 2 /* String */;\n case \"regex\":\n return 3 /* RegEx */;\n case \"meta.embedded\":\n return 0 /* Other */;\n }\n throw new Error(\"Unexpected match for standard token type!\");\n }\n static STANDARD_TOKEN_TYPE_REGEXP = /\\b(comment|string|regex|meta\\.embedded)\\b/;\n};\nvar ScopeMatcher = class {\n values;\n scopesRegExp;\n constructor(values) {\n if (values.length === 0) {\n this.values = null;\n this.scopesRegExp = null;\n } else {\n this.values = new Map(values);\n const escapedScopes = values.map(\n ([scopeName, value]) => escapeRegExpCharacters(scopeName)\n );\n escapedScopes.sort();\n escapedScopes.reverse();\n this.scopesRegExp = new RegExp(\n `^((${escapedScopes.join(\")|(\")}))($|\\\\.)`,\n \"\"\n );\n }\n }\n match(scope) {\n if (!this.scopesRegExp) {\n return void 0;\n }\n const m = scope.match(this.scopesRegExp);\n if (!m) {\n return void 0;\n }\n return this.values.get(m[1]);\n }\n};\n\n// src/debug.ts\nvar DebugFlags = {\n InDebugMode: typeof process !== \"undefined\" && !!process.env[\"VSCODE_TEXTMATE_DEBUG\"]\n};\nvar UseOnigurumaFindOptions = false;\n\n// src/grammar/tokenizeString.ts\nvar TokenizeStringResult = class {\n constructor(stack, stoppedEarly) {\n this.stack = stack;\n this.stoppedEarly = stoppedEarly;\n }\n};\nfunction _tokenizeString(grammar, lineText, isFirstLine, linePos, stack, lineTokens, checkWhileConditions, timeLimit) {\n const lineLength = lineText.content.length;\n let STOP = false;\n let anchorPosition = -1;\n if (checkWhileConditions) {\n const whileCheckResult = _checkWhileConditions(\n grammar,\n lineText,\n isFirstLine,\n linePos,\n stack,\n lineTokens\n );\n stack = whileCheckResult.stack;\n linePos = whileCheckResult.linePos;\n isFirstLine = whileCheckResult.isFirstLine;\n anchorPosition = whileCheckResult.anchorPosition;\n }\n const startTime = Date.now();\n while (!STOP) {\n if (timeLimit !== 0) {\n const elapsedTime = Date.now() - startTime;\n if (elapsedTime > timeLimit) {\n return new TokenizeStringResult(stack, true);\n }\n }\n scanNext();\n }\n return new TokenizeStringResult(stack, false);\n function scanNext() {\n if (false) {\n console.log(\"\");\n console.log(\n `@@scanNext ${linePos}: |${lineText.content.substr(linePos).replace(/\\n$/, \"\\\\n\")}|`\n );\n }\n const r = matchRuleOrInjections(\n grammar,\n lineText,\n isFirstLine,\n linePos,\n stack,\n anchorPosition\n );\n if (!r) {\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n const captureIndices = r.captureIndices;\n const matchedRuleId = r.matchedRuleId;\n const hasAdvanced = captureIndices && captureIndices.length > 0 ? captureIndices[0].end > linePos : false;\n if (matchedRuleId === endRuleId) {\n const poppedRule = stack.getRule(grammar);\n if (false) {\n console.log(\n \" popping \" + poppedRule.debugName + \" - \" + poppedRule.debugEndRegExp\n );\n }\n lineTokens.produce(stack, captureIndices[0].start);\n stack = stack.withContentNameScopesList(stack.nameScopesList);\n handleCaptures(\n grammar,\n lineText,\n isFirstLine,\n stack,\n lineTokens,\n poppedRule.endCaptures,\n captureIndices\n );\n lineTokens.produce(stack, captureIndices[0].end);\n const popped = stack;\n stack = stack.parent;\n anchorPosition = popped.getAnchorPos();\n if (!hasAdvanced && popped.getEnterPos() === linePos) {\n if (false) {\n console.error(\n \"[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing\"\n );\n }\n stack = popped;\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n } else {\n const _rule = grammar.getRule(matchedRuleId);\n lineTokens.produce(stack, captureIndices[0].start);\n const beforePush = stack;\n const scopeName = _rule.getName(lineText.content, captureIndices);\n const nameScopesList = stack.contentNameScopesList.pushAttributed(\n scopeName,\n grammar\n );\n stack = stack.push(\n matchedRuleId,\n linePos,\n anchorPosition,\n captureIndices[0].end === lineLength,\n null,\n nameScopesList,\n nameScopesList\n );\n if (_rule instanceof BeginEndRule) {\n const pushedRule = _rule;\n if (false) {\n console.log(\n \" pushing \" + pushedRule.debugName + \" - \" + pushedRule.debugBeginRegExp\n );\n }\n handleCaptures(\n grammar,\n lineText,\n isFirstLine,\n stack,\n lineTokens,\n pushedRule.beginCaptures,\n captureIndices\n );\n lineTokens.produce(stack, captureIndices[0].end);\n anchorPosition = captureIndices[0].end;\n const contentName = pushedRule.getContentName(\n lineText.content,\n captureIndices\n );\n const contentNameScopesList = nameScopesList.pushAttributed(\n contentName,\n grammar\n );\n stack = stack.withContentNameScopesList(contentNameScopesList);\n if (pushedRule.endHasBackReferences) {\n stack = stack.withEndRule(\n pushedRule.getEndWithResolvedBackReferences(\n lineText.content,\n captureIndices\n )\n );\n }\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\n if (false) {\n console.error(\n \"[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing\"\n );\n }\n stack = stack.pop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n } else if (_rule instanceof BeginWhileRule) {\n const pushedRule = _rule;\n if (false) {\n console.log(\" pushing \" + pushedRule.debugName);\n }\n handleCaptures(\n grammar,\n lineText,\n isFirstLine,\n stack,\n lineTokens,\n pushedRule.beginCaptures,\n captureIndices\n );\n lineTokens.produce(stack, captureIndices[0].end);\n anchorPosition = captureIndices[0].end;\n const contentName = pushedRule.getContentName(\n lineText.content,\n captureIndices\n );\n const contentNameScopesList = nameScopesList.pushAttributed(\n contentName,\n grammar\n );\n stack = stack.withContentNameScopesList(contentNameScopesList);\n if (pushedRule.whileHasBackReferences) {\n stack = stack.withEndRule(\n pushedRule.getWhileWithResolvedBackReferences(\n lineText.content,\n captureIndices\n )\n );\n }\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\n if (false) {\n console.error(\n \"[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing\"\n );\n }\n stack = stack.pop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n } else {\n const matchingRule = _rule;\n if (false) {\n console.log(\n \" matched \" + matchingRule.debugName + \" - \" + matchingRule.debugMatchRegExp\n );\n }\n handleCaptures(\n grammar,\n lineText,\n isFirstLine,\n stack,\n lineTokens,\n matchingRule.captures,\n captureIndices\n );\n lineTokens.produce(stack, captureIndices[0].end);\n stack = stack.pop();\n if (!hasAdvanced) {\n if (false) {\n console.error(\n \"[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping\"\n );\n }\n stack = stack.safePop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n }\n }\n if (captureIndices[0].end > linePos) {\n linePos = captureIndices[0].end;\n isFirstLine = false;\n }\n }\n}\nfunction _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {\n let anchorPosition = stack.beginRuleCapturedEOL ? 0 : -1;\n const whileRules = [];\n for (let node = stack; node; node = node.pop()) {\n const nodeRule = node.getRule(grammar);\n if (nodeRule instanceof BeginWhileRule) {\n whileRules.push({\n rule: nodeRule,\n stack: node\n });\n }\n }\n for (let whileRule = whileRules.pop(); whileRule; whileRule = whileRules.pop()) {\n const { ruleScanner, findOptions } = prepareRuleWhileSearch(whileRule.rule, grammar, whileRule.stack.endRule, isFirstLine, linePos === anchorPosition);\n const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (false) {\n console.log(\" scanning for while rule\");\n console.log(ruleScanner.toString());\n }\n if (r) {\n const matchedRuleId = r.ruleId;\n if (matchedRuleId !== whileRuleId) {\n stack = whileRule.stack.pop();\n break;\n }\n if (r.captureIndices && r.captureIndices.length) {\n lineTokens.produce(whileRule.stack, r.captureIndices[0].start);\n handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens, whileRule.rule.whileCaptures, r.captureIndices);\n lineTokens.produce(whileRule.stack, r.captureIndices[0].end);\n anchorPosition = r.captureIndices[0].end;\n if (r.captureIndices[0].end > linePos) {\n linePos = r.captureIndices[0].end;\n isFirstLine = false;\n }\n }\n } else {\n if (false) {\n console.log(\" popping \" + whileRule.rule.debugName + \" - \" + whileRule.rule.debugWhileRegExp);\n }\n stack = whileRule.stack.pop();\n break;\n }\n }\n return { stack, linePos, anchorPosition, isFirstLine };\n}\nfunction matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n const matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\n const injections = grammar.getInjections();\n if (injections.length === 0) {\n return matchResult;\n }\n const injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\n if (!injectionResult) {\n return matchResult;\n }\n if (!matchResult) {\n return injectionResult;\n }\n const matchResultScore = matchResult.captureIndices[0].start;\n const injectionResultScore = injectionResult.captureIndices[0].start;\n if (injectionResultScore < matchResultScore || injectionResult.priorityMatch && injectionResultScore === matchResultScore) {\n return injectionResult;\n }\n return matchResult;\n}\nfunction matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n const rule = stack.getRule(grammar);\n const { ruleScanner, findOptions } = prepareRuleSearch(rule, grammar, stack.endRule, isFirstLine, linePos === anchorPosition);\n const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (r) {\n return {\n captureIndices: r.captureIndices,\n matchedRuleId: r.ruleId\n };\n }\n return null;\n}\nfunction matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n let bestMatchRating = Number.MAX_VALUE;\n let bestMatchCaptureIndices = null;\n let bestMatchRuleId;\n let bestMatchResultPriority = 0;\n const scopes = stack.contentNameScopesList.getScopeNames();\n for (let i = 0, len = injections.length; i < len; i++) {\n const injection = injections[i];\n if (!injection.matcher(scopes)) {\n continue;\n }\n const rule = grammar.getRule(injection.ruleId);\n const { ruleScanner, findOptions } = prepareRuleSearch(rule, grammar, null, isFirstLine, linePos === anchorPosition);\n const matchResult = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (!matchResult) {\n continue;\n }\n if (false) {\n console.log(` matched injection: ${injection.debugSelector}`);\n console.log(ruleScanner.toString());\n }\n const matchRating = matchResult.captureIndices[0].start;\n if (matchRating >= bestMatchRating) {\n continue;\n }\n bestMatchRating = matchRating;\n bestMatchCaptureIndices = matchResult.captureIndices;\n bestMatchRuleId = matchResult.ruleId;\n bestMatchResultPriority = injection.priority;\n if (bestMatchRating === linePos) {\n break;\n }\n }\n if (bestMatchCaptureIndices) {\n return {\n priorityMatch: bestMatchResultPriority === -1,\n captureIndices: bestMatchCaptureIndices,\n matchedRuleId: bestMatchRuleId\n };\n }\n return null;\n}\nfunction prepareRuleSearch(rule, grammar, endRegexSource, allowA, allowG) {\n if (UseOnigurumaFindOptions) {\n const ruleScanner2 = rule.compile(grammar, endRegexSource);\n const findOptions = getFindOptions(allowA, allowG);\n return { ruleScanner: ruleScanner2, findOptions };\n }\n const ruleScanner = rule.compileAG(grammar, endRegexSource, allowA, allowG);\n return { ruleScanner, findOptions: 0 /* None */ };\n}\nfunction prepareRuleWhileSearch(rule, grammar, endRegexSource, allowA, allowG) {\n if (UseOnigurumaFindOptions) {\n const ruleScanner2 = rule.compileWhile(grammar, endRegexSource);\n const findOptions = getFindOptions(allowA, allowG);\n return { ruleScanner: ruleScanner2, findOptions };\n }\n const ruleScanner = rule.compileWhileAG(grammar, endRegexSource, allowA, allowG);\n return { ruleScanner, findOptions: 0 /* None */ };\n}\nfunction getFindOptions(allowA, allowG) {\n let options = 0 /* None */;\n if (!allowA) {\n options |= 1 /* NotBeginString */;\n }\n if (!allowG) {\n options |= 4 /* NotBeginPosition */;\n }\n return options;\n}\nfunction handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, captures, captureIndices) {\n if (captures.length === 0) {\n return;\n }\n const lineTextContent = lineText.content;\n const len = Math.min(captures.length, captureIndices.length);\n const localStack = [];\n const maxEnd = captureIndices[0].end;\n for (let i = 0; i < len; i++) {\n const captureRule = captures[i];\n if (captureRule === null) {\n continue;\n }\n const captureIndex = captureIndices[i];\n if (captureIndex.length === 0) {\n continue;\n }\n if (captureIndex.start > maxEnd) {\n break;\n }\n while (localStack.length > 0 && localStack[localStack.length - 1].endPos <= captureIndex.start) {\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\n localStack.pop();\n }\n if (localStack.length > 0) {\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, captureIndex.start);\n } else {\n lineTokens.produce(stack, captureIndex.start);\n }\n if (captureRule.retokenizeCapturedWithRuleId) {\n const scopeName = captureRule.getName(lineTextContent, captureIndices);\n const nameScopesList = stack.contentNameScopesList.pushAttributed(scopeName, grammar);\n const contentName = captureRule.getContentName(lineTextContent, captureIndices);\n const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);\n const stackClone = stack.push(captureRule.retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, nameScopesList, contentNameScopesList);\n const onigSubStr = grammar.createOnigString(lineTextContent.substring(0, captureIndex.end));\n _tokenizeString(\n grammar,\n onigSubStr,\n isFirstLine && captureIndex.start === 0,\n captureIndex.start,\n stackClone,\n lineTokens,\n false,\n /* no time limit */\n 0\n );\n disposeOnigString(onigSubStr);\n continue;\n }\n const captureRuleScopeName = captureRule.getName(lineTextContent, captureIndices);\n if (captureRuleScopeName !== null) {\n const base = localStack.length > 0 ? localStack[localStack.length - 1].scopes : stack.contentNameScopesList;\n const captureRuleScopesList = base.pushAttributed(captureRuleScopeName, grammar);\n localStack.push(new LocalStackElement(captureRuleScopesList, captureIndex.end));\n }\n }\n while (localStack.length > 0) {\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\n localStack.pop();\n }\n}\nvar LocalStackElement = class {\n scopes;\n endPos;\n constructor(scopes, endPos) {\n this.scopes = scopes;\n this.endPos = endPos;\n }\n};\n\n// src/grammar/grammar.ts\nfunction createGrammar(scopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, onigLib) {\n return new Grammar(\n scopeName,\n grammar,\n initialLanguage,\n embeddedLanguages,\n tokenTypes,\n balancedBracketSelectors,\n grammarRepository,\n onigLib\n );\n}\nfunction collectInjections(result, selector, rule, ruleFactoryHelper, grammar) {\n const matchers = createMatchers(selector, nameMatcher);\n const ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, grammar.repository);\n for (const matcher of matchers) {\n result.push({\n debugSelector: selector,\n matcher: matcher.matcher,\n ruleId,\n grammar,\n priority: matcher.priority\n });\n }\n}\nfunction nameMatcher(identifers, scopes) {\n if (scopes.length < identifers.length) {\n return false;\n }\n let lastIndex = 0;\n return identifers.every((identifier) => {\n for (let i = lastIndex; i < scopes.length; i++) {\n if (scopesAreMatching(scopes[i], identifier)) {\n lastIndex = i + 1;\n return true;\n }\n }\n return false;\n });\n}\nfunction scopesAreMatching(thisScopeName, scopeName) {\n if (!thisScopeName) {\n return false;\n }\n if (thisScopeName === scopeName) {\n return true;\n }\n const len = scopeName.length;\n return thisScopeName.length > len && thisScopeName.substr(0, len) === scopeName && thisScopeName[len] === \".\";\n}\nvar Grammar = class {\n constructor(_rootScopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, _onigLib) {\n this._rootScopeName = _rootScopeName;\n this.balancedBracketSelectors = balancedBracketSelectors;\n this._onigLib = _onigLib;\n this._basicScopeAttributesProvider = new BasicScopeAttributesProvider(\n initialLanguage,\n embeddedLanguages\n );\n this._rootId = -1;\n this._lastRuleId = 0;\n this._ruleId2desc = [null];\n this._includedGrammars = {};\n this._grammarRepository = grammarRepository;\n this._grammar = initGrammar(grammar, null);\n this._injections = null;\n this._tokenTypeMatchers = [];\n if (tokenTypes) {\n for (const selector of Object.keys(tokenTypes)) {\n const matchers = createMatchers(selector, nameMatcher);\n for (const matcher of matchers) {\n this._tokenTypeMatchers.push({\n matcher: matcher.matcher,\n type: tokenTypes[selector]\n });\n }\n }\n }\n }\n _rootId;\n _lastRuleId;\n _ruleId2desc;\n _includedGrammars;\n _grammarRepository;\n _grammar;\n _injections;\n _basicScopeAttributesProvider;\n _tokenTypeMatchers;\n get themeProvider() {\n return this._grammarRepository;\n }\n dispose() {\n for (const rule of this._ruleId2desc) {\n if (rule) {\n rule.dispose();\n }\n }\n }\n createOnigScanner(sources) {\n return this._onigLib.createOnigScanner(sources);\n }\n createOnigString(sources) {\n return this._onigLib.createOnigString(sources);\n }\n getMetadataForScope(scope) {\n return this._basicScopeAttributesProvider.getBasicScopeAttributes(scope);\n }\n _collectInjections() {\n const grammarRepository = {\n lookup: (scopeName2) => {\n if (scopeName2 === this._rootScopeName) {\n return this._grammar;\n }\n return this.getExternalGrammar(scopeName2);\n },\n injections: (scopeName2) => {\n return this._grammarRepository.injections(scopeName2);\n }\n };\n const result = [];\n const scopeName = this._rootScopeName;\n const grammar = grammarRepository.lookup(scopeName);\n if (grammar) {\n const rawInjections = grammar.injections;\n if (rawInjections) {\n for (let expression in rawInjections) {\n collectInjections(\n result,\n expression,\n rawInjections[expression],\n this,\n grammar\n );\n }\n }\n const injectionScopeNames = this._grammarRepository.injections(scopeName);\n if (injectionScopeNames) {\n injectionScopeNames.forEach((injectionScopeName) => {\n const injectionGrammar = this.getExternalGrammar(injectionScopeName);\n if (injectionGrammar) {\n const selector = injectionGrammar.injectionSelector;\n if (selector) {\n collectInjections(\n result,\n selector,\n injectionGrammar,\n this,\n injectionGrammar\n );\n }\n }\n });\n }\n }\n result.sort((i1, i2) => i1.priority - i2.priority);\n return result;\n }\n getInjections() {\n if (this._injections === null) {\n this._injections = this._collectInjections();\n }\n return this._injections;\n }\n registerRule(factory) {\n const id = ++this._lastRuleId;\n const result = factory(ruleIdFromNumber(id));\n this._ruleId2desc[id] = result;\n return result;\n }\n getRule(ruleId) {\n return this._ruleId2desc[ruleIdToNumber(ruleId)];\n }\n getExternalGrammar(scopeName, repository) {\n if (this._includedGrammars[scopeName]) {\n return this._includedGrammars[scopeName];\n } else if (this._grammarRepository) {\n const rawIncludedGrammar = this._grammarRepository.lookup(scopeName);\n if (rawIncludedGrammar) {\n this._includedGrammars[scopeName] = initGrammar(\n rawIncludedGrammar,\n repository && repository.$base\n );\n return this._includedGrammars[scopeName];\n }\n }\n return void 0;\n }\n tokenizeLine(lineText, prevState, timeLimit = 0) {\n const r = this._tokenize(lineText, prevState, false, timeLimit);\n return {\n tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),\n ruleStack: r.ruleStack,\n stoppedEarly: r.stoppedEarly\n };\n }\n tokenizeLine2(lineText, prevState, timeLimit = 0) {\n const r = this._tokenize(lineText, prevState, true, timeLimit);\n return {\n tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),\n ruleStack: r.ruleStack,\n stoppedEarly: r.stoppedEarly\n };\n }\n _tokenize(lineText, prevState, emitBinaryTokens, timeLimit) {\n if (this._rootId === -1) {\n this._rootId = RuleFactory.getCompiledRuleId(\n this._grammar.repository.$self,\n this,\n this._grammar.repository\n );\n this.getInjections();\n }\n let isFirstLine;\n if (!prevState || prevState === StateStackImpl.NULL) {\n isFirstLine = true;\n const rawDefaultMetadata = this._basicScopeAttributesProvider.getDefaultAttributes();\n const defaultStyle = this.themeProvider.getDefaults();\n const defaultMetadata = EncodedTokenMetadata.set(\n 0,\n rawDefaultMetadata.languageId,\n rawDefaultMetadata.tokenType,\n null,\n defaultStyle.fontStyle,\n defaultStyle.foregroundId,\n defaultStyle.backgroundId\n );\n const rootScopeName = this.getRule(this._rootId).getName(\n null,\n null\n );\n let scopeList;\n if (rootScopeName) {\n scopeList = AttributedScopeStack.createRootAndLookUpScopeName(\n rootScopeName,\n defaultMetadata,\n this\n );\n } else {\n scopeList = AttributedScopeStack.createRoot(\n \"unknown\",\n defaultMetadata\n );\n }\n prevState = new StateStackImpl(\n null,\n this._rootId,\n -1,\n -1,\n false,\n null,\n scopeList,\n scopeList\n );\n } else {\n isFirstLine = false;\n prevState.reset();\n }\n lineText = lineText + \"\\n\";\n const onigLineText = this.createOnigString(lineText);\n const lineLength = onigLineText.content.length;\n const lineTokens = new LineTokens(\n emitBinaryTokens,\n lineText,\n this._tokenTypeMatchers,\n this.balancedBracketSelectors\n );\n const r = _tokenizeString(\n this,\n onigLineText,\n isFirstLine,\n 0,\n prevState,\n lineTokens,\n true,\n timeLimit\n );\n disposeOnigString(onigLineText);\n return {\n lineLength,\n lineTokens,\n ruleStack: r.stack,\n stoppedEarly: r.stoppedEarly\n };\n }\n};\nfunction initGrammar(grammar, base) {\n grammar = clone(grammar);\n grammar.repository = grammar.repository || {};\n grammar.repository.$self = {\n $vscodeTextmateLocation: grammar.$vscodeTextmateLocation,\n patterns: grammar.patterns,\n name: grammar.scopeName\n };\n grammar.repository.$base = base || grammar.repository.$self;\n return grammar;\n}\nvar AttributedScopeStack = class _AttributedScopeStack {\n /**\n * Invariant:\n * ```\n * if (parent && !scopePath.extends(parent.scopePath)) {\n * \tthrow new Error();\n * }\n * ```\n */\n constructor(parent, scopePath, tokenAttributes) {\n this.parent = parent;\n this.scopePath = scopePath;\n this.tokenAttributes = tokenAttributes;\n }\n static fromExtension(namesScopeList, contentNameScopesList) {\n let current = namesScopeList;\n let scopeNames = namesScopeList?.scopePath ?? null;\n for (const frame of contentNameScopesList) {\n scopeNames = ScopeStack.push(scopeNames, frame.scopeNames);\n current = new _AttributedScopeStack(current, scopeNames, frame.encodedTokenAttributes);\n }\n return current;\n }\n static createRoot(scopeName, tokenAttributes) {\n return new _AttributedScopeStack(null, new ScopeStack(null, scopeName), tokenAttributes);\n }\n static createRootAndLookUpScopeName(scopeName, tokenAttributes, grammar) {\n const rawRootMetadata = grammar.getMetadataForScope(scopeName);\n const scopePath = new ScopeStack(null, scopeName);\n const rootStyle = grammar.themeProvider.themeMatch(scopePath);\n const resolvedTokenAttributes = _AttributedScopeStack.mergeAttributes(\n tokenAttributes,\n rawRootMetadata,\n rootStyle\n );\n return new _AttributedScopeStack(null, scopePath, resolvedTokenAttributes);\n }\n get scopeName() {\n return this.scopePath.scopeName;\n }\n toString() {\n return this.getScopeNames().join(\" \");\n }\n equals(other) {\n return _AttributedScopeStack.equals(this, other);\n }\n static equals(a, b) {\n do {\n if (a === b) {\n return true;\n }\n if (!a && !b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n if (a.scopeName !== b.scopeName || a.tokenAttributes !== b.tokenAttributes) {\n return false;\n }\n a = a.parent;\n b = b.parent;\n } while (true);\n }\n static mergeAttributes(existingTokenAttributes, basicScopeAttributes, styleAttributes) {\n let fontStyle = -1 /* NotSet */;\n let foreground = 0;\n let background = 0;\n if (styleAttributes !== null) {\n fontStyle = styleAttributes.fontStyle;\n foreground = styleAttributes.foregroundId;\n background = styleAttributes.backgroundId;\n }\n return EncodedTokenMetadata.set(\n existingTokenAttributes,\n basicScopeAttributes.languageId,\n basicScopeAttributes.tokenType,\n null,\n fontStyle,\n foreground,\n background\n );\n }\n pushAttributed(scopePath, grammar) {\n if (scopePath === null) {\n return this;\n }\n if (scopePath.indexOf(\" \") === -1) {\n return _AttributedScopeStack._pushAttributed(this, scopePath, grammar);\n }\n const scopes = scopePath.split(/ /g);\n let result = this;\n for (const scope of scopes) {\n result = _AttributedScopeStack._pushAttributed(result, scope, grammar);\n }\n return result;\n }\n static _pushAttributed(target, scopeName, grammar) {\n const rawMetadata = grammar.getMetadataForScope(scopeName);\n const newPath = target.scopePath.push(scopeName);\n const scopeThemeMatchResult = grammar.themeProvider.themeMatch(newPath);\n const metadata = _AttributedScopeStack.mergeAttributes(\n target.tokenAttributes,\n rawMetadata,\n scopeThemeMatchResult\n );\n return new _AttributedScopeStack(target, newPath, metadata);\n }\n getScopeNames() {\n return this.scopePath.getSegments();\n }\n getExtensionIfDefined(base) {\n const result = [];\n let self = this;\n while (self && self !== base) {\n result.push({\n encodedTokenAttributes: self.tokenAttributes,\n scopeNames: self.scopePath.getExtensionIfDefined(self.parent?.scopePath ?? null)\n });\n self = self.parent;\n }\n return self === base ? result.reverse() : void 0;\n }\n};\nvar StateStackImpl = class _StateStackImpl {\n /**\n * Invariant:\n * ```\n * if (contentNameScopesList !== nameScopesList && contentNameScopesList?.parent !== nameScopesList) {\n * \tthrow new Error();\n * }\n * if (this.parent && !nameScopesList.extends(this.parent.contentNameScopesList)) {\n * \tthrow new Error();\n * }\n * ```\n */\n constructor(parent, ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {\n this.parent = parent;\n this.ruleId = ruleId;\n this.beginRuleCapturedEOL = beginRuleCapturedEOL;\n this.endRule = endRule;\n this.nameScopesList = nameScopesList;\n this.contentNameScopesList = contentNameScopesList;\n this.depth = this.parent ? this.parent.depth + 1 : 1;\n this._enterPos = enterPos;\n this._anchorPos = anchorPos;\n }\n _stackElementBrand = void 0;\n // TODO remove me\n static NULL = new _StateStackImpl(\n null,\n 0,\n 0,\n 0,\n false,\n null,\n null,\n null\n );\n /**\n * The position on the current line where this state was pushed.\n * This is relevant only while tokenizing a line, to detect endless loops.\n * Its value is meaningless across lines.\n */\n _enterPos;\n /**\n * The captured anchor position when this stack element was pushed.\n * This is relevant only while tokenizing a line, to restore the anchor position when popping.\n * Its value is meaningless across lines.\n */\n _anchorPos;\n /**\n * The depth of the stack.\n */\n depth;\n equals(other) {\n if (other === null) {\n return false;\n }\n return _StateStackImpl._equals(this, other);\n }\n static _equals(a, b) {\n if (a === b) {\n return true;\n }\n if (!this._structuralEquals(a, b)) {\n return false;\n }\n return AttributedScopeStack.equals(a.contentNameScopesList, b.contentNameScopesList);\n }\n /**\n * A structural equals check. Does not take into account `scopes`.\n */\n static _structuralEquals(a, b) {\n do {\n if (a === b) {\n return true;\n }\n if (!a && !b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n if (a.depth !== b.depth || a.ruleId !== b.ruleId || a.endRule !== b.endRule) {\n return false;\n }\n a = a.parent;\n b = b.parent;\n } while (true);\n }\n clone() {\n return this;\n }\n static _reset(el) {\n while (el) {\n el._enterPos = -1;\n el._anchorPos = -1;\n el = el.parent;\n }\n }\n reset() {\n _StateStackImpl._reset(this);\n }\n pop() {\n return this.parent;\n }\n safePop() {\n if (this.parent) {\n return this.parent;\n }\n return this;\n }\n push(ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {\n return new _StateStackImpl(\n this,\n ruleId,\n enterPos,\n anchorPos,\n beginRuleCapturedEOL,\n endRule,\n nameScopesList,\n contentNameScopesList\n );\n }\n getEnterPos() {\n return this._enterPos;\n }\n getAnchorPos() {\n return this._anchorPos;\n }\n getRule(grammar) {\n return grammar.getRule(this.ruleId);\n }\n toString() {\n const r = [];\n this._writeString(r, 0);\n return \"[\" + r.join(\",\") + \"]\";\n }\n _writeString(res, outIndex) {\n if (this.parent) {\n outIndex = this.parent._writeString(res, outIndex);\n }\n res[outIndex++] = `(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`;\n return outIndex;\n }\n withContentNameScopesList(contentNameScopeStack) {\n if (this.contentNameScopesList === contentNameScopeStack) {\n return this;\n }\n return this.parent.push(\n this.ruleId,\n this._enterPos,\n this._anchorPos,\n this.beginRuleCapturedEOL,\n this.endRule,\n this.nameScopesList,\n contentNameScopeStack\n );\n }\n withEndRule(endRule) {\n if (this.endRule === endRule) {\n return this;\n }\n return new _StateStackImpl(\n this.parent,\n this.ruleId,\n this._enterPos,\n this._anchorPos,\n this.beginRuleCapturedEOL,\n endRule,\n this.nameScopesList,\n this.contentNameScopesList\n );\n }\n // Used to warn of endless loops\n hasSameRuleAs(other) {\n let el = this;\n while (el && el._enterPos === other._enterPos) {\n if (el.ruleId === other.ruleId) {\n return true;\n }\n el = el.parent;\n }\n return false;\n }\n toStateStackFrame() {\n return {\n ruleId: ruleIdToNumber(this.ruleId),\n beginRuleCapturedEOL: this.beginRuleCapturedEOL,\n endRule: this.endRule,\n nameScopesList: this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList ?? null) ?? [],\n contentNameScopesList: this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList) ?? []\n };\n }\n static pushFrame(self, frame) {\n const namesScopeList = AttributedScopeStack.fromExtension(self?.nameScopesList ?? null, frame.nameScopesList);\n return new _StateStackImpl(\n self,\n ruleIdFromNumber(frame.ruleId),\n frame.enterPos ?? -1,\n frame.anchorPos ?? -1,\n frame.beginRuleCapturedEOL,\n frame.endRule,\n namesScopeList,\n AttributedScopeStack.fromExtension(namesScopeList, frame.contentNameScopesList)\n );\n }\n};\nvar BalancedBracketSelectors = class {\n balancedBracketScopes;\n unbalancedBracketScopes;\n allowAny = false;\n constructor(balancedBracketScopes, unbalancedBracketScopes) {\n this.balancedBracketScopes = balancedBracketScopes.flatMap(\n (selector) => {\n if (selector === \"*\") {\n this.allowAny = true;\n return [];\n }\n return createMatchers(selector, nameMatcher).map((m) => m.matcher);\n }\n );\n this.unbalancedBracketScopes = unbalancedBracketScopes.flatMap(\n (selector) => createMatchers(selector, nameMatcher).map((m) => m.matcher)\n );\n }\n get matchesAlways() {\n return this.allowAny && this.unbalancedBracketScopes.length === 0;\n }\n get matchesNever() {\n return this.balancedBracketScopes.length === 0 && !this.allowAny;\n }\n match(scopes) {\n for (const excluder of this.unbalancedBracketScopes) {\n if (excluder(scopes)) {\n return false;\n }\n }\n for (const includer of this.balancedBracketScopes) {\n if (includer(scopes)) {\n return true;\n }\n }\n return this.allowAny;\n }\n};\nvar LineTokens = class {\n constructor(emitBinaryTokens, lineText, tokenTypeOverrides, balancedBracketSelectors) {\n this.balancedBracketSelectors = balancedBracketSelectors;\n this._emitBinaryTokens = emitBinaryTokens;\n this._tokenTypeOverrides = tokenTypeOverrides;\n if (false) {\n this._lineText = lineText;\n } else {\n this._lineText = null;\n }\n this._tokens = [];\n this._binaryTokens = [];\n this._lastTokenEndIndex = 0;\n }\n _emitBinaryTokens;\n /**\n * defined only if `false`.\n */\n _lineText;\n /**\n * used only if `_emitBinaryTokens` is false.\n */\n _tokens;\n /**\n * used only if `_emitBinaryTokens` is true.\n */\n _binaryTokens;\n _lastTokenEndIndex;\n _tokenTypeOverrides;\n produce(stack, endIndex) {\n this.produceFromScopes(stack.contentNameScopesList, endIndex);\n }\n produceFromScopes(scopesList, endIndex) {\n if (this._lastTokenEndIndex >= endIndex) {\n return;\n }\n if (this._emitBinaryTokens) {\n let metadata = scopesList?.tokenAttributes ?? 0;\n let containsBalancedBrackets = false;\n if (this.balancedBracketSelectors?.matchesAlways) {\n containsBalancedBrackets = true;\n }\n if (this._tokenTypeOverrides.length > 0 || this.balancedBracketSelectors && !this.balancedBracketSelectors.matchesAlways && !this.balancedBracketSelectors.matchesNever) {\n const scopes2 = scopesList?.getScopeNames() ?? [];\n for (const tokenType of this._tokenTypeOverrides) {\n if (tokenType.matcher(scopes2)) {\n metadata = EncodedTokenMetadata.set(\n metadata,\n 0,\n toOptionalTokenType(tokenType.type),\n null,\n -1 /* NotSet */,\n 0,\n 0\n );\n }\n }\n if (this.balancedBracketSelectors) {\n containsBalancedBrackets = this.balancedBracketSelectors.match(scopes2);\n }\n }\n if (containsBalancedBrackets) {\n metadata = EncodedTokenMetadata.set(\n metadata,\n 0,\n 8 /* NotSet */,\n containsBalancedBrackets,\n -1 /* NotSet */,\n 0,\n 0\n );\n }\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === metadata) {\n this._lastTokenEndIndex = endIndex;\n return;\n }\n this._binaryTokens.push(this._lastTokenEndIndex);\n this._binaryTokens.push(metadata);\n this._lastTokenEndIndex = endIndex;\n return;\n }\n const scopes = scopesList?.getScopeNames() ?? [];\n this._tokens.push({\n startIndex: this._lastTokenEndIndex,\n endIndex,\n // value: lineText.substring(lastTokenEndIndex, endIndex),\n scopes\n });\n this._lastTokenEndIndex = endIndex;\n }\n getResult(stack, lineLength) {\n if (this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === lineLength - 1) {\n this._tokens.pop();\n }\n if (this._tokens.length === 0) {\n this._lastTokenEndIndex = -1;\n this.produce(stack, lineLength);\n this._tokens[this._tokens.length - 1].startIndex = 0;\n }\n return this._tokens;\n }\n getBinaryResult(stack, lineLength) {\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === lineLength - 1) {\n this._binaryTokens.pop();\n this._binaryTokens.pop();\n }\n if (this._binaryTokens.length === 0) {\n this._lastTokenEndIndex = -1;\n this.produce(stack, lineLength);\n this._binaryTokens[this._binaryTokens.length - 2] = 0;\n }\n const result = new Uint32Array(this._binaryTokens.length);\n for (let i = 0, len = this._binaryTokens.length; i < len; i++) {\n result[i] = this._binaryTokens[i];\n }\n return result;\n }\n};\n\n// src/registry.ts\nvar SyncRegistry = class {\n constructor(theme, _onigLib) {\n this._onigLib = _onigLib;\n this._theme = theme;\n }\n _grammars = /* @__PURE__ */ new Map();\n _rawGrammars = /* @__PURE__ */ new Map();\n _injectionGrammars = /* @__PURE__ */ new Map();\n _theme;\n dispose() {\n for (const grammar of this._grammars.values()) {\n grammar.dispose();\n }\n }\n setTheme(theme) {\n this._theme = theme;\n }\n getColorMap() {\n return this._theme.getColorMap();\n }\n /**\n * Add `grammar` to registry and return a list of referenced scope names\n */\n addGrammar(grammar, injectionScopeNames) {\n this._rawGrammars.set(grammar.scopeName, grammar);\n if (injectionScopeNames) {\n this._injectionGrammars.set(grammar.scopeName, injectionScopeNames);\n }\n }\n /**\n * Lookup a raw grammar.\n */\n lookup(scopeName) {\n return this._rawGrammars.get(scopeName);\n }\n /**\n * Returns the injections for the given grammar\n */\n injections(targetScope) {\n return this._injectionGrammars.get(targetScope);\n }\n /**\n * Get the default theme settings\n */\n getDefaults() {\n return this._theme.getDefaults();\n }\n /**\n * Match a scope in the theme.\n */\n themeMatch(scopePath) {\n return this._theme.match(scopePath);\n }\n /**\n * Lookup a grammar.\n */\n grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {\n if (!this._grammars.has(scopeName)) {\n let rawGrammar = this._rawGrammars.get(scopeName);\n if (!rawGrammar) {\n return null;\n }\n this._grammars.set(scopeName, createGrammar(\n scopeName,\n rawGrammar,\n initialLanguage,\n embeddedLanguages,\n tokenTypes,\n balancedBracketSelectors,\n this,\n this._onigLib\n ));\n }\n return this._grammars.get(scopeName);\n }\n};\n\n// src/index.ts\nvar Registry = class {\n _options;\n _syncRegistry;\n _ensureGrammarCache;\n constructor(options) {\n this._options = options;\n this._syncRegistry = new SyncRegistry(\n Theme.createFromRawTheme(options.theme, options.colorMap),\n options.onigLib\n );\n this._ensureGrammarCache = /* @__PURE__ */ new Map();\n }\n dispose() {\n this._syncRegistry.dispose();\n }\n /**\n * Change the theme. Once called, no previous `ruleStack` should be used anymore.\n */\n setTheme(theme, colorMap) {\n this._syncRegistry.setTheme(Theme.createFromRawTheme(theme, colorMap));\n }\n /**\n * Returns a lookup array for color ids.\n */\n getColorMap() {\n return this._syncRegistry.getColorMap();\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n * Please do not use language id 0.\n */\n loadGrammarWithEmbeddedLanguages(initialScopeName, initialLanguage, embeddedLanguages) {\n return this.loadGrammarWithConfiguration(initialScopeName, initialLanguage, { embeddedLanguages });\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n * Please do not use language id 0.\n */\n loadGrammarWithConfiguration(initialScopeName, initialLanguage, configuration) {\n return this._loadGrammar(\n initialScopeName,\n initialLanguage,\n configuration.embeddedLanguages,\n configuration.tokenTypes,\n new BalancedBracketSelectors(\n configuration.balancedBracketSelectors || [],\n configuration.unbalancedBracketSelectors || []\n )\n );\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n */\n loadGrammar(initialScopeName) {\n return this._loadGrammar(initialScopeName, 0, null, null, null);\n }\n _loadGrammar(initialScopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {\n const dependencyProcessor = new ScopeDependencyProcessor(this._syncRegistry, initialScopeName);\n while (dependencyProcessor.Q.length > 0) {\n dependencyProcessor.Q.map((request) => this._loadSingleGrammar(request.scopeName));\n dependencyProcessor.processQueue();\n }\n return this._grammarForScopeName(\n initialScopeName,\n initialLanguage,\n embeddedLanguages,\n tokenTypes,\n balancedBracketSelectors\n );\n }\n _loadSingleGrammar(scopeName) {\n if (!this._ensureGrammarCache.has(scopeName)) {\n this._doLoadSingleGrammar(scopeName);\n this._ensureGrammarCache.set(scopeName, true);\n }\n }\n _doLoadSingleGrammar(scopeName) {\n const grammar = this._options.loadGrammar(scopeName);\n if (grammar) {\n const injections = typeof this._options.getInjections === \"function\" ? this._options.getInjections(scopeName) : void 0;\n this._syncRegistry.addGrammar(grammar, injections);\n }\n }\n /**\n * Adds a rawGrammar.\n */\n addGrammar(rawGrammar, injections = [], initialLanguage = 0, embeddedLanguages = null) {\n this._syncRegistry.addGrammar(rawGrammar, injections);\n return this._grammarForScopeName(rawGrammar.scopeName, initialLanguage, embeddedLanguages);\n }\n /**\n * Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `addGrammar`.\n */\n _grammarForScopeName(scopeName, initialLanguage = 0, embeddedLanguages = null, tokenTypes = null, balancedBracketSelectors = null) {\n return this._syncRegistry.grammarForScopeName(\n scopeName,\n initialLanguage,\n embeddedLanguages,\n tokenTypes,\n balancedBracketSelectors\n );\n }\n};\nvar INITIAL = StateStackImpl.NULL;\nexport {\n EncodedTokenMetadata,\n FindOption,\n FontStyle,\n INITIAL,\n Registry,\n Theme,\n disposeOnigString\n};\n","import { ShikiError } from \"@shikijs/types\";\nimport { EncodedTokenMetadata, INITIAL, Registry as Registry$1, Theme } from \"@shikijs/vscode-textmate\";\n\nexport * from \"@shikijs/types\"\n\n//#region src/utils/colors.ts\nfunction resolveColorReplacements(theme, options) {\n\tconst replacements = typeof theme === \"string\" ? {} : { ...theme.colorReplacements };\n\tconst themeName = typeof theme === \"string\" ? theme : theme.name;\n\tfor (const [key, value] of Object.entries(options?.colorReplacements || {})) if (typeof value === \"string\") replacements[key] = value;\n\telse if (key === themeName) Object.assign(replacements, value);\n\treturn replacements;\n}\nfunction applyColorReplacements(color, replacements) {\n\tif (!color) return color;\n\treturn replacements?.[color?.toLowerCase()] || color;\n}\n\n//#endregion\n//#region src/utils/general.ts\nfunction toArray(x) {\n\treturn Array.isArray(x) ? x : [x];\n}\n/**\n* Normalize a getter to a promise.\n*/\nasync function normalizeGetter(p) {\n\treturn Promise.resolve(typeof p === \"function\" ? p() : p).then((r) => r.default || r);\n}\n/**\n* Check if the language is plaintext that is ignored by Shiki.\n*\n* Hard-coded plain text languages: `plaintext`, `txt`, `text`, `plain`.\n*/\nfunction isPlainLang(lang) {\n\treturn !lang || [\n\t\t\"plaintext\",\n\t\t\"txt\",\n\t\t\"text\",\n\t\t\"plain\"\n\t].includes(lang);\n}\n/**\n* Check if the language is specially handled or bypassed by Shiki.\n*\n* Hard-coded languages: `ansi` and plaintexts like `plaintext`, `txt`, `text`, `plain`.\n*/\nfunction isSpecialLang(lang) {\n\treturn lang === \"ansi\" || isPlainLang(lang);\n}\n/**\n* Check if the theme is specially handled or bypassed by Shiki.\n*\n* Hard-coded themes: `none`.\n*/\nfunction isNoneTheme(theme) {\n\treturn theme === \"none\";\n}\n/**\n* Check if the theme is specially handled or bypassed by Shiki.\n*\n* Hard-coded themes: `none`.\n*/\nfunction isSpecialTheme(theme) {\n\treturn isNoneTheme(theme);\n}\n\n//#endregion\n//#region src/utils/strings.ts\n/**\n* Split a string into lines, each line preserves the line ending.\n*\n* @param code - The code string to split into lines\n* @param preserveEnding - Whether to preserve line endings in the result\n* @returns Array of tuples containing [line content, offset index]\n*\n* @example\n* ```ts\n* splitLines('hello\\nworld', false)\n* // => [['hello', 0], ['world', 6]]\n*\n* splitLines('hello\\nworld', true)\n* // => [['hello\\n', 0], ['world', 6]]\n* ```\n*/\nfunction splitLines(code, preserveEnding = false) {\n\tif (code.length === 0) return [[\"\", 0]];\n\tconst parts = code.split(/(\\r?\\n)/g);\n\tlet index = 0;\n\tconst lines = [];\n\tfor (let i = 0; i < parts.length; i += 2) {\n\t\tconst line = preserveEnding ? parts[i] + (parts[i + 1] || \"\") : parts[i];\n\t\tlines.push([line, index]);\n\t\tindex += parts[i].length;\n\t\tindex += parts[i + 1]?.length || 0;\n\t}\n\treturn lines;\n}\n\n//#endregion\n//#region src/textmate/normalize-theme.ts\n/**\n* https://github.com/microsoft/vscode/blob/f7f05dee53fb33fe023db2e06e30a89d3094488f/src/vs/platform/theme/common/colorRegistry.ts#L258-L268\n*/\nconst VSCODE_FALLBACK_EDITOR_FG = {\n\tlight: \"#333333\",\n\tdark: \"#bbbbbb\"\n};\nconst VSCODE_FALLBACK_EDITOR_BG = {\n\tlight: \"#fffffe\",\n\tdark: \"#1e1e1e\"\n};\nconst RESOLVED_KEY = \"__shiki_resolved\";\n/**\n* Normalize a textmate theme to shiki theme\n*/\nfunction normalizeTheme(rawTheme) {\n\tif (rawTheme?.[RESOLVED_KEY]) return rawTheme;\n\tconst theme = { ...rawTheme };\n\tif (theme.tokenColors && !theme.settings) {\n\t\ttheme.settings = theme.tokenColors;\n\t\tdelete theme.tokenColors;\n\t}\n\ttheme.type ||= \"dark\";\n\ttheme.colorReplacements = { ...theme.colorReplacements };\n\ttheme.settings ||= [];\n\tlet { bg, fg } = theme;\n\tif (!bg || !fg) {\n\t\t/**\n\t\t* First try:\n\t\t* Theme might contain a global `tokenColor` without `name` or `scope`\n\t\t* Used as default value for foreground/background\n\t\t*/\n\t\tconst globalSetting = theme.settings ? theme.settings.find((s) => !s.name && !s.scope) : void 0;\n\t\tif (globalSetting?.settings?.foreground) fg = globalSetting.settings.foreground;\n\t\tif (globalSetting?.settings?.background) bg = globalSetting.settings.background;\n\t\t/**\n\t\t* Second try:\n\t\t* If there's no global `tokenColor` without `name` or `scope`\n\t\t* Use `editor.foreground` and `editor.background`\n\t\t*/\n\t\tif (!fg && theme?.colors?.[\"editor.foreground\"]) fg = theme.colors[\"editor.foreground\"];\n\t\tif (!bg && theme?.colors?.[\"editor.background\"]) bg = theme.colors[\"editor.background\"];\n\t\t/**\n\t\t* Last try:\n\t\t* If there's no fg/bg color specified in theme, use default\n\t\t*/\n\t\tif (!fg) fg = theme.type === \"light\" ? VSCODE_FALLBACK_EDITOR_FG.light : VSCODE_FALLBACK_EDITOR_FG.dark;\n\t\tif (!bg) bg = theme.type === \"light\" ? VSCODE_FALLBACK_EDITOR_BG.light : VSCODE_FALLBACK_EDITOR_BG.dark;\n\t\ttheme.fg = fg;\n\t\ttheme.bg = bg;\n\t}\n\tif (!(theme.settings[0] && theme.settings[0].settings && !theme.settings[0].scope)) theme.settings.unshift({ settings: {\n\t\tforeground: theme.fg,\n\t\tbackground: theme.bg\n\t} });\n\tlet replacementCount = 0;\n\tconst replacementMap = /* @__PURE__ */ new Map();\n\tfunction getReplacementColor(value) {\n\t\tif (replacementMap.has(value)) return replacementMap.get(value);\n\t\treplacementCount += 1;\n\t\tconst hex = `#${replacementCount.toString(16).padStart(8, \"0\").toLowerCase()}`;\n\t\tif (theme.colorReplacements?.[`#${hex}`]) return getReplacementColor(value);\n\t\treplacementMap.set(value, hex);\n\t\treturn hex;\n\t}\n\ttheme.settings = theme.settings.map((setting) => {\n\t\tconst replaceFg = setting.settings?.foreground && !setting.settings.foreground.startsWith(\"#\");\n\t\tconst replaceBg = setting.settings?.background && !setting.settings.background.startsWith(\"#\");\n\t\tif (!replaceFg && !replaceBg) return setting;\n\t\tconst clone = {\n\t\t\t...setting,\n\t\t\tsettings: { ...setting.settings }\n\t\t};\n\t\tif (replaceFg) {\n\t\t\tconst replacement = getReplacementColor(setting.settings.foreground);\n\t\t\ttheme.colorReplacements[replacement] = setting.settings.foreground;\n\t\t\tclone.settings.foreground = replacement;\n\t\t}\n\t\tif (replaceBg) {\n\t\t\tconst replacement = getReplacementColor(setting.settings.background);\n\t\t\ttheme.colorReplacements[replacement] = setting.settings.background;\n\t\t\tclone.settings.background = replacement;\n\t\t}\n\t\treturn clone;\n\t});\n\tfor (const key of Object.keys(theme.colors || {})) if (key === \"editor.foreground\" || key === \"editor.background\" || key.startsWith(\"terminal.ansi\")) {\n\t\tif (!theme.colors[key]?.startsWith(\"#\")) {\n\t\t\tconst replacement = getReplacementColor(theme.colors[key]);\n\t\t\ttheme.colorReplacements[replacement] = theme.colors[key];\n\t\t\ttheme.colors[key] = replacement;\n\t\t}\n\t}\n\tObject.defineProperty(theme, RESOLVED_KEY, {\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: true\n\t});\n\treturn theme;\n}\n\n//#endregion\n//#region src/textmate/getters-resolve.ts\n/**\n* Resolve\n*/\nasync function resolveLangs(langs) {\n\treturn Array.from(new Set((await Promise.all(langs.filter((l) => !isSpecialLang(l)).map(async (lang) => await normalizeGetter(lang).then((r) => Array.isArray(r) ? r : [r])))).flat()));\n}\nasync function resolveThemes(themes) {\n\treturn (await Promise.all(themes.map(async (theme) => isSpecialTheme(theme) ? null : normalizeTheme(await normalizeGetter(theme))))).filter((i) => !!i);\n}\n\n//#endregion\n//#region src/utils/alias.ts\nfunction resolveLangAlias(name, alias) {\n\tif (!alias) return name;\n\tif (alias[name]) {\n\t\tconst resolved = new Set([name]);\n\t\twhile (alias[name]) {\n\t\t\tname = alias[name];\n\t\t\tif (resolved.has(name)) throw new ShikiError(`Circular alias \\`${Array.from(resolved).join(\" -> \")} -> ${name}\\``);\n\t\t\tresolved.add(name);\n\t\t}\n\t}\n\treturn name;\n}\n\n//#endregion\n//#region src/textmate/registry.ts\nvar Registry = class extends Registry$1 {\n\t_resolvedThemes = /* @__PURE__ */ new Map();\n\t_resolvedGrammars = /* @__PURE__ */ new Map();\n\t_langMap = /* @__PURE__ */ new Map();\n\t_langGraph = /* @__PURE__ */ new Map();\n\t_textmateThemeCache = /* @__PURE__ */ new WeakMap();\n\t_loadedThemesCache = null;\n\t_loadedLanguagesCache = null;\n\tconstructor(_resolver, _themes, _langs, _alias = {}) {\n\t\tsuper(_resolver);\n\t\tthis._resolver = _resolver;\n\t\tthis._themes = _themes;\n\t\tthis._langs = _langs;\n\t\tthis._alias = _alias;\n\t\tthis._themes.map((t) => this.loadTheme(t));\n\t\tthis.loadLanguages(this._langs);\n\t}\n\tgetTheme(theme) {\n\t\tif (typeof theme === \"string\") return this._resolvedThemes.get(theme);\n\t\telse return this.loadTheme(theme);\n\t}\n\tloadTheme(theme) {\n\t\tconst _theme = normalizeTheme(theme);\n\t\tif (_theme.name) {\n\t\t\tthis._resolvedThemes.set(_theme.name, _theme);\n\t\t\tthis._loadedThemesCache = null;\n\t\t}\n\t\treturn _theme;\n\t}\n\tgetLoadedThemes() {\n\t\tif (!this._loadedThemesCache) this._loadedThemesCache = [...this._resolvedThemes.keys()];\n\t\treturn this._loadedThemesCache;\n\t}\n\tsetTheme(theme) {\n\t\tlet textmateTheme = this._textmateThemeCache.get(theme);\n\t\tif (!textmateTheme) {\n\t\t\ttextmateTheme = Theme.createFromRawTheme(theme);\n\t\t\tthis._textmateThemeCache.set(theme, textmateTheme);\n\t\t}\n\t\tthis._syncRegistry.setTheme(textmateTheme);\n\t}\n\tgetGrammar(name) {\n\t\tname = resolveLangAlias(name, this._alias);\n\t\treturn this._resolvedGrammars.get(name);\n\t}\n\tloadLanguage(lang) {\n\t\tif (this.getGrammar(lang.name)) return;\n\t\tconst embeddedLazilyBy = new Set([...this._langMap.values()].filter((i) => i.embeddedLangsLazy?.includes(lang.name)));\n\t\tthis._resolver.addLanguage(lang);\n\t\tconst grammarConfig = {\n\t\t\tbalancedBracketSelectors: lang.balancedBracketSelectors || [\"*\"],\n\t\t\tunbalancedBracketSelectors: lang.unbalancedBracketSelectors || []\n\t\t};\n\t\tthis._syncRegistry._rawGrammars.set(lang.scopeName, lang);\n\t\tconst g = this.loadGrammarWithConfiguration(lang.scopeName, 1, grammarConfig);\n\t\tg.name = lang.name;\n\t\tthis._resolvedGrammars.set(lang.name, g);\n\t\tif (lang.aliases) lang.aliases.forEach((alias) => {\n\t\t\tthis._alias[alias] = lang.name;\n\t\t});\n\t\tthis._loadedLanguagesCache = null;\n\t\tif (embeddedLazilyBy.size) for (const e of embeddedLazilyBy) {\n\t\t\tthis._resolvedGrammars.delete(e.name);\n\t\t\tthis._loadedLanguagesCache = null;\n\t\t\tthis._syncRegistry?._injectionGrammars?.delete(e.scopeName);\n\t\t\tthis._syncRegistry?._grammars?.delete(e.scopeName);\n\t\t\tthis.loadLanguage(this._langMap.get(e.name));\n\t\t}\n\t}\n\tdispose() {\n\t\tsuper.dispose();\n\t\tthis._resolvedThemes.clear();\n\t\tthis._resolvedGrammars.clear();\n\t\tthis._langMap.clear();\n\t\tthis._langGraph.clear();\n\t\tthis._loadedThemesCache = null;\n\t}\n\tloadLanguages(langs) {\n\t\tfor (const lang of langs) this.resolveEmbeddedLanguages(lang);\n\t\tconst langsGraphArray = Array.from(this._langGraph.entries());\n\t\tconst missingLangs = langsGraphArray.filter(([_, lang]) => !lang);\n\t\tif (missingLangs.length) {\n\t\t\tconst dependents = langsGraphArray.filter(([_, lang]) => {\n\t\t\t\tif (!lang) return false;\n\t\t\t\treturn (lang.embeddedLanguages || lang.embeddedLangs)?.some((l) => missingLangs.map(([name]) => name).includes(l));\n\t\t\t}).filter((lang) => !missingLangs.includes(lang));\n\t\t\tthrow new ShikiError(`Missing languages ${missingLangs.map(([name]) => `\\`${name}\\``).join(\", \")}, required by ${dependents.map(([name]) => `\\`${name}\\``).join(\", \")}`);\n\t\t}\n\t\tfor (const [_, lang] of langsGraphArray) this._resolver.addLanguage(lang);\n\t\tfor (const [_, lang] of langsGraphArray) this.loadLanguage(lang);\n\t}\n\tgetLoadedLanguages() {\n\t\tif (!this._loadedLanguagesCache) this._loadedLanguagesCache = [...new Set([...this._resolvedGrammars.keys(), ...Object.keys(this._alias)])];\n\t\treturn this._loadedLanguagesCache;\n\t}\n\tresolveEmbeddedLanguages(lang) {\n\t\tthis._langMap.set(lang.name, lang);\n\t\tthis._langGraph.set(lang.name, lang);\n\t\tconst embedded = lang.embeddedLanguages ?? lang.embeddedLangs;\n\t\tif (embedded) for (const embeddedLang of embedded) this._langGraph.set(embeddedLang, this._langMap.get(embeddedLang));\n\t}\n};\n\n//#endregion\n//#region src/textmate/resolver.ts\nvar Resolver = class {\n\t_langs = /* @__PURE__ */ new Map();\n\t_scopeToLang = /* @__PURE__ */ new Map();\n\t_injections = /* @__PURE__ */ new Map();\n\t_onigLib;\n\tconstructor(engine, langs) {\n\t\tthis._onigLib = {\n\t\t\tcreateOnigScanner: (patterns) => engine.createScanner(patterns),\n\t\t\tcreateOnigString: (s) => engine.createString(s)\n\t\t};\n\t\tlangs.forEach((i) => this.addLanguage(i));\n\t}\n\tget onigLib() {\n\t\treturn this._onigLib;\n\t}\n\tgetLangRegistration(langIdOrAlias) {\n\t\treturn this._langs.get(langIdOrAlias);\n\t}\n\tloadGrammar(scopeName) {\n\t\treturn this._scopeToLang.get(scopeName);\n\t}\n\taddLanguage(l) {\n\t\tthis._langs.set(l.name, l);\n\t\tif (l.aliases) l.aliases.forEach((a) => {\n\t\t\tthis._langs.set(a, l);\n\t\t});\n\t\tthis._scopeToLang.set(l.scopeName, l);\n\t\tif (l.injectTo) l.injectTo.forEach((i) => {\n\t\t\tif (!this._injections.get(i)) this._injections.set(i, []);\n\t\t\tthis._injections.get(i).push(l.scopeName);\n\t\t});\n\t}\n\tgetInjections(scopeName) {\n\t\tconst scopeParts = scopeName.split(\".\");\n\t\tlet injections = [];\n\t\tfor (let i = 1; i <= scopeParts.length; i++) {\n\t\t\tconst subScopeName = scopeParts.slice(0, i).join(\".\");\n\t\t\tinjections = [...injections, ...this._injections.get(subScopeName) || []];\n\t\t}\n\t\treturn injections;\n\t}\n};\n\n//#endregion\n//#region src/constructors/primitive.ts\nlet instancesCount = 0;\n/**\n* Get the minimal shiki primitive instance.\n*\n* Requires to provide the engine and all themes and languages upfront.\n*/\nfunction createShikiPrimitive(options) {\n\tinstancesCount += 1;\n\tif (options.warnings !== false && instancesCount >= 10 && instancesCount % 10 === 0) console.warn(`[Shiki] ${instancesCount} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \\`highlighter.dispose()\\` to release unused instances.`);\n\tlet isDisposed = false;\n\tif (!options.engine) throw new ShikiError(\"`engine` option is required for synchronous mode\");\n\tconst langs = (options.langs || []).flat(1);\n\tconst themes = (options.themes || []).flat(1).map(normalizeTheme);\n\tconst _registry = new Registry(new Resolver(options.engine, langs), themes, langs, options.langAlias);\n\tlet _lastTheme;\n\tfunction resolveLangAlias$1(name) {\n\t\treturn resolveLangAlias(name, options.langAlias);\n\t}\n\tfunction getLanguage(name) {\n\t\tensureNotDisposed();\n\t\tconst _lang = _registry.getGrammar(typeof name === \"string\" ? name : name.name);\n\t\tif (!_lang) throw new ShikiError(`Language \\`${name}\\` not found, you may need to load it first`);\n\t\treturn _lang;\n\t}\n\tfunction getTheme(name) {\n\t\tif (name === \"none\") return {\n\t\t\tbg: \"\",\n\t\t\tfg: \"\",\n\t\t\tname: \"none\",\n\t\t\tsettings: [],\n\t\t\ttype: \"dark\"\n\t\t};\n\t\tensureNotDisposed();\n\t\tconst _theme = _registry.getTheme(name);\n\t\tif (!_theme) throw new ShikiError(`Theme \\`${name}\\` not found, you may need to load it first`);\n\t\treturn _theme;\n\t}\n\tfunction setTheme(name) {\n\t\tensureNotDisposed();\n\t\tconst theme = getTheme(name);\n\t\tif (_lastTheme !== name) {\n\t\t\t_registry.setTheme(theme);\n\t\t\t_lastTheme = name;\n\t\t}\n\t\treturn {\n\t\t\ttheme,\n\t\t\tcolorMap: _registry.getColorMap()\n\t\t};\n\t}\n\tfunction getLoadedThemes() {\n\t\tensureNotDisposed();\n\t\treturn _registry.getLoadedThemes();\n\t}\n\tfunction getLoadedLanguages() {\n\t\tensureNotDisposed();\n\t\treturn _registry.getLoadedLanguages();\n\t}\n\tfunction loadLanguageSync(...langs) {\n\t\tensureNotDisposed();\n\t\t_registry.loadLanguages(langs.flat(1));\n\t}\n\tasync function loadLanguage(...langs) {\n\t\treturn loadLanguageSync(await resolveLangs(langs));\n\t}\n\tfunction loadThemeSync(...themes) {\n\t\tensureNotDisposed();\n\t\tfor (const theme of themes.flat(1)) _registry.loadTheme(theme);\n\t}\n\tasync function loadTheme(...themes) {\n\t\tensureNotDisposed();\n\t\treturn loadThemeSync(await resolveThemes(themes));\n\t}\n\tfunction ensureNotDisposed() {\n\t\tif (isDisposed) throw new ShikiError(\"Shiki instance has been disposed\");\n\t}\n\tfunction dispose() {\n\t\tif (isDisposed) return;\n\t\tisDisposed = true;\n\t\t_registry.dispose();\n\t\tinstancesCount -= 1;\n\t}\n\treturn {\n\t\tsetTheme,\n\t\tgetTheme,\n\t\tgetLanguage,\n\t\tgetLoadedThemes,\n\t\tgetLoadedLanguages,\n\t\tresolveLangAlias: resolveLangAlias$1,\n\t\tloadLanguage,\n\t\tloadLanguageSync,\n\t\tloadTheme,\n\t\tloadThemeSync,\n\t\tdispose,\n\t\t[Symbol.dispose]: dispose\n\t};\n}\n/**\n* @deprecated Use `createShikiPrimitive` instead.\n*/\nconst createShikiInternalSync = createShikiPrimitive;\n\n//#endregion\n//#region src/constructors/async.ts\n/**\n* Get the minimal shiki primitive instance.\n*/\nasync function createShikiPrimitiveAsync(options) {\n\tif (!options.engine) console.warn(\"`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.\");\n\tconst [themes, langs, engine] = await Promise.all([\n\t\tresolveThemes(options.themes || []),\n\t\tresolveLangs(options.langs || []),\n\t\toptions.engine\n\t]);\n\treturn createShikiPrimitive({\n\t\t...options,\n\t\tthemes,\n\t\tlangs,\n\t\tengine\n\t});\n}\n/**\n* @deprecated Use `createShikiPrimitiveAsync` instead.\n*/\nconst createShikiInternal = createShikiPrimitiveAsync;\n\n//#endregion\n//#region src/textmate/grammar-state.ts\nconst _grammarStateMap = /* @__PURE__ */ new WeakMap();\nfunction setLastGrammarStateToMap(keys, state) {\n\t_grammarStateMap.set(keys, state);\n}\nfunction getLastGrammarStateFromMap(keys) {\n\treturn _grammarStateMap.get(keys);\n}\n/**\n* GrammarState is a special reference object that holds the state of a grammar.\n*\n* It's used to highlight code snippets that are part of the target language.\n*/\nvar GrammarState = class GrammarState {\n\t/**\n\t* Theme to Stack mapping\n\t*/\n\t_stacks = {};\n\tlang;\n\tget themes() {\n\t\treturn Object.keys(this._stacks);\n\t}\n\tget theme() {\n\t\treturn this.themes[0];\n\t}\n\tget _stack() {\n\t\treturn this._stacks[this.theme];\n\t}\n\t/**\n\t* Static method to create a initial grammar state.\n\t*/\n\tstatic initial(lang, themes) {\n\t\treturn new GrammarState(Object.fromEntries(toArray(themes).map((theme) => [theme, INITIAL])), lang);\n\t}\n\tconstructor(...args) {\n\t\tif (args.length === 2) {\n\t\t\tconst [stacksMap, lang] = args;\n\t\t\tthis.lang = lang;\n\t\t\tthis._stacks = stacksMap;\n\t\t} else {\n\t\t\tconst [stack, lang, theme] = args;\n\t\t\tthis.lang = lang;\n\t\t\tthis._stacks = { [theme]: stack };\n\t\t}\n\t}\n\t/**\n\t* Get the internal stack object.\n\t* @internal\n\t*/\n\tgetInternalStack(theme = this.theme) {\n\t\treturn this._stacks[theme];\n\t}\n\tgetScopes(theme = this.theme) {\n\t\treturn getScopes(this._stacks[theme]);\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tlang: this.lang,\n\t\t\ttheme: this.theme,\n\t\t\tthemes: this.themes,\n\t\t\tscopes: this.getScopes()\n\t\t};\n\t}\n};\nfunction getScopes(stack) {\n\tconst scopes = [];\n\tconst visited = /* @__PURE__ */ new Set();\n\tfunction pushScope(stack) {\n\t\tif (visited.has(stack)) return;\n\t\tvisited.add(stack);\n\t\tconst name = stack?.nameScopesList?.scopeName;\n\t\tif (name) scopes.push(name);\n\t\tif (stack.parent) pushScope(stack.parent);\n\t}\n\tpushScope(stack);\n\treturn scopes;\n}\nfunction getGrammarStack(state, theme) {\n\tif (!(state instanceof GrammarState)) throw new ShikiError(\"Invalid grammar state\");\n\treturn state.getInternalStack(theme);\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens-base.ts\n/**\n* Code to tokens, with a simple theme.\n*/\nfunction codeToTokensBase(primitive, code, options = {}) {\n\tconst { theme: themeName = primitive.getLoadedThemes()[0] } = options;\n\tif (isPlainLang(primitive.resolveLangAlias(options.lang || \"text\")) || isNoneTheme(themeName)) return splitLines(code).map((line) => [{\n\t\tcontent: line[0],\n\t\toffset: line[1]\n\t}]);\n\tconst { theme, colorMap } = primitive.setTheme(themeName);\n\tconst _grammar = primitive.getLanguage(options.lang || \"text\");\n\tif (options.grammarState) {\n\t\tif (options.grammarState.lang !== _grammar.name) throw new ShikiError(`Grammar state language \"${options.grammarState.lang}\" does not match highlight language \"${_grammar.name}\"`);\n\t\tif (!options.grammarState.themes.includes(theme.name)) throw new ShikiError(`Grammar state themes \"${options.grammarState.themes}\" do not contain highlight theme \"${theme.name}\"`);\n\t}\n\treturn tokenizeWithTheme(code, _grammar, theme, colorMap, options);\n}\nfunction getLastGrammarState(...args) {\n\tif (args.length === 2) return getLastGrammarStateFromMap(args[1]);\n\tconst [primitive, code, options = {}] = args;\n\tconst { lang = \"text\", theme: themeName = primitive.getLoadedThemes()[0] } = options;\n\tif (isPlainLang(lang) || isNoneTheme(themeName)) throw new ShikiError(\"Plain language does not have grammar state\");\n\tif (lang === \"ansi\") throw new ShikiError(\"ANSI language does not have grammar state\");\n\tconst { theme, colorMap } = primitive.setTheme(themeName);\n\tconst _grammar = primitive.getLanguage(lang);\n\treturn new GrammarState(_tokenizeWithTheme(code, _grammar, theme, colorMap, options).stateStack, _grammar.name, theme.name);\n}\nfunction tokenizeWithTheme(code, grammar, theme, colorMap, options) {\n\tconst result = _tokenizeWithTheme(code, grammar, theme, colorMap, options);\n\tconst grammarState = new GrammarState(result.stateStack, grammar.name, theme.name);\n\tsetLastGrammarStateToMap(result.tokens, grammarState);\n\treturn result.tokens;\n}\nfunction _tokenizeWithTheme(code, grammar, theme, colorMap, options) {\n\tconst colorReplacements = resolveColorReplacements(theme, options);\n\tconst { tokenizeMaxLineLength = 0, tokenizeTimeLimit = 500 } = options;\n\tconst lines = splitLines(code);\n\tlet stateStack = options.grammarState ? getGrammarStack(options.grammarState, theme.name) ?? INITIAL : options.grammarContextCode != null ? _tokenizeWithTheme(options.grammarContextCode, grammar, theme, colorMap, {\n\t\t...options,\n\t\tgrammarState: void 0,\n\t\tgrammarContextCode: void 0\n\t}).stateStack : INITIAL;\n\tlet actual = [];\n\tconst final = [];\n\tfor (let i = 0, len = lines.length; i < len; i++) {\n\t\tconst [line, lineOffset] = lines[i];\n\t\tif (line === \"\") {\n\t\t\tactual = [];\n\t\t\tfinal.push([]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (tokenizeMaxLineLength > 0 && line.length >= tokenizeMaxLineLength) {\n\t\t\tactual = [];\n\t\t\tfinal.push([{\n\t\t\t\tcontent: line,\n\t\t\t\toffset: lineOffset,\n\t\t\t\tcolor: \"\",\n\t\t\t\tfontStyle: 0\n\t\t\t}]);\n\t\t\tcontinue;\n\t\t}\n\t\tlet resultWithScopes;\n\t\tlet tokensWithScopes;\n\t\tlet tokensWithScopesIndex;\n\t\tif (options.includeExplanation) {\n\t\t\tresultWithScopes = grammar.tokenizeLine(line, stateStack, tokenizeTimeLimit);\n\t\t\ttokensWithScopes = resultWithScopes.tokens;\n\t\t\ttokensWithScopesIndex = 0;\n\t\t}\n\t\tconst result = grammar.tokenizeLine2(line, stateStack, tokenizeTimeLimit);\n\t\tconst tokensLength = result.tokens.length / 2;\n\t\tfor (let j = 0; j < tokensLength; j++) {\n\t\t\tconst startIndex = result.tokens[2 * j];\n\t\t\tconst nextStartIndex = j + 1 < tokensLength ? result.tokens[2 * j + 2] : line.length;\n\t\t\tif (startIndex === nextStartIndex) continue;\n\t\t\tconst metadata = result.tokens[2 * j + 1];\n\t\t\tconst color = applyColorReplacements(colorMap[EncodedTokenMetadata.getForeground(metadata)], colorReplacements);\n\t\t\tconst fontStyle = EncodedTokenMetadata.getFontStyle(metadata);\n\t\t\tconst token = {\n\t\t\t\tcontent: line.substring(startIndex, nextStartIndex),\n\t\t\t\toffset: lineOffset + startIndex,\n\t\t\t\tcolor,\n\t\t\t\tfontStyle\n\t\t\t};\n\t\t\tif (options.includeExplanation) {\n\t\t\t\tconst themeSettingsSelectors = [];\n\t\t\t\tif (options.includeExplanation !== \"scopeName\") for (const setting of theme.settings) {\n\t\t\t\t\tlet selectors;\n\t\t\t\t\tswitch (typeof setting.scope) {\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\tselectors = setting.scope.split(/,/).map((scope) => scope.trim());\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tselectors = setting.scope;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: continue;\n\t\t\t\t\t}\n\t\t\t\t\tthemeSettingsSelectors.push({\n\t\t\t\t\t\tsettings: setting,\n\t\t\t\t\t\tselectors: selectors.map((selector) => selector.split(/ /))\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\ttoken.explanation = [];\n\t\t\t\tlet offset = 0;\n\t\t\t\twhile (startIndex + offset < nextStartIndex) {\n\t\t\t\t\tconst tokenWithScopes = tokensWithScopes[tokensWithScopesIndex];\n\t\t\t\t\tconst tokenWithScopesText = line.substring(tokenWithScopes.startIndex, tokenWithScopes.endIndex);\n\t\t\t\t\toffset += tokenWithScopesText.length;\n\t\t\t\t\ttoken.explanation.push({\n\t\t\t\t\t\tcontent: tokenWithScopesText,\n\t\t\t\t\t\tscopes: options.includeExplanation === \"scopeName\" ? explainThemeScopesNameOnly(tokenWithScopes.scopes) : explainThemeScopesFull(themeSettingsSelectors, tokenWithScopes.scopes)\n\t\t\t\t\t});\n\t\t\t\t\ttokensWithScopesIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tactual.push(token);\n\t\t}\n\t\tfinal.push(actual);\n\t\tactual = [];\n\t\tstateStack = result.ruleStack;\n\t}\n\treturn {\n\t\ttokens: final,\n\t\tstateStack\n\t};\n}\nfunction explainThemeScopesNameOnly(scopes) {\n\treturn scopes.map((scope) => ({ scopeName: scope }));\n}\nfunction explainThemeScopesFull(themeSelectors, scopes) {\n\tconst result = [];\n\tfor (let i = 0, len = scopes.length; i < len; i++) {\n\t\tconst scope = scopes[i];\n\t\tresult[i] = {\n\t\t\tscopeName: scope,\n\t\t\tthemeMatches: explainThemeScope(themeSelectors, scope, scopes.slice(0, i))\n\t\t};\n\t}\n\treturn result;\n}\nfunction matchesOne(selector, scope) {\n\treturn selector === scope || scope.substring(0, selector.length) === selector && scope[selector.length] === \".\";\n}\nfunction matches(selectors, scope, parentScopes) {\n\tif (!matchesOne(selectors[selectors.length - 1], scope)) return false;\n\tlet selectorParentIndex = selectors.length - 2;\n\tlet parentIndex = parentScopes.length - 1;\n\twhile (selectorParentIndex >= 0 && parentIndex >= 0) {\n\t\tif (matchesOne(selectors[selectorParentIndex], parentScopes[parentIndex])) selectorParentIndex -= 1;\n\t\tparentIndex -= 1;\n\t}\n\tif (selectorParentIndex === -1) return true;\n\treturn false;\n}\nfunction explainThemeScope(themeSettingsSelectors, scope, parentScopes) {\n\tconst result = [];\n\tfor (const { selectors, settings } of themeSettingsSelectors) for (const selectorPieces of selectors) if (matches(selectorPieces, scope, parentScopes)) {\n\t\tresult.push(settings);\n\t\tbreak;\n\t}\n\treturn result;\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens-themes.ts\n/**\n* Get tokens with multiple themes\n*/\nfunction codeToTokensWithThemes(primitive, code, options, codeToTokensBaseFn = codeToTokensBase) {\n\tconst themes = Object.entries(options.themes).filter((i) => i[1]).map((i) => ({\n\t\tcolor: i[0],\n\t\ttheme: i[1]\n\t}));\n\tconst themedTokens = themes.map((t) => {\n\t\tconst tokens = codeToTokensBaseFn(primitive, code, {\n\t\t\t...options,\n\t\t\ttheme: t.theme\n\t\t});\n\t\treturn {\n\t\t\ttokens,\n\t\t\tstate: getLastGrammarStateFromMap(tokens),\n\t\t\ttheme: typeof t.theme === \"string\" ? t.theme : t.theme.name\n\t\t};\n\t});\n\tconst tokens = alignThemesTokenization(...themedTokens.map((i) => i.tokens));\n\tconst mergedTokens = tokens[0].map((line, lineIdx) => line.map((_token, tokenIdx) => {\n\t\tconst mergedToken = {\n\t\t\tcontent: _token.content,\n\t\t\tvariants: {},\n\t\t\toffset: _token.offset\n\t\t};\n\t\tif (\"includeExplanation\" in options && options.includeExplanation) mergedToken.explanation = _token.explanation;\n\t\ttokens.forEach((t, themeIdx) => {\n\t\t\tconst { content: _, explanation: __, offset: ___, ...styles } = t[lineIdx][tokenIdx];\n\t\t\tmergedToken.variants[themes[themeIdx].color] = styles;\n\t\t});\n\t\treturn mergedToken;\n\t}));\n\tconst mergedGrammarState = themedTokens[0].state ? new GrammarState(Object.fromEntries(themedTokens.map((s) => [s.theme, s.state?.getInternalStack(s.theme)])), themedTokens[0].state.lang) : void 0;\n\tif (mergedGrammarState) setLastGrammarStateToMap(mergedTokens, mergedGrammarState);\n\treturn mergedTokens;\n}\n/**\n* Break tokens from multiple themes into same tokenization.\n*\n* For example, given two themes that tokenize `console.log(\"hello\")` as:\n*\n* - `console . log (\" hello \")` (6 tokens)\n* - `console .log ( \"hello\" )` (5 tokens)\n*\n* This function will return:\n*\n* - `console . log ( \" hello \" )` (8 tokens)\n* - `console . log ( \" hello \" )` (8 tokens)\n*/\nfunction alignThemesTokenization(...themes) {\n\tconst outThemes = themes.map(() => []);\n\tconst count = themes.length;\n\tfor (let i = 0; i < themes[0].length; i++) {\n\t\tconst lines = themes.map((t) => t[i]);\n\t\tconst outLines = outThemes.map(() => []);\n\t\toutThemes.forEach((t, i) => t.push(outLines[i]));\n\t\tconst indexes = lines.map(() => 0);\n\t\tconst current = lines.map((l) => l[0]);\n\t\twhile (current.every((t) => t)) {\n\t\t\tconst minLength = Math.min(...current.map((t) => t.content.length));\n\t\t\tfor (let n = 0; n < count; n++) {\n\t\t\t\tconst token = current[n];\n\t\t\t\tif (token.content.length === minLength) {\n\t\t\t\t\toutLines[n].push(token);\n\t\t\t\t\tindexes[n] += 1;\n\t\t\t\t\tcurrent[n] = lines[n][indexes[n]];\n\t\t\t\t} else {\n\t\t\t\t\toutLines[n].push({\n\t\t\t\t\t\t...token,\n\t\t\t\t\t\tcontent: token.content.slice(0, minLength)\n\t\t\t\t\t});\n\t\t\t\t\tcurrent[n] = {\n\t\t\t\t\t\t...token,\n\t\t\t\t\t\tcontent: token.content.slice(minLength),\n\t\t\t\t\t\toffset: token.offset + minLength\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn outThemes;\n}\n\n//#endregion\nexport { GrammarState, Registry, Resolver, alignThemesTokenization, applyColorReplacements, codeToTokensBase, codeToTokensWithThemes, createShikiInternal, createShikiInternalSync, createShikiPrimitive, createShikiPrimitiveAsync, getGrammarStack, getLastGrammarState, getLastGrammarStateFromMap, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, normalizeGetter, normalizeTheme, resolveColorReplacements, resolveLangAlias, resolveLangs, resolveThemes, setLastGrammarStateToMap, splitLines, toArray, tokenizeWithTheme };","/**\n * List of HTML void tag names.\n *\n * @type {Array<string>}\n */\nexport const htmlVoidElements = [\n 'area',\n 'base',\n 'basefont',\n 'bgsound',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'frame',\n 'hr',\n 'image',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]\n","/**\n * @callback Handler\n * Handle a value, with a certain ID field set to a certain value.\n * The ID field is passed to `zwitch`, and it’s value is this function’s\n * place on the `handlers` record.\n * @param {...any} parameters\n * Arbitrary parameters passed to the zwitch.\n * The first will be an object with a certain ID field set to a certain value.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback UnknownHandler\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @param {unknown} value\n * An object with a certain ID field set to an unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback InvalidHandler\n * Handle values that do not have a certain ID field.\n * @param {unknown} value\n * Any unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {void|null|undefined|never}\n * This should crash or return nothing.\n */\n\n/**\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n * @typedef Options\n * Configuration (required).\n * @property {Invalid} [invalid]\n * Handler to use for invalid values.\n * @property {Unknown} [unknown]\n * Handler to use for unknown values.\n * @property {Handlers} [handlers]\n * Handlers to use.\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Handle values based on a field.\n *\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n * @param {string} key\n * Field to switch on.\n * @param {Options<Invalid, Unknown, Handlers>} [options]\n * Configuration (required).\n * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}\n */\nexport function zwitch(key, options) {\n const settings = options || {}\n\n /**\n * Handle one value.\n *\n * Based on the bound `key`, a respective handler will be called.\n * If `value` is not an object, or doesn’t have a `key` property, the special\n * “invalid” handler will be called.\n * If `value` has an unknown `key`, the special “unknown” handler will be\n * called.\n *\n * All arguments, and the context object, are passed through to the handler,\n * and it’s result is returned.\n *\n * @this {unknown}\n * Any context object.\n * @param {unknown} [value]\n * Any value.\n * @param {...unknown} parameters\n * Arbitrary parameters passed to the zwitch.\n * @property {Handler} invalid\n * Handle for values that do not have a certain ID field.\n * @property {Handler} unknown\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @property {Handlers} handlers\n * Record of handlers.\n * @returns {unknown}\n * Anything.\n */\n function one(value, ...parameters) {\n /** @type {Handler|undefined} */\n let fn = one.invalid\n const handlers = one.handlers\n\n if (value && own.call(value, key)) {\n // @ts-expect-error Indexable.\n const id = String(value[key])\n // @ts-expect-error Indexable.\n fn = own.call(handlers, id) ? handlers[id] : one.unknown\n }\n\n if (fn) {\n return fn.call(this, value, ...parameters)\n }\n }\n\n one.handlers = settings.handlers || {}\n one.invalid = settings.invalid\n one.unknown = settings.unknown\n\n // @ts-expect-error: matches!\n return one\n}\n","/**\n * @typedef CoreOptions\n * @property {ReadonlyArray<string>} [subset=[]]\n * Whether to only escape the given subset of characters.\n * @property {boolean} [escapeOnly=false]\n * Whether to only escape possibly dangerous characters.\n * Those characters are `\"`, `&`, `'`, `<`, `>`, and `` ` ``.\n *\n * @typedef FormatOptions\n * @property {(code: number, next: number, options: CoreWithFormatOptions) => string} format\n * Format strategy.\n *\n * @typedef {CoreOptions & FormatOptions & import('./util/format-smart.js').FormatSmartOptions} CoreWithFormatOptions\n */\n\nconst defaultSubsetRegex = /[\"&'<>`]/g\nconst surrogatePairsRegex = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g\nconst controlCharactersRegex =\n // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape\n /[\\x01-\\t\\v\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g\nconst regexEscapeRegex = /[|\\\\{}()[\\]^$+*?.]/g\n\n/** @type {WeakMap<ReadonlyArray<string>, RegExp>} */\nconst subsetToRegexCache = new WeakMap()\n\n/**\n * Encode certain characters in `value`.\n *\n * @param {string} value\n * @param {CoreWithFormatOptions} options\n * @returns {string}\n */\nexport function core(value, options) {\n value = value.replace(\n options.subset\n ? charactersToExpressionCached(options.subset)\n : defaultSubsetRegex,\n basic\n )\n\n if (options.subset || options.escapeOnly) {\n return value\n }\n\n return (\n value\n // Surrogate pairs.\n .replace(surrogatePairsRegex, surrogate)\n // BMP control characters (C0 except for LF, CR, SP; DEL; and some more\n // non-ASCII ones).\n .replace(controlCharactersRegex, basic)\n )\n\n /**\n * @param {string} pair\n * @param {number} index\n * @param {string} all\n */\n function surrogate(pair, index, all) {\n return options.format(\n (pair.charCodeAt(0) - 0xd800) * 0x400 +\n pair.charCodeAt(1) -\n 0xdc00 +\n 0x10000,\n all.charCodeAt(index + 2),\n options\n )\n }\n\n /**\n * @param {string} character\n * @param {number} index\n * @param {string} all\n */\n function basic(character, index, all) {\n return options.format(\n character.charCodeAt(0),\n all.charCodeAt(index + 1),\n options\n )\n }\n}\n\n/**\n * A wrapper function that caches the result of `charactersToExpression` with a WeakMap.\n * This can improve performance when tooling calls `charactersToExpression` repeatedly\n * with the same subset.\n *\n * @param {ReadonlyArray<string>} subset\n * @returns {RegExp}\n */\nfunction charactersToExpressionCached(subset) {\n let cached = subsetToRegexCache.get(subset)\n\n if (!cached) {\n cached = charactersToExpression(subset)\n subsetToRegexCache.set(subset, cached)\n }\n\n return cached\n}\n\n/**\n * @param {ReadonlyArray<string>} subset\n * @returns {RegExp}\n */\nfunction charactersToExpression(subset) {\n /** @type {Array<string>} */\n const groups = []\n let index = -1\n\n while (++index < subset.length) {\n groups.push(subset[index].replace(regexEscapeRegex, '\\\\$&'))\n }\n\n return new RegExp('(?:' + groups.join('|') + ')', 'g')\n}\n","const hexadecimalRegex = /[\\dA-Fa-f]/\n\n/**\n * Configurable ways to encode characters as hexadecimal references.\n *\n * @param {number} code\n * @param {number} next\n * @param {boolean|undefined} omit\n * @returns {string}\n */\nexport function toHexadecimal(code, next, omit) {\n const value = '&#x' + code.toString(16).toUpperCase()\n return omit && next && !hexadecimalRegex.test(String.fromCharCode(next))\n ? value\n : value + ';'\n}\n","const decimalRegex = /\\d/\n\n/**\n * Configurable ways to encode characters as decimal references.\n *\n * @param {number} code\n * @param {number} next\n * @param {boolean|undefined} omit\n * @returns {string}\n */\nexport function toDecimal(code, next, omit) {\n const value = '&#' + String(code)\n return omit && next && !decimalRegex.test(String.fromCharCode(next))\n ? value\n : value + ';'\n}\n","/**\n * List of legacy HTML named character references that don’t need a trailing semicolon.\n *\n * @type {Array<string>}\n */\nexport const characterEntitiesLegacy = [\n 'AElig',\n 'AMP',\n 'Aacute',\n 'Acirc',\n 'Agrave',\n 'Aring',\n 'Atilde',\n 'Auml',\n 'COPY',\n 'Ccedil',\n 'ETH',\n 'Eacute',\n 'Ecirc',\n 'Egrave',\n 'Euml',\n 'GT',\n 'Iacute',\n 'Icirc',\n 'Igrave',\n 'Iuml',\n 'LT',\n 'Ntilde',\n 'Oacute',\n 'Ocirc',\n 'Ograve',\n 'Oslash',\n 'Otilde',\n 'Ouml',\n 'QUOT',\n 'REG',\n 'THORN',\n 'Uacute',\n 'Ucirc',\n 'Ugrave',\n 'Uuml',\n 'Yacute',\n 'aacute',\n 'acirc',\n 'acute',\n 'aelig',\n 'agrave',\n 'amp',\n 'aring',\n 'atilde',\n 'auml',\n 'brvbar',\n 'ccedil',\n 'cedil',\n 'cent',\n 'copy',\n 'curren',\n 'deg',\n 'divide',\n 'eacute',\n 'ecirc',\n 'egrave',\n 'eth',\n 'euml',\n 'frac12',\n 'frac14',\n 'frac34',\n 'gt',\n 'iacute',\n 'icirc',\n 'iexcl',\n 'igrave',\n 'iquest',\n 'iuml',\n 'laquo',\n 'lt',\n 'macr',\n 'micro',\n 'middot',\n 'nbsp',\n 'not',\n 'ntilde',\n 'oacute',\n 'ocirc',\n 'ograve',\n 'ordf',\n 'ordm',\n 'oslash',\n 'otilde',\n 'ouml',\n 'para',\n 'plusmn',\n 'pound',\n 'quot',\n 'raquo',\n 'reg',\n 'sect',\n 'shy',\n 'sup1',\n 'sup2',\n 'sup3',\n 'szlig',\n 'thorn',\n 'times',\n 'uacute',\n 'ucirc',\n 'ugrave',\n 'uml',\n 'uuml',\n 'yacute',\n 'yen',\n 'yuml'\n]\n","/**\n * Map of named character references from HTML 4.\n *\n * @type {Record<string, string>}\n */\nexport const characterEntitiesHtml4 = {\n nbsp: ' ',\n iexcl: '¡',\n cent: '¢',\n pound: '£',\n curren: '¤',\n yen: '¥',\n brvbar: '¦',\n sect: '§',\n uml: '¨',\n copy: '©',\n ordf: 'ª',\n laquo: '«',\n not: '¬',\n shy: '',\n reg: '®',\n macr: '¯',\n deg: '°',\n plusmn: '±',\n sup2: '²',\n sup3: '³',\n acute: '´',\n micro: 'µ',\n para: '¶',\n middot: '·',\n cedil: '¸',\n sup1: '¹',\n ordm: 'º',\n raquo: '»',\n frac14: '¼',\n frac12: '½',\n frac34: '¾',\n iquest: '¿',\n Agrave: 'À',\n Aacute: 'Á',\n Acirc: 'Â',\n Atilde: 'Ã',\n Auml: 'Ä',\n Aring: 'Å',\n AElig: 'Æ',\n Ccedil: 'Ç',\n Egrave: 'È',\n Eacute: 'É',\n Ecirc: 'Ê',\n Euml: 'Ë',\n Igrave: 'Ì',\n Iacute: 'Í',\n Icirc: 'Î',\n Iuml: 'Ï',\n ETH: 'Ð',\n Ntilde: 'Ñ',\n Ograve: 'Ò',\n Oacute: 'Ó',\n Ocirc: 'Ô',\n Otilde: 'Õ',\n Ouml: 'Ö',\n times: '×',\n Oslash: 'Ø',\n Ugrave: 'Ù',\n Uacute: 'Ú',\n Ucirc: 'Û',\n Uuml: 'Ü',\n Yacute: 'Ý',\n THORN: 'Þ',\n szlig: 'ß',\n agrave: 'à',\n aacute: 'á',\n acirc: 'â',\n atilde: 'ã',\n auml: 'ä',\n aring: 'å',\n aelig: 'æ',\n ccedil: 'ç',\n egrave: 'è',\n eacute: 'é',\n ecirc: 'ê',\n euml: 'ë',\n igrave: 'ì',\n iacute: 'í',\n icirc: 'î',\n iuml: 'ï',\n eth: 'ð',\n ntilde: 'ñ',\n ograve: 'ò',\n oacute: 'ó',\n ocirc: 'ô',\n otilde: 'õ',\n ouml: 'ö',\n divide: '÷',\n oslash: 'ø',\n ugrave: 'ù',\n uacute: 'ú',\n ucirc: 'û',\n uuml: 'ü',\n yacute: 'ý',\n thorn: 'þ',\n yuml: 'ÿ',\n fnof: 'ƒ',\n Alpha: 'Α',\n Beta: 'Β',\n Gamma: 'Γ',\n Delta: 'Δ',\n Epsilon: 'Ε',\n Zeta: 'Ζ',\n Eta: 'Η',\n Theta: 'Θ',\n Iota: 'Ι',\n Kappa: 'Κ',\n Lambda: 'Λ',\n Mu: 'Μ',\n Nu: 'Ν',\n Xi: 'Ξ',\n Omicron: 'Ο',\n Pi: 'Π',\n Rho: 'Ρ',\n Sigma: 'Σ',\n Tau: 'Τ',\n Upsilon: 'Υ',\n Phi: 'Φ',\n Chi: 'Χ',\n Psi: 'Ψ',\n Omega: 'Ω',\n alpha: 'α',\n beta: 'β',\n gamma: 'γ',\n delta: 'δ',\n epsilon: 'ε',\n zeta: 'ζ',\n eta: 'η',\n theta: 'θ',\n iota: 'ι',\n kappa: 'κ',\n lambda: 'λ',\n mu: 'μ',\n nu: 'ν',\n xi: 'ξ',\n omicron: 'ο',\n pi: 'π',\n rho: 'ρ',\n sigmaf: 'ς',\n sigma: 'σ',\n tau: 'τ',\n upsilon: 'υ',\n phi: 'φ',\n chi: 'χ',\n psi: 'ψ',\n omega: 'ω',\n thetasym: 'ϑ',\n upsih: 'ϒ',\n piv: 'ϖ',\n bull: '•',\n hellip: '…',\n prime: '′',\n Prime: '″',\n oline: '‾',\n frasl: '⁄',\n weierp: '℘',\n image: 'ℑ',\n real: 'ℜ',\n trade: '™',\n alefsym: 'ℵ',\n larr: '←',\n uarr: '↑',\n rarr: '→',\n darr: '↓',\n harr: '↔',\n crarr: '↵',\n lArr: '⇐',\n uArr: '⇑',\n rArr: '⇒',\n dArr: '⇓',\n hArr: '⇔',\n forall: '∀',\n part: '∂',\n exist: '∃',\n empty: '∅',\n nabla: '∇',\n isin: '∈',\n notin: '∉',\n ni: '∋',\n prod: '∏',\n sum: '∑',\n minus: '−',\n lowast: '∗',\n radic: '√',\n prop: '∝',\n infin: '∞',\n ang: '∠',\n and: '∧',\n or: '∨',\n cap: '∩',\n cup: '∪',\n int: '∫',\n there4: '∴',\n sim: '∼',\n cong: '≅',\n asymp: '≈',\n ne: '≠',\n equiv: '≡',\n le: '≤',\n ge: '≥',\n sub: '⊂',\n sup: '⊃',\n nsub: '⊄',\n sube: '⊆',\n supe: '⊇',\n oplus: '⊕',\n otimes: '⊗',\n perp: '⊥',\n sdot: '⋅',\n lceil: '⌈',\n rceil: '⌉',\n lfloor: '⌊',\n rfloor: '⌋',\n lang: '〈',\n rang: '〉',\n loz: '◊',\n spades: '♠',\n clubs: '♣',\n hearts: '♥',\n diams: '♦',\n quot: '\"',\n amp: '&',\n lt: '<',\n gt: '>',\n OElig: 'Œ',\n oelig: 'œ',\n Scaron: 'Š',\n scaron: 'š',\n Yuml: 'Ÿ',\n circ: 'ˆ',\n tilde: '˜',\n ensp: ' ',\n emsp: ' ',\n thinsp: ' ',\n zwnj: '',\n zwj: '',\n lrm: '',\n rlm: '',\n ndash: '–',\n mdash: '—',\n lsquo: '‘',\n rsquo: '’',\n sbquo: '‚',\n ldquo: '“',\n rdquo: '”',\n bdquo: '„',\n dagger: '†',\n Dagger: '‡',\n permil: '‰',\n lsaquo: '‹',\n rsaquo: '›',\n euro: '€'\n}\n","/**\n * List of legacy (that don’t need a trailing `;`) named references which could,\n * depending on what follows them, turn into a different meaning\n *\n * @type {Array<string>}\n */\nexport const dangerous = [\n 'cent',\n 'copy',\n 'divide',\n 'gt',\n 'lt',\n 'not',\n 'para',\n 'times'\n]\n","import {characterEntitiesLegacy} from 'character-entities-legacy'\nimport {characterEntitiesHtml4} from 'character-entities-html4'\nimport {dangerous} from '../constant/dangerous.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * `characterEntitiesHtml4` but inverted.\n *\n * @type {Record<string, string>}\n */\nconst characters = {}\n\n/** @type {string} */\nlet key\n\nfor (key in characterEntitiesHtml4) {\n if (own.call(characterEntitiesHtml4, key)) {\n characters[characterEntitiesHtml4[key]] = key\n }\n}\n\nconst notAlphanumericRegex = /[^\\dA-Za-z]/\n\n/**\n * Configurable ways to encode characters as named references.\n *\n * @param {number} code\n * @param {number} next\n * @param {boolean|undefined} omit\n * @param {boolean|undefined} attribute\n * @returns {string}\n */\nexport function toNamed(code, next, omit, attribute) {\n const character = String.fromCharCode(code)\n\n if (own.call(characters, character)) {\n const name = characters[character]\n const value = '&' + name\n\n if (\n omit &&\n characterEntitiesLegacy.includes(name) &&\n !dangerous.includes(name) &&\n (!attribute ||\n (next &&\n next !== 61 /* `=` */ &&\n notAlphanumericRegex.test(String.fromCharCode(next))))\n ) {\n return value\n }\n\n return value + ';'\n }\n\n return ''\n}\n","/**\n * @typedef FormatSmartOptions\n * @property {boolean} [useNamedReferences=false]\n * Prefer named character references (`&`) where possible.\n * @property {boolean} [useShortestReferences=false]\n * Prefer the shortest possible reference, if that results in less bytes.\n * **Note**: `useNamedReferences` can be omitted when using `useShortestReferences`.\n * @property {boolean} [omitOptionalSemicolons=false]\n * Whether to omit semicolons when possible.\n * **Note**: This creates what HTML calls “parse errors” but is otherwise still valid HTML — don’t use this except when building a minifier.\n * Omitting semicolons is possible for certain named and numeric references in some cases.\n * @property {boolean} [attribute=false]\n * Create character references which don’t fail in attributes.\n * **Note**: `attribute` only applies when operating dangerously with\n * `omitOptionalSemicolons: true`.\n */\n\nimport {toHexadecimal} from './to-hexadecimal.js'\nimport {toDecimal} from './to-decimal.js'\nimport {toNamed} from './to-named.js'\n\n/**\n * Configurable ways to encode a character yielding pretty or small results.\n *\n * @param {number} code\n * @param {number} next\n * @param {FormatSmartOptions} options\n * @returns {string}\n */\nexport function formatSmart(code, next, options) {\n let numeric = toHexadecimal(code, next, options.omitOptionalSemicolons)\n /** @type {string|undefined} */\n let named\n\n if (options.useNamedReferences || options.useShortestReferences) {\n named = toNamed(\n code,\n next,\n options.omitOptionalSemicolons,\n options.attribute\n )\n }\n\n // Use the shortest numeric reference when requested.\n // A simple algorithm would use decimal for all code points under 100, as\n // those are shorter than hexadecimal:\n //\n // * `c` vs `c` (decimal shorter)\n // * `d` vs `d` (equal)\n //\n // However, because we take `next` into consideration when `omit` is used,\n // And it would be possible that decimals are shorter on bigger values as\n // well if `next` is hexadecimal but not decimal, we instead compare both.\n if (\n (options.useShortestReferences || !named) &&\n options.useShortestReferences\n ) {\n const decimal = toDecimal(code, next, options.omitOptionalSemicolons)\n\n if (decimal.length < numeric.length) {\n numeric = decimal\n }\n }\n\n return named &&\n (!options.useShortestReferences || named.length < numeric.length)\n ? named\n : numeric\n}\n","/**\n * @typedef {import('./core.js').CoreOptions & import('./util/format-smart.js').FormatSmartOptions} Options\n * @typedef {import('./core.js').CoreOptions} LightOptions\n */\n\nimport {core} from './core.js'\nimport {formatSmart} from './util/format-smart.js'\nimport {formatBasic} from './util/format-basic.js'\n\n/**\n * Encode special characters in `value`.\n *\n * @param {string} value\n * Value to encode.\n * @param {Options} [options]\n * Configuration.\n * @returns {string}\n * Encoded value.\n */\nexport function stringifyEntities(value, options) {\n return core(value, Object.assign({format: formatSmart}, options))\n}\n\n/**\n * Encode special characters in `value` as hexadecimals.\n *\n * @param {string} value\n * Value to encode.\n * @param {LightOptions} [options]\n * Configuration.\n * @returns {string}\n * Encoded value.\n */\nexport function stringifyEntitiesLight(value, options) {\n return core(value, Object.assign({format: formatBasic}, options))\n}\n","/**\n * @import {Comment, Parents} from 'hast'\n * @import {State} from '../index.js'\n */\n\nimport {stringifyEntities} from 'stringify-entities'\n\nconst htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g\n\n// Declare arrays as variables so it can be cached by `stringifyEntities`\nconst bogusCommentEntitySubset = ['>']\nconst commentEntitySubset = ['<', '>']\n\n/**\n * Serialize a comment.\n *\n * @param {Comment} node\n * Node to handle.\n * @param {number | undefined} _1\n * Index of `node` in `parent.\n * @param {Parents | undefined} _2\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function comment(node, _1, _2, state) {\n // See: <https://html.spec.whatwg.org/multipage/syntax.html#comments>\n return state.settings.bogusComments\n ? '<?' +\n stringifyEntities(\n node.value,\n Object.assign({}, state.settings.characterReferences, {\n subset: bogusCommentEntitySubset\n })\n ) +\n '>'\n : '<!--' + node.value.replace(htmlCommentRegex, encode) + '-->'\n\n /**\n * @param {string} $0\n */\n function encode($0) {\n return stringifyEntities(\n $0,\n Object.assign({}, state.settings.characterReferences, {\n subset: commentEntitySubset\n })\n )\n }\n}\n","/**\n * @import {Doctype, Parents} from 'hast'\n * @import {State} from '../index.js'\n */\n\n/**\n * Serialize a doctype.\n *\n * @param {Doctype} _1\n * Node to handle.\n * @param {number | undefined} _2\n * Index of `node` in `parent.\n * @param {Parents | undefined} _3\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function doctype(_1, _2, _3, state) {\n return (\n '<!' +\n (state.settings.upperDoctype ? 'DOCTYPE' : 'doctype') +\n (state.settings.tightDoctype ? '' : ' ') +\n 'html>'\n )\n}\n","/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n","/**\n * @import {Parents, RootContent} from 'hast'\n */\n\nimport {whitespace} from 'hast-util-whitespace'\n\nexport const siblingAfter = siblings(1)\nexport const siblingBefore = siblings(-1)\n\n/** @type {Array<RootContent>} */\nconst emptyChildren = []\n\n/**\n * Factory to check siblings in a direction.\n *\n * @param {number} increment\n */\nfunction siblings(increment) {\n return sibling\n\n /**\n * Find applicable siblings in a direction.\n *\n * @template {Parents} Parent\n * Parent type.\n * @param {Parent | undefined} parent\n * Parent.\n * @param {number | undefined} index\n * Index of child in `parent`.\n * @param {boolean | undefined} [includeWhitespace=false]\n * Whether to include whitespace (default: `false`).\n * @returns {Parent extends {children: Array<infer Child>} ? Child | undefined : never}\n * Child of parent.\n */\n function sibling(parent, index, includeWhitespace) {\n const siblings = parent ? parent.children : emptyChildren\n let offset = (index || 0) + increment\n let next = siblings[offset]\n\n if (!includeWhitespace) {\n while (next && whitespace(next)) {\n offset += increment\n next = siblings[offset]\n }\n }\n\n // @ts-expect-error: it’s a correct child.\n return next\n }\n}\n","/**\n * @import {Element, Parents} from 'hast'\n */\n\n/**\n * @callback OmitHandle\n * Check if a tag can be omitted.\n * @param {Element} element\n * Element to check.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether to omit a tag.\n *\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Factory to check if a given node can have a tag omitted.\n *\n * @param {Record<string, OmitHandle>} handlers\n * Omission handlers, where each key is a tag name, and each value is the\n * corresponding handler.\n * @returns {OmitHandle}\n * Whether to omit a tag of an element.\n */\nexport function omission(handlers) {\n return omit\n\n /**\n * Check if a given node can have a tag omitted.\n *\n * @type {OmitHandle}\n */\n function omit(node, index, parent) {\n return (\n own.call(handlers, node.tagName) &&\n handlers[node.tagName](node, index, parent)\n )\n }\n}\n","/**\n * @import {Element, Parents} from 'hast'\n */\n\nimport {whitespace} from 'hast-util-whitespace'\nimport {siblingAfter} from './util/siblings.js'\nimport {omission} from './omission.js'\n\nexport const closing = omission({\n body,\n caption: headOrColgroupOrCaption,\n colgroup: headOrColgroupOrCaption,\n dd,\n dt,\n head: headOrColgroupOrCaption,\n html,\n li,\n optgroup,\n option,\n p,\n rp: rubyElement,\n rt: rubyElement,\n tbody,\n td: cells,\n tfoot,\n th: cells,\n thead,\n tr\n})\n\n/**\n * Macro for `</head>`, `</colgroup>`, and `</caption>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction headOrColgroupOrCaption(_, index, parent) {\n const next = siblingAfter(parent, index, true)\n return (\n !next ||\n (next.type !== 'comment' &&\n !(next.type === 'text' && whitespace(next.value.charAt(0))))\n )\n}\n\n/**\n * Whether to omit `</html>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction html(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || next.type !== 'comment'\n}\n\n/**\n * Whether to omit `</body>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction body(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || next.type !== 'comment'\n}\n\n/**\n * Whether to omit `</p>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction p(_, index, parent) {\n const next = siblingAfter(parent, index)\n return next\n ? next.type === 'element' &&\n (next.tagName === 'address' ||\n next.tagName === 'article' ||\n next.tagName === 'aside' ||\n next.tagName === 'blockquote' ||\n next.tagName === 'details' ||\n next.tagName === 'div' ||\n next.tagName === 'dl' ||\n next.tagName === 'fieldset' ||\n next.tagName === 'figcaption' ||\n next.tagName === 'figure' ||\n next.tagName === 'footer' ||\n next.tagName === 'form' ||\n next.tagName === 'h1' ||\n next.tagName === 'h2' ||\n next.tagName === 'h3' ||\n next.tagName === 'h4' ||\n next.tagName === 'h5' ||\n next.tagName === 'h6' ||\n next.tagName === 'header' ||\n next.tagName === 'hgroup' ||\n next.tagName === 'hr' ||\n next.tagName === 'main' ||\n next.tagName === 'menu' ||\n next.tagName === 'nav' ||\n next.tagName === 'ol' ||\n next.tagName === 'p' ||\n next.tagName === 'pre' ||\n next.tagName === 'section' ||\n next.tagName === 'table' ||\n next.tagName === 'ul')\n : !parent ||\n // Confusing parent.\n !(\n parent.type === 'element' &&\n (parent.tagName === 'a' ||\n parent.tagName === 'audio' ||\n parent.tagName === 'del' ||\n parent.tagName === 'ins' ||\n parent.tagName === 'map' ||\n parent.tagName === 'noscript' ||\n parent.tagName === 'video')\n )\n}\n\n/**\n * Whether to omit `</li>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction li(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || (next.type === 'element' && next.tagName === 'li')\n}\n\n/**\n * Whether to omit `</dt>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction dt(_, index, parent) {\n const next = siblingAfter(parent, index)\n return Boolean(\n next &&\n next.type === 'element' &&\n (next.tagName === 'dt' || next.tagName === 'dd')\n )\n}\n\n/**\n * Whether to omit `</dd>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction dd(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'dt' || next.tagName === 'dd'))\n )\n}\n\n/**\n * Whether to omit `</rt>` or `</rp>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction rubyElement(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'rp' || next.tagName === 'rt'))\n )\n}\n\n/**\n * Whether to omit `</optgroup>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction optgroup(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || (next.type === 'element' && next.tagName === 'optgroup')\n}\n\n/**\n * Whether to omit `</option>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction option(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'option' || next.tagName === 'optgroup'))\n )\n}\n\n/**\n * Whether to omit `</thead>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction thead(_, index, parent) {\n const next = siblingAfter(parent, index)\n return Boolean(\n next &&\n next.type === 'element' &&\n (next.tagName === 'tbody' || next.tagName === 'tfoot')\n )\n}\n\n/**\n * Whether to omit `</tbody>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction tbody(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'tbody' || next.tagName === 'tfoot'))\n )\n}\n\n/**\n * Whether to omit `</tfoot>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction tfoot(_, index, parent) {\n return !siblingAfter(parent, index)\n}\n\n/**\n * Whether to omit `</tr>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction tr(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || (next.type === 'element' && next.tagName === 'tr')\n}\n\n/**\n * Whether to omit `</td>` or `</th>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction cells(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'td' || next.tagName === 'th'))\n )\n}\n","/**\n * @import {Element, Parents} from 'hast'\n */\n\nimport {whitespace} from 'hast-util-whitespace'\nimport {siblingAfter, siblingBefore} from './util/siblings.js'\nimport {closing} from './closing.js'\nimport {omission} from './omission.js'\n\nexport const opening = omission({\n body,\n colgroup,\n head,\n html,\n tbody\n})\n\n/**\n * Whether to omit `<html>`.\n *\n * @param {Element} node\n * Element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction html(node) {\n const head = siblingAfter(node, -1)\n return !head || head.type !== 'comment'\n}\n\n/**\n * Whether to omit `<head>`.\n *\n * @param {Element} node\n * Element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction head(node) {\n /** @type {Set<string>} */\n const seen = new Set()\n\n // Whether `srcdoc` or not,\n // make sure the content model at least doesn’t have too many `base`s/`title`s.\n for (const child of node.children) {\n if (\n child.type === 'element' &&\n (child.tagName === 'base' || child.tagName === 'title')\n ) {\n if (seen.has(child.tagName)) return false\n seen.add(child.tagName)\n }\n }\n\n // “May be omitted if the element is empty,\n // or if the first thing inside the head element is an element.”\n const child = node.children[0]\n return !child || child.type === 'element'\n}\n\n/**\n * Whether to omit `<body>`.\n *\n * @param {Element} node\n * Element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction body(node) {\n const head = siblingAfter(node, -1, true)\n\n return (\n !head ||\n (head.type !== 'comment' &&\n !(head.type === 'text' && whitespace(head.value.charAt(0))) &&\n !(\n head.type === 'element' &&\n (head.tagName === 'meta' ||\n head.tagName === 'link' ||\n head.tagName === 'script' ||\n head.tagName === 'style' ||\n head.tagName === 'template')\n ))\n )\n}\n\n/**\n * Whether to omit `<colgroup>`.\n * The spec describes some logic for the opening tag, but it’s easier to\n * implement in the closing tag, to the same effect, so we handle it there\n * instead.\n *\n * @param {Element} node\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction colgroup(node, index, parent) {\n const previous = siblingBefore(parent, index)\n const head = siblingAfter(node, -1, true)\n\n // Previous colgroup was already omitted.\n if (\n parent &&\n previous &&\n previous.type === 'element' &&\n previous.tagName === 'colgroup' &&\n closing(previous, parent.children.indexOf(previous), parent)\n ) {\n return false\n }\n\n return Boolean(head && head.type === 'element' && head.tagName === 'col')\n}\n\n/**\n * Whether to omit `<tbody>`.\n *\n * @param {Element} node\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction tbody(node, index, parent) {\n const previous = siblingBefore(parent, index)\n const head = siblingAfter(node, -1)\n\n // Previous table section was already omitted.\n if (\n parent &&\n previous &&\n previous.type === 'element' &&\n (previous.tagName === 'thead' || previous.tagName === 'tbody') &&\n closing(previous, parent.children.indexOf(previous), parent)\n ) {\n return false\n }\n\n return Boolean(head && head.type === 'element' && head.tagName === 'tr')\n}\n","/**\n * @import {Element, Parents, Properties} from 'hast'\n * @import {State} from '../index.js'\n */\n\nimport {ccount} from 'ccount'\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {find, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport {stringifyEntities} from 'stringify-entities'\nimport {closing} from '../omission/closing.js'\nimport {opening} from '../omission/opening.js'\n\n/**\n * Maps of subsets.\n *\n * Each value is a matrix of tuples.\n * The value at `0` causes parse errors, the value at `1` is valid.\n * Of both, the value at `0` is unsafe, and the value at `1` is safe.\n *\n * @type {Record<'double' | 'name' | 'single' | 'unquoted', Array<[Array<string>, Array<string>]>>}\n */\nconst constants = {\n // See: <https://html.spec.whatwg.org/#attribute-name-state>.\n name: [\n ['\\t\\n\\f\\r &/=>'.split(''), '\\t\\n\\f\\r \"&\\'/=>`'.split('')],\n ['\\0\\t\\n\\f\\r \"&\\'/<=>'.split(''), '\\0\\t\\n\\f\\r \"&\\'/<=>`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.\n unquoted: [\n ['\\t\\n\\f\\r &>'.split(''), '\\0\\t\\n\\f\\r \"&\\'<=>`'.split('')],\n ['\\0\\t\\n\\f\\r \"&\\'<=>`'.split(''), '\\0\\t\\n\\f\\r \"&\\'<=>`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.\n single: [\n [\"&'\".split(''), '\"&\\'`'.split('')],\n [\"\\0&'\".split(''), '\\0\"&\\'`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.\n double: [\n ['\"&'.split(''), '\"&\\'`'.split('')],\n ['\\0\"&'.split(''), '\\0\"&\\'`'.split('')]\n ]\n}\n\n/**\n * Serialize an element node.\n *\n * @param {Element} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function element(node, index, parent, state) {\n const schema = state.schema\n const omit = schema.space === 'svg' ? false : state.settings.omitOptionalTags\n let selfClosing =\n schema.space === 'svg'\n ? state.settings.closeEmptyElements\n : state.settings.voids.includes(node.tagName.toLowerCase())\n /** @type {Array<string>} */\n const parts = []\n /** @type {string} */\n let last\n\n if (schema.space === 'html' && node.tagName === 'svg') {\n state.schema = svg\n }\n\n const attributes = serializeAttributes(state, node.properties)\n\n const content = state.all(\n schema.space === 'html' && node.tagName === 'template' ? node.content : node\n )\n\n state.schema = schema\n\n // If the node is categorised as void, but it has children, remove the\n // categorisation.\n // This enables for example `menuitem`s, which are void in W3C HTML but not\n // void in WHATWG HTML, to be stringified properly.\n // Note: `menuitem` has since been removed from the HTML spec, and so is no\n // longer void.\n if (content) selfClosing = false\n\n if (attributes || !omit || !opening(node, index, parent)) {\n parts.push('<', node.tagName, attributes ? ' ' + attributes : '')\n\n if (\n selfClosing &&\n (schema.space === 'svg' || state.settings.closeSelfClosing)\n ) {\n last = attributes.charAt(attributes.length - 1)\n if (\n !state.settings.tightSelfClosing ||\n last === '/' ||\n (last && last !== '\"' && last !== \"'\")\n ) {\n parts.push(' ')\n }\n\n parts.push('/')\n }\n\n parts.push('>')\n }\n\n parts.push(content)\n\n if (!selfClosing && (!omit || !closing(node, index, parent))) {\n parts.push('</' + node.tagName + '>')\n }\n\n return parts.join('')\n}\n\n/**\n * @param {State} state\n * @param {Properties | null | undefined} properties\n * @returns {string}\n */\nfunction serializeAttributes(state, properties) {\n /** @type {Array<string>} */\n const values = []\n let index = -1\n /** @type {string} */\n let key\n\n if (properties) {\n for (key in properties) {\n if (properties[key] !== null && properties[key] !== undefined) {\n const value = serializeAttribute(state, key, properties[key])\n if (value) values.push(value)\n }\n }\n }\n\n while (++index < values.length) {\n const last = state.settings.tightAttributes\n ? values[index].charAt(values[index].length - 1)\n : undefined\n\n // In tight mode, don’t add a space after quoted attributes.\n if (index !== values.length - 1 && last !== '\"' && last !== \"'\") {\n values[index] += ' '\n }\n }\n\n return values.join('')\n}\n\n/**\n * @param {State} state\n * @param {string} key\n * @param {Properties[keyof Properties]} value\n * @returns {string}\n */\nfunction serializeAttribute(state, key, value) {\n const info = find(state.schema, key)\n const x =\n state.settings.allowParseErrors && state.schema.space === 'html' ? 0 : 1\n const y = state.settings.allowDangerousCharacters ? 0 : 1\n let quote = state.quote\n /** @type {string | undefined} */\n let result\n\n if (info.overloadedBoolean && (value === info.attribute || value === '')) {\n value = true\n } else if (\n (info.boolean || info.overloadedBoolean) &&\n (typeof value !== 'string' || value === info.attribute || value === '')\n ) {\n value = Boolean(value)\n }\n\n if (\n value === null ||\n value === undefined ||\n value === false ||\n (typeof value === 'number' && Number.isNaN(value))\n ) {\n return ''\n }\n\n const name = stringifyEntities(\n info.attribute,\n Object.assign({}, state.settings.characterReferences, {\n // Always encode without parse errors in non-HTML.\n subset: constants.name[x][y]\n })\n )\n\n // No value.\n // There is currently only one boolean property in SVG: `[download]` on\n // `<a>`.\n // This property does not seem to work in browsers (Firefox, Safari, Chrome),\n // so I can’t test if dropping the value works.\n // But I assume that it should:\n //\n // ```html\n // <!doctype html>\n // <svg viewBox=\"0 0 100 100\">\n // <a href=https://example.com download>\n // <circle cx=50 cy=40 r=35 />\n // </a>\n // </svg>\n // ```\n //\n // See: <https://github.com/wooorm/property-information/blob/main/lib/svg.js>\n if (value === true) return name\n\n // `spaces` doesn’t accept a second argument, but it’s given here just to\n // keep the code cleaner.\n value = Array.isArray(value)\n ? (info.commaSeparated ? commas : spaces)(value, {\n padLeft: !state.settings.tightCommaSeparatedLists\n })\n : String(value)\n\n if (state.settings.collapseEmptyAttributes && !value) return name\n\n // Check unquoted value.\n if (state.settings.preferUnquoted) {\n result = stringifyEntities(\n value,\n Object.assign({}, state.settings.characterReferences, {\n attribute: true,\n subset: constants.unquoted[x][y]\n })\n )\n }\n\n // If we don’t want unquoted, or if `value` contains character references when\n // unquoted…\n if (result !== value) {\n // If the alternative is less common than `quote`, switch.\n if (\n state.settings.quoteSmart &&\n ccount(value, quote) > ccount(value, state.alternative)\n ) {\n quote = state.alternative\n }\n\n result =\n quote +\n stringifyEntities(\n value,\n Object.assign({}, state.settings.characterReferences, {\n // Always encode without parse errors in non-HTML.\n subset: (quote === \"'\" ? constants.single : constants.double)[x][y],\n attribute: true\n })\n ) +\n quote\n }\n\n // Don’t add a `=` for unquoted empties.\n return name + (result ? '=' + result : result)\n}\n","/**\n * @import {Parents, Text} from 'hast'\n * @import {Raw} from 'mdast-util-to-hast'\n * @import {State} from '../index.js'\n */\n\nimport {stringifyEntities} from 'stringify-entities'\n\n// Declare array as variable so it can be cached by `stringifyEntities`\nconst textEntitySubset = ['<', '&']\n\n/**\n * Serialize a text node.\n *\n * @param {Raw | Text} node\n * Node to handle.\n * @param {number | undefined} _\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function text(node, _, parent, state) {\n // Check if content of `node` should be escaped.\n return parent &&\n parent.type === 'element' &&\n (parent.tagName === 'script' || parent.tagName === 'style')\n ? node.value\n : stringifyEntities(\n node.value,\n Object.assign({}, state.settings.characterReferences, {\n subset: textEntitySubset\n })\n )\n}\n","/**\n * @import {Parents} from 'hast'\n * @import {Raw} from 'mdast-util-to-hast'\n * @import {State} from '../index.js'\n */\n\nimport {text} from './text.js'\n\n/**\n * Serialize a raw node.\n *\n * @param {Raw} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function raw(node, index, parent, state) {\n return state.settings.allowDangerousHtml\n ? node.value\n : text(node, index, parent, state)\n}\n","/**\n * @import {Parents, Root} from 'hast'\n * @import {State} from '../index.js'\n */\n\n/**\n * Serialize a root.\n *\n * @param {Root} node\n * Node to handle.\n * @param {number | undefined} _1\n * Index of `node` in `parent.\n * @param {Parents | undefined} _2\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function root(node, _1, _2, state) {\n return state.all(node)\n}\n","/**\n * @import {Nodes, Parents} from 'hast'\n * @import {State} from '../index.js'\n */\n\nimport {zwitch} from 'zwitch'\nimport {comment} from './comment.js'\nimport {doctype} from './doctype.js'\nimport {element} from './element.js'\nimport {raw} from './raw.js'\nimport {root} from './root.js'\nimport {text} from './text.js'\n\n/**\n * @type {(node: Nodes, index: number | undefined, parent: Parents | undefined, state: State) => string}\n */\nexport const handle = zwitch('type', {\n invalid,\n unknown,\n handlers: {comment, doctype, element, raw, root, text}\n})\n\n/**\n * Fail when a non-node is found in the tree.\n *\n * @param {unknown} node\n * Unknown value.\n * @returns {never}\n * Never.\n */\nfunction invalid(node) {\n throw new Error('Expected node, not `' + node + '`')\n}\n\n/**\n * Fail when a node with an unknown type is found in the tree.\n *\n * @param {unknown} node_\n * Unknown node.\n * @returns {never}\n * Never.\n */\nfunction unknown(node_) {\n // `type` is guaranteed by runtime JS.\n const node = /** @type {Nodes} */ (node_)\n throw new Error('Cannot compile unknown node `' + node.type + '`')\n}\n","/**\n * @import {Nodes, Parents, RootContent} from 'hast'\n * @import {Schema} from 'property-information'\n * @import {Options as StringifyEntitiesOptions} from 'stringify-entities'\n */\n\n/**\n * @typedef {Omit<StringifyEntitiesOptions, 'attribute' | 'escapeOnly' | 'subset'>} CharacterReferences\n *\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [allowDangerousCharacters=false]\n * Do not encode some characters which cause XSS vulnerabilities in older\n * browsers (default: `false`).\n *\n * > ⚠️ **Danger**: only set this if you completely trust the content.\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n * Allow `raw` nodes and insert them as raw HTML (default: `false`).\n *\n * When `false`, `Raw` nodes are encoded.\n *\n * > ⚠️ **Danger**: only set this if you completely trust the content.\n * @property {boolean | null | undefined} [allowParseErrors=false]\n * Do not encode characters which cause parse errors (even though they work),\n * to save bytes (default: `false`).\n *\n * Not used in the SVG space.\n *\n * > 👉 **Note**: intentionally creates parse errors in markup (how parse\n * > errors are handled is well defined, so this works but isn’t pretty).\n * @property {boolean | null | undefined} [bogusComments=false]\n * Use “bogus comments” instead of comments to save byes: `<?charlie>`\n * instead of `<!--charlie-->` (default: `false`).\n *\n * > 👉 **Note**: intentionally creates parse errors in markup (how parse\n * > errors are handled is well defined, so this works but isn’t pretty).\n * @property {CharacterReferences | null | undefined} [characterReferences]\n * Configure how to serialize character references (optional).\n * @property {boolean | null | undefined} [closeEmptyElements=false]\n * Close SVG elements without any content with slash (`/`) on the opening tag\n * instead of an end tag: `<circle />` instead of `<circle></circle>`\n * (default: `false`).\n *\n * See `tightSelfClosing` to control whether a space is used before the\n * slash.\n *\n * Not used in the HTML space.\n * @property {boolean | null | undefined} [closeSelfClosing=false]\n * Close self-closing nodes with an extra slash (`/`): `<img />` instead of\n * `<img>` (default: `false`).\n *\n * See `tightSelfClosing` to control whether a space is used before the\n * slash.\n *\n * Not used in the SVG space.\n * @property {boolean | null | undefined} [collapseEmptyAttributes=false]\n * Collapse empty attributes: get `class` instead of `class=\"\"` (default:\n * `false`).\n *\n * Not used in the SVG space.\n *\n * > 👉 **Note**: boolean attributes (such as `hidden`) are always collapsed.\n * @property {boolean | null | undefined} [omitOptionalTags=false]\n * Omit optional opening and closing tags (default: `false`).\n *\n * For example, in `<ol><li>one</li><li>two</li></ol>`, both `</li>` closing\n * tags can be omitted.\n * The first because it’s followed by another `li`, the last because it’s\n * followed by nothing.\n *\n * Not used in the SVG space.\n * @property {boolean | null | undefined} [preferUnquoted=false]\n * Leave attributes unquoted if that results in less bytes (default: `false`).\n *\n * Not used in the SVG space.\n * @property {boolean | null | undefined} [quoteSmart=false]\n * Use the other quote if that results in less bytes (default: `false`).\n * @property {Quote | null | undefined} [quote='\"']\n * Preferred quote to use (default: `'\"'`).\n * @property {Space | null | undefined} [space='html']\n * When an `<svg>` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it (default: `'html'`).\n *\n * > 👉 **Note**: hast is not XML.\n * > It supports SVG as embedded in HTML.\n * > It does not support the features available in XML.\n * > Passing SVG might break but fragments of modern SVG should be fine.\n * > Use [`xast`][xast] if you need to support SVG as XML.\n * @property {boolean | null | undefined} [tightAttributes=false]\n * Join attributes together, without whitespace, if possible: get\n * `class=\"a b\"title=\"c d\"` instead of `class=\"a b\" title=\"c d\"` to save\n * bytes (default: `false`).\n *\n * Not used in the SVG space.\n *\n * > 👉 **Note**: intentionally creates parse errors in markup (how parse\n * > errors are handled is well defined, so this works but isn’t pretty).\n * @property {boolean | null | undefined} [tightCommaSeparatedLists=false]\n * Join known comma-separated attribute values with just a comma (`,`),\n * instead of padding them on the right as well (`,␠`, where `␠` represents a\n * space) (default: `false`).\n * @property {boolean | null | undefined} [tightDoctype=false]\n * Drop unneeded spaces in doctypes: `<!doctypehtml>` instead of\n * `<!doctype html>` to save bytes (default: `false`).\n *\n * > 👉 **Note**: intentionally creates parse errors in markup (how parse\n * > errors are handled is well defined, so this works but isn’t pretty).\n * @property {boolean | null | undefined} [tightSelfClosing=false]\n * Do not use an extra space when closing self-closing elements: `<img/>`\n * instead of `<img />` (default: `false`).\n *\n * > 👉 **Note**: only used if `closeSelfClosing: true` or\n * > `closeEmptyElements: true`.\n * @property {boolean | null | undefined} [upperDoctype=false]\n * Use a `<!DOCTYPE…` instead of `<!doctype…` (default: `false`).\n *\n * Useless except for XHTML.\n * @property {ReadonlyArray<string> | null | undefined} [voids]\n * Tag names of elements to serialize without closing tag (default: `html-void-elements`).\n *\n * Not used in the SVG space.\n *\n * > 👉 **Note**: It’s highly unlikely that you want to pass this, because\n * > hast is not for XML, and HTML will not add more void elements.\n *\n * @typedef {'\"' | \"'\"} Quote\n * HTML quotes for attribute values.\n *\n * @typedef {Omit<Required<{[key in keyof Options]: Exclude<Options[key], null | undefined>}>, 'space' | 'quote'>} Settings\n *\n * @typedef {'html' | 'svg'} Space\n * Namespace.\n *\n * @typedef State\n * Info passed around about the current state.\n * @property {(node: Parents | undefined) => string} all\n * Serialize the children of a parent node.\n * @property {Quote} alternative\n * Alternative quote.\n * @property {(node: Nodes, index: number | undefined, parent: Parents | undefined) => string} one\n * Serialize one node.\n * @property {Quote} quote\n * Preferred quote.\n * @property {Schema} schema\n * Current schema.\n * @property {Settings} settings\n * User configuration.\n */\n\nimport {htmlVoidElements} from 'html-void-elements'\nimport {html, svg} from 'property-information'\nimport {handle} from './handle/index.js'\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/** @type {CharacterReferences} */\nconst emptyCharacterReferences = {}\n\n/** @type {Array<never>} */\nconst emptyChildren = []\n\n/**\n * Serialize hast as HTML.\n *\n * @param {Array<RootContent> | Nodes} tree\n * Tree to serialize.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized HTML.\n */\nexport function toHtml(tree, options) {\n const options_ = options || emptyOptions\n const quote = options_.quote || '\"'\n const alternative = quote === '\"' ? \"'\" : '\"'\n\n if (quote !== '\"' && quote !== \"'\") {\n throw new Error('Invalid quote `' + quote + '`, expected `\\'` or `\"`')\n }\n\n /** @type {State} */\n const state = {\n one,\n all,\n settings: {\n omitOptionalTags: options_.omitOptionalTags || false,\n allowParseErrors: options_.allowParseErrors || false,\n allowDangerousCharacters: options_.allowDangerousCharacters || false,\n quoteSmart: options_.quoteSmart || false,\n preferUnquoted: options_.preferUnquoted || false,\n tightAttributes: options_.tightAttributes || false,\n upperDoctype: options_.upperDoctype || false,\n tightDoctype: options_.tightDoctype || false,\n bogusComments: options_.bogusComments || false,\n tightCommaSeparatedLists: options_.tightCommaSeparatedLists || false,\n tightSelfClosing: options_.tightSelfClosing || false,\n collapseEmptyAttributes: options_.collapseEmptyAttributes || false,\n allowDangerousHtml: options_.allowDangerousHtml || false,\n voids: options_.voids || htmlVoidElements,\n characterReferences:\n options_.characterReferences || emptyCharacterReferences,\n closeSelfClosing: options_.closeSelfClosing || false,\n closeEmptyElements: options_.closeEmptyElements || false\n },\n schema: options_.space === 'svg' ? svg : html,\n quote,\n alternative\n }\n\n return state.one(\n Array.isArray(tree) ? {type: 'root', children: tree} : tree,\n undefined,\n undefined\n )\n}\n\n/**\n * Serialize a node.\n *\n * @this {State}\n * Info passed around about the current state.\n * @param {Nodes} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {string}\n * Serialized node.\n */\nfunction one(node, index, parent) {\n return handle(node, index, parent, this)\n}\n\n/**\n * Serialize all children of `parent`.\n *\n * @this {State}\n * Info passed around about the current state.\n * @param {Parents | undefined} parent\n * Parent whose children to serialize.\n * @returns {string}\n */\nexport function all(parent) {\n /** @type {Array<string>} */\n const results = []\n const children = (parent && parent.children) || emptyChildren\n let index = -1\n\n while (++index < children.length) {\n results[index] = this.one(children[index], index, parent)\n }\n\n return results.join('')\n}\n","import { ShikiError as ShikiError$1 } from \"@shikijs/types\";\nimport { ShikiError, applyColorReplacements, codeToTokensBase as codeToTokensBase$1, codeToTokensWithThemes, codeToTokensWithThemes as codeToTokensWithThemes$1, createShikiInternal, createShikiInternalSync, createShikiPrimitive, createShikiPrimitive as createShikiPrimitive$1, createShikiPrimitiveAsync, createShikiPrimitiveAsync as createShikiPrimitiveAsync$1, getLastGrammarState, getLastGrammarStateFromMap, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, normalizeGetter, normalizeTheme, resolveColorReplacements, setLastGrammarStateToMap, splitLines, splitLines as splitLines$1, toArray, tokenizeWithTheme } from \"@shikijs/primitive\";\nimport { FontStyle } from \"@shikijs/vscode-textmate\";\nimport { toHtml } from \"hast-util-to-html\";\n\nexport * from \"@shikijs/types\"\n\n//#region src/utils/hast.ts\n/**\n* Utility to append class to a hast node\n*\n* If the `property.class` is a string, it will be splitted by space and converted to an array.\n*/\nfunction addClassToHast(node, className) {\n\tif (!className) return node;\n\tnode.properties ||= {};\n\tnode.properties.class ||= [];\n\tif (typeof node.properties.class === \"string\") node.properties.class = node.properties.class.split(/\\s+/g);\n\tif (!Array.isArray(node.properties.class)) node.properties.class = [];\n\tconst targets = Array.isArray(className) ? className : className.split(/\\s+/g);\n\tfor (const c of targets) if (c && !node.properties.class.includes(c)) node.properties.class.push(c);\n\treturn node;\n}\n\n//#endregion\n//#region src/utils/strings.ts\n/**\n* Creates a converter between index and position in a code block.\n*\n* Overflow/underflow are unchecked.\n*/\nfunction createPositionConverter(code) {\n\tconst lines = splitLines$1(code, true).map(([line]) => line);\n\tfunction indexToPos(index) {\n\t\tif (index === code.length) return {\n\t\t\tline: lines.length - 1,\n\t\t\tcharacter: lines[lines.length - 1].length\n\t\t};\n\t\tlet character = index;\n\t\tlet line = 0;\n\t\tfor (const lineText of lines) {\n\t\t\tif (character < lineText.length) break;\n\t\t\tcharacter -= lineText.length;\n\t\t\tline++;\n\t\t}\n\t\treturn {\n\t\t\tline,\n\t\t\tcharacter\n\t\t};\n\t}\n\tfunction posToIndex(line, character) {\n\t\tlet index = 0;\n\t\tfor (let i = 0; i < line; i++) index += lines[i].length;\n\t\tindex += character;\n\t\treturn index;\n\t}\n\treturn {\n\t\tlines,\n\t\tindexToPos,\n\t\tposToIndex\n\t};\n}\n/**\n* Guess embedded languages from given code and highlighter.\n*\n* When highlighter is provided, only bundled languages will be included.\n*\n* @param code - The code string to analyze\n* @param _lang - The primary language of the code (currently unused)\n* @param highlighter - Optional highlighter instance to validate languages\n* @returns Array of detected language identifiers\n*\n* @example\n* ```ts\n* // Detects 'javascript' from Vue SFC\n* guessEmbeddedLanguages('<script lang=\"javascript\">')\n*\n* // Detects 'python' from markdown code block\n* guessEmbeddedLanguages('```python\\nprint(\"hi\")\\n```')\n* ```\n*/\nfunction guessEmbeddedLanguages(code, _lang, highlighter) {\n\tconst langs = /* @__PURE__ */ new Set();\n\tfor (const match of code.matchAll(/:?lang=[\"']([^\"']+)[\"']/g)) {\n\t\tconst lang = match[1].toLowerCase().trim();\n\t\tif (lang) langs.add(lang);\n\t}\n\tfor (const match of code.matchAll(/(?:```|~~~)([\\w-]+)/g)) {\n\t\tconst lang = match[1].toLowerCase().trim();\n\t\tif (lang) langs.add(lang);\n\t}\n\tfor (const match of code.matchAll(/\\\\begin\\{([\\w-]+)\\}/g)) {\n\t\tconst lang = match[1].toLowerCase().trim();\n\t\tif (lang) langs.add(lang);\n\t}\n\tfor (const match of code.matchAll(/<script\\s+(?:type|lang)=[\"']([^\"']+)[\"']/gi)) {\n\t\tconst fullType = match[1].toLowerCase().trim();\n\t\tconst lang = fullType.includes(\"/\") ? fullType.split(\"/\").pop() : fullType;\n\t\tif (lang) langs.add(lang);\n\t}\n\tif (!highlighter) return Array.from(langs);\n\tconst bundle = highlighter.getBundledLanguages();\n\treturn Array.from(langs).filter((l) => l && bundle[l]);\n}\n\n//#endregion\n//#region src/utils/constants.ts\nconst DEFAULT_COLOR_LIGHT_DARK = \"light-dark()\";\nconst COLOR_KEYS = [\"color\", \"background-color\"];\n\n//#endregion\n//#region src/utils/tokens.ts\n/**\n* Split a token into multiple tokens by given offsets.\n*\n* The offsets are relative to the token, and should be sorted.\n*/\nfunction splitToken(token, offsets) {\n\tlet lastOffset = 0;\n\tconst tokens = [];\n\tfor (const offset of offsets) {\n\t\tif (offset > lastOffset) tokens.push({\n\t\t\t...token,\n\t\t\tcontent: token.content.slice(lastOffset, offset),\n\t\t\toffset: token.offset + lastOffset\n\t\t});\n\t\tlastOffset = offset;\n\t}\n\tif (lastOffset < token.content.length) tokens.push({\n\t\t...token,\n\t\tcontent: token.content.slice(lastOffset),\n\t\toffset: token.offset + lastOffset\n\t});\n\treturn tokens;\n}\n/**\n* Split 2D tokens array by given breakpoints.\n*/\nfunction splitTokens(tokens, breakpoints) {\n\tconst sorted = Array.from(breakpoints instanceof Set ? breakpoints : new Set(breakpoints)).sort((a, b) => a - b);\n\tif (!sorted.length) return tokens;\n\treturn tokens.map((line) => {\n\t\treturn line.flatMap((token) => {\n\t\t\tconst breakpointsInToken = sorted.filter((i) => token.offset < i && i < token.offset + token.content.length).map((i) => i - token.offset).sort((a, b) => a - b);\n\t\t\tif (!breakpointsInToken.length) return token;\n\t\t\treturn splitToken(token, breakpointsInToken);\n\t\t});\n\t});\n}\nfunction flatTokenVariants(merged, variantsOrder, cssVariablePrefix, defaultColor, colorsRendering = \"css-vars\") {\n\tconst token = {\n\t\tcontent: merged.content,\n\t\texplanation: merged.explanation,\n\t\toffset: merged.offset\n\t};\n\tconst styles = variantsOrder.map((t) => getTokenStyleObject(merged.variants[t]));\n\tconst styleKeys = new Set(styles.flatMap((t) => Object.keys(t)));\n\tconst mergedStyles = {};\n\tconst varKey = (idx, key) => {\n\t\tconst keyName = key === \"color\" ? \"\" : key === \"background-color\" ? \"-bg\" : `-${key}`;\n\t\treturn cssVariablePrefix + variantsOrder[idx] + (key === \"color\" ? \"\" : keyName);\n\t};\n\tstyles.forEach((cur, idx) => {\n\t\tfor (const key of styleKeys) {\n\t\t\tconst value = cur[key] || \"inherit\";\n\t\t\tif (idx === 0 && defaultColor && COLOR_KEYS.includes(key)) if (defaultColor === DEFAULT_COLOR_LIGHT_DARK && styles.length > 1) {\n\t\t\t\tconst lightIndex = variantsOrder.findIndex((t) => t === \"light\");\n\t\t\t\tconst darkIndex = variantsOrder.findIndex((t) => t === \"dark\");\n\t\t\t\tif (lightIndex === -1 || darkIndex === -1) throw new ShikiError$1(\"When using `defaultColor: \\\"light-dark()\\\"`, you must provide both `light` and `dark` themes\");\n\t\t\t\tmergedStyles[key] = `light-dark(${styles[lightIndex][key] || \"inherit\"}, ${styles[darkIndex][key] || \"inherit\"})`;\n\t\t\t\tif (colorsRendering === \"css-vars\") mergedStyles[varKey(idx, key)] = value;\n\t\t\t} else mergedStyles[key] = value;\n\t\t\telse if (colorsRendering === \"css-vars\") mergedStyles[varKey(idx, key)] = value;\n\t\t}\n\t});\n\ttoken.htmlStyle = mergedStyles;\n\treturn token;\n}\nfunction getTokenStyleObject(token) {\n\tconst styles = {};\n\tif (token.color) styles.color = token.color;\n\tif (token.bgColor) styles[\"background-color\"] = token.bgColor;\n\tif (token.fontStyle) {\n\t\tif (token.fontStyle & FontStyle.Italic) styles[\"font-style\"] = \"italic\";\n\t\tif (token.fontStyle & FontStyle.Bold) styles[\"font-weight\"] = \"bold\";\n\t\tconst decorations = [];\n\t\tif (token.fontStyle & FontStyle.Underline) decorations.push(\"underline\");\n\t\tif (token.fontStyle & FontStyle.Strikethrough) decorations.push(\"line-through\");\n\t\tif (decorations.length) styles[\"text-decoration\"] = decorations.join(\" \");\n\t}\n\treturn styles;\n}\nfunction stringifyTokenStyle(token) {\n\tif (typeof token === \"string\") return token;\n\treturn Object.entries(token).map(([key, value]) => `${key}:${value}`).join(\";\");\n}\n\n//#endregion\n//#region src/transformer-decorations.ts\n/**\n* A built-in transformer to add decorations to the highlighted code.\n*/\nfunction transformerDecorations() {\n\tconst map = /* @__PURE__ */ new WeakMap();\n\tfunction getContext(shiki) {\n\t\tif (!map.has(shiki.meta)) {\n\t\t\tconst converter = createPositionConverter(shiki.source);\n\t\t\tfunction normalizePosition(p) {\n\t\t\t\tif (typeof p === \"number\") {\n\t\t\t\t\tif (p < 0 || p > shiki.source.length) throw new ShikiError$1(`Invalid decoration offset: ${p}. Code length: ${shiki.source.length}`);\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...converter.indexToPos(p),\n\t\t\t\t\t\toffset: p\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tconst line = converter.lines[p.line];\n\t\t\t\t\tif (line === void 0) throw new ShikiError$1(`Invalid decoration position ${JSON.stringify(p)}. Lines length: ${converter.lines.length}`);\n\t\t\t\t\tlet character = p.character;\n\t\t\t\t\tif (character < 0) character = line.length + character;\n\t\t\t\t\tif (character < 0 || character > line.length) throw new ShikiError$1(`Invalid decoration position ${JSON.stringify(p)}. Line ${p.line} length: ${line.length}`);\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...p,\n\t\t\t\t\t\tcharacter,\n\t\t\t\t\t\toffset: converter.posToIndex(p.line, character)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst decorations = (shiki.options.decorations || []).map((d) => ({\n\t\t\t\t...d,\n\t\t\t\tstart: normalizePosition(d.start),\n\t\t\t\tend: normalizePosition(d.end)\n\t\t\t}));\n\t\t\tverifyIntersections(decorations);\n\t\t\tmap.set(shiki.meta, {\n\t\t\t\tdecorations,\n\t\t\t\tconverter,\n\t\t\t\tsource: shiki.source\n\t\t\t});\n\t\t}\n\t\treturn map.get(shiki.meta);\n\t}\n\treturn {\n\t\tname: \"shiki:decorations\",\n\t\ttokens(tokens) {\n\t\t\tif (!this.options.decorations?.length) return;\n\t\t\treturn splitTokens(tokens, getContext(this).decorations.flatMap((d) => [d.start.offset, d.end.offset]));\n\t\t},\n\t\tcode(codeEl) {\n\t\t\tif (!this.options.decorations?.length) return;\n\t\t\tconst ctx = getContext(this);\n\t\t\tconst lines = Array.from(codeEl.children).filter((i) => i.type === \"element\" && i.tagName === \"span\");\n\t\t\tif (lines.length !== ctx.converter.lines.length) throw new ShikiError$1(`Number of lines in code element (${lines.length}) does not match the number of lines in the source (${ctx.converter.lines.length}). Failed to apply decorations.`);\n\t\t\tfunction applyLineSection(line, start, end, decoration) {\n\t\t\t\tconst lineEl = lines[line];\n\t\t\t\tlet text = \"\";\n\t\t\t\tlet startIndex = -1;\n\t\t\t\tlet endIndex = -1;\n\t\t\t\tif (start === 0) startIndex = 0;\n\t\t\t\tif (end === 0) endIndex = 0;\n\t\t\t\tif (end === Number.POSITIVE_INFINITY) endIndex = lineEl.children.length;\n\t\t\t\tif (startIndex === -1 || endIndex === -1) for (let i = 0; i < lineEl.children.length; i++) {\n\t\t\t\t\ttext += stringify(lineEl.children[i]);\n\t\t\t\t\tif (startIndex === -1 && text.length === start) startIndex = i + 1;\n\t\t\t\t\tif (endIndex === -1 && text.length === end) endIndex = i + 1;\n\t\t\t\t}\n\t\t\t\tif (startIndex === -1) throw new ShikiError$1(`Failed to find start index for decoration ${JSON.stringify(decoration.start)}`);\n\t\t\t\tif (endIndex === -1) throw new ShikiError$1(`Failed to find end index for decoration ${JSON.stringify(decoration.end)}`);\n\t\t\t\tconst children = lineEl.children.slice(startIndex, endIndex);\n\t\t\t\tif (!decoration.alwaysWrap && children.length === lineEl.children.length) applyDecoration(lineEl, decoration, \"line\");\n\t\t\t\telse if (!decoration.alwaysWrap && children.length === 1 && children[0].type === \"element\") applyDecoration(children[0], decoration, \"token\");\n\t\t\t\telse {\n\t\t\t\t\tconst wrapper = {\n\t\t\t\t\t\ttype: \"element\",\n\t\t\t\t\t\ttagName: \"span\",\n\t\t\t\t\t\tproperties: {},\n\t\t\t\t\t\tchildren\n\t\t\t\t\t};\n\t\t\t\t\tapplyDecoration(wrapper, decoration, \"wrapper\");\n\t\t\t\t\tlineEl.children.splice(startIndex, children.length, wrapper);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction applyLine(line, decoration) {\n\t\t\t\tlines[line] = applyDecoration(lines[line], decoration, \"line\");\n\t\t\t}\n\t\t\tfunction applyDecoration(el, decoration, type) {\n\t\t\t\tconst properties = decoration.properties || {};\n\t\t\t\tconst transform = decoration.transform || ((i) => i);\n\t\t\t\tel.tagName = decoration.tagName || \"span\";\n\t\t\t\tel.properties = {\n\t\t\t\t\t...el.properties,\n\t\t\t\t\t...properties,\n\t\t\t\t\tclass: el.properties.class\n\t\t\t\t};\n\t\t\t\tif (decoration.properties?.class) addClassToHast(el, decoration.properties.class);\n\t\t\t\tel = transform(el, type) || el;\n\t\t\t\treturn el;\n\t\t\t}\n\t\t\tconst lineApplies = [];\n\t\t\tconst sorted = ctx.decorations.sort((a, b) => b.start.offset - a.start.offset || a.end.offset - b.end.offset);\n\t\t\tfor (const decoration of sorted) {\n\t\t\t\tconst { start, end } = decoration;\n\t\t\t\tif (start.line === end.line) applyLineSection(start.line, start.character, end.character, decoration);\n\t\t\t\telse if (start.line < end.line) {\n\t\t\t\t\tapplyLineSection(start.line, start.character, Number.POSITIVE_INFINITY, decoration);\n\t\t\t\t\tfor (let i = start.line + 1; i < end.line; i++) lineApplies.unshift(() => applyLine(i, decoration));\n\t\t\t\t\tapplyLineSection(end.line, 0, end.character, decoration);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlineApplies.forEach((i) => i());\n\t\t}\n\t};\n}\nfunction verifyIntersections(items) {\n\tfor (let i = 0; i < items.length; i++) {\n\t\tconst foo = items[i];\n\t\tif (foo.start.offset > foo.end.offset) throw new ShikiError$1(`Invalid decoration range: ${JSON.stringify(foo.start)} - ${JSON.stringify(foo.end)}`);\n\t\tfor (let j = i + 1; j < items.length; j++) {\n\t\t\tconst bar = items[j];\n\t\t\tconst isFooHasBarStart = foo.start.offset <= bar.start.offset && bar.start.offset < foo.end.offset;\n\t\t\tconst isFooHasBarEnd = foo.start.offset < bar.end.offset && bar.end.offset <= foo.end.offset;\n\t\t\tconst isBarHasFooStart = bar.start.offset <= foo.start.offset && foo.start.offset < bar.end.offset;\n\t\t\tconst isBarHasFooEnd = bar.start.offset < foo.end.offset && foo.end.offset <= bar.end.offset;\n\t\t\tif (isFooHasBarStart || isFooHasBarEnd || isBarHasFooStart || isBarHasFooEnd) {\n\t\t\t\tif (isFooHasBarStart && isFooHasBarEnd) continue;\n\t\t\t\tif (isBarHasFooStart && isBarHasFooEnd) continue;\n\t\t\t\tif (isBarHasFooStart && foo.start.offset === foo.end.offset) continue;\n\t\t\t\tif (isFooHasBarEnd && bar.start.offset === bar.end.offset) continue;\n\t\t\t\tthrow new ShikiError$1(`Decorations ${JSON.stringify(foo.start)} and ${JSON.stringify(bar.start)} intersect.`);\n\t\t\t}\n\t\t}\n\t}\n}\nfunction stringify(el) {\n\tif (el.type === \"text\") return el.value;\n\tif (el.type === \"element\") return el.children.map(stringify).join(\"\");\n\treturn \"\";\n}\n\n//#endregion\n//#region src/highlight/_get-transformers.ts\nconst builtInTransformers = [/* @__PURE__ */ transformerDecorations()];\nfunction getTransformers(options) {\n\tconst transformers = sortTransformersByEnforcement(options.transformers || []);\n\treturn [\n\t\t...transformers.pre,\n\t\t...transformers.normal,\n\t\t...transformers.post,\n\t\t...builtInTransformers\n\t];\n}\nfunction sortTransformersByEnforcement(transformers) {\n\tconst pre = [];\n\tconst post = [];\n\tconst normal = [];\n\tfor (const transformer of transformers) switch (transformer.enforce) {\n\t\tcase \"pre\":\n\t\t\tpre.push(transformer);\n\t\t\tbreak;\n\t\tcase \"post\":\n\t\t\tpost.push(transformer);\n\t\t\tbreak;\n\t\tdefault: normal.push(transformer);\n\t}\n\treturn {\n\t\tpre,\n\t\tpost,\n\t\tnormal\n\t};\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/ansi-sequence-parser@1.1.3/node_modules/ansi-sequence-parser/dist/index.js\nvar namedColors = [\n\t\"black\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\",\n\t\"magenta\",\n\t\"cyan\",\n\t\"white\",\n\t\"brightBlack\",\n\t\"brightRed\",\n\t\"brightGreen\",\n\t\"brightYellow\",\n\t\"brightBlue\",\n\t\"brightMagenta\",\n\t\"brightCyan\",\n\t\"brightWhite\"\n];\nvar decorations = {\n\t1: \"bold\",\n\t2: \"dim\",\n\t3: \"italic\",\n\t4: \"underline\",\n\t7: \"reverse\",\n\t8: \"hidden\",\n\t9: \"strikethrough\"\n};\nfunction findSequence(value, position) {\n\tconst nextEscape = value.indexOf(\"\\x1B\", position);\n\tif (nextEscape !== -1) {\n\t\tif (value[nextEscape + 1] === \"[\") {\n\t\t\tconst nextClose = value.indexOf(\"m\", nextEscape);\n\t\t\tif (nextClose !== -1) return {\n\t\t\t\tsequence: value.substring(nextEscape + 2, nextClose).split(\";\"),\n\t\t\t\tstartPosition: nextEscape,\n\t\t\t\tposition: nextClose + 1\n\t\t\t};\n\t\t}\n\t}\n\treturn { position: value.length };\n}\nfunction parseColor(sequence) {\n\tconst colorMode = sequence.shift();\n\tif (colorMode === \"2\") {\n\t\tconst rgb = sequence.splice(0, 3).map((x) => Number.parseInt(x));\n\t\tif (rgb.length !== 3 || rgb.some((x) => Number.isNaN(x))) return;\n\t\treturn {\n\t\t\ttype: \"rgb\",\n\t\t\trgb\n\t\t};\n\t} else if (colorMode === \"5\") {\n\t\tconst index = sequence.shift();\n\t\tif (index) return {\n\t\t\ttype: \"table\",\n\t\t\tindex: Number(index)\n\t\t};\n\t}\n}\nfunction parseSequence(sequence) {\n\tconst commands = [];\n\twhile (sequence.length > 0) {\n\t\tconst code = sequence.shift();\n\t\tif (!code) continue;\n\t\tconst codeInt = Number.parseInt(code);\n\t\tif (Number.isNaN(codeInt)) continue;\n\t\tif (codeInt === 0) commands.push({ type: \"resetAll\" });\n\t\telse if (codeInt <= 9) {\n\t\t\tif (decorations[codeInt]) commands.push({\n\t\t\t\ttype: \"setDecoration\",\n\t\t\t\tvalue: decorations[codeInt]\n\t\t\t});\n\t\t} else if (codeInt <= 29) {\n\t\t\tconst decoration = decorations[codeInt - 20];\n\t\t\tif (decoration) {\n\t\t\t\tcommands.push({\n\t\t\t\t\ttype: \"resetDecoration\",\n\t\t\t\t\tvalue: decoration\n\t\t\t\t});\n\t\t\t\tif (decoration === \"dim\") commands.push({\n\t\t\t\t\ttype: \"resetDecoration\",\n\t\t\t\t\tvalue: \"bold\"\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (codeInt <= 37) commands.push({\n\t\t\ttype: \"setForegroundColor\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"named\",\n\t\t\t\tname: namedColors[codeInt - 30]\n\t\t\t}\n\t\t});\n\t\telse if (codeInt === 38) {\n\t\t\tconst color = parseColor(sequence);\n\t\t\tif (color) commands.push({\n\t\t\t\ttype: \"setForegroundColor\",\n\t\t\t\tvalue: color\n\t\t\t});\n\t\t} else if (codeInt === 39) commands.push({ type: \"resetForegroundColor\" });\n\t\telse if (codeInt <= 47) commands.push({\n\t\t\ttype: \"setBackgroundColor\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"named\",\n\t\t\t\tname: namedColors[codeInt - 40]\n\t\t\t}\n\t\t});\n\t\telse if (codeInt === 48) {\n\t\t\tconst color = parseColor(sequence);\n\t\t\tif (color) commands.push({\n\t\t\t\ttype: \"setBackgroundColor\",\n\t\t\t\tvalue: color\n\t\t\t});\n\t\t} else if (codeInt === 49) commands.push({ type: \"resetBackgroundColor\" });\n\t\telse if (codeInt === 53) commands.push({\n\t\t\ttype: \"setDecoration\",\n\t\t\tvalue: \"overline\"\n\t\t});\n\t\telse if (codeInt === 55) commands.push({\n\t\t\ttype: \"resetDecoration\",\n\t\t\tvalue: \"overline\"\n\t\t});\n\t\telse if (codeInt >= 90 && codeInt <= 97) commands.push({\n\t\t\ttype: \"setForegroundColor\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"named\",\n\t\t\t\tname: namedColors[codeInt - 90 + 8]\n\t\t\t}\n\t\t});\n\t\telse if (codeInt >= 100 && codeInt <= 107) commands.push({\n\t\t\ttype: \"setBackgroundColor\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"named\",\n\t\t\t\tname: namedColors[codeInt - 100 + 8]\n\t\t\t}\n\t\t});\n\t}\n\treturn commands;\n}\nfunction createAnsiSequenceParser() {\n\tlet foreground = null;\n\tlet background = null;\n\tlet decorations2 = /* @__PURE__ */ new Set();\n\treturn { parse(value) {\n\t\tconst tokens = [];\n\t\tlet position = 0;\n\t\tdo {\n\t\t\tconst findResult = findSequence(value, position);\n\t\t\tconst text = findResult.sequence ? value.substring(position, findResult.startPosition) : value.substring(position);\n\t\t\tif (text.length > 0) tokens.push({\n\t\t\t\tvalue: text,\n\t\t\t\tforeground,\n\t\t\t\tbackground,\n\t\t\t\tdecorations: new Set(decorations2)\n\t\t\t});\n\t\t\tif (findResult.sequence) {\n\t\t\t\tconst commands = parseSequence(findResult.sequence);\n\t\t\t\tfor (const styleToken of commands) if (styleToken.type === \"resetAll\") {\n\t\t\t\t\tforeground = null;\n\t\t\t\t\tbackground = null;\n\t\t\t\t\tdecorations2.clear();\n\t\t\t\t} else if (styleToken.type === \"resetForegroundColor\") foreground = null;\n\t\t\t\telse if (styleToken.type === \"resetBackgroundColor\") background = null;\n\t\t\t\telse if (styleToken.type === \"resetDecoration\") decorations2.delete(styleToken.value);\n\t\t\t\tfor (const styleToken of commands) if (styleToken.type === \"setForegroundColor\") foreground = styleToken.value;\n\t\t\t\telse if (styleToken.type === \"setBackgroundColor\") background = styleToken.value;\n\t\t\t\telse if (styleToken.type === \"setDecoration\") decorations2.add(styleToken.value);\n\t\t\t}\n\t\t\tposition = findResult.position;\n\t\t} while (position < value.length);\n\t\treturn tokens;\n\t} };\n}\nvar defaultNamedColorsMap = {\n\tblack: \"#000000\",\n\tred: \"#bb0000\",\n\tgreen: \"#00bb00\",\n\tyellow: \"#bbbb00\",\n\tblue: \"#0000bb\",\n\tmagenta: \"#ff00ff\",\n\tcyan: \"#00bbbb\",\n\twhite: \"#eeeeee\",\n\tbrightBlack: \"#555555\",\n\tbrightRed: \"#ff5555\",\n\tbrightGreen: \"#00ff00\",\n\tbrightYellow: \"#ffff55\",\n\tbrightBlue: \"#5555ff\",\n\tbrightMagenta: \"#ff55ff\",\n\tbrightCyan: \"#55ffff\",\n\tbrightWhite: \"#ffffff\"\n};\nfunction createColorPalette(namedColorsMap = defaultNamedColorsMap) {\n\tfunction namedColor(name) {\n\t\treturn namedColorsMap[name];\n\t}\n\tfunction rgbColor(rgb) {\n\t\treturn `#${rgb.map((x) => Math.max(0, Math.min(x, 255)).toString(16).padStart(2, \"0\")).join(\"\")}`;\n\t}\n\tlet colorTable;\n\tfunction getColorTable() {\n\t\tif (colorTable) return colorTable;\n\t\tcolorTable = [];\n\t\tfor (let i = 0; i < namedColors.length; i++) colorTable.push(namedColor(namedColors[i]));\n\t\tlet levels = [\n\t\t\t0,\n\t\t\t95,\n\t\t\t135,\n\t\t\t175,\n\t\t\t215,\n\t\t\t255\n\t\t];\n\t\tfor (let r = 0; r < 6; r++) for (let g = 0; g < 6; g++) for (let b = 0; b < 6; b++) colorTable.push(rgbColor([\n\t\t\tlevels[r],\n\t\t\tlevels[g],\n\t\t\tlevels[b]\n\t\t]));\n\t\tlet level = 8;\n\t\tfor (let i = 0; i < 24; i++, level += 10) colorTable.push(rgbColor([\n\t\t\tlevel,\n\t\t\tlevel,\n\t\t\tlevel\n\t\t]));\n\t\treturn colorTable;\n\t}\n\tfunction tableColor(index) {\n\t\treturn getColorTable()[index];\n\t}\n\tfunction value(color) {\n\t\tswitch (color.type) {\n\t\t\tcase \"named\": return namedColor(color.name);\n\t\t\tcase \"rgb\": return rgbColor(color.rgb);\n\t\t\tcase \"table\": return tableColor(color.index);\n\t\t}\n\t}\n\treturn { value };\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens-ansi.ts\n/**\n* Default ANSI palette (VSCode compatible fallbacks)\n* Used when the theme does not define terminal.ansi* colors.\n*/\nconst defaultAnsiColors = {\n\tblack: \"#000000\",\n\tred: \"#cd3131\",\n\tgreen: \"#0DBC79\",\n\tyellow: \"#E5E510\",\n\tblue: \"#2472C8\",\n\tmagenta: \"#BC3FBC\",\n\tcyan: \"#11A8CD\",\n\twhite: \"#E5E5E5\",\n\tbrightBlack: \"#666666\",\n\tbrightRed: \"#F14C4C\",\n\tbrightGreen: \"#23D18B\",\n\tbrightYellow: \"#F5F543\",\n\tbrightBlue: \"#3B8EEA\",\n\tbrightMagenta: \"#D670D6\",\n\tbrightCyan: \"#29B8DB\",\n\tbrightWhite: \"#FFFFFF\"\n};\nfunction tokenizeAnsiWithTheme(theme, fileContents, options) {\n\tconst colorReplacements = resolveColorReplacements(theme, options);\n\tconst lines = splitLines(fileContents);\n\tconst colorPalette = createColorPalette(Object.fromEntries(namedColors.map((name) => {\n\t\tconst key = `terminal.ansi${name[0].toUpperCase()}${name.substring(1)}`;\n\t\treturn [name, theme.colors?.[key] || defaultAnsiColors[name]];\n\t})));\n\tconst parser = createAnsiSequenceParser();\n\treturn lines.map((line) => parser.parse(line[0]).map((token) => {\n\t\tlet color;\n\t\tlet bgColor;\n\t\tif (token.decorations.has(\"reverse\")) {\n\t\t\tcolor = token.background ? colorPalette.value(token.background) : theme.bg;\n\t\t\tbgColor = token.foreground ? colorPalette.value(token.foreground) : theme.fg;\n\t\t} else {\n\t\t\tcolor = token.foreground ? colorPalette.value(token.foreground) : theme.fg;\n\t\t\tbgColor = token.background ? colorPalette.value(token.background) : void 0;\n\t\t}\n\t\tcolor = applyColorReplacements(color, colorReplacements);\n\t\tbgColor = applyColorReplacements(bgColor, colorReplacements);\n\t\tif (token.decorations.has(\"dim\")) color = dimColor(color);\n\t\tlet fontStyle = FontStyle.None;\n\t\tif (token.decorations.has(\"bold\")) fontStyle |= FontStyle.Bold;\n\t\tif (token.decorations.has(\"italic\")) fontStyle |= FontStyle.Italic;\n\t\tif (token.decorations.has(\"underline\")) fontStyle |= FontStyle.Underline;\n\t\tif (token.decorations.has(\"strikethrough\")) fontStyle |= FontStyle.Strikethrough;\n\t\treturn {\n\t\t\tcontent: token.value,\n\t\t\toffset: line[1],\n\t\t\tcolor,\n\t\t\tbgColor,\n\t\t\tfontStyle\n\t\t};\n\t}));\n}\n/**\n* Adds 50% alpha to a hex color string or the \"-dim\" postfix to a CSS variable\n*/\nfunction dimColor(color) {\n\tconst hexMatch = color.match(/#([0-9a-f]{3,8})/i);\n\tif (hexMatch) {\n\t\tconst hex = hexMatch[1];\n\t\tif (hex.length === 8) {\n\t\t\tconst alpha = Math.round(Number.parseInt(hex.slice(6, 8), 16) / 2).toString(16).padStart(2, \"0\");\n\t\t\treturn `#${hex.slice(0, 6)}${alpha}`;\n\t\t} else if (hex.length === 6) return `#${hex}80`;\n\t\telse if (hex.length === 4) {\n\t\t\tconst r = hex[0];\n\t\t\tconst g = hex[1];\n\t\t\tconst b = hex[2];\n\t\t\tconst a = hex[3];\n\t\t\treturn `#${r}${r}${g}${g}${b}${b}${Math.round(Number.parseInt(`${a}${a}`, 16) / 2).toString(16).padStart(2, \"0\")}`;\n\t\t} else if (hex.length === 3) {\n\t\t\tconst r = hex[0];\n\t\t\tconst g = hex[1];\n\t\t\tconst b = hex[2];\n\t\t\treturn `#${r}${r}${g}${g}${b}${b}80`;\n\t\t}\n\t}\n\tconst cssVarMatch = color.match(/var\\((--[\\w-]+-ansi-[\\w-]+)\\)/);\n\tif (cssVarMatch) return `var(${cssVarMatch[1]}-dim)`;\n\treturn color;\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens-base.ts\n/**\n* Code to tokens, with a simple theme.\n* This wraps the tokenizer's implementation to add ANSI support.\n*/\nfunction codeToTokensBase(primitive, code, options = {}) {\n\tconst lang = primitive.resolveLangAlias(options.lang || \"text\");\n\tconst { theme: themeName = primitive.getLoadedThemes()[0] } = options;\n\tif (!isPlainLang(lang) && !isNoneTheme(themeName) && lang === \"ansi\") {\n\t\tconst { theme } = primitive.setTheme(themeName);\n\t\treturn tokenizeAnsiWithTheme(theme, code, options);\n\t}\n\treturn codeToTokensBase$1(primitive, code, options);\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens.ts\n/**\n* High-level code-to-tokens API.\n*\n* It will use `codeToTokensWithThemes` or `codeToTokensBase` based on the options.\n*/\nfunction codeToTokens(primitive, code, options) {\n\tlet bg;\n\tlet fg;\n\tlet tokens;\n\tlet themeName;\n\tlet rootStyle;\n\tlet grammarState;\n\tif (\"themes\" in options) {\n\t\tconst { defaultColor = \"light\", cssVariablePrefix = \"--shiki-\", colorsRendering = \"css-vars\" } = options;\n\t\tconst themes = Object.entries(options.themes).filter((i) => i[1]).map((i) => ({\n\t\t\tcolor: i[0],\n\t\t\ttheme: i[1]\n\t\t})).sort((a, b) => a.color === defaultColor ? -1 : b.color === defaultColor ? 1 : 0);\n\t\tif (themes.length === 0) throw new ShikiError$1(\"`themes` option must not be empty\");\n\t\tconst themeTokens = codeToTokensWithThemes$1(primitive, code, options, codeToTokensBase);\n\t\tgrammarState = getLastGrammarStateFromMap(themeTokens);\n\t\tif (defaultColor && DEFAULT_COLOR_LIGHT_DARK !== defaultColor && !themes.find((t) => t.color === defaultColor)) throw new ShikiError$1(`\\`themes\\` option must contain the defaultColor key \\`${defaultColor}\\``);\n\t\tconst themeRegs = themes.map((t) => primitive.getTheme(t.theme));\n\t\tconst themesOrder = themes.map((t) => t.color);\n\t\ttokens = themeTokens.map((line) => line.map((token) => flatTokenVariants(token, themesOrder, cssVariablePrefix, defaultColor, colorsRendering)));\n\t\tif (grammarState) setLastGrammarStateToMap(tokens, grammarState);\n\t\tconst themeColorReplacements = themes.map((t) => resolveColorReplacements(t.theme, options));\n\t\tfg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, \"fg\", colorsRendering);\n\t\tbg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, \"bg\", colorsRendering);\n\t\tthemeName = `shiki-themes ${themeRegs.map((t) => t.name).join(\" \")}`;\n\t\trootStyle = defaultColor ? void 0 : [fg, bg].join(\";\");\n\t} else if (\"theme\" in options) {\n\t\tconst colorReplacements = resolveColorReplacements(options.theme, options);\n\t\ttokens = codeToTokensBase(primitive, code, options);\n\t\tconst _theme = primitive.getTheme(options.theme);\n\t\tbg = applyColorReplacements(_theme.bg, colorReplacements);\n\t\tfg = applyColorReplacements(_theme.fg, colorReplacements);\n\t\tthemeName = _theme.name;\n\t\tgrammarState = getLastGrammarStateFromMap(tokens);\n\t} else throw new ShikiError$1(\"Invalid options, either `theme` or `themes` must be provided\");\n\treturn {\n\t\ttokens,\n\t\tfg,\n\t\tbg,\n\t\tthemeName,\n\t\trootStyle,\n\t\tgrammarState\n\t};\n}\nfunction mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, property, colorsRendering) {\n\treturn themes.map((t, idx) => {\n\t\tconst value = applyColorReplacements(themeRegs[idx][property], themeColorReplacements[idx]) || \"inherit\";\n\t\tconst cssVar = `${cssVariablePrefix + t.color}${property === \"bg\" ? \"-bg\" : \"\"}:${value}`;\n\t\tif (idx === 0 && defaultColor) {\n\t\t\tif (defaultColor === DEFAULT_COLOR_LIGHT_DARK && themes.length > 1) {\n\t\t\t\tconst lightIndex = themes.findIndex((t) => t.color === \"light\");\n\t\t\t\tconst darkIndex = themes.findIndex((t) => t.color === \"dark\");\n\t\t\t\tif (lightIndex === -1 || darkIndex === -1) throw new ShikiError$1(\"When using `defaultColor: \\\"light-dark()\\\"`, you must provide both `light` and `dark` themes\");\n\t\t\t\treturn `light-dark(${applyColorReplacements(themeRegs[lightIndex][property], themeColorReplacements[lightIndex]) || \"inherit\"}, ${applyColorReplacements(themeRegs[darkIndex][property], themeColorReplacements[darkIndex]) || \"inherit\"});${cssVar}`;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tif (colorsRendering === \"css-vars\") return cssVar;\n\t\treturn null;\n\t}).filter((i) => !!i).join(\";\");\n}\n\n//#endregion\n//#region src/highlight/code-to-hast.ts\nfunction codeToHast(primitive, code, options, transformerContext = {\n\tmeta: {},\n\toptions,\n\tcodeToHast: (_code, _options) => codeToHast(primitive, _code, _options),\n\tcodeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)\n}) {\n\tlet input = code;\n\tfor (const transformer of getTransformers(options)) input = transformer.preprocess?.call(transformerContext, input, options) || input;\n\tlet { tokens, fg, bg, themeName, rootStyle, grammarState } = codeToTokens(primitive, input, options);\n\tconst { mergeWhitespaces = true, mergeSameStyleTokens = false } = options;\n\tif (mergeWhitespaces === true) tokens = mergeWhitespaceTokens(tokens);\n\telse if (mergeWhitespaces === \"never\") tokens = splitWhitespaceTokens(tokens);\n\tif (mergeSameStyleTokens) tokens = mergeAdjacentStyledTokens(tokens);\n\tconst contextSource = {\n\t\t...transformerContext,\n\t\tget source() {\n\t\t\treturn input;\n\t\t}\n\t};\n\tfor (const transformer of getTransformers(options)) tokens = transformer.tokens?.call(contextSource, tokens) || tokens;\n\treturn tokensToHast(tokens, {\n\t\t...options,\n\t\tfg,\n\t\tbg,\n\t\tthemeName,\n\t\trootStyle: options.rootStyle === false ? false : options.rootStyle ?? rootStyle\n\t}, contextSource, grammarState);\n}\nfunction tokensToHast(tokens, options, transformerContext, grammarState = getLastGrammarStateFromMap(tokens)) {\n\tconst transformers = getTransformers(options);\n\tconst lines = [];\n\tconst root = {\n\t\ttype: \"root\",\n\t\tchildren: []\n\t};\n\tconst { structure = \"classic\", tabindex = \"0\" } = options;\n\tconst properties = { class: `shiki ${options.themeName || \"\"}` };\n\tif (options.rootStyle !== false) if (options.rootStyle != null) properties.style = options.rootStyle;\n\telse properties.style = `background-color:${options.bg};color:${options.fg}`;\n\tif (tabindex !== false && tabindex != null) properties.tabindex = tabindex.toString();\n\tfor (const [key, value] of Object.entries(options.meta || {})) if (!key.startsWith(\"_\")) properties[key] = value;\n\tlet preNode = {\n\t\ttype: \"element\",\n\t\ttagName: \"pre\",\n\t\tproperties,\n\t\tchildren: [],\n\t\tdata: options.data\n\t};\n\tlet codeNode = {\n\t\ttype: \"element\",\n\t\ttagName: \"code\",\n\t\tproperties: {},\n\t\tchildren: lines\n\t};\n\tconst lineNodes = [];\n\tconst context = {\n\t\t...transformerContext,\n\t\tstructure,\n\t\taddClassToHast,\n\t\tget source() {\n\t\t\treturn transformerContext.source;\n\t\t},\n\t\tget tokens() {\n\t\t\treturn tokens;\n\t\t},\n\t\tget options() {\n\t\t\treturn options;\n\t\t},\n\t\tget root() {\n\t\t\treturn root;\n\t\t},\n\t\tget pre() {\n\t\t\treturn preNode;\n\t\t},\n\t\tget code() {\n\t\t\treturn codeNode;\n\t\t},\n\t\tget lines() {\n\t\t\treturn lineNodes;\n\t\t}\n\t};\n\ttokens.forEach((line, idx) => {\n\t\tif (idx) {\n\t\t\tif (structure === \"inline\") root.children.push({\n\t\t\t\ttype: \"element\",\n\t\t\t\ttagName: \"br\",\n\t\t\t\tproperties: {},\n\t\t\t\tchildren: []\n\t\t\t});\n\t\t\telse if (structure === \"classic\") lines.push({\n\t\t\t\ttype: \"text\",\n\t\t\t\tvalue: \"\\n\"\n\t\t\t});\n\t\t}\n\t\tlet lineNode = {\n\t\t\ttype: \"element\",\n\t\t\ttagName: \"span\",\n\t\t\tproperties: { class: \"line\" },\n\t\t\tchildren: []\n\t\t};\n\t\tlet col = 0;\n\t\tfor (const token of line) {\n\t\t\tlet tokenNode = {\n\t\t\t\ttype: \"element\",\n\t\t\t\ttagName: \"span\",\n\t\t\t\tproperties: { ...token.htmlAttrs },\n\t\t\t\tchildren: [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\tvalue: token.content\n\t\t\t\t}]\n\t\t\t};\n\t\t\tconst style = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));\n\t\t\tif (style) tokenNode.properties.style = style;\n\t\t\tfor (const transformer of transformers) tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode, token) || tokenNode;\n\t\t\tif (structure === \"inline\") root.children.push(tokenNode);\n\t\t\telse if (structure === \"classic\") lineNode.children.push(tokenNode);\n\t\t\tcol += token.content.length;\n\t\t}\n\t\tif (structure === \"classic\") {\n\t\t\tfor (const transformer of transformers) lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode;\n\t\t\tlineNodes.push(lineNode);\n\t\t\tlines.push(lineNode);\n\t\t} else if (structure === \"inline\") lineNodes.push(lineNode);\n\t});\n\tif (structure === \"classic\") {\n\t\tfor (const transformer of transformers) codeNode = transformer?.code?.call(context, codeNode) || codeNode;\n\t\tpreNode.children.push(codeNode);\n\t\tfor (const transformer of transformers) preNode = transformer?.pre?.call(context, preNode) || preNode;\n\t\troot.children.push(preNode);\n\t} else if (structure === \"inline\") {\n\t\tconst syntheticLines = [];\n\t\tlet currentLine = {\n\t\t\ttype: \"element\",\n\t\t\ttagName: \"span\",\n\t\t\tproperties: { class: \"line\" },\n\t\t\tchildren: []\n\t\t};\n\t\tfor (const child of root.children) if (child.type === \"element\" && child.tagName === \"br\") {\n\t\t\tsyntheticLines.push(currentLine);\n\t\t\tcurrentLine = {\n\t\t\t\ttype: \"element\",\n\t\t\t\ttagName: \"span\",\n\t\t\t\tproperties: { class: \"line\" },\n\t\t\t\tchildren: []\n\t\t\t};\n\t\t} else if (child.type === \"element\" || child.type === \"text\") currentLine.children.push(child);\n\t\tsyntheticLines.push(currentLine);\n\t\tlet transformedCode = {\n\t\t\ttype: \"element\",\n\t\t\ttagName: \"code\",\n\t\t\tproperties: {},\n\t\t\tchildren: syntheticLines\n\t\t};\n\t\tfor (const transformer of transformers) transformedCode = transformer?.code?.call(context, transformedCode) || transformedCode;\n\t\troot.children = [];\n\t\tfor (let i = 0; i < transformedCode.children.length; i++) {\n\t\t\tif (i > 0) root.children.push({\n\t\t\t\ttype: \"element\",\n\t\t\t\ttagName: \"br\",\n\t\t\t\tproperties: {},\n\t\t\t\tchildren: []\n\t\t\t});\n\t\t\tconst line = transformedCode.children[i];\n\t\t\tif (line.type === \"element\") root.children.push(...line.children);\n\t\t}\n\t}\n\tlet result = root;\n\tfor (const transformer of transformers) result = transformer?.root?.call(context, result) || result;\n\tif (grammarState) setLastGrammarStateToMap(result, grammarState);\n\treturn result;\n}\nfunction mergeWhitespaceTokens(tokens) {\n\treturn tokens.map((line) => {\n\t\tconst newLine = [];\n\t\tlet carryOnContent = \"\";\n\t\tlet firstOffset;\n\t\tline.forEach((token, idx) => {\n\t\t\tconst couldMerge = !(token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough));\n\t\t\tif (couldMerge && token.content.match(/^\\s+$/) && line[idx + 1]) {\n\t\t\t\tif (firstOffset === void 0) firstOffset = token.offset;\n\t\t\t\tcarryOnContent += token.content;\n\t\t\t} else if (carryOnContent) {\n\t\t\t\tif (couldMerge) newLine.push({\n\t\t\t\t\t...token,\n\t\t\t\t\toffset: firstOffset,\n\t\t\t\t\tcontent: carryOnContent + token.content\n\t\t\t\t});\n\t\t\t\telse newLine.push({\n\t\t\t\t\tcontent: carryOnContent,\n\t\t\t\t\toffset: firstOffset\n\t\t\t\t}, token);\n\t\t\t\tfirstOffset = void 0;\n\t\t\t\tcarryOnContent = \"\";\n\t\t\t} else newLine.push(token);\n\t\t});\n\t\treturn newLine;\n\t});\n}\nfunction splitWhitespaceTokens(tokens) {\n\treturn tokens.map((line) => {\n\t\treturn line.flatMap((token) => {\n\t\t\tif (token.content.match(/^\\s+$/)) return token;\n\t\t\tconst match = token.content.match(/^(\\s*)(.*?)(\\s*)$/);\n\t\t\tif (!match) return token;\n\t\t\tconst [, leading, content, trailing] = match;\n\t\t\tif (!leading && !trailing) return token;\n\t\t\tconst expanded = [{\n\t\t\t\t...token,\n\t\t\t\toffset: token.offset + leading.length,\n\t\t\t\tcontent\n\t\t\t}];\n\t\t\tif (leading) expanded.unshift({\n\t\t\t\tcontent: leading,\n\t\t\t\toffset: token.offset\n\t\t\t});\n\t\t\tif (trailing) expanded.push({\n\t\t\t\tcontent: trailing,\n\t\t\t\toffset: token.offset + leading.length + content.length\n\t\t\t});\n\t\t\treturn expanded;\n\t\t});\n\t});\n}\nfunction mergeAdjacentStyledTokens(tokens) {\n\treturn tokens.map((line) => {\n\t\tconst newLine = [];\n\t\tfor (const token of line) {\n\t\t\tif (newLine.length === 0) {\n\t\t\t\tnewLine.push({ ...token });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst prevToken = newLine[newLine.length - 1];\n\t\t\tconst prevStyle = stringifyTokenStyle(prevToken.htmlStyle || getTokenStyleObject(prevToken));\n\t\t\tconst currentStyle = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));\n\t\t\tconst isPrevDecorated = prevToken.fontStyle && (prevToken.fontStyle & FontStyle.Underline || prevToken.fontStyle & FontStyle.Strikethrough);\n\t\t\tconst isDecorated = token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough);\n\t\t\tif (!isPrevDecorated && !isDecorated && prevStyle === currentStyle) prevToken.content += token.content;\n\t\t\telse newLine.push({ ...token });\n\t\t}\n\t\treturn newLine;\n\t});\n}\n\n//#endregion\n//#region src/highlight/code-to-html.ts\nconst hastToHtml = toHtml;\n/**\n* Get highlighted code in HTML.\n*/\nfunction codeToHtml(primitive, code, options) {\n\tconst context = {\n\t\tmeta: {},\n\t\toptions,\n\t\tcodeToHast: (_code, _options) => codeToHast(primitive, _code, _options),\n\t\tcodeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)\n\t};\n\tlet result = hastToHtml(codeToHast(primitive, code, options, context));\n\tfor (const transformer of getTransformers(options)) result = transformer.postprocess?.call(context, result, options) || result;\n\treturn result;\n}\n\n//#endregion\n//#region src/constructors/highlighter.ts\n/**\n* Create a Shiki core highlighter instance, with no languages or themes bundled.\n* Wasm and each language and theme must be loaded manually.\n*\n* @see http://shiki.style/guide/bundles#fine-grained-bundle\n*/\nasync function createHighlighterCore(options) {\n\tconst primitive = await createShikiPrimitiveAsync$1(options);\n\treturn {\n\t\tgetLastGrammarState: (...args) => getLastGrammarState(primitive, ...args),\n\t\tcodeToTokensBase: (code, options) => codeToTokensBase(primitive, code, options),\n\t\tcodeToTokensWithThemes: (code, options) => codeToTokensWithThemes$1(primitive, code, options),\n\t\tcodeToTokens: (code, options) => codeToTokens(primitive, code, options),\n\t\tcodeToHast: (code, options) => codeToHast(primitive, code, options),\n\t\tcodeToHtml: (code, options) => codeToHtml(primitive, code, options),\n\t\tgetBundledLanguages: () => ({}),\n\t\tgetBundledThemes: () => ({}),\n\t\t...primitive,\n\t\tgetInternalContext: () => primitive\n\t};\n}\n/**\n* Create a Shiki core highlighter instance, with no languages or themes bundled.\n* Wasm and each language and theme must be loaded manually.\n*\n* Synchronous version of `createHighlighterCore`, which requires to provide the engine and all themes and languages upfront.\n*\n* @see http://shiki.style/guide/bundles#fine-grained-bundle\n*/\nfunction createHighlighterCoreSync(options) {\n\tconst internal = createShikiPrimitive$1(options);\n\treturn {\n\t\tgetLastGrammarState: (...args) => getLastGrammarState(internal, ...args),\n\t\tcodeToTokensBase: (code, options) => codeToTokensBase(internal, code, options),\n\t\tcodeToTokensWithThemes: (code, options) => codeToTokensWithThemes$1(internal, code, options),\n\t\tcodeToTokens: (code, options) => codeToTokens(internal, code, options),\n\t\tcodeToHast: (code, options) => codeToHast(internal, code, options),\n\t\tcodeToHtml: (code, options) => codeToHtml(internal, code, options),\n\t\tgetBundledLanguages: () => ({}),\n\t\tgetBundledThemes: () => ({}),\n\t\t...internal,\n\t\tgetInternalContext: () => internal\n\t};\n}\nfunction makeSingletonHighlighterCore(createHighlighter) {\n\tlet _shiki;\n\tasync function getSingletonHighlighterCore(options) {\n\t\tif (!_shiki) {\n\t\t\t_shiki = createHighlighter({\n\t\t\t\t...options,\n\t\t\t\tthemes: options.themes || [],\n\t\t\t\tlangs: options.langs || []\n\t\t\t});\n\t\t\treturn _shiki;\n\t\t} else {\n\t\t\tconst s = await _shiki;\n\t\t\tawait Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);\n\t\t\treturn s;\n\t\t}\n\t}\n\treturn getSingletonHighlighterCore;\n}\nconst getSingletonHighlighterCore = /* @__PURE__ */ makeSingletonHighlighterCore(createHighlighterCore);\n\n//#endregion\n//#region src/constructors/bundle-factory.ts\nfunction createBundledHighlighter(options) {\n\tconst bundledLanguages = options.langs;\n\tconst bundledThemes = options.themes;\n\tconst engine = options.engine;\n\tasync function createHighlighter(options) {\n\t\tfunction resolveLang(lang) {\n\t\t\tif (typeof lang === \"string\") {\n\t\t\t\tlang = options.langAlias?.[lang] || lang;\n\t\t\t\tif (isSpecialLang(lang)) return [];\n\t\t\t\tconst bundle = bundledLanguages[lang];\n\t\t\t\tif (!bundle) throw new ShikiError$1(`Language \\`${lang}\\` is not included in this bundle. You may want to load it from external source.`);\n\t\t\t\treturn bundle;\n\t\t\t}\n\t\t\treturn lang;\n\t\t}\n\t\tfunction resolveTheme(theme) {\n\t\t\tif (isSpecialTheme(theme)) return \"none\";\n\t\t\tif (typeof theme === \"string\") {\n\t\t\t\tconst bundle = bundledThemes[theme];\n\t\t\t\tif (!bundle) throw new ShikiError$1(`Theme \\`${theme}\\` is not included in this bundle. You may want to load it from external source.`);\n\t\t\t\treturn bundle;\n\t\t\t}\n\t\t\treturn theme;\n\t\t}\n\t\tconst _themes = (options.themes ?? []).map((i) => resolveTheme(i));\n\t\tconst langs = (options.langs ?? []).map((i) => resolveLang(i));\n\t\tconst core = await createHighlighterCore({\n\t\t\tengine: options.engine ?? engine(),\n\t\t\t...options,\n\t\t\tthemes: _themes,\n\t\t\tlangs\n\t\t});\n\t\treturn {\n\t\t\t...core,\n\t\t\tloadLanguage(...langs) {\n\t\t\t\treturn core.loadLanguage(...langs.map(resolveLang));\n\t\t\t},\n\t\t\tloadTheme(...themes) {\n\t\t\t\treturn core.loadTheme(...themes.map(resolveTheme));\n\t\t\t},\n\t\t\tgetBundledLanguages() {\n\t\t\t\treturn bundledLanguages;\n\t\t\t},\n\t\t\tgetBundledThemes() {\n\t\t\t\treturn bundledThemes;\n\t\t\t}\n\t\t};\n\t}\n\treturn createHighlighter;\n}\nfunction makeSingletonHighlighter(createHighlighter) {\n\tlet _shiki;\n\tasync function getSingletonHighlighter(options = {}) {\n\t\tif (!_shiki) {\n\t\t\t_shiki = createHighlighter({\n\t\t\t\t...options,\n\t\t\t\tthemes: [],\n\t\t\t\tlangs: []\n\t\t\t});\n\t\t\tconst s = await _shiki;\n\t\t\tawait Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);\n\t\t\treturn s;\n\t\t} else {\n\t\t\tconst s = await _shiki;\n\t\t\tawait Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);\n\t\t\treturn s;\n\t\t}\n\t}\n\treturn getSingletonHighlighter;\n}\nfunction createSingletonShorthands(createHighlighter, config) {\n\tconst getSingletonHighlighter = makeSingletonHighlighter(createHighlighter);\n\tasync function get(code, options) {\n\t\tconst shiki = await getSingletonHighlighter({\n\t\t\tlangs: [options.lang],\n\t\t\tthemes: \"theme\" in options ? [options.theme] : Object.values(options.themes)\n\t\t});\n\t\tconst langs = await config?.guessEmbeddedLanguages?.(code, options.lang, shiki);\n\t\tif (langs) await shiki.loadLanguage(...langs);\n\t\treturn shiki;\n\t}\n\treturn {\n\t\tgetSingletonHighlighter(options) {\n\t\t\treturn getSingletonHighlighter(options);\n\t\t},\n\t\tasync codeToHtml(code, options) {\n\t\t\treturn (await get(code, options)).codeToHtml(code, options);\n\t\t},\n\t\tasync codeToHast(code, options) {\n\t\t\treturn (await get(code, options)).codeToHast(code, options);\n\t\t},\n\t\tasync codeToTokens(code, options) {\n\t\t\treturn (await get(code, options)).codeToTokens(code, options);\n\t\t},\n\t\tasync codeToTokensBase(code, options) {\n\t\t\treturn (await get(code, options)).codeToTokensBase(code, options);\n\t\t},\n\t\tasync codeToTokensWithThemes(code, options) {\n\t\t\treturn (await get(code, options)).codeToTokensWithThemes(code, options);\n\t\t},\n\t\tasync getLastGrammarState(code, options) {\n\t\t\treturn (await getSingletonHighlighter({\n\t\t\t\tlangs: [options.lang],\n\t\t\t\tthemes: [options.theme]\n\t\t\t})).getLastGrammarState(code, options);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region src/theme-css-variables.ts\n/**\n* A factory function to create a css-variable-based theme\n*\n* @see https://shiki.style/guide/theme-colors#css-variables-theme\n*/\nfunction createCssVariablesTheme(options = {}) {\n\tconst { name = \"css-variables\", variablePrefix = \"--shiki-\", fontStyle = true } = options;\n\tconst variable = (name) => {\n\t\tif (options.variableDefaults?.[name]) return `var(${variablePrefix}${name}, ${options.variableDefaults[name]})`;\n\t\treturn `var(${variablePrefix}${name})`;\n\t};\n\tconst theme = {\n\t\tname,\n\t\ttype: \"dark\",\n\t\tcolors: {\n\t\t\t\"editor.foreground\": variable(\"foreground\"),\n\t\t\t\"editor.background\": variable(\"background\"),\n\t\t\t\"terminal.ansiBlack\": variable(\"ansi-black\"),\n\t\t\t\"terminal.ansiRed\": variable(\"ansi-red\"),\n\t\t\t\"terminal.ansiGreen\": variable(\"ansi-green\"),\n\t\t\t\"terminal.ansiYellow\": variable(\"ansi-yellow\"),\n\t\t\t\"terminal.ansiBlue\": variable(\"ansi-blue\"),\n\t\t\t\"terminal.ansiMagenta\": variable(\"ansi-magenta\"),\n\t\t\t\"terminal.ansiCyan\": variable(\"ansi-cyan\"),\n\t\t\t\"terminal.ansiWhite\": variable(\"ansi-white\"),\n\t\t\t\"terminal.ansiBrightBlack\": variable(\"ansi-bright-black\"),\n\t\t\t\"terminal.ansiBrightRed\": variable(\"ansi-bright-red\"),\n\t\t\t\"terminal.ansiBrightGreen\": variable(\"ansi-bright-green\"),\n\t\t\t\"terminal.ansiBrightYellow\": variable(\"ansi-bright-yellow\"),\n\t\t\t\"terminal.ansiBrightBlue\": variable(\"ansi-bright-blue\"),\n\t\t\t\"terminal.ansiBrightMagenta\": variable(\"ansi-bright-magenta\"),\n\t\t\t\"terminal.ansiBrightCyan\": variable(\"ansi-bright-cyan\"),\n\t\t\t\"terminal.ansiBrightWhite\": variable(\"ansi-bright-white\")\n\t\t},\n\t\ttokenColors: [\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"keyword.operator.accessor\",\n\t\t\t\t\t\"meta.group.braces.round.function.arguments\",\n\t\t\t\t\t\"meta.template.expression\",\n\t\t\t\t\t\"markup.fenced_code meta.embedded.block\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"foreground\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: \"emphasis\",\n\t\t\t\tsettings: { fontStyle: \"italic\" }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"strong\",\n\t\t\t\t\t\"markup.heading.markdown\",\n\t\t\t\t\t\"markup.bold.markdown\"\n\t\t\t\t],\n\t\t\t\tsettings: { fontStyle: \"bold\" }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"markup.italic.markdown\"],\n\t\t\t\tsettings: { fontStyle: \"italic\" }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: \"meta.link.inline.markdown\",\n\t\t\t\tsettings: {\n\t\t\t\t\tfontStyle: \"underline\",\n\t\t\t\t\tforeground: variable(\"token-link\")\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"string\",\n\t\t\t\t\t\"markup.fenced_code\",\n\t\t\t\t\t\"markup.inline\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-string\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"comment\", \"string.quoted.docstring.multi\"],\n\t\t\t\tsettings: { foreground: variable(\"token-comment\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"constant.numeric\",\n\t\t\t\t\t\"constant.language\",\n\t\t\t\t\t\"constant.other.placeholder\",\n\t\t\t\t\t\"constant.character.format.placeholder\",\n\t\t\t\t\t\"variable.language.this\",\n\t\t\t\t\t\"variable.other.object\",\n\t\t\t\t\t\"variable.other.class\",\n\t\t\t\t\t\"variable.other.constant\",\n\t\t\t\t\t\"meta.property-name\",\n\t\t\t\t\t\"meta.property-value\",\n\t\t\t\t\t\"support\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-constant\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"keyword\",\n\t\t\t\t\t\"storage.modifier\",\n\t\t\t\t\t\"storage.type\",\n\t\t\t\t\t\"storage.control.clojure\",\n\t\t\t\t\t\"entity.name.function.clojure\",\n\t\t\t\t\t\"entity.name.tag.yaml\",\n\t\t\t\t\t\"support.function.node\",\n\t\t\t\t\t\"support.type.property-name.json\",\n\t\t\t\t\t\"punctuation.separator.key-value\",\n\t\t\t\t\t\"punctuation.definition.template-expression\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-keyword\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: \"variable.parameter.function\",\n\t\t\t\tsettings: { foreground: variable(\"token-parameter\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"support.function\",\n\t\t\t\t\t\"entity.name.type\",\n\t\t\t\t\t\"entity.other.inherited-class\",\n\t\t\t\t\t\"meta.function-call\",\n\t\t\t\t\t\"meta.instance.constructor\",\n\t\t\t\t\t\"entity.other.attribute-name\",\n\t\t\t\t\t\"entity.name.function\",\n\t\t\t\t\t\"constant.keyword.clojure\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-function\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"entity.name.tag\",\n\t\t\t\t\t\"string.quoted\",\n\t\t\t\t\t\"string.regexp\",\n\t\t\t\t\t\"string.interpolated\",\n\t\t\t\t\t\"string.template\",\n\t\t\t\t\t\"string.unquoted.plain.out.yaml\",\n\t\t\t\t\t\"keyword.other.template\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-string-expression\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"punctuation.definition.arguments\",\n\t\t\t\t\t\"punctuation.definition.dict\",\n\t\t\t\t\t\"punctuation.separator\",\n\t\t\t\t\t\"meta.function-call.arguments\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-punctuation\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"markup.underline.link\", \"punctuation.definition.metadata.markdown\"],\n\t\t\t\tsettings: { foreground: variable(\"token-link\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"beginning.punctuation.definition.list.markdown\"],\n\t\t\t\tsettings: { foreground: variable(\"token-string\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"punctuation.definition.string.begin.markdown\",\n\t\t\t\t\t\"punctuation.definition.string.end.markdown\",\n\t\t\t\t\t\"string.other.link.title.markdown\",\n\t\t\t\t\t\"string.other.link.description.markdown\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-keyword\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"markup.inserted\",\n\t\t\t\t\t\"meta.diff.header.to-file\",\n\t\t\t\t\t\"punctuation.definition.inserted\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-inserted\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"markup.deleted\",\n\t\t\t\t\t\"meta.diff.header.from-file\",\n\t\t\t\t\t\"punctuation.definition.deleted\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-deleted\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"markup.changed\", \"punctuation.definition.changed\"],\n\t\t\t\tsettings: { foreground: variable(\"token-changed\") }\n\t\t\t}\n\t\t]\n\t};\n\tif (!fontStyle) theme.tokenColors = theme.tokenColors?.map((tokenColor) => {\n\t\tif (tokenColor.settings?.fontStyle) delete tokenColor.settings.fontStyle;\n\t\treturn tokenColor;\n\t});\n\treturn theme;\n}\n\n//#endregion\nexport { ShikiError, addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createBundledHighlighter, createCssVariablesTheme, createHighlighterCore, createHighlighterCoreSync, createPositionConverter, createShikiInternal, createShikiInternalSync, createShikiPrimitive, createShikiPrimitiveAsync, createSingletonShorthands, flatTokenVariants, getLastGrammarState, getSingletonHighlighterCore, getTokenStyleObject, guessEmbeddedLanguages, hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations };","var has = Object.prototype.hasOwnProperty;\n\nfunction find(iter, tar, key) {\n\tfor (key of iter.keys()) {\n\t\tif (dequal(key, tar)) return key;\n\t}\n}\n\nexport function dequal(foo, bar) {\n\tvar ctor, len, tmp;\n\tif (foo === bar) return true;\n\n\tif (foo && bar && (ctor=foo.constructor) === bar.constructor) {\n\t\tif (ctor === Date) return foo.getTime() === bar.getTime();\n\t\tif (ctor === RegExp) return foo.toString() === bar.toString();\n\n\t\tif (ctor === Array) {\n\t\t\tif ((len=foo.length) === bar.length) {\n\t\t\t\twhile (len-- && dequal(foo[len], bar[len]));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (ctor === Set) {\n\t\t\tif (foo.size !== bar.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (len of foo) {\n\t\t\t\ttmp = len;\n\t\t\t\tif (tmp && typeof tmp === 'object') {\n\t\t\t\t\ttmp = find(bar, tmp);\n\t\t\t\t\tif (!tmp) return false;\n\t\t\t\t}\n\t\t\t\tif (!bar.has(tmp)) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (ctor === Map) {\n\t\t\tif (foo.size !== bar.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (len of foo) {\n\t\t\t\ttmp = len[0];\n\t\t\t\tif (tmp && typeof tmp === 'object') {\n\t\t\t\t\ttmp = find(bar, tmp);\n\t\t\t\t\tif (!tmp) return false;\n\t\t\t\t}\n\t\t\t\tif (!dequal(len[1], bar.get(tmp))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (ctor === ArrayBuffer) {\n\t\t\tfoo = new Uint8Array(foo);\n\t\t\tbar = new Uint8Array(bar);\n\t\t} else if (ctor === DataView) {\n\t\t\tif ((len=foo.byteLength) === bar.byteLength) {\n\t\t\t\twhile (len-- && foo.getInt8(len) === bar.getInt8(len));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (ArrayBuffer.isView(foo)) {\n\t\t\tif ((len=foo.byteLength) === bar.byteLength) {\n\t\t\t\twhile (len-- && foo[len] === bar[len]);\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (!ctor || typeof foo === 'object') {\n\t\t\tlen = 0;\n\t\t\tfor (ctor in foo) {\n\t\t\t\tif (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;\n\t\t\t\tif (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;\n\t\t\t}\n\t\t\treturn Object.keys(bar).length === len;\n\t\t}\n\t}\n\n\treturn foo !== foo && bar !== bar;\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","// src/lib/hook.ts\nimport {\n useEffect,\n useMemo,\n useRef as useRef2,\n useState\n} from \"react\";\nimport { jsx, jsxs, Fragment } from \"react/jsx-runtime\";\nimport { toJsxRuntime } from \"hast-util-to-jsx-runtime\";\nimport { guessEmbeddedLanguages } from \"shiki/core\";\n\n// src/lib/utils.ts\nimport { useRef } from \"react\";\nimport { dequal } from \"dequal\";\nvar useStableValue = (value) => {\n const ref = useRef(value);\n if (value !== ref.current && !dequal(value, ref.current)) {\n ref.current = value;\n }\n return ref.current;\n};\nvar throttleHighlighting = (performHighlight, timeoutControl, throttleMs) => {\n const now = Date.now();\n clearTimeout(timeoutControl.current.timeoutId);\n const delay = Math.max(0, timeoutControl.current.nextAllowedTime - now);\n timeoutControl.current.timeoutId = setTimeout(() => {\n performHighlight().catch(console.error);\n timeoutControl.current.nextAllowedTime = now + throttleMs;\n }, delay);\n};\n\n// src/lib/language.ts\nimport { isSpecialLang } from \"shiki/core\";\nvar FALLBACK_LANGUAGE = \"plaintext\";\nvar toArray = (value) => value == null ? [] : Array.isArray(value) ? value : [value];\nvar languageKey = (lang) => {\n if (lang == null) return null;\n if (typeof lang === \"string\") return `s:${lang}`;\n return `o:${lang.name}::${lang.scopeName}`;\n};\nvar dedupeLanguages = (langs) => {\n const seen = /* @__PURE__ */ new Set();\n const deduped = [];\n for (const lang of langs) {\n const key = languageKey(lang);\n if (key == null || seen.has(key)) continue;\n seen.add(key);\n deduped.push(lang);\n }\n return deduped;\n};\nvar isLoadableLanguage = (lang, bundledLanguages) => {\n if (lang == null) return false;\n if (typeof lang === \"string\") return lang in bundledLanguages;\n return typeof lang.name === \"string\" && typeof lang.scopeName === \"string\";\n};\nvar resolveLoadedLanguage = (languageId, loadedLanguages) => isSpecialLang(languageId) || loadedLanguages.includes(languageId) ? languageId : FALLBACK_LANGUAGE;\nvar resolveLanguage = (lang, customLanguages, langAliases, preloadLanguages) => {\n const customLangs = toArray(customLanguages);\n const preloadLangs = toArray(preloadLanguages);\n const customMatchPool = [...customLangs, ...preloadLangs];\n let languageId = FALLBACK_LANGUAGE;\n let primaryLang;\n if (lang == null || typeof lang === \"string\" && !lang.trim()) {\n return {\n languageId,\n langsToLoad: dedupeLanguages([...preloadLangs, ...customLangs])\n };\n }\n if (typeof lang === \"object\") {\n languageId = lang.name;\n primaryLang = lang;\n } else {\n const lowerLang = lang.toLowerCase();\n const matches = (str) => str?.toLowerCase() === lowerLang;\n const customMatch = customMatchPool.find(\n (candidate) => typeof candidate === \"object\" && candidate != null && !!(matches(candidate.name) || matches(candidate.scopeName) || matches(candidate.scopeName?.split(\".\").pop()) || candidate.aliases?.some(matches) || candidate.fileTypes?.some(matches))\n );\n if (customMatch) {\n languageId = customMatch.name || lang;\n primaryLang = customMatch;\n } else if (langAliases?.[lang]) {\n languageId = langAliases[lang];\n primaryLang = langAliases[lang];\n } else {\n languageId = lang;\n primaryLang = lang;\n }\n }\n return {\n languageId,\n langsToLoad: dedupeLanguages([\n primaryLang,\n ...preloadLangs,\n ...customLangs\n ])\n };\n};\n\n// src/lib/theme.ts\nvar isTextmateTheme = (value) => typeof value === \"object\" && value !== null && \"tokenColors\" in value && Array.isArray(value.tokenColors);\nfunction resolveTheme(themeInput) {\n const inputIsTextmateTheme = isTextmateTheme(themeInput);\n const isMultiThemeConfig = typeof themeInput === \"object\" && themeInput !== null && !inputIsTextmateTheme;\n const validMultiThemeObj = typeof themeInput === \"object\" && themeInput !== null && !inputIsTextmateTheme && Object.entries(themeInput).some(\n ([key, value]) => key.trim() !== \"\" && (typeof value === \"string\" && value.trim() !== \"\" || isTextmateTheme(value))\n );\n if (isMultiThemeConfig) {\n const themeId = validMultiThemeObj ? `multi-${Object.values(themeInput).map(\n (theme) => (typeof theme === \"string\" ? theme : theme?.name) || \"custom\"\n ).sort().join(\"-\")}` : \"multi-default\";\n return {\n isMultiTheme: true,\n themeId,\n multiTheme: validMultiThemeObj ? themeInput : null,\n themesToLoad: validMultiThemeObj ? Object.values(themeInput) : []\n };\n }\n return {\n isMultiTheme: false,\n themeId: typeof themeInput === \"string\" ? themeInput : themeInput?.name || \"custom\",\n singleTheme: themeInput,\n themesToLoad: [themeInput]\n };\n}\n\n// src/lib/transformers.ts\nfunction lineNumbersTransformer(startLine = 1) {\n return {\n name: \"react-shiki:line-numbers\",\n code(node) {\n this.addClassToHast(node, \"has-line-numbers\");\n if (startLine !== 1) {\n const existingStyle = node.properties?.style || \"\";\n const newStyle = existingStyle ? `${existingStyle}; --line-start: ${startLine}` : `--line-start: ${startLine}`;\n node.properties = {\n ...node.properties,\n style: newStyle\n };\n }\n },\n line(node) {\n this.addClassToHast(node, \"line-numbers\");\n return node;\n }\n };\n}\n\n// src/lib/options.ts\nvar DEFAULT_THEMES = {\n light: \"github-light\",\n dark: \"github-dark\"\n};\nvar buildThemeOptions = (resolvedTheme, options) => {\n if (resolvedTheme.isMultiTheme) {\n return {\n themes: resolvedTheme.multiTheme ?? DEFAULT_THEMES,\n defaultColor: options.defaultColor,\n cssVariablePrefix: options.cssVariablePrefix\n };\n }\n return {\n theme: resolvedTheme.singleTheme ?? DEFAULT_THEMES.dark\n };\n};\nvar buildTransformers = (options) => {\n const transformers = [...options.transformers || []];\n if (options.showLineNumbers) {\n transformers.push(lineNumbersTransformer(options.startingLineNumber));\n }\n return transformers;\n};\nvar buildShikiOptions = ({\n languageId,\n resolvedTheme,\n options\n}) => {\n const {\n defaultColor: _defaultColor,\n cssVariablePrefix: _cssVariablePrefix,\n showLineNumbers: _showLineNumbers,\n startingLineNumber: _startingLineNumber,\n transformers: _transformers,\n ...restOptions\n } = options;\n return {\n lang: languageId,\n ...buildThemeOptions(resolvedTheme, options),\n ...restOptions,\n transformers: buildTransformers(options)\n };\n};\n\n// src/lib/hook.ts\nvar getEmbeddedLanguages = (code, languageId, highlighter) => {\n const bundled = highlighter.getBundledLanguages();\n return guessEmbeddedLanguages(code, languageId).flatMap(\n (language) => bundled[language] ?? []\n );\n};\nvar useShikiHighlighter = (code, lang, themeInput, options = {}, highlighterFactory) => {\n const [highlightedCode, setHighlightedCode] = useState(null);\n const stableLang = useStableValue(lang);\n const stableTheme = useStableValue(themeInput);\n const stableOpts = useStableValue(options);\n const { languageId, langsToLoad } = useMemo(\n () => resolveLanguage(\n stableLang,\n stableOpts.customLanguages,\n stableOpts.langAlias,\n stableOpts.preloadLanguages\n ),\n [\n stableLang,\n stableOpts.customLanguages,\n stableOpts.preloadLanguages,\n stableOpts.langAlias\n ]\n );\n const resolvedTheme = useMemo(\n () => resolveTheme(stableTheme),\n [stableTheme]\n );\n const { themesToLoad } = resolvedTheme;\n const timeoutControl = useRef2({\n nextAllowedTime: 0,\n timeoutId: void 0\n });\n const shikiOptions = useMemo(\n () => buildShikiOptions({\n languageId,\n resolvedTheme,\n options: stableOpts\n }),\n [languageId, resolvedTheme, stableOpts]\n );\n useEffect(() => {\n let isMounted = true;\n const highlightCode = async () => {\n if (!languageId) return;\n const highlighter = stableOpts.highlighter ? stableOpts.highlighter : await highlighterFactory(\n langsToLoad,\n themesToLoad,\n stableOpts.engine\n );\n if (!stableOpts.highlighter) {\n const embedded = getEmbeddedLanguages(\n code,\n languageId,\n highlighter\n );\n if (embedded.length > 0) {\n await highlighter.loadLanguage(...embedded);\n }\n }\n const langToUse = resolveLoadedLanguage(\n languageId,\n highlighter.getLoadedLanguages()\n );\n const finalOptions = { ...shikiOptions, lang: langToUse };\n if (isMounted) {\n const output = stableOpts.outputFormat === \"html\" ? highlighter.codeToHtml(code, finalOptions) : toJsxRuntime(highlighter.codeToHast(code, finalOptions), {\n jsx,\n jsxs,\n Fragment\n });\n setHighlightedCode(output);\n }\n };\n const { delay } = stableOpts;\n if (delay) {\n throttleHighlighting(highlightCode, timeoutControl, delay);\n } else {\n highlightCode().catch(console.error);\n }\n return () => {\n isMounted = false;\n clearTimeout(timeoutControl.current.timeoutId);\n };\n }, [\n code,\n shikiOptions,\n stableOpts.delay,\n stableOpts.highlighter,\n langsToLoad,\n themesToLoad\n ]);\n return highlightedCode;\n};\n\n// src/lib/plugins.ts\nimport { visit } from \"unist-util-visit\";\nfunction rehypeInlineCodeProperty() {\n return (tree) => {\n visit(tree, \"element\", (node, _index, parent) => {\n if (node.tagName === \"code\" && parent.tagName !== \"pre\") {\n node.properties.inline = true;\n }\n });\n };\n}\nvar isInlineCode = (node) => {\n const textContent = (node.children || []).filter((child) => child.type === \"text\").map((child) => child.value).join(\"\");\n return !textContent.includes(\"\\n\");\n};\n\n// #style-inject:#style-inject\nfunction styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === \"undefined\") return;\n const head = document.head || document.getElementsByTagName(\"head\")[0];\n const style = document.createElement(\"style\");\n style.type = \"text/css\";\n if (insertAt === \"top\") {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\n// src/lib/styles.css\nstyleInject(\".relative {\\n position: relative;\\n}\\n.defaultStyles pre {\\n overflow: auto;\\n border-radius: 0.5rem;\\n padding-left: 1.5rem;\\n padding-right: 1.5rem;\\n padding-top: 1.25rem;\\n padding-bottom: 1.25rem;\\n}\\n.languageLabel {\\n position: absolute;\\n right: 0.75rem;\\n top: 0.5rem;\\n font-family: monospace;\\n font-size: 0.75rem;\\n letter-spacing: -0.05em;\\n color: rgba(107, 114, 128, 0.85);\\n}\\n.line-numbers::before {\\n counter-increment: line-number;\\n content: counter(line-number);\\n display: inline-flex;\\n justify-content: flex-end;\\n align-items: flex-start;\\n box-sizing: content-box;\\n min-width: var(--line-numbers-width, 2ch);\\n padding-left: var(--line-numbers-padding-left, 2ch);\\n padding-right: var(--line-numbers-padding-right, 2ch);\\n color: var(--line-numbers-foreground, rgba(107, 114, 128, 0.6));\\n font-size: var(--line-numbers-font-size, inherit);\\n font-weight: var(--line-numbers-font-weight, inherit);\\n line-height: var(--line-numbers-line-height, inherit);\\n font-family: var(--line-numbers-font-family, inherit);\\n opacity: var(--line-numbers-opacity, 1);\\n user-select: none;\\n pointer-events: none;\\n}\\n.has-line-numbers {\\n counter-reset: line-number calc(var(--line-start, 1) - 1);\\n --line-numbers-foreground: rgba(107, 114, 128, 0.5);\\n --line-numbers-width: 2ch;\\n --line-numbers-padding-left: 0ch;\\n --line-numbers-padding-right: 2ch;\\n --line-numbers-font-size: inherit;\\n --line-numbers-font-weight: inherit;\\n --line-numbers-line-height: inherit;\\n --line-numbers-font-family: inherit;\\n --line-numbers-opacity: 1;\\n}\\n\");\n\n// src/lib/component.tsx\nimport { clsx } from \"clsx\";\nimport { forwardRef } from \"react\";\nimport { jsx as jsx2, jsxs as jsxs2 } from \"react/jsx-runtime\";\nvar createShikiHighlighterComponent = (useShikiHighlighterImpl) => {\n return forwardRef(\n ({\n language,\n theme,\n delay,\n transformers,\n defaultColor,\n cssVariablePrefix,\n addDefaultStyles = true,\n style,\n langStyle,\n className,\n langClassName,\n showLanguage = true,\n showLineNumbers = false,\n startingLineNumber = 1,\n children: code,\n as: Element = \"pre\",\n customLanguages,\n preloadLanguages,\n ...shikiOptions\n }, ref) => {\n const options = {\n delay,\n transformers,\n customLanguages,\n preloadLanguages,\n showLineNumbers,\n defaultColor,\n cssVariablePrefix,\n startingLineNumber,\n ...shikiOptions\n };\n const displayLanguageId = typeof language === \"object\" ? language.name || null : language?.trim() || null;\n const highlightedCode = useShikiHighlighterImpl(\n code,\n language,\n theme,\n options\n );\n const isHtmlOutput = typeof highlightedCode === \"string\";\n return /* @__PURE__ */ jsxs2(\n Element,\n {\n ref,\n \"data-testid\": \"shiki-container\",\n className: clsx(\n \"relative\",\n \"not-prose\",\n addDefaultStyles && \"defaultStyles\",\n className\n ),\n style,\n id: \"shiki-container\",\n children: [\n showLanguage && displayLanguageId ? /* @__PURE__ */ jsx2(\n \"span\",\n {\n className: clsx(\"languageLabel\", langClassName),\n style: langStyle,\n id: \"language-label\",\n children: displayLanguageId\n }\n ) : null,\n isHtmlOutput ? /* @__PURE__ */ jsx2(\"div\", { dangerouslySetInnerHTML: { __html: highlightedCode } }) : highlightedCode\n ]\n }\n );\n }\n );\n};\n\nexport {\n isLoadableLanguage,\n useShikiHighlighter,\n rehypeInlineCodeProperty,\n isInlineCode,\n createShikiHighlighterComponent\n};\n//# sourceMappingURL=chunk-QPJZGYHO.js.map","//#region src/langs-bundle-full.ts\nconst bundledLanguagesInfo = [\n\t{\n\t\t\"id\": \"abap\",\n\t\t\"name\": \"ABAP\",\n\t\t\"import\": (() => import(\"@shikijs/langs/abap\"))\n\t},\n\t{\n\t\t\"id\": \"actionscript-3\",\n\t\t\"name\": \"ActionScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/actionscript-3\"))\n\t},\n\t{\n\t\t\"id\": \"ada\",\n\t\t\"name\": \"Ada\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ada\"))\n\t},\n\t{\n\t\t\"id\": \"angular-html\",\n\t\t\"name\": \"Angular HTML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/angular-html\"))\n\t},\n\t{\n\t\t\"id\": \"angular-ts\",\n\t\t\"name\": \"Angular TypeScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/angular-ts\"))\n\t},\n\t{\n\t\t\"id\": \"apache\",\n\t\t\"name\": \"Apache Conf\",\n\t\t\"import\": (() => import(\"@shikijs/langs/apache\"))\n\t},\n\t{\n\t\t\"id\": \"apex\",\n\t\t\"name\": \"Apex\",\n\t\t\"import\": (() => import(\"@shikijs/langs/apex\"))\n\t},\n\t{\n\t\t\"id\": \"apl\",\n\t\t\"name\": \"APL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/apl\"))\n\t},\n\t{\n\t\t\"id\": \"applescript\",\n\t\t\"name\": \"AppleScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/applescript\"))\n\t},\n\t{\n\t\t\"id\": \"ara\",\n\t\t\"name\": \"Ara\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ara\"))\n\t},\n\t{\n\t\t\"id\": \"asciidoc\",\n\t\t\"name\": \"AsciiDoc\",\n\t\t\"aliases\": [\"adoc\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/asciidoc\"))\n\t},\n\t{\n\t\t\"id\": \"asm\",\n\t\t\"name\": \"Assembly\",\n\t\t\"import\": (() => import(\"@shikijs/langs/asm\"))\n\t},\n\t{\n\t\t\"id\": \"astro\",\n\t\t\"name\": \"Astro\",\n\t\t\"import\": (() => import(\"@shikijs/langs/astro\"))\n\t},\n\t{\n\t\t\"id\": \"awk\",\n\t\t\"name\": \"AWK\",\n\t\t\"import\": (() => import(\"@shikijs/langs/awk\"))\n\t},\n\t{\n\t\t\"id\": \"ballerina\",\n\t\t\"name\": \"Ballerina\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ballerina\"))\n\t},\n\t{\n\t\t\"id\": \"bat\",\n\t\t\"name\": \"Batch File\",\n\t\t\"aliases\": [\"batch\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/bat\"))\n\t},\n\t{\n\t\t\"id\": \"beancount\",\n\t\t\"name\": \"Beancount\",\n\t\t\"import\": (() => import(\"@shikijs/langs/beancount\"))\n\t},\n\t{\n\t\t\"id\": \"berry\",\n\t\t\"name\": \"Berry\",\n\t\t\"aliases\": [\"be\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/berry\"))\n\t},\n\t{\n\t\t\"id\": \"bibtex\",\n\t\t\"name\": \"BibTeX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/bibtex\"))\n\t},\n\t{\n\t\t\"id\": \"bicep\",\n\t\t\"name\": \"Bicep\",\n\t\t\"import\": (() => import(\"@shikijs/langs/bicep\"))\n\t},\n\t{\n\t\t\"id\": \"bird2\",\n\t\t\"name\": \"BIRD2 Configuration\",\n\t\t\"aliases\": [\"bird\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/bird2\"))\n\t},\n\t{\n\t\t\"id\": \"blade\",\n\t\t\"name\": \"Blade\",\n\t\t\"import\": (() => import(\"@shikijs/langs/blade\"))\n\t},\n\t{\n\t\t\"id\": \"bsl\",\n\t\t\"name\": \"1C (Enterprise)\",\n\t\t\"aliases\": [\"1c\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/bsl\"))\n\t},\n\t{\n\t\t\"id\": \"c\",\n\t\t\"name\": \"C\",\n\t\t\"import\": (() => import(\"@shikijs/langs/c\"))\n\t},\n\t{\n\t\t\"id\": \"c3\",\n\t\t\"name\": \"C3\",\n\t\t\"import\": (() => import(\"@shikijs/langs/c3\"))\n\t},\n\t{\n\t\t\"id\": \"cadence\",\n\t\t\"name\": \"Cadence\",\n\t\t\"aliases\": [\"cdc\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/cadence\"))\n\t},\n\t{\n\t\t\"id\": \"cairo\",\n\t\t\"name\": \"Cairo\",\n\t\t\"import\": (() => import(\"@shikijs/langs/cairo\"))\n\t},\n\t{\n\t\t\"id\": \"clarity\",\n\t\t\"name\": \"Clarity\",\n\t\t\"import\": (() => import(\"@shikijs/langs/clarity\"))\n\t},\n\t{\n\t\t\"id\": \"clojure\",\n\t\t\"name\": \"Clojure\",\n\t\t\"aliases\": [\"clj\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/clojure\"))\n\t},\n\t{\n\t\t\"id\": \"cmake\",\n\t\t\"name\": \"CMake\",\n\t\t\"import\": (() => import(\"@shikijs/langs/cmake\"))\n\t},\n\t{\n\t\t\"id\": \"cobol\",\n\t\t\"name\": \"COBOL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/cobol\"))\n\t},\n\t{\n\t\t\"id\": \"codeowners\",\n\t\t\"name\": \"CODEOWNERS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/codeowners\"))\n\t},\n\t{\n\t\t\"id\": \"codeql\",\n\t\t\"name\": \"CodeQL\",\n\t\t\"aliases\": [\"ql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/codeql\"))\n\t},\n\t{\n\t\t\"id\": \"coffee\",\n\t\t\"name\": \"CoffeeScript\",\n\t\t\"aliases\": [\"coffeescript\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/coffee\"))\n\t},\n\t{\n\t\t\"id\": \"common-lisp\",\n\t\t\"name\": \"Common Lisp\",\n\t\t\"aliases\": [\"lisp\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/common-lisp\"))\n\t},\n\t{\n\t\t\"id\": \"coq\",\n\t\t\"name\": \"Coq\",\n\t\t\"import\": (() => import(\"@shikijs/langs/coq\"))\n\t},\n\t{\n\t\t\"id\": \"cpp\",\n\t\t\"name\": \"C++\",\n\t\t\"aliases\": [\"c++\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/cpp\"))\n\t},\n\t{\n\t\t\"id\": \"crystal\",\n\t\t\"name\": \"Crystal\",\n\t\t\"import\": (() => import(\"@shikijs/langs/crystal\"))\n\t},\n\t{\n\t\t\"id\": \"csharp\",\n\t\t\"name\": \"C#\",\n\t\t\"aliases\": [\"c#\", \"cs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/csharp\"))\n\t},\n\t{\n\t\t\"id\": \"css\",\n\t\t\"name\": \"CSS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/css\"))\n\t},\n\t{\n\t\t\"id\": \"csv\",\n\t\t\"name\": \"CSV\",\n\t\t\"import\": (() => import(\"@shikijs/langs/csv\"))\n\t},\n\t{\n\t\t\"id\": \"cue\",\n\t\t\"name\": \"CUE\",\n\t\t\"import\": (() => import(\"@shikijs/langs/cue\"))\n\t},\n\t{\n\t\t\"id\": \"cypher\",\n\t\t\"name\": \"Cypher\",\n\t\t\"aliases\": [\"cql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/cypher\"))\n\t},\n\t{\n\t\t\"id\": \"d\",\n\t\t\"name\": \"D\",\n\t\t\"import\": (() => import(\"@shikijs/langs/d\"))\n\t},\n\t{\n\t\t\"id\": \"dart\",\n\t\t\"name\": \"Dart\",\n\t\t\"import\": (() => import(\"@shikijs/langs/dart\"))\n\t},\n\t{\n\t\t\"id\": \"dax\",\n\t\t\"name\": \"DAX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/dax\"))\n\t},\n\t{\n\t\t\"id\": \"desktop\",\n\t\t\"name\": \"Desktop\",\n\t\t\"import\": (() => import(\"@shikijs/langs/desktop\"))\n\t},\n\t{\n\t\t\"id\": \"diff\",\n\t\t\"name\": \"Diff\",\n\t\t\"import\": (() => import(\"@shikijs/langs/diff\"))\n\t},\n\t{\n\t\t\"id\": \"docker\",\n\t\t\"name\": \"Dockerfile\",\n\t\t\"aliases\": [\"dockerfile\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/docker\"))\n\t},\n\t{\n\t\t\"id\": \"dotenv\",\n\t\t\"name\": \"dotEnv\",\n\t\t\"import\": (() => import(\"@shikijs/langs/dotenv\"))\n\t},\n\t{\n\t\t\"id\": \"dream-maker\",\n\t\t\"name\": \"Dream Maker\",\n\t\t\"import\": (() => import(\"@shikijs/langs/dream-maker\"))\n\t},\n\t{\n\t\t\"id\": \"edge\",\n\t\t\"name\": \"Edge\",\n\t\t\"import\": (() => import(\"@shikijs/langs/edge\"))\n\t},\n\t{\n\t\t\"id\": \"elixir\",\n\t\t\"name\": \"Elixir\",\n\t\t\"import\": (() => import(\"@shikijs/langs/elixir\"))\n\t},\n\t{\n\t\t\"id\": \"elm\",\n\t\t\"name\": \"Elm\",\n\t\t\"import\": (() => import(\"@shikijs/langs/elm\"))\n\t},\n\t{\n\t\t\"id\": \"emacs-lisp\",\n\t\t\"name\": \"Emacs Lisp\",\n\t\t\"aliases\": [\"elisp\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/emacs-lisp\"))\n\t},\n\t{\n\t\t\"id\": \"erb\",\n\t\t\"name\": \"ERB\",\n\t\t\"import\": (() => import(\"@shikijs/langs/erb\"))\n\t},\n\t{\n\t\t\"id\": \"erlang\",\n\t\t\"name\": \"Erlang\",\n\t\t\"aliases\": [\"erl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/erlang\"))\n\t},\n\t{\n\t\t\"id\": \"fennel\",\n\t\t\"name\": \"Fennel\",\n\t\t\"import\": (() => import(\"@shikijs/langs/fennel\"))\n\t},\n\t{\n\t\t\"id\": \"fish\",\n\t\t\"name\": \"Fish\",\n\t\t\"import\": (() => import(\"@shikijs/langs/fish\"))\n\t},\n\t{\n\t\t\"id\": \"fluent\",\n\t\t\"name\": \"Fluent\",\n\t\t\"aliases\": [\"ftl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/fluent\"))\n\t},\n\t{\n\t\t\"id\": \"fortran-fixed-form\",\n\t\t\"name\": \"Fortran (Fixed Form)\",\n\t\t\"aliases\": [\n\t\t\t\"f\",\n\t\t\t\"for\",\n\t\t\t\"f77\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/fortran-fixed-form\"))\n\t},\n\t{\n\t\t\"id\": \"fortran-free-form\",\n\t\t\"name\": \"Fortran (Free Form)\",\n\t\t\"aliases\": [\n\t\t\t\"f90\",\n\t\t\t\"f95\",\n\t\t\t\"f03\",\n\t\t\t\"f08\",\n\t\t\t\"f18\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/fortran-free-form\"))\n\t},\n\t{\n\t\t\"id\": \"fsharp\",\n\t\t\"name\": \"F#\",\n\t\t\"aliases\": [\"f#\", \"fs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/fsharp\"))\n\t},\n\t{\n\t\t\"id\": \"gdresource\",\n\t\t\"name\": \"GDResource\",\n\t\t\"aliases\": [\"tscn\", \"tres\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/gdresource\"))\n\t},\n\t{\n\t\t\"id\": \"gdscript\",\n\t\t\"name\": \"GDScript\",\n\t\t\"aliases\": [\"gd\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/gdscript\"))\n\t},\n\t{\n\t\t\"id\": \"gdshader\",\n\t\t\"name\": \"GDShader\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gdshader\"))\n\t},\n\t{\n\t\t\"id\": \"genie\",\n\t\t\"name\": \"Genie\",\n\t\t\"import\": (() => import(\"@shikijs/langs/genie\"))\n\t},\n\t{\n\t\t\"id\": \"gherkin\",\n\t\t\"name\": \"Gherkin\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gherkin\"))\n\t},\n\t{\n\t\t\"id\": \"git-commit\",\n\t\t\"name\": \"Git Commit Message\",\n\t\t\"import\": (() => import(\"@shikijs/langs/git-commit\"))\n\t},\n\t{\n\t\t\"id\": \"git-rebase\",\n\t\t\"name\": \"Git Rebase Message\",\n\t\t\"import\": (() => import(\"@shikijs/langs/git-rebase\"))\n\t},\n\t{\n\t\t\"id\": \"gleam\",\n\t\t\"name\": \"Gleam\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gleam\"))\n\t},\n\t{\n\t\t\"id\": \"glimmer-js\",\n\t\t\"name\": \"Glimmer JS\",\n\t\t\"aliases\": [\"gjs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/glimmer-js\"))\n\t},\n\t{\n\t\t\"id\": \"glimmer-ts\",\n\t\t\"name\": \"Glimmer TS\",\n\t\t\"aliases\": [\"gts\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/glimmer-ts\"))\n\t},\n\t{\n\t\t\"id\": \"glsl\",\n\t\t\"name\": \"GLSL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/glsl\"))\n\t},\n\t{\n\t\t\"id\": \"gn\",\n\t\t\"name\": \"GN\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gn\"))\n\t},\n\t{\n\t\t\"id\": \"gnuplot\",\n\t\t\"name\": \"Gnuplot\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gnuplot\"))\n\t},\n\t{\n\t\t\"id\": \"go\",\n\t\t\"name\": \"Go\",\n\t\t\"import\": (() => import(\"@shikijs/langs/go\"))\n\t},\n\t{\n\t\t\"id\": \"graphql\",\n\t\t\"name\": \"GraphQL\",\n\t\t\"aliases\": [\"gql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/graphql\"))\n\t},\n\t{\n\t\t\"id\": \"groovy\",\n\t\t\"name\": \"Groovy\",\n\t\t\"import\": (() => import(\"@shikijs/langs/groovy\"))\n\t},\n\t{\n\t\t\"id\": \"hack\",\n\t\t\"name\": \"Hack\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hack\"))\n\t},\n\t{\n\t\t\"id\": \"haml\",\n\t\t\"name\": \"Ruby Haml\",\n\t\t\"import\": (() => import(\"@shikijs/langs/haml\"))\n\t},\n\t{\n\t\t\"id\": \"handlebars\",\n\t\t\"name\": \"Handlebars\",\n\t\t\"aliases\": [\"hbs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/handlebars\"))\n\t},\n\t{\n\t\t\"id\": \"haskell\",\n\t\t\"name\": \"Haskell\",\n\t\t\"aliases\": [\"hs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/haskell\"))\n\t},\n\t{\n\t\t\"id\": \"haxe\",\n\t\t\"name\": \"Haxe\",\n\t\t\"import\": (() => import(\"@shikijs/langs/haxe\"))\n\t},\n\t{\n\t\t\"id\": \"hcl\",\n\t\t\"name\": \"HashiCorp HCL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hcl\"))\n\t},\n\t{\n\t\t\"id\": \"hjson\",\n\t\t\"name\": \"Hjson\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hjson\"))\n\t},\n\t{\n\t\t\"id\": \"hlsl\",\n\t\t\"name\": \"HLSL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hlsl\"))\n\t},\n\t{\n\t\t\"id\": \"html\",\n\t\t\"name\": \"HTML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/html\"))\n\t},\n\t{\n\t\t\"id\": \"html-derivative\",\n\t\t\"name\": \"HTML (Derivative)\",\n\t\t\"import\": (() => import(\"@shikijs/langs/html-derivative\"))\n\t},\n\t{\n\t\t\"id\": \"http\",\n\t\t\"name\": \"HTTP\",\n\t\t\"import\": (() => import(\"@shikijs/langs/http\"))\n\t},\n\t{\n\t\t\"id\": \"hurl\",\n\t\t\"name\": \"Hurl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hurl\"))\n\t},\n\t{\n\t\t\"id\": \"hxml\",\n\t\t\"name\": \"HXML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hxml\"))\n\t},\n\t{\n\t\t\"id\": \"hy\",\n\t\t\"name\": \"Hy\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hy\"))\n\t},\n\t{\n\t\t\"id\": \"imba\",\n\t\t\"name\": \"Imba\",\n\t\t\"import\": (() => import(\"@shikijs/langs/imba\"))\n\t},\n\t{\n\t\t\"id\": \"ini\",\n\t\t\"name\": \"INI\",\n\t\t\"aliases\": [\"properties\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/ini\"))\n\t},\n\t{\n\t\t\"id\": \"java\",\n\t\t\"name\": \"Java\",\n\t\t\"import\": (() => import(\"@shikijs/langs/java\"))\n\t},\n\t{\n\t\t\"id\": \"javascript\",\n\t\t\"name\": \"JavaScript\",\n\t\t\"aliases\": [\n\t\t\t\"js\",\n\t\t\t\"cjs\",\n\t\t\t\"mjs\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/javascript\"))\n\t},\n\t{\n\t\t\"id\": \"jinja\",\n\t\t\"name\": \"Jinja\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jinja\"))\n\t},\n\t{\n\t\t\"id\": \"jison\",\n\t\t\"name\": \"Jison\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jison\"))\n\t},\n\t{\n\t\t\"id\": \"json\",\n\t\t\"name\": \"JSON\",\n\t\t\"import\": (() => import(\"@shikijs/langs/json\"))\n\t},\n\t{\n\t\t\"id\": \"json5\",\n\t\t\"name\": \"JSON5\",\n\t\t\"import\": (() => import(\"@shikijs/langs/json5\"))\n\t},\n\t{\n\t\t\"id\": \"jsonc\",\n\t\t\"name\": \"JSON with Comments\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jsonc\"))\n\t},\n\t{\n\t\t\"id\": \"jsonl\",\n\t\t\"name\": \"JSON Lines\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jsonl\"))\n\t},\n\t{\n\t\t\"id\": \"jsonnet\",\n\t\t\"name\": \"Jsonnet\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jsonnet\"))\n\t},\n\t{\n\t\t\"id\": \"jssm\",\n\t\t\"name\": \"JSSM\",\n\t\t\"aliases\": [\"fsl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/jssm\"))\n\t},\n\t{\n\t\t\"id\": \"jsx\",\n\t\t\"name\": \"JSX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jsx\"))\n\t},\n\t{\n\t\t\"id\": \"julia\",\n\t\t\"name\": \"Julia\",\n\t\t\"aliases\": [\"jl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/julia\"))\n\t},\n\t{\n\t\t\"id\": \"just\",\n\t\t\"name\": \"Just\",\n\t\t\"import\": (() => import(\"@shikijs/langs/just\"))\n\t},\n\t{\n\t\t\"id\": \"kdl\",\n\t\t\"name\": \"KDL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/kdl\"))\n\t},\n\t{\n\t\t\"id\": \"kotlin\",\n\t\t\"name\": \"Kotlin\",\n\t\t\"aliases\": [\"kt\", \"kts\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/kotlin\"))\n\t},\n\t{\n\t\t\"id\": \"kusto\",\n\t\t\"name\": \"Kusto\",\n\t\t\"aliases\": [\"kql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/kusto\"))\n\t},\n\t{\n\t\t\"id\": \"latex\",\n\t\t\"name\": \"LaTeX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/latex\"))\n\t},\n\t{\n\t\t\"id\": \"lean\",\n\t\t\"name\": \"Lean 4\",\n\t\t\"aliases\": [\"lean4\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/lean\"))\n\t},\n\t{\n\t\t\"id\": \"less\",\n\t\t\"name\": \"Less\",\n\t\t\"import\": (() => import(\"@shikijs/langs/less\"))\n\t},\n\t{\n\t\t\"id\": \"liquid\",\n\t\t\"name\": \"Liquid\",\n\t\t\"import\": (() => import(\"@shikijs/langs/liquid\"))\n\t},\n\t{\n\t\t\"id\": \"llvm\",\n\t\t\"name\": \"LLVM IR\",\n\t\t\"import\": (() => import(\"@shikijs/langs/llvm\"))\n\t},\n\t{\n\t\t\"id\": \"log\",\n\t\t\"name\": \"Log file\",\n\t\t\"import\": (() => import(\"@shikijs/langs/log\"))\n\t},\n\t{\n\t\t\"id\": \"logo\",\n\t\t\"name\": \"Logo\",\n\t\t\"import\": (() => import(\"@shikijs/langs/logo\"))\n\t},\n\t{\n\t\t\"id\": \"lua\",\n\t\t\"name\": \"Lua\",\n\t\t\"import\": (() => import(\"@shikijs/langs/lua\"))\n\t},\n\t{\n\t\t\"id\": \"luau\",\n\t\t\"name\": \"Luau\",\n\t\t\"import\": (() => import(\"@shikijs/langs/luau\"))\n\t},\n\t{\n\t\t\"id\": \"make\",\n\t\t\"name\": \"Makefile\",\n\t\t\"aliases\": [\"makefile\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/make\"))\n\t},\n\t{\n\t\t\"id\": \"markdown\",\n\t\t\"name\": \"Markdown\",\n\t\t\"aliases\": [\"md\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/markdown\"))\n\t},\n\t{\n\t\t\"id\": \"marko\",\n\t\t\"name\": \"Marko\",\n\t\t\"import\": (() => import(\"@shikijs/langs/marko\"))\n\t},\n\t{\n\t\t\"id\": \"matlab\",\n\t\t\"name\": \"MATLAB\",\n\t\t\"import\": (() => import(\"@shikijs/langs/matlab\"))\n\t},\n\t{\n\t\t\"id\": \"mdc\",\n\t\t\"name\": \"MDC\",\n\t\t\"import\": (() => import(\"@shikijs/langs/mdc\"))\n\t},\n\t{\n\t\t\"id\": \"mdx\",\n\t\t\"name\": \"MDX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/mdx\"))\n\t},\n\t{\n\t\t\"id\": \"mermaid\",\n\t\t\"name\": \"Mermaid\",\n\t\t\"aliases\": [\"mmd\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/mermaid\"))\n\t},\n\t{\n\t\t\"id\": \"mipsasm\",\n\t\t\"name\": \"MIPS Assembly\",\n\t\t\"aliases\": [\"mips\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/mipsasm\"))\n\t},\n\t{\n\t\t\"id\": \"mojo\",\n\t\t\"name\": \"Mojo\",\n\t\t\"import\": (() => import(\"@shikijs/langs/mojo\"))\n\t},\n\t{\n\t\t\"id\": \"moonbit\",\n\t\t\"name\": \"MoonBit\",\n\t\t\"aliases\": [\"mbt\", \"mbti\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/moonbit\"))\n\t},\n\t{\n\t\t\"id\": \"move\",\n\t\t\"name\": \"Move\",\n\t\t\"import\": (() => import(\"@shikijs/langs/move\"))\n\t},\n\t{\n\t\t\"id\": \"narrat\",\n\t\t\"name\": \"Narrat Language\",\n\t\t\"aliases\": [\"nar\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/narrat\"))\n\t},\n\t{\n\t\t\"id\": \"nextflow\",\n\t\t\"name\": \"Nextflow\",\n\t\t\"aliases\": [\"nf\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/nextflow\"))\n\t},\n\t{\n\t\t\"id\": \"nextflow-groovy\",\n\t\t\"name\": \"Nextflow Groovy\",\n\t\t\"import\": (() => import(\"@shikijs/langs/nextflow-groovy\"))\n\t},\n\t{\n\t\t\"id\": \"nginx\",\n\t\t\"name\": \"Nginx\",\n\t\t\"import\": (() => import(\"@shikijs/langs/nginx\"))\n\t},\n\t{\n\t\t\"id\": \"nim\",\n\t\t\"name\": \"Nim\",\n\t\t\"import\": (() => import(\"@shikijs/langs/nim\"))\n\t},\n\t{\n\t\t\"id\": \"nix\",\n\t\t\"name\": \"Nix\",\n\t\t\"import\": (() => import(\"@shikijs/langs/nix\"))\n\t},\n\t{\n\t\t\"id\": \"nushell\",\n\t\t\"name\": \"nushell\",\n\t\t\"aliases\": [\"nu\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/nushell\"))\n\t},\n\t{\n\t\t\"id\": \"objective-c\",\n\t\t\"name\": \"Objective-C\",\n\t\t\"aliases\": [\"objc\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/objective-c\"))\n\t},\n\t{\n\t\t\"id\": \"objective-cpp\",\n\t\t\"name\": \"Objective-C++\",\n\t\t\"import\": (() => import(\"@shikijs/langs/objective-cpp\"))\n\t},\n\t{\n\t\t\"id\": \"ocaml\",\n\t\t\"name\": \"OCaml\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ocaml\"))\n\t},\n\t{\n\t\t\"id\": \"odin\",\n\t\t\"name\": \"Odin\",\n\t\t\"import\": (() => import(\"@shikijs/langs/odin\"))\n\t},\n\t{\n\t\t\"id\": \"openscad\",\n\t\t\"name\": \"OpenSCAD\",\n\t\t\"aliases\": [\"scad\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/openscad\"))\n\t},\n\t{\n\t\t\"id\": \"pascal\",\n\t\t\"name\": \"Pascal\",\n\t\t\"import\": (() => import(\"@shikijs/langs/pascal\"))\n\t},\n\t{\n\t\t\"id\": \"perl\",\n\t\t\"name\": \"Perl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/perl\"))\n\t},\n\t{\n\t\t\"id\": \"php\",\n\t\t\"name\": \"PHP\",\n\t\t\"import\": (() => import(\"@shikijs/langs/php\"))\n\t},\n\t{\n\t\t\"id\": \"pkl\",\n\t\t\"name\": \"Pkl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/pkl\"))\n\t},\n\t{\n\t\t\"id\": \"plsql\",\n\t\t\"name\": \"PL/SQL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/plsql\"))\n\t},\n\t{\n\t\t\"id\": \"po\",\n\t\t\"name\": \"Gettext PO\",\n\t\t\"aliases\": [\"pot\", \"potx\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/po\"))\n\t},\n\t{\n\t\t\"id\": \"polar\",\n\t\t\"name\": \"Polar\",\n\t\t\"import\": (() => import(\"@shikijs/langs/polar\"))\n\t},\n\t{\n\t\t\"id\": \"postcss\",\n\t\t\"name\": \"PostCSS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/postcss\"))\n\t},\n\t{\n\t\t\"id\": \"powerquery\",\n\t\t\"name\": \"PowerQuery\",\n\t\t\"import\": (() => import(\"@shikijs/langs/powerquery\"))\n\t},\n\t{\n\t\t\"id\": \"powershell\",\n\t\t\"name\": \"PowerShell\",\n\t\t\"aliases\": [\"ps\", \"ps1\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/powershell\"))\n\t},\n\t{\n\t\t\"id\": \"prisma\",\n\t\t\"name\": \"Prisma\",\n\t\t\"import\": (() => import(\"@shikijs/langs/prisma\"))\n\t},\n\t{\n\t\t\"id\": \"prolog\",\n\t\t\"name\": \"Prolog\",\n\t\t\"import\": (() => import(\"@shikijs/langs/prolog\"))\n\t},\n\t{\n\t\t\"id\": \"proto\",\n\t\t\"name\": \"Protocol Buffer 3\",\n\t\t\"aliases\": [\"protobuf\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/proto\"))\n\t},\n\t{\n\t\t\"id\": \"pug\",\n\t\t\"name\": \"Pug\",\n\t\t\"aliases\": [\"jade\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/pug\"))\n\t},\n\t{\n\t\t\"id\": \"puppet\",\n\t\t\"name\": \"Puppet\",\n\t\t\"import\": (() => import(\"@shikijs/langs/puppet\"))\n\t},\n\t{\n\t\t\"id\": \"purescript\",\n\t\t\"name\": \"PureScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/purescript\"))\n\t},\n\t{\n\t\t\"id\": \"python\",\n\t\t\"name\": \"Python\",\n\t\t\"aliases\": [\"py\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/python\"))\n\t},\n\t{\n\t\t\"id\": \"qml\",\n\t\t\"name\": \"QML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/qml\"))\n\t},\n\t{\n\t\t\"id\": \"qmldir\",\n\t\t\"name\": \"QML Directory\",\n\t\t\"import\": (() => import(\"@shikijs/langs/qmldir\"))\n\t},\n\t{\n\t\t\"id\": \"qss\",\n\t\t\"name\": \"Qt Style Sheets\",\n\t\t\"import\": (() => import(\"@shikijs/langs/qss\"))\n\t},\n\t{\n\t\t\"id\": \"r\",\n\t\t\"name\": \"R\",\n\t\t\"import\": (() => import(\"@shikijs/langs/r\"))\n\t},\n\t{\n\t\t\"id\": \"racket\",\n\t\t\"name\": \"Racket\",\n\t\t\"import\": (() => import(\"@shikijs/langs/racket\"))\n\t},\n\t{\n\t\t\"id\": \"raku\",\n\t\t\"name\": \"Raku\",\n\t\t\"aliases\": [\"perl6\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/raku\"))\n\t},\n\t{\n\t\t\"id\": \"razor\",\n\t\t\"name\": \"ASP.NET Razor\",\n\t\t\"import\": (() => import(\"@shikijs/langs/razor\"))\n\t},\n\t{\n\t\t\"id\": \"reg\",\n\t\t\"name\": \"Windows Registry Script\",\n\t\t\"import\": (() => import(\"@shikijs/langs/reg\"))\n\t},\n\t{\n\t\t\"id\": \"regexp\",\n\t\t\"name\": \"RegExp\",\n\t\t\"aliases\": [\"regex\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/regexp\"))\n\t},\n\t{\n\t\t\"id\": \"rel\",\n\t\t\"name\": \"Rel\",\n\t\t\"import\": (() => import(\"@shikijs/langs/rel\"))\n\t},\n\t{\n\t\t\"id\": \"riscv\",\n\t\t\"name\": \"RISC-V\",\n\t\t\"import\": (() => import(\"@shikijs/langs/riscv\"))\n\t},\n\t{\n\t\t\"id\": \"ron\",\n\t\t\"name\": \"RON\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ron\"))\n\t},\n\t{\n\t\t\"id\": \"rosmsg\",\n\t\t\"name\": \"ROS Interface\",\n\t\t\"import\": (() => import(\"@shikijs/langs/rosmsg\"))\n\t},\n\t{\n\t\t\"id\": \"rst\",\n\t\t\"name\": \"reStructuredText\",\n\t\t\"import\": (() => import(\"@shikijs/langs/rst\"))\n\t},\n\t{\n\t\t\"id\": \"ruby\",\n\t\t\"name\": \"Ruby\",\n\t\t\"aliases\": [\"rb\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/ruby\"))\n\t},\n\t{\n\t\t\"id\": \"rust\",\n\t\t\"name\": \"Rust\",\n\t\t\"aliases\": [\"rs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/rust\"))\n\t},\n\t{\n\t\t\"id\": \"sas\",\n\t\t\"name\": \"SAS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/sas\"))\n\t},\n\t{\n\t\t\"id\": \"sass\",\n\t\t\"name\": \"Sass\",\n\t\t\"import\": (() => import(\"@shikijs/langs/sass\"))\n\t},\n\t{\n\t\t\"id\": \"scala\",\n\t\t\"name\": \"Scala\",\n\t\t\"import\": (() => import(\"@shikijs/langs/scala\"))\n\t},\n\t{\n\t\t\"id\": \"scheme\",\n\t\t\"name\": \"Scheme\",\n\t\t\"import\": (() => import(\"@shikijs/langs/scheme\"))\n\t},\n\t{\n\t\t\"id\": \"scss\",\n\t\t\"name\": \"SCSS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/scss\"))\n\t},\n\t{\n\t\t\"id\": \"sdbl\",\n\t\t\"name\": \"1C (Query)\",\n\t\t\"aliases\": [\"1c-query\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/sdbl\"))\n\t},\n\t{\n\t\t\"id\": \"shaderlab\",\n\t\t\"name\": \"ShaderLab\",\n\t\t\"aliases\": [\"shader\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/shaderlab\"))\n\t},\n\t{\n\t\t\"id\": \"shellscript\",\n\t\t\"name\": \"Shell\",\n\t\t\"aliases\": [\n\t\t\t\"bash\",\n\t\t\t\"sh\",\n\t\t\t\"shell\",\n\t\t\t\"zsh\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/shellscript\"))\n\t},\n\t{\n\t\t\"id\": \"shellsession\",\n\t\t\"name\": \"Shell Session\",\n\t\t\"aliases\": [\"console\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/shellsession\"))\n\t},\n\t{\n\t\t\"id\": \"smalltalk\",\n\t\t\"name\": \"Smalltalk\",\n\t\t\"import\": (() => import(\"@shikijs/langs/smalltalk\"))\n\t},\n\t{\n\t\t\"id\": \"solidity\",\n\t\t\"name\": \"Solidity\",\n\t\t\"import\": (() => import(\"@shikijs/langs/solidity\"))\n\t},\n\t{\n\t\t\"id\": \"soy\",\n\t\t\"name\": \"Closure Templates\",\n\t\t\"aliases\": [\"closure-templates\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/soy\"))\n\t},\n\t{\n\t\t\"id\": \"sparql\",\n\t\t\"name\": \"SPARQL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/sparql\"))\n\t},\n\t{\n\t\t\"id\": \"splunk\",\n\t\t\"name\": \"Splunk Query Language\",\n\t\t\"aliases\": [\"spl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/splunk\"))\n\t},\n\t{\n\t\t\"id\": \"sql\",\n\t\t\"name\": \"SQL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/sql\"))\n\t},\n\t{\n\t\t\"id\": \"ssh-config\",\n\t\t\"name\": \"SSH Config\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ssh-config\"))\n\t},\n\t{\n\t\t\"id\": \"stata\",\n\t\t\"name\": \"Stata\",\n\t\t\"import\": (() => import(\"@shikijs/langs/stata\"))\n\t},\n\t{\n\t\t\"id\": \"stylus\",\n\t\t\"name\": \"Stylus\",\n\t\t\"aliases\": [\"styl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/stylus\"))\n\t},\n\t{\n\t\t\"id\": \"surrealql\",\n\t\t\"name\": \"SurrealQL\",\n\t\t\"aliases\": [\"surql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/surrealql\"))\n\t},\n\t{\n\t\t\"id\": \"svelte\",\n\t\t\"name\": \"Svelte\",\n\t\t\"import\": (() => import(\"@shikijs/langs/svelte\"))\n\t},\n\t{\n\t\t\"id\": \"swift\",\n\t\t\"name\": \"Swift\",\n\t\t\"import\": (() => import(\"@shikijs/langs/swift\"))\n\t},\n\t{\n\t\t\"id\": \"system-verilog\",\n\t\t\"name\": \"SystemVerilog\",\n\t\t\"import\": (() => import(\"@shikijs/langs/system-verilog\"))\n\t},\n\t{\n\t\t\"id\": \"systemd\",\n\t\t\"name\": \"Systemd Units\",\n\t\t\"import\": (() => import(\"@shikijs/langs/systemd\"))\n\t},\n\t{\n\t\t\"id\": \"talonscript\",\n\t\t\"name\": \"TalonScript\",\n\t\t\"aliases\": [\"talon\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/talonscript\"))\n\t},\n\t{\n\t\t\"id\": \"tasl\",\n\t\t\"name\": \"Tasl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tasl\"))\n\t},\n\t{\n\t\t\"id\": \"tcl\",\n\t\t\"name\": \"Tcl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tcl\"))\n\t},\n\t{\n\t\t\"id\": \"templ\",\n\t\t\"name\": \"Templ\",\n\t\t\"import\": (() => import(\"@shikijs/langs/templ\"))\n\t},\n\t{\n\t\t\"id\": \"terraform\",\n\t\t\"name\": \"Terraform\",\n\t\t\"aliases\": [\"tf\", \"tfvars\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/terraform\"))\n\t},\n\t{\n\t\t\"id\": \"tex\",\n\t\t\"name\": \"TeX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tex\"))\n\t},\n\t{\n\t\t\"id\": \"toml\",\n\t\t\"name\": \"TOML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/toml\"))\n\t},\n\t{\n\t\t\"id\": \"ts-tags\",\n\t\t\"name\": \"TypeScript with Tags\",\n\t\t\"aliases\": [\"lit\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/ts-tags\"))\n\t},\n\t{\n\t\t\"id\": \"tsv\",\n\t\t\"name\": \"TSV\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tsv\"))\n\t},\n\t{\n\t\t\"id\": \"tsx\",\n\t\t\"name\": \"TSX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tsx\"))\n\t},\n\t{\n\t\t\"id\": \"turtle\",\n\t\t\"name\": \"Turtle\",\n\t\t\"import\": (() => import(\"@shikijs/langs/turtle\"))\n\t},\n\t{\n\t\t\"id\": \"twig\",\n\t\t\"name\": \"Twig\",\n\t\t\"import\": (() => import(\"@shikijs/langs/twig\"))\n\t},\n\t{\n\t\t\"id\": \"typescript\",\n\t\t\"name\": \"TypeScript\",\n\t\t\"aliases\": [\n\t\t\t\"ts\",\n\t\t\t\"cts\",\n\t\t\t\"mts\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/typescript\"))\n\t},\n\t{\n\t\t\"id\": \"typespec\",\n\t\t\"name\": \"TypeSpec\",\n\t\t\"aliases\": [\"tsp\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/typespec\"))\n\t},\n\t{\n\t\t\"id\": \"typst\",\n\t\t\"name\": \"Typst\",\n\t\t\"aliases\": [\"typ\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/typst\"))\n\t},\n\t{\n\t\t\"id\": \"v\",\n\t\t\"name\": \"V\",\n\t\t\"import\": (() => import(\"@shikijs/langs/v\"))\n\t},\n\t{\n\t\t\"id\": \"vala\",\n\t\t\"name\": \"Vala\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vala\"))\n\t},\n\t{\n\t\t\"id\": \"vb\",\n\t\t\"name\": \"Visual Basic\",\n\t\t\"aliases\": [\"cmd\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/vb\"))\n\t},\n\t{\n\t\t\"id\": \"verilog\",\n\t\t\"name\": \"Verilog\",\n\t\t\"import\": (() => import(\"@shikijs/langs/verilog\"))\n\t},\n\t{\n\t\t\"id\": \"vhdl\",\n\t\t\"name\": \"VHDL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vhdl\"))\n\t},\n\t{\n\t\t\"id\": \"viml\",\n\t\t\"name\": \"Vim Script\",\n\t\t\"aliases\": [\"vim\", \"vimscript\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/viml\"))\n\t},\n\t{\n\t\t\"id\": \"vue\",\n\t\t\"name\": \"Vue\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vue\"))\n\t},\n\t{\n\t\t\"id\": \"vue-html\",\n\t\t\"name\": \"Vue HTML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vue-html\"))\n\t},\n\t{\n\t\t\"id\": \"vue-vine\",\n\t\t\"name\": \"Vue Vine\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vue-vine\"))\n\t},\n\t{\n\t\t\"id\": \"vyper\",\n\t\t\"name\": \"Vyper\",\n\t\t\"aliases\": [\"vy\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/vyper\"))\n\t},\n\t{\n\t\t\"id\": \"wasm\",\n\t\t\"name\": \"WebAssembly\",\n\t\t\"import\": (() => import(\"@shikijs/langs/wasm\"))\n\t},\n\t{\n\t\t\"id\": \"wenyan\",\n\t\t\"name\": \"Wenyan\",\n\t\t\"aliases\": [\"文言\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/wenyan\"))\n\t},\n\t{\n\t\t\"id\": \"wgsl\",\n\t\t\"name\": \"WGSL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/wgsl\"))\n\t},\n\t{\n\t\t\"id\": \"wikitext\",\n\t\t\"name\": \"Wikitext\",\n\t\t\"aliases\": [\"mediawiki\", \"wiki\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/wikitext\"))\n\t},\n\t{\n\t\t\"id\": \"wit\",\n\t\t\"name\": \"WebAssembly Interface Types\",\n\t\t\"import\": (() => import(\"@shikijs/langs/wit\"))\n\t},\n\t{\n\t\t\"id\": \"wolfram\",\n\t\t\"name\": \"Wolfram\",\n\t\t\"aliases\": [\"wl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/wolfram\"))\n\t},\n\t{\n\t\t\"id\": \"xml\",\n\t\t\"name\": \"XML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/xml\"))\n\t},\n\t{\n\t\t\"id\": \"xsl\",\n\t\t\"name\": \"XSL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/xsl\"))\n\t},\n\t{\n\t\t\"id\": \"yaml\",\n\t\t\"name\": \"YAML\",\n\t\t\"aliases\": [\"yml\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/yaml\"))\n\t},\n\t{\n\t\t\"id\": \"zenscript\",\n\t\t\"name\": \"ZenScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/zenscript\"))\n\t},\n\t{\n\t\t\"id\": \"zig\",\n\t\t\"name\": \"Zig\",\n\t\t\"import\": (() => import(\"@shikijs/langs/zig\"))\n\t}\n];\nconst bundledLanguagesBase = Object.fromEntries(bundledLanguagesInfo.map((i) => [i.id, i.import]));\nconst bundledLanguagesAlias = Object.fromEntries(bundledLanguagesInfo.flatMap((i) => i.aliases?.map((a) => [a, i.import]) || []));\nconst bundledLanguages = {\n\t...bundledLanguagesBase,\n\t...bundledLanguagesAlias\n};\n\n//#endregion\nexport { bundledLanguagesInfo as i, bundledLanguagesAlias as n, bundledLanguagesBase as r, bundledLanguages as t };","//#region src/themes.ts\nconst bundledThemesInfo = [\n\t{\n\t\t\"id\": \"andromeeda\",\n\t\t\"displayName\": \"Andromeeda\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/andromeeda\"))\n\t},\n\t{\n\t\t\"id\": \"aurora-x\",\n\t\t\"displayName\": \"Aurora X\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/aurora-x\"))\n\t},\n\t{\n\t\t\"id\": \"ayu-dark\",\n\t\t\"displayName\": \"Ayu Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/ayu-dark\"))\n\t},\n\t{\n\t\t\"id\": \"ayu-light\",\n\t\t\"displayName\": \"Ayu Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/ayu-light\"))\n\t},\n\t{\n\t\t\"id\": \"ayu-mirage\",\n\t\t\"displayName\": \"Ayu Mirage\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/ayu-mirage\"))\n\t},\n\t{\n\t\t\"id\": \"catppuccin-frappe\",\n\t\t\"displayName\": \"Catppuccin Frappé\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/catppuccin-frappe\"))\n\t},\n\t{\n\t\t\"id\": \"catppuccin-latte\",\n\t\t\"displayName\": \"Catppuccin Latte\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/catppuccin-latte\"))\n\t},\n\t{\n\t\t\"id\": \"catppuccin-macchiato\",\n\t\t\"displayName\": \"Catppuccin Macchiato\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/catppuccin-macchiato\"))\n\t},\n\t{\n\t\t\"id\": \"catppuccin-mocha\",\n\t\t\"displayName\": \"Catppuccin Mocha\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/catppuccin-mocha\"))\n\t},\n\t{\n\t\t\"id\": \"dark-plus\",\n\t\t\"displayName\": \"Dark Plus\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/dark-plus\"))\n\t},\n\t{\n\t\t\"id\": \"dracula\",\n\t\t\"displayName\": \"Dracula Theme\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/dracula\"))\n\t},\n\t{\n\t\t\"id\": \"dracula-soft\",\n\t\t\"displayName\": \"Dracula Theme Soft\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/dracula-soft\"))\n\t},\n\t{\n\t\t\"id\": \"everforest-dark\",\n\t\t\"displayName\": \"Everforest Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/everforest-dark\"))\n\t},\n\t{\n\t\t\"id\": \"everforest-light\",\n\t\t\"displayName\": \"Everforest Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/everforest-light\"))\n\t},\n\t{\n\t\t\"id\": \"github-dark\",\n\t\t\"displayName\": \"GitHub Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-dark\"))\n\t},\n\t{\n\t\t\"id\": \"github-dark-default\",\n\t\t\"displayName\": \"GitHub Dark Default\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-dark-default\"))\n\t},\n\t{\n\t\t\"id\": \"github-dark-dimmed\",\n\t\t\"displayName\": \"GitHub Dark Dimmed\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-dark-dimmed\"))\n\t},\n\t{\n\t\t\"id\": \"github-dark-high-contrast\",\n\t\t\"displayName\": \"GitHub Dark High Contrast\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-dark-high-contrast\"))\n\t},\n\t{\n\t\t\"id\": \"github-light\",\n\t\t\"displayName\": \"GitHub Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-light\"))\n\t},\n\t{\n\t\t\"id\": \"github-light-default\",\n\t\t\"displayName\": \"GitHub Light Default\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-light-default\"))\n\t},\n\t{\n\t\t\"id\": \"github-light-high-contrast\",\n\t\t\"displayName\": \"GitHub Light High Contrast\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-light-high-contrast\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-dark-hard\",\n\t\t\"displayName\": \"Gruvbox Dark Hard\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-dark-hard\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-dark-medium\",\n\t\t\"displayName\": \"Gruvbox Dark Medium\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-dark-medium\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-dark-soft\",\n\t\t\"displayName\": \"Gruvbox Dark Soft\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-dark-soft\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-light-hard\",\n\t\t\"displayName\": \"Gruvbox Light Hard\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-light-hard\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-light-medium\",\n\t\t\"displayName\": \"Gruvbox Light Medium\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-light-medium\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-light-soft\",\n\t\t\"displayName\": \"Gruvbox Light Soft\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-light-soft\"))\n\t},\n\t{\n\t\t\"id\": \"horizon\",\n\t\t\"displayName\": \"Horizon\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/horizon\"))\n\t},\n\t{\n\t\t\"id\": \"horizon-bright\",\n\t\t\"displayName\": \"Horizon Bright\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/horizon-bright\"))\n\t},\n\t{\n\t\t\"id\": \"houston\",\n\t\t\"displayName\": \"Houston\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/houston\"))\n\t},\n\t{\n\t\t\"id\": \"kanagawa-dragon\",\n\t\t\"displayName\": \"Kanagawa Dragon\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/kanagawa-dragon\"))\n\t},\n\t{\n\t\t\"id\": \"kanagawa-lotus\",\n\t\t\"displayName\": \"Kanagawa Lotus\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/kanagawa-lotus\"))\n\t},\n\t{\n\t\t\"id\": \"kanagawa-wave\",\n\t\t\"displayName\": \"Kanagawa Wave\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/kanagawa-wave\"))\n\t},\n\t{\n\t\t\"id\": \"laserwave\",\n\t\t\"displayName\": \"LaserWave\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/laserwave\"))\n\t},\n\t{\n\t\t\"id\": \"light-plus\",\n\t\t\"displayName\": \"Light Plus\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/light-plus\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme\",\n\t\t\"displayName\": \"Material Theme\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme-darker\",\n\t\t\"displayName\": \"Material Theme Darker\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme-darker\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme-lighter\",\n\t\t\"displayName\": \"Material Theme Lighter\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme-lighter\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme-ocean\",\n\t\t\"displayName\": \"Material Theme Ocean\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme-ocean\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme-palenight\",\n\t\t\"displayName\": \"Material Theme Palenight\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme-palenight\"))\n\t},\n\t{\n\t\t\"id\": \"min-dark\",\n\t\t\"displayName\": \"Min Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/min-dark\"))\n\t},\n\t{\n\t\t\"id\": \"min-light\",\n\t\t\"displayName\": \"Min Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/min-light\"))\n\t},\n\t{\n\t\t\"id\": \"monokai\",\n\t\t\"displayName\": \"Monokai\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/monokai\"))\n\t},\n\t{\n\t\t\"id\": \"night-owl\",\n\t\t\"displayName\": \"Night Owl\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/night-owl\"))\n\t},\n\t{\n\t\t\"id\": \"night-owl-light\",\n\t\t\"displayName\": \"Night Owl Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/night-owl-light\"))\n\t},\n\t{\n\t\t\"id\": \"nord\",\n\t\t\"displayName\": \"Nord\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/nord\"))\n\t},\n\t{\n\t\t\"id\": \"one-dark-pro\",\n\t\t\"displayName\": \"One Dark Pro\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/one-dark-pro\"))\n\t},\n\t{\n\t\t\"id\": \"one-light\",\n\t\t\"displayName\": \"One Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/one-light\"))\n\t},\n\t{\n\t\t\"id\": \"plastic\",\n\t\t\"displayName\": \"Plastic\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/plastic\"))\n\t},\n\t{\n\t\t\"id\": \"poimandres\",\n\t\t\"displayName\": \"Poimandres\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/poimandres\"))\n\t},\n\t{\n\t\t\"id\": \"red\",\n\t\t\"displayName\": \"Red\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/red\"))\n\t},\n\t{\n\t\t\"id\": \"rose-pine\",\n\t\t\"displayName\": \"Rosé Pine\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/rose-pine\"))\n\t},\n\t{\n\t\t\"id\": \"rose-pine-dawn\",\n\t\t\"displayName\": \"Rosé Pine Dawn\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/rose-pine-dawn\"))\n\t},\n\t{\n\t\t\"id\": \"rose-pine-moon\",\n\t\t\"displayName\": \"Rosé Pine Moon\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/rose-pine-moon\"))\n\t},\n\t{\n\t\t\"id\": \"slack-dark\",\n\t\t\"displayName\": \"Slack Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/slack-dark\"))\n\t},\n\t{\n\t\t\"id\": \"slack-ochin\",\n\t\t\"displayName\": \"Slack Ochin\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/slack-ochin\"))\n\t},\n\t{\n\t\t\"id\": \"snazzy-light\",\n\t\t\"displayName\": \"Snazzy Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/snazzy-light\"))\n\t},\n\t{\n\t\t\"id\": \"solarized-dark\",\n\t\t\"displayName\": \"Solarized Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/solarized-dark\"))\n\t},\n\t{\n\t\t\"id\": \"solarized-light\",\n\t\t\"displayName\": \"Solarized Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/solarized-light\"))\n\t},\n\t{\n\t\t\"id\": \"synthwave-84\",\n\t\t\"displayName\": \"Synthwave '84\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/synthwave-84\"))\n\t},\n\t{\n\t\t\"id\": \"tokyo-night\",\n\t\t\"displayName\": \"Tokyo Night\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/tokyo-night\"))\n\t},\n\t{\n\t\t\"id\": \"vesper\",\n\t\t\"displayName\": \"Vesper\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/vesper\"))\n\t},\n\t{\n\t\t\"id\": \"vitesse-black\",\n\t\t\"displayName\": \"Vitesse Black\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/vitesse-black\"))\n\t},\n\t{\n\t\t\"id\": \"vitesse-dark\",\n\t\t\"displayName\": \"Vitesse Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/vitesse-dark\"))\n\t},\n\t{\n\t\t\"id\": \"vitesse-light\",\n\t\t\"displayName\": \"Vitesse Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/vitesse-light\"))\n\t}\n];\nconst bundledThemes = Object.fromEntries(bundledThemesInfo.map((i) => [i.id, i.import]));\n\n//#endregion\nexport { bundledThemes, bundledThemesInfo };","//#region src/error.ts\nvar ShikiError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"ShikiError\";\n\t}\n};\n\nfunction getHeapMax() {\n return 2147483648;\n}\nfunction _emscripten_get_now() {\n return typeof performance !== \"undefined\" ? performance.now() : Date.now();\n}\nconst alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple;\nasync function main(init) {\n let wasmMemory;\n let buffer;\n const binding = {};\n function updateGlobalBufferAndViews(buf) {\n buffer = buf;\n binding.HEAPU8 = new Uint8Array(buf);\n binding.HEAPU32 = new Uint32Array(buf);\n }\n function _emscripten_memcpy_big(dest, src, num) {\n binding.HEAPU8.copyWithin(dest, src, src + num);\n }\n function emscripten_realloc_buffer(size) {\n try {\n wasmMemory.grow(size - buffer.byteLength + 65535 >>> 16);\n updateGlobalBufferAndViews(wasmMemory.buffer);\n return 1;\n } catch {\n }\n }\n function _emscripten_resize_heap(requestedSize) {\n const oldSize = binding.HEAPU8.length;\n requestedSize = requestedSize >>> 0;\n const maxHeapSize = getHeapMax();\n if (requestedSize > maxHeapSize)\n return false;\n for (let cutDown = 1; cutDown <= 4; cutDown *= 2) {\n let overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);\n overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n const newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));\n const replacement = emscripten_realloc_buffer(newSize);\n if (replacement)\n return true;\n }\n return false;\n }\n const UTF8Decoder = typeof TextDecoder != \"undefined\" ? new TextDecoder(\"utf8\") : void 0;\n function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead = 1024) {\n const endIdx = idx + maxBytesToRead;\n let endPtr = idx;\n while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;\n if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {\n return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));\n }\n let str = \"\";\n while (idx < endPtr) {\n let u0 = heapOrArray[idx++];\n if (!(u0 & 128)) {\n str += String.fromCharCode(u0);\n continue;\n }\n const u1 = heapOrArray[idx++] & 63;\n if ((u0 & 224) === 192) {\n str += String.fromCharCode((u0 & 31) << 6 | u1);\n continue;\n }\n const u2 = heapOrArray[idx++] & 63;\n if ((u0 & 240) === 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;\n }\n if (u0 < 65536) {\n str += String.fromCharCode(u0);\n } else {\n const ch = u0 - 65536;\n str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);\n }\n }\n return str;\n }\n function UTF8ToString(ptr, maxBytesToRead) {\n return ptr ? UTF8ArrayToString(binding.HEAPU8, ptr, maxBytesToRead) : \"\";\n }\n const asmLibraryArg = {\n emscripten_get_now: _emscripten_get_now,\n emscripten_memcpy_big: _emscripten_memcpy_big,\n emscripten_resize_heap: _emscripten_resize_heap,\n fd_write: () => 0\n };\n async function createWasm() {\n const info = {\n env: asmLibraryArg,\n wasi_snapshot_preview1: asmLibraryArg\n };\n const exports$1 = await init(info);\n wasmMemory = exports$1.memory;\n updateGlobalBufferAndViews(wasmMemory.buffer);\n Object.assign(binding, exports$1);\n binding.UTF8ToString = UTF8ToString;\n }\n await createWasm();\n return binding;\n}\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nlet onigBinding = null;\nfunction throwLastOnigError(onigBinding2) {\n throw new ShikiError(onigBinding2.UTF8ToString(onigBinding2.getLastOnigError()));\n}\nclass UtfString {\n constructor(str) {\n __publicField(this, \"utf16Length\");\n __publicField(this, \"utf8Length\");\n __publicField(this, \"utf16Value\");\n __publicField(this, \"utf8Value\");\n __publicField(this, \"utf16OffsetToUtf8\");\n __publicField(this, \"utf8OffsetToUtf16\");\n const utf16Length = str.length;\n const utf8Length = UtfString._utf8ByteLength(str);\n const computeIndicesMapping = utf8Length !== utf16Length;\n const utf16OffsetToUtf8 = computeIndicesMapping ? new Uint32Array(utf16Length + 1) : null;\n if (computeIndicesMapping)\n utf16OffsetToUtf8[utf16Length] = utf8Length;\n const utf8OffsetToUtf16 = computeIndicesMapping ? new Uint32Array(utf8Length + 1) : null;\n if (computeIndicesMapping)\n utf8OffsetToUtf16[utf8Length] = utf16Length;\n const utf8Value = new Uint8Array(utf8Length);\n let i8 = 0;\n for (let i16 = 0; i16 < utf16Length; i16++) {\n const charCode = str.charCodeAt(i16);\n let codePoint = charCode;\n let wasSurrogatePair = false;\n if (charCode >= 55296 && charCode <= 56319) {\n if (i16 + 1 < utf16Length) {\n const nextCharCode = str.charCodeAt(i16 + 1);\n if (nextCharCode >= 56320 && nextCharCode <= 57343) {\n codePoint = (charCode - 55296 << 10) + 65536 | nextCharCode - 56320;\n wasSurrogatePair = true;\n }\n }\n }\n if (computeIndicesMapping) {\n utf16OffsetToUtf8[i16] = i8;\n if (wasSurrogatePair)\n utf16OffsetToUtf8[i16 + 1] = i8;\n if (codePoint <= 127) {\n utf8OffsetToUtf16[i8 + 0] = i16;\n } else if (codePoint <= 2047) {\n utf8OffsetToUtf16[i8 + 0] = i16;\n utf8OffsetToUtf16[i8 + 1] = i16;\n } else if (codePoint <= 65535) {\n utf8OffsetToUtf16[i8 + 0] = i16;\n utf8OffsetToUtf16[i8 + 1] = i16;\n utf8OffsetToUtf16[i8 + 2] = i16;\n } else {\n utf8OffsetToUtf16[i8 + 0] = i16;\n utf8OffsetToUtf16[i8 + 1] = i16;\n utf8OffsetToUtf16[i8 + 2] = i16;\n utf8OffsetToUtf16[i8 + 3] = i16;\n }\n }\n if (codePoint <= 127) {\n utf8Value[i8++] = codePoint;\n } else if (codePoint <= 2047) {\n utf8Value[i8++] = 192 | (codePoint & 1984) >>> 6;\n utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;\n } else if (codePoint <= 65535) {\n utf8Value[i8++] = 224 | (codePoint & 61440) >>> 12;\n utf8Value[i8++] = 128 | (codePoint & 4032) >>> 6;\n utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;\n } else {\n utf8Value[i8++] = 240 | (codePoint & 1835008) >>> 18;\n utf8Value[i8++] = 128 | (codePoint & 258048) >>> 12;\n utf8Value[i8++] = 128 | (codePoint & 4032) >>> 6;\n utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;\n }\n if (wasSurrogatePair)\n i16++;\n }\n this.utf16Length = utf16Length;\n this.utf8Length = utf8Length;\n this.utf16Value = str;\n this.utf8Value = utf8Value;\n this.utf16OffsetToUtf8 = utf16OffsetToUtf8;\n this.utf8OffsetToUtf16 = utf8OffsetToUtf16;\n }\n static _utf8ByteLength(str) {\n let result = 0;\n for (let i = 0, len = str.length; i < len; i++) {\n const charCode = str.charCodeAt(i);\n let codepoint = charCode;\n let wasSurrogatePair = false;\n if (charCode >= 55296 && charCode <= 56319) {\n if (i + 1 < len) {\n const nextCharCode = str.charCodeAt(i + 1);\n if (nextCharCode >= 56320 && nextCharCode <= 57343) {\n codepoint = (charCode - 55296 << 10) + 65536 | nextCharCode - 56320;\n wasSurrogatePair = true;\n }\n }\n }\n if (codepoint <= 127)\n result += 1;\n else if (codepoint <= 2047)\n result += 2;\n else if (codepoint <= 65535)\n result += 3;\n else\n result += 4;\n if (wasSurrogatePair)\n i++;\n }\n return result;\n }\n createString(onigBinding2) {\n const result = onigBinding2.omalloc(this.utf8Length);\n onigBinding2.HEAPU8.set(this.utf8Value, result);\n return result;\n }\n}\nconst _OnigString = class _OnigString {\n constructor(str) {\n __publicField(this, \"id\", ++_OnigString.LAST_ID);\n __publicField(this, \"_onigBinding\");\n __publicField(this, \"content\");\n __publicField(this, \"utf16Length\");\n __publicField(this, \"utf8Length\");\n __publicField(this, \"utf16OffsetToUtf8\");\n __publicField(this, \"utf8OffsetToUtf16\");\n __publicField(this, \"ptr\");\n if (!onigBinding)\n throw new ShikiError(\"Must invoke loadWasm first.\");\n this._onigBinding = onigBinding;\n this.content = str;\n const utfString = new UtfString(str);\n this.utf16Length = utfString.utf16Length;\n this.utf8Length = utfString.utf8Length;\n this.utf16OffsetToUtf8 = utfString.utf16OffsetToUtf8;\n this.utf8OffsetToUtf16 = utfString.utf8OffsetToUtf16;\n if (this.utf8Length < 1e4 && !_OnigString._sharedPtrInUse) {\n if (!_OnigString._sharedPtr)\n _OnigString._sharedPtr = onigBinding.omalloc(1e4);\n _OnigString._sharedPtrInUse = true;\n onigBinding.HEAPU8.set(utfString.utf8Value, _OnigString._sharedPtr);\n this.ptr = _OnigString._sharedPtr;\n } else {\n this.ptr = utfString.createString(onigBinding);\n }\n }\n convertUtf8OffsetToUtf16(utf8Offset) {\n if (this.utf8OffsetToUtf16) {\n if (utf8Offset < 0)\n return 0;\n if (utf8Offset > this.utf8Length)\n return this.utf16Length;\n return this.utf8OffsetToUtf16[utf8Offset];\n }\n return utf8Offset;\n }\n convertUtf16OffsetToUtf8(utf16Offset) {\n if (this.utf16OffsetToUtf8) {\n if (utf16Offset < 0)\n return 0;\n if (utf16Offset > this.utf16Length)\n return this.utf8Length;\n return this.utf16OffsetToUtf8[utf16Offset];\n }\n return utf16Offset;\n }\n dispose() {\n if (this.ptr === _OnigString._sharedPtr)\n _OnigString._sharedPtrInUse = false;\n else\n this._onigBinding.ofree(this.ptr);\n }\n};\n__publicField(_OnigString, \"LAST_ID\", 0);\n__publicField(_OnigString, \"_sharedPtr\", 0);\n// a pointer to a string of 10000 bytes\n__publicField(_OnigString, \"_sharedPtrInUse\", false);\nlet OnigString = _OnigString;\nclass OnigScanner {\n constructor(patterns) {\n __publicField(this, \"_onigBinding\");\n __publicField(this, \"_ptr\");\n if (!onigBinding)\n throw new ShikiError(\"Must invoke loadWasm first.\");\n const strPtrsArr = [];\n const strLenArr = [];\n for (let i = 0, len = patterns.length; i < len; i++) {\n const utfString = new UtfString(patterns[i]);\n strPtrsArr[i] = utfString.createString(onigBinding);\n strLenArr[i] = utfString.utf8Length;\n }\n const strPtrsPtr = onigBinding.omalloc(4 * patterns.length);\n onigBinding.HEAPU32.set(strPtrsArr, strPtrsPtr / 4);\n const strLenPtr = onigBinding.omalloc(4 * patterns.length);\n onigBinding.HEAPU32.set(strLenArr, strLenPtr / 4);\n const scannerPtr = onigBinding.createOnigScanner(strPtrsPtr, strLenPtr, patterns.length);\n for (let i = 0, len = patterns.length; i < len; i++)\n onigBinding.ofree(strPtrsArr[i]);\n onigBinding.ofree(strLenPtr);\n onigBinding.ofree(strPtrsPtr);\n if (scannerPtr === 0)\n throwLastOnigError(onigBinding);\n this._onigBinding = onigBinding;\n this._ptr = scannerPtr;\n }\n dispose() {\n this._onigBinding.freeOnigScanner(this._ptr);\n }\n findNextMatchSync(string, startPosition, arg) {\n let options = 0 /* None */;\n if (typeof arg === \"number\") {\n options = arg;\n }\n if (typeof string === \"string\") {\n string = new OnigString(string);\n const result = this._findNextMatchSync(string, startPosition, false, options);\n string.dispose();\n return result;\n }\n return this._findNextMatchSync(string, startPosition, false, options);\n }\n _findNextMatchSync(string, startPosition, debugCall, options) {\n const onigBinding2 = this._onigBinding;\n const resultPtr = onigBinding2.findNextOnigScannerMatch(this._ptr, string.id, string.ptr, string.utf8Length, string.convertUtf16OffsetToUtf8(startPosition), options);\n if (resultPtr === 0) {\n return null;\n }\n const HEAPU32 = onigBinding2.HEAPU32;\n let offset = resultPtr / 4;\n const index = HEAPU32[offset++];\n const count = HEAPU32[offset++];\n const captureIndices = [];\n for (let i = 0; i < count; i++) {\n const beg = string.convertUtf8OffsetToUtf16(HEAPU32[offset++]);\n const end = string.convertUtf8OffsetToUtf16(HEAPU32[offset++]);\n captureIndices[i] = {\n start: beg,\n end,\n length: end - beg\n };\n }\n return {\n index,\n captureIndices\n };\n }\n}\nfunction isInstantiatorOptionsObject(dataOrOptions) {\n return typeof dataOrOptions.instantiator === \"function\";\n}\nfunction isInstantiatorModule(dataOrOptions) {\n return typeof dataOrOptions.default === \"function\";\n}\nfunction isDataOptionsObject(dataOrOptions) {\n return typeof dataOrOptions.data !== \"undefined\";\n}\nfunction isResponse(dataOrOptions) {\n return typeof Response !== \"undefined\" && dataOrOptions instanceof Response;\n}\nfunction isArrayBuffer(data) {\n return typeof ArrayBuffer !== \"undefined\" && (data instanceof ArrayBuffer || ArrayBuffer.isView(data)) || typeof Buffer !== \"undefined\" && Buffer.isBuffer?.(data) || typeof SharedArrayBuffer !== \"undefined\" && data instanceof SharedArrayBuffer || typeof Uint32Array !== \"undefined\" && data instanceof Uint32Array;\n}\nlet initPromise;\nfunction loadWasm(options) {\n if (initPromise)\n return initPromise;\n async function _load() {\n onigBinding = await main(async (info) => {\n let instance = options;\n instance = await instance;\n if (typeof instance === \"function\")\n instance = await instance(info);\n if (typeof instance === \"function\")\n instance = await instance(info);\n if (isInstantiatorOptionsObject(instance)) {\n instance = await instance.instantiator(info);\n } else if (isInstantiatorModule(instance)) {\n instance = await instance.default(info);\n } else {\n if (isDataOptionsObject(instance))\n instance = instance.data;\n if (isResponse(instance)) {\n if (typeof WebAssembly.instantiateStreaming === \"function\")\n instance = await _makeResponseStreamingLoader(instance)(info);\n else\n instance = await _makeResponseNonStreamingLoader(instance)(info);\n } else if (isArrayBuffer(instance)) {\n instance = await _makeArrayBufferLoader(instance)(info);\n } else if (instance instanceof WebAssembly.Module) {\n instance = await _makeArrayBufferLoader(instance)(info);\n } else if (\"default\" in instance && instance.default instanceof WebAssembly.Module) {\n instance = await _makeArrayBufferLoader(instance.default)(info);\n }\n }\n if (\"instance\" in instance)\n instance = instance.instance;\n if (\"exports\" in instance)\n instance = instance.exports;\n return instance;\n });\n }\n initPromise = _load();\n return initPromise;\n}\nfunction _makeArrayBufferLoader(data) {\n return (importObject) => WebAssembly.instantiate(data, importObject);\n}\nfunction _makeResponseStreamingLoader(data) {\n return (importObject) => WebAssembly.instantiateStreaming(data, importObject);\n}\nfunction _makeResponseNonStreamingLoader(data) {\n return async (importObject) => {\n const arrayBuffer = await data.arrayBuffer();\n return WebAssembly.instantiate(arrayBuffer, importObject);\n };\n}\n\nlet _defaultWasmLoader;\nfunction setDefaultWasmLoader(_loader) {\n _defaultWasmLoader = _loader;\n}\nfunction getDefaultWasmLoader() {\n return _defaultWasmLoader;\n}\nasync function createOnigurumaEngine(options) {\n if (options)\n await loadWasm(options);\n return {\n createScanner(patterns) {\n return new OnigScanner(patterns.map((p) => typeof p === \"string\" ? p : p.source));\n },\n createString(s) {\n return new OnigString(s);\n }\n };\n}\n\nexport { createOnigurumaEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };\n","import { n as __reExport, t as __exportAll } from \"./chunk-CtajNgzt.mjs\";\n\nexport * from \"@shikijs/engine-oniguruma\"\n\n//#region src/engine-oniguruma.ts\nvar engine_oniguruma_exports = /* @__PURE__ */ __exportAll({});\nimport * as import__shikijs_engine_oniguruma from \"@shikijs/engine-oniguruma\";\n__reExport(engine_oniguruma_exports, import__shikijs_engine_oniguruma);\n\n//#endregion\nexport { engine_oniguruma_exports as t };","import { n as __reExport, t as __exportAll } from \"./chunk-CtajNgzt.mjs\";\nimport { t as engine_oniguruma_exports } from \"./engine-oniguruma.mjs\";\nimport { i as bundledLanguagesInfo, n as bundledLanguagesAlias, r as bundledLanguagesBase, t as bundledLanguages } from \"./langs-bundle-full-DfKZStlK.mjs\";\nimport { bundledThemes, bundledThemesInfo } from \"./themes.mjs\";\nimport { createBundledHighlighter, createSingletonShorthands, guessEmbeddedLanguages } from \"@shikijs/core\";\n\nexport * from \"@shikijs/core\"\n\n//#region src/bundle-full.ts\nvar bundle_full_exports = /* @__PURE__ */ __exportAll({\n\tbundledLanguages: () => bundledLanguages,\n\tbundledLanguagesAlias: () => bundledLanguagesAlias,\n\tbundledLanguagesBase: () => bundledLanguagesBase,\n\tbundledLanguagesInfo: () => bundledLanguagesInfo,\n\tbundledThemes: () => bundledThemes,\n\tbundledThemesInfo: () => bundledThemesInfo,\n\tcodeToHast: () => codeToHast,\n\tcodeToHtml: () => codeToHtml,\n\tcodeToTokens: () => codeToTokens,\n\tcodeToTokensBase: () => codeToTokensBase,\n\tcodeToTokensWithThemes: () => codeToTokensWithThemes,\n\tcreateHighlighter: () => createHighlighter,\n\tgetLastGrammarState: () => getLastGrammarState,\n\tgetSingletonHighlighter: () => getSingletonHighlighter\n});\n/**\n* Initiate a highlighter instance and load the specified languages and themes.\n* Later it can be used synchronously to highlight code.\n*\n* Importing this function will bundle all languages and themes.\n* @see https://shiki.style/guide/bundles#shiki-bundle-full\n*\n* For granular control over the bundle, check:\n* @see https://shiki.style/guide/bundles#fine-grained-bundle\n*/\nconst createHighlighter = /* @__PURE__ */ createBundledHighlighter({\n\tlangs: bundledLanguages,\n\tthemes: bundledThemes,\n\tengine: () => (0, engine_oniguruma_exports.createOnigurumaEngine)(import(\"shiki/wasm\"))\n});\nconst { codeToHtml, codeToHast, codeToTokens, codeToTokensBase, codeToTokensWithThemes, getSingletonHighlighter, getLastGrammarState } = /* @__PURE__ */ createSingletonShorthands(createHighlighter, { guessEmbeddedLanguages });\n\n//#endregion\nexport { bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo, bundledThemes, bundledThemesInfo, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, getLastGrammarState, getSingletonHighlighter, bundle_full_exports as t };","import {\n createShikiHighlighterComponent,\n isInlineCode,\n isLoadableLanguage,\n rehypeInlineCodeProperty,\n useShikiHighlighter\n} from \"./chunk-QPJZGYHO.js\";\n\n// src/bundles/full.ts\nimport {\n getSingletonHighlighter,\n bundledLanguages\n} from \"shiki\";\nimport { createOnigurumaEngine } from \"shiki/engine/oniguruma\";\nasync function createFullHighlighter(langsToLoad, themesToLoad, engine) {\n const langs = langsToLoad.filter(\n (lang) => isLoadableLanguage(lang, bundledLanguages)\n );\n return await getSingletonHighlighter({\n langs,\n themes: themesToLoad,\n engine: engine ?? createOnigurumaEngine(import(\"shiki/wasm\"))\n });\n}\n\n// src/index.ts\nimport {\n createJavaScriptRegexEngine,\n createJavaScriptRawEngine\n} from \"shiki/engine/javascript\";\nvar useShikiHighlighter2 = (code, lang, themeInput, options = {}) => {\n return useShikiHighlighter(\n code,\n lang,\n themeInput,\n options,\n createFullHighlighter\n );\n};\nvar ShikiHighlighter = createShikiHighlighterComponent(\n useShikiHighlighter2\n);\nvar src_default = ShikiHighlighter;\nexport {\n ShikiHighlighter,\n createJavaScriptRawEngine,\n createJavaScriptRegexEngine,\n src_default as default,\n isInlineCode,\n rehypeInlineCodeProperty,\n useShikiHighlighter2 as useShikiHighlighter\n};\n//# sourceMappingURL=index.js.map","import { useDeferredValue, useMemo, type JSX } from 'react';\nimport { useShikiHighlighter } from 'react-shiki';\n\nimport { HighlightCode } from '../../highlight/HighlightCode.js';\n\ntype Props = {\n badgeLabel: string;\n code: string;\n language: string;\n};\n\nconst DEFAULT_THEME = 'github-light';\n\nexport const MarkdownShikiCodeBlock = ({\n badgeLabel,\n code,\n language,\n}: Props): JSX.Element => {\n const normalizedCode = useMemo(() => {\n return code.replace(/\\s+$/, '');\n }, [code]);\n const deferredCode = useDeferredValue(normalizedCode);\n const highlighted = useShikiHighlighter(\n deferredCode,\n language,\n DEFAULT_THEME,\n {\n delay: 60,\n showLineNumbers: false,\n },\n );\n\n return (\n <HighlightCode\n badgeLabel={badgeLabel}\n copyCode={deferredCode}\n fallbackCodeText={deferredCode}\n highlighted={highlighted}\n />\n );\n};\n\nexport default MarkdownShikiCodeBlock;\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69],"mappings":";;;;;AA4DA,SAAgBA,EAAU,GAAQ,GAAS;CACzC,IAAM,IAAW,KAAW,EAAE;AAK9B,SAFc,EAAO,EAAO,SAAS,OAAO,KAAK,CAAC,GAAG,GAAQ,GAAG,GAAG,GAGhE,MACE,EAAS,WAAW,MAAM,MACzB,OACC,EAAS,YAAY,KAAQ,KAAK,KACtC,CACA,MAAM;;;;AE9DX,IAAM,IAAS,2DACT,IAAY,4DAGZC,IAAe,EAAE;AA0CvB,SAAgB,EAAK,GAAM,GAAS;AAGlC,UAFiB,KAAWA,GACR,MAAM,IAAY,GAC5B,KAAK,EAAK;;;;ACrDtB,IAAM,IAAK;AAaX,SAAgB,EAAW,GAAO;AAChC,QAAO,OAAO,KAAU,WACpB,EAAM,SAAS,SACb,EAAM,EAAM,MAAM,GAClB,KACF,EAAM,EAAM;;AAOlB,SAAS,EAAM,GAAO;AACpB,QAAO,EAAM,QAAQ,GAAI,GAAG,KAAK;;;;AC3BnC,IAAa,IAAb,MAAoB;CAWlB,YAAY,GAAU,GAAQ,GAAO;AAInC,EAHA,KAAK,SAAS,GACd,KAAK,WAAW,GAEZ,MACF,KAAK,QAAQ;;;AAKnB,EAAO,UAAU,SAAS,EAAE,EAC5B,EAAO,UAAU,WAAW,EAAE,EAC9B,EA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AQ,KAAU,GAAsB,OAAO,sBAAc;EAC9D,CAAC;;AAQJ,IAAI,MAAwB,GAAM,GAAM,GAAY,IAAU,EAAE,KACvD,GACL,GACA,GACA,GACA,GACA,GACD;AAEoB,GACrB,GACD;;;AC9BD,IAAM,KAAgB,gBAET,MAA0B,EACrC,eACA,SACA,kBACwB;CAIxB,IAAM,IAAe,EAHE,QACd,EAAK,QAAQ,QAAQ,GAAG,EAC9B,CAAC,EAAK,CAAC,CAC2C;AAWrD,QACE,kBAAC,GAAD;EACc;EACZ,UAAU;EACV,kBAAkB;EACL,aAfG,GAClB,GACA,GACA,IACA;GACE,OAAO;GACP,iBAAiB;GAClB,CACF;EAQG,CAAA"}
|
|
1
|
+
{"version":3,"file":"MarkdownShikiCodeBlock-Dj-585Pp.js","names":["stringify","emptyOptions","types","html","svg","cap","find","html","htmlBase","svgBase","stringify","point","own","html","one","element","root","text","find","commas","spaces","name","isIdentifierName","__defProp","ShikiError","ShikiError","Registry","toArray","ShikiError","codeToTokensBase","getLastGrammarState","codeToTokensWithThemes","own","own","emptyChildren","html","body","tbody","find","commas","spaces","html","splitLines$1","ShikiError$1","codeToTokensBase","codeToTokensBase$1","codeToTokens","codeToHast","codeToHtml","createShikiPrimitiveAsync$1","getLastGrammarState","useRef2","import__shikijs_engine_oniguruma"],"sources":["../../../../node_modules/comma-separated-tokens/index.js","../../../../node_modules/devlop/lib/default.js","../../../../node_modules/estree-util-is-identifier-name/lib/index.js","../../../../node_modules/hast-util-whitespace/lib/index.js","../../../../node_modules/property-information/lib/util/schema.js","../../../../node_modules/property-information/lib/util/merge.js","../../../../node_modules/property-information/lib/normalize.js","../../../../node_modules/property-information/lib/util/info.js","../../../../node_modules/property-information/lib/util/types.js","../../../../node_modules/property-information/lib/util/defined-info.js","../../../../node_modules/property-information/lib/util/create.js","../../../../node_modules/property-information/lib/aria.js","../../../../node_modules/property-information/lib/util/case-sensitive-transform.js","../../../../node_modules/property-information/lib/util/case-insensitive-transform.js","../../../../node_modules/property-information/lib/html.js","../../../../node_modules/property-information/lib/svg.js","../../../../node_modules/property-information/lib/xlink.js","../../../../node_modules/property-information/lib/xmlns.js","../../../../node_modules/property-information/lib/xml.js","../../../../node_modules/property-information/lib/hast-to-react.js","../../../../node_modules/property-information/lib/find.js","../../../../node_modules/property-information/index.js","../../../../node_modules/space-separated-tokens/index.js","../../../../node_modules/inline-style-parser/cjs/index.js","../../../../node_modules/style-to-object/cjs/index.js","../../../../node_modules/style-to-js/cjs/utilities.js","../../../../node_modules/style-to-js/cjs/index.js","../../../../node_modules/unist-util-position/lib/index.js","../../../../node_modules/unist-util-stringify-position/lib/index.js","../../../../node_modules/vfile-message/lib/index.js","../../../../node_modules/hast-util-to-jsx-runtime/lib/index.js","../../../../node_modules/shiki/dist/chunk-CtajNgzt.mjs","../../../../node_modules/@shikijs/core/node_modules/@shikijs/types/dist/index.mjs","../../../../node_modules/@shikijs/primitive/node_modules/@shikijs/types/dist/index.mjs","../../../../node_modules/@shikijs/vscode-textmate/dist/index.js","../../../../node_modules/@shikijs/primitive/dist/index.mjs","../../../../node_modules/html-void-elements/index.js","../../../../node_modules/zwitch/index.js","../../../../node_modules/stringify-entities/lib/core.js","../../../../node_modules/stringify-entities/lib/util/to-hexadecimal.js","../../../../node_modules/stringify-entities/lib/util/to-decimal.js","../../../../node_modules/character-entities-legacy/index.js","../../../../node_modules/character-entities-html4/index.js","../../../../node_modules/stringify-entities/lib/constant/dangerous.js","../../../../node_modules/stringify-entities/lib/util/to-named.js","../../../../node_modules/stringify-entities/lib/util/format-smart.js","../../../../node_modules/stringify-entities/lib/index.js","../../../../node_modules/hast-util-to-html/lib/handle/comment.js","../../../../node_modules/hast-util-to-html/lib/handle/doctype.js","../../../../node_modules/ccount/index.js","../../../../node_modules/hast-util-to-html/lib/omission/util/siblings.js","../../../../node_modules/hast-util-to-html/lib/omission/omission.js","../../../../node_modules/hast-util-to-html/lib/omission/closing.js","../../../../node_modules/hast-util-to-html/lib/omission/opening.js","../../../../node_modules/hast-util-to-html/lib/handle/element.js","../../../../node_modules/hast-util-to-html/lib/handle/text.js","../../../../node_modules/hast-util-to-html/lib/handle/raw.js","../../../../node_modules/hast-util-to-html/lib/handle/root.js","../../../../node_modules/hast-util-to-html/lib/handle/index.js","../../../../node_modules/hast-util-to-html/lib/index.js","../../../../node_modules/@shikijs/core/dist/index.mjs","../../../../node_modules/dequal/dist/index.mjs","../../../../node_modules/clsx/dist/clsx.mjs","../../../../node_modules/react-shiki/dist/chunk-QPJZGYHO.js","../../../../node_modules/shiki/dist/langs-bundle-full-DfKZStlK.mjs","../../../../node_modules/shiki/dist/themes.mjs","../../../../node_modules/shiki/node_modules/@shikijs/engine-oniguruma/dist/index.mjs","../../../../node_modules/shiki/dist/engine-oniguruma.mjs","../../../../node_modules/shiki/dist/bundle-full.mjs","../../../../node_modules/react-shiki/dist/index.js","../../src/atomic/molecules/markdown/components/MarkdownShikiCodeBlock.tsx"],"sourcesContent":["/**\n * @typedef Options\n * Configuration for `stringify`.\n * @property {boolean} [padLeft=true]\n * Whether to pad a space before a token.\n * @property {boolean} [padRight=false]\n * Whether to pad a space after a token.\n */\n\n/**\n * @typedef {Options} StringifyOptions\n * Please use `StringifyOptions` instead.\n */\n\n/**\n * Parse comma-separated tokens to an array.\n *\n * @param {string} value\n * Comma-separated tokens.\n * @returns {Array<string>}\n * List of tokens.\n */\nexport function parse(value) {\n /** @type {Array<string>} */\n const tokens = []\n const input = String(value || '')\n let index = input.indexOf(',')\n let start = 0\n /** @type {boolean} */\n let end = false\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n const token = input.slice(start, index).trim()\n\n if (token || !end) {\n tokens.push(token)\n }\n\n start = index + 1\n index = input.indexOf(',', start)\n }\n\n return tokens\n}\n\n/**\n * Serialize an array of strings or numbers to comma-separated tokens.\n *\n * @param {Array<string|number>} values\n * List of tokens.\n * @param {Options} [options]\n * Configuration for `stringify` (optional).\n * @returns {string}\n * Comma-separated tokens.\n */\nexport function stringify(values, options) {\n const settings = options || {}\n\n // Ensure the last empty entry is seen.\n const input = values[values.length - 1] === '' ? [...values, ''] : values\n\n return input\n .join(\n (settings.padRight ? ' ' : '') +\n ',' +\n (settings.padLeft === false ? '' : ' ')\n )\n .trim()\n}\n","export function deprecate(fn) {\n return fn\n}\n\nexport function equal() {}\n\nexport function ok() {}\n\nexport function unreachable() {}\n","/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [jsx=false]\n * Support JSX identifiers (default: `false`).\n */\n\nconst startRe = /[$_\\p{ID_Start}]/u\nconst contRe = /[$_\\u{200C}\\u{200D}\\p{ID_Continue}]/u\nconst contReJsx = /[-$_\\u{200C}\\u{200D}\\p{ID_Continue}]/u\nconst nameRe = /^[$_\\p{ID_Start}][$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u\nconst nameReJsx = /^[$_\\p{ID_Start}][-$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Checks if the given code point can start an identifier.\n *\n * @param {number | undefined} code\n * Code point to check.\n * @returns {boolean}\n * Whether `code` can start an identifier.\n */\n// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.\nexport function start(code) {\n return code ? startRe.test(String.fromCodePoint(code)) : false\n}\n\n/**\n * Checks if the given code point can continue an identifier.\n *\n * @param {number | undefined} code\n * Code point to check.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {boolean}\n * Whether `code` can continue an identifier.\n */\n// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.\nexport function cont(code, options) {\n const settings = options || emptyOptions\n const re = settings.jsx ? contReJsx : contRe\n return code ? re.test(String.fromCodePoint(code)) : false\n}\n\n/**\n * Checks if the given value is a valid identifier name.\n *\n * @param {string} name\n * Identifier to check.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {boolean}\n * Whether `name` can be an identifier.\n */\nexport function name(name, options) {\n const settings = options || emptyOptions\n const re = settings.jsx ? nameReJsx : nameRe\n return re.test(name)\n}\n","/**\n * @typedef {import('hast').Nodes} Nodes\n */\n\n// HTML whitespace expression.\n// See <https://infra.spec.whatwg.org/#ascii-whitespace>.\nconst re = /[ \\t\\n\\f\\r]/g\n\n/**\n * Check if the given value is *inter-element whitespace*.\n *\n * @param {Nodes | string} thing\n * Thing to check (`Node` or `string`).\n * @returns {boolean}\n * Whether the `value` is inter-element whitespace (`boolean`): consisting of\n * zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n * (`\\r`), or form feed (`\\f`); if a node is passed it must be a `Text` node,\n * whose `value` field is checked.\n */\nexport function whitespace(thing) {\n return typeof thing === 'object'\n ? thing.type === 'text'\n ? empty(thing.value)\n : false\n : empty(thing)\n}\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction empty(value) {\n return value.replace(re, '') === ''\n}\n","/**\n * @import {Schema as SchemaType, Space} from 'property-information'\n */\n\n/** @type {SchemaType} */\nexport class Schema {\n /**\n * @param {SchemaType['property']} property\n * Property.\n * @param {SchemaType['normal']} normal\n * Normal.\n * @param {Space | undefined} [space]\n * Space.\n * @returns\n * Schema.\n */\n constructor(property, normal, space) {\n this.normal = normal\n this.property = property\n\n if (space) {\n this.space = space\n }\n }\n}\n\nSchema.prototype.normal = {}\nSchema.prototype.property = {}\nSchema.prototype.space = undefined\n","/**\n * @import {Info, Space} from 'property-information'\n */\n\nimport {Schema} from './schema.js'\n\n/**\n * @param {ReadonlyArray<Schema>} definitions\n * Definitions.\n * @param {Space | undefined} [space]\n * Space.\n * @returns {Schema}\n * Schema.\n */\nexport function merge(definitions, space) {\n /** @type {Record<string, Info>} */\n const property = {}\n /** @type {Record<string, string>} */\n const normal = {}\n\n for (const definition of definitions) {\n Object.assign(property, definition.property)\n Object.assign(normal, definition.normal)\n }\n\n return new Schema(property, normal, space)\n}\n","/**\n * Get the cleaned case insensitive form of an attribute or property.\n *\n * @param {string} value\n * An attribute-like or property-like name.\n * @returns {string}\n * Value that can be used to look up the properly cased property on a\n * `Schema`.\n */\nexport function normalize(value) {\n return value.toLowerCase()\n}\n","/**\n * @import {Info as InfoType} from 'property-information'\n */\n\n/** @type {InfoType} */\nexport class Info {\n /**\n * @param {string} property\n * Property.\n * @param {string} attribute\n * Attribute.\n * @returns\n * Info.\n */\n constructor(property, attribute) {\n this.attribute = attribute\n this.property = property\n }\n}\n\nInfo.prototype.attribute = ''\nInfo.prototype.booleanish = false\nInfo.prototype.boolean = false\nInfo.prototype.commaOrSpaceSeparated = false\nInfo.prototype.commaSeparated = false\nInfo.prototype.defined = false\nInfo.prototype.mustUseProperty = false\nInfo.prototype.number = false\nInfo.prototype.overloadedBoolean = false\nInfo.prototype.property = ''\nInfo.prototype.spaceSeparated = false\nInfo.prototype.space = undefined\n","let powers = 0\n\nexport const boolean = increment()\nexport const booleanish = increment()\nexport const overloadedBoolean = increment()\nexport const number = increment()\nexport const spaceSeparated = increment()\nexport const commaSeparated = increment()\nexport const commaOrSpaceSeparated = increment()\n\nfunction increment() {\n return 2 ** ++powers\n}\n","/**\n * @import {Space} from 'property-information'\n */\n\nimport {Info} from './info.js'\nimport * as types from './types.js'\n\nconst checks = /** @type {ReadonlyArray<keyof typeof types>} */ (\n Object.keys(types)\n)\n\nexport class DefinedInfo extends Info {\n /**\n * @constructor\n * @param {string} property\n * Property.\n * @param {string} attribute\n * Attribute.\n * @param {number | null | undefined} [mask]\n * Mask.\n * @param {Space | undefined} [space]\n * Space.\n * @returns\n * Info.\n */\n constructor(property, attribute, mask, space) {\n let index = -1\n\n super(property, attribute)\n\n mark(this, 'space', space)\n\n if (typeof mask === 'number') {\n while (++index < checks.length) {\n const check = checks[index]\n mark(this, checks[index], (mask & types[check]) === types[check])\n }\n }\n }\n}\n\nDefinedInfo.prototype.defined = true\n\n/**\n * @template {keyof DefinedInfo} Key\n * Key type.\n * @param {DefinedInfo} values\n * Info.\n * @param {Key} key\n * Key.\n * @param {DefinedInfo[Key]} value\n * Value.\n * @returns {undefined}\n * Nothing.\n */\nfunction mark(values, key, value) {\n if (value) {\n values[key] = value\n }\n}\n","/**\n * @import {Info, Space} from 'property-information'\n */\n\n/**\n * @typedef Definition\n * Definition of a schema.\n * @property {Record<string, string> | undefined} [attributes]\n * Normalzed names to special attribute case.\n * @property {ReadonlyArray<string> | undefined} [mustUseProperty]\n * Normalized names that must be set as properties.\n * @property {Record<string, number | null>} properties\n * Property names to their types.\n * @property {Space | undefined} [space]\n * Space.\n * @property {Transform} transform\n * Transform a property name.\n */\n\n/**\n * @callback Transform\n * Transform.\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} property\n * Property.\n * @returns {string}\n * Attribute.\n */\n\nimport {normalize} from '../normalize.js'\nimport {DefinedInfo} from './defined-info.js'\nimport {Schema} from './schema.js'\n\n/**\n * @param {Definition} definition\n * Definition.\n * @returns {Schema}\n * Schema.\n */\nexport function create(definition) {\n /** @type {Record<string, Info>} */\n const properties = {}\n /** @type {Record<string, string>} */\n const normals = {}\n\n for (const [property, value] of Object.entries(definition.properties)) {\n const info = new DefinedInfo(\n property,\n definition.transform(definition.attributes || {}, property),\n value,\n definition.space\n )\n\n if (\n definition.mustUseProperty &&\n definition.mustUseProperty.includes(property)\n ) {\n info.mustUseProperty = true\n }\n\n properties[property] = info\n\n normals[normalize(property)] = property\n normals[normalize(info.attribute)] = property\n }\n\n return new Schema(properties, normals, definition.space)\n}\n","import {create} from './util/create.js'\nimport {booleanish, number, spaceSeparated} from './util/types.js'\n\nexport const aria = create({\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n },\n transform(_, property) {\n return property === 'role'\n ? property\n : 'aria-' + property.slice(4).toLowerCase()\n }\n})\n","/**\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} attribute\n * Attribute.\n * @returns {string}\n * Transformed attribute.\n */\nexport function caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute\n}\n","import {caseSensitiveTransform} from './case-sensitive-transform.js'\n\n/**\n * @param {Record<string, string>} attributes\n * Attributes.\n * @param {string} property\n * Property.\n * @returns {string}\n * Transformed property.\n */\nexport function caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase())\n}\n","import {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\nimport {create} from './util/create.js'\nimport {\n booleanish,\n boolean,\n commaSeparated,\n number,\n overloadedBoolean,\n spaceSeparated\n} from './util/types.js'\n\nexport const html = create({\n attributes: {\n acceptcharset: 'accept-charset',\n classname: 'class',\n htmlfor: 'for',\n httpequiv: 'http-equiv'\n },\n mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],\n properties: {\n // Standard Properties.\n abbr: null,\n accept: commaSeparated,\n acceptCharset: spaceSeparated,\n accessKey: spaceSeparated,\n action: null,\n allow: null,\n allowFullScreen: boolean,\n allowPaymentRequest: boolean,\n allowUserMedia: boolean,\n alt: null,\n as: null,\n async: boolean,\n autoCapitalize: null,\n autoComplete: spaceSeparated,\n autoFocus: boolean,\n autoPlay: boolean,\n blocking: spaceSeparated,\n capture: null,\n charSet: null,\n checked: boolean,\n cite: null,\n className: spaceSeparated,\n cols: number,\n colSpan: null,\n content: null,\n contentEditable: booleanish,\n controls: boolean,\n controlsList: spaceSeparated,\n coords: number | commaSeparated,\n crossOrigin: null,\n data: null,\n dateTime: null,\n decoding: null,\n default: boolean,\n defer: boolean,\n dir: null,\n dirName: null,\n disabled: boolean,\n download: overloadedBoolean,\n draggable: booleanish,\n encType: null,\n enterKeyHint: null,\n fetchPriority: null,\n form: null,\n formAction: null,\n formEncType: null,\n formMethod: null,\n formNoValidate: boolean,\n formTarget: null,\n headers: spaceSeparated,\n height: number,\n hidden: overloadedBoolean,\n high: number,\n href: null,\n hrefLang: null,\n htmlFor: spaceSeparated,\n httpEquiv: spaceSeparated,\n id: null,\n imageSizes: null,\n imageSrcSet: null,\n inert: boolean,\n inputMode: null,\n integrity: null,\n is: null,\n isMap: boolean,\n itemId: null,\n itemProp: spaceSeparated,\n itemRef: spaceSeparated,\n itemScope: boolean,\n itemType: spaceSeparated,\n kind: null,\n label: null,\n lang: null,\n language: null,\n list: null,\n loading: null,\n loop: boolean,\n low: number,\n manifest: null,\n max: null,\n maxLength: number,\n media: null,\n method: null,\n min: null,\n minLength: number,\n multiple: boolean,\n muted: boolean,\n name: null,\n nonce: null,\n noModule: boolean,\n noValidate: boolean,\n onAbort: null,\n onAfterPrint: null,\n onAuxClick: null,\n onBeforeMatch: null,\n onBeforePrint: null,\n onBeforeToggle: null,\n onBeforeUnload: null,\n onBlur: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onContextLost: null,\n onContextMenu: null,\n onContextRestored: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFormData: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLanguageChange: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadEnd: null,\n onLoadStart: null,\n onMessage: null,\n onMessageError: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRejectionHandled: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onScrollEnd: null,\n onSecurityPolicyViolation: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onSlotChange: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnhandledRejection: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onWheel: null,\n open: boolean,\n optimum: number,\n pattern: null,\n ping: spaceSeparated,\n placeholder: null,\n playsInline: boolean,\n popover: null,\n popoverTarget: null,\n popoverTargetAction: null,\n poster: null,\n preload: null,\n readOnly: boolean,\n referrerPolicy: null,\n rel: spaceSeparated,\n required: boolean,\n reversed: boolean,\n rows: number,\n rowSpan: number,\n sandbox: spaceSeparated,\n scope: null,\n scoped: boolean,\n seamless: boolean,\n selected: boolean,\n shadowRootClonable: boolean,\n shadowRootDelegatesFocus: boolean,\n shadowRootMode: null,\n shape: null,\n size: number,\n sizes: null,\n slot: null,\n span: number,\n spellCheck: booleanish,\n src: null,\n srcDoc: null,\n srcLang: null,\n srcSet: null,\n start: number,\n step: null,\n style: null,\n tabIndex: number,\n target: null,\n title: null,\n translate: null,\n type: null,\n typeMustMatch: boolean,\n useMap: null,\n value: booleanish,\n width: number,\n wrap: null,\n writingSuggestions: null,\n\n // Legacy.\n // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis\n align: null, // Several. Use CSS `text-align` instead,\n aLink: null, // `<body>`. Use CSS `a:active {color}` instead\n archive: spaceSeparated, // `<object>`. List of URIs to archives\n axis: null, // `<td>` and `<th>`. Use `scope` on `<th>`\n background: null, // `<body>`. Use CSS `background-image` instead\n bgColor: null, // `<body>` and table elements. Use CSS `background-color` instead\n border: number, // `<table>`. Use CSS `border-width` instead,\n borderColor: null, // `<table>`. Use CSS `border-color` instead,\n bottomMargin: number, // `<body>`\n cellPadding: null, // `<table>`\n cellSpacing: null, // `<table>`\n char: null, // Several table elements. When `align=char`, sets the character to align on\n charOff: null, // Several table elements. When `char`, offsets the alignment\n classId: null, // `<object>`\n clear: null, // `<br>`. Use CSS `clear` instead\n code: null, // `<object>`\n codeBase: null, // `<object>`\n codeType: null, // `<object>`\n color: null, // `<font>` and `<hr>`. Use CSS instead\n compact: boolean, // Lists. Use CSS to reduce space between items instead\n declare: boolean, // `<object>`\n event: null, // `<script>`\n face: null, // `<font>`. Use CSS instead\n frame: null, // `<table>`\n frameBorder: null, // `<iframe>`. Use CSS `border` instead\n hSpace: number, // `<img>` and `<object>`\n leftMargin: number, // `<body>`\n link: null, // `<body>`. Use CSS `a:link {color: *}` instead\n longDesc: null, // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`\n lowSrc: null, // `<img>`. Use a `<picture>`\n marginHeight: number, // `<body>`\n marginWidth: number, // `<body>`\n noResize: boolean, // `<frame>`\n noHref: boolean, // `<area>`. Use no href instead of an explicit `nohref`\n noShade: boolean, // `<hr>`. Use background-color and height instead of borders\n noWrap: boolean, // `<td>` and `<th>`\n object: null, // `<applet>`\n profile: null, // `<head>`\n prompt: null, // `<isindex>`\n rev: null, // `<link>`\n rightMargin: number, // `<body>`\n rules: null, // `<table>`\n scheme: null, // `<meta>`\n scrolling: booleanish, // `<frame>`. Use overflow in the child context\n standby: null, // `<object>`\n summary: null, // `<table>`\n text: null, // `<body>`. Use CSS `color` instead\n topMargin: number, // `<body>`\n valueType: null, // `<param>`\n version: null, // `<html>`. Use a doctype.\n vAlign: null, // Several. Use CSS `vertical-align` instead\n vLink: null, // `<body>`. Use CSS `a:visited {color}` instead\n vSpace: number, // `<img>` and `<object>`\n\n // Non-standard Properties.\n allowTransparency: null,\n autoCorrect: null,\n autoSave: null,\n disablePictureInPicture: boolean,\n disableRemotePlayback: boolean,\n prefix: null,\n property: null,\n results: number,\n security: null,\n unselectable: null\n },\n space: 'html',\n transform: caseInsensitiveTransform\n})\n","import {caseSensitiveTransform} from './util/case-sensitive-transform.js'\nimport {create} from './util/create.js'\nimport {\n boolean,\n commaOrSpaceSeparated,\n commaSeparated,\n number,\n spaceSeparated\n} from './util/types.js'\n\nexport const svg = create({\n attributes: {\n accentHeight: 'accent-height',\n alignmentBaseline: 'alignment-baseline',\n arabicForm: 'arabic-form',\n baselineShift: 'baseline-shift',\n capHeight: 'cap-height',\n className: 'class',\n clipPath: 'clip-path',\n clipRule: 'clip-rule',\n colorInterpolation: 'color-interpolation',\n colorInterpolationFilters: 'color-interpolation-filters',\n colorProfile: 'color-profile',\n colorRendering: 'color-rendering',\n crossOrigin: 'crossorigin',\n dataType: 'datatype',\n dominantBaseline: 'dominant-baseline',\n enableBackground: 'enable-background',\n fillOpacity: 'fill-opacity',\n fillRule: 'fill-rule',\n floodColor: 'flood-color',\n floodOpacity: 'flood-opacity',\n fontFamily: 'font-family',\n fontSize: 'font-size',\n fontSizeAdjust: 'font-size-adjust',\n fontStretch: 'font-stretch',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n glyphName: 'glyph-name',\n glyphOrientationHorizontal: 'glyph-orientation-horizontal',\n glyphOrientationVertical: 'glyph-orientation-vertical',\n hrefLang: 'hreflang',\n horizAdvX: 'horiz-adv-x',\n horizOriginX: 'horiz-origin-x',\n horizOriginY: 'horiz-origin-y',\n imageRendering: 'image-rendering',\n letterSpacing: 'letter-spacing',\n lightingColor: 'lighting-color',\n markerEnd: 'marker-end',\n markerMid: 'marker-mid',\n markerStart: 'marker-start',\n navDown: 'nav-down',\n navDownLeft: 'nav-down-left',\n navDownRight: 'nav-down-right',\n navLeft: 'nav-left',\n navNext: 'nav-next',\n navPrev: 'nav-prev',\n navRight: 'nav-right',\n navUp: 'nav-up',\n navUpLeft: 'nav-up-left',\n navUpRight: 'nav-up-right',\n onAbort: 'onabort',\n onActivate: 'onactivate',\n onAfterPrint: 'onafterprint',\n onBeforePrint: 'onbeforeprint',\n onBegin: 'onbegin',\n onCancel: 'oncancel',\n onCanPlay: 'oncanplay',\n onCanPlayThrough: 'oncanplaythrough',\n onChange: 'onchange',\n onClick: 'onclick',\n onClose: 'onclose',\n onCopy: 'oncopy',\n onCueChange: 'oncuechange',\n onCut: 'oncut',\n onDblClick: 'ondblclick',\n onDrag: 'ondrag',\n onDragEnd: 'ondragend',\n onDragEnter: 'ondragenter',\n onDragExit: 'ondragexit',\n onDragLeave: 'ondragleave',\n onDragOver: 'ondragover',\n onDragStart: 'ondragstart',\n onDrop: 'ondrop',\n onDurationChange: 'ondurationchange',\n onEmptied: 'onemptied',\n onEnd: 'onend',\n onEnded: 'onended',\n onError: 'onerror',\n onFocus: 'onfocus',\n onFocusIn: 'onfocusin',\n onFocusOut: 'onfocusout',\n onHashChange: 'onhashchange',\n onInput: 'oninput',\n onInvalid: 'oninvalid',\n onKeyDown: 'onkeydown',\n onKeyPress: 'onkeypress',\n onKeyUp: 'onkeyup',\n onLoad: 'onload',\n onLoadedData: 'onloadeddata',\n onLoadedMetadata: 'onloadedmetadata',\n onLoadStart: 'onloadstart',\n onMessage: 'onmessage',\n onMouseDown: 'onmousedown',\n onMouseEnter: 'onmouseenter',\n onMouseLeave: 'onmouseleave',\n onMouseMove: 'onmousemove',\n onMouseOut: 'onmouseout',\n onMouseOver: 'onmouseover',\n onMouseUp: 'onmouseup',\n onMouseWheel: 'onmousewheel',\n onOffline: 'onoffline',\n onOnline: 'ononline',\n onPageHide: 'onpagehide',\n onPageShow: 'onpageshow',\n onPaste: 'onpaste',\n onPause: 'onpause',\n onPlay: 'onplay',\n onPlaying: 'onplaying',\n onPopState: 'onpopstate',\n onProgress: 'onprogress',\n onRateChange: 'onratechange',\n onRepeat: 'onrepeat',\n onReset: 'onreset',\n onResize: 'onresize',\n onScroll: 'onscroll',\n onSeeked: 'onseeked',\n onSeeking: 'onseeking',\n onSelect: 'onselect',\n onShow: 'onshow',\n onStalled: 'onstalled',\n onStorage: 'onstorage',\n onSubmit: 'onsubmit',\n onSuspend: 'onsuspend',\n onTimeUpdate: 'ontimeupdate',\n onToggle: 'ontoggle',\n onUnload: 'onunload',\n onVolumeChange: 'onvolumechange',\n onWaiting: 'onwaiting',\n onZoom: 'onzoom',\n overlinePosition: 'overline-position',\n overlineThickness: 'overline-thickness',\n paintOrder: 'paint-order',\n panose1: 'panose-1',\n pointerEvents: 'pointer-events',\n referrerPolicy: 'referrerpolicy',\n renderingIntent: 'rendering-intent',\n shapeRendering: 'shape-rendering',\n stopColor: 'stop-color',\n stopOpacity: 'stop-opacity',\n strikethroughPosition: 'strikethrough-position',\n strikethroughThickness: 'strikethrough-thickness',\n strokeDashArray: 'stroke-dasharray',\n strokeDashOffset: 'stroke-dashoffset',\n strokeLineCap: 'stroke-linecap',\n strokeLineJoin: 'stroke-linejoin',\n strokeMiterLimit: 'stroke-miterlimit',\n strokeOpacity: 'stroke-opacity',\n strokeWidth: 'stroke-width',\n tabIndex: 'tabindex',\n textAnchor: 'text-anchor',\n textDecoration: 'text-decoration',\n textRendering: 'text-rendering',\n transformOrigin: 'transform-origin',\n typeOf: 'typeof',\n underlinePosition: 'underline-position',\n underlineThickness: 'underline-thickness',\n unicodeBidi: 'unicode-bidi',\n unicodeRange: 'unicode-range',\n unitsPerEm: 'units-per-em',\n vAlphabetic: 'v-alphabetic',\n vHanging: 'v-hanging',\n vIdeographic: 'v-ideographic',\n vMathematical: 'v-mathematical',\n vectorEffect: 'vector-effect',\n vertAdvY: 'vert-adv-y',\n vertOriginX: 'vert-origin-x',\n vertOriginY: 'vert-origin-y',\n wordSpacing: 'word-spacing',\n writingMode: 'writing-mode',\n xHeight: 'x-height',\n // These were camelcased in Tiny. Now lowercased in SVG 2\n playbackOrder: 'playbackorder',\n timelineBegin: 'timelinebegin'\n },\n properties: {\n about: commaOrSpaceSeparated,\n accentHeight: number,\n accumulate: null,\n additive: null,\n alignmentBaseline: null,\n alphabetic: number,\n amplitude: number,\n arabicForm: null,\n ascent: number,\n attributeName: null,\n attributeType: null,\n azimuth: number,\n bandwidth: null,\n baselineShift: null,\n baseFrequency: null,\n baseProfile: null,\n bbox: null,\n begin: null,\n bias: number,\n by: null,\n calcMode: null,\n capHeight: number,\n className: spaceSeparated,\n clip: null,\n clipPath: null,\n clipPathUnits: null,\n clipRule: null,\n color: null,\n colorInterpolation: null,\n colorInterpolationFilters: null,\n colorProfile: null,\n colorRendering: null,\n content: null,\n contentScriptType: null,\n contentStyleType: null,\n crossOrigin: null,\n cursor: null,\n cx: null,\n cy: null,\n d: null,\n dataType: null,\n defaultAction: null,\n descent: number,\n diffuseConstant: number,\n direction: null,\n display: null,\n dur: null,\n divisor: number,\n dominantBaseline: null,\n download: boolean,\n dx: null,\n dy: null,\n edgeMode: null,\n editable: null,\n elevation: number,\n enableBackground: null,\n end: null,\n event: null,\n exponent: number,\n externalResourcesRequired: null,\n fill: null,\n fillOpacity: number,\n fillRule: null,\n filter: null,\n filterRes: null,\n filterUnits: null,\n floodColor: null,\n floodOpacity: null,\n focusable: null,\n focusHighlight: null,\n fontFamily: null,\n fontSize: null,\n fontSizeAdjust: null,\n fontStretch: null,\n fontStyle: null,\n fontVariant: null,\n fontWeight: null,\n format: null,\n fr: null,\n from: null,\n fx: null,\n fy: null,\n g1: commaSeparated,\n g2: commaSeparated,\n glyphName: commaSeparated,\n glyphOrientationHorizontal: null,\n glyphOrientationVertical: null,\n glyphRef: null,\n gradientTransform: null,\n gradientUnits: null,\n handler: null,\n hanging: number,\n hatchContentUnits: null,\n hatchUnits: null,\n height: null,\n href: null,\n hrefLang: null,\n horizAdvX: number,\n horizOriginX: number,\n horizOriginY: number,\n id: null,\n ideographic: number,\n imageRendering: null,\n initialVisibility: null,\n in: null,\n in2: null,\n intercept: number,\n k: number,\n k1: number,\n k2: number,\n k3: number,\n k4: number,\n kernelMatrix: commaOrSpaceSeparated,\n kernelUnitLength: null,\n keyPoints: null, // SEMI_COLON_SEPARATED\n keySplines: null, // SEMI_COLON_SEPARATED\n keyTimes: null, // SEMI_COLON_SEPARATED\n kerning: null,\n lang: null,\n lengthAdjust: null,\n letterSpacing: null,\n lightingColor: null,\n limitingConeAngle: number,\n local: null,\n markerEnd: null,\n markerMid: null,\n markerStart: null,\n markerHeight: null,\n markerUnits: null,\n markerWidth: null,\n mask: null,\n maskContentUnits: null,\n maskUnits: null,\n mathematical: null,\n max: null,\n media: null,\n mediaCharacterEncoding: null,\n mediaContentEncodings: null,\n mediaSize: number,\n mediaTime: null,\n method: null,\n min: null,\n mode: null,\n name: null,\n navDown: null,\n navDownLeft: null,\n navDownRight: null,\n navLeft: null,\n navNext: null,\n navPrev: null,\n navRight: null,\n navUp: null,\n navUpLeft: null,\n navUpRight: null,\n numOctaves: null,\n observer: null,\n offset: null,\n onAbort: null,\n onActivate: null,\n onAfterPrint: null,\n onBeforePrint: null,\n onBegin: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnd: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFocusIn: null,\n onFocusOut: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadStart: null,\n onMessage: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onMouseWheel: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRepeat: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onShow: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onZoom: null,\n opacity: null,\n operator: null,\n order: null,\n orient: null,\n orientation: null,\n origin: null,\n overflow: null,\n overlay: null,\n overlinePosition: number,\n overlineThickness: number,\n paintOrder: null,\n panose1: null,\n path: null,\n pathLength: number,\n patternContentUnits: null,\n patternTransform: null,\n patternUnits: null,\n phase: null,\n ping: spaceSeparated,\n pitch: null,\n playbackOrder: null,\n pointerEvents: null,\n points: null,\n pointsAtX: number,\n pointsAtY: number,\n pointsAtZ: number,\n preserveAlpha: null,\n preserveAspectRatio: null,\n primitiveUnits: null,\n propagate: null,\n property: commaOrSpaceSeparated,\n r: null,\n radius: null,\n referrerPolicy: null,\n refX: null,\n refY: null,\n rel: commaOrSpaceSeparated,\n rev: commaOrSpaceSeparated,\n renderingIntent: null,\n repeatCount: null,\n repeatDur: null,\n requiredExtensions: commaOrSpaceSeparated,\n requiredFeatures: commaOrSpaceSeparated,\n requiredFonts: commaOrSpaceSeparated,\n requiredFormats: commaOrSpaceSeparated,\n resource: null,\n restart: null,\n result: null,\n rotate: null,\n rx: null,\n ry: null,\n scale: null,\n seed: null,\n shapeRendering: null,\n side: null,\n slope: null,\n snapshotTime: null,\n specularConstant: number,\n specularExponent: number,\n spreadMethod: null,\n spacing: null,\n startOffset: null,\n stdDeviation: null,\n stemh: null,\n stemv: null,\n stitchTiles: null,\n stopColor: null,\n stopOpacity: null,\n strikethroughPosition: number,\n strikethroughThickness: number,\n string: null,\n stroke: null,\n strokeDashArray: commaOrSpaceSeparated,\n strokeDashOffset: null,\n strokeLineCap: null,\n strokeLineJoin: null,\n strokeMiterLimit: number,\n strokeOpacity: number,\n strokeWidth: null,\n style: null,\n surfaceScale: number,\n syncBehavior: null,\n syncBehaviorDefault: null,\n syncMaster: null,\n syncTolerance: null,\n syncToleranceDefault: null,\n systemLanguage: commaOrSpaceSeparated,\n tabIndex: number,\n tableValues: null,\n target: null,\n targetX: number,\n targetY: number,\n textAnchor: null,\n textDecoration: null,\n textRendering: null,\n textLength: null,\n timelineBegin: null,\n title: null,\n transformBehavior: null,\n type: null,\n typeOf: commaOrSpaceSeparated,\n to: null,\n transform: null,\n transformOrigin: null,\n u1: null,\n u2: null,\n underlinePosition: number,\n underlineThickness: number,\n unicode: null,\n unicodeBidi: null,\n unicodeRange: null,\n unitsPerEm: number,\n values: null,\n vAlphabetic: number,\n vMathematical: number,\n vectorEffect: null,\n vHanging: number,\n vIdeographic: number,\n version: null,\n vertAdvY: number,\n vertOriginX: number,\n vertOriginY: number,\n viewBox: null,\n viewTarget: null,\n visibility: null,\n width: null,\n widths: null,\n wordSpacing: null,\n writingMode: null,\n x: null,\n x1: null,\n x2: null,\n xChannelSelector: null,\n xHeight: number,\n y: null,\n y1: null,\n y2: null,\n yChannelSelector: null,\n z: null,\n zoomAndPan: null\n },\n space: 'svg',\n transform: caseSensitiveTransform\n})\n","import {create} from './util/create.js'\n\nexport const xlink = create({\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n },\n space: 'xlink',\n transform(_, property) {\n return 'xlink:' + property.slice(5).toLowerCase()\n }\n})\n","import {create} from './util/create.js'\nimport {caseInsensitiveTransform} from './util/case-insensitive-transform.js'\n\nexport const xmlns = create({\n attributes: {xmlnsxlink: 'xmlns:xlink'},\n properties: {xmlnsXLink: null, xmlns: null},\n space: 'xmlns',\n transform: caseInsensitiveTransform\n})\n","import {create} from './util/create.js'\n\nexport const xml = create({\n properties: {xmlBase: null, xmlLang: null, xmlSpace: null},\n space: 'xml',\n transform(_, property) {\n return 'xml:' + property.slice(3).toLowerCase()\n }\n})\n","/**\n * Special cases for React (`Record<string, string>`).\n *\n * `hast` is close to `React` but differs in a couple of cases.\n * To get a React property from a hast property,\n * check if it is in `hastToReact`.\n * If it is, use the corresponding value;\n * otherwise, use the hast property.\n *\n * @type {Record<string, string>}\n */\nexport const hastToReact = {\n classId: 'classID',\n dataType: 'datatype',\n itemId: 'itemID',\n strokeDashArray: 'strokeDasharray',\n strokeDashOffset: 'strokeDashoffset',\n strokeLineCap: 'strokeLinecap',\n strokeLineJoin: 'strokeLinejoin',\n strokeMiterLimit: 'strokeMiterlimit',\n typeOf: 'typeof',\n xLinkActuate: 'xlinkActuate',\n xLinkArcRole: 'xlinkArcrole',\n xLinkHref: 'xlinkHref',\n xLinkRole: 'xlinkRole',\n xLinkShow: 'xlinkShow',\n xLinkTitle: 'xlinkTitle',\n xLinkType: 'xlinkType',\n xmlnsXLink: 'xmlnsXlink'\n}\n","/**\n * @import {Schema} from 'property-information'\n */\n\nimport {DefinedInfo} from './util/defined-info.js'\nimport {Info} from './util/info.js'\nimport {normalize} from './normalize.js'\n\nconst cap = /[A-Z]/g\nconst dash = /-[a-z]/g\nconst valid = /^data[-\\w.:]+$/i\n\n/**\n * Look up info on a property.\n *\n * In most cases the given `schema` contains info on the property.\n * All standard,\n * most legacy,\n * and some non-standard properties are supported.\n * For these cases,\n * the returned `Info` has hints about the value of the property.\n *\n * `name` can also be a valid data attribute or property,\n * in which case an `Info` object with the correctly cased `attribute` and\n * `property` is returned.\n *\n * `name` can be an unknown attribute,\n * in which case an `Info` object with `attribute` and `property` set to the\n * given name is returned.\n * It is not recommended to provide unsupported legacy or recently specced\n * properties.\n *\n *\n * @param {Schema} schema\n * Schema;\n * either the `html` or `svg` export.\n * @param {string} value\n * An attribute-like or property-like name;\n * it will be passed through `normalize` to hopefully find the correct info.\n * @returns {Info}\n * Info.\n */\nexport function find(schema, value) {\n const normal = normalize(value)\n let property = value\n let Type = Info\n\n if (normal in schema.normal) {\n return schema.property[schema.normal[normal]]\n }\n\n if (normal.length > 4 && normal.slice(0, 4) === 'data' && valid.test(value)) {\n // Attribute or property.\n if (value.charAt(4) === '-') {\n // Turn it into a property.\n const rest = value.slice(5).replace(dash, camelcase)\n property = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1)\n } else {\n // Turn it into an attribute.\n const rest = value.slice(4)\n\n if (!dash.test(rest)) {\n let dashes = rest.replace(cap, kebab)\n\n if (dashes.charAt(0) !== '-') {\n dashes = '-' + dashes\n }\n\n value = 'data' + dashes\n }\n }\n\n Type = DefinedInfo\n }\n\n return new Type(property, value)\n}\n\n/**\n * @param {string} $0\n * Value.\n * @returns {string}\n * Kebab.\n */\nfunction kebab($0) {\n return '-' + $0.toLowerCase()\n}\n\n/**\n * @param {string} $0\n * Value.\n * @returns {string}\n * Camel.\n */\nfunction camelcase($0) {\n return $0.charAt(1).toUpperCase()\n}\n","// Note: types exposed from `index.d.ts`.\nimport {merge} from './lib/util/merge.js'\nimport {aria} from './lib/aria.js'\nimport {html as htmlBase} from './lib/html.js'\nimport {svg as svgBase} from './lib/svg.js'\nimport {xlink} from './lib/xlink.js'\nimport {xmlns} from './lib/xmlns.js'\nimport {xml} from './lib/xml.js'\n\nexport {hastToReact} from './lib/hast-to-react.js'\n\nexport const html = merge([aria, htmlBase, xlink, xmlns, xml], 'html')\n\nexport {find} from './lib/find.js'\nexport {normalize} from './lib/normalize.js'\n\nexport const svg = merge([aria, svgBase, xlink, xmlns, xml], 'svg')\n","/**\n * Parse space-separated tokens to an array of strings.\n *\n * @param {string} value\n * Space-separated tokens.\n * @returns {Array<string>}\n * List of tokens.\n */\nexport function parse(value) {\n const input = String(value || '').trim()\n return input ? input.split(/[ \\t\\n\\r\\f]+/g) : []\n}\n\n/**\n * Serialize an array of strings as space separated-tokens.\n *\n * @param {Array<string|number>} values\n * List of tokens.\n * @returns {string}\n * Space-separated tokens.\n */\nexport function stringify(values) {\n return values.join(' ').trim()\n}\n","'use strict';\n\n// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nfunction index (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) ; else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n}\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n\nmodule.exports = index;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = StyleToObject;\nconst inline_style_parser_1 = __importDefault(require(\"inline-style-parser\"));\n/**\n * Parses inline style to object.\n *\n * @param style - Inline style.\n * @param iterator - Iterator.\n * @returns - Style object or null.\n *\n * @example Parsing inline style to object:\n *\n * ```js\n * import parse from 'style-to-object';\n * parse('line-height: 42;'); // { 'line-height': '42' }\n * ```\n */\nfunction StyleToObject(style, iterator) {\n let styleObject = null;\n if (!style || typeof style !== 'string') {\n return styleObject;\n }\n const declarations = (0, inline_style_parser_1.default)(style);\n const hasIterator = typeof iterator === 'function';\n declarations.forEach((declaration) => {\n if (declaration.type !== 'declaration') {\n return;\n }\n const { property, value } = declaration;\n if (hasIterator) {\n iterator(property, value, declaration);\n }\n else if (value) {\n styleObject = styleObject || {};\n styleObject[property] = value;\n }\n });\n return styleObject;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.camelCase = void 0;\nvar CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;\nvar HYPHEN_REGEX = /-([a-z])/g;\nvar NO_HYPHEN_REGEX = /^[^-]+$/;\nvar VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;\nvar MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;\n/**\n * Checks whether to skip camelCase.\n */\nvar skipCamelCase = function (property) {\n return !property ||\n NO_HYPHEN_REGEX.test(property) ||\n CUSTOM_PROPERTY_REGEX.test(property);\n};\n/**\n * Replacer that capitalizes first character.\n */\nvar capitalize = function (match, character) {\n return character.toUpperCase();\n};\n/**\n * Replacer that removes beginning hyphen of vendor prefix property.\n */\nvar trimHyphen = function (match, prefix) { return \"\".concat(prefix, \"-\"); };\n/**\n * CamelCases a CSS property.\n */\nvar camelCase = function (property, options) {\n if (options === void 0) { options = {}; }\n if (skipCamelCase(property)) {\n return property;\n }\n property = property.toLowerCase();\n if (options.reactCompat) {\n // `-ms` vendor prefix should not be capitalized\n property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);\n }\n else {\n // for non-React, remove first hyphen so vendor prefix is not capitalized\n property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);\n }\n return property.replace(HYPHEN_REGEX, capitalize);\n};\nexports.camelCase = camelCase;\n//# sourceMappingURL=utilities.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nvar style_to_object_1 = __importDefault(require(\"style-to-object\"));\nvar utilities_1 = require(\"./utilities\");\n/**\n * Parses CSS inline style to JavaScript object (camelCased).\n */\nfunction StyleToJS(style, options) {\n var output = {};\n if (!style || typeof style !== 'string') {\n return output;\n }\n (0, style_to_object_1.default)(style, function (property, value) {\n // skip CSS comment\n if (property && value) {\n output[(0, utilities_1.camelCase)(property, options)] = value;\n }\n });\n return output;\n}\nStyleToJS.default = StyleToJS;\nmodule.exports = StyleToJS;\n//# sourceMappingURL=index.js.map","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n */\n\n/**\n * Get the ending point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointEnd = point('end')\n\n/**\n * Get the starting point of `node`.\n *\n * @param node\n * Node.\n * @returns\n * Point.\n */\nexport const pointStart = point('start')\n\n/**\n * Get the positional info of `node`.\n *\n * @param {'end' | 'start'} type\n * Side.\n * @returns\n * Getter.\n */\nfunction point(type) {\n return point\n\n /**\n * Get the point info of `node` at a bound side.\n *\n * @param {Node | NodeLike | null | undefined} [node]\n * @returns {Point | undefined}\n */\n function point(node) {\n const point = (node && node.position && node.position[type]) || {}\n\n if (\n typeof point.line === 'number' &&\n point.line > 0 &&\n typeof point.column === 'number' &&\n point.column > 0\n ) {\n return {\n line: point.line,\n column: point.column,\n offset:\n typeof point.offset === 'number' && point.offset > -1\n ? point.offset\n : undefined\n }\n }\n }\n}\n\n/**\n * Get the positional info of `node`.\n *\n * @param {Node | NodeLike | null | undefined} [node]\n * Node.\n * @returns {Position | undefined}\n * Position.\n */\nexport function position(node) {\n const start = pointStart(node)\n const end = pointEnd(node)\n\n if (start && end) {\n return {start, end}\n }\n}\n","/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n */\n\n/**\n * Serialize the positional info of a point, position (start and end points),\n * or node.\n *\n * @param {Node | NodeLike | Point | PointLike | Position | PositionLike | null | undefined} [value]\n * Node, position, or point.\n * @returns {string}\n * Pretty printed positional info of a node (`string`).\n *\n * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)\n * or a point `l:c` (when given `point`), where `l` stands for line, `c` for\n * column, `s` for `start`, and `e` for end.\n * An empty string (`''`) is returned if the given value is neither `node`,\n * `position`, nor `point`.\n */\nexport function stringifyPosition(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if ('position' in value || 'type' in value) {\n return position(value.position)\n }\n\n // Position.\n if ('start' in value || 'end' in value) {\n return position(value)\n }\n\n // Point.\n if ('line' in value || 'column' in value) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\n/**\n * @param {Point | PointLike | null | undefined} point\n * @returns {string}\n */\nfunction point(point) {\n return index(point && point.line) + ':' + index(point && point.column)\n}\n\n/**\n * @param {Position | PositionLike | null | undefined} pos\n * @returns {string}\n */\nfunction position(pos) {\n return point(pos && pos.start) + '-' + point(pos && pos.end)\n}\n\n/**\n * @param {number | null | undefined} value\n * @returns {number}\n */\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n","/**\n * @import {Node, Point, Position} from 'unist'\n */\n\n/**\n * @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n *\n * @typedef Options\n * Configuration.\n * @property {Array<Node> | null | undefined} [ancestors]\n * Stack of (inclusive) ancestor nodes surrounding the message (optional).\n * @property {Error | null | undefined} [cause]\n * Original error cause of the message (optional).\n * @property {Point | Position | null | undefined} [place]\n * Place of message (optional).\n * @property {string | null | undefined} [ruleId]\n * Category of message (optional, example: `'my-rule'`).\n * @property {string | null | undefined} [source]\n * Namespace of who sent the message (optional, example: `'my-package'`).\n */\n\nimport {stringifyPosition} from 'unist-util-stringify-position'\n\n/**\n * Message.\n */\nexport class VFileMessage extends Error {\n /**\n * Create a message for `reason`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {Options | null | undefined} [options]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns\n * Instance of `VFileMessage`.\n */\n // eslint-disable-next-line complexity\n constructor(causeOrReason, optionsOrParentOrPlace, origin) {\n super()\n\n if (typeof optionsOrParentOrPlace === 'string') {\n origin = optionsOrParentOrPlace\n optionsOrParentOrPlace = undefined\n }\n\n /** @type {string} */\n let reason = ''\n /** @type {Options} */\n let options = {}\n let legacyCause = false\n\n if (optionsOrParentOrPlace) {\n // Point.\n if (\n 'line' in optionsOrParentOrPlace &&\n 'column' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Position.\n else if (\n 'start' in optionsOrParentOrPlace &&\n 'end' in optionsOrParentOrPlace\n ) {\n options = {place: optionsOrParentOrPlace}\n }\n // Node.\n else if ('type' in optionsOrParentOrPlace) {\n options = {\n ancestors: [optionsOrParentOrPlace],\n place: optionsOrParentOrPlace.position\n }\n }\n // Options.\n else {\n options = {...optionsOrParentOrPlace}\n }\n }\n\n if (typeof causeOrReason === 'string') {\n reason = causeOrReason\n }\n // Error.\n else if (!options.cause && causeOrReason) {\n legacyCause = true\n reason = causeOrReason.message\n options.cause = causeOrReason\n }\n\n if (!options.ruleId && !options.source && typeof origin === 'string') {\n const index = origin.indexOf(':')\n\n if (index === -1) {\n options.ruleId = origin\n } else {\n options.source = origin.slice(0, index)\n options.ruleId = origin.slice(index + 1)\n }\n }\n\n if (!options.place && options.ancestors && options.ancestors) {\n const parent = options.ancestors[options.ancestors.length - 1]\n\n if (parent) {\n options.place = parent.position\n }\n }\n\n const start =\n options.place && 'start' in options.place\n ? options.place.start\n : options.place\n\n /**\n * Stack of ancestor nodes surrounding the message.\n *\n * @type {Array<Node> | undefined}\n */\n this.ancestors = options.ancestors || undefined\n\n /**\n * Original error cause of the message.\n *\n * @type {Error | undefined}\n */\n this.cause = options.cause || undefined\n\n /**\n * Starting column of message.\n *\n * @type {number | undefined}\n */\n this.column = start ? start.column : undefined\n\n /**\n * State of problem.\n *\n * * `true` — error, file not usable\n * * `false` — warning, change may be needed\n * * `undefined` — change likely not needed\n *\n * @type {boolean | null | undefined}\n */\n this.fatal = undefined\n\n /**\n * Path of a file (used throughout the `VFile` ecosystem).\n *\n * @type {string | undefined}\n */\n this.file = ''\n\n // Field from `Error`.\n /**\n * Reason for message.\n *\n * @type {string}\n */\n this.message = reason\n\n /**\n * Starting line of error.\n *\n * @type {number | undefined}\n */\n this.line = start ? start.line : undefined\n\n // Field from `Error`.\n /**\n * Serialized positional info of message.\n *\n * On normal errors, this would be something like `ParseError`, buit in\n * `VFile` messages we use this space to show where an error happened.\n */\n this.name = stringifyPosition(options.place) || '1:1'\n\n /**\n * Place of message.\n *\n * @type {Point | Position | undefined}\n */\n this.place = options.place || undefined\n\n /**\n * Reason for message, should use markdown.\n *\n * @type {string}\n */\n this.reason = this.message\n\n /**\n * Category of message (example: `'my-rule'`).\n *\n * @type {string | undefined}\n */\n this.ruleId = options.ruleId || undefined\n\n /**\n * Namespace of message (example: `'my-package'`).\n *\n * @type {string | undefined}\n */\n this.source = options.source || undefined\n\n // Field from `Error`.\n /**\n * Stack of message.\n *\n * This is used by normal errors to show where something happened in\n * programming code, irrelevant for `VFile` messages,\n *\n * @type {string}\n */\n this.stack =\n legacyCause && options.cause && typeof options.cause.stack === 'string'\n ? options.cause.stack\n : ''\n\n // The following fields are “well known”.\n // Not standard.\n // Feel free to add other non-standard fields to your messages.\n\n /**\n * Specify the source value that’s being reported, which is deemed\n * incorrect.\n *\n * @type {string | undefined}\n */\n this.actual = undefined\n\n /**\n * Suggest acceptable values that can be used instead of `actual`.\n *\n * @type {Array<string> | undefined}\n */\n this.expected = undefined\n\n /**\n * Long form description of the message (you should use markdown).\n *\n * @type {string | undefined}\n */\n this.note = undefined\n\n /**\n * Link to docs for the message.\n *\n * > 👉 **Note**: this must be an absolute URL that can be passed as `x`\n * > to `new URL(x)`.\n *\n * @type {string | undefined}\n */\n this.url = undefined\n }\n}\n\nVFileMessage.prototype.file = ''\nVFileMessage.prototype.name = ''\nVFileMessage.prototype.reason = ''\nVFileMessage.prototype.message = ''\nVFileMessage.prototype.stack = ''\nVFileMessage.prototype.column = undefined\nVFileMessage.prototype.line = undefined\nVFileMessage.prototype.ancestors = undefined\nVFileMessage.prototype.cause = undefined\nVFileMessage.prototype.fatal = undefined\nVFileMessage.prototype.place = undefined\nVFileMessage.prototype.ruleId = undefined\nVFileMessage.prototype.source = undefined\n","/**\n * @import {Identifier, Literal, MemberExpression} from 'estree'\n * @import {Jsx, JsxDev, Options, Props} from 'hast-util-to-jsx-runtime'\n * @import {Element, Nodes, Parents, Root, Text} from 'hast'\n * @import {MdxFlowExpressionHast, MdxTextExpressionHast} from 'mdast-util-mdx-expression'\n * @import {MdxJsxFlowElementHast, MdxJsxTextElementHast} from 'mdast-util-mdx-jsx'\n * @import {MdxjsEsmHast} from 'mdast-util-mdxjs-esm'\n * @import {Position} from 'unist'\n * @import {Child, Create, Field, JsxElement, State, Style} from './types.js'\n */\n\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {ok as assert} from 'devlop'\nimport {name as isIdentifierName} from 'estree-util-is-identifier-name'\nimport {whitespace} from 'hast-util-whitespace'\nimport {find, hastToReact, html, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport styleToJs from 'style-to-js'\nimport {pointStart} from 'unist-util-position'\nimport {VFileMessage} from 'vfile-message'\n\n// To do: next major: `Object.hasOwn`.\nconst own = {}.hasOwnProperty\n\n/** @type {Map<string, number>} */\nconst emptyMap = new Map()\n\nconst cap = /[A-Z]/g\n\n// `react-dom` triggers a warning for *any* white space in tables.\n// To follow GFM, `mdast-util-to-hast` injects line endings between elements.\n// Other tools might do so too, but they don’t do here, so we remove all of\n// that.\n\n// See: <https://github.com/facebook/react/pull/7081>.\n// See: <https://github.com/facebook/react/pull/7515>.\n// See: <https://github.com/remarkjs/remark-react/issues/64>.\n// See: <https://github.com/rehypejs/rehype-react/pull/29>.\n// See: <https://github.com/rehypejs/rehype-react/pull/32>.\n// See: <https://github.com/rehypejs/rehype-react/pull/45>.\nconst tableElements = new Set(['table', 'tbody', 'thead', 'tfoot', 'tr'])\n\nconst tableCellElement = new Set(['td', 'th'])\n\nconst docs = 'https://github.com/syntax-tree/hast-util-to-jsx-runtime'\n\n/**\n * Transform a hast tree to preact, react, solid, svelte, vue, etc.,\n * with an automatic JSX runtime.\n *\n * @param {Nodes} tree\n * Tree to transform.\n * @param {Options} options\n * Configuration (required).\n * @returns {JsxElement}\n * JSX element.\n */\n\nexport function toJsxRuntime(tree, options) {\n if (!options || options.Fragment === undefined) {\n throw new TypeError('Expected `Fragment` in options')\n }\n\n const filePath = options.filePath || undefined\n /** @type {Create} */\n let create\n\n if (options.development) {\n if (typeof options.jsxDEV !== 'function') {\n throw new TypeError(\n 'Expected `jsxDEV` in options when `development: true`'\n )\n }\n\n create = developmentCreate(filePath, options.jsxDEV)\n } else {\n if (typeof options.jsx !== 'function') {\n throw new TypeError('Expected `jsx` in production options')\n }\n\n if (typeof options.jsxs !== 'function') {\n throw new TypeError('Expected `jsxs` in production options')\n }\n\n create = productionCreate(filePath, options.jsx, options.jsxs)\n }\n\n /** @type {State} */\n const state = {\n Fragment: options.Fragment,\n ancestors: [],\n components: options.components || {},\n create,\n elementAttributeNameCase: options.elementAttributeNameCase || 'react',\n evaluater: options.createEvaluater ? options.createEvaluater() : undefined,\n filePath,\n ignoreInvalidStyle: options.ignoreInvalidStyle || false,\n passKeys: options.passKeys !== false,\n passNode: options.passNode || false,\n schema: options.space === 'svg' ? svg : html,\n stylePropertyNameCase: options.stylePropertyNameCase || 'dom',\n tableCellAlignToStyle: options.tableCellAlignToStyle !== false\n }\n\n const result = one(state, tree, undefined)\n\n // JSX element.\n if (result && typeof result !== 'string') {\n return result\n }\n\n // Text node or something that turned into nothing.\n return state.create(\n tree,\n state.Fragment,\n {children: result || undefined},\n undefined\n )\n}\n\n/**\n * Transform a node.\n *\n * @param {State} state\n * Info passed around.\n * @param {Nodes} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction one(state, node, key) {\n if (node.type === 'element') {\n return element(state, node, key)\n }\n\n if (node.type === 'mdxFlowExpression' || node.type === 'mdxTextExpression') {\n return mdxExpression(state, node)\n }\n\n if (node.type === 'mdxJsxFlowElement' || node.type === 'mdxJsxTextElement') {\n return mdxJsxElement(state, node, key)\n }\n\n if (node.type === 'mdxjsEsm') {\n return mdxEsm(state, node)\n }\n\n if (node.type === 'root') {\n return root(state, node, key)\n }\n\n if (node.type === 'text') {\n return text(state, node)\n }\n}\n\n/**\n * Handle element.\n *\n * @param {State} state\n * Info passed around.\n * @param {Element} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction element(state, node, key) {\n const parentSchema = state.schema\n let schema = parentSchema\n\n if (node.tagName.toLowerCase() === 'svg' && parentSchema.space === 'html') {\n schema = svg\n state.schema = schema\n }\n\n state.ancestors.push(node)\n\n const type = findComponentFromName(state, node.tagName, false)\n const props = createElementProps(state, node)\n let children = createChildren(state, node)\n\n if (tableElements.has(node.tagName)) {\n children = children.filter(function (child) {\n return typeof child === 'string' ? !whitespace(child) : true\n })\n }\n\n addNode(state, props, type, node)\n addChildren(props, children)\n\n // Restore.\n state.ancestors.pop()\n state.schema = parentSchema\n\n return state.create(node, type, props, key)\n}\n\n/**\n * Handle MDX expression.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxFlowExpressionHast | MdxTextExpressionHast} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxExpression(state, node) {\n if (node.data && node.data.estree && state.evaluater) {\n const program = node.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n\n // Assume result is a child.\n return /** @type {Child | undefined} */ (\n state.evaluater.evaluateExpression(expression.expression)\n )\n }\n\n crashEstree(state, node.position)\n}\n\n/**\n * Handle MDX ESM.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxjsEsmHast} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxEsm(state, node) {\n if (node.data && node.data.estree && state.evaluater) {\n // Assume result is a child.\n return /** @type {Child | undefined} */ (\n state.evaluater.evaluateProgram(node.data.estree)\n )\n }\n\n crashEstree(state, node.position)\n}\n\n/**\n * Handle MDX JSX.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction mdxJsxElement(state, node, key) {\n const parentSchema = state.schema\n let schema = parentSchema\n\n if (node.name === 'svg' && parentSchema.space === 'html') {\n schema = svg\n state.schema = schema\n }\n\n state.ancestors.push(node)\n\n const type =\n node.name === null\n ? state.Fragment\n : findComponentFromName(state, node.name, true)\n const props = createJsxElementProps(state, node)\n const children = createChildren(state, node)\n\n addNode(state, props, type, node)\n addChildren(props, children)\n\n // Restore.\n state.ancestors.pop()\n state.schema = parentSchema\n\n return state.create(node, type, props, key)\n}\n\n/**\n * Handle root.\n *\n * @param {State} state\n * Info passed around.\n * @param {Root} node\n * Current node.\n * @param {string | undefined} key\n * Key.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction root(state, node, key) {\n /** @type {Props} */\n const props = {}\n\n addChildren(props, createChildren(state, node))\n\n return state.create(node, state.Fragment, props, key)\n}\n\n/**\n * Handle text.\n *\n * @param {State} _\n * Info passed around.\n * @param {Text} node\n * Current node.\n * @returns {Child | undefined}\n * Child, optional.\n */\nfunction text(_, node) {\n return node.value\n}\n\n/**\n * Add `node` to props.\n *\n * @param {State} state\n * Info passed around.\n * @param {Props} props\n * Props.\n * @param {unknown} type\n * Type.\n * @param {Element | MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Node.\n * @returns {undefined}\n * Nothing.\n */\nfunction addNode(state, props, type, node) {\n // If this is swapped out for a component:\n if (typeof type !== 'string' && type !== state.Fragment && state.passNode) {\n props.node = node\n }\n}\n\n/**\n * Add children to props.\n *\n * @param {Props} props\n * Props.\n * @param {Array<Child>} children\n * Children.\n * @returns {undefined}\n * Nothing.\n */\nfunction addChildren(props, children) {\n if (children.length > 0) {\n const value = children.length > 1 ? children : children[0]\n\n if (value) {\n props.children = value\n }\n }\n}\n\n/**\n * @param {string | undefined} _\n * Path to file.\n * @param {Jsx} jsx\n * Dynamic.\n * @param {Jsx} jsxs\n * Static.\n * @returns {Create}\n * Create a production element.\n */\nfunction productionCreate(_, jsx, jsxs) {\n return create\n /** @type {Create} */\n function create(_, type, props, key) {\n // Only an array when there are 2 or more children.\n const isStaticChildren = Array.isArray(props.children)\n const fn = isStaticChildren ? jsxs : jsx\n return key ? fn(type, props, key) : fn(type, props)\n }\n}\n\n/**\n * @param {string | undefined} filePath\n * Path to file.\n * @param {JsxDev} jsxDEV\n * Development.\n * @returns {Create}\n * Create a development element.\n */\nfunction developmentCreate(filePath, jsxDEV) {\n return create\n /** @type {Create} */\n function create(node, type, props, key) {\n // Only an array when there are 2 or more children.\n const isStaticChildren = Array.isArray(props.children)\n const point = pointStart(node)\n return jsxDEV(\n type,\n props,\n key,\n isStaticChildren,\n {\n columnNumber: point ? point.column - 1 : undefined,\n fileName: filePath,\n lineNumber: point ? point.line : undefined\n },\n undefined\n )\n }\n}\n\n/**\n * Create props from an element.\n *\n * @param {State} state\n * Info passed around.\n * @param {Element} node\n * Current element.\n * @returns {Props}\n * Props.\n */\nfunction createElementProps(state, node) {\n /** @type {Props} */\n const props = {}\n /** @type {string | undefined} */\n let alignValue\n /** @type {string} */\n let prop\n\n for (prop in node.properties) {\n if (prop !== 'children' && own.call(node.properties, prop)) {\n const result = createProperty(state, prop, node.properties[prop])\n\n if (result) {\n const [key, value] = result\n\n if (\n state.tableCellAlignToStyle &&\n key === 'align' &&\n typeof value === 'string' &&\n tableCellElement.has(node.tagName)\n ) {\n alignValue = value\n } else {\n props[key] = value\n }\n }\n }\n }\n\n if (alignValue) {\n // Assume style is an object.\n const style = /** @type {Style} */ (props.style || (props.style = {}))\n style[state.stylePropertyNameCase === 'css' ? 'text-align' : 'textAlign'] =\n alignValue\n }\n\n return props\n}\n\n/**\n * Create props from a JSX element.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdxJsxFlowElementHast | MdxJsxTextElementHast} node\n * Current JSX element.\n * @returns {Props}\n * Props.\n */\nfunction createJsxElementProps(state, node) {\n /** @type {Props} */\n const props = {}\n\n for (const attribute of node.attributes) {\n if (attribute.type === 'mdxJsxExpressionAttribute') {\n if (attribute.data && attribute.data.estree && state.evaluater) {\n const program = attribute.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n const objectExpression = expression.expression\n assert(objectExpression.type === 'ObjectExpression')\n const property = objectExpression.properties[0]\n assert(property.type === 'SpreadElement')\n\n Object.assign(\n props,\n state.evaluater.evaluateExpression(property.argument)\n )\n } else {\n crashEstree(state, node.position)\n }\n } else {\n // For JSX, the author is responsible of passing in the correct values.\n const name = attribute.name\n /** @type {unknown} */\n let value\n\n if (attribute.value && typeof attribute.value === 'object') {\n if (\n attribute.value.data &&\n attribute.value.data.estree &&\n state.evaluater\n ) {\n const program = attribute.value.data.estree\n const expression = program.body[0]\n assert(expression.type === 'ExpressionStatement')\n value = state.evaluater.evaluateExpression(expression.expression)\n } else {\n crashEstree(state, node.position)\n }\n } else {\n value = attribute.value === null ? true : attribute.value\n }\n\n // Assume a prop.\n props[name] = /** @type {Props[keyof Props]} */ (value)\n }\n }\n\n return props\n}\n\n/**\n * Create children.\n *\n * @param {State} state\n * Info passed around.\n * @param {Parents} node\n * Current element.\n * @returns {Array<Child>}\n * Children.\n */\nfunction createChildren(state, node) {\n /** @type {Array<Child>} */\n const children = []\n let index = -1\n /** @type {Map<string, number>} */\n // Note: test this when Solid doesn’t want to merge my upcoming PR.\n /* c8 ignore next */\n const countsByName = state.passKeys ? new Map() : emptyMap\n\n while (++index < node.children.length) {\n const child = node.children[index]\n /** @type {string | undefined} */\n let key\n\n if (state.passKeys) {\n const name =\n child.type === 'element'\n ? child.tagName\n : child.type === 'mdxJsxFlowElement' ||\n child.type === 'mdxJsxTextElement'\n ? child.name\n : undefined\n\n if (name) {\n const count = countsByName.get(name) || 0\n key = name + '-' + count\n countsByName.set(name, count + 1)\n }\n }\n\n const result = one(state, child, key)\n if (result !== undefined) children.push(result)\n }\n\n return children\n}\n\n/**\n * Handle a property.\n *\n * @param {State} state\n * Info passed around.\n * @param {string} prop\n * Key.\n * @param {Array<number | string> | boolean | number | string | null | undefined} value\n * hast property value.\n * @returns {Field | undefined}\n * Field for runtime, optional.\n */\nfunction createProperty(state, prop, value) {\n const info = find(state.schema, prop)\n\n // Ignore nullish and `NaN` values.\n if (\n value === null ||\n value === undefined ||\n (typeof value === 'number' && Number.isNaN(value))\n ) {\n return\n }\n\n if (Array.isArray(value)) {\n // Accept `array`.\n // Most props are space-separated.\n value = info.commaSeparated ? commas(value) : spaces(value)\n }\n\n // React only accepts `style` as object.\n if (info.property === 'style') {\n let styleObject =\n typeof value === 'object' ? value : parseStyle(state, String(value))\n\n if (state.stylePropertyNameCase === 'css') {\n styleObject = transformStylesToCssCasing(styleObject)\n }\n\n return ['style', styleObject]\n }\n\n return [\n state.elementAttributeNameCase === 'react' && info.space\n ? hastToReact[info.property] || info.property\n : info.attribute,\n value\n ]\n}\n\n/**\n * Parse a CSS declaration to an object.\n *\n * @param {State} state\n * Info passed around.\n * @param {string} value\n * CSS declarations.\n * @returns {Style}\n * Properties.\n * @throws\n * Throws `VFileMessage` when CSS cannot be parsed.\n */\nfunction parseStyle(state, value) {\n try {\n return styleToJs(value, {reactCompat: true})\n } catch (error) {\n if (state.ignoreInvalidStyle) {\n return {}\n }\n\n const cause = /** @type {Error} */ (error)\n const message = new VFileMessage('Cannot parse `style` attribute', {\n ancestors: state.ancestors,\n cause,\n ruleId: 'style',\n source: 'hast-util-to-jsx-runtime'\n })\n message.file = state.filePath || undefined\n message.url = docs + '#cannot-parse-style-attribute'\n\n throw message\n }\n}\n\n/**\n * Create a JSX name from a string.\n *\n * @param {State} state\n * To do.\n * @param {string} name\n * Name.\n * @param {boolean} allowExpression\n * Allow member expressions and identifiers.\n * @returns {unknown}\n * To do.\n */\nfunction findComponentFromName(state, name, allowExpression) {\n /** @type {Identifier | Literal | MemberExpression} */\n let result\n\n if (!allowExpression) {\n result = {type: 'Literal', value: name}\n } else if (name.includes('.')) {\n const identifiers = name.split('.')\n let index = -1\n /** @type {Identifier | Literal | MemberExpression | undefined} */\n let node\n\n while (++index < identifiers.length) {\n /** @type {Identifier | Literal} */\n const prop = isIdentifierName(identifiers[index])\n ? {type: 'Identifier', name: identifiers[index]}\n : {type: 'Literal', value: identifiers[index]}\n node = node\n ? {\n type: 'MemberExpression',\n object: node,\n property: prop,\n computed: Boolean(index && prop.type === 'Literal'),\n optional: false\n }\n : prop\n }\n\n assert(node, 'always a result')\n result = node\n } else {\n result =\n isIdentifierName(name) && !/^[a-z]/.test(name)\n ? {type: 'Identifier', name}\n : {type: 'Literal', value: name}\n }\n\n // Only literals can be passed in `components` currently.\n // No identifiers / member expressions.\n if (result.type === 'Literal') {\n const name = /** @type {string | number} */ (result.value)\n return own.call(state.components, name) ? state.components[name] : name\n }\n\n // Assume component.\n if (state.evaluater) {\n return state.evaluater.evaluateExpression(result)\n }\n\n crashEstree(state)\n}\n\n/**\n * @param {State} state\n * @param {Position | undefined} [place]\n * @returns {never}\n */\nfunction crashEstree(state, place) {\n const message = new VFileMessage(\n 'Cannot handle MDX estrees without `createEvaluater`',\n {\n ancestors: state.ancestors,\n place,\n ruleId: 'mdx-estree',\n source: 'hast-util-to-jsx-runtime'\n }\n )\n message.file = state.filePath || undefined\n message.url = docs + '#cannot-handle-mdx-estrees-without-createevaluater'\n\n throw message\n}\n\n/**\n * Transform a DOM casing style object to a CSS casing style object.\n *\n * @param {Style} domCasing\n * @returns {Style}\n */\nfunction transformStylesToCssCasing(domCasing) {\n /** @type {Style} */\n const cssCasing = {}\n /** @type {string} */\n let from\n\n for (from in domCasing) {\n if (own.call(domCasing, from)) {\n cssCasing[transformStyleToCssCasing(from)] = domCasing[from]\n }\n }\n\n return cssCasing\n}\n\n/**\n * Transform a DOM casing style field to a CSS casing style field.\n *\n * @param {string} from\n * @returns {string}\n */\nfunction transformStyleToCssCasing(from) {\n let to = from.replace(cap, toDash)\n // Handle `ms-xxx` -> `-ms-xxx`.\n if (to.slice(0, 3) === 'ms-') to = '-' + to\n return to\n}\n\n/**\n * Make `$0` dash cased.\n *\n * @param {string} $0\n * Capitalized ASCII leter.\n * @returns {string}\n * Dash and lower letter.\n */\nfunction toDash($0) {\n return '-' + $0.toLowerCase()\n}\n","//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) {\n\t\t__defProp(target, name, {\n\t\t\tget: all[name],\n\t\t\tenumerable: true\n\t\t});\n\t}\n\tif (!no_symbols) {\n\t\t__defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\t}\n\treturn target;\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\t\tkey = keys[i];\n\t\t\tif (!__hasOwnProp.call(to, key) && key !== except) {\n\t\t\t\t__defProp(to, key, {\n\t\t\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\n\n//#endregion\nexport { __reExport as n, __exportAll as t };","//#region src/error.ts\nvar ShikiError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"ShikiError\";\n\t}\n};\n\n//#endregion\nexport { ShikiError };","//#region src/error.ts\nvar ShikiError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"ShikiError\";\n\t}\n};\n\n//#endregion\nexport { ShikiError };","// src/utils.ts\nfunction clone(something) {\n return doClone(something);\n}\nfunction doClone(something) {\n if (Array.isArray(something)) {\n return cloneArray(something);\n }\n if (something instanceof RegExp) {\n return something;\n }\n if (typeof something === \"object\") {\n return cloneObj(something);\n }\n return something;\n}\nfunction cloneArray(arr) {\n let r = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n r[i] = doClone(arr[i]);\n }\n return r;\n}\nfunction cloneObj(obj) {\n let r = {};\n for (let key in obj) {\n r[key] = doClone(obj[key]);\n }\n return r;\n}\nfunction mergeObjects(target, ...sources) {\n sources.forEach((source) => {\n for (let key in source) {\n target[key] = source[key];\n }\n });\n return target;\n}\nfunction basename(path) {\n const idx = ~path.lastIndexOf(\"/\") || ~path.lastIndexOf(\"\\\\\");\n if (idx === 0) {\n return path;\n } else if (~idx === path.length - 1) {\n return basename(path.substring(0, path.length - 1));\n } else {\n return path.substr(~idx + 1);\n }\n}\nvar CAPTURING_REGEX_SOURCE = /\\$(\\d+)|\\${(\\d+):\\/(downcase|upcase)}/g;\nvar RegexSource = class {\n static hasCaptures(regexSource) {\n if (regexSource === null) {\n return false;\n }\n CAPTURING_REGEX_SOURCE.lastIndex = 0;\n return CAPTURING_REGEX_SOURCE.test(regexSource);\n }\n static replaceCaptures(regexSource, captureSource, captureIndices) {\n return regexSource.replace(CAPTURING_REGEX_SOURCE, (match, index, commandIndex, command) => {\n let capture = captureIndices[parseInt(index || commandIndex, 10)];\n if (capture) {\n let result = captureSource.substring(capture.start, capture.end);\n while (result[0] === \".\") {\n result = result.substring(1);\n }\n switch (command) {\n case \"downcase\":\n return result.toLowerCase();\n case \"upcase\":\n return result.toUpperCase();\n default:\n return result;\n }\n } else {\n return match;\n }\n });\n }\n};\nfunction strcmp(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n}\nfunction strArrCmp(a, b) {\n if (a === null && b === null) {\n return 0;\n }\n if (!a) {\n return -1;\n }\n if (!b) {\n return 1;\n }\n let len1 = a.length;\n let len2 = b.length;\n if (len1 === len2) {\n for (let i = 0; i < len1; i++) {\n let res = strcmp(a[i], b[i]);\n if (res !== 0) {\n return res;\n }\n }\n return 0;\n }\n return len1 - len2;\n}\nfunction isValidHexColor(hex) {\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\n return true;\n }\n if (/^#[0-9a-f]{8}$/i.test(hex)) {\n return true;\n }\n if (/^#[0-9a-f]{3}$/i.test(hex)) {\n return true;\n }\n if (/^#[0-9a-f]{4}$/i.test(hex)) {\n return true;\n }\n return false;\n}\nfunction escapeRegExpCharacters(value) {\n return value.replace(/[\\-\\\\\\{\\}\\*\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, \"\\\\$&\");\n}\nvar CachedFn = class {\n constructor(fn) {\n this.fn = fn;\n }\n cache = /* @__PURE__ */ new Map();\n get(key) {\n if (this.cache.has(key)) {\n return this.cache.get(key);\n }\n const value = this.fn(key);\n this.cache.set(key, value);\n return value;\n }\n};\n\n// src/theme.ts\nvar Theme = class {\n constructor(_colorMap, _defaults, _root) {\n this._colorMap = _colorMap;\n this._defaults = _defaults;\n this._root = _root;\n }\n static createFromRawTheme(source, colorMap) {\n return this.createFromParsedTheme(parseTheme(source), colorMap);\n }\n static createFromParsedTheme(source, colorMap) {\n return resolveParsedThemeRules(source, colorMap);\n }\n _cachedMatchRoot = new CachedFn(\n (scopeName) => this._root.match(scopeName)\n );\n getColorMap() {\n return this._colorMap.getColorMap();\n }\n getDefaults() {\n return this._defaults;\n }\n match(scopePath) {\n if (scopePath === null) {\n return this._defaults;\n }\n const scopeName = scopePath.scopeName;\n const matchingTrieElements = this._cachedMatchRoot.get(scopeName);\n const effectiveRule = matchingTrieElements.find(\n (v) => _scopePathMatchesParentScopes(scopePath.parent, v.parentScopes)\n );\n if (!effectiveRule) {\n return null;\n }\n return new StyleAttributes(\n effectiveRule.fontStyle,\n effectiveRule.foreground,\n effectiveRule.background\n );\n }\n};\nvar ScopeStack = class _ScopeStack {\n constructor(parent, scopeName) {\n this.parent = parent;\n this.scopeName = scopeName;\n }\n static push(path, scopeNames) {\n for (const name of scopeNames) {\n path = new _ScopeStack(path, name);\n }\n return path;\n }\n static from(...segments) {\n let result = null;\n for (let i = 0; i < segments.length; i++) {\n result = new _ScopeStack(result, segments[i]);\n }\n return result;\n }\n push(scopeName) {\n return new _ScopeStack(this, scopeName);\n }\n getSegments() {\n let item = this;\n const result = [];\n while (item) {\n result.push(item.scopeName);\n item = item.parent;\n }\n result.reverse();\n return result;\n }\n toString() {\n return this.getSegments().join(\" \");\n }\n extends(other) {\n if (this === other) {\n return true;\n }\n if (this.parent === null) {\n return false;\n }\n return this.parent.extends(other);\n }\n getExtensionIfDefined(base) {\n const result = [];\n let item = this;\n while (item && item !== base) {\n result.push(item.scopeName);\n item = item.parent;\n }\n return item === base ? result.reverse() : void 0;\n }\n};\nfunction _scopePathMatchesParentScopes(scopePath, parentScopes) {\n if (parentScopes.length === 0) {\n return true;\n }\n for (let index = 0; index < parentScopes.length; index++) {\n let scopePattern = parentScopes[index];\n let scopeMustMatch = false;\n if (scopePattern === \">\") {\n if (index === parentScopes.length - 1) {\n return false;\n }\n scopePattern = parentScopes[++index];\n scopeMustMatch = true;\n }\n while (scopePath) {\n if (_matchesScope(scopePath.scopeName, scopePattern)) {\n break;\n }\n if (scopeMustMatch) {\n return false;\n }\n scopePath = scopePath.parent;\n }\n if (!scopePath) {\n return false;\n }\n scopePath = scopePath.parent;\n }\n return true;\n}\nfunction _matchesScope(scopeName, scopePattern) {\n return scopePattern === scopeName || scopeName.startsWith(scopePattern) && scopeName[scopePattern.length] === \".\";\n}\nvar StyleAttributes = class {\n constructor(fontStyle, foregroundId, backgroundId) {\n this.fontStyle = fontStyle;\n this.foregroundId = foregroundId;\n this.backgroundId = backgroundId;\n }\n};\nfunction parseTheme(source) {\n if (!source) {\n return [];\n }\n if (!source.settings || !Array.isArray(source.settings)) {\n return [];\n }\n let settings = source.settings;\n let result = [], resultLen = 0;\n for (let i = 0, len = settings.length; i < len; i++) {\n let entry = settings[i];\n if (!entry.settings) {\n continue;\n }\n let scopes;\n if (typeof entry.scope === \"string\") {\n let _scope = entry.scope;\n _scope = _scope.replace(/^[,]+/, \"\");\n _scope = _scope.replace(/[,]+$/, \"\");\n scopes = _scope.split(\",\");\n } else if (Array.isArray(entry.scope)) {\n scopes = entry.scope;\n } else {\n scopes = [\"\"];\n }\n let fontStyle = -1 /* NotSet */;\n if (typeof entry.settings.fontStyle === \"string\") {\n fontStyle = 0 /* None */;\n let segments = entry.settings.fontStyle.split(\" \");\n for (let j = 0, lenJ = segments.length; j < lenJ; j++) {\n let segment = segments[j];\n switch (segment) {\n case \"italic\":\n fontStyle = fontStyle | 1 /* Italic */;\n break;\n case \"bold\":\n fontStyle = fontStyle | 2 /* Bold */;\n break;\n case \"underline\":\n fontStyle = fontStyle | 4 /* Underline */;\n break;\n case \"strikethrough\":\n fontStyle = fontStyle | 8 /* Strikethrough */;\n break;\n }\n }\n }\n let foreground = null;\n if (typeof entry.settings.foreground === \"string\" && isValidHexColor(entry.settings.foreground)) {\n foreground = entry.settings.foreground;\n }\n let background = null;\n if (typeof entry.settings.background === \"string\" && isValidHexColor(entry.settings.background)) {\n background = entry.settings.background;\n }\n for (let j = 0, lenJ = scopes.length; j < lenJ; j++) {\n let _scope = scopes[j].trim();\n let segments = _scope.split(\" \");\n let scope = segments[segments.length - 1];\n let parentScopes = null;\n if (segments.length > 1) {\n parentScopes = segments.slice(0, segments.length - 1);\n parentScopes.reverse();\n }\n result[resultLen++] = new ParsedThemeRule(\n scope,\n parentScopes,\n i,\n fontStyle,\n foreground,\n background\n );\n }\n }\n return result;\n}\nvar ParsedThemeRule = class {\n constructor(scope, parentScopes, index, fontStyle, foreground, background) {\n this.scope = scope;\n this.parentScopes = parentScopes;\n this.index = index;\n this.fontStyle = fontStyle;\n this.foreground = foreground;\n this.background = background;\n }\n};\nvar FontStyle = /* @__PURE__ */ ((FontStyle2) => {\n FontStyle2[FontStyle2[\"NotSet\"] = -1] = \"NotSet\";\n FontStyle2[FontStyle2[\"None\"] = 0] = \"None\";\n FontStyle2[FontStyle2[\"Italic\"] = 1] = \"Italic\";\n FontStyle2[FontStyle2[\"Bold\"] = 2] = \"Bold\";\n FontStyle2[FontStyle2[\"Underline\"] = 4] = \"Underline\";\n FontStyle2[FontStyle2[\"Strikethrough\"] = 8] = \"Strikethrough\";\n return FontStyle2;\n})(FontStyle || {});\nfunction resolveParsedThemeRules(parsedThemeRules, _colorMap) {\n parsedThemeRules.sort((a, b) => {\n let r = strcmp(a.scope, b.scope);\n if (r !== 0) {\n return r;\n }\n r = strArrCmp(a.parentScopes, b.parentScopes);\n if (r !== 0) {\n return r;\n }\n return a.index - b.index;\n });\n let defaultFontStyle = 0 /* None */;\n let defaultForeground = \"#000000\";\n let defaultBackground = \"#ffffff\";\n while (parsedThemeRules.length >= 1 && parsedThemeRules[0].scope === \"\") {\n let incomingDefaults = parsedThemeRules.shift();\n if (incomingDefaults.fontStyle !== -1 /* NotSet */) {\n defaultFontStyle = incomingDefaults.fontStyle;\n }\n if (incomingDefaults.foreground !== null) {\n defaultForeground = incomingDefaults.foreground;\n }\n if (incomingDefaults.background !== null) {\n defaultBackground = incomingDefaults.background;\n }\n }\n let colorMap = new ColorMap(_colorMap);\n let defaults = new StyleAttributes(defaultFontStyle, colorMap.getId(defaultForeground), colorMap.getId(defaultBackground));\n let root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, -1 /* NotSet */, 0, 0), []);\n for (let i = 0, len = parsedThemeRules.length; i < len; i++) {\n let rule = parsedThemeRules[i];\n root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));\n }\n return new Theme(colorMap, defaults, root);\n}\nvar ColorMap = class {\n _isFrozen;\n _lastColorId;\n _id2color;\n _color2id;\n constructor(_colorMap) {\n this._lastColorId = 0;\n this._id2color = [];\n this._color2id = /* @__PURE__ */ Object.create(null);\n if (Array.isArray(_colorMap)) {\n this._isFrozen = true;\n for (let i = 0, len = _colorMap.length; i < len; i++) {\n this._color2id[_colorMap[i]] = i;\n this._id2color[i] = _colorMap[i];\n }\n } else {\n this._isFrozen = false;\n }\n }\n getId(color) {\n if (color === null) {\n return 0;\n }\n color = color.toUpperCase();\n let value = this._color2id[color];\n if (value) {\n return value;\n }\n if (this._isFrozen) {\n throw new Error(`Missing color in color map - ${color}`);\n }\n value = ++this._lastColorId;\n this._color2id[color] = value;\n this._id2color[value] = color;\n return value;\n }\n getColorMap() {\n return this._id2color.slice(0);\n }\n};\nvar emptyParentScopes = Object.freeze([]);\nvar ThemeTrieElementRule = class _ThemeTrieElementRule {\n scopeDepth;\n parentScopes;\n fontStyle;\n foreground;\n background;\n constructor(scopeDepth, parentScopes, fontStyle, foreground, background) {\n this.scopeDepth = scopeDepth;\n this.parentScopes = parentScopes || emptyParentScopes;\n this.fontStyle = fontStyle;\n this.foreground = foreground;\n this.background = background;\n }\n clone() {\n return new _ThemeTrieElementRule(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);\n }\n static cloneArr(arr) {\n let r = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n r[i] = arr[i].clone();\n }\n return r;\n }\n acceptOverwrite(scopeDepth, fontStyle, foreground, background) {\n if (this.scopeDepth > scopeDepth) {\n console.log(\"how did this happen?\");\n } else {\n this.scopeDepth = scopeDepth;\n }\n if (fontStyle !== -1 /* NotSet */) {\n this.fontStyle = fontStyle;\n }\n if (foreground !== 0) {\n this.foreground = foreground;\n }\n if (background !== 0) {\n this.background = background;\n }\n }\n};\nvar ThemeTrieElement = class _ThemeTrieElement {\n constructor(_mainRule, rulesWithParentScopes = [], _children = {}) {\n this._mainRule = _mainRule;\n this._children = _children;\n this._rulesWithParentScopes = rulesWithParentScopes;\n }\n _rulesWithParentScopes;\n static _cmpBySpecificity(a, b) {\n if (a.scopeDepth !== b.scopeDepth) {\n return b.scopeDepth - a.scopeDepth;\n }\n let aParentIndex = 0;\n let bParentIndex = 0;\n while (true) {\n if (a.parentScopes[aParentIndex] === \">\") {\n aParentIndex++;\n }\n if (b.parentScopes[bParentIndex] === \">\") {\n bParentIndex++;\n }\n if (aParentIndex >= a.parentScopes.length || bParentIndex >= b.parentScopes.length) {\n break;\n }\n const parentScopeLengthDiff = b.parentScopes[bParentIndex].length - a.parentScopes[aParentIndex].length;\n if (parentScopeLengthDiff !== 0) {\n return parentScopeLengthDiff;\n }\n aParentIndex++;\n bParentIndex++;\n }\n return b.parentScopes.length - a.parentScopes.length;\n }\n match(scope) {\n if (scope !== \"\") {\n let dotIndex = scope.indexOf(\".\");\n let head;\n let tail;\n if (dotIndex === -1) {\n head = scope;\n tail = \"\";\n } else {\n head = scope.substring(0, dotIndex);\n tail = scope.substring(dotIndex + 1);\n }\n if (this._children.hasOwnProperty(head)) {\n return this._children[head].match(tail);\n }\n }\n const rules = this._rulesWithParentScopes.concat(this._mainRule);\n rules.sort(_ThemeTrieElement._cmpBySpecificity);\n return rules;\n }\n insert(scopeDepth, scope, parentScopes, fontStyle, foreground, background) {\n if (scope === \"\") {\n this._doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background);\n return;\n }\n let dotIndex = scope.indexOf(\".\");\n let head;\n let tail;\n if (dotIndex === -1) {\n head = scope;\n tail = \"\";\n } else {\n head = scope.substring(0, dotIndex);\n tail = scope.substring(dotIndex + 1);\n }\n let child;\n if (this._children.hasOwnProperty(head)) {\n child = this._children[head];\n } else {\n child = new _ThemeTrieElement(this._mainRule.clone(), ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes));\n this._children[head] = child;\n }\n child.insert(scopeDepth + 1, tail, parentScopes, fontStyle, foreground, background);\n }\n _doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background) {\n if (parentScopes === null) {\n this._mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\n return;\n }\n for (let i = 0, len = this._rulesWithParentScopes.length; i < len; i++) {\n let rule = this._rulesWithParentScopes[i];\n if (strArrCmp(rule.parentScopes, parentScopes) === 0) {\n rule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);\n return;\n }\n }\n if (fontStyle === -1 /* NotSet */) {\n fontStyle = this._mainRule.fontStyle;\n }\n if (foreground === 0) {\n foreground = this._mainRule.foreground;\n }\n if (background === 0) {\n background = this._mainRule.background;\n }\n this._rulesWithParentScopes.push(new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background));\n }\n};\n\n// src/encodedTokenAttributes.ts\nvar EncodedTokenMetadata = class _EncodedTokenMetadata {\n static toBinaryStr(encodedTokenAttributes) {\n return encodedTokenAttributes.toString(2).padStart(32, \"0\");\n }\n static print(encodedTokenAttributes) {\n const languageId = _EncodedTokenMetadata.getLanguageId(encodedTokenAttributes);\n const tokenType = _EncodedTokenMetadata.getTokenType(encodedTokenAttributes);\n const fontStyle = _EncodedTokenMetadata.getFontStyle(encodedTokenAttributes);\n const foreground = _EncodedTokenMetadata.getForeground(encodedTokenAttributes);\n const background = _EncodedTokenMetadata.getBackground(encodedTokenAttributes);\n console.log({\n languageId,\n tokenType,\n fontStyle,\n foreground,\n background\n });\n }\n static getLanguageId(encodedTokenAttributes) {\n return (encodedTokenAttributes & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */;\n }\n static getTokenType(encodedTokenAttributes) {\n return (encodedTokenAttributes & 768 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */;\n }\n static containsBalancedBrackets(encodedTokenAttributes) {\n return (encodedTokenAttributes & 1024 /* BALANCED_BRACKETS_MASK */) !== 0;\n }\n static getFontStyle(encodedTokenAttributes) {\n return (encodedTokenAttributes & 30720 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */;\n }\n static getForeground(encodedTokenAttributes) {\n return (encodedTokenAttributes & 16744448 /* FOREGROUND_MASK */) >>> 15 /* FOREGROUND_OFFSET */;\n }\n static getBackground(encodedTokenAttributes) {\n return (encodedTokenAttributes & 4278190080 /* BACKGROUND_MASK */) >>> 24 /* BACKGROUND_OFFSET */;\n }\n /**\n * Updates the fields in `metadata`.\n * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.\n */\n static set(encodedTokenAttributes, languageId, tokenType, containsBalancedBrackets, fontStyle, foreground, background) {\n let _languageId = _EncodedTokenMetadata.getLanguageId(encodedTokenAttributes);\n let _tokenType = _EncodedTokenMetadata.getTokenType(encodedTokenAttributes);\n let _containsBalancedBracketsBit = _EncodedTokenMetadata.containsBalancedBrackets(encodedTokenAttributes) ? 1 : 0;\n let _fontStyle = _EncodedTokenMetadata.getFontStyle(encodedTokenAttributes);\n let _foreground = _EncodedTokenMetadata.getForeground(encodedTokenAttributes);\n let _background = _EncodedTokenMetadata.getBackground(encodedTokenAttributes);\n if (languageId !== 0) {\n _languageId = languageId;\n }\n if (tokenType !== 8 /* NotSet */) {\n _tokenType = fromOptionalTokenType(tokenType);\n }\n if (containsBalancedBrackets !== null) {\n _containsBalancedBracketsBit = containsBalancedBrackets ? 1 : 0;\n }\n if (fontStyle !== -1 /* NotSet */) {\n _fontStyle = fontStyle;\n }\n if (foreground !== 0) {\n _foreground = foreground;\n }\n if (background !== 0) {\n _background = background;\n }\n return (_languageId << 0 /* LANGUAGEID_OFFSET */ | _tokenType << 8 /* TOKEN_TYPE_OFFSET */ | _containsBalancedBracketsBit << 10 /* BALANCED_BRACKETS_OFFSET */ | _fontStyle << 11 /* FONT_STYLE_OFFSET */ | _foreground << 15 /* FOREGROUND_OFFSET */ | _background << 24 /* BACKGROUND_OFFSET */) >>> 0;\n }\n};\nfunction toOptionalTokenType(standardType) {\n return standardType;\n}\nfunction fromOptionalTokenType(standardType) {\n return standardType;\n}\n\n// src/matcher.ts\nfunction createMatchers(selector, matchesName) {\n const results = [];\n const tokenizer = newTokenizer(selector);\n let token = tokenizer.next();\n while (token !== null) {\n let priority = 0;\n if (token.length === 2 && token.charAt(1) === \":\") {\n switch (token.charAt(0)) {\n case \"R\":\n priority = 1;\n break;\n case \"L\":\n priority = -1;\n break;\n default:\n console.log(`Unknown priority ${token} in scope selector`);\n }\n token = tokenizer.next();\n }\n let matcher = parseConjunction();\n results.push({ matcher, priority });\n if (token !== \",\") {\n break;\n }\n token = tokenizer.next();\n }\n return results;\n function parseOperand() {\n if (token === \"-\") {\n token = tokenizer.next();\n const expressionToNegate = parseOperand();\n return (matcherInput) => !!expressionToNegate && !expressionToNegate(matcherInput);\n }\n if (token === \"(\") {\n token = tokenizer.next();\n const expressionInParents = parseInnerExpression();\n if (token === \")\") {\n token = tokenizer.next();\n }\n return expressionInParents;\n }\n if (isIdentifier(token)) {\n const identifiers = [];\n do {\n identifiers.push(token);\n token = tokenizer.next();\n } while (isIdentifier(token));\n return (matcherInput) => matchesName(identifiers, matcherInput);\n }\n return null;\n }\n function parseConjunction() {\n const matchers = [];\n let matcher = parseOperand();\n while (matcher) {\n matchers.push(matcher);\n matcher = parseOperand();\n }\n return (matcherInput) => matchers.every((matcher2) => matcher2(matcherInput));\n }\n function parseInnerExpression() {\n const matchers = [];\n let matcher = parseConjunction();\n while (matcher) {\n matchers.push(matcher);\n if (token === \"|\" || token === \",\") {\n do {\n token = tokenizer.next();\n } while (token === \"|\" || token === \",\");\n } else {\n break;\n }\n matcher = parseConjunction();\n }\n return (matcherInput) => matchers.some((matcher2) => matcher2(matcherInput));\n }\n}\nfunction isIdentifier(token) {\n return !!token && !!token.match(/[\\w\\.:]+/);\n}\nfunction newTokenizer(input) {\n let regex = /([LR]:|[\\w\\.:][\\w\\.:\\-]*|[\\,\\|\\-\\(\\)])/g;\n let match = regex.exec(input);\n return {\n next: () => {\n if (!match) {\n return null;\n }\n const res = match[0];\n match = regex.exec(input);\n return res;\n }\n };\n}\n\n// src/onigLib.ts\nvar FindOption = /* @__PURE__ */ ((FindOption2) => {\n FindOption2[FindOption2[\"None\"] = 0] = \"None\";\n FindOption2[FindOption2[\"NotBeginString\"] = 1] = \"NotBeginString\";\n FindOption2[FindOption2[\"NotEndString\"] = 2] = \"NotEndString\";\n FindOption2[FindOption2[\"NotBeginPosition\"] = 4] = \"NotBeginPosition\";\n FindOption2[FindOption2[\"DebugCall\"] = 8] = \"DebugCall\";\n return FindOption2;\n})(FindOption || {});\nfunction disposeOnigString(str) {\n if (typeof str.dispose === \"function\") {\n str.dispose();\n }\n}\n\n// src/grammar/grammarDependencies.ts\nvar TopLevelRuleReference = class {\n constructor(scopeName) {\n this.scopeName = scopeName;\n }\n toKey() {\n return this.scopeName;\n }\n};\nvar TopLevelRepositoryRuleReference = class {\n constructor(scopeName, ruleName) {\n this.scopeName = scopeName;\n this.ruleName = ruleName;\n }\n toKey() {\n return `${this.scopeName}#${this.ruleName}`;\n }\n};\nvar ExternalReferenceCollector = class {\n _references = [];\n _seenReferenceKeys = /* @__PURE__ */ new Set();\n get references() {\n return this._references;\n }\n visitedRule = /* @__PURE__ */ new Set();\n add(reference) {\n const key = reference.toKey();\n if (this._seenReferenceKeys.has(key)) {\n return;\n }\n this._seenReferenceKeys.add(key);\n this._references.push(reference);\n }\n};\nvar ScopeDependencyProcessor = class {\n constructor(repo, initialScopeName) {\n this.repo = repo;\n this.initialScopeName = initialScopeName;\n this.seenFullScopeRequests.add(this.initialScopeName);\n this.Q = [new TopLevelRuleReference(this.initialScopeName)];\n }\n seenFullScopeRequests = /* @__PURE__ */ new Set();\n seenPartialScopeRequests = /* @__PURE__ */ new Set();\n Q;\n processQueue() {\n const q = this.Q;\n this.Q = [];\n const deps = new ExternalReferenceCollector();\n for (const dep of q) {\n collectReferencesOfReference(dep, this.initialScopeName, this.repo, deps);\n }\n for (const dep of deps.references) {\n if (dep instanceof TopLevelRuleReference) {\n if (this.seenFullScopeRequests.has(dep.scopeName)) {\n continue;\n }\n this.seenFullScopeRequests.add(dep.scopeName);\n this.Q.push(dep);\n } else {\n if (this.seenFullScopeRequests.has(dep.scopeName)) {\n continue;\n }\n if (this.seenPartialScopeRequests.has(dep.toKey())) {\n continue;\n }\n this.seenPartialScopeRequests.add(dep.toKey());\n this.Q.push(dep);\n }\n }\n }\n};\nfunction collectReferencesOfReference(reference, baseGrammarScopeName, repo, result) {\n const selfGrammar = repo.lookup(reference.scopeName);\n if (!selfGrammar) {\n if (reference.scopeName === baseGrammarScopeName) {\n throw new Error(`No grammar provided for <${baseGrammarScopeName}>`);\n }\n return;\n }\n const baseGrammar = repo.lookup(baseGrammarScopeName);\n if (reference instanceof TopLevelRuleReference) {\n collectExternalReferencesInTopLevelRule({ baseGrammar, selfGrammar }, result);\n } else {\n collectExternalReferencesInTopLevelRepositoryRule(\n reference.ruleName,\n { baseGrammar, selfGrammar, repository: selfGrammar.repository },\n result\n );\n }\n const injections = repo.injections(reference.scopeName);\n if (injections) {\n for (const injection of injections) {\n result.add(new TopLevelRuleReference(injection));\n }\n }\n}\nfunction collectExternalReferencesInTopLevelRepositoryRule(ruleName, context, result) {\n if (context.repository && context.repository[ruleName]) {\n const rule = context.repository[ruleName];\n collectExternalReferencesInRules([rule], context, result);\n }\n}\nfunction collectExternalReferencesInTopLevelRule(context, result) {\n if (context.selfGrammar.patterns && Array.isArray(context.selfGrammar.patterns)) {\n collectExternalReferencesInRules(\n context.selfGrammar.patterns,\n { ...context, repository: context.selfGrammar.repository },\n result\n );\n }\n if (context.selfGrammar.injections) {\n collectExternalReferencesInRules(\n Object.values(context.selfGrammar.injections),\n { ...context, repository: context.selfGrammar.repository },\n result\n );\n }\n}\nfunction collectExternalReferencesInRules(rules, context, result) {\n for (const rule of rules) {\n if (result.visitedRule.has(rule)) {\n continue;\n }\n result.visitedRule.add(rule);\n const patternRepository = rule.repository ? mergeObjects({}, context.repository, rule.repository) : context.repository;\n if (Array.isArray(rule.patterns)) {\n collectExternalReferencesInRules(rule.patterns, { ...context, repository: patternRepository }, result);\n }\n const include = rule.include;\n if (!include) {\n continue;\n }\n const reference = parseInclude(include);\n switch (reference.kind) {\n case 0 /* Base */:\n collectExternalReferencesInTopLevelRule({ ...context, selfGrammar: context.baseGrammar }, result);\n break;\n case 1 /* Self */:\n collectExternalReferencesInTopLevelRule(context, result);\n break;\n case 2 /* RelativeReference */:\n collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, { ...context, repository: patternRepository }, result);\n break;\n case 3 /* TopLevelReference */:\n case 4 /* TopLevelRepositoryReference */:\n const selfGrammar = reference.scopeName === context.selfGrammar.scopeName ? context.selfGrammar : reference.scopeName === context.baseGrammar.scopeName ? context.baseGrammar : void 0;\n if (selfGrammar) {\n const newContext = { baseGrammar: context.baseGrammar, selfGrammar, repository: patternRepository };\n if (reference.kind === 4 /* TopLevelRepositoryReference */) {\n collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, newContext, result);\n } else {\n collectExternalReferencesInTopLevelRule(newContext, result);\n }\n } else {\n if (reference.kind === 4 /* TopLevelRepositoryReference */) {\n result.add(new TopLevelRepositoryRuleReference(reference.scopeName, reference.ruleName));\n } else {\n result.add(new TopLevelRuleReference(reference.scopeName));\n }\n }\n break;\n }\n }\n}\nvar BaseReference = class {\n kind = 0 /* Base */;\n};\nvar SelfReference = class {\n kind = 1 /* Self */;\n};\nvar RelativeReference = class {\n constructor(ruleName) {\n this.ruleName = ruleName;\n }\n kind = 2 /* RelativeReference */;\n};\nvar TopLevelReference = class {\n constructor(scopeName) {\n this.scopeName = scopeName;\n }\n kind = 3 /* TopLevelReference */;\n};\nvar TopLevelRepositoryReference = class {\n constructor(scopeName, ruleName) {\n this.scopeName = scopeName;\n this.ruleName = ruleName;\n }\n kind = 4 /* TopLevelRepositoryReference */;\n};\nfunction parseInclude(include) {\n if (include === \"$base\") {\n return new BaseReference();\n } else if (include === \"$self\") {\n return new SelfReference();\n }\n const indexOfSharp = include.indexOf(\"#\");\n if (indexOfSharp === -1) {\n return new TopLevelReference(include);\n } else if (indexOfSharp === 0) {\n return new RelativeReference(include.substring(1));\n } else {\n const scopeName = include.substring(0, indexOfSharp);\n const ruleName = include.substring(indexOfSharp + 1);\n return new TopLevelRepositoryReference(scopeName, ruleName);\n }\n}\n\n// src/rule.ts\nvar HAS_BACK_REFERENCES = /\\\\(\\d+)/;\nvar BACK_REFERENCING_END = /\\\\(\\d+)/g;\nvar ruleIdSymbol = Symbol(\"RuleId\");\nvar endRuleId = -1;\nvar whileRuleId = -2;\nfunction ruleIdFromNumber(id) {\n return id;\n}\nfunction ruleIdToNumber(id) {\n return id;\n}\nvar Rule = class {\n $location;\n id;\n _nameIsCapturing;\n _name;\n _contentNameIsCapturing;\n _contentName;\n constructor($location, id, name, contentName) {\n this.$location = $location;\n this.id = id;\n this._name = name || null;\n this._nameIsCapturing = RegexSource.hasCaptures(this._name);\n this._contentName = contentName || null;\n this._contentNameIsCapturing = RegexSource.hasCaptures(this._contentName);\n }\n get debugName() {\n const location = this.$location ? `${basename(this.$location.filename)}:${this.$location.line}` : \"unknown\";\n return `${this.constructor.name}#${this.id} @ ${location}`;\n }\n getName(lineText, captureIndices) {\n if (!this._nameIsCapturing || this._name === null || lineText === null || captureIndices === null) {\n return this._name;\n }\n return RegexSource.replaceCaptures(this._name, lineText, captureIndices);\n }\n getContentName(lineText, captureIndices) {\n if (!this._contentNameIsCapturing || this._contentName === null) {\n return this._contentName;\n }\n return RegexSource.replaceCaptures(this._contentName, lineText, captureIndices);\n }\n};\nvar CaptureRule = class extends Rule {\n retokenizeCapturedWithRuleId;\n constructor($location, id, name, contentName, retokenizeCapturedWithRuleId) {\n super($location, id, name, contentName);\n this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId;\n }\n dispose() {\n }\n collectPatterns(grammar, out) {\n throw new Error(\"Not supported!\");\n }\n compile(grammar, endRegexSource) {\n throw new Error(\"Not supported!\");\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n throw new Error(\"Not supported!\");\n }\n};\nvar MatchRule = class extends Rule {\n _match;\n captures;\n _cachedCompiledPatterns;\n constructor($location, id, name, match, captures) {\n super($location, id, name, null);\n this._match = new RegExpSource(match, this.id);\n this.captures = captures;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n get debugMatchRegExp() {\n return `${this._match.source}`;\n }\n collectPatterns(grammar, out) {\n out.push(this._match);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n this.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n return this._cachedCompiledPatterns;\n }\n};\nvar IncludeOnlyRule = class extends Rule {\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n constructor($location, id, name, contentName, patterns) {\n super($location, id, name, contentName);\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n collectPatterns(grammar, out) {\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, out);\n }\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n this.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n return this._cachedCompiledPatterns;\n }\n};\nvar BeginEndRule = class extends Rule {\n _begin;\n beginCaptures;\n _end;\n endHasBackReferences;\n endCaptures;\n applyEndPatternLast;\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n constructor($location, id, name, contentName, begin, beginCaptures, end, endCaptures, applyEndPatternLast, patterns) {\n super($location, id, name, contentName);\n this._begin = new RegExpSource(begin, this.id);\n this.beginCaptures = beginCaptures;\n this._end = new RegExpSource(end ? end : \"\\uFFFF\", -1);\n this.endHasBackReferences = this._end.hasBackReferences;\n this.endCaptures = endCaptures;\n this.applyEndPatternLast = applyEndPatternLast || false;\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n }\n get debugBeginRegExp() {\n return `${this._begin.source}`;\n }\n get debugEndRegExp() {\n return `${this._end.source}`;\n }\n getEndWithResolvedBackReferences(lineText, captureIndices) {\n return this._end.resolveBackReferences(lineText, captureIndices);\n }\n collectPatterns(grammar, out) {\n out.push(this._begin);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar, endRegexSource).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar, endRegexSource) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n if (this.applyEndPatternLast) {\n this._cachedCompiledPatterns.push(this._end.hasBackReferences ? this._end.clone() : this._end);\n } else {\n this._cachedCompiledPatterns.unshift(this._end.hasBackReferences ? this._end.clone() : this._end);\n }\n }\n if (this._end.hasBackReferences) {\n if (this.applyEndPatternLast) {\n this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, endRegexSource);\n } else {\n this._cachedCompiledPatterns.setSource(0, endRegexSource);\n }\n }\n return this._cachedCompiledPatterns;\n }\n};\nvar BeginWhileRule = class extends Rule {\n _begin;\n beginCaptures;\n whileCaptures;\n _while;\n whileHasBackReferences;\n hasMissingPatterns;\n patterns;\n _cachedCompiledPatterns;\n _cachedCompiledWhilePatterns;\n constructor($location, id, name, contentName, begin, beginCaptures, _while, whileCaptures, patterns) {\n super($location, id, name, contentName);\n this._begin = new RegExpSource(begin, this.id);\n this.beginCaptures = beginCaptures;\n this.whileCaptures = whileCaptures;\n this._while = new RegExpSource(_while, whileRuleId);\n this.whileHasBackReferences = this._while.hasBackReferences;\n this.patterns = patterns.patterns;\n this.hasMissingPatterns = patterns.hasMissingPatterns;\n this._cachedCompiledPatterns = null;\n this._cachedCompiledWhilePatterns = null;\n }\n dispose() {\n if (this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns.dispose();\n this._cachedCompiledPatterns = null;\n }\n if (this._cachedCompiledWhilePatterns) {\n this._cachedCompiledWhilePatterns.dispose();\n this._cachedCompiledWhilePatterns = null;\n }\n }\n get debugBeginRegExp() {\n return `${this._begin.source}`;\n }\n get debugWhileRegExp() {\n return `${this._while.source}`;\n }\n getWhileWithResolvedBackReferences(lineText, captureIndices) {\n return this._while.resolveBackReferences(lineText, captureIndices);\n }\n collectPatterns(grammar, out) {\n out.push(this._begin);\n }\n compile(grammar, endRegexSource) {\n return this._getCachedCompiledPatterns(grammar).compile(grammar);\n }\n compileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledPatterns(grammar) {\n if (!this._cachedCompiledPatterns) {\n this._cachedCompiledPatterns = new RegExpSourceList();\n for (const pattern of this.patterns) {\n const rule = grammar.getRule(pattern);\n rule.collectPatterns(grammar, this._cachedCompiledPatterns);\n }\n }\n return this._cachedCompiledPatterns;\n }\n compileWhile(grammar, endRegexSource) {\n return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compile(grammar);\n }\n compileWhileAG(grammar, endRegexSource, allowA, allowG) {\n return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);\n }\n _getCachedCompiledWhilePatterns(grammar, endRegexSource) {\n if (!this._cachedCompiledWhilePatterns) {\n this._cachedCompiledWhilePatterns = new RegExpSourceList();\n this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while);\n }\n if (this._while.hasBackReferences) {\n this._cachedCompiledWhilePatterns.setSource(0, endRegexSource ? endRegexSource : \"\\uFFFF\");\n }\n return this._cachedCompiledWhilePatterns;\n }\n};\nvar RuleFactory = class _RuleFactory {\n static createCaptureRule(helper, $location, name, contentName, retokenizeCapturedWithRuleId) {\n return helper.registerRule((id) => {\n return new CaptureRule($location, id, name, contentName, retokenizeCapturedWithRuleId);\n });\n }\n static getCompiledRuleId(desc, helper, repository) {\n if (!desc.id) {\n helper.registerRule((id) => {\n desc.id = id;\n if (desc.match) {\n return new MatchRule(\n desc.$vscodeTextmateLocation,\n desc.id,\n desc.name,\n desc.match,\n _RuleFactory._compileCaptures(desc.captures, helper, repository)\n );\n }\n if (typeof desc.begin === \"undefined\") {\n if (desc.repository) {\n repository = mergeObjects({}, repository, desc.repository);\n }\n let patterns = desc.patterns;\n if (typeof patterns === \"undefined\" && desc.include) {\n patterns = [{ include: desc.include }];\n }\n return new IncludeOnlyRule(\n desc.$vscodeTextmateLocation,\n desc.id,\n desc.name,\n desc.contentName,\n _RuleFactory._compilePatterns(patterns, helper, repository)\n );\n }\n if (desc.while) {\n return new BeginWhileRule(\n desc.$vscodeTextmateLocation,\n desc.id,\n desc.name,\n desc.contentName,\n desc.begin,\n _RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository),\n desc.while,\n _RuleFactory._compileCaptures(desc.whileCaptures || desc.captures, helper, repository),\n _RuleFactory._compilePatterns(desc.patterns, helper, repository)\n );\n }\n return new BeginEndRule(\n desc.$vscodeTextmateLocation,\n desc.id,\n desc.name,\n desc.contentName,\n desc.begin,\n _RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository),\n desc.end,\n _RuleFactory._compileCaptures(desc.endCaptures || desc.captures, helper, repository),\n desc.applyEndPatternLast,\n _RuleFactory._compilePatterns(desc.patterns, helper, repository)\n );\n });\n }\n return desc.id;\n }\n static _compileCaptures(captures, helper, repository) {\n let r = [];\n if (captures) {\n let maximumCaptureId = 0;\n for (const captureId in captures) {\n if (captureId === \"$vscodeTextmateLocation\") {\n continue;\n }\n const numericCaptureId = parseInt(captureId, 10);\n if (numericCaptureId > maximumCaptureId) {\n maximumCaptureId = numericCaptureId;\n }\n }\n for (let i = 0; i <= maximumCaptureId; i++) {\n r[i] = null;\n }\n for (const captureId in captures) {\n if (captureId === \"$vscodeTextmateLocation\") {\n continue;\n }\n const numericCaptureId = parseInt(captureId, 10);\n let retokenizeCapturedWithRuleId = 0;\n if (captures[captureId].patterns) {\n retokenizeCapturedWithRuleId = _RuleFactory.getCompiledRuleId(captures[captureId], helper, repository);\n }\n r[numericCaptureId] = _RuleFactory.createCaptureRule(helper, captures[captureId].$vscodeTextmateLocation, captures[captureId].name, captures[captureId].contentName, retokenizeCapturedWithRuleId);\n }\n }\n return r;\n }\n static _compilePatterns(patterns, helper, repository) {\n let r = [];\n if (patterns) {\n for (let i = 0, len = patterns.length; i < len; i++) {\n const pattern = patterns[i];\n let ruleId = -1;\n if (pattern.include) {\n const reference = parseInclude(pattern.include);\n switch (reference.kind) {\n case 0 /* Base */:\n case 1 /* Self */:\n ruleId = _RuleFactory.getCompiledRuleId(repository[pattern.include], helper, repository);\n break;\n case 2 /* RelativeReference */:\n let localIncludedRule = repository[reference.ruleName];\n if (localIncludedRule) {\n ruleId = _RuleFactory.getCompiledRuleId(localIncludedRule, helper, repository);\n } else {\n }\n break;\n case 3 /* TopLevelReference */:\n case 4 /* TopLevelRepositoryReference */:\n const externalGrammarName = reference.scopeName;\n const externalGrammarInclude = reference.kind === 4 /* TopLevelRepositoryReference */ ? reference.ruleName : null;\n const externalGrammar = helper.getExternalGrammar(externalGrammarName, repository);\n if (externalGrammar) {\n if (externalGrammarInclude) {\n let externalIncludedRule = externalGrammar.repository[externalGrammarInclude];\n if (externalIncludedRule) {\n ruleId = _RuleFactory.getCompiledRuleId(externalIncludedRule, helper, externalGrammar.repository);\n } else {\n }\n } else {\n ruleId = _RuleFactory.getCompiledRuleId(externalGrammar.repository.$self, helper, externalGrammar.repository);\n }\n } else {\n }\n break;\n }\n } else {\n ruleId = _RuleFactory.getCompiledRuleId(pattern, helper, repository);\n }\n if (ruleId !== -1) {\n const rule = helper.getRule(ruleId);\n let skipRule = false;\n if (rule instanceof IncludeOnlyRule || rule instanceof BeginEndRule || rule instanceof BeginWhileRule) {\n if (rule.hasMissingPatterns && rule.patterns.length === 0) {\n skipRule = true;\n }\n }\n if (skipRule) {\n continue;\n }\n r.push(ruleId);\n }\n }\n }\n return {\n patterns: r,\n hasMissingPatterns: (patterns ? patterns.length : 0) !== r.length\n };\n }\n};\nvar RegExpSource = class _RegExpSource {\n source;\n ruleId;\n hasAnchor;\n hasBackReferences;\n _anchorCache;\n constructor(regExpSource, ruleId) {\n if (regExpSource && typeof regExpSource === \"string\") {\n const len = regExpSource.length;\n let lastPushedPos = 0;\n let output = [];\n let hasAnchor = false;\n for (let pos = 0; pos < len; pos++) {\n const ch = regExpSource.charAt(pos);\n if (ch === \"\\\\\") {\n if (pos + 1 < len) {\n const nextCh = regExpSource.charAt(pos + 1);\n if (nextCh === \"z\") {\n output.push(regExpSource.substring(lastPushedPos, pos));\n output.push(\"$(?!\\\\n)(?<!\\\\n)\");\n lastPushedPos = pos + 2;\n } else if (nextCh === \"A\" || nextCh === \"G\") {\n hasAnchor = true;\n }\n pos++;\n }\n }\n }\n this.hasAnchor = hasAnchor;\n if (lastPushedPos === 0) {\n this.source = regExpSource;\n } else {\n output.push(regExpSource.substring(lastPushedPos, len));\n this.source = output.join(\"\");\n }\n } else {\n this.hasAnchor = false;\n this.source = regExpSource;\n }\n if (this.hasAnchor) {\n this._anchorCache = this._buildAnchorCache();\n } else {\n this._anchorCache = null;\n }\n this.ruleId = ruleId;\n if (typeof this.source === \"string\") {\n this.hasBackReferences = HAS_BACK_REFERENCES.test(this.source);\n } else {\n this.hasBackReferences = false;\n }\n }\n clone() {\n return new _RegExpSource(this.source, this.ruleId);\n }\n setSource(newSource) {\n if (this.source === newSource) {\n return;\n }\n this.source = newSource;\n if (this.hasAnchor) {\n this._anchorCache = this._buildAnchorCache();\n }\n }\n resolveBackReferences(lineText, captureIndices) {\n if (typeof this.source !== \"string\") {\n throw new Error(\"This method should only be called if the source is a string\");\n }\n let capturedValues = captureIndices.map((capture) => {\n return lineText.substring(capture.start, capture.end);\n });\n BACK_REFERENCING_END.lastIndex = 0;\n return this.source.replace(BACK_REFERENCING_END, (match, g1) => {\n return escapeRegExpCharacters(capturedValues[parseInt(g1, 10)] || \"\");\n });\n }\n _buildAnchorCache() {\n if (typeof this.source !== \"string\") {\n throw new Error(\"This method should only be called if the source is a string\");\n }\n let A0_G0_result = [];\n let A0_G1_result = [];\n let A1_G0_result = [];\n let A1_G1_result = [];\n let pos, len, ch, nextCh;\n for (pos = 0, len = this.source.length; pos < len; pos++) {\n ch = this.source.charAt(pos);\n A0_G0_result[pos] = ch;\n A0_G1_result[pos] = ch;\n A1_G0_result[pos] = ch;\n A1_G1_result[pos] = ch;\n if (ch === \"\\\\\") {\n if (pos + 1 < len) {\n nextCh = this.source.charAt(pos + 1);\n if (nextCh === \"A\") {\n A0_G0_result[pos + 1] = \"\\uFFFF\";\n A0_G1_result[pos + 1] = \"\\uFFFF\";\n A1_G0_result[pos + 1] = \"A\";\n A1_G1_result[pos + 1] = \"A\";\n } else if (nextCh === \"G\") {\n A0_G0_result[pos + 1] = \"\\uFFFF\";\n A0_G1_result[pos + 1] = \"G\";\n A1_G0_result[pos + 1] = \"\\uFFFF\";\n A1_G1_result[pos + 1] = \"G\";\n } else {\n A0_G0_result[pos + 1] = nextCh;\n A0_G1_result[pos + 1] = nextCh;\n A1_G0_result[pos + 1] = nextCh;\n A1_G1_result[pos + 1] = nextCh;\n }\n pos++;\n }\n }\n }\n return {\n A0_G0: A0_G0_result.join(\"\"),\n A0_G1: A0_G1_result.join(\"\"),\n A1_G0: A1_G0_result.join(\"\"),\n A1_G1: A1_G1_result.join(\"\")\n };\n }\n resolveAnchors(allowA, allowG) {\n if (!this.hasAnchor || !this._anchorCache || typeof this.source !== \"string\") {\n return this.source;\n }\n if (allowA) {\n if (allowG) {\n return this._anchorCache.A1_G1;\n } else {\n return this._anchorCache.A1_G0;\n }\n } else {\n if (allowG) {\n return this._anchorCache.A0_G1;\n } else {\n return this._anchorCache.A0_G0;\n }\n }\n }\n};\nvar RegExpSourceList = class {\n _items;\n _hasAnchors;\n _cached;\n _anchorCache;\n constructor() {\n this._items = [];\n this._hasAnchors = false;\n this._cached = null;\n this._anchorCache = {\n A0_G0: null,\n A0_G1: null,\n A1_G0: null,\n A1_G1: null\n };\n }\n dispose() {\n this._disposeCaches();\n }\n _disposeCaches() {\n if (this._cached) {\n this._cached.dispose();\n this._cached = null;\n }\n if (this._anchorCache.A0_G0) {\n this._anchorCache.A0_G0.dispose();\n this._anchorCache.A0_G0 = null;\n }\n if (this._anchorCache.A0_G1) {\n this._anchorCache.A0_G1.dispose();\n this._anchorCache.A0_G1 = null;\n }\n if (this._anchorCache.A1_G0) {\n this._anchorCache.A1_G0.dispose();\n this._anchorCache.A1_G0 = null;\n }\n if (this._anchorCache.A1_G1) {\n this._anchorCache.A1_G1.dispose();\n this._anchorCache.A1_G1 = null;\n }\n }\n push(item) {\n this._items.push(item);\n this._hasAnchors = this._hasAnchors || item.hasAnchor;\n }\n unshift(item) {\n this._items.unshift(item);\n this._hasAnchors = this._hasAnchors || item.hasAnchor;\n }\n length() {\n return this._items.length;\n }\n setSource(index, newSource) {\n if (this._items[index].source !== newSource) {\n this._disposeCaches();\n this._items[index].setSource(newSource);\n }\n }\n compile(onigLib) {\n if (!this._cached) {\n let regExps = this._items.map((e) => e.source);\n this._cached = new CompiledRule(onigLib, regExps, this._items.map((e) => e.ruleId));\n }\n return this._cached;\n }\n compileAG(onigLib, allowA, allowG) {\n if (!this._hasAnchors) {\n return this.compile(onigLib);\n } else {\n if (allowA) {\n if (allowG) {\n if (!this._anchorCache.A1_G1) {\n this._anchorCache.A1_G1 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A1_G1;\n } else {\n if (!this._anchorCache.A1_G0) {\n this._anchorCache.A1_G0 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A1_G0;\n }\n } else {\n if (allowG) {\n if (!this._anchorCache.A0_G1) {\n this._anchorCache.A0_G1 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A0_G1;\n } else {\n if (!this._anchorCache.A0_G0) {\n this._anchorCache.A0_G0 = this._resolveAnchors(onigLib, allowA, allowG);\n }\n return this._anchorCache.A0_G0;\n }\n }\n }\n }\n _resolveAnchors(onigLib, allowA, allowG) {\n let regExps = this._items.map((e) => e.resolveAnchors(allowA, allowG));\n return new CompiledRule(onigLib, regExps, this._items.map((e) => e.ruleId));\n }\n};\nvar CompiledRule = class {\n constructor(onigLib, regExps, rules) {\n this.regExps = regExps;\n this.rules = rules;\n this.scanner = onigLib.createOnigScanner(regExps);\n }\n scanner;\n dispose() {\n if (typeof this.scanner.dispose === \"function\") {\n this.scanner.dispose();\n }\n }\n toString() {\n const r = [];\n for (let i = 0, len = this.rules.length; i < len; i++) {\n r.push(\" - \" + this.rules[i] + \": \" + this.regExps[i]);\n }\n return r.join(\"\\n\");\n }\n findNextMatchSync(string, startPosition, options) {\n const result = this.scanner.findNextMatchSync(string, startPosition, options);\n if (!result) {\n return null;\n }\n return {\n ruleId: this.rules[result.index],\n captureIndices: result.captureIndices\n };\n }\n};\n\n// src/grammar/basicScopesAttributeProvider.ts\nvar BasicScopeAttributes = class {\n constructor(languageId, tokenType) {\n this.languageId = languageId;\n this.tokenType = tokenType;\n }\n};\nvar BasicScopeAttributesProvider = class _BasicScopeAttributesProvider {\n _defaultAttributes;\n _embeddedLanguagesMatcher;\n constructor(initialLanguageId, embeddedLanguages) {\n this._defaultAttributes = new BasicScopeAttributes(initialLanguageId, 8 /* NotSet */);\n this._embeddedLanguagesMatcher = new ScopeMatcher(Object.entries(embeddedLanguages || {}));\n }\n getDefaultAttributes() {\n return this._defaultAttributes;\n }\n getBasicScopeAttributes(scopeName) {\n if (scopeName === null) {\n return _BasicScopeAttributesProvider._NULL_SCOPE_METADATA;\n }\n return this._getBasicScopeAttributes.get(scopeName);\n }\n static _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0);\n _getBasicScopeAttributes = new CachedFn((scopeName) => {\n const languageId = this._scopeToLanguage(scopeName);\n const standardTokenType = this._toStandardTokenType(scopeName);\n return new BasicScopeAttributes(languageId, standardTokenType);\n });\n /**\n * Given a produced TM scope, return the language that token describes or null if unknown.\n * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null\n */\n _scopeToLanguage(scope) {\n return this._embeddedLanguagesMatcher.match(scope) || 0;\n }\n _toStandardTokenType(scopeName) {\n const m = scopeName.match(_BasicScopeAttributesProvider.STANDARD_TOKEN_TYPE_REGEXP);\n if (!m) {\n return 8 /* NotSet */;\n }\n switch (m[1]) {\n case \"comment\":\n return 1 /* Comment */;\n case \"string\":\n return 2 /* String */;\n case \"regex\":\n return 3 /* RegEx */;\n case \"meta.embedded\":\n return 0 /* Other */;\n }\n throw new Error(\"Unexpected match for standard token type!\");\n }\n static STANDARD_TOKEN_TYPE_REGEXP = /\\b(comment|string|regex|meta\\.embedded)\\b/;\n};\nvar ScopeMatcher = class {\n values;\n scopesRegExp;\n constructor(values) {\n if (values.length === 0) {\n this.values = null;\n this.scopesRegExp = null;\n } else {\n this.values = new Map(values);\n const escapedScopes = values.map(\n ([scopeName, value]) => escapeRegExpCharacters(scopeName)\n );\n escapedScopes.sort();\n escapedScopes.reverse();\n this.scopesRegExp = new RegExp(\n `^((${escapedScopes.join(\")|(\")}))($|\\\\.)`,\n \"\"\n );\n }\n }\n match(scope) {\n if (!this.scopesRegExp) {\n return void 0;\n }\n const m = scope.match(this.scopesRegExp);\n if (!m) {\n return void 0;\n }\n return this.values.get(m[1]);\n }\n};\n\n// src/debug.ts\nvar DebugFlags = {\n InDebugMode: typeof process !== \"undefined\" && !!process.env[\"VSCODE_TEXTMATE_DEBUG\"]\n};\nvar UseOnigurumaFindOptions = false;\n\n// src/grammar/tokenizeString.ts\nvar TokenizeStringResult = class {\n constructor(stack, stoppedEarly) {\n this.stack = stack;\n this.stoppedEarly = stoppedEarly;\n }\n};\nfunction _tokenizeString(grammar, lineText, isFirstLine, linePos, stack, lineTokens, checkWhileConditions, timeLimit) {\n const lineLength = lineText.content.length;\n let STOP = false;\n let anchorPosition = -1;\n if (checkWhileConditions) {\n const whileCheckResult = _checkWhileConditions(\n grammar,\n lineText,\n isFirstLine,\n linePos,\n stack,\n lineTokens\n );\n stack = whileCheckResult.stack;\n linePos = whileCheckResult.linePos;\n isFirstLine = whileCheckResult.isFirstLine;\n anchorPosition = whileCheckResult.anchorPosition;\n }\n const startTime = Date.now();\n while (!STOP) {\n if (timeLimit !== 0) {\n const elapsedTime = Date.now() - startTime;\n if (elapsedTime > timeLimit) {\n return new TokenizeStringResult(stack, true);\n }\n }\n scanNext();\n }\n return new TokenizeStringResult(stack, false);\n function scanNext() {\n if (false) {\n console.log(\"\");\n console.log(\n `@@scanNext ${linePos}: |${lineText.content.substr(linePos).replace(/\\n$/, \"\\\\n\")}|`\n );\n }\n const r = matchRuleOrInjections(\n grammar,\n lineText,\n isFirstLine,\n linePos,\n stack,\n anchorPosition\n );\n if (!r) {\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n const captureIndices = r.captureIndices;\n const matchedRuleId = r.matchedRuleId;\n const hasAdvanced = captureIndices && captureIndices.length > 0 ? captureIndices[0].end > linePos : false;\n if (matchedRuleId === endRuleId) {\n const poppedRule = stack.getRule(grammar);\n if (false) {\n console.log(\n \" popping \" + poppedRule.debugName + \" - \" + poppedRule.debugEndRegExp\n );\n }\n lineTokens.produce(stack, captureIndices[0].start);\n stack = stack.withContentNameScopesList(stack.nameScopesList);\n handleCaptures(\n grammar,\n lineText,\n isFirstLine,\n stack,\n lineTokens,\n poppedRule.endCaptures,\n captureIndices\n );\n lineTokens.produce(stack, captureIndices[0].end);\n const popped = stack;\n stack = stack.parent;\n anchorPosition = popped.getAnchorPos();\n if (!hasAdvanced && popped.getEnterPos() === linePos) {\n if (false) {\n console.error(\n \"[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing\"\n );\n }\n stack = popped;\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n } else {\n const _rule = grammar.getRule(matchedRuleId);\n lineTokens.produce(stack, captureIndices[0].start);\n const beforePush = stack;\n const scopeName = _rule.getName(lineText.content, captureIndices);\n const nameScopesList = stack.contentNameScopesList.pushAttributed(\n scopeName,\n grammar\n );\n stack = stack.push(\n matchedRuleId,\n linePos,\n anchorPosition,\n captureIndices[0].end === lineLength,\n null,\n nameScopesList,\n nameScopesList\n );\n if (_rule instanceof BeginEndRule) {\n const pushedRule = _rule;\n if (false) {\n console.log(\n \" pushing \" + pushedRule.debugName + \" - \" + pushedRule.debugBeginRegExp\n );\n }\n handleCaptures(\n grammar,\n lineText,\n isFirstLine,\n stack,\n lineTokens,\n pushedRule.beginCaptures,\n captureIndices\n );\n lineTokens.produce(stack, captureIndices[0].end);\n anchorPosition = captureIndices[0].end;\n const contentName = pushedRule.getContentName(\n lineText.content,\n captureIndices\n );\n const contentNameScopesList = nameScopesList.pushAttributed(\n contentName,\n grammar\n );\n stack = stack.withContentNameScopesList(contentNameScopesList);\n if (pushedRule.endHasBackReferences) {\n stack = stack.withEndRule(\n pushedRule.getEndWithResolvedBackReferences(\n lineText.content,\n captureIndices\n )\n );\n }\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\n if (false) {\n console.error(\n \"[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing\"\n );\n }\n stack = stack.pop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n } else if (_rule instanceof BeginWhileRule) {\n const pushedRule = _rule;\n if (false) {\n console.log(\" pushing \" + pushedRule.debugName);\n }\n handleCaptures(\n grammar,\n lineText,\n isFirstLine,\n stack,\n lineTokens,\n pushedRule.beginCaptures,\n captureIndices\n );\n lineTokens.produce(stack, captureIndices[0].end);\n anchorPosition = captureIndices[0].end;\n const contentName = pushedRule.getContentName(\n lineText.content,\n captureIndices\n );\n const contentNameScopesList = nameScopesList.pushAttributed(\n contentName,\n grammar\n );\n stack = stack.withContentNameScopesList(contentNameScopesList);\n if (pushedRule.whileHasBackReferences) {\n stack = stack.withEndRule(\n pushedRule.getWhileWithResolvedBackReferences(\n lineText.content,\n captureIndices\n )\n );\n }\n if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {\n if (false) {\n console.error(\n \"[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing\"\n );\n }\n stack = stack.pop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n } else {\n const matchingRule = _rule;\n if (false) {\n console.log(\n \" matched \" + matchingRule.debugName + \" - \" + matchingRule.debugMatchRegExp\n );\n }\n handleCaptures(\n grammar,\n lineText,\n isFirstLine,\n stack,\n lineTokens,\n matchingRule.captures,\n captureIndices\n );\n lineTokens.produce(stack, captureIndices[0].end);\n stack = stack.pop();\n if (!hasAdvanced) {\n if (false) {\n console.error(\n \"[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping\"\n );\n }\n stack = stack.safePop();\n lineTokens.produce(stack, lineLength);\n STOP = true;\n return;\n }\n }\n }\n if (captureIndices[0].end > linePos) {\n linePos = captureIndices[0].end;\n isFirstLine = false;\n }\n }\n}\nfunction _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {\n let anchorPosition = stack.beginRuleCapturedEOL ? 0 : -1;\n const whileRules = [];\n for (let node = stack; node; node = node.pop()) {\n const nodeRule = node.getRule(grammar);\n if (nodeRule instanceof BeginWhileRule) {\n whileRules.push({\n rule: nodeRule,\n stack: node\n });\n }\n }\n for (let whileRule = whileRules.pop(); whileRule; whileRule = whileRules.pop()) {\n const { ruleScanner, findOptions } = prepareRuleWhileSearch(whileRule.rule, grammar, whileRule.stack.endRule, isFirstLine, linePos === anchorPosition);\n const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (false) {\n console.log(\" scanning for while rule\");\n console.log(ruleScanner.toString());\n }\n if (r) {\n const matchedRuleId = r.ruleId;\n if (matchedRuleId !== whileRuleId) {\n stack = whileRule.stack.pop();\n break;\n }\n if (r.captureIndices && r.captureIndices.length) {\n lineTokens.produce(whileRule.stack, r.captureIndices[0].start);\n handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens, whileRule.rule.whileCaptures, r.captureIndices);\n lineTokens.produce(whileRule.stack, r.captureIndices[0].end);\n anchorPosition = r.captureIndices[0].end;\n if (r.captureIndices[0].end > linePos) {\n linePos = r.captureIndices[0].end;\n isFirstLine = false;\n }\n }\n } else {\n if (false) {\n console.log(\" popping \" + whileRule.rule.debugName + \" - \" + whileRule.rule.debugWhileRegExp);\n }\n stack = whileRule.stack.pop();\n break;\n }\n }\n return { stack, linePos, anchorPosition, isFirstLine };\n}\nfunction matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n const matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\n const injections = grammar.getInjections();\n if (injections.length === 0) {\n return matchResult;\n }\n const injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition);\n if (!injectionResult) {\n return matchResult;\n }\n if (!matchResult) {\n return injectionResult;\n }\n const matchResultScore = matchResult.captureIndices[0].start;\n const injectionResultScore = injectionResult.captureIndices[0].start;\n if (injectionResultScore < matchResultScore || injectionResult.priorityMatch && injectionResultScore === matchResultScore) {\n return injectionResult;\n }\n return matchResult;\n}\nfunction matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n const rule = stack.getRule(grammar);\n const { ruleScanner, findOptions } = prepareRuleSearch(rule, grammar, stack.endRule, isFirstLine, linePos === anchorPosition);\n const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (r) {\n return {\n captureIndices: r.captureIndices,\n matchedRuleId: r.ruleId\n };\n }\n return null;\n}\nfunction matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {\n let bestMatchRating = Number.MAX_VALUE;\n let bestMatchCaptureIndices = null;\n let bestMatchRuleId;\n let bestMatchResultPriority = 0;\n const scopes = stack.contentNameScopesList.getScopeNames();\n for (let i = 0, len = injections.length; i < len; i++) {\n const injection = injections[i];\n if (!injection.matcher(scopes)) {\n continue;\n }\n const rule = grammar.getRule(injection.ruleId);\n const { ruleScanner, findOptions } = prepareRuleSearch(rule, grammar, null, isFirstLine, linePos === anchorPosition);\n const matchResult = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);\n if (!matchResult) {\n continue;\n }\n if (false) {\n console.log(` matched injection: ${injection.debugSelector}`);\n console.log(ruleScanner.toString());\n }\n const matchRating = matchResult.captureIndices[0].start;\n if (matchRating >= bestMatchRating) {\n continue;\n }\n bestMatchRating = matchRating;\n bestMatchCaptureIndices = matchResult.captureIndices;\n bestMatchRuleId = matchResult.ruleId;\n bestMatchResultPriority = injection.priority;\n if (bestMatchRating === linePos) {\n break;\n }\n }\n if (bestMatchCaptureIndices) {\n return {\n priorityMatch: bestMatchResultPriority === -1,\n captureIndices: bestMatchCaptureIndices,\n matchedRuleId: bestMatchRuleId\n };\n }\n return null;\n}\nfunction prepareRuleSearch(rule, grammar, endRegexSource, allowA, allowG) {\n if (UseOnigurumaFindOptions) {\n const ruleScanner2 = rule.compile(grammar, endRegexSource);\n const findOptions = getFindOptions(allowA, allowG);\n return { ruleScanner: ruleScanner2, findOptions };\n }\n const ruleScanner = rule.compileAG(grammar, endRegexSource, allowA, allowG);\n return { ruleScanner, findOptions: 0 /* None */ };\n}\nfunction prepareRuleWhileSearch(rule, grammar, endRegexSource, allowA, allowG) {\n if (UseOnigurumaFindOptions) {\n const ruleScanner2 = rule.compileWhile(grammar, endRegexSource);\n const findOptions = getFindOptions(allowA, allowG);\n return { ruleScanner: ruleScanner2, findOptions };\n }\n const ruleScanner = rule.compileWhileAG(grammar, endRegexSource, allowA, allowG);\n return { ruleScanner, findOptions: 0 /* None */ };\n}\nfunction getFindOptions(allowA, allowG) {\n let options = 0 /* None */;\n if (!allowA) {\n options |= 1 /* NotBeginString */;\n }\n if (!allowG) {\n options |= 4 /* NotBeginPosition */;\n }\n return options;\n}\nfunction handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, captures, captureIndices) {\n if (captures.length === 0) {\n return;\n }\n const lineTextContent = lineText.content;\n const len = Math.min(captures.length, captureIndices.length);\n const localStack = [];\n const maxEnd = captureIndices[0].end;\n for (let i = 0; i < len; i++) {\n const captureRule = captures[i];\n if (captureRule === null) {\n continue;\n }\n const captureIndex = captureIndices[i];\n if (captureIndex.length === 0) {\n continue;\n }\n if (captureIndex.start > maxEnd) {\n break;\n }\n while (localStack.length > 0 && localStack[localStack.length - 1].endPos <= captureIndex.start) {\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\n localStack.pop();\n }\n if (localStack.length > 0) {\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, captureIndex.start);\n } else {\n lineTokens.produce(stack, captureIndex.start);\n }\n if (captureRule.retokenizeCapturedWithRuleId) {\n const scopeName = captureRule.getName(lineTextContent, captureIndices);\n const nameScopesList = stack.contentNameScopesList.pushAttributed(scopeName, grammar);\n const contentName = captureRule.getContentName(lineTextContent, captureIndices);\n const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);\n const stackClone = stack.push(captureRule.retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, nameScopesList, contentNameScopesList);\n const onigSubStr = grammar.createOnigString(lineTextContent.substring(0, captureIndex.end));\n _tokenizeString(\n grammar,\n onigSubStr,\n isFirstLine && captureIndex.start === 0,\n captureIndex.start,\n stackClone,\n lineTokens,\n false,\n /* no time limit */\n 0\n );\n disposeOnigString(onigSubStr);\n continue;\n }\n const captureRuleScopeName = captureRule.getName(lineTextContent, captureIndices);\n if (captureRuleScopeName !== null) {\n const base = localStack.length > 0 ? localStack[localStack.length - 1].scopes : stack.contentNameScopesList;\n const captureRuleScopesList = base.pushAttributed(captureRuleScopeName, grammar);\n localStack.push(new LocalStackElement(captureRuleScopesList, captureIndex.end));\n }\n }\n while (localStack.length > 0) {\n lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);\n localStack.pop();\n }\n}\nvar LocalStackElement = class {\n scopes;\n endPos;\n constructor(scopes, endPos) {\n this.scopes = scopes;\n this.endPos = endPos;\n }\n};\n\n// src/grammar/grammar.ts\nfunction createGrammar(scopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, onigLib) {\n return new Grammar(\n scopeName,\n grammar,\n initialLanguage,\n embeddedLanguages,\n tokenTypes,\n balancedBracketSelectors,\n grammarRepository,\n onigLib\n );\n}\nfunction collectInjections(result, selector, rule, ruleFactoryHelper, grammar) {\n const matchers = createMatchers(selector, nameMatcher);\n const ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, grammar.repository);\n for (const matcher of matchers) {\n result.push({\n debugSelector: selector,\n matcher: matcher.matcher,\n ruleId,\n grammar,\n priority: matcher.priority\n });\n }\n}\nfunction nameMatcher(identifers, scopes) {\n if (scopes.length < identifers.length) {\n return false;\n }\n let lastIndex = 0;\n return identifers.every((identifier) => {\n for (let i = lastIndex; i < scopes.length; i++) {\n if (scopesAreMatching(scopes[i], identifier)) {\n lastIndex = i + 1;\n return true;\n }\n }\n return false;\n });\n}\nfunction scopesAreMatching(thisScopeName, scopeName) {\n if (!thisScopeName) {\n return false;\n }\n if (thisScopeName === scopeName) {\n return true;\n }\n const len = scopeName.length;\n return thisScopeName.length > len && thisScopeName.substr(0, len) === scopeName && thisScopeName[len] === \".\";\n}\nvar Grammar = class {\n constructor(_rootScopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, _onigLib) {\n this._rootScopeName = _rootScopeName;\n this.balancedBracketSelectors = balancedBracketSelectors;\n this._onigLib = _onigLib;\n this._basicScopeAttributesProvider = new BasicScopeAttributesProvider(\n initialLanguage,\n embeddedLanguages\n );\n this._rootId = -1;\n this._lastRuleId = 0;\n this._ruleId2desc = [null];\n this._includedGrammars = {};\n this._grammarRepository = grammarRepository;\n this._grammar = initGrammar(grammar, null);\n this._injections = null;\n this._tokenTypeMatchers = [];\n if (tokenTypes) {\n for (const selector of Object.keys(tokenTypes)) {\n const matchers = createMatchers(selector, nameMatcher);\n for (const matcher of matchers) {\n this._tokenTypeMatchers.push({\n matcher: matcher.matcher,\n type: tokenTypes[selector]\n });\n }\n }\n }\n }\n _rootId;\n _lastRuleId;\n _ruleId2desc;\n _includedGrammars;\n _grammarRepository;\n _grammar;\n _injections;\n _basicScopeAttributesProvider;\n _tokenTypeMatchers;\n get themeProvider() {\n return this._grammarRepository;\n }\n dispose() {\n for (const rule of this._ruleId2desc) {\n if (rule) {\n rule.dispose();\n }\n }\n }\n createOnigScanner(sources) {\n return this._onigLib.createOnigScanner(sources);\n }\n createOnigString(sources) {\n return this._onigLib.createOnigString(sources);\n }\n getMetadataForScope(scope) {\n return this._basicScopeAttributesProvider.getBasicScopeAttributes(scope);\n }\n _collectInjections() {\n const grammarRepository = {\n lookup: (scopeName2) => {\n if (scopeName2 === this._rootScopeName) {\n return this._grammar;\n }\n return this.getExternalGrammar(scopeName2);\n },\n injections: (scopeName2) => {\n return this._grammarRepository.injections(scopeName2);\n }\n };\n const result = [];\n const scopeName = this._rootScopeName;\n const grammar = grammarRepository.lookup(scopeName);\n if (grammar) {\n const rawInjections = grammar.injections;\n if (rawInjections) {\n for (let expression in rawInjections) {\n collectInjections(\n result,\n expression,\n rawInjections[expression],\n this,\n grammar\n );\n }\n }\n const injectionScopeNames = this._grammarRepository.injections(scopeName);\n if (injectionScopeNames) {\n injectionScopeNames.forEach((injectionScopeName) => {\n const injectionGrammar = this.getExternalGrammar(injectionScopeName);\n if (injectionGrammar) {\n const selector = injectionGrammar.injectionSelector;\n if (selector) {\n collectInjections(\n result,\n selector,\n injectionGrammar,\n this,\n injectionGrammar\n );\n }\n }\n });\n }\n }\n result.sort((i1, i2) => i1.priority - i2.priority);\n return result;\n }\n getInjections() {\n if (this._injections === null) {\n this._injections = this._collectInjections();\n }\n return this._injections;\n }\n registerRule(factory) {\n const id = ++this._lastRuleId;\n const result = factory(ruleIdFromNumber(id));\n this._ruleId2desc[id] = result;\n return result;\n }\n getRule(ruleId) {\n return this._ruleId2desc[ruleIdToNumber(ruleId)];\n }\n getExternalGrammar(scopeName, repository) {\n if (this._includedGrammars[scopeName]) {\n return this._includedGrammars[scopeName];\n } else if (this._grammarRepository) {\n const rawIncludedGrammar = this._grammarRepository.lookup(scopeName);\n if (rawIncludedGrammar) {\n this._includedGrammars[scopeName] = initGrammar(\n rawIncludedGrammar,\n repository && repository.$base\n );\n return this._includedGrammars[scopeName];\n }\n }\n return void 0;\n }\n tokenizeLine(lineText, prevState, timeLimit = 0) {\n const r = this._tokenize(lineText, prevState, false, timeLimit);\n return {\n tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),\n ruleStack: r.ruleStack,\n stoppedEarly: r.stoppedEarly\n };\n }\n tokenizeLine2(lineText, prevState, timeLimit = 0) {\n const r = this._tokenize(lineText, prevState, true, timeLimit);\n return {\n tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),\n ruleStack: r.ruleStack,\n stoppedEarly: r.stoppedEarly\n };\n }\n _tokenize(lineText, prevState, emitBinaryTokens, timeLimit) {\n if (this._rootId === -1) {\n this._rootId = RuleFactory.getCompiledRuleId(\n this._grammar.repository.$self,\n this,\n this._grammar.repository\n );\n this.getInjections();\n }\n let isFirstLine;\n if (!prevState || prevState === StateStackImpl.NULL) {\n isFirstLine = true;\n const rawDefaultMetadata = this._basicScopeAttributesProvider.getDefaultAttributes();\n const defaultStyle = this.themeProvider.getDefaults();\n const defaultMetadata = EncodedTokenMetadata.set(\n 0,\n rawDefaultMetadata.languageId,\n rawDefaultMetadata.tokenType,\n null,\n defaultStyle.fontStyle,\n defaultStyle.foregroundId,\n defaultStyle.backgroundId\n );\n const rootScopeName = this.getRule(this._rootId).getName(\n null,\n null\n );\n let scopeList;\n if (rootScopeName) {\n scopeList = AttributedScopeStack.createRootAndLookUpScopeName(\n rootScopeName,\n defaultMetadata,\n this\n );\n } else {\n scopeList = AttributedScopeStack.createRoot(\n \"unknown\",\n defaultMetadata\n );\n }\n prevState = new StateStackImpl(\n null,\n this._rootId,\n -1,\n -1,\n false,\n null,\n scopeList,\n scopeList\n );\n } else {\n isFirstLine = false;\n prevState.reset();\n }\n lineText = lineText + \"\\n\";\n const onigLineText = this.createOnigString(lineText);\n const lineLength = onigLineText.content.length;\n const lineTokens = new LineTokens(\n emitBinaryTokens,\n lineText,\n this._tokenTypeMatchers,\n this.balancedBracketSelectors\n );\n const r = _tokenizeString(\n this,\n onigLineText,\n isFirstLine,\n 0,\n prevState,\n lineTokens,\n true,\n timeLimit\n );\n disposeOnigString(onigLineText);\n return {\n lineLength,\n lineTokens,\n ruleStack: r.stack,\n stoppedEarly: r.stoppedEarly\n };\n }\n};\nfunction initGrammar(grammar, base) {\n grammar = clone(grammar);\n grammar.repository = grammar.repository || {};\n grammar.repository.$self = {\n $vscodeTextmateLocation: grammar.$vscodeTextmateLocation,\n patterns: grammar.patterns,\n name: grammar.scopeName\n };\n grammar.repository.$base = base || grammar.repository.$self;\n return grammar;\n}\nvar AttributedScopeStack = class _AttributedScopeStack {\n /**\n * Invariant:\n * ```\n * if (parent && !scopePath.extends(parent.scopePath)) {\n * \tthrow new Error();\n * }\n * ```\n */\n constructor(parent, scopePath, tokenAttributes) {\n this.parent = parent;\n this.scopePath = scopePath;\n this.tokenAttributes = tokenAttributes;\n }\n static fromExtension(namesScopeList, contentNameScopesList) {\n let current = namesScopeList;\n let scopeNames = namesScopeList?.scopePath ?? null;\n for (const frame of contentNameScopesList) {\n scopeNames = ScopeStack.push(scopeNames, frame.scopeNames);\n current = new _AttributedScopeStack(current, scopeNames, frame.encodedTokenAttributes);\n }\n return current;\n }\n static createRoot(scopeName, tokenAttributes) {\n return new _AttributedScopeStack(null, new ScopeStack(null, scopeName), tokenAttributes);\n }\n static createRootAndLookUpScopeName(scopeName, tokenAttributes, grammar) {\n const rawRootMetadata = grammar.getMetadataForScope(scopeName);\n const scopePath = new ScopeStack(null, scopeName);\n const rootStyle = grammar.themeProvider.themeMatch(scopePath);\n const resolvedTokenAttributes = _AttributedScopeStack.mergeAttributes(\n tokenAttributes,\n rawRootMetadata,\n rootStyle\n );\n return new _AttributedScopeStack(null, scopePath, resolvedTokenAttributes);\n }\n get scopeName() {\n return this.scopePath.scopeName;\n }\n toString() {\n return this.getScopeNames().join(\" \");\n }\n equals(other) {\n return _AttributedScopeStack.equals(this, other);\n }\n static equals(a, b) {\n do {\n if (a === b) {\n return true;\n }\n if (!a && !b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n if (a.scopeName !== b.scopeName || a.tokenAttributes !== b.tokenAttributes) {\n return false;\n }\n a = a.parent;\n b = b.parent;\n } while (true);\n }\n static mergeAttributes(existingTokenAttributes, basicScopeAttributes, styleAttributes) {\n let fontStyle = -1 /* NotSet */;\n let foreground = 0;\n let background = 0;\n if (styleAttributes !== null) {\n fontStyle = styleAttributes.fontStyle;\n foreground = styleAttributes.foregroundId;\n background = styleAttributes.backgroundId;\n }\n return EncodedTokenMetadata.set(\n existingTokenAttributes,\n basicScopeAttributes.languageId,\n basicScopeAttributes.tokenType,\n null,\n fontStyle,\n foreground,\n background\n );\n }\n pushAttributed(scopePath, grammar) {\n if (scopePath === null) {\n return this;\n }\n if (scopePath.indexOf(\" \") === -1) {\n return _AttributedScopeStack._pushAttributed(this, scopePath, grammar);\n }\n const scopes = scopePath.split(/ /g);\n let result = this;\n for (const scope of scopes) {\n result = _AttributedScopeStack._pushAttributed(result, scope, grammar);\n }\n return result;\n }\n static _pushAttributed(target, scopeName, grammar) {\n const rawMetadata = grammar.getMetadataForScope(scopeName);\n const newPath = target.scopePath.push(scopeName);\n const scopeThemeMatchResult = grammar.themeProvider.themeMatch(newPath);\n const metadata = _AttributedScopeStack.mergeAttributes(\n target.tokenAttributes,\n rawMetadata,\n scopeThemeMatchResult\n );\n return new _AttributedScopeStack(target, newPath, metadata);\n }\n getScopeNames() {\n return this.scopePath.getSegments();\n }\n getExtensionIfDefined(base) {\n const result = [];\n let self = this;\n while (self && self !== base) {\n result.push({\n encodedTokenAttributes: self.tokenAttributes,\n scopeNames: self.scopePath.getExtensionIfDefined(self.parent?.scopePath ?? null)\n });\n self = self.parent;\n }\n return self === base ? result.reverse() : void 0;\n }\n};\nvar StateStackImpl = class _StateStackImpl {\n /**\n * Invariant:\n * ```\n * if (contentNameScopesList !== nameScopesList && contentNameScopesList?.parent !== nameScopesList) {\n * \tthrow new Error();\n * }\n * if (this.parent && !nameScopesList.extends(this.parent.contentNameScopesList)) {\n * \tthrow new Error();\n * }\n * ```\n */\n constructor(parent, ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {\n this.parent = parent;\n this.ruleId = ruleId;\n this.beginRuleCapturedEOL = beginRuleCapturedEOL;\n this.endRule = endRule;\n this.nameScopesList = nameScopesList;\n this.contentNameScopesList = contentNameScopesList;\n this.depth = this.parent ? this.parent.depth + 1 : 1;\n this._enterPos = enterPos;\n this._anchorPos = anchorPos;\n }\n _stackElementBrand = void 0;\n // TODO remove me\n static NULL = new _StateStackImpl(\n null,\n 0,\n 0,\n 0,\n false,\n null,\n null,\n null\n );\n /**\n * The position on the current line where this state was pushed.\n * This is relevant only while tokenizing a line, to detect endless loops.\n * Its value is meaningless across lines.\n */\n _enterPos;\n /**\n * The captured anchor position when this stack element was pushed.\n * This is relevant only while tokenizing a line, to restore the anchor position when popping.\n * Its value is meaningless across lines.\n */\n _anchorPos;\n /**\n * The depth of the stack.\n */\n depth;\n equals(other) {\n if (other === null) {\n return false;\n }\n return _StateStackImpl._equals(this, other);\n }\n static _equals(a, b) {\n if (a === b) {\n return true;\n }\n if (!this._structuralEquals(a, b)) {\n return false;\n }\n return AttributedScopeStack.equals(a.contentNameScopesList, b.contentNameScopesList);\n }\n /**\n * A structural equals check. Does not take into account `scopes`.\n */\n static _structuralEquals(a, b) {\n do {\n if (a === b) {\n return true;\n }\n if (!a && !b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n if (a.depth !== b.depth || a.ruleId !== b.ruleId || a.endRule !== b.endRule) {\n return false;\n }\n a = a.parent;\n b = b.parent;\n } while (true);\n }\n clone() {\n return this;\n }\n static _reset(el) {\n while (el) {\n el._enterPos = -1;\n el._anchorPos = -1;\n el = el.parent;\n }\n }\n reset() {\n _StateStackImpl._reset(this);\n }\n pop() {\n return this.parent;\n }\n safePop() {\n if (this.parent) {\n return this.parent;\n }\n return this;\n }\n push(ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {\n return new _StateStackImpl(\n this,\n ruleId,\n enterPos,\n anchorPos,\n beginRuleCapturedEOL,\n endRule,\n nameScopesList,\n contentNameScopesList\n );\n }\n getEnterPos() {\n return this._enterPos;\n }\n getAnchorPos() {\n return this._anchorPos;\n }\n getRule(grammar) {\n return grammar.getRule(this.ruleId);\n }\n toString() {\n const r = [];\n this._writeString(r, 0);\n return \"[\" + r.join(\",\") + \"]\";\n }\n _writeString(res, outIndex) {\n if (this.parent) {\n outIndex = this.parent._writeString(res, outIndex);\n }\n res[outIndex++] = `(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`;\n return outIndex;\n }\n withContentNameScopesList(contentNameScopeStack) {\n if (this.contentNameScopesList === contentNameScopeStack) {\n return this;\n }\n return this.parent.push(\n this.ruleId,\n this._enterPos,\n this._anchorPos,\n this.beginRuleCapturedEOL,\n this.endRule,\n this.nameScopesList,\n contentNameScopeStack\n );\n }\n withEndRule(endRule) {\n if (this.endRule === endRule) {\n return this;\n }\n return new _StateStackImpl(\n this.parent,\n this.ruleId,\n this._enterPos,\n this._anchorPos,\n this.beginRuleCapturedEOL,\n endRule,\n this.nameScopesList,\n this.contentNameScopesList\n );\n }\n // Used to warn of endless loops\n hasSameRuleAs(other) {\n let el = this;\n while (el && el._enterPos === other._enterPos) {\n if (el.ruleId === other.ruleId) {\n return true;\n }\n el = el.parent;\n }\n return false;\n }\n toStateStackFrame() {\n return {\n ruleId: ruleIdToNumber(this.ruleId),\n beginRuleCapturedEOL: this.beginRuleCapturedEOL,\n endRule: this.endRule,\n nameScopesList: this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList ?? null) ?? [],\n contentNameScopesList: this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList) ?? []\n };\n }\n static pushFrame(self, frame) {\n const namesScopeList = AttributedScopeStack.fromExtension(self?.nameScopesList ?? null, frame.nameScopesList);\n return new _StateStackImpl(\n self,\n ruleIdFromNumber(frame.ruleId),\n frame.enterPos ?? -1,\n frame.anchorPos ?? -1,\n frame.beginRuleCapturedEOL,\n frame.endRule,\n namesScopeList,\n AttributedScopeStack.fromExtension(namesScopeList, frame.contentNameScopesList)\n );\n }\n};\nvar BalancedBracketSelectors = class {\n balancedBracketScopes;\n unbalancedBracketScopes;\n allowAny = false;\n constructor(balancedBracketScopes, unbalancedBracketScopes) {\n this.balancedBracketScopes = balancedBracketScopes.flatMap(\n (selector) => {\n if (selector === \"*\") {\n this.allowAny = true;\n return [];\n }\n return createMatchers(selector, nameMatcher).map((m) => m.matcher);\n }\n );\n this.unbalancedBracketScopes = unbalancedBracketScopes.flatMap(\n (selector) => createMatchers(selector, nameMatcher).map((m) => m.matcher)\n );\n }\n get matchesAlways() {\n return this.allowAny && this.unbalancedBracketScopes.length === 0;\n }\n get matchesNever() {\n return this.balancedBracketScopes.length === 0 && !this.allowAny;\n }\n match(scopes) {\n for (const excluder of this.unbalancedBracketScopes) {\n if (excluder(scopes)) {\n return false;\n }\n }\n for (const includer of this.balancedBracketScopes) {\n if (includer(scopes)) {\n return true;\n }\n }\n return this.allowAny;\n }\n};\nvar LineTokens = class {\n constructor(emitBinaryTokens, lineText, tokenTypeOverrides, balancedBracketSelectors) {\n this.balancedBracketSelectors = balancedBracketSelectors;\n this._emitBinaryTokens = emitBinaryTokens;\n this._tokenTypeOverrides = tokenTypeOverrides;\n if (false) {\n this._lineText = lineText;\n } else {\n this._lineText = null;\n }\n this._tokens = [];\n this._binaryTokens = [];\n this._lastTokenEndIndex = 0;\n }\n _emitBinaryTokens;\n /**\n * defined only if `false`.\n */\n _lineText;\n /**\n * used only if `_emitBinaryTokens` is false.\n */\n _tokens;\n /**\n * used only if `_emitBinaryTokens` is true.\n */\n _binaryTokens;\n _lastTokenEndIndex;\n _tokenTypeOverrides;\n produce(stack, endIndex) {\n this.produceFromScopes(stack.contentNameScopesList, endIndex);\n }\n produceFromScopes(scopesList, endIndex) {\n if (this._lastTokenEndIndex >= endIndex) {\n return;\n }\n if (this._emitBinaryTokens) {\n let metadata = scopesList?.tokenAttributes ?? 0;\n let containsBalancedBrackets = false;\n if (this.balancedBracketSelectors?.matchesAlways) {\n containsBalancedBrackets = true;\n }\n if (this._tokenTypeOverrides.length > 0 || this.balancedBracketSelectors && !this.balancedBracketSelectors.matchesAlways && !this.balancedBracketSelectors.matchesNever) {\n const scopes2 = scopesList?.getScopeNames() ?? [];\n for (const tokenType of this._tokenTypeOverrides) {\n if (tokenType.matcher(scopes2)) {\n metadata = EncodedTokenMetadata.set(\n metadata,\n 0,\n toOptionalTokenType(tokenType.type),\n null,\n -1 /* NotSet */,\n 0,\n 0\n );\n }\n }\n if (this.balancedBracketSelectors) {\n containsBalancedBrackets = this.balancedBracketSelectors.match(scopes2);\n }\n }\n if (containsBalancedBrackets) {\n metadata = EncodedTokenMetadata.set(\n metadata,\n 0,\n 8 /* NotSet */,\n containsBalancedBrackets,\n -1 /* NotSet */,\n 0,\n 0\n );\n }\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === metadata) {\n this._lastTokenEndIndex = endIndex;\n return;\n }\n this._binaryTokens.push(this._lastTokenEndIndex);\n this._binaryTokens.push(metadata);\n this._lastTokenEndIndex = endIndex;\n return;\n }\n const scopes = scopesList?.getScopeNames() ?? [];\n this._tokens.push({\n startIndex: this._lastTokenEndIndex,\n endIndex,\n // value: lineText.substring(lastTokenEndIndex, endIndex),\n scopes\n });\n this._lastTokenEndIndex = endIndex;\n }\n getResult(stack, lineLength) {\n if (this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === lineLength - 1) {\n this._tokens.pop();\n }\n if (this._tokens.length === 0) {\n this._lastTokenEndIndex = -1;\n this.produce(stack, lineLength);\n this._tokens[this._tokens.length - 1].startIndex = 0;\n }\n return this._tokens;\n }\n getBinaryResult(stack, lineLength) {\n if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === lineLength - 1) {\n this._binaryTokens.pop();\n this._binaryTokens.pop();\n }\n if (this._binaryTokens.length === 0) {\n this._lastTokenEndIndex = -1;\n this.produce(stack, lineLength);\n this._binaryTokens[this._binaryTokens.length - 2] = 0;\n }\n const result = new Uint32Array(this._binaryTokens.length);\n for (let i = 0, len = this._binaryTokens.length; i < len; i++) {\n result[i] = this._binaryTokens[i];\n }\n return result;\n }\n};\n\n// src/registry.ts\nvar SyncRegistry = class {\n constructor(theme, _onigLib) {\n this._onigLib = _onigLib;\n this._theme = theme;\n }\n _grammars = /* @__PURE__ */ new Map();\n _rawGrammars = /* @__PURE__ */ new Map();\n _injectionGrammars = /* @__PURE__ */ new Map();\n _theme;\n dispose() {\n for (const grammar of this._grammars.values()) {\n grammar.dispose();\n }\n }\n setTheme(theme) {\n this._theme = theme;\n }\n getColorMap() {\n return this._theme.getColorMap();\n }\n /**\n * Add `grammar` to registry and return a list of referenced scope names\n */\n addGrammar(grammar, injectionScopeNames) {\n this._rawGrammars.set(grammar.scopeName, grammar);\n if (injectionScopeNames) {\n this._injectionGrammars.set(grammar.scopeName, injectionScopeNames);\n }\n }\n /**\n * Lookup a raw grammar.\n */\n lookup(scopeName) {\n return this._rawGrammars.get(scopeName);\n }\n /**\n * Returns the injections for the given grammar\n */\n injections(targetScope) {\n return this._injectionGrammars.get(targetScope);\n }\n /**\n * Get the default theme settings\n */\n getDefaults() {\n return this._theme.getDefaults();\n }\n /**\n * Match a scope in the theme.\n */\n themeMatch(scopePath) {\n return this._theme.match(scopePath);\n }\n /**\n * Lookup a grammar.\n */\n grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {\n if (!this._grammars.has(scopeName)) {\n let rawGrammar = this._rawGrammars.get(scopeName);\n if (!rawGrammar) {\n return null;\n }\n this._grammars.set(scopeName, createGrammar(\n scopeName,\n rawGrammar,\n initialLanguage,\n embeddedLanguages,\n tokenTypes,\n balancedBracketSelectors,\n this,\n this._onigLib\n ));\n }\n return this._grammars.get(scopeName);\n }\n};\n\n// src/index.ts\nvar Registry = class {\n _options;\n _syncRegistry;\n _ensureGrammarCache;\n constructor(options) {\n this._options = options;\n this._syncRegistry = new SyncRegistry(\n Theme.createFromRawTheme(options.theme, options.colorMap),\n options.onigLib\n );\n this._ensureGrammarCache = /* @__PURE__ */ new Map();\n }\n dispose() {\n this._syncRegistry.dispose();\n }\n /**\n * Change the theme. Once called, no previous `ruleStack` should be used anymore.\n */\n setTheme(theme, colorMap) {\n this._syncRegistry.setTheme(Theme.createFromRawTheme(theme, colorMap));\n }\n /**\n * Returns a lookup array for color ids.\n */\n getColorMap() {\n return this._syncRegistry.getColorMap();\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n * Please do not use language id 0.\n */\n loadGrammarWithEmbeddedLanguages(initialScopeName, initialLanguage, embeddedLanguages) {\n return this.loadGrammarWithConfiguration(initialScopeName, initialLanguage, { embeddedLanguages });\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n * Please do not use language id 0.\n */\n loadGrammarWithConfiguration(initialScopeName, initialLanguage, configuration) {\n return this._loadGrammar(\n initialScopeName,\n initialLanguage,\n configuration.embeddedLanguages,\n configuration.tokenTypes,\n new BalancedBracketSelectors(\n configuration.balancedBracketSelectors || [],\n configuration.unbalancedBracketSelectors || []\n )\n );\n }\n /**\n * Load the grammar for `scopeName` and all referenced included grammars asynchronously.\n */\n loadGrammar(initialScopeName) {\n return this._loadGrammar(initialScopeName, 0, null, null, null);\n }\n _loadGrammar(initialScopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {\n const dependencyProcessor = new ScopeDependencyProcessor(this._syncRegistry, initialScopeName);\n while (dependencyProcessor.Q.length > 0) {\n dependencyProcessor.Q.map((request) => this._loadSingleGrammar(request.scopeName));\n dependencyProcessor.processQueue();\n }\n return this._grammarForScopeName(\n initialScopeName,\n initialLanguage,\n embeddedLanguages,\n tokenTypes,\n balancedBracketSelectors\n );\n }\n _loadSingleGrammar(scopeName) {\n if (!this._ensureGrammarCache.has(scopeName)) {\n this._doLoadSingleGrammar(scopeName);\n this._ensureGrammarCache.set(scopeName, true);\n }\n }\n _doLoadSingleGrammar(scopeName) {\n const grammar = this._options.loadGrammar(scopeName);\n if (grammar) {\n const injections = typeof this._options.getInjections === \"function\" ? this._options.getInjections(scopeName) : void 0;\n this._syncRegistry.addGrammar(grammar, injections);\n }\n }\n /**\n * Adds a rawGrammar.\n */\n addGrammar(rawGrammar, injections = [], initialLanguage = 0, embeddedLanguages = null) {\n this._syncRegistry.addGrammar(rawGrammar, injections);\n return this._grammarForScopeName(rawGrammar.scopeName, initialLanguage, embeddedLanguages);\n }\n /**\n * Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `addGrammar`.\n */\n _grammarForScopeName(scopeName, initialLanguage = 0, embeddedLanguages = null, tokenTypes = null, balancedBracketSelectors = null) {\n return this._syncRegistry.grammarForScopeName(\n scopeName,\n initialLanguage,\n embeddedLanguages,\n tokenTypes,\n balancedBracketSelectors\n );\n }\n};\nvar INITIAL = StateStackImpl.NULL;\nexport {\n EncodedTokenMetadata,\n FindOption,\n FontStyle,\n INITIAL,\n Registry,\n Theme,\n disposeOnigString\n};\n","import { ShikiError } from \"@shikijs/types\";\nimport { EncodedTokenMetadata, INITIAL, Registry as Registry$1, Theme } from \"@shikijs/vscode-textmate\";\n\nexport * from \"@shikijs/types\"\n\n//#region src/utils/colors.ts\nfunction resolveColorReplacements(theme, options) {\n\tconst replacements = typeof theme === \"string\" ? {} : { ...theme.colorReplacements };\n\tconst themeName = typeof theme === \"string\" ? theme : theme.name;\n\tfor (const [key, value] of Object.entries(options?.colorReplacements || {})) if (typeof value === \"string\") replacements[key] = value;\n\telse if (key === themeName) Object.assign(replacements, value);\n\treturn replacements;\n}\nfunction applyColorReplacements(color, replacements) {\n\tif (!color) return color;\n\treturn replacements?.[color?.toLowerCase()] || color;\n}\n\n//#endregion\n//#region src/utils/general.ts\nfunction toArray(x) {\n\treturn Array.isArray(x) ? x : [x];\n}\n/**\n* Normalize a getter to a promise.\n*/\nasync function normalizeGetter(p) {\n\treturn Promise.resolve(typeof p === \"function\" ? p() : p).then((r) => r.default || r);\n}\n/**\n* Check if the language is plaintext that is ignored by Shiki.\n*\n* Hard-coded plain text languages: `plaintext`, `txt`, `text`, `plain`.\n*/\nfunction isPlainLang(lang) {\n\treturn !lang || [\n\t\t\"plaintext\",\n\t\t\"txt\",\n\t\t\"text\",\n\t\t\"plain\"\n\t].includes(lang);\n}\n/**\n* Check if the language is specially handled or bypassed by Shiki.\n*\n* Hard-coded languages: `ansi` and plaintexts like `plaintext`, `txt`, `text`, `plain`.\n*/\nfunction isSpecialLang(lang) {\n\treturn lang === \"ansi\" || isPlainLang(lang);\n}\n/**\n* Check if the theme is specially handled or bypassed by Shiki.\n*\n* Hard-coded themes: `none`.\n*/\nfunction isNoneTheme(theme) {\n\treturn theme === \"none\";\n}\n/**\n* Check if the theme is specially handled or bypassed by Shiki.\n*\n* Hard-coded themes: `none`.\n*/\nfunction isSpecialTheme(theme) {\n\treturn isNoneTheme(theme);\n}\n\n//#endregion\n//#region src/utils/strings.ts\n/**\n* Split a string into lines, each line preserves the line ending.\n*\n* @param code - The code string to split into lines\n* @param preserveEnding - Whether to preserve line endings in the result\n* @returns Array of tuples containing [line content, offset index]\n*\n* @example\n* ```ts\n* splitLines('hello\\nworld', false)\n* // => [['hello', 0], ['world', 6]]\n*\n* splitLines('hello\\nworld', true)\n* // => [['hello\\n', 0], ['world', 6]]\n* ```\n*/\nfunction splitLines(code, preserveEnding = false) {\n\tif (code.length === 0) return [[\"\", 0]];\n\tconst parts = code.split(/(\\r?\\n)/g);\n\tlet index = 0;\n\tconst lines = [];\n\tfor (let i = 0; i < parts.length; i += 2) {\n\t\tconst line = preserveEnding ? parts[i] + (parts[i + 1] || \"\") : parts[i];\n\t\tlines.push([line, index]);\n\t\tindex += parts[i].length;\n\t\tindex += parts[i + 1]?.length || 0;\n\t}\n\treturn lines;\n}\n\n//#endregion\n//#region src/textmate/normalize-theme.ts\n/**\n* https://github.com/microsoft/vscode/blob/f7f05dee53fb33fe023db2e06e30a89d3094488f/src/vs/platform/theme/common/colorRegistry.ts#L258-L268\n*/\nconst VSCODE_FALLBACK_EDITOR_FG = {\n\tlight: \"#333333\",\n\tdark: \"#bbbbbb\"\n};\nconst VSCODE_FALLBACK_EDITOR_BG = {\n\tlight: \"#fffffe\",\n\tdark: \"#1e1e1e\"\n};\nconst RESOLVED_KEY = \"__shiki_resolved\";\n/**\n* Normalize a textmate theme to shiki theme\n*/\nfunction normalizeTheme(rawTheme) {\n\tif (rawTheme?.[RESOLVED_KEY]) return rawTheme;\n\tconst theme = { ...rawTheme };\n\tif (theme.tokenColors && !theme.settings) {\n\t\ttheme.settings = theme.tokenColors;\n\t\tdelete theme.tokenColors;\n\t}\n\ttheme.type ||= \"dark\";\n\ttheme.colorReplacements = { ...theme.colorReplacements };\n\ttheme.settings ||= [];\n\tlet { bg, fg } = theme;\n\tif (!bg || !fg) {\n\t\t/**\n\t\t* First try:\n\t\t* Theme might contain a global `tokenColor` without `name` or `scope`\n\t\t* Used as default value for foreground/background\n\t\t*/\n\t\tconst globalSetting = theme.settings ? theme.settings.find((s) => !s.name && !s.scope) : void 0;\n\t\tif (globalSetting?.settings?.foreground) fg = globalSetting.settings.foreground;\n\t\tif (globalSetting?.settings?.background) bg = globalSetting.settings.background;\n\t\t/**\n\t\t* Second try:\n\t\t* If there's no global `tokenColor` without `name` or `scope`\n\t\t* Use `editor.foreground` and `editor.background`\n\t\t*/\n\t\tif (!fg && theme?.colors?.[\"editor.foreground\"]) fg = theme.colors[\"editor.foreground\"];\n\t\tif (!bg && theme?.colors?.[\"editor.background\"]) bg = theme.colors[\"editor.background\"];\n\t\t/**\n\t\t* Last try:\n\t\t* If there's no fg/bg color specified in theme, use default\n\t\t*/\n\t\tif (!fg) fg = theme.type === \"light\" ? VSCODE_FALLBACK_EDITOR_FG.light : VSCODE_FALLBACK_EDITOR_FG.dark;\n\t\tif (!bg) bg = theme.type === \"light\" ? VSCODE_FALLBACK_EDITOR_BG.light : VSCODE_FALLBACK_EDITOR_BG.dark;\n\t\ttheme.fg = fg;\n\t\ttheme.bg = bg;\n\t}\n\tif (!(theme.settings[0] && theme.settings[0].settings && !theme.settings[0].scope)) theme.settings.unshift({ settings: {\n\t\tforeground: theme.fg,\n\t\tbackground: theme.bg\n\t} });\n\tlet replacementCount = 0;\n\tconst replacementMap = /* @__PURE__ */ new Map();\n\tfunction getReplacementColor(value) {\n\t\tif (replacementMap.has(value)) return replacementMap.get(value);\n\t\treplacementCount += 1;\n\t\tconst hex = `#${replacementCount.toString(16).padStart(8, \"0\").toLowerCase()}`;\n\t\tif (theme.colorReplacements?.[`#${hex}`]) return getReplacementColor(value);\n\t\treplacementMap.set(value, hex);\n\t\treturn hex;\n\t}\n\ttheme.settings = theme.settings.map((setting) => {\n\t\tconst replaceFg = setting.settings?.foreground && !setting.settings.foreground.startsWith(\"#\");\n\t\tconst replaceBg = setting.settings?.background && !setting.settings.background.startsWith(\"#\");\n\t\tif (!replaceFg && !replaceBg) return setting;\n\t\tconst clone = {\n\t\t\t...setting,\n\t\t\tsettings: { ...setting.settings }\n\t\t};\n\t\tif (replaceFg) {\n\t\t\tconst replacement = getReplacementColor(setting.settings.foreground);\n\t\t\ttheme.colorReplacements[replacement] = setting.settings.foreground;\n\t\t\tclone.settings.foreground = replacement;\n\t\t}\n\t\tif (replaceBg) {\n\t\t\tconst replacement = getReplacementColor(setting.settings.background);\n\t\t\ttheme.colorReplacements[replacement] = setting.settings.background;\n\t\t\tclone.settings.background = replacement;\n\t\t}\n\t\treturn clone;\n\t});\n\tfor (const key of Object.keys(theme.colors || {})) if (key === \"editor.foreground\" || key === \"editor.background\" || key.startsWith(\"terminal.ansi\")) {\n\t\tif (!theme.colors[key]?.startsWith(\"#\")) {\n\t\t\tconst replacement = getReplacementColor(theme.colors[key]);\n\t\t\ttheme.colorReplacements[replacement] = theme.colors[key];\n\t\t\ttheme.colors[key] = replacement;\n\t\t}\n\t}\n\tObject.defineProperty(theme, RESOLVED_KEY, {\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: true\n\t});\n\treturn theme;\n}\n\n//#endregion\n//#region src/textmate/getters-resolve.ts\n/**\n* Resolve\n*/\nasync function resolveLangs(langs) {\n\treturn Array.from(new Set((await Promise.all(langs.filter((l) => !isSpecialLang(l)).map(async (lang) => await normalizeGetter(lang).then((r) => Array.isArray(r) ? r : [r])))).flat()));\n}\nasync function resolveThemes(themes) {\n\treturn (await Promise.all(themes.map(async (theme) => isSpecialTheme(theme) ? null : normalizeTheme(await normalizeGetter(theme))))).filter((i) => !!i);\n}\n\n//#endregion\n//#region src/utils/alias.ts\nfunction resolveLangAlias(name, alias) {\n\tif (!alias) return name;\n\tif (alias[name]) {\n\t\tconst resolved = new Set([name]);\n\t\twhile (alias[name]) {\n\t\t\tname = alias[name];\n\t\t\tif (resolved.has(name)) throw new ShikiError(`Circular alias \\`${Array.from(resolved).join(\" -> \")} -> ${name}\\``);\n\t\t\tresolved.add(name);\n\t\t}\n\t}\n\treturn name;\n}\n\n//#endregion\n//#region src/textmate/registry.ts\nvar Registry = class extends Registry$1 {\n\t_resolvedThemes = /* @__PURE__ */ new Map();\n\t_resolvedGrammars = /* @__PURE__ */ new Map();\n\t_langMap = /* @__PURE__ */ new Map();\n\t_langGraph = /* @__PURE__ */ new Map();\n\t_textmateThemeCache = /* @__PURE__ */ new WeakMap();\n\t_loadedThemesCache = null;\n\t_loadedLanguagesCache = null;\n\tconstructor(_resolver, _themes, _langs, _alias = {}) {\n\t\tsuper(_resolver);\n\t\tthis._resolver = _resolver;\n\t\tthis._themes = _themes;\n\t\tthis._langs = _langs;\n\t\tthis._alias = _alias;\n\t\tthis._themes.map((t) => this.loadTheme(t));\n\t\tthis.loadLanguages(this._langs);\n\t}\n\tgetTheme(theme) {\n\t\tif (typeof theme === \"string\") return this._resolvedThemes.get(theme);\n\t\telse return this.loadTheme(theme);\n\t}\n\tloadTheme(theme) {\n\t\tconst _theme = normalizeTheme(theme);\n\t\tif (_theme.name) {\n\t\t\tthis._resolvedThemes.set(_theme.name, _theme);\n\t\t\tthis._loadedThemesCache = null;\n\t\t}\n\t\treturn _theme;\n\t}\n\tgetLoadedThemes() {\n\t\tif (!this._loadedThemesCache) this._loadedThemesCache = [...this._resolvedThemes.keys()];\n\t\treturn this._loadedThemesCache;\n\t}\n\tsetTheme(theme) {\n\t\tlet textmateTheme = this._textmateThemeCache.get(theme);\n\t\tif (!textmateTheme) {\n\t\t\ttextmateTheme = Theme.createFromRawTheme(theme);\n\t\t\tthis._textmateThemeCache.set(theme, textmateTheme);\n\t\t}\n\t\tthis._syncRegistry.setTheme(textmateTheme);\n\t}\n\tgetGrammar(name) {\n\t\tname = resolveLangAlias(name, this._alias);\n\t\treturn this._resolvedGrammars.get(name);\n\t}\n\tloadLanguage(lang) {\n\t\tif (this.getGrammar(lang.name)) return;\n\t\tconst embeddedLazilyBy = new Set([...this._langMap.values()].filter((i) => i.embeddedLangsLazy?.includes(lang.name)));\n\t\tthis._resolver.addLanguage(lang);\n\t\tconst grammarConfig = {\n\t\t\tbalancedBracketSelectors: lang.balancedBracketSelectors || [\"*\"],\n\t\t\tunbalancedBracketSelectors: lang.unbalancedBracketSelectors || []\n\t\t};\n\t\tthis._syncRegistry._rawGrammars.set(lang.scopeName, lang);\n\t\tconst g = this.loadGrammarWithConfiguration(lang.scopeName, 1, grammarConfig);\n\t\tg.name = lang.name;\n\t\tthis._resolvedGrammars.set(lang.name, g);\n\t\tif (lang.aliases) lang.aliases.forEach((alias) => {\n\t\t\tthis._alias[alias] = lang.name;\n\t\t});\n\t\tthis._loadedLanguagesCache = null;\n\t\tif (embeddedLazilyBy.size) for (const e of embeddedLazilyBy) {\n\t\t\tthis._resolvedGrammars.delete(e.name);\n\t\t\tthis._loadedLanguagesCache = null;\n\t\t\tthis._syncRegistry?._injectionGrammars?.delete(e.scopeName);\n\t\t\tthis._syncRegistry?._grammars?.delete(e.scopeName);\n\t\t\tthis.loadLanguage(this._langMap.get(e.name));\n\t\t}\n\t}\n\tdispose() {\n\t\tsuper.dispose();\n\t\tthis._resolvedThemes.clear();\n\t\tthis._resolvedGrammars.clear();\n\t\tthis._langMap.clear();\n\t\tthis._langGraph.clear();\n\t\tthis._loadedThemesCache = null;\n\t}\n\tloadLanguages(langs) {\n\t\tfor (const lang of langs) this.resolveEmbeddedLanguages(lang);\n\t\tconst langsGraphArray = Array.from(this._langGraph.entries());\n\t\tconst missingLangs = langsGraphArray.filter(([_, lang]) => !lang);\n\t\tif (missingLangs.length) {\n\t\t\tconst dependents = langsGraphArray.filter(([_, lang]) => {\n\t\t\t\tif (!lang) return false;\n\t\t\t\treturn (lang.embeddedLanguages || lang.embeddedLangs)?.some((l) => missingLangs.map(([name]) => name).includes(l));\n\t\t\t}).filter((lang) => !missingLangs.includes(lang));\n\t\t\tthrow new ShikiError(`Missing languages ${missingLangs.map(([name]) => `\\`${name}\\``).join(\", \")}, required by ${dependents.map(([name]) => `\\`${name}\\``).join(\", \")}`);\n\t\t}\n\t\tfor (const [_, lang] of langsGraphArray) this._resolver.addLanguage(lang);\n\t\tfor (const [_, lang] of langsGraphArray) this.loadLanguage(lang);\n\t}\n\tgetLoadedLanguages() {\n\t\tif (!this._loadedLanguagesCache) this._loadedLanguagesCache = [...new Set([...this._resolvedGrammars.keys(), ...Object.keys(this._alias)])];\n\t\treturn this._loadedLanguagesCache;\n\t}\n\tresolveEmbeddedLanguages(lang) {\n\t\tthis._langMap.set(lang.name, lang);\n\t\tthis._langGraph.set(lang.name, lang);\n\t\tconst embedded = lang.embeddedLanguages ?? lang.embeddedLangs;\n\t\tif (embedded) for (const embeddedLang of embedded) this._langGraph.set(embeddedLang, this._langMap.get(embeddedLang));\n\t}\n};\n\n//#endregion\n//#region src/textmate/resolver.ts\nvar Resolver = class {\n\t_langs = /* @__PURE__ */ new Map();\n\t_scopeToLang = /* @__PURE__ */ new Map();\n\t_injections = /* @__PURE__ */ new Map();\n\t_onigLib;\n\tconstructor(engine, langs) {\n\t\tthis._onigLib = {\n\t\t\tcreateOnigScanner: (patterns) => engine.createScanner(patterns),\n\t\t\tcreateOnigString: (s) => engine.createString(s)\n\t\t};\n\t\tlangs.forEach((i) => this.addLanguage(i));\n\t}\n\tget onigLib() {\n\t\treturn this._onigLib;\n\t}\n\tgetLangRegistration(langIdOrAlias) {\n\t\treturn this._langs.get(langIdOrAlias);\n\t}\n\tloadGrammar(scopeName) {\n\t\treturn this._scopeToLang.get(scopeName);\n\t}\n\taddLanguage(l) {\n\t\tthis._langs.set(l.name, l);\n\t\tif (l.aliases) l.aliases.forEach((a) => {\n\t\t\tthis._langs.set(a, l);\n\t\t});\n\t\tthis._scopeToLang.set(l.scopeName, l);\n\t\tif (l.injectTo) l.injectTo.forEach((i) => {\n\t\t\tif (!this._injections.get(i)) this._injections.set(i, []);\n\t\t\tthis._injections.get(i).push(l.scopeName);\n\t\t});\n\t}\n\tgetInjections(scopeName) {\n\t\tconst scopeParts = scopeName.split(\".\");\n\t\tlet injections = [];\n\t\tfor (let i = 1; i <= scopeParts.length; i++) {\n\t\t\tconst subScopeName = scopeParts.slice(0, i).join(\".\");\n\t\t\tinjections = [...injections, ...this._injections.get(subScopeName) || []];\n\t\t}\n\t\treturn injections;\n\t}\n};\n\n//#endregion\n//#region src/constructors/primitive.ts\nlet instancesCount = 0;\n/**\n* Get the minimal shiki primitive instance.\n*\n* Requires to provide the engine and all themes and languages upfront.\n*/\nfunction createShikiPrimitive(options) {\n\tinstancesCount += 1;\n\tif (options.warnings !== false && instancesCount >= 10 && instancesCount % 10 === 0) console.warn(`[Shiki] ${instancesCount} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \\`highlighter.dispose()\\` to release unused instances.`);\n\tlet isDisposed = false;\n\tif (!options.engine) throw new ShikiError(\"`engine` option is required for synchronous mode\");\n\tconst langs = (options.langs || []).flat(1);\n\tconst themes = (options.themes || []).flat(1).map(normalizeTheme);\n\tconst _registry = new Registry(new Resolver(options.engine, langs), themes, langs, options.langAlias);\n\tlet _lastTheme;\n\tfunction resolveLangAlias$1(name) {\n\t\treturn resolveLangAlias(name, options.langAlias);\n\t}\n\tfunction getLanguage(name) {\n\t\tensureNotDisposed();\n\t\tconst _lang = _registry.getGrammar(typeof name === \"string\" ? name : name.name);\n\t\tif (!_lang) throw new ShikiError(`Language \\`${name}\\` not found, you may need to load it first`);\n\t\treturn _lang;\n\t}\n\tfunction getTheme(name) {\n\t\tif (name === \"none\") return {\n\t\t\tbg: \"\",\n\t\t\tfg: \"\",\n\t\t\tname: \"none\",\n\t\t\tsettings: [],\n\t\t\ttype: \"dark\"\n\t\t};\n\t\tensureNotDisposed();\n\t\tconst _theme = _registry.getTheme(name);\n\t\tif (!_theme) throw new ShikiError(`Theme \\`${name}\\` not found, you may need to load it first`);\n\t\treturn _theme;\n\t}\n\tfunction setTheme(name) {\n\t\tensureNotDisposed();\n\t\tconst theme = getTheme(name);\n\t\tif (_lastTheme !== name) {\n\t\t\t_registry.setTheme(theme);\n\t\t\t_lastTheme = name;\n\t\t}\n\t\treturn {\n\t\t\ttheme,\n\t\t\tcolorMap: _registry.getColorMap()\n\t\t};\n\t}\n\tfunction getLoadedThemes() {\n\t\tensureNotDisposed();\n\t\treturn _registry.getLoadedThemes();\n\t}\n\tfunction getLoadedLanguages() {\n\t\tensureNotDisposed();\n\t\treturn _registry.getLoadedLanguages();\n\t}\n\tfunction loadLanguageSync(...langs) {\n\t\tensureNotDisposed();\n\t\t_registry.loadLanguages(langs.flat(1));\n\t}\n\tasync function loadLanguage(...langs) {\n\t\treturn loadLanguageSync(await resolveLangs(langs));\n\t}\n\tfunction loadThemeSync(...themes) {\n\t\tensureNotDisposed();\n\t\tfor (const theme of themes.flat(1)) _registry.loadTheme(theme);\n\t}\n\tasync function loadTheme(...themes) {\n\t\tensureNotDisposed();\n\t\treturn loadThemeSync(await resolveThemes(themes));\n\t}\n\tfunction ensureNotDisposed() {\n\t\tif (isDisposed) throw new ShikiError(\"Shiki instance has been disposed\");\n\t}\n\tfunction dispose() {\n\t\tif (isDisposed) return;\n\t\tisDisposed = true;\n\t\t_registry.dispose();\n\t\tinstancesCount -= 1;\n\t}\n\treturn {\n\t\tsetTheme,\n\t\tgetTheme,\n\t\tgetLanguage,\n\t\tgetLoadedThemes,\n\t\tgetLoadedLanguages,\n\t\tresolveLangAlias: resolveLangAlias$1,\n\t\tloadLanguage,\n\t\tloadLanguageSync,\n\t\tloadTheme,\n\t\tloadThemeSync,\n\t\tdispose,\n\t\t[Symbol.dispose]: dispose\n\t};\n}\n/**\n* @deprecated Use `createShikiPrimitive` instead.\n*/\nconst createShikiInternalSync = createShikiPrimitive;\n\n//#endregion\n//#region src/constructors/async.ts\n/**\n* Get the minimal shiki primitive instance.\n*/\nasync function createShikiPrimitiveAsync(options) {\n\tif (!options.engine) console.warn(\"`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.\");\n\tconst [themes, langs, engine] = await Promise.all([\n\t\tresolveThemes(options.themes || []),\n\t\tresolveLangs(options.langs || []),\n\t\toptions.engine\n\t]);\n\treturn createShikiPrimitive({\n\t\t...options,\n\t\tthemes,\n\t\tlangs,\n\t\tengine\n\t});\n}\n/**\n* @deprecated Use `createShikiPrimitiveAsync` instead.\n*/\nconst createShikiInternal = createShikiPrimitiveAsync;\n\n//#endregion\n//#region src/textmate/grammar-state.ts\nconst _grammarStateMap = /* @__PURE__ */ new WeakMap();\nfunction setLastGrammarStateToMap(keys, state) {\n\t_grammarStateMap.set(keys, state);\n}\nfunction getLastGrammarStateFromMap(keys) {\n\treturn _grammarStateMap.get(keys);\n}\n/**\n* GrammarState is a special reference object that holds the state of a grammar.\n*\n* It's used to highlight code snippets that are part of the target language.\n*/\nvar GrammarState = class GrammarState {\n\t/**\n\t* Theme to Stack mapping\n\t*/\n\t_stacks = {};\n\tlang;\n\tget themes() {\n\t\treturn Object.keys(this._stacks);\n\t}\n\tget theme() {\n\t\treturn this.themes[0];\n\t}\n\tget _stack() {\n\t\treturn this._stacks[this.theme];\n\t}\n\t/**\n\t* Static method to create a initial grammar state.\n\t*/\n\tstatic initial(lang, themes) {\n\t\treturn new GrammarState(Object.fromEntries(toArray(themes).map((theme) => [theme, INITIAL])), lang);\n\t}\n\tconstructor(...args) {\n\t\tif (args.length === 2) {\n\t\t\tconst [stacksMap, lang] = args;\n\t\t\tthis.lang = lang;\n\t\t\tthis._stacks = stacksMap;\n\t\t} else {\n\t\t\tconst [stack, lang, theme] = args;\n\t\t\tthis.lang = lang;\n\t\t\tthis._stacks = { [theme]: stack };\n\t\t}\n\t}\n\t/**\n\t* Get the internal stack object.\n\t* @internal\n\t*/\n\tgetInternalStack(theme = this.theme) {\n\t\treturn this._stacks[theme];\n\t}\n\tgetScopes(theme = this.theme) {\n\t\treturn getScopes(this._stacks[theme]);\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tlang: this.lang,\n\t\t\ttheme: this.theme,\n\t\t\tthemes: this.themes,\n\t\t\tscopes: this.getScopes()\n\t\t};\n\t}\n};\nfunction getScopes(stack) {\n\tconst scopes = [];\n\tconst visited = /* @__PURE__ */ new Set();\n\tfunction pushScope(stack) {\n\t\tif (visited.has(stack)) return;\n\t\tvisited.add(stack);\n\t\tconst name = stack?.nameScopesList?.scopeName;\n\t\tif (name) scopes.push(name);\n\t\tif (stack.parent) pushScope(stack.parent);\n\t}\n\tpushScope(stack);\n\treturn scopes;\n}\nfunction getGrammarStack(state, theme) {\n\tif (!(state instanceof GrammarState)) throw new ShikiError(\"Invalid grammar state\");\n\treturn state.getInternalStack(theme);\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens-base.ts\n/**\n* Code to tokens, with a simple theme.\n*/\nfunction codeToTokensBase(primitive, code, options = {}) {\n\tconst { theme: themeName = primitive.getLoadedThemes()[0] } = options;\n\tif (isPlainLang(primitive.resolveLangAlias(options.lang || \"text\")) || isNoneTheme(themeName)) return splitLines(code).map((line) => [{\n\t\tcontent: line[0],\n\t\toffset: line[1]\n\t}]);\n\tconst { theme, colorMap } = primitive.setTheme(themeName);\n\tconst _grammar = primitive.getLanguage(options.lang || \"text\");\n\tif (options.grammarState) {\n\t\tif (options.grammarState.lang !== _grammar.name) throw new ShikiError(`Grammar state language \"${options.grammarState.lang}\" does not match highlight language \"${_grammar.name}\"`);\n\t\tif (!options.grammarState.themes.includes(theme.name)) throw new ShikiError(`Grammar state themes \"${options.grammarState.themes}\" do not contain highlight theme \"${theme.name}\"`);\n\t}\n\treturn tokenizeWithTheme(code, _grammar, theme, colorMap, options);\n}\nfunction getLastGrammarState(...args) {\n\tif (args.length === 2) return getLastGrammarStateFromMap(args[1]);\n\tconst [primitive, code, options = {}] = args;\n\tconst { lang = \"text\", theme: themeName = primitive.getLoadedThemes()[0] } = options;\n\tif (isPlainLang(lang) || isNoneTheme(themeName)) throw new ShikiError(\"Plain language does not have grammar state\");\n\tif (lang === \"ansi\") throw new ShikiError(\"ANSI language does not have grammar state\");\n\tconst { theme, colorMap } = primitive.setTheme(themeName);\n\tconst _grammar = primitive.getLanguage(lang);\n\treturn new GrammarState(_tokenizeWithTheme(code, _grammar, theme, colorMap, options).stateStack, _grammar.name, theme.name);\n}\nfunction tokenizeWithTheme(code, grammar, theme, colorMap, options) {\n\tconst result = _tokenizeWithTheme(code, grammar, theme, colorMap, options);\n\tconst grammarState = new GrammarState(result.stateStack, grammar.name, theme.name);\n\tsetLastGrammarStateToMap(result.tokens, grammarState);\n\treturn result.tokens;\n}\nfunction _tokenizeWithTheme(code, grammar, theme, colorMap, options) {\n\tconst colorReplacements = resolveColorReplacements(theme, options);\n\tconst { tokenizeMaxLineLength = 0, tokenizeTimeLimit = 500 } = options;\n\tconst lines = splitLines(code);\n\tlet stateStack = options.grammarState ? getGrammarStack(options.grammarState, theme.name) ?? INITIAL : options.grammarContextCode != null ? _tokenizeWithTheme(options.grammarContextCode, grammar, theme, colorMap, {\n\t\t...options,\n\t\tgrammarState: void 0,\n\t\tgrammarContextCode: void 0\n\t}).stateStack : INITIAL;\n\tlet actual = [];\n\tconst final = [];\n\tfor (let i = 0, len = lines.length; i < len; i++) {\n\t\tconst [line, lineOffset] = lines[i];\n\t\tif (line === \"\") {\n\t\t\tactual = [];\n\t\t\tfinal.push([]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (tokenizeMaxLineLength > 0 && line.length >= tokenizeMaxLineLength) {\n\t\t\tactual = [];\n\t\t\tfinal.push([{\n\t\t\t\tcontent: line,\n\t\t\t\toffset: lineOffset,\n\t\t\t\tcolor: \"\",\n\t\t\t\tfontStyle: 0\n\t\t\t}]);\n\t\t\tcontinue;\n\t\t}\n\t\tlet resultWithScopes;\n\t\tlet tokensWithScopes;\n\t\tlet tokensWithScopesIndex;\n\t\tif (options.includeExplanation) {\n\t\t\tresultWithScopes = grammar.tokenizeLine(line, stateStack, tokenizeTimeLimit);\n\t\t\ttokensWithScopes = resultWithScopes.tokens;\n\t\t\ttokensWithScopesIndex = 0;\n\t\t}\n\t\tconst result = grammar.tokenizeLine2(line, stateStack, tokenizeTimeLimit);\n\t\tconst tokensLength = result.tokens.length / 2;\n\t\tfor (let j = 0; j < tokensLength; j++) {\n\t\t\tconst startIndex = result.tokens[2 * j];\n\t\t\tconst nextStartIndex = j + 1 < tokensLength ? result.tokens[2 * j + 2] : line.length;\n\t\t\tif (startIndex === nextStartIndex) continue;\n\t\t\tconst metadata = result.tokens[2 * j + 1];\n\t\t\tconst color = applyColorReplacements(colorMap[EncodedTokenMetadata.getForeground(metadata)], colorReplacements);\n\t\t\tconst fontStyle = EncodedTokenMetadata.getFontStyle(metadata);\n\t\t\tconst token = {\n\t\t\t\tcontent: line.substring(startIndex, nextStartIndex),\n\t\t\t\toffset: lineOffset + startIndex,\n\t\t\t\tcolor,\n\t\t\t\tfontStyle\n\t\t\t};\n\t\t\tif (options.includeExplanation) {\n\t\t\t\tconst themeSettingsSelectors = [];\n\t\t\t\tif (options.includeExplanation !== \"scopeName\") for (const setting of theme.settings) {\n\t\t\t\t\tlet selectors;\n\t\t\t\t\tswitch (typeof setting.scope) {\n\t\t\t\t\t\tcase \"string\":\n\t\t\t\t\t\t\tselectors = setting.scope.split(/,/).map((scope) => scope.trim());\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"object\":\n\t\t\t\t\t\t\tselectors = setting.scope;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: continue;\n\t\t\t\t\t}\n\t\t\t\t\tthemeSettingsSelectors.push({\n\t\t\t\t\t\tsettings: setting,\n\t\t\t\t\t\tselectors: selectors.map((selector) => selector.split(/ /))\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\ttoken.explanation = [];\n\t\t\t\tlet offset = 0;\n\t\t\t\twhile (startIndex + offset < nextStartIndex) {\n\t\t\t\t\tconst tokenWithScopes = tokensWithScopes[tokensWithScopesIndex];\n\t\t\t\t\tconst tokenWithScopesText = line.substring(tokenWithScopes.startIndex, tokenWithScopes.endIndex);\n\t\t\t\t\toffset += tokenWithScopesText.length;\n\t\t\t\t\ttoken.explanation.push({\n\t\t\t\t\t\tcontent: tokenWithScopesText,\n\t\t\t\t\t\tscopes: options.includeExplanation === \"scopeName\" ? explainThemeScopesNameOnly(tokenWithScopes.scopes) : explainThemeScopesFull(themeSettingsSelectors, tokenWithScopes.scopes)\n\t\t\t\t\t});\n\t\t\t\t\ttokensWithScopesIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tactual.push(token);\n\t\t}\n\t\tfinal.push(actual);\n\t\tactual = [];\n\t\tstateStack = result.ruleStack;\n\t}\n\treturn {\n\t\ttokens: final,\n\t\tstateStack\n\t};\n}\nfunction explainThemeScopesNameOnly(scopes) {\n\treturn scopes.map((scope) => ({ scopeName: scope }));\n}\nfunction explainThemeScopesFull(themeSelectors, scopes) {\n\tconst result = [];\n\tfor (let i = 0, len = scopes.length; i < len; i++) {\n\t\tconst scope = scopes[i];\n\t\tresult[i] = {\n\t\t\tscopeName: scope,\n\t\t\tthemeMatches: explainThemeScope(themeSelectors, scope, scopes.slice(0, i))\n\t\t};\n\t}\n\treturn result;\n}\nfunction matchesOne(selector, scope) {\n\treturn selector === scope || scope.substring(0, selector.length) === selector && scope[selector.length] === \".\";\n}\nfunction matches(selectors, scope, parentScopes) {\n\tif (!matchesOne(selectors[selectors.length - 1], scope)) return false;\n\tlet selectorParentIndex = selectors.length - 2;\n\tlet parentIndex = parentScopes.length - 1;\n\twhile (selectorParentIndex >= 0 && parentIndex >= 0) {\n\t\tif (matchesOne(selectors[selectorParentIndex], parentScopes[parentIndex])) selectorParentIndex -= 1;\n\t\tparentIndex -= 1;\n\t}\n\tif (selectorParentIndex === -1) return true;\n\treturn false;\n}\nfunction explainThemeScope(themeSettingsSelectors, scope, parentScopes) {\n\tconst result = [];\n\tfor (const { selectors, settings } of themeSettingsSelectors) for (const selectorPieces of selectors) if (matches(selectorPieces, scope, parentScopes)) {\n\t\tresult.push(settings);\n\t\tbreak;\n\t}\n\treturn result;\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens-themes.ts\n/**\n* Get tokens with multiple themes\n*/\nfunction codeToTokensWithThemes(primitive, code, options, codeToTokensBaseFn = codeToTokensBase) {\n\tconst themes = Object.entries(options.themes).filter((i) => i[1]).map((i) => ({\n\t\tcolor: i[0],\n\t\ttheme: i[1]\n\t}));\n\tconst themedTokens = themes.map((t) => {\n\t\tconst tokens = codeToTokensBaseFn(primitive, code, {\n\t\t\t...options,\n\t\t\ttheme: t.theme\n\t\t});\n\t\treturn {\n\t\t\ttokens,\n\t\t\tstate: getLastGrammarStateFromMap(tokens),\n\t\t\ttheme: typeof t.theme === \"string\" ? t.theme : t.theme.name\n\t\t};\n\t});\n\tconst tokens = alignThemesTokenization(...themedTokens.map((i) => i.tokens));\n\tconst mergedTokens = tokens[0].map((line, lineIdx) => line.map((_token, tokenIdx) => {\n\t\tconst mergedToken = {\n\t\t\tcontent: _token.content,\n\t\t\tvariants: {},\n\t\t\toffset: _token.offset\n\t\t};\n\t\tif (\"includeExplanation\" in options && options.includeExplanation) mergedToken.explanation = _token.explanation;\n\t\ttokens.forEach((t, themeIdx) => {\n\t\t\tconst { content: _, explanation: __, offset: ___, ...styles } = t[lineIdx][tokenIdx];\n\t\t\tmergedToken.variants[themes[themeIdx].color] = styles;\n\t\t});\n\t\treturn mergedToken;\n\t}));\n\tconst mergedGrammarState = themedTokens[0].state ? new GrammarState(Object.fromEntries(themedTokens.map((s) => [s.theme, s.state?.getInternalStack(s.theme)])), themedTokens[0].state.lang) : void 0;\n\tif (mergedGrammarState) setLastGrammarStateToMap(mergedTokens, mergedGrammarState);\n\treturn mergedTokens;\n}\n/**\n* Break tokens from multiple themes into same tokenization.\n*\n* For example, given two themes that tokenize `console.log(\"hello\")` as:\n*\n* - `console . log (\" hello \")` (6 tokens)\n* - `console .log ( \"hello\" )` (5 tokens)\n*\n* This function will return:\n*\n* - `console . log ( \" hello \" )` (8 tokens)\n* - `console . log ( \" hello \" )` (8 tokens)\n*/\nfunction alignThemesTokenization(...themes) {\n\tconst outThemes = themes.map(() => []);\n\tconst count = themes.length;\n\tfor (let i = 0; i < themes[0].length; i++) {\n\t\tconst lines = themes.map((t) => t[i]);\n\t\tconst outLines = outThemes.map(() => []);\n\t\toutThemes.forEach((t, i) => t.push(outLines[i]));\n\t\tconst indexes = lines.map(() => 0);\n\t\tconst current = lines.map((l) => l[0]);\n\t\twhile (current.every((t) => t)) {\n\t\t\tconst minLength = Math.min(...current.map((t) => t.content.length));\n\t\t\tfor (let n = 0; n < count; n++) {\n\t\t\t\tconst token = current[n];\n\t\t\t\tif (token.content.length === minLength) {\n\t\t\t\t\toutLines[n].push(token);\n\t\t\t\t\tindexes[n] += 1;\n\t\t\t\t\tcurrent[n] = lines[n][indexes[n]];\n\t\t\t\t} else {\n\t\t\t\t\toutLines[n].push({\n\t\t\t\t\t\t...token,\n\t\t\t\t\t\tcontent: token.content.slice(0, minLength)\n\t\t\t\t\t});\n\t\t\t\t\tcurrent[n] = {\n\t\t\t\t\t\t...token,\n\t\t\t\t\t\tcontent: token.content.slice(minLength),\n\t\t\t\t\t\toffset: token.offset + minLength\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn outThemes;\n}\n\n//#endregion\nexport { GrammarState, Registry, Resolver, alignThemesTokenization, applyColorReplacements, codeToTokensBase, codeToTokensWithThemes, createShikiInternal, createShikiInternalSync, createShikiPrimitive, createShikiPrimitiveAsync, getGrammarStack, getLastGrammarState, getLastGrammarStateFromMap, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, normalizeGetter, normalizeTheme, resolveColorReplacements, resolveLangAlias, resolveLangs, resolveThemes, setLastGrammarStateToMap, splitLines, toArray, tokenizeWithTheme };","/**\n * List of HTML void tag names.\n *\n * @type {Array<string>}\n */\nexport const htmlVoidElements = [\n 'area',\n 'base',\n 'basefont',\n 'bgsound',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'frame',\n 'hr',\n 'image',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n]\n","/**\n * @callback Handler\n * Handle a value, with a certain ID field set to a certain value.\n * The ID field is passed to `zwitch`, and it’s value is this function’s\n * place on the `handlers` record.\n * @param {...any} parameters\n * Arbitrary parameters passed to the zwitch.\n * The first will be an object with a certain ID field set to a certain value.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback UnknownHandler\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @param {unknown} value\n * An object with a certain ID field set to an unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {any}\n * Anything!\n */\n\n/**\n * @callback InvalidHandler\n * Handle values that do not have a certain ID field.\n * @param {unknown} value\n * Any unknown value.\n * @param {...any} rest\n * Arbitrary parameters passed to the zwitch.\n * @returns {void|null|undefined|never}\n * This should crash or return nothing.\n */\n\n/**\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n * @typedef Options\n * Configuration (required).\n * @property {Invalid} [invalid]\n * Handler to use for invalid values.\n * @property {Unknown} [unknown]\n * Handler to use for unknown values.\n * @property {Handlers} [handlers]\n * Handlers to use.\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Handle values based on a field.\n *\n * @template {InvalidHandler} [Invalid=InvalidHandler]\n * @template {UnknownHandler} [Unknown=UnknownHandler]\n * @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n * @param {string} key\n * Field to switch on.\n * @param {Options<Invalid, Unknown, Handlers>} [options]\n * Configuration (required).\n * @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}\n */\nexport function zwitch(key, options) {\n const settings = options || {}\n\n /**\n * Handle one value.\n *\n * Based on the bound `key`, a respective handler will be called.\n * If `value` is not an object, or doesn’t have a `key` property, the special\n * “invalid” handler will be called.\n * If `value` has an unknown `key`, the special “unknown” handler will be\n * called.\n *\n * All arguments, and the context object, are passed through to the handler,\n * and it’s result is returned.\n *\n * @this {unknown}\n * Any context object.\n * @param {unknown} [value]\n * Any value.\n * @param {...unknown} parameters\n * Arbitrary parameters passed to the zwitch.\n * @property {Handler} invalid\n * Handle for values that do not have a certain ID field.\n * @property {Handler} unknown\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @property {Handlers} handlers\n * Record of handlers.\n * @returns {unknown}\n * Anything.\n */\n function one(value, ...parameters) {\n /** @type {Handler|undefined} */\n let fn = one.invalid\n const handlers = one.handlers\n\n if (value && own.call(value, key)) {\n // @ts-expect-error Indexable.\n const id = String(value[key])\n // @ts-expect-error Indexable.\n fn = own.call(handlers, id) ? handlers[id] : one.unknown\n }\n\n if (fn) {\n return fn.call(this, value, ...parameters)\n }\n }\n\n one.handlers = settings.handlers || {}\n one.invalid = settings.invalid\n one.unknown = settings.unknown\n\n // @ts-expect-error: matches!\n return one\n}\n","/**\n * @typedef CoreOptions\n * @property {ReadonlyArray<string>} [subset=[]]\n * Whether to only escape the given subset of characters.\n * @property {boolean} [escapeOnly=false]\n * Whether to only escape possibly dangerous characters.\n * Those characters are `\"`, `&`, `'`, `<`, `>`, and `` ` ``.\n *\n * @typedef FormatOptions\n * @property {(code: number, next: number, options: CoreWithFormatOptions) => string} format\n * Format strategy.\n *\n * @typedef {CoreOptions & FormatOptions & import('./util/format-smart.js').FormatSmartOptions} CoreWithFormatOptions\n */\n\nconst defaultSubsetRegex = /[\"&'<>`]/g\nconst surrogatePairsRegex = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g\nconst controlCharactersRegex =\n // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape\n /[\\x01-\\t\\v\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g\nconst regexEscapeRegex = /[|\\\\{}()[\\]^$+*?.]/g\n\n/** @type {WeakMap<ReadonlyArray<string>, RegExp>} */\nconst subsetToRegexCache = new WeakMap()\n\n/**\n * Encode certain characters in `value`.\n *\n * @param {string} value\n * @param {CoreWithFormatOptions} options\n * @returns {string}\n */\nexport function core(value, options) {\n value = value.replace(\n options.subset\n ? charactersToExpressionCached(options.subset)\n : defaultSubsetRegex,\n basic\n )\n\n if (options.subset || options.escapeOnly) {\n return value\n }\n\n return (\n value\n // Surrogate pairs.\n .replace(surrogatePairsRegex, surrogate)\n // BMP control characters (C0 except for LF, CR, SP; DEL; and some more\n // non-ASCII ones).\n .replace(controlCharactersRegex, basic)\n )\n\n /**\n * @param {string} pair\n * @param {number} index\n * @param {string} all\n */\n function surrogate(pair, index, all) {\n return options.format(\n (pair.charCodeAt(0) - 0xd800) * 0x400 +\n pair.charCodeAt(1) -\n 0xdc00 +\n 0x10000,\n all.charCodeAt(index + 2),\n options\n )\n }\n\n /**\n * @param {string} character\n * @param {number} index\n * @param {string} all\n */\n function basic(character, index, all) {\n return options.format(\n character.charCodeAt(0),\n all.charCodeAt(index + 1),\n options\n )\n }\n}\n\n/**\n * A wrapper function that caches the result of `charactersToExpression` with a WeakMap.\n * This can improve performance when tooling calls `charactersToExpression` repeatedly\n * with the same subset.\n *\n * @param {ReadonlyArray<string>} subset\n * @returns {RegExp}\n */\nfunction charactersToExpressionCached(subset) {\n let cached = subsetToRegexCache.get(subset)\n\n if (!cached) {\n cached = charactersToExpression(subset)\n subsetToRegexCache.set(subset, cached)\n }\n\n return cached\n}\n\n/**\n * @param {ReadonlyArray<string>} subset\n * @returns {RegExp}\n */\nfunction charactersToExpression(subset) {\n /** @type {Array<string>} */\n const groups = []\n let index = -1\n\n while (++index < subset.length) {\n groups.push(subset[index].replace(regexEscapeRegex, '\\\\$&'))\n }\n\n return new RegExp('(?:' + groups.join('|') + ')', 'g')\n}\n","const hexadecimalRegex = /[\\dA-Fa-f]/\n\n/**\n * Configurable ways to encode characters as hexadecimal references.\n *\n * @param {number} code\n * @param {number} next\n * @param {boolean|undefined} omit\n * @returns {string}\n */\nexport function toHexadecimal(code, next, omit) {\n const value = '&#x' + code.toString(16).toUpperCase()\n return omit && next && !hexadecimalRegex.test(String.fromCharCode(next))\n ? value\n : value + ';'\n}\n","const decimalRegex = /\\d/\n\n/**\n * Configurable ways to encode characters as decimal references.\n *\n * @param {number} code\n * @param {number} next\n * @param {boolean|undefined} omit\n * @returns {string}\n */\nexport function toDecimal(code, next, omit) {\n const value = '&#' + String(code)\n return omit && next && !decimalRegex.test(String.fromCharCode(next))\n ? value\n : value + ';'\n}\n","/**\n * List of legacy HTML named character references that don’t need a trailing semicolon.\n *\n * @type {Array<string>}\n */\nexport const characterEntitiesLegacy = [\n 'AElig',\n 'AMP',\n 'Aacute',\n 'Acirc',\n 'Agrave',\n 'Aring',\n 'Atilde',\n 'Auml',\n 'COPY',\n 'Ccedil',\n 'ETH',\n 'Eacute',\n 'Ecirc',\n 'Egrave',\n 'Euml',\n 'GT',\n 'Iacute',\n 'Icirc',\n 'Igrave',\n 'Iuml',\n 'LT',\n 'Ntilde',\n 'Oacute',\n 'Ocirc',\n 'Ograve',\n 'Oslash',\n 'Otilde',\n 'Ouml',\n 'QUOT',\n 'REG',\n 'THORN',\n 'Uacute',\n 'Ucirc',\n 'Ugrave',\n 'Uuml',\n 'Yacute',\n 'aacute',\n 'acirc',\n 'acute',\n 'aelig',\n 'agrave',\n 'amp',\n 'aring',\n 'atilde',\n 'auml',\n 'brvbar',\n 'ccedil',\n 'cedil',\n 'cent',\n 'copy',\n 'curren',\n 'deg',\n 'divide',\n 'eacute',\n 'ecirc',\n 'egrave',\n 'eth',\n 'euml',\n 'frac12',\n 'frac14',\n 'frac34',\n 'gt',\n 'iacute',\n 'icirc',\n 'iexcl',\n 'igrave',\n 'iquest',\n 'iuml',\n 'laquo',\n 'lt',\n 'macr',\n 'micro',\n 'middot',\n 'nbsp',\n 'not',\n 'ntilde',\n 'oacute',\n 'ocirc',\n 'ograve',\n 'ordf',\n 'ordm',\n 'oslash',\n 'otilde',\n 'ouml',\n 'para',\n 'plusmn',\n 'pound',\n 'quot',\n 'raquo',\n 'reg',\n 'sect',\n 'shy',\n 'sup1',\n 'sup2',\n 'sup3',\n 'szlig',\n 'thorn',\n 'times',\n 'uacute',\n 'ucirc',\n 'ugrave',\n 'uml',\n 'uuml',\n 'yacute',\n 'yen',\n 'yuml'\n]\n","/**\n * Map of named character references from HTML 4.\n *\n * @type {Record<string, string>}\n */\nexport const characterEntitiesHtml4 = {\n nbsp: ' ',\n iexcl: '¡',\n cent: '¢',\n pound: '£',\n curren: '¤',\n yen: '¥',\n brvbar: '¦',\n sect: '§',\n uml: '¨',\n copy: '©',\n ordf: 'ª',\n laquo: '«',\n not: '¬',\n shy: '',\n reg: '®',\n macr: '¯',\n deg: '°',\n plusmn: '±',\n sup2: '²',\n sup3: '³',\n acute: '´',\n micro: 'µ',\n para: '¶',\n middot: '·',\n cedil: '¸',\n sup1: '¹',\n ordm: 'º',\n raquo: '»',\n frac14: '¼',\n frac12: '½',\n frac34: '¾',\n iquest: '¿',\n Agrave: 'À',\n Aacute: 'Á',\n Acirc: 'Â',\n Atilde: 'Ã',\n Auml: 'Ä',\n Aring: 'Å',\n AElig: 'Æ',\n Ccedil: 'Ç',\n Egrave: 'È',\n Eacute: 'É',\n Ecirc: 'Ê',\n Euml: 'Ë',\n Igrave: 'Ì',\n Iacute: 'Í',\n Icirc: 'Î',\n Iuml: 'Ï',\n ETH: 'Ð',\n Ntilde: 'Ñ',\n Ograve: 'Ò',\n Oacute: 'Ó',\n Ocirc: 'Ô',\n Otilde: 'Õ',\n Ouml: 'Ö',\n times: '×',\n Oslash: 'Ø',\n Ugrave: 'Ù',\n Uacute: 'Ú',\n Ucirc: 'Û',\n Uuml: 'Ü',\n Yacute: 'Ý',\n THORN: 'Þ',\n szlig: 'ß',\n agrave: 'à',\n aacute: 'á',\n acirc: 'â',\n atilde: 'ã',\n auml: 'ä',\n aring: 'å',\n aelig: 'æ',\n ccedil: 'ç',\n egrave: 'è',\n eacute: 'é',\n ecirc: 'ê',\n euml: 'ë',\n igrave: 'ì',\n iacute: 'í',\n icirc: 'î',\n iuml: 'ï',\n eth: 'ð',\n ntilde: 'ñ',\n ograve: 'ò',\n oacute: 'ó',\n ocirc: 'ô',\n otilde: 'õ',\n ouml: 'ö',\n divide: '÷',\n oslash: 'ø',\n ugrave: 'ù',\n uacute: 'ú',\n ucirc: 'û',\n uuml: 'ü',\n yacute: 'ý',\n thorn: 'þ',\n yuml: 'ÿ',\n fnof: 'ƒ',\n Alpha: 'Α',\n Beta: 'Β',\n Gamma: 'Γ',\n Delta: 'Δ',\n Epsilon: 'Ε',\n Zeta: 'Ζ',\n Eta: 'Η',\n Theta: 'Θ',\n Iota: 'Ι',\n Kappa: 'Κ',\n Lambda: 'Λ',\n Mu: 'Μ',\n Nu: 'Ν',\n Xi: 'Ξ',\n Omicron: 'Ο',\n Pi: 'Π',\n Rho: 'Ρ',\n Sigma: 'Σ',\n Tau: 'Τ',\n Upsilon: 'Υ',\n Phi: 'Φ',\n Chi: 'Χ',\n Psi: 'Ψ',\n Omega: 'Ω',\n alpha: 'α',\n beta: 'β',\n gamma: 'γ',\n delta: 'δ',\n epsilon: 'ε',\n zeta: 'ζ',\n eta: 'η',\n theta: 'θ',\n iota: 'ι',\n kappa: 'κ',\n lambda: 'λ',\n mu: 'μ',\n nu: 'ν',\n xi: 'ξ',\n omicron: 'ο',\n pi: 'π',\n rho: 'ρ',\n sigmaf: 'ς',\n sigma: 'σ',\n tau: 'τ',\n upsilon: 'υ',\n phi: 'φ',\n chi: 'χ',\n psi: 'ψ',\n omega: 'ω',\n thetasym: 'ϑ',\n upsih: 'ϒ',\n piv: 'ϖ',\n bull: '•',\n hellip: '…',\n prime: '′',\n Prime: '″',\n oline: '‾',\n frasl: '⁄',\n weierp: '℘',\n image: 'ℑ',\n real: 'ℜ',\n trade: '™',\n alefsym: 'ℵ',\n larr: '←',\n uarr: '↑',\n rarr: '→',\n darr: '↓',\n harr: '↔',\n crarr: '↵',\n lArr: '⇐',\n uArr: '⇑',\n rArr: '⇒',\n dArr: '⇓',\n hArr: '⇔',\n forall: '∀',\n part: '∂',\n exist: '∃',\n empty: '∅',\n nabla: '∇',\n isin: '∈',\n notin: '∉',\n ni: '∋',\n prod: '∏',\n sum: '∑',\n minus: '−',\n lowast: '∗',\n radic: '√',\n prop: '∝',\n infin: '∞',\n ang: '∠',\n and: '∧',\n or: '∨',\n cap: '∩',\n cup: '∪',\n int: '∫',\n there4: '∴',\n sim: '∼',\n cong: '≅',\n asymp: '≈',\n ne: '≠',\n equiv: '≡',\n le: '≤',\n ge: '≥',\n sub: '⊂',\n sup: '⊃',\n nsub: '⊄',\n sube: '⊆',\n supe: '⊇',\n oplus: '⊕',\n otimes: '⊗',\n perp: '⊥',\n sdot: '⋅',\n lceil: '⌈',\n rceil: '⌉',\n lfloor: '⌊',\n rfloor: '⌋',\n lang: '〈',\n rang: '〉',\n loz: '◊',\n spades: '♠',\n clubs: '♣',\n hearts: '♥',\n diams: '♦',\n quot: '\"',\n amp: '&',\n lt: '<',\n gt: '>',\n OElig: 'Œ',\n oelig: 'œ',\n Scaron: 'Š',\n scaron: 'š',\n Yuml: 'Ÿ',\n circ: 'ˆ',\n tilde: '˜',\n ensp: ' ',\n emsp: ' ',\n thinsp: ' ',\n zwnj: '',\n zwj: '',\n lrm: '',\n rlm: '',\n ndash: '–',\n mdash: '—',\n lsquo: '‘',\n rsquo: '’',\n sbquo: '‚',\n ldquo: '“',\n rdquo: '”',\n bdquo: '„',\n dagger: '†',\n Dagger: '‡',\n permil: '‰',\n lsaquo: '‹',\n rsaquo: '›',\n euro: '€'\n}\n","/**\n * List of legacy (that don’t need a trailing `;`) named references which could,\n * depending on what follows them, turn into a different meaning\n *\n * @type {Array<string>}\n */\nexport const dangerous = [\n 'cent',\n 'copy',\n 'divide',\n 'gt',\n 'lt',\n 'not',\n 'para',\n 'times'\n]\n","import {characterEntitiesLegacy} from 'character-entities-legacy'\nimport {characterEntitiesHtml4} from 'character-entities-html4'\nimport {dangerous} from '../constant/dangerous.js'\n\nconst own = {}.hasOwnProperty\n\n/**\n * `characterEntitiesHtml4` but inverted.\n *\n * @type {Record<string, string>}\n */\nconst characters = {}\n\n/** @type {string} */\nlet key\n\nfor (key in characterEntitiesHtml4) {\n if (own.call(characterEntitiesHtml4, key)) {\n characters[characterEntitiesHtml4[key]] = key\n }\n}\n\nconst notAlphanumericRegex = /[^\\dA-Za-z]/\n\n/**\n * Configurable ways to encode characters as named references.\n *\n * @param {number} code\n * @param {number} next\n * @param {boolean|undefined} omit\n * @param {boolean|undefined} attribute\n * @returns {string}\n */\nexport function toNamed(code, next, omit, attribute) {\n const character = String.fromCharCode(code)\n\n if (own.call(characters, character)) {\n const name = characters[character]\n const value = '&' + name\n\n if (\n omit &&\n characterEntitiesLegacy.includes(name) &&\n !dangerous.includes(name) &&\n (!attribute ||\n (next &&\n next !== 61 /* `=` */ &&\n notAlphanumericRegex.test(String.fromCharCode(next))))\n ) {\n return value\n }\n\n return value + ';'\n }\n\n return ''\n}\n","/**\n * @typedef FormatSmartOptions\n * @property {boolean} [useNamedReferences=false]\n * Prefer named character references (`&`) where possible.\n * @property {boolean} [useShortestReferences=false]\n * Prefer the shortest possible reference, if that results in less bytes.\n * **Note**: `useNamedReferences` can be omitted when using `useShortestReferences`.\n * @property {boolean} [omitOptionalSemicolons=false]\n * Whether to omit semicolons when possible.\n * **Note**: This creates what HTML calls “parse errors” but is otherwise still valid HTML — don’t use this except when building a minifier.\n * Omitting semicolons is possible for certain named and numeric references in some cases.\n * @property {boolean} [attribute=false]\n * Create character references which don’t fail in attributes.\n * **Note**: `attribute` only applies when operating dangerously with\n * `omitOptionalSemicolons: true`.\n */\n\nimport {toHexadecimal} from './to-hexadecimal.js'\nimport {toDecimal} from './to-decimal.js'\nimport {toNamed} from './to-named.js'\n\n/**\n * Configurable ways to encode a character yielding pretty or small results.\n *\n * @param {number} code\n * @param {number} next\n * @param {FormatSmartOptions} options\n * @returns {string}\n */\nexport function formatSmart(code, next, options) {\n let numeric = toHexadecimal(code, next, options.omitOptionalSemicolons)\n /** @type {string|undefined} */\n let named\n\n if (options.useNamedReferences || options.useShortestReferences) {\n named = toNamed(\n code,\n next,\n options.omitOptionalSemicolons,\n options.attribute\n )\n }\n\n // Use the shortest numeric reference when requested.\n // A simple algorithm would use decimal for all code points under 100, as\n // those are shorter than hexadecimal:\n //\n // * `c` vs `c` (decimal shorter)\n // * `d` vs `d` (equal)\n //\n // However, because we take `next` into consideration when `omit` is used,\n // And it would be possible that decimals are shorter on bigger values as\n // well if `next` is hexadecimal but not decimal, we instead compare both.\n if (\n (options.useShortestReferences || !named) &&\n options.useShortestReferences\n ) {\n const decimal = toDecimal(code, next, options.omitOptionalSemicolons)\n\n if (decimal.length < numeric.length) {\n numeric = decimal\n }\n }\n\n return named &&\n (!options.useShortestReferences || named.length < numeric.length)\n ? named\n : numeric\n}\n","/**\n * @typedef {import('./core.js').CoreOptions & import('./util/format-smart.js').FormatSmartOptions} Options\n * @typedef {import('./core.js').CoreOptions} LightOptions\n */\n\nimport {core} from './core.js'\nimport {formatSmart} from './util/format-smart.js'\nimport {formatBasic} from './util/format-basic.js'\n\n/**\n * Encode special characters in `value`.\n *\n * @param {string} value\n * Value to encode.\n * @param {Options} [options]\n * Configuration.\n * @returns {string}\n * Encoded value.\n */\nexport function stringifyEntities(value, options) {\n return core(value, Object.assign({format: formatSmart}, options))\n}\n\n/**\n * Encode special characters in `value` as hexadecimals.\n *\n * @param {string} value\n * Value to encode.\n * @param {LightOptions} [options]\n * Configuration.\n * @returns {string}\n * Encoded value.\n */\nexport function stringifyEntitiesLight(value, options) {\n return core(value, Object.assign({format: formatBasic}, options))\n}\n","/**\n * @import {Comment, Parents} from 'hast'\n * @import {State} from '../index.js'\n */\n\nimport {stringifyEntities} from 'stringify-entities'\n\nconst htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g\n\n// Declare arrays as variables so it can be cached by `stringifyEntities`\nconst bogusCommentEntitySubset = ['>']\nconst commentEntitySubset = ['<', '>']\n\n/**\n * Serialize a comment.\n *\n * @param {Comment} node\n * Node to handle.\n * @param {number | undefined} _1\n * Index of `node` in `parent.\n * @param {Parents | undefined} _2\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function comment(node, _1, _2, state) {\n // See: <https://html.spec.whatwg.org/multipage/syntax.html#comments>\n return state.settings.bogusComments\n ? '<?' +\n stringifyEntities(\n node.value,\n Object.assign({}, state.settings.characterReferences, {\n subset: bogusCommentEntitySubset\n })\n ) +\n '>'\n : '<!--' + node.value.replace(htmlCommentRegex, encode) + '-->'\n\n /**\n * @param {string} $0\n */\n function encode($0) {\n return stringifyEntities(\n $0,\n Object.assign({}, state.settings.characterReferences, {\n subset: commentEntitySubset\n })\n )\n }\n}\n","/**\n * @import {Doctype, Parents} from 'hast'\n * @import {State} from '../index.js'\n */\n\n/**\n * Serialize a doctype.\n *\n * @param {Doctype} _1\n * Node to handle.\n * @param {number | undefined} _2\n * Index of `node` in `parent.\n * @param {Parents | undefined} _3\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function doctype(_1, _2, _3, state) {\n return (\n '<!' +\n (state.settings.upperDoctype ? 'DOCTYPE' : 'doctype') +\n (state.settings.tightDoctype ? '' : ' ') +\n 'html>'\n )\n}\n","/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n","/**\n * @import {Parents, RootContent} from 'hast'\n */\n\nimport {whitespace} from 'hast-util-whitespace'\n\nexport const siblingAfter = siblings(1)\nexport const siblingBefore = siblings(-1)\n\n/** @type {Array<RootContent>} */\nconst emptyChildren = []\n\n/**\n * Factory to check siblings in a direction.\n *\n * @param {number} increment\n */\nfunction siblings(increment) {\n return sibling\n\n /**\n * Find applicable siblings in a direction.\n *\n * @template {Parents} Parent\n * Parent type.\n * @param {Parent | undefined} parent\n * Parent.\n * @param {number | undefined} index\n * Index of child in `parent`.\n * @param {boolean | undefined} [includeWhitespace=false]\n * Whether to include whitespace (default: `false`).\n * @returns {Parent extends {children: Array<infer Child>} ? Child | undefined : never}\n * Child of parent.\n */\n function sibling(parent, index, includeWhitespace) {\n const siblings = parent ? parent.children : emptyChildren\n let offset = (index || 0) + increment\n let next = siblings[offset]\n\n if (!includeWhitespace) {\n while (next && whitespace(next)) {\n offset += increment\n next = siblings[offset]\n }\n }\n\n // @ts-expect-error: it’s a correct child.\n return next\n }\n}\n","/**\n * @import {Element, Parents} from 'hast'\n */\n\n/**\n * @callback OmitHandle\n * Check if a tag can be omitted.\n * @param {Element} element\n * Element to check.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether to omit a tag.\n *\n */\n\nconst own = {}.hasOwnProperty\n\n/**\n * Factory to check if a given node can have a tag omitted.\n *\n * @param {Record<string, OmitHandle>} handlers\n * Omission handlers, where each key is a tag name, and each value is the\n * corresponding handler.\n * @returns {OmitHandle}\n * Whether to omit a tag of an element.\n */\nexport function omission(handlers) {\n return omit\n\n /**\n * Check if a given node can have a tag omitted.\n *\n * @type {OmitHandle}\n */\n function omit(node, index, parent) {\n return (\n own.call(handlers, node.tagName) &&\n handlers[node.tagName](node, index, parent)\n )\n }\n}\n","/**\n * @import {Element, Parents} from 'hast'\n */\n\nimport {whitespace} from 'hast-util-whitespace'\nimport {siblingAfter} from './util/siblings.js'\nimport {omission} from './omission.js'\n\nexport const closing = omission({\n body,\n caption: headOrColgroupOrCaption,\n colgroup: headOrColgroupOrCaption,\n dd,\n dt,\n head: headOrColgroupOrCaption,\n html,\n li,\n optgroup,\n option,\n p,\n rp: rubyElement,\n rt: rubyElement,\n tbody,\n td: cells,\n tfoot,\n th: cells,\n thead,\n tr\n})\n\n/**\n * Macro for `</head>`, `</colgroup>`, and `</caption>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction headOrColgroupOrCaption(_, index, parent) {\n const next = siblingAfter(parent, index, true)\n return (\n !next ||\n (next.type !== 'comment' &&\n !(next.type === 'text' && whitespace(next.value.charAt(0))))\n )\n}\n\n/**\n * Whether to omit `</html>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction html(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || next.type !== 'comment'\n}\n\n/**\n * Whether to omit `</body>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction body(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || next.type !== 'comment'\n}\n\n/**\n * Whether to omit `</p>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction p(_, index, parent) {\n const next = siblingAfter(parent, index)\n return next\n ? next.type === 'element' &&\n (next.tagName === 'address' ||\n next.tagName === 'article' ||\n next.tagName === 'aside' ||\n next.tagName === 'blockquote' ||\n next.tagName === 'details' ||\n next.tagName === 'div' ||\n next.tagName === 'dl' ||\n next.tagName === 'fieldset' ||\n next.tagName === 'figcaption' ||\n next.tagName === 'figure' ||\n next.tagName === 'footer' ||\n next.tagName === 'form' ||\n next.tagName === 'h1' ||\n next.tagName === 'h2' ||\n next.tagName === 'h3' ||\n next.tagName === 'h4' ||\n next.tagName === 'h5' ||\n next.tagName === 'h6' ||\n next.tagName === 'header' ||\n next.tagName === 'hgroup' ||\n next.tagName === 'hr' ||\n next.tagName === 'main' ||\n next.tagName === 'menu' ||\n next.tagName === 'nav' ||\n next.tagName === 'ol' ||\n next.tagName === 'p' ||\n next.tagName === 'pre' ||\n next.tagName === 'section' ||\n next.tagName === 'table' ||\n next.tagName === 'ul')\n : !parent ||\n // Confusing parent.\n !(\n parent.type === 'element' &&\n (parent.tagName === 'a' ||\n parent.tagName === 'audio' ||\n parent.tagName === 'del' ||\n parent.tagName === 'ins' ||\n parent.tagName === 'map' ||\n parent.tagName === 'noscript' ||\n parent.tagName === 'video')\n )\n}\n\n/**\n * Whether to omit `</li>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction li(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || (next.type === 'element' && next.tagName === 'li')\n}\n\n/**\n * Whether to omit `</dt>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction dt(_, index, parent) {\n const next = siblingAfter(parent, index)\n return Boolean(\n next &&\n next.type === 'element' &&\n (next.tagName === 'dt' || next.tagName === 'dd')\n )\n}\n\n/**\n * Whether to omit `</dd>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction dd(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'dt' || next.tagName === 'dd'))\n )\n}\n\n/**\n * Whether to omit `</rt>` or `</rp>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction rubyElement(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'rp' || next.tagName === 'rt'))\n )\n}\n\n/**\n * Whether to omit `</optgroup>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction optgroup(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || (next.type === 'element' && next.tagName === 'optgroup')\n}\n\n/**\n * Whether to omit `</option>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction option(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'option' || next.tagName === 'optgroup'))\n )\n}\n\n/**\n * Whether to omit `</thead>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction thead(_, index, parent) {\n const next = siblingAfter(parent, index)\n return Boolean(\n next &&\n next.type === 'element' &&\n (next.tagName === 'tbody' || next.tagName === 'tfoot')\n )\n}\n\n/**\n * Whether to omit `</tbody>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction tbody(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'tbody' || next.tagName === 'tfoot'))\n )\n}\n\n/**\n * Whether to omit `</tfoot>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction tfoot(_, index, parent) {\n return !siblingAfter(parent, index)\n}\n\n/**\n * Whether to omit `</tr>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction tr(_, index, parent) {\n const next = siblingAfter(parent, index)\n return !next || (next.type === 'element' && next.tagName === 'tr')\n}\n\n/**\n * Whether to omit `</td>` or `</th>`.\n *\n * @param {Element} _\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the closing tag can be omitted.\n */\nfunction cells(_, index, parent) {\n const next = siblingAfter(parent, index)\n return (\n !next ||\n (next.type === 'element' &&\n (next.tagName === 'td' || next.tagName === 'th'))\n )\n}\n","/**\n * @import {Element, Parents} from 'hast'\n */\n\nimport {whitespace} from 'hast-util-whitespace'\nimport {siblingAfter, siblingBefore} from './util/siblings.js'\nimport {closing} from './closing.js'\nimport {omission} from './omission.js'\n\nexport const opening = omission({\n body,\n colgroup,\n head,\n html,\n tbody\n})\n\n/**\n * Whether to omit `<html>`.\n *\n * @param {Element} node\n * Element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction html(node) {\n const head = siblingAfter(node, -1)\n return !head || head.type !== 'comment'\n}\n\n/**\n * Whether to omit `<head>`.\n *\n * @param {Element} node\n * Element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction head(node) {\n /** @type {Set<string>} */\n const seen = new Set()\n\n // Whether `srcdoc` or not,\n // make sure the content model at least doesn’t have too many `base`s/`title`s.\n for (const child of node.children) {\n if (\n child.type === 'element' &&\n (child.tagName === 'base' || child.tagName === 'title')\n ) {\n if (seen.has(child.tagName)) return false\n seen.add(child.tagName)\n }\n }\n\n // “May be omitted if the element is empty,\n // or if the first thing inside the head element is an element.”\n const child = node.children[0]\n return !child || child.type === 'element'\n}\n\n/**\n * Whether to omit `<body>`.\n *\n * @param {Element} node\n * Element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction body(node) {\n const head = siblingAfter(node, -1, true)\n\n return (\n !head ||\n (head.type !== 'comment' &&\n !(head.type === 'text' && whitespace(head.value.charAt(0))) &&\n !(\n head.type === 'element' &&\n (head.tagName === 'meta' ||\n head.tagName === 'link' ||\n head.tagName === 'script' ||\n head.tagName === 'style' ||\n head.tagName === 'template')\n ))\n )\n}\n\n/**\n * Whether to omit `<colgroup>`.\n * The spec describes some logic for the opening tag, but it’s easier to\n * implement in the closing tag, to the same effect, so we handle it there\n * instead.\n *\n * @param {Element} node\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction colgroup(node, index, parent) {\n const previous = siblingBefore(parent, index)\n const head = siblingAfter(node, -1, true)\n\n // Previous colgroup was already omitted.\n if (\n parent &&\n previous &&\n previous.type === 'element' &&\n previous.tagName === 'colgroup' &&\n closing(previous, parent.children.indexOf(previous), parent)\n ) {\n return false\n }\n\n return Boolean(head && head.type === 'element' && head.tagName === 'col')\n}\n\n/**\n * Whether to omit `<tbody>`.\n *\n * @param {Element} node\n * Element.\n * @param {number | undefined} index\n * Index of element in parent.\n * @param {Parents | undefined} parent\n * Parent of element.\n * @returns {boolean}\n * Whether the opening tag can be omitted.\n */\nfunction tbody(node, index, parent) {\n const previous = siblingBefore(parent, index)\n const head = siblingAfter(node, -1)\n\n // Previous table section was already omitted.\n if (\n parent &&\n previous &&\n previous.type === 'element' &&\n (previous.tagName === 'thead' || previous.tagName === 'tbody') &&\n closing(previous, parent.children.indexOf(previous), parent)\n ) {\n return false\n }\n\n return Boolean(head && head.type === 'element' && head.tagName === 'tr')\n}\n","/**\n * @import {Element, Parents, Properties} from 'hast'\n * @import {State} from '../index.js'\n */\n\nimport {ccount} from 'ccount'\nimport {stringify as commas} from 'comma-separated-tokens'\nimport {find, svg} from 'property-information'\nimport {stringify as spaces} from 'space-separated-tokens'\nimport {stringifyEntities} from 'stringify-entities'\nimport {closing} from '../omission/closing.js'\nimport {opening} from '../omission/opening.js'\n\n/**\n * Maps of subsets.\n *\n * Each value is a matrix of tuples.\n * The value at `0` causes parse errors, the value at `1` is valid.\n * Of both, the value at `0` is unsafe, and the value at `1` is safe.\n *\n * @type {Record<'double' | 'name' | 'single' | 'unquoted', Array<[Array<string>, Array<string>]>>}\n */\nconst constants = {\n // See: <https://html.spec.whatwg.org/#attribute-name-state>.\n name: [\n ['\\t\\n\\f\\r &/=>'.split(''), '\\t\\n\\f\\r \"&\\'/=>`'.split('')],\n ['\\0\\t\\n\\f\\r \"&\\'/<=>'.split(''), '\\0\\t\\n\\f\\r \"&\\'/<=>`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.\n unquoted: [\n ['\\t\\n\\f\\r &>'.split(''), '\\0\\t\\n\\f\\r \"&\\'<=>`'.split('')],\n ['\\0\\t\\n\\f\\r \"&\\'<=>`'.split(''), '\\0\\t\\n\\f\\r \"&\\'<=>`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.\n single: [\n [\"&'\".split(''), '\"&\\'`'.split('')],\n [\"\\0&'\".split(''), '\\0\"&\\'`'.split('')]\n ],\n // See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.\n double: [\n ['\"&'.split(''), '\"&\\'`'.split('')],\n ['\\0\"&'.split(''), '\\0\"&\\'`'.split('')]\n ]\n}\n\n/**\n * Serialize an element node.\n *\n * @param {Element} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function element(node, index, parent, state) {\n const schema = state.schema\n const omit = schema.space === 'svg' ? false : state.settings.omitOptionalTags\n let selfClosing =\n schema.space === 'svg'\n ? state.settings.closeEmptyElements\n : state.settings.voids.includes(node.tagName.toLowerCase())\n /** @type {Array<string>} */\n const parts = []\n /** @type {string} */\n let last\n\n if (schema.space === 'html' && node.tagName === 'svg') {\n state.schema = svg\n }\n\n const attributes = serializeAttributes(state, node.properties)\n\n const content = state.all(\n schema.space === 'html' && node.tagName === 'template' ? node.content : node\n )\n\n state.schema = schema\n\n // If the node is categorised as void, but it has children, remove the\n // categorisation.\n // This enables for example `menuitem`s, which are void in W3C HTML but not\n // void in WHATWG HTML, to be stringified properly.\n // Note: `menuitem` has since been removed from the HTML spec, and so is no\n // longer void.\n if (content) selfClosing = false\n\n if (attributes || !omit || !opening(node, index, parent)) {\n parts.push('<', node.tagName, attributes ? ' ' + attributes : '')\n\n if (\n selfClosing &&\n (schema.space === 'svg' || state.settings.closeSelfClosing)\n ) {\n last = attributes.charAt(attributes.length - 1)\n if (\n !state.settings.tightSelfClosing ||\n last === '/' ||\n (last && last !== '\"' && last !== \"'\")\n ) {\n parts.push(' ')\n }\n\n parts.push('/')\n }\n\n parts.push('>')\n }\n\n parts.push(content)\n\n if (!selfClosing && (!omit || !closing(node, index, parent))) {\n parts.push('</' + node.tagName + '>')\n }\n\n return parts.join('')\n}\n\n/**\n * @param {State} state\n * @param {Properties | null | undefined} properties\n * @returns {string}\n */\nfunction serializeAttributes(state, properties) {\n /** @type {Array<string>} */\n const values = []\n let index = -1\n /** @type {string} */\n let key\n\n if (properties) {\n for (key in properties) {\n if (properties[key] !== null && properties[key] !== undefined) {\n const value = serializeAttribute(state, key, properties[key])\n if (value) values.push(value)\n }\n }\n }\n\n while (++index < values.length) {\n const last = state.settings.tightAttributes\n ? values[index].charAt(values[index].length - 1)\n : undefined\n\n // In tight mode, don’t add a space after quoted attributes.\n if (index !== values.length - 1 && last !== '\"' && last !== \"'\") {\n values[index] += ' '\n }\n }\n\n return values.join('')\n}\n\n/**\n * @param {State} state\n * @param {string} key\n * @param {Properties[keyof Properties]} value\n * @returns {string}\n */\nfunction serializeAttribute(state, key, value) {\n const info = find(state.schema, key)\n const x =\n state.settings.allowParseErrors && state.schema.space === 'html' ? 0 : 1\n const y = state.settings.allowDangerousCharacters ? 0 : 1\n let quote = state.quote\n /** @type {string | undefined} */\n let result\n\n if (info.overloadedBoolean && (value === info.attribute || value === '')) {\n value = true\n } else if (\n (info.boolean || info.overloadedBoolean) &&\n (typeof value !== 'string' || value === info.attribute || value === '')\n ) {\n value = Boolean(value)\n }\n\n if (\n value === null ||\n value === undefined ||\n value === false ||\n (typeof value === 'number' && Number.isNaN(value))\n ) {\n return ''\n }\n\n const name = stringifyEntities(\n info.attribute,\n Object.assign({}, state.settings.characterReferences, {\n // Always encode without parse errors in non-HTML.\n subset: constants.name[x][y]\n })\n )\n\n // No value.\n // There is currently only one boolean property in SVG: `[download]` on\n // `<a>`.\n // This property does not seem to work in browsers (Firefox, Safari, Chrome),\n // so I can’t test if dropping the value works.\n // But I assume that it should:\n //\n // ```html\n // <!doctype html>\n // <svg viewBox=\"0 0 100 100\">\n // <a href=https://example.com download>\n // <circle cx=50 cy=40 r=35 />\n // </a>\n // </svg>\n // ```\n //\n // See: <https://github.com/wooorm/property-information/blob/main/lib/svg.js>\n if (value === true) return name\n\n // `spaces` doesn’t accept a second argument, but it’s given here just to\n // keep the code cleaner.\n value = Array.isArray(value)\n ? (info.commaSeparated ? commas : spaces)(value, {\n padLeft: !state.settings.tightCommaSeparatedLists\n })\n : String(value)\n\n if (state.settings.collapseEmptyAttributes && !value) return name\n\n // Check unquoted value.\n if (state.settings.preferUnquoted) {\n result = stringifyEntities(\n value,\n Object.assign({}, state.settings.characterReferences, {\n attribute: true,\n subset: constants.unquoted[x][y]\n })\n )\n }\n\n // If we don’t want unquoted, or if `value` contains character references when\n // unquoted…\n if (result !== value) {\n // If the alternative is less common than `quote`, switch.\n if (\n state.settings.quoteSmart &&\n ccount(value, quote) > ccount(value, state.alternative)\n ) {\n quote = state.alternative\n }\n\n result =\n quote +\n stringifyEntities(\n value,\n Object.assign({}, state.settings.characterReferences, {\n // Always encode without parse errors in non-HTML.\n subset: (quote === \"'\" ? constants.single : constants.double)[x][y],\n attribute: true\n })\n ) +\n quote\n }\n\n // Don’t add a `=` for unquoted empties.\n return name + (result ? '=' + result : result)\n}\n","/**\n * @import {Parents, Text} from 'hast'\n * @import {Raw} from 'mdast-util-to-hast'\n * @import {State} from '../index.js'\n */\n\nimport {stringifyEntities} from 'stringify-entities'\n\n// Declare array as variable so it can be cached by `stringifyEntities`\nconst textEntitySubset = ['<', '&']\n\n/**\n * Serialize a text node.\n *\n * @param {Raw | Text} node\n * Node to handle.\n * @param {number | undefined} _\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function text(node, _, parent, state) {\n // Check if content of `node` should be escaped.\n return parent &&\n parent.type === 'element' &&\n (parent.tagName === 'script' || parent.tagName === 'style')\n ? node.value\n : stringifyEntities(\n node.value,\n Object.assign({}, state.settings.characterReferences, {\n subset: textEntitySubset\n })\n )\n}\n","/**\n * @import {Parents} from 'hast'\n * @import {Raw} from 'mdast-util-to-hast'\n * @import {State} from '../index.js'\n */\n\nimport {text} from './text.js'\n\n/**\n * Serialize a raw node.\n *\n * @param {Raw} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function raw(node, index, parent, state) {\n return state.settings.allowDangerousHtml\n ? node.value\n : text(node, index, parent, state)\n}\n","/**\n * @import {Parents, Root} from 'hast'\n * @import {State} from '../index.js'\n */\n\n/**\n * Serialize a root.\n *\n * @param {Root} node\n * Node to handle.\n * @param {number | undefined} _1\n * Index of `node` in `parent.\n * @param {Parents | undefined} _2\n * Parent of `node`.\n * @param {State} state\n * Info passed around about the current state.\n * @returns {string}\n * Serialized node.\n */\nexport function root(node, _1, _2, state) {\n return state.all(node)\n}\n","/**\n * @import {Nodes, Parents} from 'hast'\n * @import {State} from '../index.js'\n */\n\nimport {zwitch} from 'zwitch'\nimport {comment} from './comment.js'\nimport {doctype} from './doctype.js'\nimport {element} from './element.js'\nimport {raw} from './raw.js'\nimport {root} from './root.js'\nimport {text} from './text.js'\n\n/**\n * @type {(node: Nodes, index: number | undefined, parent: Parents | undefined, state: State) => string}\n */\nexport const handle = zwitch('type', {\n invalid,\n unknown,\n handlers: {comment, doctype, element, raw, root, text}\n})\n\n/**\n * Fail when a non-node is found in the tree.\n *\n * @param {unknown} node\n * Unknown value.\n * @returns {never}\n * Never.\n */\nfunction invalid(node) {\n throw new Error('Expected node, not `' + node + '`')\n}\n\n/**\n * Fail when a node with an unknown type is found in the tree.\n *\n * @param {unknown} node_\n * Unknown node.\n * @returns {never}\n * Never.\n */\nfunction unknown(node_) {\n // `type` is guaranteed by runtime JS.\n const node = /** @type {Nodes} */ (node_)\n throw new Error('Cannot compile unknown node `' + node.type + '`')\n}\n","/**\n * @import {Nodes, Parents, RootContent} from 'hast'\n * @import {Schema} from 'property-information'\n * @import {Options as StringifyEntitiesOptions} from 'stringify-entities'\n */\n\n/**\n * @typedef {Omit<StringifyEntitiesOptions, 'attribute' | 'escapeOnly' | 'subset'>} CharacterReferences\n *\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [allowDangerousCharacters=false]\n * Do not encode some characters which cause XSS vulnerabilities in older\n * browsers (default: `false`).\n *\n * > ⚠️ **Danger**: only set this if you completely trust the content.\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n * Allow `raw` nodes and insert them as raw HTML (default: `false`).\n *\n * When `false`, `Raw` nodes are encoded.\n *\n * > ⚠️ **Danger**: only set this if you completely trust the content.\n * @property {boolean | null | undefined} [allowParseErrors=false]\n * Do not encode characters which cause parse errors (even though they work),\n * to save bytes (default: `false`).\n *\n * Not used in the SVG space.\n *\n * > 👉 **Note**: intentionally creates parse errors in markup (how parse\n * > errors are handled is well defined, so this works but isn’t pretty).\n * @property {boolean | null | undefined} [bogusComments=false]\n * Use “bogus comments” instead of comments to save byes: `<?charlie>`\n * instead of `<!--charlie-->` (default: `false`).\n *\n * > 👉 **Note**: intentionally creates parse errors in markup (how parse\n * > errors are handled is well defined, so this works but isn’t pretty).\n * @property {CharacterReferences | null | undefined} [characterReferences]\n * Configure how to serialize character references (optional).\n * @property {boolean | null | undefined} [closeEmptyElements=false]\n * Close SVG elements without any content with slash (`/`) on the opening tag\n * instead of an end tag: `<circle />` instead of `<circle></circle>`\n * (default: `false`).\n *\n * See `tightSelfClosing` to control whether a space is used before the\n * slash.\n *\n * Not used in the HTML space.\n * @property {boolean | null | undefined} [closeSelfClosing=false]\n * Close self-closing nodes with an extra slash (`/`): `<img />` instead of\n * `<img>` (default: `false`).\n *\n * See `tightSelfClosing` to control whether a space is used before the\n * slash.\n *\n * Not used in the SVG space.\n * @property {boolean | null | undefined} [collapseEmptyAttributes=false]\n * Collapse empty attributes: get `class` instead of `class=\"\"` (default:\n * `false`).\n *\n * Not used in the SVG space.\n *\n * > 👉 **Note**: boolean attributes (such as `hidden`) are always collapsed.\n * @property {boolean | null | undefined} [omitOptionalTags=false]\n * Omit optional opening and closing tags (default: `false`).\n *\n * For example, in `<ol><li>one</li><li>two</li></ol>`, both `</li>` closing\n * tags can be omitted.\n * The first because it’s followed by another `li`, the last because it’s\n * followed by nothing.\n *\n * Not used in the SVG space.\n * @property {boolean | null | undefined} [preferUnquoted=false]\n * Leave attributes unquoted if that results in less bytes (default: `false`).\n *\n * Not used in the SVG space.\n * @property {boolean | null | undefined} [quoteSmart=false]\n * Use the other quote if that results in less bytes (default: `false`).\n * @property {Quote | null | undefined} [quote='\"']\n * Preferred quote to use (default: `'\"'`).\n * @property {Space | null | undefined} [space='html']\n * When an `<svg>` element is found in the HTML space, this package already\n * automatically switches to and from the SVG space when entering and exiting\n * it (default: `'html'`).\n *\n * > 👉 **Note**: hast is not XML.\n * > It supports SVG as embedded in HTML.\n * > It does not support the features available in XML.\n * > Passing SVG might break but fragments of modern SVG should be fine.\n * > Use [`xast`][xast] if you need to support SVG as XML.\n * @property {boolean | null | undefined} [tightAttributes=false]\n * Join attributes together, without whitespace, if possible: get\n * `class=\"a b\"title=\"c d\"` instead of `class=\"a b\" title=\"c d\"` to save\n * bytes (default: `false`).\n *\n * Not used in the SVG space.\n *\n * > 👉 **Note**: intentionally creates parse errors in markup (how parse\n * > errors are handled is well defined, so this works but isn’t pretty).\n * @property {boolean | null | undefined} [tightCommaSeparatedLists=false]\n * Join known comma-separated attribute values with just a comma (`,`),\n * instead of padding them on the right as well (`,␠`, where `␠` represents a\n * space) (default: `false`).\n * @property {boolean | null | undefined} [tightDoctype=false]\n * Drop unneeded spaces in doctypes: `<!doctypehtml>` instead of\n * `<!doctype html>` to save bytes (default: `false`).\n *\n * > 👉 **Note**: intentionally creates parse errors in markup (how parse\n * > errors are handled is well defined, so this works but isn’t pretty).\n * @property {boolean | null | undefined} [tightSelfClosing=false]\n * Do not use an extra space when closing self-closing elements: `<img/>`\n * instead of `<img />` (default: `false`).\n *\n * > 👉 **Note**: only used if `closeSelfClosing: true` or\n * > `closeEmptyElements: true`.\n * @property {boolean | null | undefined} [upperDoctype=false]\n * Use a `<!DOCTYPE…` instead of `<!doctype…` (default: `false`).\n *\n * Useless except for XHTML.\n * @property {ReadonlyArray<string> | null | undefined} [voids]\n * Tag names of elements to serialize without closing tag (default: `html-void-elements`).\n *\n * Not used in the SVG space.\n *\n * > 👉 **Note**: It’s highly unlikely that you want to pass this, because\n * > hast is not for XML, and HTML will not add more void elements.\n *\n * @typedef {'\"' | \"'\"} Quote\n * HTML quotes for attribute values.\n *\n * @typedef {Omit<Required<{[key in keyof Options]: Exclude<Options[key], null | undefined>}>, 'space' | 'quote'>} Settings\n *\n * @typedef {'html' | 'svg'} Space\n * Namespace.\n *\n * @typedef State\n * Info passed around about the current state.\n * @property {(node: Parents | undefined) => string} all\n * Serialize the children of a parent node.\n * @property {Quote} alternative\n * Alternative quote.\n * @property {(node: Nodes, index: number | undefined, parent: Parents | undefined) => string} one\n * Serialize one node.\n * @property {Quote} quote\n * Preferred quote.\n * @property {Schema} schema\n * Current schema.\n * @property {Settings} settings\n * User configuration.\n */\n\nimport {htmlVoidElements} from 'html-void-elements'\nimport {html, svg} from 'property-information'\nimport {handle} from './handle/index.js'\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/** @type {CharacterReferences} */\nconst emptyCharacterReferences = {}\n\n/** @type {Array<never>} */\nconst emptyChildren = []\n\n/**\n * Serialize hast as HTML.\n *\n * @param {Array<RootContent> | Nodes} tree\n * Tree to serialize.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized HTML.\n */\nexport function toHtml(tree, options) {\n const options_ = options || emptyOptions\n const quote = options_.quote || '\"'\n const alternative = quote === '\"' ? \"'\" : '\"'\n\n if (quote !== '\"' && quote !== \"'\") {\n throw new Error('Invalid quote `' + quote + '`, expected `\\'` or `\"`')\n }\n\n /** @type {State} */\n const state = {\n one,\n all,\n settings: {\n omitOptionalTags: options_.omitOptionalTags || false,\n allowParseErrors: options_.allowParseErrors || false,\n allowDangerousCharacters: options_.allowDangerousCharacters || false,\n quoteSmart: options_.quoteSmart || false,\n preferUnquoted: options_.preferUnquoted || false,\n tightAttributes: options_.tightAttributes || false,\n upperDoctype: options_.upperDoctype || false,\n tightDoctype: options_.tightDoctype || false,\n bogusComments: options_.bogusComments || false,\n tightCommaSeparatedLists: options_.tightCommaSeparatedLists || false,\n tightSelfClosing: options_.tightSelfClosing || false,\n collapseEmptyAttributes: options_.collapseEmptyAttributes || false,\n allowDangerousHtml: options_.allowDangerousHtml || false,\n voids: options_.voids || htmlVoidElements,\n characterReferences:\n options_.characterReferences || emptyCharacterReferences,\n closeSelfClosing: options_.closeSelfClosing || false,\n closeEmptyElements: options_.closeEmptyElements || false\n },\n schema: options_.space === 'svg' ? svg : html,\n quote,\n alternative\n }\n\n return state.one(\n Array.isArray(tree) ? {type: 'root', children: tree} : tree,\n undefined,\n undefined\n )\n}\n\n/**\n * Serialize a node.\n *\n * @this {State}\n * Info passed around about the current state.\n * @param {Nodes} node\n * Node to handle.\n * @param {number | undefined} index\n * Index of `node` in `parent.\n * @param {Parents | undefined} parent\n * Parent of `node`.\n * @returns {string}\n * Serialized node.\n */\nfunction one(node, index, parent) {\n return handle(node, index, parent, this)\n}\n\n/**\n * Serialize all children of `parent`.\n *\n * @this {State}\n * Info passed around about the current state.\n * @param {Parents | undefined} parent\n * Parent whose children to serialize.\n * @returns {string}\n */\nexport function all(parent) {\n /** @type {Array<string>} */\n const results = []\n const children = (parent && parent.children) || emptyChildren\n let index = -1\n\n while (++index < children.length) {\n results[index] = this.one(children[index], index, parent)\n }\n\n return results.join('')\n}\n","import { ShikiError as ShikiError$1 } from \"@shikijs/types\";\nimport { ShikiError, applyColorReplacements, codeToTokensBase as codeToTokensBase$1, codeToTokensWithThemes, codeToTokensWithThemes as codeToTokensWithThemes$1, createShikiInternal, createShikiInternalSync, createShikiPrimitive, createShikiPrimitive as createShikiPrimitive$1, createShikiPrimitiveAsync, createShikiPrimitiveAsync as createShikiPrimitiveAsync$1, getLastGrammarState, getLastGrammarStateFromMap, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, normalizeGetter, normalizeTheme, resolveColorReplacements, setLastGrammarStateToMap, splitLines, splitLines as splitLines$1, toArray, tokenizeWithTheme } from \"@shikijs/primitive\";\nimport { FontStyle } from \"@shikijs/vscode-textmate\";\nimport { toHtml } from \"hast-util-to-html\";\n\nexport * from \"@shikijs/types\"\n\n//#region src/utils/hast.ts\n/**\n* Utility to append class to a hast node\n*\n* If the `property.class` is a string, it will be splitted by space and converted to an array.\n*/\nfunction addClassToHast(node, className) {\n\tif (!className) return node;\n\tnode.properties ||= {};\n\tnode.properties.class ||= [];\n\tif (typeof node.properties.class === \"string\") node.properties.class = node.properties.class.split(/\\s+/g);\n\tif (!Array.isArray(node.properties.class)) node.properties.class = [];\n\tconst targets = Array.isArray(className) ? className : className.split(/\\s+/g);\n\tfor (const c of targets) if (c && !node.properties.class.includes(c)) node.properties.class.push(c);\n\treturn node;\n}\n\n//#endregion\n//#region src/utils/strings.ts\n/**\n* Creates a converter between index and position in a code block.\n*\n* Overflow/underflow are unchecked.\n*/\nfunction createPositionConverter(code) {\n\tconst lines = splitLines$1(code, true).map(([line]) => line);\n\tfunction indexToPos(index) {\n\t\tif (index === code.length) return {\n\t\t\tline: lines.length - 1,\n\t\t\tcharacter: lines[lines.length - 1].length\n\t\t};\n\t\tlet character = index;\n\t\tlet line = 0;\n\t\tfor (const lineText of lines) {\n\t\t\tif (character < lineText.length) break;\n\t\t\tcharacter -= lineText.length;\n\t\t\tline++;\n\t\t}\n\t\treturn {\n\t\t\tline,\n\t\t\tcharacter\n\t\t};\n\t}\n\tfunction posToIndex(line, character) {\n\t\tlet index = 0;\n\t\tfor (let i = 0; i < line; i++) index += lines[i].length;\n\t\tindex += character;\n\t\treturn index;\n\t}\n\treturn {\n\t\tlines,\n\t\tindexToPos,\n\t\tposToIndex\n\t};\n}\n/**\n* Guess embedded languages from given code and highlighter.\n*\n* When highlighter is provided, only bundled languages will be included.\n*\n* @param code - The code string to analyze\n* @param _lang - The primary language of the code (currently unused)\n* @param highlighter - Optional highlighter instance to validate languages\n* @returns Array of detected language identifiers\n*\n* @example\n* ```ts\n* // Detects 'javascript' from Vue SFC\n* guessEmbeddedLanguages('<script lang=\"javascript\">')\n*\n* // Detects 'python' from markdown code block\n* guessEmbeddedLanguages('```python\\nprint(\"hi\")\\n```')\n* ```\n*/\nfunction guessEmbeddedLanguages(code, _lang, highlighter) {\n\tconst langs = /* @__PURE__ */ new Set();\n\tfor (const match of code.matchAll(/:?lang=[\"']([^\"']+)[\"']/g)) {\n\t\tconst lang = match[1].toLowerCase().trim();\n\t\tif (lang) langs.add(lang);\n\t}\n\tfor (const match of code.matchAll(/(?:```|~~~)([\\w-]+)/g)) {\n\t\tconst lang = match[1].toLowerCase().trim();\n\t\tif (lang) langs.add(lang);\n\t}\n\tfor (const match of code.matchAll(/\\\\begin\\{([\\w-]+)\\}/g)) {\n\t\tconst lang = match[1].toLowerCase().trim();\n\t\tif (lang) langs.add(lang);\n\t}\n\tfor (const match of code.matchAll(/<script\\s+(?:type|lang)=[\"']([^\"']+)[\"']/gi)) {\n\t\tconst fullType = match[1].toLowerCase().trim();\n\t\tconst lang = fullType.includes(\"/\") ? fullType.split(\"/\").pop() : fullType;\n\t\tif (lang) langs.add(lang);\n\t}\n\tif (!highlighter) return Array.from(langs);\n\tconst bundle = highlighter.getBundledLanguages();\n\treturn Array.from(langs).filter((l) => l && bundle[l]);\n}\n\n//#endregion\n//#region src/utils/constants.ts\nconst DEFAULT_COLOR_LIGHT_DARK = \"light-dark()\";\nconst COLOR_KEYS = [\"color\", \"background-color\"];\n\n//#endregion\n//#region src/utils/tokens.ts\n/**\n* Split a token into multiple tokens by given offsets.\n*\n* The offsets are relative to the token, and should be sorted.\n*/\nfunction splitToken(token, offsets) {\n\tlet lastOffset = 0;\n\tconst tokens = [];\n\tfor (const offset of offsets) {\n\t\tif (offset > lastOffset) tokens.push({\n\t\t\t...token,\n\t\t\tcontent: token.content.slice(lastOffset, offset),\n\t\t\toffset: token.offset + lastOffset\n\t\t});\n\t\tlastOffset = offset;\n\t}\n\tif (lastOffset < token.content.length) tokens.push({\n\t\t...token,\n\t\tcontent: token.content.slice(lastOffset),\n\t\toffset: token.offset + lastOffset\n\t});\n\treturn tokens;\n}\n/**\n* Split 2D tokens array by given breakpoints.\n*/\nfunction splitTokens(tokens, breakpoints) {\n\tconst sorted = Array.from(breakpoints instanceof Set ? breakpoints : new Set(breakpoints)).sort((a, b) => a - b);\n\tif (!sorted.length) return tokens;\n\treturn tokens.map((line) => {\n\t\treturn line.flatMap((token) => {\n\t\t\tconst breakpointsInToken = sorted.filter((i) => token.offset < i && i < token.offset + token.content.length).map((i) => i - token.offset).sort((a, b) => a - b);\n\t\t\tif (!breakpointsInToken.length) return token;\n\t\t\treturn splitToken(token, breakpointsInToken);\n\t\t});\n\t});\n}\nfunction flatTokenVariants(merged, variantsOrder, cssVariablePrefix, defaultColor, colorsRendering = \"css-vars\") {\n\tconst token = {\n\t\tcontent: merged.content,\n\t\texplanation: merged.explanation,\n\t\toffset: merged.offset\n\t};\n\tconst styles = variantsOrder.map((t) => getTokenStyleObject(merged.variants[t]));\n\tconst styleKeys = new Set(styles.flatMap((t) => Object.keys(t)));\n\tconst mergedStyles = {};\n\tconst varKey = (idx, key) => {\n\t\tconst keyName = key === \"color\" ? \"\" : key === \"background-color\" ? \"-bg\" : `-${key}`;\n\t\treturn cssVariablePrefix + variantsOrder[idx] + (key === \"color\" ? \"\" : keyName);\n\t};\n\tstyles.forEach((cur, idx) => {\n\t\tfor (const key of styleKeys) {\n\t\t\tconst value = cur[key] || \"inherit\";\n\t\t\tif (idx === 0 && defaultColor && COLOR_KEYS.includes(key)) if (defaultColor === DEFAULT_COLOR_LIGHT_DARK && styles.length > 1) {\n\t\t\t\tconst lightIndex = variantsOrder.findIndex((t) => t === \"light\");\n\t\t\t\tconst darkIndex = variantsOrder.findIndex((t) => t === \"dark\");\n\t\t\t\tif (lightIndex === -1 || darkIndex === -1) throw new ShikiError$1(\"When using `defaultColor: \\\"light-dark()\\\"`, you must provide both `light` and `dark` themes\");\n\t\t\t\tmergedStyles[key] = `light-dark(${styles[lightIndex][key] || \"inherit\"}, ${styles[darkIndex][key] || \"inherit\"})`;\n\t\t\t\tif (colorsRendering === \"css-vars\") mergedStyles[varKey(idx, key)] = value;\n\t\t\t} else mergedStyles[key] = value;\n\t\t\telse if (colorsRendering === \"css-vars\") mergedStyles[varKey(idx, key)] = value;\n\t\t}\n\t});\n\ttoken.htmlStyle = mergedStyles;\n\treturn token;\n}\nfunction getTokenStyleObject(token) {\n\tconst styles = {};\n\tif (token.color) styles.color = token.color;\n\tif (token.bgColor) styles[\"background-color\"] = token.bgColor;\n\tif (token.fontStyle) {\n\t\tif (token.fontStyle & FontStyle.Italic) styles[\"font-style\"] = \"italic\";\n\t\tif (token.fontStyle & FontStyle.Bold) styles[\"font-weight\"] = \"bold\";\n\t\tconst decorations = [];\n\t\tif (token.fontStyle & FontStyle.Underline) decorations.push(\"underline\");\n\t\tif (token.fontStyle & FontStyle.Strikethrough) decorations.push(\"line-through\");\n\t\tif (decorations.length) styles[\"text-decoration\"] = decorations.join(\" \");\n\t}\n\treturn styles;\n}\nfunction stringifyTokenStyle(token) {\n\tif (typeof token === \"string\") return token;\n\treturn Object.entries(token).map(([key, value]) => `${key}:${value}`).join(\";\");\n}\n\n//#endregion\n//#region src/transformer-decorations.ts\n/**\n* A built-in transformer to add decorations to the highlighted code.\n*/\nfunction transformerDecorations() {\n\tconst map = /* @__PURE__ */ new WeakMap();\n\tfunction getContext(shiki) {\n\t\tif (!map.has(shiki.meta)) {\n\t\t\tconst converter = createPositionConverter(shiki.source);\n\t\t\tfunction normalizePosition(p) {\n\t\t\t\tif (typeof p === \"number\") {\n\t\t\t\t\tif (p < 0 || p > shiki.source.length) throw new ShikiError$1(`Invalid decoration offset: ${p}. Code length: ${shiki.source.length}`);\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...converter.indexToPos(p),\n\t\t\t\t\t\toffset: p\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tconst line = converter.lines[p.line];\n\t\t\t\t\tif (line === void 0) throw new ShikiError$1(`Invalid decoration position ${JSON.stringify(p)}. Lines length: ${converter.lines.length}`);\n\t\t\t\t\tlet character = p.character;\n\t\t\t\t\tif (character < 0) character = line.length + character;\n\t\t\t\t\tif (character < 0 || character > line.length) throw new ShikiError$1(`Invalid decoration position ${JSON.stringify(p)}. Line ${p.line} length: ${line.length}`);\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...p,\n\t\t\t\t\t\tcharacter,\n\t\t\t\t\t\toffset: converter.posToIndex(p.line, character)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst decorations = (shiki.options.decorations || []).map((d) => ({\n\t\t\t\t...d,\n\t\t\t\tstart: normalizePosition(d.start),\n\t\t\t\tend: normalizePosition(d.end)\n\t\t\t}));\n\t\t\tverifyIntersections(decorations);\n\t\t\tmap.set(shiki.meta, {\n\t\t\t\tdecorations,\n\t\t\t\tconverter,\n\t\t\t\tsource: shiki.source\n\t\t\t});\n\t\t}\n\t\treturn map.get(shiki.meta);\n\t}\n\treturn {\n\t\tname: \"shiki:decorations\",\n\t\ttokens(tokens) {\n\t\t\tif (!this.options.decorations?.length) return;\n\t\t\treturn splitTokens(tokens, getContext(this).decorations.flatMap((d) => [d.start.offset, d.end.offset]));\n\t\t},\n\t\tcode(codeEl) {\n\t\t\tif (!this.options.decorations?.length) return;\n\t\t\tconst ctx = getContext(this);\n\t\t\tconst lines = Array.from(codeEl.children).filter((i) => i.type === \"element\" && i.tagName === \"span\");\n\t\t\tif (lines.length !== ctx.converter.lines.length) throw new ShikiError$1(`Number of lines in code element (${lines.length}) does not match the number of lines in the source (${ctx.converter.lines.length}). Failed to apply decorations.`);\n\t\t\tfunction applyLineSection(line, start, end, decoration) {\n\t\t\t\tconst lineEl = lines[line];\n\t\t\t\tlet text = \"\";\n\t\t\t\tlet startIndex = -1;\n\t\t\t\tlet endIndex = -1;\n\t\t\t\tif (start === 0) startIndex = 0;\n\t\t\t\tif (end === 0) endIndex = 0;\n\t\t\t\tif (end === Number.POSITIVE_INFINITY) endIndex = lineEl.children.length;\n\t\t\t\tif (startIndex === -1 || endIndex === -1) for (let i = 0; i < lineEl.children.length; i++) {\n\t\t\t\t\ttext += stringify(lineEl.children[i]);\n\t\t\t\t\tif (startIndex === -1 && text.length === start) startIndex = i + 1;\n\t\t\t\t\tif (endIndex === -1 && text.length === end) endIndex = i + 1;\n\t\t\t\t}\n\t\t\t\tif (startIndex === -1) throw new ShikiError$1(`Failed to find start index for decoration ${JSON.stringify(decoration.start)}`);\n\t\t\t\tif (endIndex === -1) throw new ShikiError$1(`Failed to find end index for decoration ${JSON.stringify(decoration.end)}`);\n\t\t\t\tconst children = lineEl.children.slice(startIndex, endIndex);\n\t\t\t\tif (!decoration.alwaysWrap && children.length === lineEl.children.length) applyDecoration(lineEl, decoration, \"line\");\n\t\t\t\telse if (!decoration.alwaysWrap && children.length === 1 && children[0].type === \"element\") applyDecoration(children[0], decoration, \"token\");\n\t\t\t\telse {\n\t\t\t\t\tconst wrapper = {\n\t\t\t\t\t\ttype: \"element\",\n\t\t\t\t\t\ttagName: \"span\",\n\t\t\t\t\t\tproperties: {},\n\t\t\t\t\t\tchildren\n\t\t\t\t\t};\n\t\t\t\t\tapplyDecoration(wrapper, decoration, \"wrapper\");\n\t\t\t\t\tlineEl.children.splice(startIndex, children.length, wrapper);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction applyLine(line, decoration) {\n\t\t\t\tlines[line] = applyDecoration(lines[line], decoration, \"line\");\n\t\t\t}\n\t\t\tfunction applyDecoration(el, decoration, type) {\n\t\t\t\tconst properties = decoration.properties || {};\n\t\t\t\tconst transform = decoration.transform || ((i) => i);\n\t\t\t\tel.tagName = decoration.tagName || \"span\";\n\t\t\t\tel.properties = {\n\t\t\t\t\t...el.properties,\n\t\t\t\t\t...properties,\n\t\t\t\t\tclass: el.properties.class\n\t\t\t\t};\n\t\t\t\tif (decoration.properties?.class) addClassToHast(el, decoration.properties.class);\n\t\t\t\tel = transform(el, type) || el;\n\t\t\t\treturn el;\n\t\t\t}\n\t\t\tconst lineApplies = [];\n\t\t\tconst sorted = ctx.decorations.sort((a, b) => b.start.offset - a.start.offset || a.end.offset - b.end.offset);\n\t\t\tfor (const decoration of sorted) {\n\t\t\t\tconst { start, end } = decoration;\n\t\t\t\tif (start.line === end.line) applyLineSection(start.line, start.character, end.character, decoration);\n\t\t\t\telse if (start.line < end.line) {\n\t\t\t\t\tapplyLineSection(start.line, start.character, Number.POSITIVE_INFINITY, decoration);\n\t\t\t\t\tfor (let i = start.line + 1; i < end.line; i++) lineApplies.unshift(() => applyLine(i, decoration));\n\t\t\t\t\tapplyLineSection(end.line, 0, end.character, decoration);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlineApplies.forEach((i) => i());\n\t\t}\n\t};\n}\nfunction verifyIntersections(items) {\n\tfor (let i = 0; i < items.length; i++) {\n\t\tconst foo = items[i];\n\t\tif (foo.start.offset > foo.end.offset) throw new ShikiError$1(`Invalid decoration range: ${JSON.stringify(foo.start)} - ${JSON.stringify(foo.end)}`);\n\t\tfor (let j = i + 1; j < items.length; j++) {\n\t\t\tconst bar = items[j];\n\t\t\tconst isFooHasBarStart = foo.start.offset <= bar.start.offset && bar.start.offset < foo.end.offset;\n\t\t\tconst isFooHasBarEnd = foo.start.offset < bar.end.offset && bar.end.offset <= foo.end.offset;\n\t\t\tconst isBarHasFooStart = bar.start.offset <= foo.start.offset && foo.start.offset < bar.end.offset;\n\t\t\tconst isBarHasFooEnd = bar.start.offset < foo.end.offset && foo.end.offset <= bar.end.offset;\n\t\t\tif (isFooHasBarStart || isFooHasBarEnd || isBarHasFooStart || isBarHasFooEnd) {\n\t\t\t\tif (isFooHasBarStart && isFooHasBarEnd) continue;\n\t\t\t\tif (isBarHasFooStart && isBarHasFooEnd) continue;\n\t\t\t\tif (isBarHasFooStart && foo.start.offset === foo.end.offset) continue;\n\t\t\t\tif (isFooHasBarEnd && bar.start.offset === bar.end.offset) continue;\n\t\t\t\tthrow new ShikiError$1(`Decorations ${JSON.stringify(foo.start)} and ${JSON.stringify(bar.start)} intersect.`);\n\t\t\t}\n\t\t}\n\t}\n}\nfunction stringify(el) {\n\tif (el.type === \"text\") return el.value;\n\tif (el.type === \"element\") return el.children.map(stringify).join(\"\");\n\treturn \"\";\n}\n\n//#endregion\n//#region src/highlight/_get-transformers.ts\nconst builtInTransformers = [/* @__PURE__ */ transformerDecorations()];\nfunction getTransformers(options) {\n\tconst transformers = sortTransformersByEnforcement(options.transformers || []);\n\treturn [\n\t\t...transformers.pre,\n\t\t...transformers.normal,\n\t\t...transformers.post,\n\t\t...builtInTransformers\n\t];\n}\nfunction sortTransformersByEnforcement(transformers) {\n\tconst pre = [];\n\tconst post = [];\n\tconst normal = [];\n\tfor (const transformer of transformers) switch (transformer.enforce) {\n\t\tcase \"pre\":\n\t\t\tpre.push(transformer);\n\t\t\tbreak;\n\t\tcase \"post\":\n\t\t\tpost.push(transformer);\n\t\t\tbreak;\n\t\tdefault: normal.push(transformer);\n\t}\n\treturn {\n\t\tpre,\n\t\tpost,\n\t\tnormal\n\t};\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/ansi-sequence-parser@1.1.3/node_modules/ansi-sequence-parser/dist/index.js\nvar namedColors = [\n\t\"black\",\n\t\"red\",\n\t\"green\",\n\t\"yellow\",\n\t\"blue\",\n\t\"magenta\",\n\t\"cyan\",\n\t\"white\",\n\t\"brightBlack\",\n\t\"brightRed\",\n\t\"brightGreen\",\n\t\"brightYellow\",\n\t\"brightBlue\",\n\t\"brightMagenta\",\n\t\"brightCyan\",\n\t\"brightWhite\"\n];\nvar decorations = {\n\t1: \"bold\",\n\t2: \"dim\",\n\t3: \"italic\",\n\t4: \"underline\",\n\t7: \"reverse\",\n\t8: \"hidden\",\n\t9: \"strikethrough\"\n};\nfunction findSequence(value, position) {\n\tconst nextEscape = value.indexOf(\"\\x1B\", position);\n\tif (nextEscape !== -1) {\n\t\tif (value[nextEscape + 1] === \"[\") {\n\t\t\tconst nextClose = value.indexOf(\"m\", nextEscape);\n\t\t\tif (nextClose !== -1) return {\n\t\t\t\tsequence: value.substring(nextEscape + 2, nextClose).split(\";\"),\n\t\t\t\tstartPosition: nextEscape,\n\t\t\t\tposition: nextClose + 1\n\t\t\t};\n\t\t}\n\t}\n\treturn { position: value.length };\n}\nfunction parseColor(sequence) {\n\tconst colorMode = sequence.shift();\n\tif (colorMode === \"2\") {\n\t\tconst rgb = sequence.splice(0, 3).map((x) => Number.parseInt(x));\n\t\tif (rgb.length !== 3 || rgb.some((x) => Number.isNaN(x))) return;\n\t\treturn {\n\t\t\ttype: \"rgb\",\n\t\t\trgb\n\t\t};\n\t} else if (colorMode === \"5\") {\n\t\tconst index = sequence.shift();\n\t\tif (index) return {\n\t\t\ttype: \"table\",\n\t\t\tindex: Number(index)\n\t\t};\n\t}\n}\nfunction parseSequence(sequence) {\n\tconst commands = [];\n\twhile (sequence.length > 0) {\n\t\tconst code = sequence.shift();\n\t\tif (!code) continue;\n\t\tconst codeInt = Number.parseInt(code);\n\t\tif (Number.isNaN(codeInt)) continue;\n\t\tif (codeInt === 0) commands.push({ type: \"resetAll\" });\n\t\telse if (codeInt <= 9) {\n\t\t\tif (decorations[codeInt]) commands.push({\n\t\t\t\ttype: \"setDecoration\",\n\t\t\t\tvalue: decorations[codeInt]\n\t\t\t});\n\t\t} else if (codeInt <= 29) {\n\t\t\tconst decoration = decorations[codeInt - 20];\n\t\t\tif (decoration) {\n\t\t\t\tcommands.push({\n\t\t\t\t\ttype: \"resetDecoration\",\n\t\t\t\t\tvalue: decoration\n\t\t\t\t});\n\t\t\t\tif (decoration === \"dim\") commands.push({\n\t\t\t\t\ttype: \"resetDecoration\",\n\t\t\t\t\tvalue: \"bold\"\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (codeInt <= 37) commands.push({\n\t\t\ttype: \"setForegroundColor\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"named\",\n\t\t\t\tname: namedColors[codeInt - 30]\n\t\t\t}\n\t\t});\n\t\telse if (codeInt === 38) {\n\t\t\tconst color = parseColor(sequence);\n\t\t\tif (color) commands.push({\n\t\t\t\ttype: \"setForegroundColor\",\n\t\t\t\tvalue: color\n\t\t\t});\n\t\t} else if (codeInt === 39) commands.push({ type: \"resetForegroundColor\" });\n\t\telse if (codeInt <= 47) commands.push({\n\t\t\ttype: \"setBackgroundColor\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"named\",\n\t\t\t\tname: namedColors[codeInt - 40]\n\t\t\t}\n\t\t});\n\t\telse if (codeInt === 48) {\n\t\t\tconst color = parseColor(sequence);\n\t\t\tif (color) commands.push({\n\t\t\t\ttype: \"setBackgroundColor\",\n\t\t\t\tvalue: color\n\t\t\t});\n\t\t} else if (codeInt === 49) commands.push({ type: \"resetBackgroundColor\" });\n\t\telse if (codeInt === 53) commands.push({\n\t\t\ttype: \"setDecoration\",\n\t\t\tvalue: \"overline\"\n\t\t});\n\t\telse if (codeInt === 55) commands.push({\n\t\t\ttype: \"resetDecoration\",\n\t\t\tvalue: \"overline\"\n\t\t});\n\t\telse if (codeInt >= 90 && codeInt <= 97) commands.push({\n\t\t\ttype: \"setForegroundColor\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"named\",\n\t\t\t\tname: namedColors[codeInt - 90 + 8]\n\t\t\t}\n\t\t});\n\t\telse if (codeInt >= 100 && codeInt <= 107) commands.push({\n\t\t\ttype: \"setBackgroundColor\",\n\t\t\tvalue: {\n\t\t\t\ttype: \"named\",\n\t\t\t\tname: namedColors[codeInt - 100 + 8]\n\t\t\t}\n\t\t});\n\t}\n\treturn commands;\n}\nfunction createAnsiSequenceParser() {\n\tlet foreground = null;\n\tlet background = null;\n\tlet decorations2 = /* @__PURE__ */ new Set();\n\treturn { parse(value) {\n\t\tconst tokens = [];\n\t\tlet position = 0;\n\t\tdo {\n\t\t\tconst findResult = findSequence(value, position);\n\t\t\tconst text = findResult.sequence ? value.substring(position, findResult.startPosition) : value.substring(position);\n\t\t\tif (text.length > 0) tokens.push({\n\t\t\t\tvalue: text,\n\t\t\t\tforeground,\n\t\t\t\tbackground,\n\t\t\t\tdecorations: new Set(decorations2)\n\t\t\t});\n\t\t\tif (findResult.sequence) {\n\t\t\t\tconst commands = parseSequence(findResult.sequence);\n\t\t\t\tfor (const styleToken of commands) if (styleToken.type === \"resetAll\") {\n\t\t\t\t\tforeground = null;\n\t\t\t\t\tbackground = null;\n\t\t\t\t\tdecorations2.clear();\n\t\t\t\t} else if (styleToken.type === \"resetForegroundColor\") foreground = null;\n\t\t\t\telse if (styleToken.type === \"resetBackgroundColor\") background = null;\n\t\t\t\telse if (styleToken.type === \"resetDecoration\") decorations2.delete(styleToken.value);\n\t\t\t\tfor (const styleToken of commands) if (styleToken.type === \"setForegroundColor\") foreground = styleToken.value;\n\t\t\t\telse if (styleToken.type === \"setBackgroundColor\") background = styleToken.value;\n\t\t\t\telse if (styleToken.type === \"setDecoration\") decorations2.add(styleToken.value);\n\t\t\t}\n\t\t\tposition = findResult.position;\n\t\t} while (position < value.length);\n\t\treturn tokens;\n\t} };\n}\nvar defaultNamedColorsMap = {\n\tblack: \"#000000\",\n\tred: \"#bb0000\",\n\tgreen: \"#00bb00\",\n\tyellow: \"#bbbb00\",\n\tblue: \"#0000bb\",\n\tmagenta: \"#ff00ff\",\n\tcyan: \"#00bbbb\",\n\twhite: \"#eeeeee\",\n\tbrightBlack: \"#555555\",\n\tbrightRed: \"#ff5555\",\n\tbrightGreen: \"#00ff00\",\n\tbrightYellow: \"#ffff55\",\n\tbrightBlue: \"#5555ff\",\n\tbrightMagenta: \"#ff55ff\",\n\tbrightCyan: \"#55ffff\",\n\tbrightWhite: \"#ffffff\"\n};\nfunction createColorPalette(namedColorsMap = defaultNamedColorsMap) {\n\tfunction namedColor(name) {\n\t\treturn namedColorsMap[name];\n\t}\n\tfunction rgbColor(rgb) {\n\t\treturn `#${rgb.map((x) => Math.max(0, Math.min(x, 255)).toString(16).padStart(2, \"0\")).join(\"\")}`;\n\t}\n\tlet colorTable;\n\tfunction getColorTable() {\n\t\tif (colorTable) return colorTable;\n\t\tcolorTable = [];\n\t\tfor (let i = 0; i < namedColors.length; i++) colorTable.push(namedColor(namedColors[i]));\n\t\tlet levels = [\n\t\t\t0,\n\t\t\t95,\n\t\t\t135,\n\t\t\t175,\n\t\t\t215,\n\t\t\t255\n\t\t];\n\t\tfor (let r = 0; r < 6; r++) for (let g = 0; g < 6; g++) for (let b = 0; b < 6; b++) colorTable.push(rgbColor([\n\t\t\tlevels[r],\n\t\t\tlevels[g],\n\t\t\tlevels[b]\n\t\t]));\n\t\tlet level = 8;\n\t\tfor (let i = 0; i < 24; i++, level += 10) colorTable.push(rgbColor([\n\t\t\tlevel,\n\t\t\tlevel,\n\t\t\tlevel\n\t\t]));\n\t\treturn colorTable;\n\t}\n\tfunction tableColor(index) {\n\t\treturn getColorTable()[index];\n\t}\n\tfunction value(color) {\n\t\tswitch (color.type) {\n\t\t\tcase \"named\": return namedColor(color.name);\n\t\t\tcase \"rgb\": return rgbColor(color.rgb);\n\t\t\tcase \"table\": return tableColor(color.index);\n\t\t}\n\t}\n\treturn { value };\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens-ansi.ts\n/**\n* Default ANSI palette (VSCode compatible fallbacks)\n* Used when the theme does not define terminal.ansi* colors.\n*/\nconst defaultAnsiColors = {\n\tblack: \"#000000\",\n\tred: \"#cd3131\",\n\tgreen: \"#0DBC79\",\n\tyellow: \"#E5E510\",\n\tblue: \"#2472C8\",\n\tmagenta: \"#BC3FBC\",\n\tcyan: \"#11A8CD\",\n\twhite: \"#E5E5E5\",\n\tbrightBlack: \"#666666\",\n\tbrightRed: \"#F14C4C\",\n\tbrightGreen: \"#23D18B\",\n\tbrightYellow: \"#F5F543\",\n\tbrightBlue: \"#3B8EEA\",\n\tbrightMagenta: \"#D670D6\",\n\tbrightCyan: \"#29B8DB\",\n\tbrightWhite: \"#FFFFFF\"\n};\nfunction tokenizeAnsiWithTheme(theme, fileContents, options) {\n\tconst colorReplacements = resolveColorReplacements(theme, options);\n\tconst lines = splitLines(fileContents);\n\tconst colorPalette = createColorPalette(Object.fromEntries(namedColors.map((name) => {\n\t\tconst key = `terminal.ansi${name[0].toUpperCase()}${name.substring(1)}`;\n\t\treturn [name, theme.colors?.[key] || defaultAnsiColors[name]];\n\t})));\n\tconst parser = createAnsiSequenceParser();\n\treturn lines.map((line) => parser.parse(line[0]).map((token) => {\n\t\tlet color;\n\t\tlet bgColor;\n\t\tif (token.decorations.has(\"reverse\")) {\n\t\t\tcolor = token.background ? colorPalette.value(token.background) : theme.bg;\n\t\t\tbgColor = token.foreground ? colorPalette.value(token.foreground) : theme.fg;\n\t\t} else {\n\t\t\tcolor = token.foreground ? colorPalette.value(token.foreground) : theme.fg;\n\t\t\tbgColor = token.background ? colorPalette.value(token.background) : void 0;\n\t\t}\n\t\tcolor = applyColorReplacements(color, colorReplacements);\n\t\tbgColor = applyColorReplacements(bgColor, colorReplacements);\n\t\tif (token.decorations.has(\"dim\")) color = dimColor(color);\n\t\tlet fontStyle = FontStyle.None;\n\t\tif (token.decorations.has(\"bold\")) fontStyle |= FontStyle.Bold;\n\t\tif (token.decorations.has(\"italic\")) fontStyle |= FontStyle.Italic;\n\t\tif (token.decorations.has(\"underline\")) fontStyle |= FontStyle.Underline;\n\t\tif (token.decorations.has(\"strikethrough\")) fontStyle |= FontStyle.Strikethrough;\n\t\treturn {\n\t\t\tcontent: token.value,\n\t\t\toffset: line[1],\n\t\t\tcolor,\n\t\t\tbgColor,\n\t\t\tfontStyle\n\t\t};\n\t}));\n}\n/**\n* Adds 50% alpha to a hex color string or the \"-dim\" postfix to a CSS variable\n*/\nfunction dimColor(color) {\n\tconst hexMatch = color.match(/#([0-9a-f]{3,8})/i);\n\tif (hexMatch) {\n\t\tconst hex = hexMatch[1];\n\t\tif (hex.length === 8) {\n\t\t\tconst alpha = Math.round(Number.parseInt(hex.slice(6, 8), 16) / 2).toString(16).padStart(2, \"0\");\n\t\t\treturn `#${hex.slice(0, 6)}${alpha}`;\n\t\t} else if (hex.length === 6) return `#${hex}80`;\n\t\telse if (hex.length === 4) {\n\t\t\tconst r = hex[0];\n\t\t\tconst g = hex[1];\n\t\t\tconst b = hex[2];\n\t\t\tconst a = hex[3];\n\t\t\treturn `#${r}${r}${g}${g}${b}${b}${Math.round(Number.parseInt(`${a}${a}`, 16) / 2).toString(16).padStart(2, \"0\")}`;\n\t\t} else if (hex.length === 3) {\n\t\t\tconst r = hex[0];\n\t\t\tconst g = hex[1];\n\t\t\tconst b = hex[2];\n\t\t\treturn `#${r}${r}${g}${g}${b}${b}80`;\n\t\t}\n\t}\n\tconst cssVarMatch = color.match(/var\\((--[\\w-]+-ansi-[\\w-]+)\\)/);\n\tif (cssVarMatch) return `var(${cssVarMatch[1]}-dim)`;\n\treturn color;\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens-base.ts\n/**\n* Code to tokens, with a simple theme.\n* This wraps the tokenizer's implementation to add ANSI support.\n*/\nfunction codeToTokensBase(primitive, code, options = {}) {\n\tconst lang = primitive.resolveLangAlias(options.lang || \"text\");\n\tconst { theme: themeName = primitive.getLoadedThemes()[0] } = options;\n\tif (!isPlainLang(lang) && !isNoneTheme(themeName) && lang === \"ansi\") {\n\t\tconst { theme } = primitive.setTheme(themeName);\n\t\treturn tokenizeAnsiWithTheme(theme, code, options);\n\t}\n\treturn codeToTokensBase$1(primitive, code, options);\n}\n\n//#endregion\n//#region src/highlight/code-to-tokens.ts\n/**\n* High-level code-to-tokens API.\n*\n* It will use `codeToTokensWithThemes` or `codeToTokensBase` based on the options.\n*/\nfunction codeToTokens(primitive, code, options) {\n\tlet bg;\n\tlet fg;\n\tlet tokens;\n\tlet themeName;\n\tlet rootStyle;\n\tlet grammarState;\n\tif (\"themes\" in options) {\n\t\tconst { defaultColor = \"light\", cssVariablePrefix = \"--shiki-\", colorsRendering = \"css-vars\" } = options;\n\t\tconst themes = Object.entries(options.themes).filter((i) => i[1]).map((i) => ({\n\t\t\tcolor: i[0],\n\t\t\ttheme: i[1]\n\t\t})).sort((a, b) => a.color === defaultColor ? -1 : b.color === defaultColor ? 1 : 0);\n\t\tif (themes.length === 0) throw new ShikiError$1(\"`themes` option must not be empty\");\n\t\tconst themeTokens = codeToTokensWithThemes$1(primitive, code, options, codeToTokensBase);\n\t\tgrammarState = getLastGrammarStateFromMap(themeTokens);\n\t\tif (defaultColor && DEFAULT_COLOR_LIGHT_DARK !== defaultColor && !themes.find((t) => t.color === defaultColor)) throw new ShikiError$1(`\\`themes\\` option must contain the defaultColor key \\`${defaultColor}\\``);\n\t\tconst themeRegs = themes.map((t) => primitive.getTheme(t.theme));\n\t\tconst themesOrder = themes.map((t) => t.color);\n\t\ttokens = themeTokens.map((line) => line.map((token) => flatTokenVariants(token, themesOrder, cssVariablePrefix, defaultColor, colorsRendering)));\n\t\tif (grammarState) setLastGrammarStateToMap(tokens, grammarState);\n\t\tconst themeColorReplacements = themes.map((t) => resolveColorReplacements(t.theme, options));\n\t\tfg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, \"fg\", colorsRendering);\n\t\tbg = mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, \"bg\", colorsRendering);\n\t\tthemeName = `shiki-themes ${themeRegs.map((t) => t.name).join(\" \")}`;\n\t\trootStyle = defaultColor ? void 0 : [fg, bg].join(\";\");\n\t} else if (\"theme\" in options) {\n\t\tconst colorReplacements = resolveColorReplacements(options.theme, options);\n\t\ttokens = codeToTokensBase(primitive, code, options);\n\t\tconst _theme = primitive.getTheme(options.theme);\n\t\tbg = applyColorReplacements(_theme.bg, colorReplacements);\n\t\tfg = applyColorReplacements(_theme.fg, colorReplacements);\n\t\tthemeName = _theme.name;\n\t\tgrammarState = getLastGrammarStateFromMap(tokens);\n\t} else throw new ShikiError$1(\"Invalid options, either `theme` or `themes` must be provided\");\n\treturn {\n\t\ttokens,\n\t\tfg,\n\t\tbg,\n\t\tthemeName,\n\t\trootStyle,\n\t\tgrammarState\n\t};\n}\nfunction mapThemeColors(themes, themeRegs, themeColorReplacements, cssVariablePrefix, defaultColor, property, colorsRendering) {\n\treturn themes.map((t, idx) => {\n\t\tconst value = applyColorReplacements(themeRegs[idx][property], themeColorReplacements[idx]) || \"inherit\";\n\t\tconst cssVar = `${cssVariablePrefix + t.color}${property === \"bg\" ? \"-bg\" : \"\"}:${value}`;\n\t\tif (idx === 0 && defaultColor) {\n\t\t\tif (defaultColor === DEFAULT_COLOR_LIGHT_DARK && themes.length > 1) {\n\t\t\t\tconst lightIndex = themes.findIndex((t) => t.color === \"light\");\n\t\t\t\tconst darkIndex = themes.findIndex((t) => t.color === \"dark\");\n\t\t\t\tif (lightIndex === -1 || darkIndex === -1) throw new ShikiError$1(\"When using `defaultColor: \\\"light-dark()\\\"`, you must provide both `light` and `dark` themes\");\n\t\t\t\treturn `light-dark(${applyColorReplacements(themeRegs[lightIndex][property], themeColorReplacements[lightIndex]) || \"inherit\"}, ${applyColorReplacements(themeRegs[darkIndex][property], themeColorReplacements[darkIndex]) || \"inherit\"});${cssVar}`;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tif (colorsRendering === \"css-vars\") return cssVar;\n\t\treturn null;\n\t}).filter((i) => !!i).join(\";\");\n}\n\n//#endregion\n//#region src/highlight/code-to-hast.ts\nfunction codeToHast(primitive, code, options, transformerContext = {\n\tmeta: {},\n\toptions,\n\tcodeToHast: (_code, _options) => codeToHast(primitive, _code, _options),\n\tcodeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)\n}) {\n\tlet input = code;\n\tfor (const transformer of getTransformers(options)) input = transformer.preprocess?.call(transformerContext, input, options) || input;\n\tlet { tokens, fg, bg, themeName, rootStyle, grammarState } = codeToTokens(primitive, input, options);\n\tconst { mergeWhitespaces = true, mergeSameStyleTokens = false } = options;\n\tif (mergeWhitespaces === true) tokens = mergeWhitespaceTokens(tokens);\n\telse if (mergeWhitespaces === \"never\") tokens = splitWhitespaceTokens(tokens);\n\tif (mergeSameStyleTokens) tokens = mergeAdjacentStyledTokens(tokens);\n\tconst contextSource = {\n\t\t...transformerContext,\n\t\tget source() {\n\t\t\treturn input;\n\t\t}\n\t};\n\tfor (const transformer of getTransformers(options)) tokens = transformer.tokens?.call(contextSource, tokens) || tokens;\n\treturn tokensToHast(tokens, {\n\t\t...options,\n\t\tfg,\n\t\tbg,\n\t\tthemeName,\n\t\trootStyle: options.rootStyle === false ? false : options.rootStyle ?? rootStyle\n\t}, contextSource, grammarState);\n}\nfunction tokensToHast(tokens, options, transformerContext, grammarState = getLastGrammarStateFromMap(tokens)) {\n\tconst transformers = getTransformers(options);\n\tconst lines = [];\n\tconst root = {\n\t\ttype: \"root\",\n\t\tchildren: []\n\t};\n\tconst { structure = \"classic\", tabindex = \"0\" } = options;\n\tconst properties = { class: `shiki ${options.themeName || \"\"}` };\n\tif (options.rootStyle !== false) if (options.rootStyle != null) properties.style = options.rootStyle;\n\telse properties.style = `background-color:${options.bg};color:${options.fg}`;\n\tif (tabindex !== false && tabindex != null) properties.tabindex = tabindex.toString();\n\tfor (const [key, value] of Object.entries(options.meta || {})) if (!key.startsWith(\"_\")) properties[key] = value;\n\tlet preNode = {\n\t\ttype: \"element\",\n\t\ttagName: \"pre\",\n\t\tproperties,\n\t\tchildren: [],\n\t\tdata: options.data\n\t};\n\tlet codeNode = {\n\t\ttype: \"element\",\n\t\ttagName: \"code\",\n\t\tproperties: {},\n\t\tchildren: lines\n\t};\n\tconst lineNodes = [];\n\tconst context = {\n\t\t...transformerContext,\n\t\tstructure,\n\t\taddClassToHast,\n\t\tget source() {\n\t\t\treturn transformerContext.source;\n\t\t},\n\t\tget tokens() {\n\t\t\treturn tokens;\n\t\t},\n\t\tget options() {\n\t\t\treturn options;\n\t\t},\n\t\tget root() {\n\t\t\treturn root;\n\t\t},\n\t\tget pre() {\n\t\t\treturn preNode;\n\t\t},\n\t\tget code() {\n\t\t\treturn codeNode;\n\t\t},\n\t\tget lines() {\n\t\t\treturn lineNodes;\n\t\t}\n\t};\n\ttokens.forEach((line, idx) => {\n\t\tif (idx) {\n\t\t\tif (structure === \"inline\") root.children.push({\n\t\t\t\ttype: \"element\",\n\t\t\t\ttagName: \"br\",\n\t\t\t\tproperties: {},\n\t\t\t\tchildren: []\n\t\t\t});\n\t\t\telse if (structure === \"classic\") lines.push({\n\t\t\t\ttype: \"text\",\n\t\t\t\tvalue: \"\\n\"\n\t\t\t});\n\t\t}\n\t\tlet lineNode = {\n\t\t\ttype: \"element\",\n\t\t\ttagName: \"span\",\n\t\t\tproperties: { class: \"line\" },\n\t\t\tchildren: []\n\t\t};\n\t\tlet col = 0;\n\t\tfor (const token of line) {\n\t\t\tlet tokenNode = {\n\t\t\t\ttype: \"element\",\n\t\t\t\ttagName: \"span\",\n\t\t\t\tproperties: { ...token.htmlAttrs },\n\t\t\t\tchildren: [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\tvalue: token.content\n\t\t\t\t}]\n\t\t\t};\n\t\t\tconst style = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));\n\t\t\tif (style) tokenNode.properties.style = style;\n\t\t\tfor (const transformer of transformers) tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode, token) || tokenNode;\n\t\t\tif (structure === \"inline\") root.children.push(tokenNode);\n\t\t\telse if (structure === \"classic\") lineNode.children.push(tokenNode);\n\t\t\tcol += token.content.length;\n\t\t}\n\t\tif (structure === \"classic\") {\n\t\t\tfor (const transformer of transformers) lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode;\n\t\t\tlineNodes.push(lineNode);\n\t\t\tlines.push(lineNode);\n\t\t} else if (structure === \"inline\") lineNodes.push(lineNode);\n\t});\n\tif (structure === \"classic\") {\n\t\tfor (const transformer of transformers) codeNode = transformer?.code?.call(context, codeNode) || codeNode;\n\t\tpreNode.children.push(codeNode);\n\t\tfor (const transformer of transformers) preNode = transformer?.pre?.call(context, preNode) || preNode;\n\t\troot.children.push(preNode);\n\t} else if (structure === \"inline\") {\n\t\tconst syntheticLines = [];\n\t\tlet currentLine = {\n\t\t\ttype: \"element\",\n\t\t\ttagName: \"span\",\n\t\t\tproperties: { class: \"line\" },\n\t\t\tchildren: []\n\t\t};\n\t\tfor (const child of root.children) if (child.type === \"element\" && child.tagName === \"br\") {\n\t\t\tsyntheticLines.push(currentLine);\n\t\t\tcurrentLine = {\n\t\t\t\ttype: \"element\",\n\t\t\t\ttagName: \"span\",\n\t\t\t\tproperties: { class: \"line\" },\n\t\t\t\tchildren: []\n\t\t\t};\n\t\t} else if (child.type === \"element\" || child.type === \"text\") currentLine.children.push(child);\n\t\tsyntheticLines.push(currentLine);\n\t\tlet transformedCode = {\n\t\t\ttype: \"element\",\n\t\t\ttagName: \"code\",\n\t\t\tproperties: {},\n\t\t\tchildren: syntheticLines\n\t\t};\n\t\tfor (const transformer of transformers) transformedCode = transformer?.code?.call(context, transformedCode) || transformedCode;\n\t\troot.children = [];\n\t\tfor (let i = 0; i < transformedCode.children.length; i++) {\n\t\t\tif (i > 0) root.children.push({\n\t\t\t\ttype: \"element\",\n\t\t\t\ttagName: \"br\",\n\t\t\t\tproperties: {},\n\t\t\t\tchildren: []\n\t\t\t});\n\t\t\tconst line = transformedCode.children[i];\n\t\t\tif (line.type === \"element\") root.children.push(...line.children);\n\t\t}\n\t}\n\tlet result = root;\n\tfor (const transformer of transformers) result = transformer?.root?.call(context, result) || result;\n\tif (grammarState) setLastGrammarStateToMap(result, grammarState);\n\treturn result;\n}\nfunction mergeWhitespaceTokens(tokens) {\n\treturn tokens.map((line) => {\n\t\tconst newLine = [];\n\t\tlet carryOnContent = \"\";\n\t\tlet firstOffset;\n\t\tline.forEach((token, idx) => {\n\t\t\tconst couldMerge = !(token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough));\n\t\t\tif (couldMerge && token.content.match(/^\\s+$/) && line[idx + 1]) {\n\t\t\t\tif (firstOffset === void 0) firstOffset = token.offset;\n\t\t\t\tcarryOnContent += token.content;\n\t\t\t} else if (carryOnContent) {\n\t\t\t\tif (couldMerge) newLine.push({\n\t\t\t\t\t...token,\n\t\t\t\t\toffset: firstOffset,\n\t\t\t\t\tcontent: carryOnContent + token.content\n\t\t\t\t});\n\t\t\t\telse newLine.push({\n\t\t\t\t\tcontent: carryOnContent,\n\t\t\t\t\toffset: firstOffset\n\t\t\t\t}, token);\n\t\t\t\tfirstOffset = void 0;\n\t\t\t\tcarryOnContent = \"\";\n\t\t\t} else newLine.push(token);\n\t\t});\n\t\treturn newLine;\n\t});\n}\nfunction splitWhitespaceTokens(tokens) {\n\treturn tokens.map((line) => {\n\t\treturn line.flatMap((token) => {\n\t\t\tif (token.content.match(/^\\s+$/)) return token;\n\t\t\tconst match = token.content.match(/^(\\s*)(.*?)(\\s*)$/);\n\t\t\tif (!match) return token;\n\t\t\tconst [, leading, content, trailing] = match;\n\t\t\tif (!leading && !trailing) return token;\n\t\t\tconst expanded = [{\n\t\t\t\t...token,\n\t\t\t\toffset: token.offset + leading.length,\n\t\t\t\tcontent\n\t\t\t}];\n\t\t\tif (leading) expanded.unshift({\n\t\t\t\tcontent: leading,\n\t\t\t\toffset: token.offset\n\t\t\t});\n\t\t\tif (trailing) expanded.push({\n\t\t\t\tcontent: trailing,\n\t\t\t\toffset: token.offset + leading.length + content.length\n\t\t\t});\n\t\t\treturn expanded;\n\t\t});\n\t});\n}\nfunction mergeAdjacentStyledTokens(tokens) {\n\treturn tokens.map((line) => {\n\t\tconst newLine = [];\n\t\tfor (const token of line) {\n\t\t\tif (newLine.length === 0) {\n\t\t\t\tnewLine.push({ ...token });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst prevToken = newLine[newLine.length - 1];\n\t\t\tconst prevStyle = stringifyTokenStyle(prevToken.htmlStyle || getTokenStyleObject(prevToken));\n\t\t\tconst currentStyle = stringifyTokenStyle(token.htmlStyle || getTokenStyleObject(token));\n\t\t\tconst isPrevDecorated = prevToken.fontStyle && (prevToken.fontStyle & FontStyle.Underline || prevToken.fontStyle & FontStyle.Strikethrough);\n\t\t\tconst isDecorated = token.fontStyle && (token.fontStyle & FontStyle.Underline || token.fontStyle & FontStyle.Strikethrough);\n\t\t\tif (!isPrevDecorated && !isDecorated && prevStyle === currentStyle) prevToken.content += token.content;\n\t\t\telse newLine.push({ ...token });\n\t\t}\n\t\treturn newLine;\n\t});\n}\n\n//#endregion\n//#region src/highlight/code-to-html.ts\nconst hastToHtml = toHtml;\n/**\n* Get highlighted code in HTML.\n*/\nfunction codeToHtml(primitive, code, options) {\n\tconst context = {\n\t\tmeta: {},\n\t\toptions,\n\t\tcodeToHast: (_code, _options) => codeToHast(primitive, _code, _options),\n\t\tcodeToTokens: (_code, _options) => codeToTokens(primitive, _code, _options)\n\t};\n\tlet result = hastToHtml(codeToHast(primitive, code, options, context));\n\tfor (const transformer of getTransformers(options)) result = transformer.postprocess?.call(context, result, options) || result;\n\treturn result;\n}\n\n//#endregion\n//#region src/constructors/highlighter.ts\n/**\n* Create a Shiki core highlighter instance, with no languages or themes bundled.\n* Wasm and each language and theme must be loaded manually.\n*\n* @see http://shiki.style/guide/bundles#fine-grained-bundle\n*/\nasync function createHighlighterCore(options) {\n\tconst primitive = await createShikiPrimitiveAsync$1(options);\n\treturn {\n\t\tgetLastGrammarState: (...args) => getLastGrammarState(primitive, ...args),\n\t\tcodeToTokensBase: (code, options) => codeToTokensBase(primitive, code, options),\n\t\tcodeToTokensWithThemes: (code, options) => codeToTokensWithThemes$1(primitive, code, options),\n\t\tcodeToTokens: (code, options) => codeToTokens(primitive, code, options),\n\t\tcodeToHast: (code, options) => codeToHast(primitive, code, options),\n\t\tcodeToHtml: (code, options) => codeToHtml(primitive, code, options),\n\t\tgetBundledLanguages: () => ({}),\n\t\tgetBundledThemes: () => ({}),\n\t\t...primitive,\n\t\tgetInternalContext: () => primitive\n\t};\n}\n/**\n* Create a Shiki core highlighter instance, with no languages or themes bundled.\n* Wasm and each language and theme must be loaded manually.\n*\n* Synchronous version of `createHighlighterCore`, which requires to provide the engine and all themes and languages upfront.\n*\n* @see http://shiki.style/guide/bundles#fine-grained-bundle\n*/\nfunction createHighlighterCoreSync(options) {\n\tconst internal = createShikiPrimitive$1(options);\n\treturn {\n\t\tgetLastGrammarState: (...args) => getLastGrammarState(internal, ...args),\n\t\tcodeToTokensBase: (code, options) => codeToTokensBase(internal, code, options),\n\t\tcodeToTokensWithThemes: (code, options) => codeToTokensWithThemes$1(internal, code, options),\n\t\tcodeToTokens: (code, options) => codeToTokens(internal, code, options),\n\t\tcodeToHast: (code, options) => codeToHast(internal, code, options),\n\t\tcodeToHtml: (code, options) => codeToHtml(internal, code, options),\n\t\tgetBundledLanguages: () => ({}),\n\t\tgetBundledThemes: () => ({}),\n\t\t...internal,\n\t\tgetInternalContext: () => internal\n\t};\n}\nfunction makeSingletonHighlighterCore(createHighlighter) {\n\tlet _shiki;\n\tasync function getSingletonHighlighterCore(options) {\n\t\tif (!_shiki) {\n\t\t\t_shiki = createHighlighter({\n\t\t\t\t...options,\n\t\t\t\tthemes: options.themes || [],\n\t\t\t\tlangs: options.langs || []\n\t\t\t});\n\t\t\treturn _shiki;\n\t\t} else {\n\t\t\tconst s = await _shiki;\n\t\t\tawait Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);\n\t\t\treturn s;\n\t\t}\n\t}\n\treturn getSingletonHighlighterCore;\n}\nconst getSingletonHighlighterCore = /* @__PURE__ */ makeSingletonHighlighterCore(createHighlighterCore);\n\n//#endregion\n//#region src/constructors/bundle-factory.ts\nfunction createBundledHighlighter(options) {\n\tconst bundledLanguages = options.langs;\n\tconst bundledThemes = options.themes;\n\tconst engine = options.engine;\n\tasync function createHighlighter(options) {\n\t\tfunction resolveLang(lang) {\n\t\t\tif (typeof lang === \"string\") {\n\t\t\t\tlang = options.langAlias?.[lang] || lang;\n\t\t\t\tif (isSpecialLang(lang)) return [];\n\t\t\t\tconst bundle = bundledLanguages[lang];\n\t\t\t\tif (!bundle) throw new ShikiError$1(`Language \\`${lang}\\` is not included in this bundle. You may want to load it from external source.`);\n\t\t\t\treturn bundle;\n\t\t\t}\n\t\t\treturn lang;\n\t\t}\n\t\tfunction resolveTheme(theme) {\n\t\t\tif (isSpecialTheme(theme)) return \"none\";\n\t\t\tif (typeof theme === \"string\") {\n\t\t\t\tconst bundle = bundledThemes[theme];\n\t\t\t\tif (!bundle) throw new ShikiError$1(`Theme \\`${theme}\\` is not included in this bundle. You may want to load it from external source.`);\n\t\t\t\treturn bundle;\n\t\t\t}\n\t\t\treturn theme;\n\t\t}\n\t\tconst _themes = (options.themes ?? []).map((i) => resolveTheme(i));\n\t\tconst langs = (options.langs ?? []).map((i) => resolveLang(i));\n\t\tconst core = await createHighlighterCore({\n\t\t\tengine: options.engine ?? engine(),\n\t\t\t...options,\n\t\t\tthemes: _themes,\n\t\t\tlangs\n\t\t});\n\t\treturn {\n\t\t\t...core,\n\t\t\tloadLanguage(...langs) {\n\t\t\t\treturn core.loadLanguage(...langs.map(resolveLang));\n\t\t\t},\n\t\t\tloadTheme(...themes) {\n\t\t\t\treturn core.loadTheme(...themes.map(resolveTheme));\n\t\t\t},\n\t\t\tgetBundledLanguages() {\n\t\t\t\treturn bundledLanguages;\n\t\t\t},\n\t\t\tgetBundledThemes() {\n\t\t\t\treturn bundledThemes;\n\t\t\t}\n\t\t};\n\t}\n\treturn createHighlighter;\n}\nfunction makeSingletonHighlighter(createHighlighter) {\n\tlet _shiki;\n\tasync function getSingletonHighlighter(options = {}) {\n\t\tif (!_shiki) {\n\t\t\t_shiki = createHighlighter({\n\t\t\t\t...options,\n\t\t\t\tthemes: [],\n\t\t\t\tlangs: []\n\t\t\t});\n\t\t\tconst s = await _shiki;\n\t\t\tawait Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);\n\t\t\treturn s;\n\t\t} else {\n\t\t\tconst s = await _shiki;\n\t\t\tawait Promise.all([s.loadTheme(...options.themes || []), s.loadLanguage(...options.langs || [])]);\n\t\t\treturn s;\n\t\t}\n\t}\n\treturn getSingletonHighlighter;\n}\nfunction createSingletonShorthands(createHighlighter, config) {\n\tconst getSingletonHighlighter = makeSingletonHighlighter(createHighlighter);\n\tasync function get(code, options) {\n\t\tconst shiki = await getSingletonHighlighter({\n\t\t\tlangs: [options.lang],\n\t\t\tthemes: \"theme\" in options ? [options.theme] : Object.values(options.themes)\n\t\t});\n\t\tconst langs = await config?.guessEmbeddedLanguages?.(code, options.lang, shiki);\n\t\tif (langs) await shiki.loadLanguage(...langs);\n\t\treturn shiki;\n\t}\n\treturn {\n\t\tgetSingletonHighlighter(options) {\n\t\t\treturn getSingletonHighlighter(options);\n\t\t},\n\t\tasync codeToHtml(code, options) {\n\t\t\treturn (await get(code, options)).codeToHtml(code, options);\n\t\t},\n\t\tasync codeToHast(code, options) {\n\t\t\treturn (await get(code, options)).codeToHast(code, options);\n\t\t},\n\t\tasync codeToTokens(code, options) {\n\t\t\treturn (await get(code, options)).codeToTokens(code, options);\n\t\t},\n\t\tasync codeToTokensBase(code, options) {\n\t\t\treturn (await get(code, options)).codeToTokensBase(code, options);\n\t\t},\n\t\tasync codeToTokensWithThemes(code, options) {\n\t\t\treturn (await get(code, options)).codeToTokensWithThemes(code, options);\n\t\t},\n\t\tasync getLastGrammarState(code, options) {\n\t\t\treturn (await getSingletonHighlighter({\n\t\t\t\tlangs: [options.lang],\n\t\t\t\tthemes: [options.theme]\n\t\t\t})).getLastGrammarState(code, options);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region src/theme-css-variables.ts\n/**\n* A factory function to create a css-variable-based theme\n*\n* @see https://shiki.style/guide/theme-colors#css-variables-theme\n*/\nfunction createCssVariablesTheme(options = {}) {\n\tconst { name = \"css-variables\", variablePrefix = \"--shiki-\", fontStyle = true } = options;\n\tconst variable = (name) => {\n\t\tif (options.variableDefaults?.[name]) return `var(${variablePrefix}${name}, ${options.variableDefaults[name]})`;\n\t\treturn `var(${variablePrefix}${name})`;\n\t};\n\tconst theme = {\n\t\tname,\n\t\ttype: \"dark\",\n\t\tcolors: {\n\t\t\t\"editor.foreground\": variable(\"foreground\"),\n\t\t\t\"editor.background\": variable(\"background\"),\n\t\t\t\"terminal.ansiBlack\": variable(\"ansi-black\"),\n\t\t\t\"terminal.ansiRed\": variable(\"ansi-red\"),\n\t\t\t\"terminal.ansiGreen\": variable(\"ansi-green\"),\n\t\t\t\"terminal.ansiYellow\": variable(\"ansi-yellow\"),\n\t\t\t\"terminal.ansiBlue\": variable(\"ansi-blue\"),\n\t\t\t\"terminal.ansiMagenta\": variable(\"ansi-magenta\"),\n\t\t\t\"terminal.ansiCyan\": variable(\"ansi-cyan\"),\n\t\t\t\"terminal.ansiWhite\": variable(\"ansi-white\"),\n\t\t\t\"terminal.ansiBrightBlack\": variable(\"ansi-bright-black\"),\n\t\t\t\"terminal.ansiBrightRed\": variable(\"ansi-bright-red\"),\n\t\t\t\"terminal.ansiBrightGreen\": variable(\"ansi-bright-green\"),\n\t\t\t\"terminal.ansiBrightYellow\": variable(\"ansi-bright-yellow\"),\n\t\t\t\"terminal.ansiBrightBlue\": variable(\"ansi-bright-blue\"),\n\t\t\t\"terminal.ansiBrightMagenta\": variable(\"ansi-bright-magenta\"),\n\t\t\t\"terminal.ansiBrightCyan\": variable(\"ansi-bright-cyan\"),\n\t\t\t\"terminal.ansiBrightWhite\": variable(\"ansi-bright-white\")\n\t\t},\n\t\ttokenColors: [\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"keyword.operator.accessor\",\n\t\t\t\t\t\"meta.group.braces.round.function.arguments\",\n\t\t\t\t\t\"meta.template.expression\",\n\t\t\t\t\t\"markup.fenced_code meta.embedded.block\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"foreground\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: \"emphasis\",\n\t\t\t\tsettings: { fontStyle: \"italic\" }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"strong\",\n\t\t\t\t\t\"markup.heading.markdown\",\n\t\t\t\t\t\"markup.bold.markdown\"\n\t\t\t\t],\n\t\t\t\tsettings: { fontStyle: \"bold\" }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"markup.italic.markdown\"],\n\t\t\t\tsettings: { fontStyle: \"italic\" }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: \"meta.link.inline.markdown\",\n\t\t\t\tsettings: {\n\t\t\t\t\tfontStyle: \"underline\",\n\t\t\t\t\tforeground: variable(\"token-link\")\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"string\",\n\t\t\t\t\t\"markup.fenced_code\",\n\t\t\t\t\t\"markup.inline\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-string\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"comment\", \"string.quoted.docstring.multi\"],\n\t\t\t\tsettings: { foreground: variable(\"token-comment\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"constant.numeric\",\n\t\t\t\t\t\"constant.language\",\n\t\t\t\t\t\"constant.other.placeholder\",\n\t\t\t\t\t\"constant.character.format.placeholder\",\n\t\t\t\t\t\"variable.language.this\",\n\t\t\t\t\t\"variable.other.object\",\n\t\t\t\t\t\"variable.other.class\",\n\t\t\t\t\t\"variable.other.constant\",\n\t\t\t\t\t\"meta.property-name\",\n\t\t\t\t\t\"meta.property-value\",\n\t\t\t\t\t\"support\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-constant\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"keyword\",\n\t\t\t\t\t\"storage.modifier\",\n\t\t\t\t\t\"storage.type\",\n\t\t\t\t\t\"storage.control.clojure\",\n\t\t\t\t\t\"entity.name.function.clojure\",\n\t\t\t\t\t\"entity.name.tag.yaml\",\n\t\t\t\t\t\"support.function.node\",\n\t\t\t\t\t\"support.type.property-name.json\",\n\t\t\t\t\t\"punctuation.separator.key-value\",\n\t\t\t\t\t\"punctuation.definition.template-expression\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-keyword\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: \"variable.parameter.function\",\n\t\t\t\tsettings: { foreground: variable(\"token-parameter\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"support.function\",\n\t\t\t\t\t\"entity.name.type\",\n\t\t\t\t\t\"entity.other.inherited-class\",\n\t\t\t\t\t\"meta.function-call\",\n\t\t\t\t\t\"meta.instance.constructor\",\n\t\t\t\t\t\"entity.other.attribute-name\",\n\t\t\t\t\t\"entity.name.function\",\n\t\t\t\t\t\"constant.keyword.clojure\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-function\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"entity.name.tag\",\n\t\t\t\t\t\"string.quoted\",\n\t\t\t\t\t\"string.regexp\",\n\t\t\t\t\t\"string.interpolated\",\n\t\t\t\t\t\"string.template\",\n\t\t\t\t\t\"string.unquoted.plain.out.yaml\",\n\t\t\t\t\t\"keyword.other.template\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-string-expression\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"punctuation.definition.arguments\",\n\t\t\t\t\t\"punctuation.definition.dict\",\n\t\t\t\t\t\"punctuation.separator\",\n\t\t\t\t\t\"meta.function-call.arguments\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-punctuation\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"markup.underline.link\", \"punctuation.definition.metadata.markdown\"],\n\t\t\t\tsettings: { foreground: variable(\"token-link\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"beginning.punctuation.definition.list.markdown\"],\n\t\t\t\tsettings: { foreground: variable(\"token-string\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"punctuation.definition.string.begin.markdown\",\n\t\t\t\t\t\"punctuation.definition.string.end.markdown\",\n\t\t\t\t\t\"string.other.link.title.markdown\",\n\t\t\t\t\t\"string.other.link.description.markdown\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-keyword\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"markup.inserted\",\n\t\t\t\t\t\"meta.diff.header.to-file\",\n\t\t\t\t\t\"punctuation.definition.inserted\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-inserted\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\n\t\t\t\t\t\"markup.deleted\",\n\t\t\t\t\t\"meta.diff.header.from-file\",\n\t\t\t\t\t\"punctuation.definition.deleted\"\n\t\t\t\t],\n\t\t\t\tsettings: { foreground: variable(\"token-deleted\") }\n\t\t\t},\n\t\t\t{\n\t\t\t\tscope: [\"markup.changed\", \"punctuation.definition.changed\"],\n\t\t\t\tsettings: { foreground: variable(\"token-changed\") }\n\t\t\t}\n\t\t]\n\t};\n\tif (!fontStyle) theme.tokenColors = theme.tokenColors?.map((tokenColor) => {\n\t\tif (tokenColor.settings?.fontStyle) delete tokenColor.settings.fontStyle;\n\t\treturn tokenColor;\n\t});\n\treturn theme;\n}\n\n//#endregion\nexport { ShikiError, addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createBundledHighlighter, createCssVariablesTheme, createHighlighterCore, createHighlighterCoreSync, createPositionConverter, createShikiInternal, createShikiInternalSync, createShikiPrimitive, createShikiPrimitiveAsync, createSingletonShorthands, flatTokenVariants, getLastGrammarState, getSingletonHighlighterCore, getTokenStyleObject, guessEmbeddedLanguages, hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations };","var has = Object.prototype.hasOwnProperty;\n\nfunction find(iter, tar, key) {\n\tfor (key of iter.keys()) {\n\t\tif (dequal(key, tar)) return key;\n\t}\n}\n\nexport function dequal(foo, bar) {\n\tvar ctor, len, tmp;\n\tif (foo === bar) return true;\n\n\tif (foo && bar && (ctor=foo.constructor) === bar.constructor) {\n\t\tif (ctor === Date) return foo.getTime() === bar.getTime();\n\t\tif (ctor === RegExp) return foo.toString() === bar.toString();\n\n\t\tif (ctor === Array) {\n\t\t\tif ((len=foo.length) === bar.length) {\n\t\t\t\twhile (len-- && dequal(foo[len], bar[len]));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (ctor === Set) {\n\t\t\tif (foo.size !== bar.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (len of foo) {\n\t\t\t\ttmp = len;\n\t\t\t\tif (tmp && typeof tmp === 'object') {\n\t\t\t\t\ttmp = find(bar, tmp);\n\t\t\t\t\tif (!tmp) return false;\n\t\t\t\t}\n\t\t\t\tif (!bar.has(tmp)) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (ctor === Map) {\n\t\t\tif (foo.size !== bar.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (len of foo) {\n\t\t\t\ttmp = len[0];\n\t\t\t\tif (tmp && typeof tmp === 'object') {\n\t\t\t\t\ttmp = find(bar, tmp);\n\t\t\t\t\tif (!tmp) return false;\n\t\t\t\t}\n\t\t\t\tif (!dequal(len[1], bar.get(tmp))) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (ctor === ArrayBuffer) {\n\t\t\tfoo = new Uint8Array(foo);\n\t\t\tbar = new Uint8Array(bar);\n\t\t} else if (ctor === DataView) {\n\t\t\tif ((len=foo.byteLength) === bar.byteLength) {\n\t\t\t\twhile (len-- && foo.getInt8(len) === bar.getInt8(len));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (ArrayBuffer.isView(foo)) {\n\t\t\tif ((len=foo.byteLength) === bar.byteLength) {\n\t\t\t\twhile (len-- && foo[len] === bar[len]);\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (!ctor || typeof foo === 'object') {\n\t\t\tlen = 0;\n\t\t\tfor (ctor in foo) {\n\t\t\t\tif (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;\n\t\t\t\tif (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;\n\t\t\t}\n\t\t\treturn Object.keys(bar).length === len;\n\t\t}\n\t}\n\n\treturn foo !== foo && bar !== bar;\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","// src/lib/hook.ts\nimport {\n useEffect,\n useMemo,\n useRef as useRef2,\n useState\n} from \"react\";\nimport { jsx, jsxs, Fragment } from \"react/jsx-runtime\";\nimport { toJsxRuntime } from \"hast-util-to-jsx-runtime\";\nimport { guessEmbeddedLanguages } from \"shiki/core\";\n\n// src/lib/utils.ts\nimport { useRef } from \"react\";\nimport { dequal } from \"dequal\";\nvar useStableValue = (value) => {\n const ref = useRef(value);\n if (value !== ref.current && !dequal(value, ref.current)) {\n ref.current = value;\n }\n return ref.current;\n};\nvar throttleHighlighting = (performHighlight, timeoutControl, throttleMs) => {\n const now = Date.now();\n clearTimeout(timeoutControl.current.timeoutId);\n const delay = Math.max(0, timeoutControl.current.nextAllowedTime - now);\n timeoutControl.current.timeoutId = setTimeout(() => {\n performHighlight().catch(console.error);\n timeoutControl.current.nextAllowedTime = now + throttleMs;\n }, delay);\n};\n\n// src/lib/language.ts\nimport { isSpecialLang } from \"shiki/core\";\nvar FALLBACK_LANGUAGE = \"plaintext\";\nvar toArray = (value) => value == null ? [] : Array.isArray(value) ? value : [value];\nvar languageKey = (lang) => {\n if (lang == null) return null;\n if (typeof lang === \"string\") return `s:${lang}`;\n return `o:${lang.name}::${lang.scopeName}`;\n};\nvar dedupeLanguages = (langs) => {\n const seen = /* @__PURE__ */ new Set();\n const deduped = [];\n for (const lang of langs) {\n const key = languageKey(lang);\n if (key == null || seen.has(key)) continue;\n seen.add(key);\n deduped.push(lang);\n }\n return deduped;\n};\nvar isLoadableLanguage = (lang, bundledLanguages) => {\n if (lang == null) return false;\n if (typeof lang === \"string\") return lang in bundledLanguages;\n return typeof lang.name === \"string\" && typeof lang.scopeName === \"string\";\n};\nvar resolveLoadedLanguage = (languageId, loadedLanguages) => isSpecialLang(languageId) || loadedLanguages.includes(languageId) ? languageId : FALLBACK_LANGUAGE;\nvar resolveLanguage = (lang, customLanguages, langAliases, preloadLanguages) => {\n const customLangs = toArray(customLanguages);\n const preloadLangs = toArray(preloadLanguages);\n const customMatchPool = [...customLangs, ...preloadLangs];\n let languageId = FALLBACK_LANGUAGE;\n let primaryLang;\n if (lang == null || typeof lang === \"string\" && !lang.trim()) {\n return {\n languageId,\n langsToLoad: dedupeLanguages([...preloadLangs, ...customLangs])\n };\n }\n if (typeof lang === \"object\") {\n languageId = lang.name;\n primaryLang = lang;\n } else {\n const lowerLang = lang.toLowerCase();\n const matches = (str) => str?.toLowerCase() === lowerLang;\n const customMatch = customMatchPool.find(\n (candidate) => typeof candidate === \"object\" && candidate != null && !!(matches(candidate.name) || matches(candidate.scopeName) || matches(candidate.scopeName?.split(\".\").pop()) || candidate.aliases?.some(matches) || candidate.fileTypes?.some(matches))\n );\n if (customMatch) {\n languageId = customMatch.name || lang;\n primaryLang = customMatch;\n } else if (langAliases?.[lang]) {\n languageId = langAliases[lang];\n primaryLang = langAliases[lang];\n } else {\n languageId = lang;\n primaryLang = lang;\n }\n }\n return {\n languageId,\n langsToLoad: dedupeLanguages([\n primaryLang,\n ...preloadLangs,\n ...customLangs\n ])\n };\n};\n\n// src/lib/theme.ts\nvar isTextmateTheme = (value) => typeof value === \"object\" && value !== null && \"tokenColors\" in value && Array.isArray(value.tokenColors);\nfunction resolveTheme(themeInput) {\n const inputIsTextmateTheme = isTextmateTheme(themeInput);\n const isMultiThemeConfig = typeof themeInput === \"object\" && themeInput !== null && !inputIsTextmateTheme;\n const validMultiThemeObj = typeof themeInput === \"object\" && themeInput !== null && !inputIsTextmateTheme && Object.entries(themeInput).some(\n ([key, value]) => key.trim() !== \"\" && (typeof value === \"string\" && value.trim() !== \"\" || isTextmateTheme(value))\n );\n if (isMultiThemeConfig) {\n const themeId = validMultiThemeObj ? `multi-${Object.values(themeInput).map(\n (theme) => (typeof theme === \"string\" ? theme : theme?.name) || \"custom\"\n ).sort().join(\"-\")}` : \"multi-default\";\n return {\n isMultiTheme: true,\n themeId,\n multiTheme: validMultiThemeObj ? themeInput : null,\n themesToLoad: validMultiThemeObj ? Object.values(themeInput) : []\n };\n }\n return {\n isMultiTheme: false,\n themeId: typeof themeInput === \"string\" ? themeInput : themeInput?.name || \"custom\",\n singleTheme: themeInput,\n themesToLoad: [themeInput]\n };\n}\n\n// src/lib/transformers.ts\nfunction lineNumbersTransformer(startLine = 1) {\n return {\n name: \"react-shiki:line-numbers\",\n code(node) {\n this.addClassToHast(node, \"has-line-numbers\");\n if (startLine !== 1) {\n const existingStyle = node.properties?.style || \"\";\n const newStyle = existingStyle ? `${existingStyle}; --line-start: ${startLine}` : `--line-start: ${startLine}`;\n node.properties = {\n ...node.properties,\n style: newStyle\n };\n }\n },\n line(node) {\n this.addClassToHast(node, \"line-numbers\");\n return node;\n }\n };\n}\n\n// src/lib/options.ts\nvar DEFAULT_THEMES = {\n light: \"github-light\",\n dark: \"github-dark\"\n};\nvar buildThemeOptions = (resolvedTheme, options) => {\n if (resolvedTheme.isMultiTheme) {\n return {\n themes: resolvedTheme.multiTheme ?? DEFAULT_THEMES,\n defaultColor: options.defaultColor,\n cssVariablePrefix: options.cssVariablePrefix\n };\n }\n return {\n theme: resolvedTheme.singleTheme ?? DEFAULT_THEMES.dark\n };\n};\nvar buildTransformers = (options) => {\n const transformers = [...options.transformers || []];\n if (options.showLineNumbers) {\n transformers.push(lineNumbersTransformer(options.startingLineNumber));\n }\n return transformers;\n};\nvar buildShikiOptions = ({\n languageId,\n resolvedTheme,\n options\n}) => {\n const {\n defaultColor: _defaultColor,\n cssVariablePrefix: _cssVariablePrefix,\n showLineNumbers: _showLineNumbers,\n startingLineNumber: _startingLineNumber,\n transformers: _transformers,\n ...restOptions\n } = options;\n return {\n lang: languageId,\n ...buildThemeOptions(resolvedTheme, options),\n ...restOptions,\n transformers: buildTransformers(options)\n };\n};\n\n// src/lib/hook.ts\nvar getEmbeddedLanguages = (code, languageId, highlighter) => {\n const bundled = highlighter.getBundledLanguages();\n return guessEmbeddedLanguages(code, languageId).flatMap(\n (language) => bundled[language] ?? []\n );\n};\nvar useShikiHighlighter = (code, lang, themeInput, options = {}, highlighterFactory) => {\n const [highlightedCode, setHighlightedCode] = useState(null);\n const stableLang = useStableValue(lang);\n const stableTheme = useStableValue(themeInput);\n const stableOpts = useStableValue(options);\n const { languageId, langsToLoad } = useMemo(\n () => resolveLanguage(\n stableLang,\n stableOpts.customLanguages,\n stableOpts.langAlias,\n stableOpts.preloadLanguages\n ),\n [\n stableLang,\n stableOpts.customLanguages,\n stableOpts.preloadLanguages,\n stableOpts.langAlias\n ]\n );\n const resolvedTheme = useMemo(\n () => resolveTheme(stableTheme),\n [stableTheme]\n );\n const { themesToLoad } = resolvedTheme;\n const timeoutControl = useRef2({\n nextAllowedTime: 0,\n timeoutId: void 0\n });\n const shikiOptions = useMemo(\n () => buildShikiOptions({\n languageId,\n resolvedTheme,\n options: stableOpts\n }),\n [languageId, resolvedTheme, stableOpts]\n );\n useEffect(() => {\n let isMounted = true;\n const highlightCode = async () => {\n if (!languageId) return;\n const highlighter = stableOpts.highlighter ? stableOpts.highlighter : await highlighterFactory(\n langsToLoad,\n themesToLoad,\n stableOpts.engine\n );\n if (!stableOpts.highlighter) {\n const embedded = getEmbeddedLanguages(\n code,\n languageId,\n highlighter\n );\n if (embedded.length > 0) {\n await highlighter.loadLanguage(...embedded);\n }\n }\n const langToUse = resolveLoadedLanguage(\n languageId,\n highlighter.getLoadedLanguages()\n );\n const finalOptions = { ...shikiOptions, lang: langToUse };\n if (isMounted) {\n const output = stableOpts.outputFormat === \"html\" ? highlighter.codeToHtml(code, finalOptions) : toJsxRuntime(highlighter.codeToHast(code, finalOptions), {\n jsx,\n jsxs,\n Fragment\n });\n setHighlightedCode(output);\n }\n };\n const { delay } = stableOpts;\n if (delay) {\n throttleHighlighting(highlightCode, timeoutControl, delay);\n } else {\n highlightCode().catch(console.error);\n }\n return () => {\n isMounted = false;\n clearTimeout(timeoutControl.current.timeoutId);\n };\n }, [\n code,\n shikiOptions,\n stableOpts.delay,\n stableOpts.highlighter,\n langsToLoad,\n themesToLoad\n ]);\n return highlightedCode;\n};\n\n// src/lib/plugins.ts\nimport { visit } from \"unist-util-visit\";\nfunction rehypeInlineCodeProperty() {\n return (tree) => {\n visit(tree, \"element\", (node, _index, parent) => {\n if (node.tagName === \"code\" && parent.tagName !== \"pre\") {\n node.properties.inline = true;\n }\n });\n };\n}\nvar isInlineCode = (node) => {\n const textContent = (node.children || []).filter((child) => child.type === \"text\").map((child) => child.value).join(\"\");\n return !textContent.includes(\"\\n\");\n};\n\n// #style-inject:#style-inject\nfunction styleInject(css, { insertAt } = {}) {\n if (!css || typeof document === \"undefined\") return;\n const head = document.head || document.getElementsByTagName(\"head\")[0];\n const style = document.createElement(\"style\");\n style.type = \"text/css\";\n if (insertAt === \"top\") {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\n// src/lib/styles.css\nstyleInject(\".relative {\\n position: relative;\\n}\\n.defaultStyles pre {\\n overflow: auto;\\n border-radius: 0.5rem;\\n padding-left: 1.5rem;\\n padding-right: 1.5rem;\\n padding-top: 1.25rem;\\n padding-bottom: 1.25rem;\\n}\\n.languageLabel {\\n position: absolute;\\n right: 0.75rem;\\n top: 0.5rem;\\n font-family: monospace;\\n font-size: 0.75rem;\\n letter-spacing: -0.05em;\\n color: rgba(107, 114, 128, 0.85);\\n}\\n.line-numbers::before {\\n counter-increment: line-number;\\n content: counter(line-number);\\n display: inline-flex;\\n justify-content: flex-end;\\n align-items: flex-start;\\n box-sizing: content-box;\\n min-width: var(--line-numbers-width, 2ch);\\n padding-left: var(--line-numbers-padding-left, 2ch);\\n padding-right: var(--line-numbers-padding-right, 2ch);\\n color: var(--line-numbers-foreground, rgba(107, 114, 128, 0.6));\\n font-size: var(--line-numbers-font-size, inherit);\\n font-weight: var(--line-numbers-font-weight, inherit);\\n line-height: var(--line-numbers-line-height, inherit);\\n font-family: var(--line-numbers-font-family, inherit);\\n opacity: var(--line-numbers-opacity, 1);\\n user-select: none;\\n pointer-events: none;\\n}\\n.has-line-numbers {\\n counter-reset: line-number calc(var(--line-start, 1) - 1);\\n --line-numbers-foreground: rgba(107, 114, 128, 0.5);\\n --line-numbers-width: 2ch;\\n --line-numbers-padding-left: 0ch;\\n --line-numbers-padding-right: 2ch;\\n --line-numbers-font-size: inherit;\\n --line-numbers-font-weight: inherit;\\n --line-numbers-line-height: inherit;\\n --line-numbers-font-family: inherit;\\n --line-numbers-opacity: 1;\\n}\\n\");\n\n// src/lib/component.tsx\nimport { clsx } from \"clsx\";\nimport { forwardRef } from \"react\";\nimport { jsx as jsx2, jsxs as jsxs2 } from \"react/jsx-runtime\";\nvar createShikiHighlighterComponent = (useShikiHighlighterImpl) => {\n return forwardRef(\n ({\n language,\n theme,\n delay,\n transformers,\n defaultColor,\n cssVariablePrefix,\n addDefaultStyles = true,\n style,\n langStyle,\n className,\n langClassName,\n showLanguage = true,\n showLineNumbers = false,\n startingLineNumber = 1,\n children: code,\n as: Element = \"pre\",\n customLanguages,\n preloadLanguages,\n ...shikiOptions\n }, ref) => {\n const options = {\n delay,\n transformers,\n customLanguages,\n preloadLanguages,\n showLineNumbers,\n defaultColor,\n cssVariablePrefix,\n startingLineNumber,\n ...shikiOptions\n };\n const displayLanguageId = typeof language === \"object\" ? language.name || null : language?.trim() || null;\n const highlightedCode = useShikiHighlighterImpl(\n code,\n language,\n theme,\n options\n );\n const isHtmlOutput = typeof highlightedCode === \"string\";\n return /* @__PURE__ */ jsxs2(\n Element,\n {\n ref,\n \"data-testid\": \"shiki-container\",\n className: clsx(\n \"relative\",\n \"not-prose\",\n addDefaultStyles && \"defaultStyles\",\n className\n ),\n style,\n id: \"shiki-container\",\n children: [\n showLanguage && displayLanguageId ? /* @__PURE__ */ jsx2(\n \"span\",\n {\n className: clsx(\"languageLabel\", langClassName),\n style: langStyle,\n id: \"language-label\",\n children: displayLanguageId\n }\n ) : null,\n isHtmlOutput ? /* @__PURE__ */ jsx2(\"div\", { dangerouslySetInnerHTML: { __html: highlightedCode } }) : highlightedCode\n ]\n }\n );\n }\n );\n};\n\nexport {\n isLoadableLanguage,\n useShikiHighlighter,\n rehypeInlineCodeProperty,\n isInlineCode,\n createShikiHighlighterComponent\n};\n//# sourceMappingURL=chunk-QPJZGYHO.js.map","//#region src/langs-bundle-full.ts\nconst bundledLanguagesInfo = [\n\t{\n\t\t\"id\": \"abap\",\n\t\t\"name\": \"ABAP\",\n\t\t\"import\": (() => import(\"@shikijs/langs/abap\"))\n\t},\n\t{\n\t\t\"id\": \"actionscript-3\",\n\t\t\"name\": \"ActionScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/actionscript-3\"))\n\t},\n\t{\n\t\t\"id\": \"ada\",\n\t\t\"name\": \"Ada\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ada\"))\n\t},\n\t{\n\t\t\"id\": \"angular-html\",\n\t\t\"name\": \"Angular HTML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/angular-html\"))\n\t},\n\t{\n\t\t\"id\": \"angular-ts\",\n\t\t\"name\": \"Angular TypeScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/angular-ts\"))\n\t},\n\t{\n\t\t\"id\": \"apache\",\n\t\t\"name\": \"Apache Conf\",\n\t\t\"import\": (() => import(\"@shikijs/langs/apache\"))\n\t},\n\t{\n\t\t\"id\": \"apex\",\n\t\t\"name\": \"Apex\",\n\t\t\"import\": (() => import(\"@shikijs/langs/apex\"))\n\t},\n\t{\n\t\t\"id\": \"apl\",\n\t\t\"name\": \"APL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/apl\"))\n\t},\n\t{\n\t\t\"id\": \"applescript\",\n\t\t\"name\": \"AppleScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/applescript\"))\n\t},\n\t{\n\t\t\"id\": \"ara\",\n\t\t\"name\": \"Ara\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ara\"))\n\t},\n\t{\n\t\t\"id\": \"asciidoc\",\n\t\t\"name\": \"AsciiDoc\",\n\t\t\"aliases\": [\"adoc\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/asciidoc\"))\n\t},\n\t{\n\t\t\"id\": \"asm\",\n\t\t\"name\": \"Assembly\",\n\t\t\"import\": (() => import(\"@shikijs/langs/asm\"))\n\t},\n\t{\n\t\t\"id\": \"astro\",\n\t\t\"name\": \"Astro\",\n\t\t\"import\": (() => import(\"@shikijs/langs/astro\"))\n\t},\n\t{\n\t\t\"id\": \"awk\",\n\t\t\"name\": \"AWK\",\n\t\t\"import\": (() => import(\"@shikijs/langs/awk\"))\n\t},\n\t{\n\t\t\"id\": \"ballerina\",\n\t\t\"name\": \"Ballerina\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ballerina\"))\n\t},\n\t{\n\t\t\"id\": \"bat\",\n\t\t\"name\": \"Batch File\",\n\t\t\"aliases\": [\"batch\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/bat\"))\n\t},\n\t{\n\t\t\"id\": \"beancount\",\n\t\t\"name\": \"Beancount\",\n\t\t\"import\": (() => import(\"@shikijs/langs/beancount\"))\n\t},\n\t{\n\t\t\"id\": \"berry\",\n\t\t\"name\": \"Berry\",\n\t\t\"aliases\": [\"be\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/berry\"))\n\t},\n\t{\n\t\t\"id\": \"bibtex\",\n\t\t\"name\": \"BibTeX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/bibtex\"))\n\t},\n\t{\n\t\t\"id\": \"bicep\",\n\t\t\"name\": \"Bicep\",\n\t\t\"import\": (() => import(\"@shikijs/langs/bicep\"))\n\t},\n\t{\n\t\t\"id\": \"bird2\",\n\t\t\"name\": \"BIRD2 Configuration\",\n\t\t\"aliases\": [\"bird\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/bird2\"))\n\t},\n\t{\n\t\t\"id\": \"blade\",\n\t\t\"name\": \"Blade\",\n\t\t\"import\": (() => import(\"@shikijs/langs/blade\"))\n\t},\n\t{\n\t\t\"id\": \"bsl\",\n\t\t\"name\": \"1C (Enterprise)\",\n\t\t\"aliases\": [\"1c\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/bsl\"))\n\t},\n\t{\n\t\t\"id\": \"c\",\n\t\t\"name\": \"C\",\n\t\t\"import\": (() => import(\"@shikijs/langs/c\"))\n\t},\n\t{\n\t\t\"id\": \"c3\",\n\t\t\"name\": \"C3\",\n\t\t\"import\": (() => import(\"@shikijs/langs/c3\"))\n\t},\n\t{\n\t\t\"id\": \"cadence\",\n\t\t\"name\": \"Cadence\",\n\t\t\"aliases\": [\"cdc\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/cadence\"))\n\t},\n\t{\n\t\t\"id\": \"cairo\",\n\t\t\"name\": \"Cairo\",\n\t\t\"import\": (() => import(\"@shikijs/langs/cairo\"))\n\t},\n\t{\n\t\t\"id\": \"clarity\",\n\t\t\"name\": \"Clarity\",\n\t\t\"import\": (() => import(\"@shikijs/langs/clarity\"))\n\t},\n\t{\n\t\t\"id\": \"clojure\",\n\t\t\"name\": \"Clojure\",\n\t\t\"aliases\": [\"clj\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/clojure\"))\n\t},\n\t{\n\t\t\"id\": \"cmake\",\n\t\t\"name\": \"CMake\",\n\t\t\"import\": (() => import(\"@shikijs/langs/cmake\"))\n\t},\n\t{\n\t\t\"id\": \"cobol\",\n\t\t\"name\": \"COBOL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/cobol\"))\n\t},\n\t{\n\t\t\"id\": \"codeowners\",\n\t\t\"name\": \"CODEOWNERS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/codeowners\"))\n\t},\n\t{\n\t\t\"id\": \"codeql\",\n\t\t\"name\": \"CodeQL\",\n\t\t\"aliases\": [\"ql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/codeql\"))\n\t},\n\t{\n\t\t\"id\": \"coffee\",\n\t\t\"name\": \"CoffeeScript\",\n\t\t\"aliases\": [\"coffeescript\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/coffee\"))\n\t},\n\t{\n\t\t\"id\": \"common-lisp\",\n\t\t\"name\": \"Common Lisp\",\n\t\t\"aliases\": [\"lisp\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/common-lisp\"))\n\t},\n\t{\n\t\t\"id\": \"coq\",\n\t\t\"name\": \"Coq\",\n\t\t\"import\": (() => import(\"@shikijs/langs/coq\"))\n\t},\n\t{\n\t\t\"id\": \"cpp\",\n\t\t\"name\": \"C++\",\n\t\t\"aliases\": [\"c++\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/cpp\"))\n\t},\n\t{\n\t\t\"id\": \"crystal\",\n\t\t\"name\": \"Crystal\",\n\t\t\"import\": (() => import(\"@shikijs/langs/crystal\"))\n\t},\n\t{\n\t\t\"id\": \"csharp\",\n\t\t\"name\": \"C#\",\n\t\t\"aliases\": [\"c#\", \"cs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/csharp\"))\n\t},\n\t{\n\t\t\"id\": \"css\",\n\t\t\"name\": \"CSS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/css\"))\n\t},\n\t{\n\t\t\"id\": \"csv\",\n\t\t\"name\": \"CSV\",\n\t\t\"import\": (() => import(\"@shikijs/langs/csv\"))\n\t},\n\t{\n\t\t\"id\": \"cue\",\n\t\t\"name\": \"CUE\",\n\t\t\"import\": (() => import(\"@shikijs/langs/cue\"))\n\t},\n\t{\n\t\t\"id\": \"cypher\",\n\t\t\"name\": \"Cypher\",\n\t\t\"aliases\": [\"cql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/cypher\"))\n\t},\n\t{\n\t\t\"id\": \"d\",\n\t\t\"name\": \"D\",\n\t\t\"import\": (() => import(\"@shikijs/langs/d\"))\n\t},\n\t{\n\t\t\"id\": \"dart\",\n\t\t\"name\": \"Dart\",\n\t\t\"import\": (() => import(\"@shikijs/langs/dart\"))\n\t},\n\t{\n\t\t\"id\": \"dax\",\n\t\t\"name\": \"DAX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/dax\"))\n\t},\n\t{\n\t\t\"id\": \"desktop\",\n\t\t\"name\": \"Desktop\",\n\t\t\"import\": (() => import(\"@shikijs/langs/desktop\"))\n\t},\n\t{\n\t\t\"id\": \"diff\",\n\t\t\"name\": \"Diff\",\n\t\t\"import\": (() => import(\"@shikijs/langs/diff\"))\n\t},\n\t{\n\t\t\"id\": \"docker\",\n\t\t\"name\": \"Dockerfile\",\n\t\t\"aliases\": [\"dockerfile\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/docker\"))\n\t},\n\t{\n\t\t\"id\": \"dotenv\",\n\t\t\"name\": \"dotEnv\",\n\t\t\"import\": (() => import(\"@shikijs/langs/dotenv\"))\n\t},\n\t{\n\t\t\"id\": \"dream-maker\",\n\t\t\"name\": \"Dream Maker\",\n\t\t\"import\": (() => import(\"@shikijs/langs/dream-maker\"))\n\t},\n\t{\n\t\t\"id\": \"edge\",\n\t\t\"name\": \"Edge\",\n\t\t\"import\": (() => import(\"@shikijs/langs/edge\"))\n\t},\n\t{\n\t\t\"id\": \"elixir\",\n\t\t\"name\": \"Elixir\",\n\t\t\"import\": (() => import(\"@shikijs/langs/elixir\"))\n\t},\n\t{\n\t\t\"id\": \"elm\",\n\t\t\"name\": \"Elm\",\n\t\t\"import\": (() => import(\"@shikijs/langs/elm\"))\n\t},\n\t{\n\t\t\"id\": \"emacs-lisp\",\n\t\t\"name\": \"Emacs Lisp\",\n\t\t\"aliases\": [\"elisp\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/emacs-lisp\"))\n\t},\n\t{\n\t\t\"id\": \"erb\",\n\t\t\"name\": \"ERB\",\n\t\t\"import\": (() => import(\"@shikijs/langs/erb\"))\n\t},\n\t{\n\t\t\"id\": \"erlang\",\n\t\t\"name\": \"Erlang\",\n\t\t\"aliases\": [\"erl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/erlang\"))\n\t},\n\t{\n\t\t\"id\": \"fennel\",\n\t\t\"name\": \"Fennel\",\n\t\t\"import\": (() => import(\"@shikijs/langs/fennel\"))\n\t},\n\t{\n\t\t\"id\": \"fish\",\n\t\t\"name\": \"Fish\",\n\t\t\"import\": (() => import(\"@shikijs/langs/fish\"))\n\t},\n\t{\n\t\t\"id\": \"fluent\",\n\t\t\"name\": \"Fluent\",\n\t\t\"aliases\": [\"ftl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/fluent\"))\n\t},\n\t{\n\t\t\"id\": \"fortran-fixed-form\",\n\t\t\"name\": \"Fortran (Fixed Form)\",\n\t\t\"aliases\": [\n\t\t\t\"f\",\n\t\t\t\"for\",\n\t\t\t\"f77\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/fortran-fixed-form\"))\n\t},\n\t{\n\t\t\"id\": \"fortran-free-form\",\n\t\t\"name\": \"Fortran (Free Form)\",\n\t\t\"aliases\": [\n\t\t\t\"f90\",\n\t\t\t\"f95\",\n\t\t\t\"f03\",\n\t\t\t\"f08\",\n\t\t\t\"f18\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/fortran-free-form\"))\n\t},\n\t{\n\t\t\"id\": \"fsharp\",\n\t\t\"name\": \"F#\",\n\t\t\"aliases\": [\"f#\", \"fs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/fsharp\"))\n\t},\n\t{\n\t\t\"id\": \"gdresource\",\n\t\t\"name\": \"GDResource\",\n\t\t\"aliases\": [\"tscn\", \"tres\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/gdresource\"))\n\t},\n\t{\n\t\t\"id\": \"gdscript\",\n\t\t\"name\": \"GDScript\",\n\t\t\"aliases\": [\"gd\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/gdscript\"))\n\t},\n\t{\n\t\t\"id\": \"gdshader\",\n\t\t\"name\": \"GDShader\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gdshader\"))\n\t},\n\t{\n\t\t\"id\": \"genie\",\n\t\t\"name\": \"Genie\",\n\t\t\"import\": (() => import(\"@shikijs/langs/genie\"))\n\t},\n\t{\n\t\t\"id\": \"gherkin\",\n\t\t\"name\": \"Gherkin\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gherkin\"))\n\t},\n\t{\n\t\t\"id\": \"git-commit\",\n\t\t\"name\": \"Git Commit Message\",\n\t\t\"import\": (() => import(\"@shikijs/langs/git-commit\"))\n\t},\n\t{\n\t\t\"id\": \"git-rebase\",\n\t\t\"name\": \"Git Rebase Message\",\n\t\t\"import\": (() => import(\"@shikijs/langs/git-rebase\"))\n\t},\n\t{\n\t\t\"id\": \"gleam\",\n\t\t\"name\": \"Gleam\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gleam\"))\n\t},\n\t{\n\t\t\"id\": \"glimmer-js\",\n\t\t\"name\": \"Glimmer JS\",\n\t\t\"aliases\": [\"gjs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/glimmer-js\"))\n\t},\n\t{\n\t\t\"id\": \"glimmer-ts\",\n\t\t\"name\": \"Glimmer TS\",\n\t\t\"aliases\": [\"gts\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/glimmer-ts\"))\n\t},\n\t{\n\t\t\"id\": \"glsl\",\n\t\t\"name\": \"GLSL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/glsl\"))\n\t},\n\t{\n\t\t\"id\": \"gn\",\n\t\t\"name\": \"GN\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gn\"))\n\t},\n\t{\n\t\t\"id\": \"gnuplot\",\n\t\t\"name\": \"Gnuplot\",\n\t\t\"import\": (() => import(\"@shikijs/langs/gnuplot\"))\n\t},\n\t{\n\t\t\"id\": \"go\",\n\t\t\"name\": \"Go\",\n\t\t\"import\": (() => import(\"@shikijs/langs/go\"))\n\t},\n\t{\n\t\t\"id\": \"graphql\",\n\t\t\"name\": \"GraphQL\",\n\t\t\"aliases\": [\"gql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/graphql\"))\n\t},\n\t{\n\t\t\"id\": \"groovy\",\n\t\t\"name\": \"Groovy\",\n\t\t\"import\": (() => import(\"@shikijs/langs/groovy\"))\n\t},\n\t{\n\t\t\"id\": \"hack\",\n\t\t\"name\": \"Hack\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hack\"))\n\t},\n\t{\n\t\t\"id\": \"haml\",\n\t\t\"name\": \"Ruby Haml\",\n\t\t\"import\": (() => import(\"@shikijs/langs/haml\"))\n\t},\n\t{\n\t\t\"id\": \"handlebars\",\n\t\t\"name\": \"Handlebars\",\n\t\t\"aliases\": [\"hbs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/handlebars\"))\n\t},\n\t{\n\t\t\"id\": \"haskell\",\n\t\t\"name\": \"Haskell\",\n\t\t\"aliases\": [\"hs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/haskell\"))\n\t},\n\t{\n\t\t\"id\": \"haxe\",\n\t\t\"name\": \"Haxe\",\n\t\t\"import\": (() => import(\"@shikijs/langs/haxe\"))\n\t},\n\t{\n\t\t\"id\": \"hcl\",\n\t\t\"name\": \"HashiCorp HCL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hcl\"))\n\t},\n\t{\n\t\t\"id\": \"hjson\",\n\t\t\"name\": \"Hjson\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hjson\"))\n\t},\n\t{\n\t\t\"id\": \"hlsl\",\n\t\t\"name\": \"HLSL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hlsl\"))\n\t},\n\t{\n\t\t\"id\": \"html\",\n\t\t\"name\": \"HTML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/html\"))\n\t},\n\t{\n\t\t\"id\": \"html-derivative\",\n\t\t\"name\": \"HTML (Derivative)\",\n\t\t\"import\": (() => import(\"@shikijs/langs/html-derivative\"))\n\t},\n\t{\n\t\t\"id\": \"http\",\n\t\t\"name\": \"HTTP\",\n\t\t\"import\": (() => import(\"@shikijs/langs/http\"))\n\t},\n\t{\n\t\t\"id\": \"hurl\",\n\t\t\"name\": \"Hurl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hurl\"))\n\t},\n\t{\n\t\t\"id\": \"hxml\",\n\t\t\"name\": \"HXML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hxml\"))\n\t},\n\t{\n\t\t\"id\": \"hy\",\n\t\t\"name\": \"Hy\",\n\t\t\"import\": (() => import(\"@shikijs/langs/hy\"))\n\t},\n\t{\n\t\t\"id\": \"imba\",\n\t\t\"name\": \"Imba\",\n\t\t\"import\": (() => import(\"@shikijs/langs/imba\"))\n\t},\n\t{\n\t\t\"id\": \"ini\",\n\t\t\"name\": \"INI\",\n\t\t\"aliases\": [\"properties\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/ini\"))\n\t},\n\t{\n\t\t\"id\": \"java\",\n\t\t\"name\": \"Java\",\n\t\t\"import\": (() => import(\"@shikijs/langs/java\"))\n\t},\n\t{\n\t\t\"id\": \"javascript\",\n\t\t\"name\": \"JavaScript\",\n\t\t\"aliases\": [\n\t\t\t\"js\",\n\t\t\t\"cjs\",\n\t\t\t\"mjs\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/javascript\"))\n\t},\n\t{\n\t\t\"id\": \"jinja\",\n\t\t\"name\": \"Jinja\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jinja\"))\n\t},\n\t{\n\t\t\"id\": \"jison\",\n\t\t\"name\": \"Jison\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jison\"))\n\t},\n\t{\n\t\t\"id\": \"json\",\n\t\t\"name\": \"JSON\",\n\t\t\"import\": (() => import(\"@shikijs/langs/json\"))\n\t},\n\t{\n\t\t\"id\": \"json5\",\n\t\t\"name\": \"JSON5\",\n\t\t\"import\": (() => import(\"@shikijs/langs/json5\"))\n\t},\n\t{\n\t\t\"id\": \"jsonc\",\n\t\t\"name\": \"JSON with Comments\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jsonc\"))\n\t},\n\t{\n\t\t\"id\": \"jsonl\",\n\t\t\"name\": \"JSON Lines\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jsonl\"))\n\t},\n\t{\n\t\t\"id\": \"jsonnet\",\n\t\t\"name\": \"Jsonnet\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jsonnet\"))\n\t},\n\t{\n\t\t\"id\": \"jssm\",\n\t\t\"name\": \"JSSM\",\n\t\t\"aliases\": [\"fsl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/jssm\"))\n\t},\n\t{\n\t\t\"id\": \"jsx\",\n\t\t\"name\": \"JSX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/jsx\"))\n\t},\n\t{\n\t\t\"id\": \"julia\",\n\t\t\"name\": \"Julia\",\n\t\t\"aliases\": [\"jl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/julia\"))\n\t},\n\t{\n\t\t\"id\": \"just\",\n\t\t\"name\": \"Just\",\n\t\t\"import\": (() => import(\"@shikijs/langs/just\"))\n\t},\n\t{\n\t\t\"id\": \"kdl\",\n\t\t\"name\": \"KDL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/kdl\"))\n\t},\n\t{\n\t\t\"id\": \"kotlin\",\n\t\t\"name\": \"Kotlin\",\n\t\t\"aliases\": [\"kt\", \"kts\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/kotlin\"))\n\t},\n\t{\n\t\t\"id\": \"kusto\",\n\t\t\"name\": \"Kusto\",\n\t\t\"aliases\": [\"kql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/kusto\"))\n\t},\n\t{\n\t\t\"id\": \"latex\",\n\t\t\"name\": \"LaTeX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/latex\"))\n\t},\n\t{\n\t\t\"id\": \"lean\",\n\t\t\"name\": \"Lean 4\",\n\t\t\"aliases\": [\"lean4\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/lean\"))\n\t},\n\t{\n\t\t\"id\": \"less\",\n\t\t\"name\": \"Less\",\n\t\t\"import\": (() => import(\"@shikijs/langs/less\"))\n\t},\n\t{\n\t\t\"id\": \"liquid\",\n\t\t\"name\": \"Liquid\",\n\t\t\"import\": (() => import(\"@shikijs/langs/liquid\"))\n\t},\n\t{\n\t\t\"id\": \"llvm\",\n\t\t\"name\": \"LLVM IR\",\n\t\t\"import\": (() => import(\"@shikijs/langs/llvm\"))\n\t},\n\t{\n\t\t\"id\": \"log\",\n\t\t\"name\": \"Log file\",\n\t\t\"import\": (() => import(\"@shikijs/langs/log\"))\n\t},\n\t{\n\t\t\"id\": \"logo\",\n\t\t\"name\": \"Logo\",\n\t\t\"import\": (() => import(\"@shikijs/langs/logo\"))\n\t},\n\t{\n\t\t\"id\": \"lua\",\n\t\t\"name\": \"Lua\",\n\t\t\"import\": (() => import(\"@shikijs/langs/lua\"))\n\t},\n\t{\n\t\t\"id\": \"luau\",\n\t\t\"name\": \"Luau\",\n\t\t\"import\": (() => import(\"@shikijs/langs/luau\"))\n\t},\n\t{\n\t\t\"id\": \"make\",\n\t\t\"name\": \"Makefile\",\n\t\t\"aliases\": [\"makefile\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/make\"))\n\t},\n\t{\n\t\t\"id\": \"markdown\",\n\t\t\"name\": \"Markdown\",\n\t\t\"aliases\": [\"md\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/markdown\"))\n\t},\n\t{\n\t\t\"id\": \"marko\",\n\t\t\"name\": \"Marko\",\n\t\t\"import\": (() => import(\"@shikijs/langs/marko\"))\n\t},\n\t{\n\t\t\"id\": \"matlab\",\n\t\t\"name\": \"MATLAB\",\n\t\t\"import\": (() => import(\"@shikijs/langs/matlab\"))\n\t},\n\t{\n\t\t\"id\": \"mdc\",\n\t\t\"name\": \"MDC\",\n\t\t\"import\": (() => import(\"@shikijs/langs/mdc\"))\n\t},\n\t{\n\t\t\"id\": \"mdx\",\n\t\t\"name\": \"MDX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/mdx\"))\n\t},\n\t{\n\t\t\"id\": \"mermaid\",\n\t\t\"name\": \"Mermaid\",\n\t\t\"aliases\": [\"mmd\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/mermaid\"))\n\t},\n\t{\n\t\t\"id\": \"mipsasm\",\n\t\t\"name\": \"MIPS Assembly\",\n\t\t\"aliases\": [\"mips\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/mipsasm\"))\n\t},\n\t{\n\t\t\"id\": \"mojo\",\n\t\t\"name\": \"Mojo\",\n\t\t\"import\": (() => import(\"@shikijs/langs/mojo\"))\n\t},\n\t{\n\t\t\"id\": \"moonbit\",\n\t\t\"name\": \"MoonBit\",\n\t\t\"aliases\": [\"mbt\", \"mbti\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/moonbit\"))\n\t},\n\t{\n\t\t\"id\": \"move\",\n\t\t\"name\": \"Move\",\n\t\t\"import\": (() => import(\"@shikijs/langs/move\"))\n\t},\n\t{\n\t\t\"id\": \"narrat\",\n\t\t\"name\": \"Narrat Language\",\n\t\t\"aliases\": [\"nar\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/narrat\"))\n\t},\n\t{\n\t\t\"id\": \"nextflow\",\n\t\t\"name\": \"Nextflow\",\n\t\t\"aliases\": [\"nf\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/nextflow\"))\n\t},\n\t{\n\t\t\"id\": \"nextflow-groovy\",\n\t\t\"name\": \"Nextflow Groovy\",\n\t\t\"import\": (() => import(\"@shikijs/langs/nextflow-groovy\"))\n\t},\n\t{\n\t\t\"id\": \"nginx\",\n\t\t\"name\": \"Nginx\",\n\t\t\"import\": (() => import(\"@shikijs/langs/nginx\"))\n\t},\n\t{\n\t\t\"id\": \"nim\",\n\t\t\"name\": \"Nim\",\n\t\t\"import\": (() => import(\"@shikijs/langs/nim\"))\n\t},\n\t{\n\t\t\"id\": \"nix\",\n\t\t\"name\": \"Nix\",\n\t\t\"import\": (() => import(\"@shikijs/langs/nix\"))\n\t},\n\t{\n\t\t\"id\": \"nushell\",\n\t\t\"name\": \"nushell\",\n\t\t\"aliases\": [\"nu\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/nushell\"))\n\t},\n\t{\n\t\t\"id\": \"objective-c\",\n\t\t\"name\": \"Objective-C\",\n\t\t\"aliases\": [\"objc\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/objective-c\"))\n\t},\n\t{\n\t\t\"id\": \"objective-cpp\",\n\t\t\"name\": \"Objective-C++\",\n\t\t\"import\": (() => import(\"@shikijs/langs/objective-cpp\"))\n\t},\n\t{\n\t\t\"id\": \"ocaml\",\n\t\t\"name\": \"OCaml\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ocaml\"))\n\t},\n\t{\n\t\t\"id\": \"odin\",\n\t\t\"name\": \"Odin\",\n\t\t\"import\": (() => import(\"@shikijs/langs/odin\"))\n\t},\n\t{\n\t\t\"id\": \"openscad\",\n\t\t\"name\": \"OpenSCAD\",\n\t\t\"aliases\": [\"scad\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/openscad\"))\n\t},\n\t{\n\t\t\"id\": \"pascal\",\n\t\t\"name\": \"Pascal\",\n\t\t\"import\": (() => import(\"@shikijs/langs/pascal\"))\n\t},\n\t{\n\t\t\"id\": \"perl\",\n\t\t\"name\": \"Perl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/perl\"))\n\t},\n\t{\n\t\t\"id\": \"php\",\n\t\t\"name\": \"PHP\",\n\t\t\"import\": (() => import(\"@shikijs/langs/php\"))\n\t},\n\t{\n\t\t\"id\": \"pkl\",\n\t\t\"name\": \"Pkl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/pkl\"))\n\t},\n\t{\n\t\t\"id\": \"plsql\",\n\t\t\"name\": \"PL/SQL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/plsql\"))\n\t},\n\t{\n\t\t\"id\": \"po\",\n\t\t\"name\": \"Gettext PO\",\n\t\t\"aliases\": [\"pot\", \"potx\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/po\"))\n\t},\n\t{\n\t\t\"id\": \"polar\",\n\t\t\"name\": \"Polar\",\n\t\t\"import\": (() => import(\"@shikijs/langs/polar\"))\n\t},\n\t{\n\t\t\"id\": \"postcss\",\n\t\t\"name\": \"PostCSS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/postcss\"))\n\t},\n\t{\n\t\t\"id\": \"powerquery\",\n\t\t\"name\": \"PowerQuery\",\n\t\t\"import\": (() => import(\"@shikijs/langs/powerquery\"))\n\t},\n\t{\n\t\t\"id\": \"powershell\",\n\t\t\"name\": \"PowerShell\",\n\t\t\"aliases\": [\"ps\", \"ps1\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/powershell\"))\n\t},\n\t{\n\t\t\"id\": \"prisma\",\n\t\t\"name\": \"Prisma\",\n\t\t\"import\": (() => import(\"@shikijs/langs/prisma\"))\n\t},\n\t{\n\t\t\"id\": \"prolog\",\n\t\t\"name\": \"Prolog\",\n\t\t\"import\": (() => import(\"@shikijs/langs/prolog\"))\n\t},\n\t{\n\t\t\"id\": \"proto\",\n\t\t\"name\": \"Protocol Buffer 3\",\n\t\t\"aliases\": [\"protobuf\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/proto\"))\n\t},\n\t{\n\t\t\"id\": \"pug\",\n\t\t\"name\": \"Pug\",\n\t\t\"aliases\": [\"jade\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/pug\"))\n\t},\n\t{\n\t\t\"id\": \"puppet\",\n\t\t\"name\": \"Puppet\",\n\t\t\"import\": (() => import(\"@shikijs/langs/puppet\"))\n\t},\n\t{\n\t\t\"id\": \"purescript\",\n\t\t\"name\": \"PureScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/purescript\"))\n\t},\n\t{\n\t\t\"id\": \"python\",\n\t\t\"name\": \"Python\",\n\t\t\"aliases\": [\"py\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/python\"))\n\t},\n\t{\n\t\t\"id\": \"qml\",\n\t\t\"name\": \"QML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/qml\"))\n\t},\n\t{\n\t\t\"id\": \"qmldir\",\n\t\t\"name\": \"QML Directory\",\n\t\t\"import\": (() => import(\"@shikijs/langs/qmldir\"))\n\t},\n\t{\n\t\t\"id\": \"qss\",\n\t\t\"name\": \"Qt Style Sheets\",\n\t\t\"import\": (() => import(\"@shikijs/langs/qss\"))\n\t},\n\t{\n\t\t\"id\": \"r\",\n\t\t\"name\": \"R\",\n\t\t\"import\": (() => import(\"@shikijs/langs/r\"))\n\t},\n\t{\n\t\t\"id\": \"racket\",\n\t\t\"name\": \"Racket\",\n\t\t\"import\": (() => import(\"@shikijs/langs/racket\"))\n\t},\n\t{\n\t\t\"id\": \"raku\",\n\t\t\"name\": \"Raku\",\n\t\t\"aliases\": [\"perl6\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/raku\"))\n\t},\n\t{\n\t\t\"id\": \"razor\",\n\t\t\"name\": \"ASP.NET Razor\",\n\t\t\"import\": (() => import(\"@shikijs/langs/razor\"))\n\t},\n\t{\n\t\t\"id\": \"reg\",\n\t\t\"name\": \"Windows Registry Script\",\n\t\t\"import\": (() => import(\"@shikijs/langs/reg\"))\n\t},\n\t{\n\t\t\"id\": \"regexp\",\n\t\t\"name\": \"RegExp\",\n\t\t\"aliases\": [\"regex\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/regexp\"))\n\t},\n\t{\n\t\t\"id\": \"rel\",\n\t\t\"name\": \"Rel\",\n\t\t\"import\": (() => import(\"@shikijs/langs/rel\"))\n\t},\n\t{\n\t\t\"id\": \"riscv\",\n\t\t\"name\": \"RISC-V\",\n\t\t\"import\": (() => import(\"@shikijs/langs/riscv\"))\n\t},\n\t{\n\t\t\"id\": \"ron\",\n\t\t\"name\": \"RON\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ron\"))\n\t},\n\t{\n\t\t\"id\": \"rosmsg\",\n\t\t\"name\": \"ROS Interface\",\n\t\t\"import\": (() => import(\"@shikijs/langs/rosmsg\"))\n\t},\n\t{\n\t\t\"id\": \"rst\",\n\t\t\"name\": \"reStructuredText\",\n\t\t\"import\": (() => import(\"@shikijs/langs/rst\"))\n\t},\n\t{\n\t\t\"id\": \"ruby\",\n\t\t\"name\": \"Ruby\",\n\t\t\"aliases\": [\"rb\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/ruby\"))\n\t},\n\t{\n\t\t\"id\": \"rust\",\n\t\t\"name\": \"Rust\",\n\t\t\"aliases\": [\"rs\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/rust\"))\n\t},\n\t{\n\t\t\"id\": \"sas\",\n\t\t\"name\": \"SAS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/sas\"))\n\t},\n\t{\n\t\t\"id\": \"sass\",\n\t\t\"name\": \"Sass\",\n\t\t\"import\": (() => import(\"@shikijs/langs/sass\"))\n\t},\n\t{\n\t\t\"id\": \"scala\",\n\t\t\"name\": \"Scala\",\n\t\t\"import\": (() => import(\"@shikijs/langs/scala\"))\n\t},\n\t{\n\t\t\"id\": \"scheme\",\n\t\t\"name\": \"Scheme\",\n\t\t\"import\": (() => import(\"@shikijs/langs/scheme\"))\n\t},\n\t{\n\t\t\"id\": \"scss\",\n\t\t\"name\": \"SCSS\",\n\t\t\"import\": (() => import(\"@shikijs/langs/scss\"))\n\t},\n\t{\n\t\t\"id\": \"sdbl\",\n\t\t\"name\": \"1C (Query)\",\n\t\t\"aliases\": [\"1c-query\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/sdbl\"))\n\t},\n\t{\n\t\t\"id\": \"shaderlab\",\n\t\t\"name\": \"ShaderLab\",\n\t\t\"aliases\": [\"shader\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/shaderlab\"))\n\t},\n\t{\n\t\t\"id\": \"shellscript\",\n\t\t\"name\": \"Shell\",\n\t\t\"aliases\": [\n\t\t\t\"bash\",\n\t\t\t\"sh\",\n\t\t\t\"shell\",\n\t\t\t\"zsh\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/shellscript\"))\n\t},\n\t{\n\t\t\"id\": \"shellsession\",\n\t\t\"name\": \"Shell Session\",\n\t\t\"aliases\": [\"console\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/shellsession\"))\n\t},\n\t{\n\t\t\"id\": \"smalltalk\",\n\t\t\"name\": \"Smalltalk\",\n\t\t\"import\": (() => import(\"@shikijs/langs/smalltalk\"))\n\t},\n\t{\n\t\t\"id\": \"solidity\",\n\t\t\"name\": \"Solidity\",\n\t\t\"import\": (() => import(\"@shikijs/langs/solidity\"))\n\t},\n\t{\n\t\t\"id\": \"soy\",\n\t\t\"name\": \"Closure Templates\",\n\t\t\"aliases\": [\"closure-templates\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/soy\"))\n\t},\n\t{\n\t\t\"id\": \"sparql\",\n\t\t\"name\": \"SPARQL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/sparql\"))\n\t},\n\t{\n\t\t\"id\": \"splunk\",\n\t\t\"name\": \"Splunk Query Language\",\n\t\t\"aliases\": [\"spl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/splunk\"))\n\t},\n\t{\n\t\t\"id\": \"sql\",\n\t\t\"name\": \"SQL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/sql\"))\n\t},\n\t{\n\t\t\"id\": \"ssh-config\",\n\t\t\"name\": \"SSH Config\",\n\t\t\"import\": (() => import(\"@shikijs/langs/ssh-config\"))\n\t},\n\t{\n\t\t\"id\": \"stata\",\n\t\t\"name\": \"Stata\",\n\t\t\"import\": (() => import(\"@shikijs/langs/stata\"))\n\t},\n\t{\n\t\t\"id\": \"stylus\",\n\t\t\"name\": \"Stylus\",\n\t\t\"aliases\": [\"styl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/stylus\"))\n\t},\n\t{\n\t\t\"id\": \"surrealql\",\n\t\t\"name\": \"SurrealQL\",\n\t\t\"aliases\": [\"surql\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/surrealql\"))\n\t},\n\t{\n\t\t\"id\": \"svelte\",\n\t\t\"name\": \"Svelte\",\n\t\t\"import\": (() => import(\"@shikijs/langs/svelte\"))\n\t},\n\t{\n\t\t\"id\": \"swift\",\n\t\t\"name\": \"Swift\",\n\t\t\"import\": (() => import(\"@shikijs/langs/swift\"))\n\t},\n\t{\n\t\t\"id\": \"system-verilog\",\n\t\t\"name\": \"SystemVerilog\",\n\t\t\"import\": (() => import(\"@shikijs/langs/system-verilog\"))\n\t},\n\t{\n\t\t\"id\": \"systemd\",\n\t\t\"name\": \"Systemd Units\",\n\t\t\"import\": (() => import(\"@shikijs/langs/systemd\"))\n\t},\n\t{\n\t\t\"id\": \"talonscript\",\n\t\t\"name\": \"TalonScript\",\n\t\t\"aliases\": [\"talon\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/talonscript\"))\n\t},\n\t{\n\t\t\"id\": \"tasl\",\n\t\t\"name\": \"Tasl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tasl\"))\n\t},\n\t{\n\t\t\"id\": \"tcl\",\n\t\t\"name\": \"Tcl\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tcl\"))\n\t},\n\t{\n\t\t\"id\": \"templ\",\n\t\t\"name\": \"Templ\",\n\t\t\"import\": (() => import(\"@shikijs/langs/templ\"))\n\t},\n\t{\n\t\t\"id\": \"terraform\",\n\t\t\"name\": \"Terraform\",\n\t\t\"aliases\": [\"tf\", \"tfvars\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/terraform\"))\n\t},\n\t{\n\t\t\"id\": \"tex\",\n\t\t\"name\": \"TeX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tex\"))\n\t},\n\t{\n\t\t\"id\": \"toml\",\n\t\t\"name\": \"TOML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/toml\"))\n\t},\n\t{\n\t\t\"id\": \"ts-tags\",\n\t\t\"name\": \"TypeScript with Tags\",\n\t\t\"aliases\": [\"lit\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/ts-tags\"))\n\t},\n\t{\n\t\t\"id\": \"tsv\",\n\t\t\"name\": \"TSV\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tsv\"))\n\t},\n\t{\n\t\t\"id\": \"tsx\",\n\t\t\"name\": \"TSX\",\n\t\t\"import\": (() => import(\"@shikijs/langs/tsx\"))\n\t},\n\t{\n\t\t\"id\": \"turtle\",\n\t\t\"name\": \"Turtle\",\n\t\t\"import\": (() => import(\"@shikijs/langs/turtle\"))\n\t},\n\t{\n\t\t\"id\": \"twig\",\n\t\t\"name\": \"Twig\",\n\t\t\"import\": (() => import(\"@shikijs/langs/twig\"))\n\t},\n\t{\n\t\t\"id\": \"typescript\",\n\t\t\"name\": \"TypeScript\",\n\t\t\"aliases\": [\n\t\t\t\"ts\",\n\t\t\t\"cts\",\n\t\t\t\"mts\"\n\t\t],\n\t\t\"import\": (() => import(\"@shikijs/langs/typescript\"))\n\t},\n\t{\n\t\t\"id\": \"typespec\",\n\t\t\"name\": \"TypeSpec\",\n\t\t\"aliases\": [\"tsp\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/typespec\"))\n\t},\n\t{\n\t\t\"id\": \"typst\",\n\t\t\"name\": \"Typst\",\n\t\t\"aliases\": [\"typ\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/typst\"))\n\t},\n\t{\n\t\t\"id\": \"v\",\n\t\t\"name\": \"V\",\n\t\t\"import\": (() => import(\"@shikijs/langs/v\"))\n\t},\n\t{\n\t\t\"id\": \"vala\",\n\t\t\"name\": \"Vala\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vala\"))\n\t},\n\t{\n\t\t\"id\": \"vb\",\n\t\t\"name\": \"Visual Basic\",\n\t\t\"aliases\": [\"cmd\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/vb\"))\n\t},\n\t{\n\t\t\"id\": \"verilog\",\n\t\t\"name\": \"Verilog\",\n\t\t\"import\": (() => import(\"@shikijs/langs/verilog\"))\n\t},\n\t{\n\t\t\"id\": \"vhdl\",\n\t\t\"name\": \"VHDL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vhdl\"))\n\t},\n\t{\n\t\t\"id\": \"viml\",\n\t\t\"name\": \"Vim Script\",\n\t\t\"aliases\": [\"vim\", \"vimscript\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/viml\"))\n\t},\n\t{\n\t\t\"id\": \"vue\",\n\t\t\"name\": \"Vue\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vue\"))\n\t},\n\t{\n\t\t\"id\": \"vue-html\",\n\t\t\"name\": \"Vue HTML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vue-html\"))\n\t},\n\t{\n\t\t\"id\": \"vue-vine\",\n\t\t\"name\": \"Vue Vine\",\n\t\t\"import\": (() => import(\"@shikijs/langs/vue-vine\"))\n\t},\n\t{\n\t\t\"id\": \"vyper\",\n\t\t\"name\": \"Vyper\",\n\t\t\"aliases\": [\"vy\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/vyper\"))\n\t},\n\t{\n\t\t\"id\": \"wasm\",\n\t\t\"name\": \"WebAssembly\",\n\t\t\"import\": (() => import(\"@shikijs/langs/wasm\"))\n\t},\n\t{\n\t\t\"id\": \"wenyan\",\n\t\t\"name\": \"Wenyan\",\n\t\t\"aliases\": [\"文言\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/wenyan\"))\n\t},\n\t{\n\t\t\"id\": \"wgsl\",\n\t\t\"name\": \"WGSL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/wgsl\"))\n\t},\n\t{\n\t\t\"id\": \"wikitext\",\n\t\t\"name\": \"Wikitext\",\n\t\t\"aliases\": [\"mediawiki\", \"wiki\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/wikitext\"))\n\t},\n\t{\n\t\t\"id\": \"wit\",\n\t\t\"name\": \"WebAssembly Interface Types\",\n\t\t\"import\": (() => import(\"@shikijs/langs/wit\"))\n\t},\n\t{\n\t\t\"id\": \"wolfram\",\n\t\t\"name\": \"Wolfram\",\n\t\t\"aliases\": [\"wl\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/wolfram\"))\n\t},\n\t{\n\t\t\"id\": \"xml\",\n\t\t\"name\": \"XML\",\n\t\t\"import\": (() => import(\"@shikijs/langs/xml\"))\n\t},\n\t{\n\t\t\"id\": \"xsl\",\n\t\t\"name\": \"XSL\",\n\t\t\"import\": (() => import(\"@shikijs/langs/xsl\"))\n\t},\n\t{\n\t\t\"id\": \"yaml\",\n\t\t\"name\": \"YAML\",\n\t\t\"aliases\": [\"yml\"],\n\t\t\"import\": (() => import(\"@shikijs/langs/yaml\"))\n\t},\n\t{\n\t\t\"id\": \"zenscript\",\n\t\t\"name\": \"ZenScript\",\n\t\t\"import\": (() => import(\"@shikijs/langs/zenscript\"))\n\t},\n\t{\n\t\t\"id\": \"zig\",\n\t\t\"name\": \"Zig\",\n\t\t\"import\": (() => import(\"@shikijs/langs/zig\"))\n\t}\n];\nconst bundledLanguagesBase = Object.fromEntries(bundledLanguagesInfo.map((i) => [i.id, i.import]));\nconst bundledLanguagesAlias = Object.fromEntries(bundledLanguagesInfo.flatMap((i) => i.aliases?.map((a) => [a, i.import]) || []));\nconst bundledLanguages = {\n\t...bundledLanguagesBase,\n\t...bundledLanguagesAlias\n};\n\n//#endregion\nexport { bundledLanguagesInfo as i, bundledLanguagesAlias as n, bundledLanguagesBase as r, bundledLanguages as t };","//#region src/themes.ts\nconst bundledThemesInfo = [\n\t{\n\t\t\"id\": \"andromeeda\",\n\t\t\"displayName\": \"Andromeeda\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/andromeeda\"))\n\t},\n\t{\n\t\t\"id\": \"aurora-x\",\n\t\t\"displayName\": \"Aurora X\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/aurora-x\"))\n\t},\n\t{\n\t\t\"id\": \"ayu-dark\",\n\t\t\"displayName\": \"Ayu Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/ayu-dark\"))\n\t},\n\t{\n\t\t\"id\": \"ayu-light\",\n\t\t\"displayName\": \"Ayu Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/ayu-light\"))\n\t},\n\t{\n\t\t\"id\": \"ayu-mirage\",\n\t\t\"displayName\": \"Ayu Mirage\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/ayu-mirage\"))\n\t},\n\t{\n\t\t\"id\": \"catppuccin-frappe\",\n\t\t\"displayName\": \"Catppuccin Frappé\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/catppuccin-frappe\"))\n\t},\n\t{\n\t\t\"id\": \"catppuccin-latte\",\n\t\t\"displayName\": \"Catppuccin Latte\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/catppuccin-latte\"))\n\t},\n\t{\n\t\t\"id\": \"catppuccin-macchiato\",\n\t\t\"displayName\": \"Catppuccin Macchiato\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/catppuccin-macchiato\"))\n\t},\n\t{\n\t\t\"id\": \"catppuccin-mocha\",\n\t\t\"displayName\": \"Catppuccin Mocha\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/catppuccin-mocha\"))\n\t},\n\t{\n\t\t\"id\": \"dark-plus\",\n\t\t\"displayName\": \"Dark Plus\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/dark-plus\"))\n\t},\n\t{\n\t\t\"id\": \"dracula\",\n\t\t\"displayName\": \"Dracula Theme\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/dracula\"))\n\t},\n\t{\n\t\t\"id\": \"dracula-soft\",\n\t\t\"displayName\": \"Dracula Theme Soft\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/dracula-soft\"))\n\t},\n\t{\n\t\t\"id\": \"everforest-dark\",\n\t\t\"displayName\": \"Everforest Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/everforest-dark\"))\n\t},\n\t{\n\t\t\"id\": \"everforest-light\",\n\t\t\"displayName\": \"Everforest Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/everforest-light\"))\n\t},\n\t{\n\t\t\"id\": \"github-dark\",\n\t\t\"displayName\": \"GitHub Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-dark\"))\n\t},\n\t{\n\t\t\"id\": \"github-dark-default\",\n\t\t\"displayName\": \"GitHub Dark Default\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-dark-default\"))\n\t},\n\t{\n\t\t\"id\": \"github-dark-dimmed\",\n\t\t\"displayName\": \"GitHub Dark Dimmed\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-dark-dimmed\"))\n\t},\n\t{\n\t\t\"id\": \"github-dark-high-contrast\",\n\t\t\"displayName\": \"GitHub Dark High Contrast\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-dark-high-contrast\"))\n\t},\n\t{\n\t\t\"id\": \"github-light\",\n\t\t\"displayName\": \"GitHub Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-light\"))\n\t},\n\t{\n\t\t\"id\": \"github-light-default\",\n\t\t\"displayName\": \"GitHub Light Default\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-light-default\"))\n\t},\n\t{\n\t\t\"id\": \"github-light-high-contrast\",\n\t\t\"displayName\": \"GitHub Light High Contrast\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/github-light-high-contrast\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-dark-hard\",\n\t\t\"displayName\": \"Gruvbox Dark Hard\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-dark-hard\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-dark-medium\",\n\t\t\"displayName\": \"Gruvbox Dark Medium\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-dark-medium\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-dark-soft\",\n\t\t\"displayName\": \"Gruvbox Dark Soft\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-dark-soft\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-light-hard\",\n\t\t\"displayName\": \"Gruvbox Light Hard\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-light-hard\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-light-medium\",\n\t\t\"displayName\": \"Gruvbox Light Medium\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-light-medium\"))\n\t},\n\t{\n\t\t\"id\": \"gruvbox-light-soft\",\n\t\t\"displayName\": \"Gruvbox Light Soft\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/gruvbox-light-soft\"))\n\t},\n\t{\n\t\t\"id\": \"horizon\",\n\t\t\"displayName\": \"Horizon\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/horizon\"))\n\t},\n\t{\n\t\t\"id\": \"horizon-bright\",\n\t\t\"displayName\": \"Horizon Bright\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/horizon-bright\"))\n\t},\n\t{\n\t\t\"id\": \"houston\",\n\t\t\"displayName\": \"Houston\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/houston\"))\n\t},\n\t{\n\t\t\"id\": \"kanagawa-dragon\",\n\t\t\"displayName\": \"Kanagawa Dragon\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/kanagawa-dragon\"))\n\t},\n\t{\n\t\t\"id\": \"kanagawa-lotus\",\n\t\t\"displayName\": \"Kanagawa Lotus\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/kanagawa-lotus\"))\n\t},\n\t{\n\t\t\"id\": \"kanagawa-wave\",\n\t\t\"displayName\": \"Kanagawa Wave\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/kanagawa-wave\"))\n\t},\n\t{\n\t\t\"id\": \"laserwave\",\n\t\t\"displayName\": \"LaserWave\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/laserwave\"))\n\t},\n\t{\n\t\t\"id\": \"light-plus\",\n\t\t\"displayName\": \"Light Plus\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/light-plus\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme\",\n\t\t\"displayName\": \"Material Theme\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme-darker\",\n\t\t\"displayName\": \"Material Theme Darker\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme-darker\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme-lighter\",\n\t\t\"displayName\": \"Material Theme Lighter\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme-lighter\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme-ocean\",\n\t\t\"displayName\": \"Material Theme Ocean\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme-ocean\"))\n\t},\n\t{\n\t\t\"id\": \"material-theme-palenight\",\n\t\t\"displayName\": \"Material Theme Palenight\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/material-theme-palenight\"))\n\t},\n\t{\n\t\t\"id\": \"min-dark\",\n\t\t\"displayName\": \"Min Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/min-dark\"))\n\t},\n\t{\n\t\t\"id\": \"min-light\",\n\t\t\"displayName\": \"Min Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/min-light\"))\n\t},\n\t{\n\t\t\"id\": \"monokai\",\n\t\t\"displayName\": \"Monokai\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/monokai\"))\n\t},\n\t{\n\t\t\"id\": \"night-owl\",\n\t\t\"displayName\": \"Night Owl\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/night-owl\"))\n\t},\n\t{\n\t\t\"id\": \"night-owl-light\",\n\t\t\"displayName\": \"Night Owl Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/night-owl-light\"))\n\t},\n\t{\n\t\t\"id\": \"nord\",\n\t\t\"displayName\": \"Nord\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/nord\"))\n\t},\n\t{\n\t\t\"id\": \"one-dark-pro\",\n\t\t\"displayName\": \"One Dark Pro\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/one-dark-pro\"))\n\t},\n\t{\n\t\t\"id\": \"one-light\",\n\t\t\"displayName\": \"One Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/one-light\"))\n\t},\n\t{\n\t\t\"id\": \"plastic\",\n\t\t\"displayName\": \"Plastic\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/plastic\"))\n\t},\n\t{\n\t\t\"id\": \"poimandres\",\n\t\t\"displayName\": \"Poimandres\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/poimandres\"))\n\t},\n\t{\n\t\t\"id\": \"red\",\n\t\t\"displayName\": \"Red\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/red\"))\n\t},\n\t{\n\t\t\"id\": \"rose-pine\",\n\t\t\"displayName\": \"Rosé Pine\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/rose-pine\"))\n\t},\n\t{\n\t\t\"id\": \"rose-pine-dawn\",\n\t\t\"displayName\": \"Rosé Pine Dawn\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/rose-pine-dawn\"))\n\t},\n\t{\n\t\t\"id\": \"rose-pine-moon\",\n\t\t\"displayName\": \"Rosé Pine Moon\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/rose-pine-moon\"))\n\t},\n\t{\n\t\t\"id\": \"slack-dark\",\n\t\t\"displayName\": \"Slack Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/slack-dark\"))\n\t},\n\t{\n\t\t\"id\": \"slack-ochin\",\n\t\t\"displayName\": \"Slack Ochin\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/slack-ochin\"))\n\t},\n\t{\n\t\t\"id\": \"snazzy-light\",\n\t\t\"displayName\": \"Snazzy Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/snazzy-light\"))\n\t},\n\t{\n\t\t\"id\": \"solarized-dark\",\n\t\t\"displayName\": \"Solarized Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/solarized-dark\"))\n\t},\n\t{\n\t\t\"id\": \"solarized-light\",\n\t\t\"displayName\": \"Solarized Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/solarized-light\"))\n\t},\n\t{\n\t\t\"id\": \"synthwave-84\",\n\t\t\"displayName\": \"Synthwave '84\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/synthwave-84\"))\n\t},\n\t{\n\t\t\"id\": \"tokyo-night\",\n\t\t\"displayName\": \"Tokyo Night\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/tokyo-night\"))\n\t},\n\t{\n\t\t\"id\": \"vesper\",\n\t\t\"displayName\": \"Vesper\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/vesper\"))\n\t},\n\t{\n\t\t\"id\": \"vitesse-black\",\n\t\t\"displayName\": \"Vitesse Black\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/vitesse-black\"))\n\t},\n\t{\n\t\t\"id\": \"vitesse-dark\",\n\t\t\"displayName\": \"Vitesse Dark\",\n\t\t\"type\": \"dark\",\n\t\t\"import\": (() => import(\"@shikijs/themes/vitesse-dark\"))\n\t},\n\t{\n\t\t\"id\": \"vitesse-light\",\n\t\t\"displayName\": \"Vitesse Light\",\n\t\t\"type\": \"light\",\n\t\t\"import\": (() => import(\"@shikijs/themes/vitesse-light\"))\n\t}\n];\nconst bundledThemes = Object.fromEntries(bundledThemesInfo.map((i) => [i.id, i.import]));\n\n//#endregion\nexport { bundledThemes, bundledThemesInfo };","//#region src/error.ts\nvar ShikiError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"ShikiError\";\n\t}\n};\n\nfunction getHeapMax() {\n return 2147483648;\n}\nfunction _emscripten_get_now() {\n return typeof performance !== \"undefined\" ? performance.now() : Date.now();\n}\nconst alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple;\nasync function main(init) {\n let wasmMemory;\n let buffer;\n const binding = {};\n function updateGlobalBufferAndViews(buf) {\n buffer = buf;\n binding.HEAPU8 = new Uint8Array(buf);\n binding.HEAPU32 = new Uint32Array(buf);\n }\n function _emscripten_memcpy_big(dest, src, num) {\n binding.HEAPU8.copyWithin(dest, src, src + num);\n }\n function emscripten_realloc_buffer(size) {\n try {\n wasmMemory.grow(size - buffer.byteLength + 65535 >>> 16);\n updateGlobalBufferAndViews(wasmMemory.buffer);\n return 1;\n } catch {\n }\n }\n function _emscripten_resize_heap(requestedSize) {\n const oldSize = binding.HEAPU8.length;\n requestedSize = requestedSize >>> 0;\n const maxHeapSize = getHeapMax();\n if (requestedSize > maxHeapSize)\n return false;\n for (let cutDown = 1; cutDown <= 4; cutDown *= 2) {\n let overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);\n overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n const newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));\n const replacement = emscripten_realloc_buffer(newSize);\n if (replacement)\n return true;\n }\n return false;\n }\n const UTF8Decoder = typeof TextDecoder != \"undefined\" ? new TextDecoder(\"utf8\") : void 0;\n function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead = 1024) {\n const endIdx = idx + maxBytesToRead;\n let endPtr = idx;\n while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;\n if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {\n return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));\n }\n let str = \"\";\n while (idx < endPtr) {\n let u0 = heapOrArray[idx++];\n if (!(u0 & 128)) {\n str += String.fromCharCode(u0);\n continue;\n }\n const u1 = heapOrArray[idx++] & 63;\n if ((u0 & 224) === 192) {\n str += String.fromCharCode((u0 & 31) << 6 | u1);\n continue;\n }\n const u2 = heapOrArray[idx++] & 63;\n if ((u0 & 240) === 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;\n }\n if (u0 < 65536) {\n str += String.fromCharCode(u0);\n } else {\n const ch = u0 - 65536;\n str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);\n }\n }\n return str;\n }\n function UTF8ToString(ptr, maxBytesToRead) {\n return ptr ? UTF8ArrayToString(binding.HEAPU8, ptr, maxBytesToRead) : \"\";\n }\n const asmLibraryArg = {\n emscripten_get_now: _emscripten_get_now,\n emscripten_memcpy_big: _emscripten_memcpy_big,\n emscripten_resize_heap: _emscripten_resize_heap,\n fd_write: () => 0\n };\n async function createWasm() {\n const info = {\n env: asmLibraryArg,\n wasi_snapshot_preview1: asmLibraryArg\n };\n const exports$1 = await init(info);\n wasmMemory = exports$1.memory;\n updateGlobalBufferAndViews(wasmMemory.buffer);\n Object.assign(binding, exports$1);\n binding.UTF8ToString = UTF8ToString;\n }\n await createWasm();\n return binding;\n}\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nlet onigBinding = null;\nfunction throwLastOnigError(onigBinding2) {\n throw new ShikiError(onigBinding2.UTF8ToString(onigBinding2.getLastOnigError()));\n}\nclass UtfString {\n constructor(str) {\n __publicField(this, \"utf16Length\");\n __publicField(this, \"utf8Length\");\n __publicField(this, \"utf16Value\");\n __publicField(this, \"utf8Value\");\n __publicField(this, \"utf16OffsetToUtf8\");\n __publicField(this, \"utf8OffsetToUtf16\");\n const utf16Length = str.length;\n const utf8Length = UtfString._utf8ByteLength(str);\n const computeIndicesMapping = utf8Length !== utf16Length;\n const utf16OffsetToUtf8 = computeIndicesMapping ? new Uint32Array(utf16Length + 1) : null;\n if (computeIndicesMapping)\n utf16OffsetToUtf8[utf16Length] = utf8Length;\n const utf8OffsetToUtf16 = computeIndicesMapping ? new Uint32Array(utf8Length + 1) : null;\n if (computeIndicesMapping)\n utf8OffsetToUtf16[utf8Length] = utf16Length;\n const utf8Value = new Uint8Array(utf8Length);\n let i8 = 0;\n for (let i16 = 0; i16 < utf16Length; i16++) {\n const charCode = str.charCodeAt(i16);\n let codePoint = charCode;\n let wasSurrogatePair = false;\n if (charCode >= 55296 && charCode <= 56319) {\n if (i16 + 1 < utf16Length) {\n const nextCharCode = str.charCodeAt(i16 + 1);\n if (nextCharCode >= 56320 && nextCharCode <= 57343) {\n codePoint = (charCode - 55296 << 10) + 65536 | nextCharCode - 56320;\n wasSurrogatePair = true;\n }\n }\n }\n if (computeIndicesMapping) {\n utf16OffsetToUtf8[i16] = i8;\n if (wasSurrogatePair)\n utf16OffsetToUtf8[i16 + 1] = i8;\n if (codePoint <= 127) {\n utf8OffsetToUtf16[i8 + 0] = i16;\n } else if (codePoint <= 2047) {\n utf8OffsetToUtf16[i8 + 0] = i16;\n utf8OffsetToUtf16[i8 + 1] = i16;\n } else if (codePoint <= 65535) {\n utf8OffsetToUtf16[i8 + 0] = i16;\n utf8OffsetToUtf16[i8 + 1] = i16;\n utf8OffsetToUtf16[i8 + 2] = i16;\n } else {\n utf8OffsetToUtf16[i8 + 0] = i16;\n utf8OffsetToUtf16[i8 + 1] = i16;\n utf8OffsetToUtf16[i8 + 2] = i16;\n utf8OffsetToUtf16[i8 + 3] = i16;\n }\n }\n if (codePoint <= 127) {\n utf8Value[i8++] = codePoint;\n } else if (codePoint <= 2047) {\n utf8Value[i8++] = 192 | (codePoint & 1984) >>> 6;\n utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;\n } else if (codePoint <= 65535) {\n utf8Value[i8++] = 224 | (codePoint & 61440) >>> 12;\n utf8Value[i8++] = 128 | (codePoint & 4032) >>> 6;\n utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;\n } else {\n utf8Value[i8++] = 240 | (codePoint & 1835008) >>> 18;\n utf8Value[i8++] = 128 | (codePoint & 258048) >>> 12;\n utf8Value[i8++] = 128 | (codePoint & 4032) >>> 6;\n utf8Value[i8++] = 128 | (codePoint & 63) >>> 0;\n }\n if (wasSurrogatePair)\n i16++;\n }\n this.utf16Length = utf16Length;\n this.utf8Length = utf8Length;\n this.utf16Value = str;\n this.utf8Value = utf8Value;\n this.utf16OffsetToUtf8 = utf16OffsetToUtf8;\n this.utf8OffsetToUtf16 = utf8OffsetToUtf16;\n }\n static _utf8ByteLength(str) {\n let result = 0;\n for (let i = 0, len = str.length; i < len; i++) {\n const charCode = str.charCodeAt(i);\n let codepoint = charCode;\n let wasSurrogatePair = false;\n if (charCode >= 55296 && charCode <= 56319) {\n if (i + 1 < len) {\n const nextCharCode = str.charCodeAt(i + 1);\n if (nextCharCode >= 56320 && nextCharCode <= 57343) {\n codepoint = (charCode - 55296 << 10) + 65536 | nextCharCode - 56320;\n wasSurrogatePair = true;\n }\n }\n }\n if (codepoint <= 127)\n result += 1;\n else if (codepoint <= 2047)\n result += 2;\n else if (codepoint <= 65535)\n result += 3;\n else\n result += 4;\n if (wasSurrogatePair)\n i++;\n }\n return result;\n }\n createString(onigBinding2) {\n const result = onigBinding2.omalloc(this.utf8Length);\n onigBinding2.HEAPU8.set(this.utf8Value, result);\n return result;\n }\n}\nconst _OnigString = class _OnigString {\n constructor(str) {\n __publicField(this, \"id\", ++_OnigString.LAST_ID);\n __publicField(this, \"_onigBinding\");\n __publicField(this, \"content\");\n __publicField(this, \"utf16Length\");\n __publicField(this, \"utf8Length\");\n __publicField(this, \"utf16OffsetToUtf8\");\n __publicField(this, \"utf8OffsetToUtf16\");\n __publicField(this, \"ptr\");\n if (!onigBinding)\n throw new ShikiError(\"Must invoke loadWasm first.\");\n this._onigBinding = onigBinding;\n this.content = str;\n const utfString = new UtfString(str);\n this.utf16Length = utfString.utf16Length;\n this.utf8Length = utfString.utf8Length;\n this.utf16OffsetToUtf8 = utfString.utf16OffsetToUtf8;\n this.utf8OffsetToUtf16 = utfString.utf8OffsetToUtf16;\n if (this.utf8Length < 1e4 && !_OnigString._sharedPtrInUse) {\n if (!_OnigString._sharedPtr)\n _OnigString._sharedPtr = onigBinding.omalloc(1e4);\n _OnigString._sharedPtrInUse = true;\n onigBinding.HEAPU8.set(utfString.utf8Value, _OnigString._sharedPtr);\n this.ptr = _OnigString._sharedPtr;\n } else {\n this.ptr = utfString.createString(onigBinding);\n }\n }\n convertUtf8OffsetToUtf16(utf8Offset) {\n if (this.utf8OffsetToUtf16) {\n if (utf8Offset < 0)\n return 0;\n if (utf8Offset > this.utf8Length)\n return this.utf16Length;\n return this.utf8OffsetToUtf16[utf8Offset];\n }\n return utf8Offset;\n }\n convertUtf16OffsetToUtf8(utf16Offset) {\n if (this.utf16OffsetToUtf8) {\n if (utf16Offset < 0)\n return 0;\n if (utf16Offset > this.utf16Length)\n return this.utf8Length;\n return this.utf16OffsetToUtf8[utf16Offset];\n }\n return utf16Offset;\n }\n dispose() {\n if (this.ptr === _OnigString._sharedPtr)\n _OnigString._sharedPtrInUse = false;\n else\n this._onigBinding.ofree(this.ptr);\n }\n};\n__publicField(_OnigString, \"LAST_ID\", 0);\n__publicField(_OnigString, \"_sharedPtr\", 0);\n// a pointer to a string of 10000 bytes\n__publicField(_OnigString, \"_sharedPtrInUse\", false);\nlet OnigString = _OnigString;\nclass OnigScanner {\n constructor(patterns) {\n __publicField(this, \"_onigBinding\");\n __publicField(this, \"_ptr\");\n if (!onigBinding)\n throw new ShikiError(\"Must invoke loadWasm first.\");\n const strPtrsArr = [];\n const strLenArr = [];\n for (let i = 0, len = patterns.length; i < len; i++) {\n const utfString = new UtfString(patterns[i]);\n strPtrsArr[i] = utfString.createString(onigBinding);\n strLenArr[i] = utfString.utf8Length;\n }\n const strPtrsPtr = onigBinding.omalloc(4 * patterns.length);\n onigBinding.HEAPU32.set(strPtrsArr, strPtrsPtr / 4);\n const strLenPtr = onigBinding.omalloc(4 * patterns.length);\n onigBinding.HEAPU32.set(strLenArr, strLenPtr / 4);\n const scannerPtr = onigBinding.createOnigScanner(strPtrsPtr, strLenPtr, patterns.length);\n for (let i = 0, len = patterns.length; i < len; i++)\n onigBinding.ofree(strPtrsArr[i]);\n onigBinding.ofree(strLenPtr);\n onigBinding.ofree(strPtrsPtr);\n if (scannerPtr === 0)\n throwLastOnigError(onigBinding);\n this._onigBinding = onigBinding;\n this._ptr = scannerPtr;\n }\n dispose() {\n this._onigBinding.freeOnigScanner(this._ptr);\n }\n findNextMatchSync(string, startPosition, arg) {\n let options = 0 /* None */;\n if (typeof arg === \"number\") {\n options = arg;\n }\n if (typeof string === \"string\") {\n string = new OnigString(string);\n const result = this._findNextMatchSync(string, startPosition, false, options);\n string.dispose();\n return result;\n }\n return this._findNextMatchSync(string, startPosition, false, options);\n }\n _findNextMatchSync(string, startPosition, debugCall, options) {\n const onigBinding2 = this._onigBinding;\n const resultPtr = onigBinding2.findNextOnigScannerMatch(this._ptr, string.id, string.ptr, string.utf8Length, string.convertUtf16OffsetToUtf8(startPosition), options);\n if (resultPtr === 0) {\n return null;\n }\n const HEAPU32 = onigBinding2.HEAPU32;\n let offset = resultPtr / 4;\n const index = HEAPU32[offset++];\n const count = HEAPU32[offset++];\n const captureIndices = [];\n for (let i = 0; i < count; i++) {\n const beg = string.convertUtf8OffsetToUtf16(HEAPU32[offset++]);\n const end = string.convertUtf8OffsetToUtf16(HEAPU32[offset++]);\n captureIndices[i] = {\n start: beg,\n end,\n length: end - beg\n };\n }\n return {\n index,\n captureIndices\n };\n }\n}\nfunction isInstantiatorOptionsObject(dataOrOptions) {\n return typeof dataOrOptions.instantiator === \"function\";\n}\nfunction isInstantiatorModule(dataOrOptions) {\n return typeof dataOrOptions.default === \"function\";\n}\nfunction isDataOptionsObject(dataOrOptions) {\n return typeof dataOrOptions.data !== \"undefined\";\n}\nfunction isResponse(dataOrOptions) {\n return typeof Response !== \"undefined\" && dataOrOptions instanceof Response;\n}\nfunction isArrayBuffer(data) {\n return typeof ArrayBuffer !== \"undefined\" && (data instanceof ArrayBuffer || ArrayBuffer.isView(data)) || typeof Buffer !== \"undefined\" && Buffer.isBuffer?.(data) || typeof SharedArrayBuffer !== \"undefined\" && data instanceof SharedArrayBuffer || typeof Uint32Array !== \"undefined\" && data instanceof Uint32Array;\n}\nlet initPromise;\nfunction loadWasm(options) {\n if (initPromise)\n return initPromise;\n async function _load() {\n onigBinding = await main(async (info) => {\n let instance = options;\n instance = await instance;\n if (typeof instance === \"function\")\n instance = await instance(info);\n if (typeof instance === \"function\")\n instance = await instance(info);\n if (isInstantiatorOptionsObject(instance)) {\n instance = await instance.instantiator(info);\n } else if (isInstantiatorModule(instance)) {\n instance = await instance.default(info);\n } else {\n if (isDataOptionsObject(instance))\n instance = instance.data;\n if (isResponse(instance)) {\n if (typeof WebAssembly.instantiateStreaming === \"function\")\n instance = await _makeResponseStreamingLoader(instance)(info);\n else\n instance = await _makeResponseNonStreamingLoader(instance)(info);\n } else if (isArrayBuffer(instance)) {\n instance = await _makeArrayBufferLoader(instance)(info);\n } else if (instance instanceof WebAssembly.Module) {\n instance = await _makeArrayBufferLoader(instance)(info);\n } else if (\"default\" in instance && instance.default instanceof WebAssembly.Module) {\n instance = await _makeArrayBufferLoader(instance.default)(info);\n }\n }\n if (\"instance\" in instance)\n instance = instance.instance;\n if (\"exports\" in instance)\n instance = instance.exports;\n return instance;\n });\n }\n initPromise = _load();\n return initPromise;\n}\nfunction _makeArrayBufferLoader(data) {\n return (importObject) => WebAssembly.instantiate(data, importObject);\n}\nfunction _makeResponseStreamingLoader(data) {\n return (importObject) => WebAssembly.instantiateStreaming(data, importObject);\n}\nfunction _makeResponseNonStreamingLoader(data) {\n return async (importObject) => {\n const arrayBuffer = await data.arrayBuffer();\n return WebAssembly.instantiate(arrayBuffer, importObject);\n };\n}\n\nlet _defaultWasmLoader;\nfunction setDefaultWasmLoader(_loader) {\n _defaultWasmLoader = _loader;\n}\nfunction getDefaultWasmLoader() {\n return _defaultWasmLoader;\n}\nasync function createOnigurumaEngine(options) {\n if (options)\n await loadWasm(options);\n return {\n createScanner(patterns) {\n return new OnigScanner(patterns.map((p) => typeof p === \"string\" ? p : p.source));\n },\n createString(s) {\n return new OnigString(s);\n }\n };\n}\n\nexport { createOnigurumaEngine, getDefaultWasmLoader, loadWasm, setDefaultWasmLoader };\n","import { n as __reExport, t as __exportAll } from \"./chunk-CtajNgzt.mjs\";\n\nexport * from \"@shikijs/engine-oniguruma\"\n\n//#region src/engine-oniguruma.ts\nvar engine_oniguruma_exports = /* @__PURE__ */ __exportAll({});\nimport * as import__shikijs_engine_oniguruma from \"@shikijs/engine-oniguruma\";\n__reExport(engine_oniguruma_exports, import__shikijs_engine_oniguruma);\n\n//#endregion\nexport { engine_oniguruma_exports as t };","import { n as __reExport, t as __exportAll } from \"./chunk-CtajNgzt.mjs\";\nimport { t as engine_oniguruma_exports } from \"./engine-oniguruma.mjs\";\nimport { i as bundledLanguagesInfo, n as bundledLanguagesAlias, r as bundledLanguagesBase, t as bundledLanguages } from \"./langs-bundle-full-DfKZStlK.mjs\";\nimport { bundledThemes, bundledThemesInfo } from \"./themes.mjs\";\nimport { createBundledHighlighter, createSingletonShorthands, guessEmbeddedLanguages } from \"@shikijs/core\";\n\nexport * from \"@shikijs/core\"\n\n//#region src/bundle-full.ts\nvar bundle_full_exports = /* @__PURE__ */ __exportAll({\n\tbundledLanguages: () => bundledLanguages,\n\tbundledLanguagesAlias: () => bundledLanguagesAlias,\n\tbundledLanguagesBase: () => bundledLanguagesBase,\n\tbundledLanguagesInfo: () => bundledLanguagesInfo,\n\tbundledThemes: () => bundledThemes,\n\tbundledThemesInfo: () => bundledThemesInfo,\n\tcodeToHast: () => codeToHast,\n\tcodeToHtml: () => codeToHtml,\n\tcodeToTokens: () => codeToTokens,\n\tcodeToTokensBase: () => codeToTokensBase,\n\tcodeToTokensWithThemes: () => codeToTokensWithThemes,\n\tcreateHighlighter: () => createHighlighter,\n\tgetLastGrammarState: () => getLastGrammarState,\n\tgetSingletonHighlighter: () => getSingletonHighlighter\n});\n/**\n* Initiate a highlighter instance and load the specified languages and themes.\n* Later it can be used synchronously to highlight code.\n*\n* Importing this function will bundle all languages and themes.\n* @see https://shiki.style/guide/bundles#shiki-bundle-full\n*\n* For granular control over the bundle, check:\n* @see https://shiki.style/guide/bundles#fine-grained-bundle\n*/\nconst createHighlighter = /* @__PURE__ */ createBundledHighlighter({\n\tlangs: bundledLanguages,\n\tthemes: bundledThemes,\n\tengine: () => (0, engine_oniguruma_exports.createOnigurumaEngine)(import(\"shiki/wasm\"))\n});\nconst { codeToHtml, codeToHast, codeToTokens, codeToTokensBase, codeToTokensWithThemes, getSingletonHighlighter, getLastGrammarState } = /* @__PURE__ */ createSingletonShorthands(createHighlighter, { guessEmbeddedLanguages });\n\n//#endregion\nexport { bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo, bundledThemes, bundledThemesInfo, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, getLastGrammarState, getSingletonHighlighter, bundle_full_exports as t };","import {\n createShikiHighlighterComponent,\n isInlineCode,\n isLoadableLanguage,\n rehypeInlineCodeProperty,\n useShikiHighlighter\n} from \"./chunk-QPJZGYHO.js\";\n\n// src/bundles/full.ts\nimport {\n getSingletonHighlighter,\n bundledLanguages\n} from \"shiki\";\nimport { createOnigurumaEngine } from \"shiki/engine/oniguruma\";\nasync function createFullHighlighter(langsToLoad, themesToLoad, engine) {\n const langs = langsToLoad.filter(\n (lang) => isLoadableLanguage(lang, bundledLanguages)\n );\n return await getSingletonHighlighter({\n langs,\n themes: themesToLoad,\n engine: engine ?? createOnigurumaEngine(import(\"shiki/wasm\"))\n });\n}\n\n// src/index.ts\nimport {\n createJavaScriptRegexEngine,\n createJavaScriptRawEngine\n} from \"shiki/engine/javascript\";\nvar useShikiHighlighter2 = (code, lang, themeInput, options = {}) => {\n return useShikiHighlighter(\n code,\n lang,\n themeInput,\n options,\n createFullHighlighter\n );\n};\nvar ShikiHighlighter = createShikiHighlighterComponent(\n useShikiHighlighter2\n);\nvar src_default = ShikiHighlighter;\nexport {\n ShikiHighlighter,\n createJavaScriptRawEngine,\n createJavaScriptRegexEngine,\n src_default as default,\n isInlineCode,\n rehypeInlineCodeProperty,\n useShikiHighlighter2 as useShikiHighlighter\n};\n//# sourceMappingURL=index.js.map","import { useDeferredValue, useMemo, type JSX } from 'react';\nimport { useShikiHighlighter } from 'react-shiki';\n\nimport { HighlightCode } from '../../highlight/HighlightCode.js';\n\ntype Props = {\n badgeLabel: string;\n code: string;\n language: string;\n};\n\nconst DEFAULT_THEME = 'github-light';\n\nexport const MarkdownShikiCodeBlock = ({\n badgeLabel,\n code,\n language,\n}: Props): JSX.Element => {\n const normalizedCode = useMemo(() => {\n return code.replace(/\\s+$/, '');\n }, [code]);\n const deferredCode = useDeferredValue(normalizedCode);\n const highlighted = useShikiHighlighter(\n deferredCode,\n language,\n DEFAULT_THEME,\n {\n delay: 60,\n showLineNumbers: false,\n },\n );\n\n return (\n <HighlightCode\n badgeLabel={badgeLabel}\n copyCode={deferredCode}\n fallbackCodeText={deferredCode}\n highlighted={highlighted}\n />\n );\n};\n\nexport default MarkdownShikiCodeBlock;\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69],"mappings":";;;;;AA4DA,SAAgBA,EAAU,GAAQ,GAAS;CACzC,IAAM,IAAW,KAAW,EAAE;AAK9B,SAFc,EAAO,EAAO,SAAS,OAAO,KAAK,CAAC,GAAG,GAAQ,GAAG,GAAG,GAGhE,MACE,EAAS,WAAW,MAAM,MACzB,OACC,EAAS,YAAY,KAAQ,KAAK,KACtC,CACA,MAAM;;;;AE9DX,IAAM,IAAS,2DACT,IAAY,4DAGZC,IAAe,EAAE;AA0CvB,SAAgB,EAAK,GAAM,GAAS;AAGlC,UAFiB,KAAWA,GACR,MAAM,IAAY,GAC5B,KAAK,EAAK;;;;ACrDtB,IAAM,IAAK;AAaX,SAAgB,EAAW,GAAO;AAChC,QAAO,OAAO,KAAU,WACpB,EAAM,SAAS,SACb,EAAM,EAAM,MAAM,GAClB,KACF,EAAM,EAAM;;AAOlB,SAAS,EAAM,GAAO;AACpB,QAAO,EAAM,QAA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