{"version":3,"file":"index.umd.cjs","names":["defaultLocale"],"sources":["../src/Lexer/tokenizeInput.ts","../src/RstNode/RstNode.ts","../src/utils/removeEscapeChar.ts","../src/RstNode/Inline/Text.ts","../src/SimpleName.ts","../src/RstNode/Inline/CitationRef.ts","../src/RstNode/Inline/Emphasis.ts","../src/RstNode/Inline/FootnoteRef.ts","../src/utils/parseEmbededRef.ts","../src/RstNode/Inline/HyperlinkRef.ts","../src/RstNode/Inline/InlineInternalTarget.ts","../src/RstNode/Inline/InlineLiteral.ts","../src/RstNode/Inline/InterpretedText.ts","../src/RstNode/Inline/StrongEmphasis.ts","../src/RstNode/Inline/SubstitutionRef.ts","../src/utils/isMatchingQuotationMarks.ts","../src/RstNode/Block/Blockquote.ts","../src/RstNode/Block/BlockquoteAttribution.ts","../src/RstNode/Block/DoctestBlock.ts","../src/RstNode/List/FieldListItem.ts","../src/RstNode/List/FieldList.ts","../src/RstNode/Block/Document.ts","../src/RstNode/Block/LineBlock.ts","../src/RstNode/Block/LiteralBlock.ts","../src/utils/convertUnicode.ts","../src/RstNode/ExplicitMarkup/Directive.ts","../src/Parser/Resolver/SubstitutionResolver.ts","../src/Parser/Resolver/HtmlAttrResolver.ts","../src/Generator/FilePathWithoutRst.ts","../src/RstNode/Block/Section.ts","../src/Generator/HtmlAttributeStore.ts","../src/utils/sha1.ts","../src/RstNode/ExplicitMarkup/CitationDef.ts","../src/RstNode/ExplicitMarkup/FootnoteDef.ts","../src/RstNode/ExplicitMarkup/HyperlinkTarget.ts","../src/utils/trimCommonIndent.ts","../src/Parser/Resolver/SimpleNameResolver.ts","../src/utils/getAutoFootnoteSymbol.ts","../src/utils/path.ts","../src/Generator/RstGeneratorState.ts","../src/Generator/RstGeneratorError.ts","../src/RstNode/Block/Paragraph.ts","../src/RstNode/Block/Transition.ts","../src/RstNode/ExplicitMarkup/CitationDefGroup.ts","../src/RstNode/ExplicitMarkup/Comment.ts","../src/RstNode/ExplicitMarkup/FootnoteDefGroup.ts","../src/RstNode/ExplicitMarkup/SubstitutionDef.ts","../src/RstNode/List/BulletList.ts","../src/utils/romanToInt.ts","../src/RstNode/List/BulletListItem.ts","../src/RstNode/List/DefinitionList.ts","../src/RstNode/List/DefinitionListItem.ts","../src/RstNode/List/EnumeratedList.ts","../src/RstNode/List/OptionList.ts","../src/RstNode/List/OptionListItem.ts","../src/RstNode/Table/TableCell.ts","../src/RstNode/Table/Table.ts","../src/RstNode/Table/TableRow.ts","../src/Parser/RstNodeRegistrar.ts","../src/utils/mergeSequentialTextNodes.ts","../src/Parser/RstParserError.ts","../src/RstNode/List/EnumeratedListType.ts","../src/utils/mergeSequentialLists.ts","../src/Parser/NodeParsers/fieldListParser.ts","../src/Parser/RstParserState.ts","../node_modules/.pnpm/lodash.merge@4.6.2/node_modules/lodash.merge/index.js","../src/Generator/RstGeneratorOptions.ts","../src/Parser/RstParserOptions.ts","../src/Plugins/Only/parsePythonBinaryExpr.ts","../src/Plugins/Only/OnlyPlugin.ts","../src/Generator/RstGenerator.ts","../src/RstCompilerPlugin.ts","../src/Plugins/Container/ContainerPlugin.ts","../src/Plugins/Admonition/AdmonitionPlugin.ts","../src/Plugins/Math/MathPlugin.ts","../src/utils/sanitizeHtml.ts","../src/Plugins/Code/renderCodeBlockHtml.ts","../src/Plugins/Code/renderCodeBlockMd.ts","../src/Plugins/Code/CodePlugin.ts","../src/utils/assertNode.ts","../src/Plugins/Domains/Js/JsPropGroup.ts","../src/Plugins/Domains/Js/jsDirectiveOptionsGenerator.ts","../src/Plugins/Domains/Js/getJsLocalName.ts","../src/Plugins/Domains/Js/getParentModules.ts","../src/Plugins/Domains/Js/jsDirectiveGenerators.ts","../src/Plugins/Domains/Js/jsInterpretedTextGenerators.ts","../src/Plugins/Domains/Js/JsPlugin.ts","../src/Plugins/Tabs/Tabs.browser.js?raw","../src/Plugins/Tabs/TabsPlugin.ts","../src/Plugins/TocTree/TocTreePlugin.ts","../src/Plugins/Centered/CenteredPlugin.ts","../src/Plugins/HtmlClass/HtmlClassPlugin.ts","../src/Plugins/Image/getImageInfo.ts","../src/Plugins/Image/createImgTagHtml.ts","../src/Plugins/Image/createImgTagMd.ts","../src/Plugins/Image/ImagePlugin.ts","../src/Plugins/Meta/MetaPlugin.ts","../src/utils/parseCsv.ts","../src/Generator/NodeGenerators/tableGenerators.ts","../src/Plugins/Table/TablePlugin.ts","../src/Plugins/RawText/RawTextPlugin.ts","../src/Plugins/Video/VideoPlugin.ts","../src/Plugins/InterpretedText/PepRfcPlugin.ts","../src/utils/parseAbbr.ts","../src/Plugins/InterpretedText/Generators/Abbreviation.ts","../src/Plugins/InterpretedText/Generators/Acronym.ts","../src/Plugins/InterpretedText/Generators/Doc.ts","../src/Plugins/InterpretedText/Generators/Download.ts","../src/Plugins/InterpretedText/Generators/Emphasis.ts","../src/Plugins/InterpretedText/Generators/Kbd.ts","../src/Plugins/InterpretedText/Generators/Literal.ts","../src/Plugins/InterpretedText/Generators/Ref.ts","../src/Plugins/InterpretedText/Generators/Strong.ts","../src/Plugins/InterpretedText/Generators/Subscript.ts","../src/Plugins/InterpretedText/Generators/Superscript.ts","../src/Plugins/InterpretedText/Generators/TitleRef.ts","../src/Plugins/InterpretedText/InterpretedTextPlugin.ts","../src/Plugins/Rubric/RubricPlugin.ts","../src/Plugins/Contents/TocTree.ts","../src/Plugins/Contents/ContentsPlugin.ts","../src/Parser/NodeParsers/citationGroupParser.ts","../src/Parser/NodeParsers/directiveParser.ts","../src/Parser/NodeParsers/footnoteDefGroupParser.ts","../src/Parser/NodeParsers/commentParser.ts","../src/Parser/NodeParsers/hyperlinkTargetParser.ts","../src/Parser/NodeParsers/literalBlockParser.ts","../src/Parser/NodeParsers/paragraphParser.ts","../src/utils/escapeForRegExp.ts","../src/Parser/NodeParsers/sectionParser.ts","../src/Parser/NodeParsers/substitutionDefParser.ts","../src/Parser/NodeParsers/transitionParser.ts","../src/Parser/NodeParsers/blockquoteAttributionParser.ts","../src/Parser/NodeParsers/blockquoteParser.ts","../src/Parser/NodeParsers/doctestBlockParser.ts","../src/Parser/NodeParsers/lineBlockParser.ts","../src/utils/createBooleanTable.ts","../src/Parser/NodeParsers/tableGridParser.ts","../src/Parser/NodeParsers/tableSimpleParser.ts","../src/Parser/NodeParsers/bulletListParser.ts","../src/Parser/NodeParsers/definitionListParser.ts","../src/Parser/NodeParsers/enumeratedListParser.ts","../src/Parser/NodeParsers/optionListParser.ts","../src/Generator/NodeGenerators/paragraphGenerators.ts","../src/Generator/NodeGenerators/blockquoteGenerators.ts","../src/Generator/NodeGenerators/bulletListGenerators.ts","../src/Generator/NodeGenerators/citationDefGenerators.ts","../src/Generator/NodeGenerators/commentGenerators.ts","../src/Generator/NodeGenerators/definitionListGenerators.ts","../src/Generator/NodeGenerators/docTestBlockGenerators.ts","../src/Generator/NodeGenerators/documentGenerators.ts","../src/Generator/NodeGenerators/enumeratedListGenerators.ts","../src/Generator/NodeGenerators/fieldListGenerators.ts","../src/Generator/NodeGenerators/footnoteDefGenerators.ts","../src/Generator/NodeGenerators/hyperlinkRefGenerators.ts","../src/Generator/NodeGenerators/hyperlinkTargetGenerators.ts","../src/Generator/NodeGenerators/inlineInternalTargetGenerators.ts","../src/Generator/NodeGenerators/lineBlockGenerators.ts","../src/Generator/NodeGenerators/literalBlockGenerators.ts","../src/Generator/NodeGenerators/optionListGenerators.ts","../src/Generator/NodeGenerators/sectionGenerators.ts","../src/Generator/NodeGenerators/substitutionDefGenerators.ts","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeek.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeekYear.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarDays.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeekYear.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfYear.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeek.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeekYear.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeekYear.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeek.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/longFormatters.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/protectedTokens.js","../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js","../src/Generator/NodeGenerators/substitutionRefGenerators.ts","../src/Generator/NodeGenerators/textGenerators.ts","../src/Generator/NodeGenerators/transitionGenerators.ts","../src/Generator/NodeGenerators/citationRefGenerators.ts","../src/Generator/NodeGenerators/footnoteRefGenerators.ts","../src/Defaults.ts","../src/RstCompiler.ts"],"sourcesContent":["import type { Token } from './Token.ts'\n\nexport function tokenizeInput(input: string): Array<Token> {\n    const tokens = new Array<Token>()\n\n    let idx = 0\n    while (idx < input.length) {\n        const idxOfNextNewLine = input.indexOf('\\n', idx)\n        const start = idx\n        const end = idxOfNextNewLine === -1\n            ? input.length\n            : idxOfNextNewLine\n\n        const str = input.slice(start, end)\n\n        tokens.push({\n            idx,\n            str,\n        })\n\n        idx = end + 1 // Skip \\n character\n    }\n\n    return tokens\n}\n","import type { RstNodeMap } from './RstNodeMap.ts'\nimport type { RstNodeId, RstNodeRegistrar, RstNodeRegistration } from '../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from './RstNodeType.ts'\n\nexport type RstNodeSource = {\n    startLineIdx: number\n    endLineIdx: number // exclusive\n}\n\n// For diff testing and visual inspection (does not necessarily contain info to reconstruct object)\nexport type RstNodeObject = {\n    type: RstNodeType\n    text?: string\n    data?: Record<string,\n        | string | ReadonlyArray<string>\n        | number | ReadonlyArray<number>\n        | boolean | ReadonlyArray<boolean>\n        | RstNodeObject | ReadonlyArray<RstNodeObject> | ReadonlyArray<ReadonlyArray<RstNodeObject>>\n        | Record<string, string | undefined> | ReadonlyArray<Record<string, string | undefined>>\n        | undefined | null\n    >\n    children?: Array<RstNodeObject>\n}\n\n// For serializing internals to JSON and back\nexport type RstNodeJson<RstNodeData = unknown> = {\n    type: RstNodeType\n    data: RstNodeData\n    source: RstNodeSource\n    children: Array<RstNodeJson>\n}\n\nexport abstract class RstNode {\n    readonly source: Readonly<RstNodeSource>\n    readonly children: ReadonlyArray<RstNode>\n\n    private _registration: RstNodeRegistration\n    private _parent: RstNode | null = null// Private so nobody else can edit this value but our constructor\n\n    // ------------------------------------------------------------------------\n    // MARK: Constructor\n    // ------------------------------------------------------------------------\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n    ) {\n        this.source = source\n        this.children = children\n\n        for (const child of this.children) {\n            child._parent = this\n        }\n\n        this._registration = registrar.registerNewNode(this)\n    }\n\n    toObject(): RstNodeObject {\n        const root: RstNodeObject = {\n            type: this.nodeType,\n        }\n\n        if (this.shouldExportPlainText) {\n            root.text = this.textContent\n        } else if (this.shouldExportChildren) {\n            root.children = this.children.map((child) => child.toObject())\n        }\n\n        return root\n    }\n\n    toJSON(): RstNodeJson {\n        return {\n            type: this.nodeType,\n            data: {},\n            source: this.source,\n            children: this.children.map((child) => child.toJSON()),\n        }\n    }\n\n    equals(other: RstNode) {\n        return this === other\n    }\n\n    abstract clone(registrar: RstNodeRegistrar): RstNode\n\n    abstract get nodeType(): RstNodeType\n\n    get parent(): RstNode | null {\n        return this._parent\n    }\n\n    get id(): RstNodeId {\n        return this._registration.id\n    }\n\n    get nthOfType(): number {\n        return this._registration.nthOfType\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Data\n    // ------------------------------------------------------------------------\n\n    get isInlineNode(): boolean {\n        return false\n    }\n\n    get willRenderVisibleContent(): boolean {\n        return true\n    }\n\n    /**\n     * When exporting node with toObject, if this function returns true, then the node will simply be\n     *  {\n     *      type: TYPE,\n     *      text: node.textContent,\n     *  }\n     */\n    get shouldExportPlainText(): boolean {\n        return this.children.length === 1 && (\n            (this.children[0].nodeType === 'Text') ||\n            (this.children[0].nodeType === 'Paragraph' && this.children[0].shouldExportPlainText)\n        )\n    }\n\n    get shouldExportChildren(): boolean {\n        return this.children.length > 0\n    }\n\n    get textContent(): string {\n        let str = ''\n\n        for (const child of this.children) {\n            str += child.textContent\n        }\n\n        return str\n    }\n\n    get rawTextContent(): string {\n        let str = ''\n\n        for (const child of this.children) {\n            str += child.rawTextContent\n        }\n\n        return str\n    }\n\n    get lineNums(): string {\n        const start = this.source.startLineIdx + 1 // Prints line numbers in 1-based counting for ease of reading\n        const end = this.source.endLineIdx // Do not +1 so this is inclusive\n        const lineNums = (start === end)\n            ? `${start}`\n            : `${start}-${end}`\n\n        return `line:${lineNums}`\n    }\n\n    toShortString(): string {\n        return `${this.nodeType} id:${this.id} children:${this.children.length}`\n    }\n\n    toString(depth = 0): string {\n        const selfTab = '  '.repeat(depth)\n        const childTab = '  '.repeat(depth + 1)\n\n        let str = selfTab + `[${this.toShortString()}] (${this.lineNums})\\n`\n\n        if (this.shouldExportPlainText) {\n            for (const line of this.textContent.split('\\n')) {\n                str += childTab + `\"${line}\"\\n`\n            }\n        } else {\n            for (const child of this.children) {\n                str += child.toString(depth + 1)\n            }\n        }\n\n        return str\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Tree Traversal\n    // ------------------------------------------------------------------------\n\n    getRoot(): RstNode {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        let currNode: RstNode | null = this\n\n        while (true) {\n            if (!currNode.parent) {\n                return currNode\n            }\n\n            currNode = currNode.parent\n        }\n    }\n\n    getParent<T extends keyof RstNodeMap>(expectedParentType: T): RstNodeMap[T] | null {\n        if (!this._parent) {\n            return null\n        }\n\n        if (this._parent.nodeType !== expectedParentType) {\n            return null\n        }\n\n        return this._parent as RstNodeMap[T]\n    }\n\n    isFirstChild(): boolean {\n        if (!this._parent) {\n            return true\n        }\n\n        return this._parent.children.at(0) === this\n    }\n\n    getMyIndexInParent(): number | null {\n        const idx = this._parent?.children.findIndex((child) => child === this)\n        if (idx === undefined || idx < 0) {\n            return null\n        }\n\n        return idx\n    }\n\n    getPrevSibling(): RstNode | null {\n        if (!this._parent) {\n            return null\n        }\n\n        let prev: RstNode | null = null\n        for (const child of this._parent.children) {\n            if (child === this) {\n                return prev\n            }\n\n            prev = child\n        }\n\n        return null\n    }\n\n    getNextSibling(): RstNode | null {\n        if (!this._parent) {\n            return null\n        }\n\n        let prev: RstNode | null = null\n        for (const child of this._parent.children) {\n            if (prev === this) {\n                return child\n            }\n\n            prev = child\n        }\n\n        return null\n    }\n\n    getPrevNodeInTree(): RstNode | null {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        let currNode: RstNode | null = this\n        let prevSibling: RstNode | null = null\n\n        while (currNode !== null) {\n            prevSibling = currNode.getPrevSibling()\n            if (prevSibling) {\n                return prevSibling\n            }\n\n            currNode = currNode._parent\n        }\n\n        return null\n    }\n\n    getNextNodeInTree(): RstNode | null {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        let currNode: RstNode | null = this\n        let nextSibling: RstNode | null = null\n\n        while (currNode !== null) {\n            nextSibling = currNode.getNextSibling()\n            if (nextSibling) {\n                return nextSibling\n            }\n\n            currNode = currNode._parent\n        }\n\n        return null\n    }\n\n    hasChild(pred: (child: RstNode) => boolean): boolean {\n        let res = false\n\n        for (const child of this.children) {\n            res ||= pred(child) || child.hasChild(pred)\n\n            // Early return\n            if (res) {\n                return true\n            }\n        }\n\n        return res\n    }\n\n    findChildWithTextContent(needle: string): RstNode | null {\n        if (this.textContent === needle) {\n            return this\n        }\n\n        for (const child of this.children) {\n            const res = child.findChildWithTextContent(needle)\n            if (res) {\n                return res\n            }\n        }\n\n        return null\n    }\n\n    findFirstChild<T extends keyof RstNodeMap>(targetNodeType: T): RstNodeMap[T] | null {\n        for (const child of this.children) {\n            if (child.nodeType === targetNodeType) {\n                return child as RstNodeMap[T]\n            }\n\n            const grandChild = child.findFirstChild(targetNodeType)\n            if (grandChild) {\n                return grandChild\n            }\n        }\n\n        return null\n    }\n\n    findAllChildren<T extends keyof RstNodeMap>(targetNodeType: T): ReadonlyArray<RstNodeMap[T]> {\n        const foundNodes = new Array<RstNode>()\n        const dfs = (node: RstNode) => {\n            if (node.nodeType === targetNodeType) {\n                foundNodes.push(node)\n            }\n\n            for (const child of node.children) {\n                dfs(child)\n            }\n        }\n\n        dfs(this)\n        return foundNodes as unknown as Array<RstNodeMap[T]>\n    }\n}\n","export function removeEscapeChar(origText: string, isUrl = false): string {\n    let newText = ''\n\n    for (let i = 0; i < origText.length; i++) {\n        const char = origText[i]\n        if (char !== '\\\\') {\n            // Not escape character, continue as normal\n            newText += char\n            continue\n        }\n\n        const nextChar = origText.at(i + 1)\n        if (nextChar === undefined) {\n            // There is no nextChar (end of string)\n            // Assume escape slash is to be interpreted as literal slash\n            newText += '\\\\'\n        } else if (!/\\s/.test(nextChar)) {\n            // Include nextChar as literal if it's not a whitespace\n            newText += nextChar\n        } else if (/\\s/.test(nextChar) && isUrl) {\n            // Escaped whitespace in url context is treated as single space\n            newText += ' '\n        }\n\n        i += 1 // Just processed nextChar so skip over it\n    }\n\n    return newText\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport { removeEscapeChar } from '../../utils/removeEscapeChar.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstTextData = {\n    rawText: string\n}\n\nexport class RstText extends RstNode {\n    protected readonly rawText: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        rawText: string,\n    ) {\n        super(registrar, source)\n        this.rawText = rawText\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n        root.text = this.textContent\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstTextData>\n\n        root.data = {\n            rawText: this.rawText,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTextData>): RstText {\n        return new RstText(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstText {\n        return new RstText(registrar, structuredClone(this.source), this.rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Text'\n    }\n\n    override get isInlineNode(): boolean {\n        return true\n    }\n\n    override get shouldExportPlainText(): boolean {\n        // Only this parent class is plaintext (e.g. Text that subclasses this should not be considered plaintext)\n        return this.nodeType === 'Text'\n    }\n\n    override get textContent(): string {\n        return removeEscapeChar(this.rawText)\n    }\n\n    override get rawTextContent(): string {\n        return this.rawText\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} len:${this.textContent.length}`\n    }\n\n    override toString(depth = 0): string {\n        const selfTab = '  '.repeat(depth)\n        const childTab = '  '.repeat(depth + 1)\n\n        let str = selfTab + `[${this.toShortString()}] (${this.lineNums})\\n`\n        for (const line of this.textContent.split('\\n')) {\n            str += childTab + `\"${line}\"\\n`\n        }\n\n        return str\n    }\n}\n\nexport type ContinuousText = Array<RstText>\n","import type { Brand } from './@types/Brand.ts'\n\nexport const simpleNameReStr = '(?:[a-zA-Z][a-zA-Z0-9_.:+<>]*?)'\n\n/**\n * Reference Name (called SimpleName in this project to avoid confusion with RstNodes that include \"Ref\" e.g. SubstitutionRef)\n *\n * For cross-referencing elements\n * https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#reference-names\n *\n *  For (case-insensitive):\n * - Footnote label\n * - Citation label\n * - InterpretedText role\n *\n * Also for (in another namespace but is case-sensitive):\n * - SubstitutionDef label\n * - SubstitutionRef label\n */\nexport type SimpleName = Brand<string, 'SimpleName'>\n\n/**\n * SimpleName sanitized to be safe to use in html id attr\n */\nexport type SanitizedSimpleName = Brand<string, 'SanitizedSimpleName'>\n\n/**\n * This function converts origName to normalized form for cross-referencing between documents and for output\n *\n * Note:\n *      This function is slightly more strict than internal name normalization\n *      For internal names, the specs allow some other non-alphanumeric characters e.g. \"some:text\"\n *      However for external names, the normalization is more strict i.e. this function\n *      To keep things simple and to avoid having two normalized forms, we just normalize to this final form\n */\nexport function normalizeSimpleName(origName: string): SimpleName {\n    // 1. Accented characters to base character\n    origName = origName.normalize('NFD').replaceAll(/[\\u0300-\\u036f]/g, '')\n\n    // 2. Lowercase all letters\n    origName = origName.toLowerCase()\n\n    // 3. Invalid characters to hyphens\n    origName = origName.replaceAll(/[^a-zA-Z0-9\\-_.:+<>]/g, '-')\n\n    // 4. Consecutive hyphens to one hyphen\n    origName = origName.replaceAll(/-{2,}/g, '-')\n\n    // 5. Strip leading hyphens\n    origName = origName.replace(/^[-]*/, '')\n\n    // 6. Strip trailing hyphens\n    origName = origName.replace(/[-]*$/, '')\n\n    return origName as SimpleName\n}\n\nexport function sanitizeSimpleName(origName: string): SanitizedSimpleName {\n    // 1. Accented characters to base character\n    origName = origName.normalize('NFD').replaceAll(/[\\u0300-\\u036f]/g, '')\n\n    // 2. Lowercase all letters\n    origName = origName.toLowerCase()\n\n    // 3. Invalid characters to hyphens\n    origName = origName.replaceAll(/[^a-zA-Z0-9]/g, '-')\n\n    // 4. Consecutive hyphens to one hyphen\n    origName = origName.replaceAll(/-{2,}/g, '-')\n\n    // 5. Strip leading hyphens/numbers\n    origName = origName.replace(/^[-\\d]*/, '')\n\n    // 6. Strip trailing hyphens\n    origName = origName.replace(/[-]*$/, '')\n\n    return origName as SanitizedSimpleName\n}\n\nexport function isSimpleName(text: string): text is SimpleName {\n    return new RegExp(`^${simpleNameReStr}$`).test(text)\n}\n","import { isSimpleName } from '../../SimpleName.ts'\nimport type { RstNodeJson } from '../RstNode.ts'\nimport { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstCitationRef extends RstText {\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTextData>): RstCitationRef {\n        return new RstCitationRef(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstCitationRef {\n        return new RstCitationRef(registrar, structuredClone(this.source), this.rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'CitationRef'\n    }\n\n    static isValidText(bodyText: string): boolean {\n        return isSimpleName(bodyText)\n    }\n}\n","import type { RstNodeJson } from '../RstNode.ts'\nimport { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstEmphasis extends RstText {\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTextData>): RstEmphasis {\n        return new RstEmphasis(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstEmphasis {\n        return new RstEmphasis(registrar, structuredClone(this.source), this.rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Emphasis'\n    }\n}\n","import { isSimpleName } from '../../SimpleName.ts'\nimport type { RstNodeJson, RstNodeObject } from '../RstNode.ts'\nimport { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstFootnoteRef extends RstText {\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            isManualLabelNum: this.isManualLabelNum,\n            isAutoSymbol: this.isAutoSymbol,\n        }\n\n        return root\n    }\n\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTextData>): RstFootnoteRef {\n        return new RstFootnoteRef(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstFootnoteRef {\n        return new RstFootnoteRef(registrar, structuredClone(this.source), this.rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'FootnoteRef'\n    }\n\n    get isManualLabelNum(): boolean {\n        return /^[1-9]\\d*$/.test(this.rawText)\n    }\n\n    get isAutoSymbol(): boolean {\n        return this.rawText === '*'\n    }\n\n    static isValidText(bodyText: string): boolean {\n        if (/^[1-9]\\d*$/.test(bodyText)) {\n            return true\n        }\n\n        if (bodyText === '#') {\n            return true\n        }\n\n        if (bodyText.startsWith('#') && isSimpleName(bodyText.substring(1))) {\n            return true\n        }\n\n        if (bodyText === '*') {\n            return true\n        }\n\n        return false\n    }\n}\n","import { simpleNameReStr } from '../SimpleName.ts'\nimport { removeEscapeChar } from './removeEscapeChar.ts'\n\n// Good enough url regex that assumes url is at least 3 characters long (e.g. \"a.a\")\nexport const urlRe = /[a-zA-Z][\\w.\\-+]*:(?:\\/\\/)?[A-Za-z0-9\\-._~:/?#[\\]\\\\@!$&'()*+,;=]{3,}(?=\\s|$|>)/\nexport const emailRe = /[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+/\nexport const filePathRe = /\\/?(?:[\\w.\\-+]+\\/)+(?<fileName>\\w+)(?:\\.(?<fileExt>\\w+))?/\n\nexport const standaloneHyperlinkRefReStr = [\n    `(?:(?<simpleName>${simpleNameReStr})(?<simpleNameTail>__?))`,          // Name_\n    `<(?<embedUrl>${urlRe.source})>`,                                       // <https>\n    `(?<url>${urlRe.source})`,                                              // https\n    `<(?<embedEmail>${emailRe.source})>`,                                   // <a@b.c>\n    `(?<email>${emailRe.source})`,                                          // a@b.c\n].join('|')\n\nconst embededUrlRe = new RegExp('' +\n    '^' +\n        '(?:(?<label>(?:.|\\n)+?)\\\\s?)?' + // Label followed by optional whitespace\n        '(?<!\\\\\\\\)<' + // Opening bracket (not preceded by escape slash)\n        '(?<target>.+)' + // Target\n        '(?<!\\\\\\\\)>' + // Closing bracket (not preceded by escape slash)\n    '$',\n)\n\nexport function parseEmbededRef(rawText: string, targetMightBeEmail = false) {\n    const urlMatch = embededUrlRe.exec(rawText)\n    const rawLabel = urlMatch?.groups?.label ?? urlMatch?.groups?.target ?? rawText\n    const rawTarget = urlMatch?.groups?.target ?? rawText\n\n    const escapedLabel = removeEscapeChar(rawLabel)\n    const escapedTarget = removeEscapeChar(rawTarget)\n\n    const isEmbeded = Boolean(urlMatch?.groups?.target)\n    const isUrl = new RegExp(`^${urlRe.source}$`).test(escapedTarget)\n    const isEmail = targetMightBeEmail && new RegExp(`^${emailRe.source}$`).test(escapedTarget)\n    const isFilePath = new RegExp(`^${filePathRe.source}$`).test(escapedTarget)\n\n    const label = escapedLabel.startsWith('mailto:')\n        ? escapedLabel.substring('mailto:'.length)\n        : escapedLabel\n\n    const target = isEmail\n        ? `mailto:${escapedTarget}`\n        : escapedTarget\n\n    const isAlias = (() => {\n        // Embeded target can only be an alias if it ends with non-escaped underscore\n        if (isEmbeded) {\n            return rawTarget.endsWith('_') && !rawTarget.endsWith('\\\\_')\n        }\n\n        // If it's url/email/path, then it cannot be an alias\n        if (isUrl || isEmail || isFilePath) {\n            return false\n        }\n\n        // Anything else is treated as an alias to a linkable node (e.g. HyperlinkTarget, Citation, etc.)\n        return true\n    })()\n\n    return {\n        label,\n        target,\n        isAlias,\n        isEmbeded,\n    }\n}\n","import type { RstNodeJson, RstNodeObject, RstNodeSource } from '../RstNode.ts'\nimport { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport { parseEmbededRef } from '../../utils/parseEmbededRef.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstHyperlinkRefData = RstTextData & {\n    isAnonymous: boolean\n}\n\nexport class RstHyperlinkRef extends RstText {\n    readonly isAnonymous: boolean\n    readonly embededInfo: Readonly<ReturnType<typeof parseEmbededRef>>\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        rawText: string,\n        isAnonymous: boolean,\n    ) {\n        super(registrar, source, rawText)\n        this.isAnonymous = isAnonymous\n        this.embededInfo = parseEmbededRef(rawText, true)\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        if (this.label !== this.target) {\n            root.data = {\n                label: this.label,\n                target: this.target,\n            }\n        }\n\n        if (this.isAnonymous) {\n            if (!root.data) {\n                root.data = {}\n            }\n\n            root.data.isAnonymous = true\n        }\n\n        if (this.isAlias) {\n            if (!root.data) {\n                root.data = {}\n            }\n\n            root.data.isAlias = true\n        }\n\n        if (this.isEmbeded) {\n            if (!root.data) {\n                root.data = {}\n            }\n\n            root.data.isEmbeded = true\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstHyperlinkRefData>\n\n        root.data = {\n            rawText: this.rawText,\n            isAnonymous: this.isAnonymous,\n        }\n\n        return root\n    }\n\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstHyperlinkRefData>): RstHyperlinkRef {\n        return new RstHyperlinkRef(registrar, structuredClone(json.source), json.data.rawText, json.data.isAnonymous)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstHyperlinkRef {\n        return new RstHyperlinkRef(registrar, structuredClone(this.source), this.rawText, this.isAnonymous)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'HyperlinkRef'\n    }\n\n    override get textContent(): string {\n        return this.label\n    }\n\n    override get rawTextContent(): string {\n        return this.rawText\n    }\n\n    get label(): string {\n        return this.embededInfo.label\n    }\n\n    get target(): string {\n        return this.embededInfo.target\n    }\n\n    get isAlias(): boolean {\n        return this.embededInfo.isAlias\n    }\n\n    get isEmbeded(): boolean {\n        return this.embededInfo.isEmbeded\n    }\n\n    override toShortString(): string {\n        let str = `${super.toShortString()} label:\"${this.label}\" target:\"${this.target}\"`\n\n        if (this.isAnonymous) {\n            str += ` isAnonymous:${this.isAnonymous}`\n        }\n        if (this.isAlias) {\n            str += ` isAlias:${this.isAlias}`\n        }\n        if (this.isEmbeded) {\n            str += ` isEmbeded:${this.isEmbeded}`\n        }\n\n        return str\n    }\n}\n","import { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeJson } from '../RstNode.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstInlineInternalTarget extends RstText {\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTextData>): RstInlineInternalTarget {\n        return new RstInlineInternalTarget(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstInlineInternalTarget {\n        return new RstInlineInternalTarget(registrar, structuredClone(this.source), this.rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'InlineInternalTarget'\n    }\n}\n","import { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport type { RstNodeJson } from '../RstNode.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstInlineLiteral extends RstText {\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTextData>): RstInlineLiteral {\n        return new RstInlineLiteral(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstInlineLiteral {\n        return new RstInlineLiteral(registrar, structuredClone(this.source), this.rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'InlineLiteral'\n    }\n\n    override get textContent(): string {\n        // Do not escape InlineLiteral since by definition it should be raw text\n        return this.rawText\n    }\n\n    override get rawTextContent(): string {\n        return this.rawText\n    }\n}\n","import type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeJson, RstNodeObject, RstNodeSource } from '../RstNode.ts'\nimport { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\nexport const interpretedTextRoleRe = /[a-zA-Z0-9](?:[a-zA-Z0-9]|[-_+:.]{0,1}[a-zA-Z0-9])*/\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstInterpretedTextData = RstTextData & {\n    role: string\n}\n\nexport class RstInterpretedText extends RstText {\n    readonly role: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        rawText: string,\n        role: string,\n    ) {\n        super(registrar, source, rawText)\n        this.role = role\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            role: this.role,\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstInterpretedTextData>\n\n        root.data = {\n            rawText: this.rawText,\n            role: this.role,\n        }\n\n        return root\n    }\n\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstInterpretedTextData>): RstInterpretedText {\n        return new RstInterpretedText(registrar, structuredClone(json.source), json.data.rawText, json.data.role)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstInterpretedText {\n        return new RstInterpretedText(registrar, structuredClone(this.source), this.rawText, this.role)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'InterpretedText'\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} role:\"${this.role ?? 'NULL'}\"`\n    }\n}\n","import type { RstNodeJson } from '../RstNode.ts'\nimport { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstStrongEmphasis extends RstText {\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTextData>): RstStrongEmphasis {\n        return new RstStrongEmphasis(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstStrongEmphasis {\n        return new RstStrongEmphasis(registrar, structuredClone(this.source), this.rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'StrongEmphasis'\n    }\n}\n","import type { RstNodeJson } from '../RstNode.ts'\nimport { RstText, type RstTextData } from './Text.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstSubstitutionRef extends RstText {\n    static override reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTextData>): RstSubstitutionRef {\n        return new RstSubstitutionRef(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstSubstitutionRef {\n        return new RstSubstitutionRef(registrar, structuredClone(this.source), this.rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'SubstitutionRef'\n    }\n}\n","export function isMatchingQuotationMarks(start?: string, end?: string): boolean {\n    if (!start) {\n        return false\n    }\n    if (!end) {\n        return false\n    }\n\n    switch (true) {\n        case (start === \"'\" && end === \"'\"):\n        case (start === '\"' && end === '\"'):\n        case (start === '<' && end === '>'):\n        case (start === '(' && end === ')'):\n        case (start === '[' && end === ']'):\n        case (start === '{' && end === '}'):\n            return true\n    }\n\n    return false\n}\n","import { RstNode, type RstNodeJson } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#block-quotes\n// ----------------------------------------------------------------------------\n\nexport class RstBlockquote extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstBlockquote {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstBlockquote(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstBlockquote {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstBlockquote(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Blockquote'\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport type { ContinuousText } from '../Inline/Text.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#block-quotes\n// ----------------------------------------------------------------------------\n\nexport class RstBlockquoteAttribution extends RstNode {\n    protected readonly textNodes: ContinuousText\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        textNodes: ContinuousText = [],\n    ) {\n        super(registrar, source, textNodes)\n        this.textNodes = textNodes\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstBlockquoteAttribution {\n        const children = json.children.map((childJson) => registrar.reviveRstTextFromJson(childJson))\n        return new RstBlockquoteAttribution(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstBlockquoteAttribution {\n        const children = this.textNodes.map((child) => child.clone(registrar))\n        return new RstBlockquoteAttribution(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'BlockquoteAttribution'\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#doctest-blocks\n// ----------------------------------------------------------------------------\n\nexport type RstDoctestBlockData = {\n    rawText: string\n}\n\nexport class RstDoctestBlock extends RstNode {\n    private readonly _rawText: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        rawText: string,\n    ) {\n        super(registrar, source)\n        this._rawText = rawText\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstDoctestBlockData>\n\n        root.data = {\n            rawText: this._rawText,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstDoctestBlockData>): RstDoctestBlock {\n        return new RstDoctestBlock(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstDoctestBlock {\n        return new RstDoctestBlock(registrar, structuredClone(this.source), this._rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'DoctestBlock'\n    }\n\n    override get shouldExportPlainText(): boolean {\n        return true\n    }\n\n    override get textContent(): string {\n        // Don't escape code\n        return this._rawText\n    }\n\n    override get rawTextContent(): string {\n        return this._rawText\n    }\n}\n","import type { ContinuousText } from '../Inline/Text.ts'\nimport { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstFieldListItemData = {\n    name: Array<RstNodeJson>\n    body: Array<RstNodeJson>\n}\n\nexport class RstFieldListItem extends RstNode {\n    readonly name: ContinuousText\n    readonly body: ReadonlyArray<RstNode>\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        name: ContinuousText,\n        body: ReadonlyArray<RstNode>,\n    ) {\n        super(registrar, source, body)\n        this.name = name\n        this.body = body\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            name: this.name.map((node) => node.toObject()),\n            body: this.body.map((node) => node.toObject()),\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstFieldListItemData>\n\n        root.data = {\n            name: this.name.map((node) => node.toJSON()),\n            body: this.body.map((node) => node.toJSON()),\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstFieldListItemData>): RstFieldListItem {\n        const name = json.data.name.map((childJson) => registrar.reviveRstTextFromJson(childJson))\n        const body = json.data.body.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstFieldListItem(registrar, structuredClone(json.source), name, body)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstFieldListItem {\n        const name = this.name.map((child) => child.clone(registrar))\n        const body = this.body.map((child) => child.clone(registrar))\n        return new RstFieldListItem(registrar, structuredClone(this.source), name, body)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'FieldListItem'\n    }\n\n    override get shouldExportPlainText() {\n        return false\n    }\n\n    override get shouldExportChildren() {\n        return false\n    }\n\n    get nameText(): string {\n        return this.name.map((textNode) => textNode.textContent).join('')\n    }\n\n    get bodyText(): string {\n        return this.body.map((bodyNode) => bodyNode.textContent).join('')\n    }\n\n    override toString(depth = 0): string {\n        const selfTab = '  '.repeat(depth)\n\n        // Prints line numbers in 1-based counting for ease of reading\n        let str = selfTab + `[${this.toShortString()}] (${this.lineNums})\\n`\n\n        str += selfTab + '  (Name)' + '\\n'\n        for (const node of this.name) {\n            str += node.toString(depth + 2)\n        }\n\n        str += selfTab + '  (Body)' + '\\n'\n        for (const node of this.body) {\n            str += node.toString(depth + 2)\n        }\n\n        return str\n    }\n}\n","import { RstNode, type RstNodeJson } from '../RstNode.ts'\nimport { RstFieldListItem } from './FieldListItem.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#field-lists\n// ----------------------------------------------------------------------------\n\nexport class RstFieldList extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstFieldList {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstFieldList(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstFieldList {\n        const clonedChildren = this.children.map((child) => child.clone(registrar))\n        return new RstFieldList(registrar, structuredClone(this.source), clonedChildren)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'FieldList'\n    }\n\n    hasField(fieldName: string): boolean {\n        return this.getField(fieldName) !== null\n    }\n\n    getField(fieldName: string): string | null {\n        for (const child of this.children) {\n            if (!(child instanceof RstFieldListItem)) {\n                continue\n            }\n\n            if (child.nameText === fieldName) {\n                return child.bodyText\n            }\n        }\n\n        return null\n    }\n\n    toMapString(): string {\n        const lines = new Array<string>()\n\n        for (const child of this.children) {\n            if (!(child instanceof RstFieldListItem)) {\n                continue\n            }\n\n            lines.push(`\"${child.nameText}\":\"${child.bodyText}\"`)\n        }\n\n        return lines.join('\\n')\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeSource } from '../RstNode.ts'\nimport { RstFieldList } from '../List/FieldList.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#document\n// ----------------------------------------------------------------------------\n\nexport type RstDocumentData = {\n    readonly docMeta: RstNodeJson | null\n}\n\nexport class RstDocument extends RstNode {\n    readonly docMeta: RstFieldList | null\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        docMeta: RstFieldList | null,\n    ) {\n        super(registrar, source, children)\n        this.docMeta = docMeta\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstDocumentData>\n\n        root.data = {\n            docMeta: this.docMeta?.toJSON() ?? null,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstDocumentData>): RstDocument {\n        const docMeta = json.data.docMeta ? RstFieldList.reviveRstNodeFromJson(registrar, json.data.docMeta) : null\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstDocument(registrar, structuredClone(json.source), children, docMeta)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstDocument {\n        const docMeta = this.docMeta?.clone(registrar) ?? null\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstDocument(registrar, structuredClone(this.source), children, docMeta)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Document'\n    }\n\n    override get shouldExportPlainText(): boolean {\n        return false\n    }\n\n    override toString(depth = 0): string {\n        const selfTab = '  '.repeat(depth)\n\n        // Prints line numbers in 1-based counting for ease of reading\n        let str = selfTab + `[${this.toShortString()}] (${this.lineNums})\\n`\n\n        if (this.docMeta) {\n            str += selfTab + '  (Meta)' + '\\n'\n            str += this.docMeta.toString(depth + 2)\n        }\n\n        if (this.children.length > 0) {\n            str += selfTab + '  (Children)' + '\\n'\n            for (const child of this.children) {\n                str += child.toString(depth + 2)\n            }\n        }\n\n        return str\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport type { ContinuousText } from '../Inline/Text.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#line-blocks\n// ----------------------------------------------------------------------------\n\nexport class RstLineBlock extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstLineBlock {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstLineBlock(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstLineBlock {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstLineBlock(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'LineBlock'\n    }\n}\n\nexport class RstLineBlockLine extends RstNode {\n    protected readonly textNodes: ContinuousText\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        textNodes: ContinuousText = [],\n    ) {\n        super(registrar, source, textNodes)\n        this.textNodes = textNodes\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstLineBlockLine {\n        const children = json.children.map((childJson) => registrar.reviveRstTextFromJson(childJson))\n        return new RstLineBlockLine(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstLineBlockLine {\n        const children = this.textNodes.map((child) => child.clone(registrar))\n        return new RstLineBlockLine(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'LineBlockLine'\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#literal-blocks\n// ----------------------------------------------------------------------------\n\nexport type RstLiteralBlockData = {\n    rawText: string\n}\n\nexport class RstLiteralBlock extends RstNode {\n    private readonly _rawText: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        rawText: string,\n    ) {\n        super(registrar, source)\n        this._rawText = rawText\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstLiteralBlockData>\n\n        root.data = {\n            rawText: this._rawText,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstLiteralBlockData>): RstLiteralBlock {\n        return new RstLiteralBlock(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstLiteralBlock {\n        return new RstLiteralBlock(registrar, structuredClone(this.source), this._rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'LiteralBlock'\n    }\n\n    override get shouldExportPlainText(): boolean {\n        return true\n    }\n\n    override get textContent(): string {\n        // Do not escape inside LiteralBlock since by definition it should be raw text\n        return this._rawText\n    }\n\n    override get rawTextContent(): string {\n        return this._rawText\n    }\n}\n","const hexReStr = '[a-fA-F0-9]+'\nconst unicodeReStr = [\n    `0x(?<hex>${hexReStr})`,\n    `\\\\\\\\x(?<hexSlashX>${hexReStr})`,\n    `U\\\\+(?<hexUpperU>${hexReStr})`,\n    `u(?<hexLowerU>${hexReStr})`,\n    `\\\\\\\\u(?<hexSlashU>${hexReStr})`,\n    '(?<decimal>\\\\d)',\n].join('|')\n\nexport function convertUnicode(inputStr: string): string {\n    let outputStr = ''\n    let consumedIdx = 0\n    const unicodeRe = new RegExp(unicodeReStr, 'g')\n\n    while (consumedIdx < inputStr.length) {\n        const unicodeMatch = unicodeRe.exec(inputStr)\n        if (!unicodeMatch) {\n            break\n        }\n\n        const precedingTextLen = unicodeMatch.index - consumedIdx\n        if (precedingTextLen > 0) {\n            const precedingText = inputStr.substring(consumedIdx, consumedIdx + precedingTextLen)\n            outputStr += precedingText\n            consumedIdx += precedingText.length\n        }\n\n        const decimal = unicodeMatch.groups?.decimal\n        const hex =\n            unicodeMatch.groups?.hex ??\n            unicodeMatch.groups?.hexSlashX ??\n            unicodeMatch.groups?.hexUpperU ??\n            unicodeMatch.groups?.hexLowerU ??\n            unicodeMatch.groups?.hexSlashU\n\n        if (decimal !== undefined) {\n            outputStr += String.fromCharCode(parseInt(decimal, 10))\n        } else if (hex !== undefined) {\n            outputStr += String.fromCharCode(parseInt(hex, 16))\n        } else {\n            throw new Error('Failed to convertUnicode')\n        }\n\n        consumedIdx += unicodeMatch[0].length\n    }\n\n    if (consumedIdx < inputStr.length) {\n        const remainderText = inputStr.substring(consumedIdx)\n        outputStr += remainderText\n    }\n\n    return outputStr\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport { removeEscapeChar } from '../../utils/removeEscapeChar.ts'\nimport { RstFieldList } from '../List/FieldList.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstDirectiveData = {\n    rawDirective: string\n    isInvisibleContent: boolean\n    initContent: Array<RstNodeJson>\n    config: RstNodeJson | null\n    rawBodyText?: string\n}\n\nexport class RstDirective extends RstNode {\n    private readonly _rawDirective: string\n    private readonly _isInvisibleContent: boolean\n    private readonly _initContent: ReadonlyArray<RstNode> // Content on first line of directive\n    private readonly _config: RstFieldList | null // FieldList that specifies the Directive's settings\n    private readonly _rawBodyText?: string // Content after first linebreak\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        rawDirective: string,\n        isInvisibleContent: boolean,\n        initContent: ReadonlyArray<RstNode>, // Content on first line of directive\n        config: RstFieldList | null, // FieldList that specifies the Directive's settings\n        rawBodyText?: string, // Content after first linebreak\n    ) {\n        super(registrar, source, children)\n        this._rawDirective = rawDirective\n        this._isInvisibleContent = isInvisibleContent\n        this._initContent = initContent\n        this._config = config\n        this._rawBodyText = rawBodyText\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            directive: this.directive,\n        }\n\n        if (this._isInvisibleContent) {\n            root.data.isInvisibleContent = this._isInvisibleContent\n        }\n        if (this.initContent.length > 0) {\n            root.data.initContent = this.initContent.map((node) => node.toObject())\n        }\n        if (this.config) {\n            root.data.config = this.config.toObject()\n        }\n        if (this.rawBodyText) {\n            root.data.rawBodyText = this.rawBodyText\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstDirectiveData>\n\n        root.data = {\n            rawDirective: this._rawDirective,\n            isInvisibleContent: this._isInvisibleContent,\n            initContent: this.initContent.map((node) => node.toJSON()),\n            config: this.config?.toJSON() ?? null,\n            rawBodyText: this.rawBodyText,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstDirectiveData>): RstDirective {\n        const initContent = json.data.initContent.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        const config = json.data.config ? RstFieldList.reviveRstNodeFromJson(registrar, json.data.config) : null\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstDirective(registrar, structuredClone(json.source), children, json.data.rawDirective, json.data.isInvisibleContent, initContent, config, json.data.rawBodyText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstDirective {\n        const initContent = this.initContent.map((child) => child.clone(registrar))\n        const config = this.config?.clone(registrar) ?? null\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstDirective(registrar, structuredClone(this.source), children, this._rawDirective, this._isInvisibleContent, initContent, config, this._rawBodyText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Directive'\n    }\n\n    override get willRenderVisibleContent(): boolean {\n        return !this._isInvisibleContent\n    }\n\n    get directive(): string {\n        return removeEscapeChar(this._rawDirective)\n    }\n\n    get initContent(): ReadonlyArray<RstNode> {\n        return this._initContent\n    }\n\n    get initContentText(): string {\n        return this._initContent.map((child) => child.textContent).join()\n    }\n\n    get config(): RstFieldList | null {\n        return this._config\n    }\n\n    get rawBodyText(): string {\n        return this._rawBodyText ?? ''\n    }\n\n    override get shouldExportPlainText(): boolean {\n        return false\n    }\n\n    override toShortString(): string {\n        let str = `${super.toShortString()} directive:\"${this.directive}\" initContentText:\"${this.initContentText}\"`\n\n        if (this._isInvisibleContent) {\n            str += ` isInvisibleContent:${this._isInvisibleContent}`\n        }\n\n        return str\n    }\n\n    override toString(depth = 0): string {\n        const selfTab = '  '.repeat(depth)\n\n        let str = selfTab + `[${this.toShortString()}] (${this.lineNums})\\n`\n\n        if (this.config) {\n            str += selfTab + '  (Options)' + '\\n'\n            str += this.config.toString(depth + 2)\n        }\n\n        if (this.children.length > 0) {\n            str += selfTab + '  (Children)' + '\\n'\n            for (const child of this.children) {\n                str += child.toString(depth + 2)\n            }\n        }\n\n        if (this._rawBodyText) {\n            str += selfTab + '  (RawBodyText)' + '\\n'\n            for (const line of this._rawBodyText.split('\\n')) {\n                str += selfTab + `    \"${line}\"\\n`\n            }\n        }\n\n        return str\n    }\n}\n","import { RstGeneratorError } from '../../Generator/RstGeneratorError.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport type { RstSubstitutionDef } from '../../RstNode/ExplicitMarkup/SubstitutionDef.ts'\nimport type { RstSubstitutionRef } from '../../RstNode/Inline/SubstitutionRef.ts'\n\nexport class SubstitutionResolver {\n    private readonly _substitutionDefs: ReadonlyMap<string, RstSubstitutionDef>\n    private readonly _substitutionDefsBackup: ReadonlyMap<string, RstSubstitutionDef>\n\n    constructor(\n        substitutionDefs: ReadonlyArray<RstSubstitutionDef>,\n    ) {\n        this._substitutionDefs = new Map(substitutionDefs.map((def) => [def.needle, def]))\n        this._substitutionDefsBackup = new Map(substitutionDefs.map((def) => [def.needle.toLowerCase(), def]))\n    }\n\n    resolveSubstitution(generatorState: RstGeneratorState, substitutionRef: RstSubstitutionRef): RstSubstitutionDef {\n        const def = this._substitutionDefs.get(substitutionRef.textContent) ?? this._substitutionDefsBackup.get(substitutionRef.textContent)\n        if (!def) {\n            throw new RstGeneratorError(generatorState, substitutionRef, 'Failed to resolveSubstitution')\n        }\n\n        return def\n    }\n}\n","import { RstNode } from '../../RstNode/RstNode.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstDocument } from '../../RstNode/Block/Document.ts'\nimport { sanitizeSimpleName, type SimpleName, type SanitizedSimpleName } from '../../SimpleName.ts'\n\nexport class HtmlAttrResolver {\n    private _idCounter = 0\n\n    private readonly _htmlIds = new Set<SanitizedSimpleName>() // Set of values from _nodesWithId map (used for fast lookups)\n    private readonly _nodesWithId = new Map<RstNode, SanitizedSimpleName>() // Tracks nodes that are targeted by <a> somewhere (e.g. chained HyperlinkTarget, FootnoteDef, CitationDef) and maps to their intended id\n    private readonly _nodesWithClass = new Map<RstNode, Array<RstDirective>>() // Tracks nodes that have user-defined html class set via \"class\" Directive\n\n    hasForcedHtmlClass(node: RstNode): boolean {\n        // Root cannot have html class\n        if (node instanceof RstDocument) {\n            return false\n        }\n\n        const nodeNeedsClass = this._nodesWithClass.has(node)\n        const nodeDescendantNeedsClass = node.hasChild((child) => this._nodesWithClass.has(child))\n        return nodeNeedsClass || nodeDescendantNeedsClass\n    }\n\n    getNodeHtmlId(node: RstNode): string | null {\n        return this._nodesWithId.get(node) ?? null\n    }\n\n    getNodeHtmlClasses(node: RstNode): Array<string> {\n        return this._nodesWithClass.get(node)?.map((directive) => directive.initContentText).toSorted() ?? []\n    }\n\n    registerNodeAsLinkable(node: RstNode, name: SimpleName): SanitizedSimpleName {\n        const existingName = this._nodesWithId.get(node)\n        if (existingName) {\n            return existingName\n        }\n\n        const htmlId = this.getNextAvailableHtmlId(name)\n\n        this._htmlIds.add(htmlId)\n        this._nodesWithId.set(node, htmlId)\n\n        return htmlId\n    }\n\n    registerNodeWithClass(targetNode: RstNode, directiveNode: RstDirective): void {\n        if (!this._nodesWithClass.has(targetNode)) {\n            this._nodesWithClass.set(targetNode, [])\n        }\n\n        this._nodesWithClass.get(targetNode)?.push(directiveNode)\n    }\n\n    private getNextAvailableHtmlId(simpleName: SimpleName): SanitizedSimpleName {\n        let candidateName = sanitizeSimpleName(simpleName)\n\n        while (true) {\n            if (!this._htmlIds.has(candidateName)) {\n                return candidateName\n            }\n\n            this._idCounter += 1\n            candidateName = sanitizeSimpleName(`id${this._idCounter}`)\n        }\n    }\n}\n","import type { Brand } from '../@types/Brand.ts'\n\nexport type FilePathWithoutRst = Brand<string, 'FilePathWithoutRst'>\n\nexport function getFilePathWithoutRst(filePath: string): FilePathWithoutRst {\n    const pathWithoutExt = /^(?<pathWithoutExt>.+?)(?:\\.rst)?$/.exec(filePath)?.groups?.pathWithoutExt ?? filePath\n    return pathWithoutExt as FilePathWithoutRst\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { ContinuousText } from '../Inline/Text.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#sections\n// ----------------------------------------------------------------------------\n\nexport type RstSectionData = {\n    level: number\n}\n\nexport class RstSection extends RstNode {\n    protected readonly textNodes: ContinuousText\n    readonly level: number\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        textNodes: ContinuousText = [],\n        level: number,\n    ) {\n        super(registrar, source, textNodes)\n        this.textNodes = textNodes\n        this.level = level\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            level: this.level,\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstSectionData>\n\n        root.data = {\n            level: this.level,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstSectionData>): RstSection {\n        const children = json.children.map((childJson) => registrar.reviveRstTextFromJson(childJson))\n        return new RstSection(registrar, structuredClone(json.source), children, json.data.level)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstSection {\n        const children = this.textNodes.map((child) => child.clone(registrar))\n        return new RstSection(registrar, structuredClone(this.source), children, this.level)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Section'\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} level:${this.level}`\n    }\n}\n","type ListAttrKey = 'value' | 'type'\ntype TableAttrKey = 'rowspan' | 'colspan'\ntype VideoAttrKey = 'muted' | 'controls' | 'autoplay' | 'loop' | 'preload' | 'src' | 'type'\ntype ImageAttrKey = 'src' | 'alt' | 'width' | 'height' | 'loading'\ntype LinkAttrKey = 'href'\n\ntype AttrKey =\n    | 'id'\n    | 'class'\n    | 'style'\n    | `data-${string}`\n    | 'role'\n    | 'slot'\n    | ListAttrKey\n    | TableAttrKey\n    | VideoAttrKey\n    | ImageAttrKey\n    | LinkAttrKey\n\nexport class HtmlAttributeStore {\n    private readonly _store = new Map<string, Array<string>>()\n\n    constructor(initValues: Partial<Record<AttrKey, string>> = {}) {\n        for (const [key, value] of Object.entries(initValues)) {\n            this.set(key as AttrKey, value)\n        }\n    }\n\n    has(key: AttrKey): boolean {\n        return this._store.has(key)\n    }\n\n    set(key: AttrKey, value?: string): void {\n        if (!value) {\n            return\n        }\n\n        this._store.set(key, [value])\n    }\n\n    get(key: AttrKey): string {\n        return (this._store.get(key) ?? []).join(' ').trim()\n    }\n\n    append(key: AttrKey, value?: string): void {\n        if (!value) {\n            return\n        }\n\n        let storedValues = this._store.get(key)\n\n        if (!storedValues) {\n            storedValues = []\n            this._store.set(key, storedValues)\n        }\n\n        storedValues.push(value)\n    }\n\n    appendAll(key: AttrKey, values: Array<string>): void {\n        let storedValues = this._store.get(key)\n\n        if (!storedValues) {\n            storedValues = []\n            this._store.set(key, storedValues)\n        }\n\n        for (const value of values) {\n            storedValues.push(value)\n        }\n    }\n\n    toString(): string {\n        if (this._store.size === 0) {\n            return ''\n        }\n\n        const attrStr = [...this._store.entries()]\n            .sort((a, b) => {\n                // Put 'id' and 'src' attr at the front\n                if (a[0] === 'src') {\n                    return -1\n                } else if (b[0] === 'src') {\n                    return 1\n                }\n\n                if (a[0] === 'id') {\n                    return -1\n                } else if (b[0] === 'id') {\n                    return 1\n                }\n\n                return a[0].localeCompare(b[0])\n            })\n            .map(([key, values]) => `${key}=\"${values.join(' ').trim()}\"`)\n            .join(' ')\n\n        return ' ' + attrStr // Add leading space so that it can be appended after html tag name e.g. <img${HtmlAttributeStore.toString()}>\n    }\n}\n","const leftRotate = (val: number, bits: number) => (val << bits) | (val >>> (32 - bits))\n\nconst initH0 = 0x67452301\nconst initH1 = 0xefcdab89\nconst initH2 = 0x98badcfe\nconst initH3 = 0x10325476\nconst initH4 = 0xc3d2e1f0\n\nexport function sha1(input: string): string {\n    const inputBuffer = new TextEncoder().encode(input)\n    if (inputBuffer.byteLength > Number.MAX_SAFE_INTEGER) {\n        throw new Error('Input too long')\n    }\n\n    const inputLenBits = inputBuffer.byteLength * 8\n    const bufferSizeBits = ((inputLenBits + 8) % 512) > 448 // Must be able to fit 1-byte + 64-bit number\n        ? inputLenBits + (512 - (inputLenBits % 512)) + 512\n        : inputLenBits + (512 - (inputLenBits % 512))\n\n    const bufferSizeBytes = bufferSizeBits / 8\n\n    const buffer = new Uint8Array(bufferSizeBytes)\n    buffer.set(inputBuffer)\n    buffer.set([0x80], inputBuffer.byteLength)\n    buffer.set(convertNumToUint8Array(inputLenBits), bufferSizeBytes - 8)\n\n    let h0 = initH0 | 0\n    let h1 = initH1 | 0\n    let h2 = initH2 | 0\n    let h3 = initH3 | 0\n    let h4 = initH4 | 0\n\n    // Each chunk is 512-bits (64 bytes)\n    for (let chunkOffsetBytes = 0; chunkOffsetBytes < bufferSizeBytes; chunkOffsetBytes += 64) {\n        const w = new Array<number>(80)\n\n        for (let i = 0; i < 16; i++) {\n            const valBigEndian = 0\n                | buffer[chunkOffsetBytes + (i * 4) + 0] << (24 - 0 * 8)\n                | buffer[chunkOffsetBytes + (i * 4) + 1] << (24 - 1 * 8)\n                | buffer[chunkOffsetBytes + (i * 4) + 2] << (24 - 2 * 8)\n                | buffer[chunkOffsetBytes + (i * 4) + 3] << (24 - 3 * 8)\n\n            w[i] = valBigEndian\n        }\n\n        for (let i = 16; i < 80; i++) {\n            w[i] = leftRotate(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16], 1)\n        }\n\n        let a = h0 | 0\n        let b = h1 | 0\n        let c = h2 | 0\n        let d = h3 | 0\n        let e = h4 | 0\n\n        for (let i = 0; i < 80; i++) {\n            let f: number\n            let k: number\n\n            if (0 <= i && i < 20) {\n                f = (b & c) | (~b & d)\n                k = 0x5A827999\n            } else if (20 <= i && i < 40) {\n                f = b ^ c ^ d\n                k = 0x6ED9EBA1\n            } else if (40 <= i && i < 60) {\n                f = (b & c) | (b & d) | (c & d)\n                k = 0x8F1BBCDC\n            } else /* if (60 <= i && i < 80) */ {\n                f = b ^ c ^ d\n                k = 0xCA62C1D6\n            }\n\n            const temp = leftRotate(a, 5) + f + e + k + w[i]\n            e = d\n            d = c\n            c = leftRotate(b, 30)\n            b = a\n            a = temp\n        }\n\n        h0 = (h0 + a) | 0\n        h1 = (h1 + b) | 0\n        h2 = (h2 + c) | 0\n        h3 = (h3 + d) | 0\n        h4 = (h4 + e) | 0\n    }\n\n    const outputBuffer = Buffer.alloc(20)\n    outputBuffer.writeInt32BE(h0, 0)\n    outputBuffer.writeInt32BE(h1, 4)\n    outputBuffer.writeInt32BE(h2, 8)\n    outputBuffer.writeInt32BE(h3, 12)\n    outputBuffer.writeInt32BE(h4, 16)\n\n    return outputBuffer.toString('hex')\n}\n\nexport function convertNumToUint8Array(val: number): Uint8Array {\n    const buffer = new ArrayBuffer(8)\n    const dataView = new DataView(buffer)\n\n    const low = val | 0 // Get lower 32 bits\n    const high = (val - low) / Math.pow(2, 32)\n\n    dataView.setUint32(4, low, false)\n    dataView.setUint32(0, high, false)\n\n    return new Uint8Array(buffer)\n}\n\nexport function printUint8Array(buffer: Uint8Array): void {\n    for (let i = 0; i < buffer.length; i += 8) {\n        let str = ''\n\n        for (let j = 0; j < 8; j += 1) {\n            str += ' ' + buffer.at(i + j)?.toString(16).padStart(2, '0')\n        }\n\n        console.info(str)\n    }\n\n    console.info(buffer.length * 8)\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport { RstCitationRef } from '../Inline/CitationRef.ts'\nimport { removeEscapeChar } from '../../utils/removeEscapeChar.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#citations\n// ----------------------------------------------------------------------------\n\nexport type RstCitationDefData = {\n    rawLabel: string\n}\n\nexport class RstCitationDef extends RstNode {\n    private readonly _rawLabel: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        rawLabel: string,\n    ) {\n        super(registrar, source, children)\n        this._rawLabel = rawLabel\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            label: this.label,\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstCitationDefData>\n\n        root.data = {\n            rawLabel: this._rawLabel,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstCitationDefData>): RstCitationDef {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstCitationDef(registrar, structuredClone(json.source), children, json.data.rawLabel)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstCitationDef {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstCitationDef(registrar, structuredClone(this.source), children, this._rawLabel)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'CitationDef'\n    }\n\n    get label(): string {\n        return removeEscapeChar(this._rawLabel)\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} label:\"${this.label}\"`\n    }\n\n    isTargetedByCitationRef(citationRef: RstCitationRef): boolean {\n        return this.label === citationRef.textContent\n    }\n}\n","import { RstFootnoteRef } from '../Inline/FootnoteRef.ts'\nimport { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport { removeEscapeChar } from '../../utils/removeEscapeChar.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#footnotes\n// ----------------------------------------------------------------------------\n\nexport type RstFootnoteDefData = {\n    rawLabel: string\n}\n\nexport class RstFootnoteDef extends RstNode {\n    private readonly _rawLabel: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        rawLabel: string,\n    ) {\n        super(registrar, source, children)\n        this._rawLabel = rawLabel\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            label: this.label,\n        }\n\n        if (this.isManualLabelNum) {\n            root.data.isManualLabelNum = true\n        }\n\n        if (this.isAutoSymbol) {\n            root.data.isAutoSymbol = true\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstFootnoteDefData>\n\n        root.data = {\n            rawLabel: this._rawLabel,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstFootnoteDefData>): RstFootnoteDef {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstFootnoteDef(registrar, structuredClone(json.source), children, json.data.rawLabel)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstFootnoteDef {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstFootnoteDef(registrar, structuredClone(this.source), children, this._rawLabel)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'FootnoteDef'\n    }\n\n    get label(): string {\n        return removeEscapeChar(this._rawLabel)\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} label:\"${this.label}\"`\n    }\n\n    get isManualLabelNum(): boolean {\n        return /^[1-9]\\d*$/.test(this.label)\n    }\n\n    get isAutoSymbol(): boolean {\n        return this.label === '*'\n    }\n\n    isTargetedByFootnoteRef(footnoteRef: RstFootnoteRef): boolean {\n        // If this def has a label '#label', then this is only compatible with refs with the same label\n        // If this def is a manual number, then this is only compatible with refs with same number\n        // If this def is symbol, then this is only compatible with refs with symbol\n        if (footnoteRef.textContent === this.label) {\n            return true\n        }\n\n        // If this def is only '#', then this is compatible with all refs regardless of their labels\n        if (footnoteRef.textContent.startsWith('#') && this.label === '#') {\n            return true\n        }\n\n        return false\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport { removeEscapeChar } from '../../utils/removeEscapeChar.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport { emailRe, urlRe } from '../../utils/parseEmbededRef.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#hyperlink-targets\n\n// Explicit                         .. _label: link\n// Anonymous                        .. __: link\n// Anonymous (alt)                  __ link\n\n// Chain Explicit                   .. _label:\n// Chain Anonymous                  .. __:\n// Chain Anonymous (alt)            __\n// ----------------------------------------------------------------------------\n\nexport type RstHyperlinkTargetData = {\n    rawLabel: string\n    rawTarget: string\n}\n\nexport class RstHyperlinkTarget extends RstNode {\n    private readonly _rawLabel: string\n    private readonly _rawTarget: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        rawLabel: string,\n        rawTarget: string,\n    ) {\n        super(registrar, source)\n        this._rawLabel = rawLabel\n        this._rawTarget = rawTarget\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        if (this.label !== this.target) {\n            root.data = {\n                label: this.label,\n                target: this.target,\n            }\n        }\n\n        if (this.isAnonymous) {\n            if (!root.data) {\n                root.data = {}\n            }\n\n            root.data.isAnonymous = true\n        }\n\n        if (this.isAlias) {\n            if (!root.data) {\n                root.data = {}\n            }\n\n            root.data.isAlias = true\n        }\n\n        if (this.isTargetingNextNode) {\n            if (!root.data) {\n                root.data = {}\n            }\n\n            root.data.isTargetingNextNode = true\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstHyperlinkTargetData>\n\n        root.data = {\n            rawLabel: this._rawLabel,\n            rawTarget: this._rawTarget,\n        }\n\n        return root\n    }\n\n    override equals(other: RstNode): boolean {\n        if (!(other instanceof RstHyperlinkTarget)) {\n            return false\n        }\n\n        return this._rawLabel === other._rawLabel && this._rawTarget === other._rawTarget\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstHyperlinkTargetData>): RstHyperlinkTarget {\n        return new RstHyperlinkTarget(registrar, structuredClone(json.source), json.data.rawLabel, json.data.rawTarget)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstHyperlinkTarget {\n        return new RstHyperlinkTarget(registrar, structuredClone(this.source), this._rawLabel, this._rawTarget)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'HyperlinkTarget'\n    }\n\n    override get willRenderVisibleContent(): boolean {\n        return false\n    }\n\n    get label(): string {\n        return removeEscapeChar(this._rawLabel)\n    }\n\n    get target(): string {\n        return removeEscapeChar(this._rawTarget, true)\n    }\n\n    get isAnonymous(): boolean {\n        return this._rawLabel === '_'\n    }\n\n    get isAlias(): boolean {\n        const isUrl = new RegExp(`^${urlRe.source}$`).test(this.target)\n        const isEmail = new RegExp(`^${emailRe.source}$`).test(this.target)\n\n        // If it's url/email, then it cannot be an alias\n        if (isUrl || isEmail) {\n            return false\n        }\n\n        return this._rawTarget.endsWith('_') && !this._rawTarget.endsWith('\\\\_')\n    }\n\n    get isTargetingNextNode(): boolean {\n        return this._rawTarget.length === 0\n    }\n\n    override toShortString(): string {\n        let str = `${super.toShortString()} label:\"${this.label}\" target:\"${this.target}\"`\n\n        if (this.isAnonymous) {\n            str += ` isAnonymous:${this.isAnonymous}`\n        }\n        if (this.isAlias) {\n            str += ` isAlias:${this.isAlias}`\n        }\n        if (this.isTargetingNextNode) {\n            str += ` isTargetingNextNode:${this.isTargetingNextNode}`\n        }\n\n        return str\n    }\n}\n","export function trimCommonIndent(input: string): string {\n    let lines = input.split('\\n') // Split into individual lines to process\n    lines = lines.map((line) => line.trimEnd()) // Remove trailing whitespace from every line\n    lines = trimArray(lines)\n\n    let lowestCommonIndent = Number.MAX_SAFE_INTEGER\n    for (const line of lines) {\n        // Skip checking blank lines\n        if (!line) {\n            continue\n        }\n\n        const indentSize = line.search(/\\S|$/) ?? 0\n        lowestCommonIndent = Math.min(lowestCommonIndent, indentSize)\n    }\n\n    const trimmedLines = lines.map((line) => line.substring(lowestCommonIndent))\n    return trimmedLines.join('\\n')\n}\n\nfunction trimArray(lines: Array<string>): Array<string> {\n    // Remove all blank lines at start\n    let startIdx = 0\n    while (!lines[startIdx] && startIdx < lines.length) {\n        startIdx += 1\n    }\n\n    // Remove all newlines at end\n    let endIdx = lines.length - 1\n    while (!lines[endIdx] && endIdx >= 0) {\n        endIdx -= 1\n    }\n\n    return lines.slice(startIdx, endIdx + 1)\n}\n","import type { Brand } from '../../@types/Brand.ts'\nimport { RstCitationDef } from '../../RstNode/ExplicitMarkup/CitationDef.ts'\nimport { RstFootnoteDef } from '../../RstNode/ExplicitMarkup/FootnoteDef.ts'\nimport { RstHyperlinkTarget } from '../../RstNode/ExplicitMarkup/HyperlinkTarget.ts'\nimport { RstCitationRef } from '../../RstNode/Inline/CitationRef.ts'\nimport { RstFootnoteRef } from '../../RstNode/Inline/FootnoteRef.ts'\nimport { RstInlineInternalTarget } from '../../RstNode/Inline/InlineInternalTarget.ts'\nimport { RstNode } from '../../RstNode/RstNode.ts'\nimport { type SimpleName, normalizeSimpleName } from '../../SimpleName.ts'\nimport { RstCompiler } from '../../RstCompiler.ts'\nimport { HtmlAttrResolver } from './HtmlAttrResolver.ts'\nimport { RstDocument } from '../../RstNode/Block/Document.ts'\nimport { RstSection } from '../../RstNode/Block/Section.ts'\nimport { RstHyperlinkRef } from '../../RstNode/Inline/HyperlinkRef.ts'\nimport { trimCommonIndent } from '../../utils/trimCommonIndent.ts'\n\ntype FootnoteLabelNum = Brand<number, 'FootnoteLabelNum'> // For identifying/referencing footnote in document\ntype FootnoteSymNum = Brand<number, 'FootnoteSymNum'> // For determining which symbol to render\n\n// ------------------------------------------------------------------------\n// MARK: SimpleNameResolver\n// ------------------------------------------------------------------------\n\n/**\n * Caches data that need to be filled after parsing\n *\n * Data in this container class is consumed by RstGeneratorState\n */\nexport class SimpleNameResolver {\n    private readonly _compiler: RstCompiler\n    private readonly _htmlAttrResolver: HtmlAttrResolver\n    private readonly _root: RstDocument\n\n    private readonly _nodesLinkableFromOutside = new Map<SimpleName, RstNode>() // Other Documents can use these SimpleNames to reference a node inside this Document\n    private readonly _explicitSimpleNames = new Map<SimpleName, RstNode>()\n    private readonly _explicitNodes = new Map<RstNode, SimpleName>()\n    private readonly _implicitSimpleNames = new Map<SimpleName, RstNode>()\n    private readonly _implicitNodes = new Map<RstNode, SimpleName>()\n\n    private readonly _footnoteDefToLabelNum = new Map<RstFootnoteDef, FootnoteLabelNum>()\n    private readonly _footnoteDefToSymNum = new Map<RstFootnoteDef, FootnoteSymNum>()\n    private readonly _footnoteDefBacklinks = new Map<RstFootnoteDef, Array<RstFootnoteRef>>()\n    private readonly _footnoteRefToDef = new Map<RstFootnoteRef, RstFootnoteDef>()\n    private readonly _citationDefBacklinks = new Map<RstCitationDef, Array<RstCitationRef>>()\n    private readonly _citationRefToDef = new Map<RstCitationRef, RstCitationDef>()\n    private readonly _anonymousHyperlinkRefToTarget = new Map<RstHyperlinkRef, RstHyperlinkTarget>()\n\n    constructor(\n        compiler: RstCompiler,\n        htmlAttrResolver: HtmlAttrResolver,\n        root: RstDocument,\n    ) {\n        this._compiler = compiler\n        this._htmlAttrResolver = htmlAttrResolver\n        this._root = root\n\n        this.processSections()\n        this.processFootnotes()\n        this.processCitations()\n        this.processHyperlinks()\n    }\n\n    get nodesLinkableFromOutside(): ReadonlyMap<SimpleName, RstNode> {\n        return this._nodesLinkableFromOutside\n    }\n\n    get footnoteDefToLabelNum(): ReadonlyMap<RstFootnoteDef, FootnoteLabelNum> {\n        return this._footnoteDefToLabelNum\n    }\n\n    get footnoteDefToSymNum(): ReadonlyMap<RstFootnoteDef, FootnoteSymNum> {\n        return this._footnoteDefToSymNum\n    }\n\n    get footnoteDefBacklinks(): ReadonlyMap<RstFootnoteDef, ReadonlyArray<RstFootnoteRef>> {\n        return this._footnoteDefBacklinks\n    }\n\n    get footnoteRefToDef(): ReadonlyMap<RstFootnoteRef, RstFootnoteDef> {\n        return this._footnoteRefToDef\n    }\n\n    get citationDefBacklinks(): ReadonlyMap<RstCitationDef, ReadonlyArray<RstCitationRef>> {\n        return this._citationDefBacklinks\n    }\n\n    get citationRefToDef(): ReadonlyMap<RstCitationRef, RstCitationDef> {\n        return this._citationRefToDef\n    }\n\n    get anonymousHyperlinkRefToTarget(): ReadonlyMap<RstHyperlinkRef, RstHyperlinkTarget> {\n        return this._anonymousHyperlinkRefToTarget\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: SimpleName\n    // ------------------------------------------------------------------------\n\n    getSimpleName(node: RstNode): SimpleName {\n        for (const plugin of this._compiler.plugins) {\n            const simpleName = plugin.getSimpleName?.(node)\n            if (simpleName) {\n                return simpleName\n            }\n        }\n\n        const simpleName = this._explicitNodes.get(node) ?? this._implicitNodes.get(node)\n        if (!simpleName) {\n            throw new Error(`Failed to getSimpleName for [${node.toShortString()}]`)\n        }\n\n        return simpleName\n    }\n\n    private getSimpleNameCandidate(node: RstNode, forceUnique = false): SimpleName {\n        let simpleName = (() => {\n            if (node instanceof RstSection) {\n                return normalizeSimpleName(node.textContent)\n            }\n\n            if (node instanceof RstFootnoteDef) {\n                const autoNumLabel = /^#(?<autoNumLabel>.+)$/.exec(node.label)?.groups?.autoNumLabel\n                if (autoNumLabel) {\n                    return normalizeSimpleName(autoNumLabel)\n                }\n\n                const labelNum = this._footnoteDefToLabelNum.get(node)\n                if (labelNum) {\n                    return normalizeSimpleName(`${node.nodeType}-${labelNum}`)\n                }\n\n                throw new Error(`Failed to getSimpleNameCandidate for [${node.toShortString()}]`)\n            }\n\n            if (node instanceof RstCitationDef) {\n                return normalizeSimpleName(node.label)\n            }\n\n            if (node instanceof RstHyperlinkTarget) {\n                return node.isAnonymous\n                    ? normalizeSimpleName(`anonymous-${node.nodeType}-${node.nthOfType}`)\n                    : normalizeSimpleName(node.label)\n            }\n\n            if (node instanceof RstInlineInternalTarget) {\n                return normalizeSimpleName(node.textContent)\n            }\n\n            return normalizeSimpleName(`${node.nodeType}-${node.nthOfType}`)\n        })()\n\n        if (forceUnique) {\n            let counter = 1\n            while (this._explicitSimpleNames.has(simpleName) || this._implicitSimpleNames.has(simpleName)) {\n                simpleName = normalizeSimpleName(`${simpleName}-${counter}`)\n                counter += 1\n            }\n        }\n\n        return simpleName\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Registrations\n    // ------------------------------------------------------------------------\n\n    registerExplicitNode(node: RstNode, simpleName: SimpleName): void {\n        const existingTargetedNode = this._explicitSimpleNames.get(simpleName)\n        if (existingTargetedNode && !existingTargetedNode.equals(node)) {\n            throw new Error(trimCommonIndent(`\n                SimpleName:\"${simpleName}\" already exists\n                    new: [${node.toShortString()}] (${node.lineNums})\n                    old: [${existingTargetedNode.toShortString()}] (${existingTargetedNode.lineNums})\n            `))\n        }\n\n        this._explicitSimpleNames.set(simpleName, node)\n        this._explicitNodes.set(node, simpleName)\n    }\n\n    registerImplicitNode(node: RstNode, simpleName: SimpleName): void {\n        this._implicitSimpleNames.set(simpleName, node)\n        this._implicitNodes.set(node, simpleName)\n    }\n\n    registerNodeAsLinkable(node: RstNode, simpleName: SimpleName, linkableFromOutside = true): void {\n        this._htmlAttrResolver.registerNodeAsLinkable(node, simpleName)\n\n        if (linkableFromOutside) {\n            const existingTargetedNode = this._nodesLinkableFromOutside.get(simpleName)\n            const existingTargetedNodeIsExplict = existingTargetedNode && this._explicitNodes.has(existingTargetedNode)\n            if (existingTargetedNodeIsExplict) {\n                throw new Error(trimCommonIndent(`\n                    SimpleName:\"${simpleName}\" already exists\n                        new: [${node.toShortString()}] (${node.lineNums})\n                        old: [${existingTargetedNode.toShortString()}] (${existingTargetedNode.lineNums})\n                `))\n            }\n\n            this._nodesLinkableFromOutside.set(simpleName, node)\n        }\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Node: Sections\n    // ------------------------------------------------------------------------\n\n    private processSections() {\n        const sections = this._root.findAllChildren('Section')\n\n        for (const section of sections) {\n            const simpleName = this.getSimpleNameCandidate(section, true)\n            this.registerImplicitNode(section, simpleName)\n            this.registerNodeAsLinkable(section, simpleName)\n        }\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Node: Footnote\n    // ------------------------------------------------------------------------\n\n    private processFootnotes() {\n        const footnoteDefs = this._root.findAllChildren('FootnoteDef')\n        const footnoteRefs = this._root.findAllChildren('FootnoteRef')\n\n        const registerAutoLabelNums = () => {\n            const usedLabelNums = new Set<number>()\n            let autoLabelNumCounter = 1\n            const getNextLabelNum = (): number => {\n                while (usedLabelNums.has(autoLabelNumCounter)) {\n                    autoLabelNumCounter++\n                }\n                return autoLabelNumCounter\n            }\n\n            // 1. Register all manual footnotes\n            for (const footnoteDef of footnoteDefs) {\n                if (!footnoteDef.isManualLabelNum) {\n                    continue\n                }\n\n                const labelNum = parseInt(footnoteDef.label)\n                this._footnoteDefToLabelNum.set(footnoteDef, labelNum as FootnoteLabelNum)\n                usedLabelNums.add(labelNum)\n            }\n\n            // 2. Assign each auto footnote to next labelNum that hasn't been used by manual footnote yet\n            for (const footnoteDef of footnoteDefs) {\n                if (footnoteDef.isManualLabelNum) {\n                    continue\n                }\n\n                const labelNum = getNextLabelNum()\n                this._footnoteDefToLabelNum.set(footnoteDef, labelNum as FootnoteLabelNum)\n                usedLabelNums.add(labelNum)\n            }\n        }\n\n        const registerAutoSymbols = () => {\n            let autoSymbolCounter = 1\n\n            for (const footnoteDef of footnoteDefs) {\n                if (!footnoteDef.isAutoSymbol) {\n                    continue\n                }\n\n                const symNum = autoSymbolCounter++\n                this._footnoteDefToSymNum.set(footnoteDef, symNum as FootnoteSymNum)\n            }\n        }\n\n        const registerBacklinks = () => {\n            const usedIdices = new Set<number>() // Keep track of FootnoteDef '#' that have already been consumed\n            const findFootnoteDef = (footnoteRef: RstFootnoteRef): RstFootnoteDef | null => {\n                for (const [idx, footnoteDef] of footnoteDefs.entries()) {\n                    if (footnoteDef.label === '#' && usedIdices.has(idx)) {\n                        continue\n                    }\n\n                    if (!footnoteDef.isTargetedByFootnoteRef(footnoteRef)) {\n                        continue\n                    }\n\n                    usedIdices.add(idx)\n                    return footnoteDef\n                }\n\n                return null\n            }\n\n            // 1. Init backlinks array for each Def\n            for (const footnoteDef of footnoteDefs) {\n                this._footnoteDefBacklinks.set(footnoteDef, [])\n            }\n\n            // 2. Add each Ref to their targeted Def's backlinks array\n            for (const footnoteRef of footnoteRefs) {\n                const footnoteDef = findFootnoteDef(footnoteRef)\n                if (!footnoteDef) {\n                    this._compiler.notifyWarning(`Failed get footnoteDef for [${footnoteRef.toShortString()}]`)\n                    return\n                }\n\n                this._footnoteRefToDef.set(footnoteRef, footnoteDef)\n                this._footnoteDefBacklinks.get(footnoteDef)?.push(footnoteRef)\n            }\n        }\n\n        const registerFootnotes = () => {\n            // Must be done last because this rely on getCandidateSimpleName that is dependant on resolved AutoLabelNums and AutoSymbols\n            for (const node of [...footnoteDefs, ...footnoteRefs]) {\n                const simpleName = this.getSimpleNameCandidate(node, true)\n                this.registerImplicitNode(node, simpleName)\n                this.registerNodeAsLinkable(node, simpleName, false)\n            }\n        }\n\n        registerAutoLabelNums()\n        registerAutoSymbols()\n        registerBacklinks()\n        registerFootnotes()\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Node: Citation\n    // ------------------------------------------------------------------------\n\n    private processCitations() {\n        const citationDefs = this._root.findAllChildren('CitationDef')\n        const citationRefs = this._root.findAllChildren('CitationRef')\n\n        const registerCitationBacklinks = () => {\n            // 1. Init backlinks array for each Def\n            for (const citationDef of citationDefs) {\n                this._citationDefBacklinks.set(citationDef, [])\n            }\n\n            // 2. Add each Ref to their targeted Def's backlinks array\n            for (const citationRef of citationRefs) {\n                const citationDef = citationDefs.find((citationDef) => citationDef.isTargetedByCitationRef(citationRef))\n                if (!citationDef) {\n                    this._compiler.notifyWarning(`Failed get citationDef for [${citationRef.toShortString()}]`)\n                    return\n                }\n\n                this._citationRefToDef.set(citationRef, citationDef)\n                this._citationDefBacklinks.get(citationDef)?.push(citationRef)\n            }\n        }\n\n        const registerCitations = () => {\n            for (const node of [...citationDefs, ...citationRefs]) {\n                const simpleName = this.getSimpleNameCandidate(node, true)\n                this.registerImplicitNode(node, simpleName)\n                this.registerNodeAsLinkable(node, simpleName, false)\n            }\n        }\n\n        registerCitationBacklinks()\n        registerCitations()\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Node: Hyperlink\n    // ------------------------------------------------------------------------\n\n    resolveSimpleName(simpleName: SimpleName): RstNode | null {\n        return this._explicitSimpleNames.get(simpleName) ?? this._implicitSimpleNames.get(simpleName) ?? null\n    }\n\n    resolveIndirectHyperlinkTarget(hyperlinkTarget: RstHyperlinkTarget): RstNode | null {\n        if (!hyperlinkTarget.isTargetingNextNode) {\n            return null\n        }\n\n        let currNode: RstNode | null = hyperlinkTarget\n\n        // Follow the chain to find an visible node\n        while (true) {\n            currNode = currNode?.getNextNodeInTree() ?? null\n\n            if (!currNode) {\n                return null\n            }\n\n            if (currNode instanceof RstHyperlinkTarget && !currNode.isTargetingNextNode) {\n                return currNode\n            }\n\n            if (!(currNode instanceof RstHyperlinkTarget) && currNode.willRenderVisibleContent) {\n                return currNode\n            }\n        }\n    }\n\n    private processHyperlinks() {\n        const hyperlinkTargets = this._root.findAllChildren('HyperlinkTarget')\n        const inlineInternalTargets = this._root.findAllChildren('InlineInternalTarget')\n        const hyperlinkRefs = this._root.findAllChildren('HyperlinkRef')\n\n        const registerHyperlinkTargets = () => {\n            for (const hyperlinkTarget of hyperlinkTargets) {\n                const simpleName = this.getSimpleNameCandidate(hyperlinkTarget)\n                this.registerExplicitNode(hyperlinkTarget, simpleName)\n\n                const indirectTarget = this.resolveIndirectHyperlinkTarget(hyperlinkTarget)\n                if (indirectTarget) {\n                    // Register the indirect target with the HyperlinkTarget's SimpleName so that it gets HyperlinkTarget's text for its id\n                    //\n                    // e.g.\n                    //      .. _Documentation:\n                    //      This paragraph will be generated with <p id=\"documentation\">\n                    //\n                    this.registerNodeAsLinkable(indirectTarget, simpleName)\n                }\n            }\n        }\n\n        const registerInlineInternalTargets = () => {\n            for (const inlineTarget of inlineInternalTargets) {\n                const simpleName = this.getSimpleNameCandidate(inlineTarget)\n                this.registerExplicitNode(inlineTarget, simpleName)\n                this.registerNodeAsLinkable(inlineTarget, simpleName)\n            }\n        }\n\n        const registerLinkableHyperlinkRefs = () => {\n            for (const hyperlinkRef of hyperlinkRefs) {\n                // Explicitly-named embeded HyperlinkRef that links elsewhere can be referenced by their label\n                // e.g. `somelabel <url not same as label>`_ can be referenced by somelabel_\n                if (!hyperlinkRef.isEmbeded) {\n                    continue\n                }\n\n                // When embeded has label===target, it means there's no label e.g. `<url>`_\n                // Thus this cannot be targeted by other HyperlinkRefs\n                if (hyperlinkRef.label === hyperlinkRef.target) {\n                    continue\n                }\n\n                // If SimpleName already exists (e.g. another HyperlinkTarget) then this HyperlinkRef cannot be targeted\n                const candidateSimpleName = normalizeSimpleName(hyperlinkRef.label)\n                if (this._explicitSimpleNames.has(candidateSimpleName) || this._implicitSimpleNames.has(candidateSimpleName)) {\n                    continue\n                }\n\n                this.registerImplicitNode(hyperlinkRef, candidateSimpleName)\n            }\n        }\n\n        const registerAnonymousHyperlinkRefs = () => {\n            const anonymousRefs = hyperlinkRefs.filter((ref) => ref.isAnonymous)\n            const anonymousTargets = hyperlinkTargets.filter((target) => target.isAnonymous)\n\n            for (let i = 0; i < anonymousRefs.length && i < anonymousTargets.length; i++) {\n                const ref = anonymousRefs[i]\n                const target = anonymousTargets[i]\n                this._anonymousHyperlinkRefToTarget.set(ref, target)\n            }\n        }\n\n        registerHyperlinkTargets()\n        registerInlineInternalTargets()\n        registerLinkableHyperlinkRefs()\n        registerAnonymousHyperlinkRefs()\n    }\n}\n","/**\n * Assume 1-based counting\n *   1 = *\n *   2 = &dagger;\n *   3 = &Dagger;\n *  10 = &clubs;\n *  11 = ** (repeat 2 times)\n */\nexport function getAutoFootnoteSymbol(symNum: number): string {\n    if (symNum < 1) {\n        throw new Error('symNum must be >= 1')\n    }\n\n    const charId = (symNum - 1) % 10\n    const multiple = Math.floor((symNum - 1) / 10) + 1\n\n    const symbol = (() => {\n        switch (charId) {\n            case 0: return '*'\n            case 1: return '&dagger;'\n            case 2: return '&Dagger;'\n            case 3: return '&sect;'\n            case 4: return '&para;'\n            case 5: return '#'\n            case 6: return '&spades;'\n            case 7: return '&hearts;'\n            case 8: return '&diams;'\n            case 9: return '&clubs;'\n        }\n\n        throw new Error(`Invalid charId:${charId}`)\n    })()\n\n    return symbol.repeat(multiple)\n}\n","// ----------------------------------------------------------------------------\n// MARK: getPathDirname\n// Replace path.dirname\n// ----------------------------------------------------------------------------\n\nexport function getPathDirname(path: string): string {\n    if (path.length === 0) {\n        return '.'\n    }\n\n    const isAbsolute = path.at(0) === '/'\n\n    // Iterate BACKWARDS and stop when we find first slash preceding non-path-separator\n    // e.g. Stop on first slash after after seeing `b`\n    //  `/a/b`  -> `/a`\n    //  `/a/b/` -> `/a`\n    let dirnameSlashIdx: number | null = null\n    let sawNonPathSeparator = false\n\n    for (let i = path.length - 1; i >= 1; i--) {\n        const currChar = path.charAt(i)\n        if (currChar !== '/') {\n            sawNonPathSeparator = true\n            continue\n        }\n\n        // currChar === '/'\n        // If we already see non-path-separator, then we can terminate the search\n        if (sawNonPathSeparator) {\n            dirnameSlashIdx = i\n            break\n        }\n    }\n\n    // Search failed, then path is empty\n    if (dirnameSlashIdx === null) {\n        return isAbsolute ? '/' : '.'\n    }\n\n    // Special case of UNC path (`//abc` should return `//`)\n    if (isAbsolute && dirnameSlashIdx === 1) {\n        return '//'\n    }\n\n    return path.slice(0, dirnameSlashIdx)\n}\n\n// ----------------------------------------------------------------------------\n// MARK: joinFilePath\n// Replace path.join\n// ----------------------------------------------------------------------------\n\nexport function joinFilePath(...args: Array<string>): string {\n    let joined = ''\n\n    for (const arg of args) {\n        if (!arg) {\n            continue\n        }\n\n        if (joined.length === 0) {\n            joined = arg\n        } else {\n            joined += `/${arg}`\n        }\n    }\n\n    return normalizeFilePath(joined)\n}\n\n// ----------------------------------------------------------------------------\n// MARK: resolveFilePath\n// Replace path.resolve\n// ----------------------------------------------------------------------------\n\nexport function resolveFilePath(...args: Array<string>): string {\n    let resolvedPath = ''\n    let lastFragmentWasAbsolute = false\n\n    // Iterate backwards and construct the resolved path\n    for (let i = args.length - 1; i >= 0 && !lastFragmentWasAbsolute; i--) {\n        const currPathFragment = args[i]\n        if (!currPathFragment) {\n            continue\n        }\n\n        if (resolvedPath.length === 0) {\n            resolvedPath = currPathFragment\n        } else {\n            resolvedPath = currPathFragment + '/' + resolvedPath\n        }\n\n        lastFragmentWasAbsolute = currPathFragment.charAt(0) === '/'\n    }\n\n    // Use normalizeString instead of normalizeFilePath because\n    // path.resolve is defined to trim trailing slash whereas normalizeFilePath preserves trailing slash\n    resolvedPath = normalizeString(resolvedPath, lastFragmentWasAbsolute)\n\n    if (lastFragmentWasAbsolute) {\n        return `/${resolvedPath}`\n    }\n    if (resolvedPath.length === 0) {\n        return '.'\n    }\n\n    return resolvedPath\n}\n\n// ----------------------------------------------------------------------------\n// MARK: normalizeFilePath\n// Replace path.normalize\n// ----------------------------------------------------------------------------\n\nexport function normalizeFilePath(path: string): string {\n    if (path.length === 0) {\n        return '.'\n    }\n    if (path.length === 1) {\n        return path\n    }\n\n    const isAbsolute = path.charAt(0) === '/'\n    const hasTrailingSlash = path.charAt(path.length - 1) === '/'\n\n    let resultPath = normalizeString(path, isAbsolute)\n    if (resultPath.length === 0) {\n        if (isAbsolute) {\n            return '/'\n        } else {\n            if (hasTrailingSlash) {\n                return './'\n            } else {\n                return '.'\n            }\n        }\n    }\n\n    if (isAbsolute) {\n        resultPath = `/${resultPath}`\n    }\n    if (hasTrailingSlash) {\n        resultPath = `${resultPath}/`\n    }\n\n    return resultPath\n}\n\nfunction normalizeString(path: string, isAbsolute: boolean): string {\n    const parts = path.split('/').filter((part) => part.length > 0)\n    const outputStack = new Array<string>()\n\n    for (let i = 0; i < parts.length; i++) {\n        const currPart = parts.at(i)\n\n        // Skip over repeated slashes e.g. `////`\n        if (!currPart) {\n            continue\n        }\n\n        // Skip over single dots e.g. `/./`\n        if (currPart === '.') {\n            continue\n        }\n\n        // Skip over double dots and pop off previous part off stack\n        if (currPart === '..') {\n            switch (true) {\n                // Unless:\n                case !isAbsolute && outputStack.length === 0: // Original path is relative path and output is currently empty (at the start)\n                case outputStack.at(-1) === '..': // Already has '..' on the stack (i.e. continuing relative ../../../)\n                    break\n\n                default: {\n                    outputStack.pop()\n                    continue\n                }\n            }\n        }\n\n        outputStack.push(currPart)\n    }\n\n    return outputStack.join('/')\n}\n","import { normalizeSimpleName, type SimpleName } from '../SimpleName.ts'\nimport { RstNode } from '../RstNode/RstNode.ts'\nimport { convertUnicode } from '../utils/convertUnicode.ts'\nimport { RstDirective } from '../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstInterpretedText } from '../RstNode/Inline/InterpretedText.ts'\nimport type { RstGeneratorOptions } from './RstGeneratorOptions.ts'\nimport { RstCompiler } from '../RstCompiler.ts'\nimport { SubstitutionResolver } from '../Parser/Resolver/SubstitutionResolver.ts'\nimport { HtmlAttrResolver } from '../Parser/Resolver/HtmlAttrResolver.ts'\nimport { RstDocument } from '../RstNode/Block/Document.ts'\nimport type { RstNodeGenerator } from './RstGenerator.ts'\nimport { type FilePathWithoutRst, getFilePathWithoutRst } from './FilePathWithoutRst.ts'\nimport { RstSection } from '../RstNode/Block/Section.ts'\nimport { HtmlAttributeStore } from './HtmlAttributeStore.ts'\nimport { RstGeneratorError } from './RstGeneratorError.ts'\nimport { sha1 } from '../utils/sha1.ts'\nimport { SimpleNameResolver } from '../Parser/Resolver/SimpleNameResolver.ts'\nimport { RstFootnoteDef } from '../RstNode/ExplicitMarkup/FootnoteDef.ts'\nimport { RstFootnoteRef } from '../RstNode/Inline/FootnoteRef.ts'\nimport type { RstParserOutput } from '../Parser/RstParserState.ts'\nimport { RstCitationRef } from '../RstNode/Inline/CitationRef.ts'\nimport { RstCitationDef } from '../RstNode/ExplicitMarkup/CitationDef.ts'\nimport { getAutoFootnoteSymbol } from '../utils/getAutoFootnoteSymbol.ts'\nimport { getPathDirname, joinFilePath, normalizeFilePath, resolveFilePath } from '../utils/path.ts'\nimport { RstHyperlinkTarget } from '../RstNode/ExplicitMarkup/HyperlinkTarget.ts'\nimport { RstHyperlinkRef } from '../RstNode/Inline/HyperlinkRef.ts'\n\nexport type RstGeneratorInput = {\n    basePath: string // Base url all pages will be deployed to (default /)\n    currentDocPath: string\n    docs: Array<{\n        docPath: string // docPath is relative to basePath\n        parserOutput: RstParserOutput\n    }>\n}\n\nexport type RstGeneratorOutput = {\n    body: string\n    header: string\n    downloads: Array<{\n        srcPath: string\n        destPath: string\n    }>\n}\n\ntype LinePrefix = {\n    val: string\n    replacementAfterOnce?: string\n}\n\ntype OutputBuffer = {\n    textOutput: string\n    prefixes: Array<LinePrefix>\n}\n\ntype VisitChildren = () => void\n\nexport class RstGeneratorState {\n    readonly opts: RstGeneratorOptions\n\n    private readonly _generatorInput: Readonly<RstGeneratorInput>\n    private readonly _compiler: RstCompiler\n    private readonly _basePath: FilePathWithoutRst\n    private readonly _currentDocPath: FilePathWithoutRst\n    private readonly _currentParserOutput: RstParserOutput\n    private readonly _docsCache: ReadonlyMap<FilePathWithoutRst, RstParserOutput>\n    private readonly _simpleNameCache: ReadonlyMap<SimpleName, FilePathWithoutRst>\n\n    private _globalHeaderBuffer = new Map<string, string>() // Content to write to top of output e.g. <script> <link> (indexed by string key so multiple nodes don't output the same content)\n    private _downloads = new Map<string, string>() // Maps source of download file (relative to basePath) to expected location to be served\n    private _outputBuffers: Array<OutputBuffer> = [\n        {\n            textOutput: '',\n            prefixes: [],\n        },\n    ]\n\n    private _enableUnicodeConversion = false\n    private _enableForcedHtmlMode = false // Some constructs cannot be represented in Markdown so we switch to outputting html recursively as fallback\n    private _disableLineBreaksBetweenBlocks = false\n    private _disableCommentMarkup = false // So we don't write comment markup inside a parent comment\n\n    constructor(\n        opts: RstGeneratorOptions,\n        generatorInput: RstGeneratorInput,\n        compiler: RstCompiler,\n    ) {\n        this.opts = opts\n        this._generatorInput = generatorInput\n        this._compiler = compiler\n\n        if (!this._generatorInput.basePath.startsWith('/') || !this._generatorInput.basePath.endsWith('/')) {\n            throw new Error(`basePath:\"${this._generatorInput.basePath}\" must start and end with \"/\"`)\n        }\n\n        const currentDoc = this._generatorInput.docs.find(({ docPath }) => docPath === this._generatorInput.currentDocPath)\n        if (!currentDoc) {\n            throw new Error(`Failed to find \"${this._generatorInput.currentDocPath}\" in generatorInput.docs`)\n        }\n\n        this._basePath = getFilePathWithoutRst(normalizeFilePath(this._generatorInput.basePath))\n        this._currentDocPath = getFilePathWithoutRst(joinFilePath(this._basePath, currentDoc.docPath))\n        this._currentParserOutput = currentDoc.parserOutput\n\n        this._docsCache = new Map(this._generatorInput.docs.map(({ docPath, parserOutput }) => {\n            const absPath = getFilePathWithoutRst(joinFilePath(this._basePath, docPath))\n            return [absPath, parserOutput]\n        }))\n        this._simpleNameCache = new Map(this._generatorInput.docs.flatMap(({ docPath, parserOutput }) => {\n            const names = [...parserOutput.simpleNameResolver.nodesLinkableFromOutside.keys()]\n            const absPath = getFilePathWithoutRst(joinFilePath(this._basePath, docPath))\n            return names.map((name) => [name, absPath])\n        }))\n\n        this.visitNode(this._currentParserOutput.root)\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Getters\n    // ------------------------------------------------------------------------\n\n    get root(): RstDocument {\n        return this._currentParserOutput.root\n    }\n\n    get generatorOutput(): RstGeneratorOutput {\n        if (this._outputBuffers.length !== 1) {\n            throw new RstGeneratorError(this, 'Corrupt outputBuffer')\n        }\n\n        const body = this._outputBuffers[0].textOutput\n        const header = [...this._globalHeaderBuffer.values()].join('\\n')\n        const downloads = [...this._downloads.entries()].map(([srcPath, destPath]) => ({ srcPath, destPath }))\n\n        return {\n            body,\n            header,\n            downloads,\n        }\n    }\n\n    get debugInfo(): string {\n        let str = ''\n\n        str += `\\n  basePath        : \"${this._basePath}\"`\n        str += `\\n    resolved from : \"${this._generatorInput.basePath}\"`\n\n        str += `\\n  currentDocPath  : \"${this._currentDocPath}\"`\n        str += `\\n    resolved from : \"${this._generatorInput.currentDocPath}\"`\n\n        return str\n    }\n\n    get simpleNameResolver(): SimpleNameResolver {\n        return this._currentParserOutput.simpleNameResolver\n    }\n\n    get substitutionResolver(): SubstitutionResolver {\n        return this._currentParserOutput.substitutionResolver\n    }\n\n    get htmlAttrResolver(): HtmlAttrResolver {\n        return this._currentParserOutput.htmlAttrResolver\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Resolvers\n    // ------------------------------------------------------------------------\n\n    resolveExternalDoc(srcNode: RstNode, targetPath: string): { externalUrl: string; externalLabel?: string } {\n        const docFilePath = targetPath.startsWith('/')\n            ? joinFilePath(this._basePath, targetPath) // If given abs path, assume we want to search from basePath\n            : resolveFilePath(getPathDirname(this._currentDocPath), targetPath) // Otherwise, assume we want to search relative from current doc\n\n        const docPath = getFilePathWithoutRst(docFilePath)\n        const externalUrl = `${docPath}.html`\n\n        const parserOutput = this._docsCache.get(docPath)\n        if (!parserOutput) {\n            throw new RstGeneratorError(this, srcNode, `targetPath:\"${docPath}\" (resolved from \"${targetPath}\") not found`)\n        }\n\n        const firstSection = parserOutput.root.findFirstChild('Section')\n        const externalLabel = firstSection?.textContent\n\n        return {\n            externalUrl,\n            externalLabel,\n        }\n    }\n\n    canResolveExternalRef(targetRef: SimpleName): boolean {\n        return this._simpleNameCache.has(targetRef)\n    }\n\n    resolveExternalRef(srcNode: RstNode, targetRef: SimpleName): { externalUrl: string; externalLabel?: string } {\n        const docPath = this._simpleNameCache.get(targetRef)\n        if (!docPath) {\n            throw new RstGeneratorError(this, srcNode, `Failed to resolveExternalRef \"${targetRef}\"`)\n        }\n\n        const parserOutput = this._docsCache.get(docPath)\n        if (!parserOutput) {\n            throw new RstGeneratorError(this, srcNode, `Failed to resolveExternalRef \"${targetRef}\"`)\n        }\n\n        const targetNode = parserOutput.simpleNameResolver.nodesLinkableFromOutside.get(targetRef)\n        if (!targetNode) {\n            throw new RstGeneratorError(this, srcNode, `Failed to resolveExternalRef \"${targetRef}\"`)\n        }\n\n        const nodeIdAttr = parserOutput.htmlAttrResolver.getNodeHtmlId(targetNode)\n        if (!nodeIdAttr) {\n            throw new RstGeneratorError(this, srcNode, `Failed to resolveExternalRef \"${targetRef}\"`)\n        }\n\n        const externalUrl = docPath === this._currentDocPath\n            ? `#${nodeIdAttr}`\n            : `${docPath}#${nodeIdAttr}`\n\n        const externalLabel = (targetNode instanceof RstSection)\n            ? targetNode.textContent\n            : undefined\n\n        return {\n            externalUrl,\n            externalLabel,\n        }\n    }\n\n    resolveHyperlinkRefToUrl(node: RstHyperlinkRef): string {\n        if (node.isAnonymous && !node.isEmbeded) {\n            const anonymousHyperlinkTarget = this.simpleNameResolver.anonymousHyperlinkRefToTarget.get(node)\n            if (!anonymousHyperlinkTarget) {\n                throw new RstGeneratorError(this, `Failed to resolve [${node.toShortString()}] (${node.lineNums})`)\n            }\n\n            return this.resolveNodeToUrl(anonymousHyperlinkTarget)\n        }\n\n        const candidateSimpleNames = new Array<SimpleName>()\n\n        // HyperlinkRef can be written without space between label and angle brackets\n        // - Some expect the angle brackets to contain the target url\n        // - Others expect the whole string as label\n        if (node.isEmbeded) {\n            candidateSimpleNames.push(normalizeSimpleName(`${node.label}<${node.target}>`))\n        }\n\n        // HyperlinkRef can have aliases inside embeded targets e.g. `label <target_>`_\n        if (node.isEmbeded && node.isAlias) {\n            candidateSimpleNames.push(normalizeSimpleName(node.target.substring(0, node.target.length - 1)))\n        }\n\n        // Finally fallback to treating the target as a SimpleName as-is\n        candidateSimpleNames.push(normalizeSimpleName(node.target))\n\n        for (const simpleName of candidateSimpleNames) {\n            const targetUrl = this.resolveSimpleNameToUrl(simpleName)\n            if (targetUrl) {\n                return targetUrl\n            }\n        }\n\n        return node.target\n    }\n\n    resolveNodeToUrl(node: RstNode): string {\n        const simpleName = this.simpleNameResolver.getSimpleName(node)\n        const url = this.resolveSimpleNameToUrl(simpleName)\n        if (!url) {\n            throw new RstGeneratorError(this, node, 'Failed to resolveNodeToUrl')\n        }\n\n        return url\n    }\n\n    resolveSimpleNameToUrl(simpleName: SimpleName): string | null {\n        const seenNodes = new Set<RstNode>() // To avoid cyclic nodes causing infinite loops\n        let currNode: RstNode | null = this.simpleNameResolver.resolveSimpleName(simpleName)\n\n        while (currNode && !seenNodes.has(currNode)) {\n            seenNodes.add(currNode)\n\n            if (currNode instanceof RstHyperlinkTarget) {\n                if (currNode.isAlias) {\n                    // HyperlinkTarget aliasing another node is defined to have trailing underscore\n                    currNode = this.simpleNameResolver.resolveSimpleName(normalizeSimpleName(currNode.target.substring(0, currNode.target.length - 1)))\n                    continue\n                }\n                if (currNode.isTargetingNextNode) {\n                    currNode = this.simpleNameResolver.resolveIndirectHyperlinkTarget(currNode)\n                    continue\n                }\n\n                return currNode.target\n            }\n\n            if (currNode instanceof RstHyperlinkRef) {\n                if (currNode.isAlias) {\n                    if (currNode.isEmbeded) {\n                        // HyperlinkRef aliasing another node inside an embeded is defined to have trailing underscore (e.g. `label <target_>`_)\n                        currNode = this.simpleNameResolver.resolveSimpleName(normalizeSimpleName(currNode.target.substring(0, currNode.target.length - 1)))\n                    } else {\n                        // Otherwise the target is treated as the entire alias name (e.g. `target`_)\n                        currNode = this.simpleNameResolver.resolveSimpleName(normalizeSimpleName(currNode.target))\n                    }\n\n                    continue\n                }\n\n                return currNode.target\n            }\n\n            const idAttr = this.htmlAttrResolver.getNodeHtmlId(currNode)\n            if (!idAttr) {\n                throw new RstGeneratorError(this, currNode, `Resolved SimpleName:\"${simpleName}\" to [${currNode.toShortString()}] but it is not marked as linkable in HtmlAttrResolver`)\n            }\n\n            return `#${idAttr}`\n        }\n\n        return null\n    }\n\n    resolveCitationDef(citationRef: RstCitationRef): RstCitationDef {\n        const citationDef = this.simpleNameResolver.citationRefToDef.get(citationRef)\n        if (!citationDef) {\n            throw new RstGeneratorError(this, citationRef, 'Failed to resolveCitationDef')\n        }\n\n        return citationDef\n    }\n\n    resolveCitationDefBacklinks(citationDef: RstCitationDef): Array<string> {\n        const refs = this.simpleNameResolver.citationDefBacklinks.get(citationDef) ?? []\n        return refs.map((citationRef) => this.resolveNodeToUrl(citationRef))\n    }\n\n    resolveFootnoteDef(footnoteRef: RstFootnoteRef): RstFootnoteDef {\n        const footnoteDef =  this.simpleNameResolver.footnoteRefToDef.get(footnoteRef)\n        if (!footnoteDef) {\n            throw new RstGeneratorError(this, footnoteRef, 'Failed to resolveFootnoteDef')\n        }\n\n        return footnoteDef\n    }\n\n    resolveFootnoteDefBacklinks(footnoteDef: RstFootnoteDef): Array<string> {\n        const footnoteRefs = this.simpleNameResolver.footnoteDefBacklinks.get(footnoteDef) ?? []\n        return footnoteRefs.map((footnoteRef) => this.resolveNodeToUrl(footnoteRef))\n    }\n\n    resolveFootnoteDefLabel(footnoteDef: RstFootnoteDef): string {\n        if (footnoteDef.isAutoSymbol) {\n            const symNum = this.simpleNameResolver.footnoteDefToSymNum.get(footnoteDef)\n            if (!symNum) {\n                throw new RstGeneratorError(this, footnoteDef, 'Failed to resolveFootnoteDefLabel')\n            }\n\n            return getAutoFootnoteSymbol(symNum)\n        }\n\n        const labelNum = this.simpleNameResolver.footnoteDefToLabelNum.get(footnoteDef)\n        if (!labelNum) {\n            throw new RstGeneratorError(this, footnoteDef, 'Failed to resolveFootnoteDefLabel')\n        }\n\n        return labelNum.toString()\n    }\n\n    resolveFootnoteRefLabel(footnoteRef: RstFootnoteRef): string {\n        const footnoteDef = this.simpleNameResolver.footnoteRefToDef.get(footnoteRef)\n        if (!footnoteDef) {\n            throw new RstGeneratorError(this, footnoteRef, 'Failed to resolveFootnoteRefLabel')\n        }\n\n        return this.resolveFootnoteDefLabel(footnoteDef)\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Visit\n    // ------------------------------------------------------------------------\n\n    visitNode(node?: RstNode | null) {\n        if (!node) {\n            return\n        }\n\n        const handleNode = () => {\n            switch (true) {\n                case node instanceof RstInterpretedText: {\n                    const generator = this._compiler.interpretedTextGenerators.get(node.role.toLowerCase())\n                    if (!generator) {\n                        throw new RstGeneratorError(this, node, 'Missing generator')\n                    }\n\n                    generator.generate(this, node)\n                    break\n                }\n\n                case node instanceof RstDirective: {\n                    const generator = this._compiler.directiveGenerators.get(node.directive.toLowerCase())\n                    if (!generator) {\n                        throw new RstGeneratorError(this, node, 'Missing generator')\n                    }\n\n                    generator.generate(this, node)\n                    break\n                }\n\n                default: {\n                    const generator = this._compiler.nodeGenerators.get(node.nodeType)\n                    if (!generator) {\n                        throw new RstGeneratorError(this, node, 'Missing generator')\n                    }\n\n                    // Really ugly way to get types to work\n                    (generator as RstNodeGenerator<'Document'>).generate(this, node as RstDocument)\n                }\n            }\n        }\n\n        if (this.htmlAttrResolver.hasForcedHtmlClass(node)) {\n            this.useForcedHtmlMode(() => {\n                handleNode()\n            })\n        } else {\n            handleNode()\n        }\n    }\n\n    visitNodes(nodes: ReadonlyArray<RstNode>): void {\n        if (nodes.length === 0) {\n            return\n        }\n\n        const allNodesAreBlock = nodes.every((node) => !node.isInlineNode)\n\n        for (const [idx, child] of nodes.entries()) {\n            this.visitNode(child)\n\n            const notLastChild = idx < nodes.length - 1\n            if (!this.isUsingNoLineBreaksBetweenBlocks && allNodesAreBlock && notLastChild) {\n                this.writeLine()\n            }\n        }\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: LinePrefix\n    // ------------------------------------------------------------------------\n\n    private get _currentBuffer(): OutputBuffer {\n        return this._outputBuffers[this._outputBuffers.length - 1]\n    }\n\n    hasLinePrefix(): boolean {\n        return this._currentBuffer.prefixes.length > 0\n    }\n\n    private getAndUpdateLinePrefix(): string {\n        const linePrefix = this._currentBuffer.prefixes.map((prefix) => prefix.val).join('')\n\n        // Update prefixes after reading them in this getter\n        // Some prefixes want to only be used once\n        //\n        // e.g.\n        //\n        //      1. Bullet list\n        //         Second line\n        //      ^^\n        //      |\n        //      On second line, the \"1. \" prefix got replaced with \"  \" after it is consumed once\n        //\n\n        this._currentBuffer.prefixes = (() => {\n            const newPrefixes = new Array<LinePrefix>()\n\n            for (const prefix of this._currentBuffer.prefixes) {\n                if (prefix.replacementAfterOnce) {\n                    newPrefixes.push({\n                        val: prefix.replacementAfterOnce,\n                    })\n                } else {\n                    newPrefixes.push({\n                        val: prefix.val,\n                    })\n                }\n            }\n\n            return newPrefixes\n        })()\n\n        return linePrefix\n    }\n\n    usePrefix(prefix: LinePrefix, visitChildren: VisitChildren) {\n        this._currentBuffer.prefixes.push(prefix)\n\n        visitChildren()\n\n        const expectedPrefix = prefix.replacementAfterOnce ?? prefix.val\n        const popped = this._currentBuffer.prefixes.pop()\n        if (popped?.val !== expectedPrefix) {\n            throw new RstGeneratorError(this, `Invalid prefix popped off stack expected:\"${expectedPrefix}\" actual:\"${popped?.val}\"`)\n        }\n    }\n\n    useIndent(visitChildren: VisitChildren) {\n        this.usePrefix({ val: ' '.repeat(this.opts.outputIndentSize) }, visitChildren)\n    }\n\n    useNodeGenerator(nodeGenerator: RstNodeGenerator, visitChildren: VisitChildren) {\n        const nodeType = nodeGenerator.nodeType\n        const prevNodeGenerator = this._compiler.nodeGenerators.get(nodeType)\n\n        this._compiler.nodeGenerators.set(nodeType, nodeGenerator)\n        visitChildren()\n\n        if (prevNodeGenerator) {\n            this._compiler.nodeGenerators.set(nodeType, prevNodeGenerator)\n        } else {\n            this._compiler.nodeGenerators.delete(nodeType)\n        }\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Write Flags\n    // ------------------------------------------------------------------------\n\n    useUnicodeConversion(visitChildren: VisitChildren): void {\n        const alreadyEnabled = this._enableUnicodeConversion\n\n        if (!alreadyEnabled) {\n            this._enableUnicodeConversion = true\n        }\n\n        visitChildren()\n\n        if (!alreadyEnabled) {\n            this._enableUnicodeConversion = false\n        }\n    }\n\n    get isUsingUnicodeConversion(): boolean {\n        return this._enableUnicodeConversion\n    }\n\n    useForcedHtmlMode(visitChildren: VisitChildren) {\n        const alreadyEnabled = this._enableForcedHtmlMode\n\n        if (!alreadyEnabled) {\n            this._enableForcedHtmlMode = true\n        }\n\n        // Markdown does not support html with linebreaks\n        this.useNoLineBreaksBetweenBlocks(visitChildren)\n\n        if (!alreadyEnabled) {\n            this._enableForcedHtmlMode = false\n        }\n    }\n\n    get isUsingForcedHtmlMode(): boolean {\n        return this._enableForcedHtmlMode\n    }\n\n    useNoLineBreaksBetweenBlocks(visitChildren: VisitChildren) {\n        const alreadyDisabled = this._disableLineBreaksBetweenBlocks\n\n        if (!alreadyDisabled) {\n            this._disableLineBreaksBetweenBlocks = true\n        }\n\n        visitChildren()\n\n        if (!alreadyDisabled) {\n            this._disableLineBreaksBetweenBlocks = false\n        }\n    }\n\n    get isUsingNoLineBreaksBetweenBlocks(): boolean {\n        return this._disableLineBreaksBetweenBlocks\n    }\n\n    useNoCommentMarkup(visitChildren: VisitChildren) {\n        const alreadyDisabled = this._disableCommentMarkup\n\n        if (!alreadyDisabled) {\n            this._disableCommentMarkup = true\n        }\n\n        visitChildren()\n\n        if (!alreadyDisabled) {\n            this._disableCommentMarkup = false\n        }\n    }\n\n    get isUsingNoCommentMarkup(): boolean {\n        return this._disableCommentMarkup\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Alt Writers\n    // ------------------------------------------------------------------------\n\n    registerGlobalHeader(key: string, text: string) {\n        this._globalHeaderBuffer.set(key, text)\n    }\n\n    registerDownload(targetPath: string) {\n        const downloadSrc = targetPath.startsWith('/')\n            ? joinFilePath(this._basePath, targetPath) // If given abs path, assume we want to search from basePath\n            : resolveFilePath(getPathDirname(this._currentDocPath), targetPath) // Otherwise, assume we want to search relative from current doc\n\n        const fileHash = sha1(downloadSrc)\n        const fileName = downloadSrc.split('/').at(-1) ?? downloadSrc\n        const downloadDest = joinFilePath(this._basePath, '_downloads', fileHash, fileName)\n\n        this._downloads.set(downloadSrc, downloadDest)\n\n        return {\n            downloadSrc,\n            downloadDest,\n            fileName,\n        }\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Writers\n    // ------------------------------------------------------------------------\n\n    getChildrenText(visitChildren: VisitChildren): string {\n        this._outputBuffers.push({\n            textOutput: '',\n            prefixes: [],\n        })\n\n        visitChildren()\n\n        const lastBuffer = this._outputBuffers.pop()\n        if (!lastBuffer) {\n            throw new RstGeneratorError(this, 'Invalid lastBuffer')\n        }\n\n        let bodyText = lastBuffer.textOutput\n        bodyText = bodyText.replace(/^\\n+/, '') // Remove all newlines at start\n        bodyText = bodyText.replace(/\\n+$/, '') // Remove all newlines at end\n        return bodyText\n    }\n\n    writeText(text: string) {\n        const len = this._outputBuffers.length\n        if (len < 1) {\n            throw new RstGeneratorError(this, 'Invalid lastBuffer')\n        }\n\n        if (this._enableUnicodeConversion) {\n            text = convertUnicode(text)\n        }\n\n        this._outputBuffers[len - 1].textOutput += text\n    }\n\n    writeTextWithLinePrefix(text: string) {\n        this.writeText(text.replaceAll('\\n', () => '\\n' + this.getAndUpdateLinePrefix()))\n    }\n\n    writeLine(text?: string | null) {\n        let line = ''\n\n        if (text) {\n            line += this.getAndUpdateLinePrefix()\n            line += text.replaceAll(/\\n(?!\\n)/g, () => '\\n' + this.getAndUpdateLinePrefix())\n        } else {\n            line += this.getAndUpdateLinePrefix().trimEnd()\n        }\n\n        this.writeText(line + '\\n')\n    }\n\n    writeLineVisitor(visitChildren: VisitChildren) {\n        this.writeText(this.getAndUpdateLinePrefix())\n        visitChildren()\n        this.writeText('\\n')\n    }\n\n    // VitePress uses `markdown-it-container` for custom block-level container\n    // When nesting containers, we need the outer blocks to have more colons than the inner containers\n    //\n    //      :::::: outer\n    //      ::: inner\n    //      Content\n    //      :::\n    //      ::::::\n    //\n    writeLineMdContainer(label: string, root: RstNode, visitChildren: VisitChildren): void {\n        const getMaxMdContainerDepth = (node: RstNode): number => {\n            const selfIsMdContainer = node instanceof RstDirective && this.opts.directivesWillOutputMdContainers.includes(node.directive)\n\n            let maxChildMdContainerDepth = 0\n            for (const child of node.children) {\n                maxChildMdContainerDepth = Math.max(maxChildMdContainerDepth, getMaxMdContainerDepth(child))\n            }\n\n            return maxChildMdContainerDepth + (selfIsMdContainer ? 1 : 0)\n        }\n\n        const numNestedContainers = getMaxMdContainerDepth(root)\n        const dots = ':::'.repeat(numNestedContainers)\n\n        this.writeLine(`${dots} ${label}`)\n        visitChildren()\n        this.writeLine(dots)\n    }\n\n    writeLineHtmlTag(tag: string, node: RstNode | null, visitChildren?: VisitChildren): void {\n        this.writeLineHtmlTagWithAttr(tag, node, new HtmlAttributeStore(), visitChildren)\n    }\n\n    writeLineHtmlTagWithAttr(tag: string, node: RstNode | null, attrs: HtmlAttributeStore, visitChildren?: VisitChildren): void {\n        const isSelfClosing = (visitChildren === undefined)\n\n        this.writeLineVisitor(() => {\n            this.writeTextHtmlTagStart(tag, node, attrs, isSelfClosing)\n        })\n\n        if (visitChildren) {\n            this.useIndent(() => {\n                visitChildren()\n            })\n        }\n\n        if (!isSelfClosing) {\n            this.writeLineVisitor(() => {\n                this.writeTextHtmlTagEnd(tag)\n            })\n        }\n    }\n\n    writeLineHtmlTagInSameLine(tag: string, node: RstNode | null, visitChildren: VisitChildren) {\n        this.writeLineHtmlTagWithAttrInSameLine(tag, node, new HtmlAttributeStore(), visitChildren)\n    }\n\n    writeLineHtmlTagWithAttrInSameLine(tag: string, node: RstNode | null, attrs: HtmlAttributeStore, visitChildren: VisitChildren) {\n        const isSelfClosing = visitChildren === undefined\n\n        this.writeLineVisitor(() => {\n            this.writeTextHtmlTagStart(tag, node, attrs, isSelfClosing)\n\n            visitChildren?.()\n\n            if (!isSelfClosing) {\n                this.writeTextHtmlTagEnd(tag)\n            }\n        })\n    }\n\n    private writeTextHtmlTagStart(tag: string, node: RstNode | null, attrs: HtmlAttributeStore, isSelfClosing: boolean) {\n        this.writeText('<')\n        this.writeText(tag)\n\n        if (node) {\n            const htmlId = this.htmlAttrResolver.getNodeHtmlId(node)\n            if (htmlId) {\n                attrs.set('id', htmlId)\n            }\n\n            const htmlClassDirectives = this.htmlAttrResolver.getNodeHtmlClasses(node)\n            if (htmlClassDirectives.length > 0) {\n                attrs.appendAll('class', htmlClassDirectives)\n            }\n        }\n\n        this.writeText(attrs.toString())\n\n        if (isSelfClosing) {\n            this.writeText(' />')\n        } else {\n            this.writeText('>')\n        }\n    }\n\n    private writeTextHtmlTagEnd(tag: string) {\n        this.writeText(`</${tag}>`)\n    }\n\n    writeLineHtmlComment(text?: string) {\n        if (!text) {\n            return\n        }\n\n        const lines = text.split('\\n')\n\n        if (lines.length === 1) {\n            if (this.isUsingNoCommentMarkup) {\n                this.writeLine(lines[0])\n            } else {\n                this.writeLine(`<!-- ${lines[0]} -->`)\n            }\n        } else {\n            if (!this.isUsingNoCommentMarkup) {\n                this.writeLine('<!--')\n            }\n\n            this.useIndent(() => {\n                for (const line of lines) {\n                    this.writeLine(line)\n                }\n            })\n\n            if (!this.isUsingNoCommentMarkup) {\n                this.writeLine('-->')\n            }\n        }\n    }\n\n    writeLineMdComment(text?: string): void {\n        if (!text) {\n            return\n        }\n\n        if (this.isUsingForcedHtmlMode) {\n            this.writeLineHtmlComment(text)\n            return\n        }\n\n        const lines = text.split('\\n')\n\n        for (const line of lines) {\n            if (!line) {\n                continue\n            }\n\n            if (this.isUsingNoCommentMarkup) {\n                this.writeLine(line)\n            } else {\n                this.writeLine(`[${line}]: #`)\n            }\n        }\n    }\n}\n","import { RstNode } from '../RstNode/RstNode.ts'\nimport { RstGeneratorState } from './RstGeneratorState.ts'\n\nexport class RstGeneratorError extends Error {\n    constructor(generatorState: RstGeneratorState, msg: string)\n    constructor(generatorState: RstGeneratorState, node: RstNode, message: string)\n    constructor(generatorState: RstGeneratorState, ...args: [string] | [RstNode, string]) {\n        let message = ''\n        let srcNode: RstNode | null\n\n        if (args.length === 2) {\n            const [node, msg] = args\n            message += msg\n            srcNode = node\n        } else {\n            const [msg] = args\n            message += msg\n            srcNode = null\n        }\n\n        message += '\\n'\n        message += generatorState.debugInfo\n        message += '\\n'\n\n        if (srcNode) {\n            message += '\\n'\n            message += srcNode.toString()\n        }\n\n        super(message)\n        this.name = 'RstGeneratorError'\n\n        // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, RstGeneratorError)\n        }\n    }\n}\n","import { RstNode, type RstNodeJson } from '../RstNode.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport { RstGeneratorError } from '../../Generator/RstGeneratorError.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#paragraphs\n// ----------------------------------------------------------------------------\n\nexport class RstParagraph extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstParagraph {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstParagraph(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstParagraph {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstParagraph(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Paragraph'\n    }\n\n    override get willRenderVisibleContent(): boolean {\n        return !(this.textContent === '::' && this.getNextSibling()?.nodeType === 'LiteralBlock')\n    }\n\n    getOutputText(generatorState: RstGeneratorState): string | null {\n        const childText = generatorState.getChildrenText(() => {\n            generatorState.visitNodes(this.children)\n        })\n\n        switch (true) {\n            case this.getNextSibling()?.nodeType !== 'LiteralBlock': {\n                return childText // If Paragraph is not followed by LiteralBlock, then generate Paragraph as-is\n            }\n\n            case childText === '::': {\n                return null // Do not generate Paragraph\n            }\n\n            case childText.endsWith(' ::'): {\n                return childText.substring(0, childText.length - 3) // Remove \" ::\"\n            }\n\n            case childText.endsWith('::'): {\n                return childText.substring(0, childText.length - 1) // Remove last \":\"\n            }\n        }\n\n        throw new RstGeneratorError(generatorState, 'Invalid childText')\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#transitions\n// ----------------------------------------------------------------------------\n\nexport class RstTransition extends RstNode {\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n    ) {\n        super(registrar, source)\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstTransition {\n        return new RstTransition(registrar, structuredClone(json.source))\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstTransition {\n        return new RstTransition(registrar, structuredClone(this.source))\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Transition'\n    }\n}\n","import { RstNode, type RstNodeJson } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstCitationDefGroup extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstCitationDefGroup {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstCitationDefGroup(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstCitationDefGroup {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstCitationDefGroup(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'CitationDefGroup'\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeSource } from '../RstNode.ts'\nimport { removeEscapeChar } from '../../utils/removeEscapeChar.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#comments\n// ----------------------------------------------------------------------------\n\nexport type RstCommentData = {\n    rawText: string\n}\n\nexport class RstComment extends RstNode {\n    private readonly _rawText: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        rawText: string,\n    ) {\n        super(registrar, source)\n        this._rawText = rawText\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstCommentData>\n\n        root.data = {\n            rawText: this._rawText,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstCommentData>): RstComment {\n        return new RstComment(registrar, structuredClone(json.source), json.data.rawText)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstComment {\n        return new RstComment(registrar, structuredClone(this.source), this._rawText)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Comment'\n    }\n\n    override get willRenderVisibleContent(): boolean {\n        return false\n    }\n\n    override get shouldExportPlainText(): boolean {\n        return true\n    }\n\n    override get textContent(): string {\n        return removeEscapeChar(this._rawText)\n    }\n\n    override get rawTextContent(): string {\n        return this._rawText\n    }\n}\n","import { RstNode, type RstNodeJson } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport class RstFootnoteDefGroup extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstFootnoteDefGroup {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstFootnoteDefGroup(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstFootnoteDefGroup {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstFootnoteDefGroup(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'FootnoteDefGroup'\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport { removeEscapeChar } from '../../utils/removeEscapeChar.ts'\nimport { RstFieldList } from '../List/FieldList.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstSubstitutionDefData = {\n    rawNeedle: string\n    rawDirective: string\n    initContent: Array<RstNodeJson>\n    config: RstNodeJson | null\n}\n\nexport class RstSubstitutionDef extends RstNode {\n    private readonly _rawNeedle: string\n    private readonly _rawDirective: string\n    private readonly _initContent: ReadonlyArray<RstNode> // Content on first line of directive\n    private readonly _config: RstFieldList | null // FieldList that specifies the Directive's settings\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        rawNeedle: string,\n        rawDirective: string,\n        initContent: ReadonlyArray<RstNode>, // Content on first line of directive\n        config: RstFieldList | null, // FieldList that specifies the Directive's settings\n    ) {\n        super(registrar, source, children)\n        this._rawNeedle = rawNeedle\n        this._rawDirective = rawDirective\n        this._initContent = initContent\n        this._config = config\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            needle: this.needle,\n            directive: this.directive,\n        }\n\n        if (this.initContent.length > 0) {\n            root.data.initContent = this.initContent.map((node) => node.toObject())\n        }\n        if (this.config) {\n            root.data.config = this.config.toObject()\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstSubstitutionDefData>\n\n        root.data = {\n            rawNeedle: this._rawNeedle,\n            rawDirective: this._rawDirective,\n            initContent: this.initContent.map((node) => node.toJSON()),\n            config: this.config?.toJSON() ?? null,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstSubstitutionDefData>): RstSubstitutionDef {\n        const initContent = json.data.initContent.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        const config = json.data.config ? RstFieldList.reviveRstNodeFromJson(registrar, json.data.config) : null\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstSubstitutionDef(registrar, structuredClone(json.source), children, json.data.rawNeedle, json.data.rawDirective, initContent, config)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstSubstitutionDef {\n        const initContent = this.initContent.map((child) => child.clone(registrar))\n        const config = this.config?.clone(registrar) ?? null\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstSubstitutionDef(registrar, structuredClone(this.source), children, this._rawNeedle, this._rawDirective, initContent, config)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'SubstitutionDef'\n    }\n\n    override get willRenderVisibleContent(): boolean {\n        return false\n    }\n\n    get needle(): string {\n        return removeEscapeChar(this._rawNeedle)\n    }\n\n    get directive(): string {\n        return removeEscapeChar(this._rawDirective)\n    }\n\n    get initContent(): ReadonlyArray<RstNode> {\n        return this._initContent\n    }\n\n    get initContentText(): string {\n        return this._initContent.map((child) => child.textContent).join()\n    }\n\n    get config(): RstFieldList | null {\n        return this._config\n    }\n\n    override toShortString(): string {\n        let str = `${super.toShortString()} needle:\"${this.needle}\" directive:\"${this.directive}\"`\n\n        if (this.initContentText) {\n            str += ` initContentText:\"${this.initContentText}\"`\n        }\n\n        return str\n    }\n}\n","import { RstNode, type RstNodeJson } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#bullet-lists\n// ----------------------------------------------------------------------------\n\nexport class RstBulletList extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstBulletList {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstBulletList(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstBulletList {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstBulletList(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'BulletList'\n    }\n}\n","export const romanUpperRe = /(I+|[MDCLXVI]{2,})/\nexport const romanLowerRe = /(i+|[mdclxvi]{2,})/\n\n// LOL leetcode actually applicable to work fr fr\nexport function romanToInt(s: string): number {\n    s = s.toUpperCase()\n    let sum = 0\n\n    for (let i = 0; i < s.length; i++) {\n        const curr = s[i]\n        const next = s[i + 1]\n\n        if (curr === 'V') {\n            sum += 5\n        } else if (curr === 'L') {\n            sum += 50\n        } else if (curr === 'D') {\n            sum += 500\n        } else if (curr === 'M') {\n            sum += 1000\n        } else if (curr === 'I') {\n            if (next === 'V' || next === 'X') {\n                sum -= 1\n            } else {\n                sum += 1\n            }\n        } else if (curr === 'X') {\n            if (next === 'L' || next === 'C') {\n                sum -= 10\n            } else {\n                sum += 10\n            }\n        } else if (curr === 'C') {\n            if (next === 'D' || next === 'M') {\n                sum -= 100\n            } else {\n                sum += 100\n            }\n        }\n    }\n\n    return sum\n}\n","import { romanToInt } from '../../utils/romanToInt.ts'\nimport { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport { RstGeneratorError } from '../../Generator/RstGeneratorError.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstBulletListItemData = {\n    bullet: string\n}\n\nexport class RstBulletListItem extends RstNode {\n    readonly bullet: string\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        bullet: string,\n    ) {\n        super(registrar, source, children)\n        this.bullet = bullet\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            bullet: this.bullet,\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstBulletListItemData>\n\n        root.data = {\n            bullet: this.bullet,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstBulletListItemData>): RstBulletListItem {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstBulletListItem(registrar, structuredClone(json.source), children, json.data.bullet)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstBulletListItem {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstBulletListItem(registrar, structuredClone(this.source), children, this.bullet)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'BulletListItem'\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} \"${this.bullet}\"`\n    }\n\n    isEnumeratedListFirstValue(): boolean {\n        switch (this.bullet) {\n            case '#':\n            case '1':\n            case 'A':\n            case 'a':\n            case 'I':\n            case 'i':\n                return true\n        }\n\n        return false\n    }\n\n    getEnumeratedListValue(generatorState: RstGeneratorState): number {\n        if (this.bullet === '#') {\n            const idx = this.getMyIndexInParent()\n            if (idx === null) {\n                throw new RstGeneratorError(generatorState, this, 'Failed to getEnumeratedListValue (failed to getMyIndexInParent)')\n            }\n\n            return idx + 1\n        } else {\n            const parent = this.getParent('EnumeratedList')\n            if (!parent) {\n                throw new RstGeneratorError(generatorState, this, 'Failed to getEnumeratedListValue (failed to getParent)')\n            }\n\n            switch (parent.listType) {\n                case 'AlphabetUpper':\n                case 'AlphabetLower': {\n                    const letter = this.bullet.toLowerCase()\n                    return letter.charCodeAt(0) - 'a'.charCodeAt(0) + 1\n                }\n\n                case 'RomanUpper':\n                case 'RomanLower':\n                    return romanToInt(this.bullet)\n\n                default:\n                    return parseInt(this.bullet)\n            }\n        }\n    }\n}\n","import { RstNode, type RstNodeJson } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#definition-lists\n// ----------------------------------------------------------------------------\n\nexport class RstDefinitionList extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstDefinitionList {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstDefinitionList(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstDefinitionList {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstDefinitionList(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'DefinitionList'\n    }\n}\n","import type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { ContinuousText } from '../Inline/Text.ts'\nimport { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstDefinitionListItemData = {\n    term: Array<RstNodeJson>\n    classifiers: Array<Array<RstNodeJson>>\n    definition: Array<RstNodeJson>\n}\n\nexport class RstDefinitionListItem extends RstNode {\n    readonly term: ContinuousText\n    readonly classifiers: ReadonlyArray<ContinuousText>\n    readonly definition: ReadonlyArray<RstNode>\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        term: ContinuousText,\n        classifiers: ReadonlyArray<ContinuousText>,\n        definition: ReadonlyArray<RstNode>,\n    ) {\n        super(registrar, source, definition)\n        this.term = term\n        this.classifiers = classifiers\n        this.definition = definition\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            term: this.term.map((node) => node.toObject()),\n            classifiers: this.classifiers.map((classifier) => classifier.map((node) => node.toObject())),\n            definition: this.definition.map((bodyNode) => bodyNode.toObject()),\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstDefinitionListItemData>\n\n        root.data = {\n            term: this.term.map((node) => node.toJSON()),\n            classifiers: this.classifiers.map((classifier) => classifier.map((node) => node.toJSON())),\n            definition: this.definition.map((bodyNode) => bodyNode.toJSON()),\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstDefinitionListItemData>): RstDefinitionListItem {\n        const term = json.data.term.map((childJson) => registrar.reviveRstTextFromJson(childJson))\n        const classifiers = json.data.classifiers.map((classifierTextNodes) => classifierTextNodes.map((childJson) => registrar.reviveRstTextFromJson(childJson)))\n        const definition = json.data.definition.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstDefinitionListItem(registrar, structuredClone(json.source), term, classifiers, definition)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstDefinitionListItem {\n        const term = this.term.map((child) => child.clone(registrar))\n        const classifiers = this.classifiers.map((classifierTextNodes) => classifierTextNodes.map((child) => child.clone(registrar)))\n        const definition = this.definition.map((child) => child.clone(registrar))\n        return new RstDefinitionListItem(registrar, structuredClone(this.source), term, classifiers, definition)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'DefinitionListItem'\n    }\n\n    override get shouldExportPlainText() {\n        return false\n    }\n\n    override get shouldExportChildren() {\n        return false\n    }\n\n    override toString(depth = 0): string {\n        const selfTab = '  '.repeat(depth)\n\n        // Prints line numbers in 1-based counting for ease of reading\n        let str = selfTab + `[${this.toShortString()}] (${this.lineNums})\\n`\n\n        str += selfTab + '  (Term)' + '\\n'\n        for (const node of this.term) {\n            str += node.toString(depth + 2)\n        }\n\n        str += selfTab + `  (Classifiers len:${this.classifiers.length})` + '\\n'\n        for (const classifier of this.classifiers) {\n            str += selfTab + '    (Classifier)' + '\\n'\n\n            for (const node of classifier) {\n                str += node.toString(depth + 3)\n            }\n        }\n\n        str += selfTab + '  (Definition)' + '\\n'\n        for (const node of this.definition) {\n            str += node.toString(depth + 2)\n        }\n\n        return str\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport type { RstEnumeratedListType } from './EnumeratedListType.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#bullet-lists\n// ----------------------------------------------------------------------------\n\nexport type RstEnumeratedListData = {\n    listType: RstEnumeratedListType\n}\n\nexport class RstEnumeratedList extends RstNode {\n    readonly listType: RstEnumeratedListType\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        listType: RstEnumeratedListType,\n    ) {\n        super(registrar, source, children)\n        this.listType = listType\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            listType: this.listType,\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstEnumeratedListData>\n\n        root.data = {\n            listType: this.listType,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstEnumeratedListData>): RstEnumeratedList {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstEnumeratedList(registrar, structuredClone(json.source), children, json.data.listType)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstEnumeratedList {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstEnumeratedList(registrar, structuredClone(this.source), children, this.listType)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'EnumeratedList'\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} \"${this.listType}\"`\n    }\n}\n","import { RstNode, type RstNodeJson } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#option-lists\n// ----------------------------------------------------------------------------\n\nexport class RstOptionList extends RstNode {\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson): RstOptionList {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstOptionList(registrar, structuredClone(json.source), children)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstOptionList {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstOptionList(registrar, structuredClone(this.source), children)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'OptionList'\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type CommandOption = {\n    name: string\n    delimiter?: string\n    rawArgName?: string\n}\n\nexport type OptionListItemData = {\n    options: ReadonlyArray<CommandOption>\n}\n\nexport class RstOptionListItem extends RstNode {\n    readonly options: ReadonlyArray<CommandOption>\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        options: ReadonlyArray<CommandOption>,\n    ) {\n        super(registrar, source, children)\n        this.options = options\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        root.data = {\n            options: this.options,\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<OptionListItemData>\n\n        root.data = {\n            options: this.options,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<OptionListItemData>): RstOptionListItem {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstOptionListItem(registrar, structuredClone(json.source), children, structuredClone(json.data.options))\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstOptionListItem {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstOptionListItem(registrar, structuredClone(this.source), children, structuredClone(this.options))\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'OptionListItem'\n    }\n\n    override toString(depth = 0): string {\n        const selfTab = '  '.repeat(depth)\n\n        let str = selfTab + `[${this.toShortString()}] (${this.lineNums})\\n`\n\n        str += selfTab + `  (Options len:${this.options.length})` + '\\n'\n        for (const option of this.options) {\n            str += selfTab + `    name:\"${option.name}\" delimiter:\"${option.delimiter}\" rawArgName:\"${option.rawArgName}\"` + '\\n'\n        }\n\n        str += selfTab + '  (Description)' + '\\n'\n        for (const node of this.children) {\n            str += node.toString(depth + 2)\n        }\n\n        return str\n    }\n}\n","import { RstNode, type RstNodeSource, type RstNodeJson, type RstNodeObject } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstTableCellData = {\n    rowSpan: number\n    colSpan: number\n    characterWidth: number\n}\n\nexport class RstTableCell extends RstNode {\n    readonly rowSpan: number\n    readonly colSpan: number\n    readonly characterWidth: number\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        rowSpan: number,\n        colSpan: number,\n        characterWidth: number,\n    ) {\n        if (rowSpan < 1 || colSpan < 1) {\n            throw new Error(`Invalid colspan:${colSpan} rowspan:${rowSpan}`)\n        }\n\n        super(registrar, source, children)\n        this.rowSpan = rowSpan\n        this.colSpan = colSpan\n        this.characterWidth = characterWidth\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        if (this.rowSpan !== 1 || this.colSpan !== 1) {\n            root.data = {\n                rowSpan: this.rowSpan,\n                colSpan: this.colSpan,\n            }\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstTableCellData>\n\n        root.data = {\n            rowSpan: this.rowSpan,\n            colSpan: this.colSpan,\n            characterWidth: this.characterWidth,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTableCellData>): RstTableCell {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstTableCell(registrar, structuredClone(json.source), children, json.data.rowSpan, json.data.colSpan, json.data.characterWidth)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstTableCell {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstTableCell(registrar, structuredClone(this.source), children, this.rowSpan, this.colSpan, this.characterWidth)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'TableCell'\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} rowSpan:${this.rowSpan} colSpan:${this.colSpan}`\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeSource } from '../RstNode.ts'\nimport { RstTableCell } from './TableCell.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\nimport { RstParagraph } from '../Block/Paragraph.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstTableData = {\n    headRows: Array<RstNodeJson>\n    bodyRows: Array<RstNodeJson>\n}\n\nexport class RstTable extends RstNode {\n    readonly headRows: ReadonlyArray<RstNode>\n    readonly bodyRows: ReadonlyArray<RstNode>\n    readonly isComplexTable: boolean\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        headRows: ReadonlyArray<RstNode>,\n        bodyRows: ReadonlyArray<RstNode>,\n    ) {\n        super(registrar, source, [...headRows, ...bodyRows])\n        this.headRows = headRows\n        this.bodyRows = bodyRows\n\n        const hasHeaderRow = headRows.length === 1\n        const hasSpanningCells = this.hasChild((child) => child instanceof RstTableCell && (child.colSpan > 1 || child.rowSpan > 1))\n        const hasNonParagraphCellContent = this.hasChild((child) => child instanceof RstTableCell && child.hasChild((cellChild) => !cellChild.isInlineNode && !(cellChild instanceof RstParagraph)))\n\n        this.isComplexTable = !hasHeaderRow || hasSpanningCells || hasNonParagraphCellContent\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstTableData>\n\n        root.data = {\n            headRows: this.headRows.map((child) => child.toJSON()),\n            bodyRows: this.bodyRows.map((child) => child.toJSON()),\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTableData>): RstTable {\n        const headRows = json.data.headRows.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        const bodyRows = json.data.bodyRows.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstTable(registrar, structuredClone(json.source), headRows, bodyRows)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstTable {\n        const headRows = this.headRows.map((row) => row.clone(registrar))\n        const bodyRows = this.bodyRows.map((row) => row.clone(registrar))\n        return new RstTable(registrar, structuredClone(this.source), headRows, bodyRows)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'Table'\n    }\n}\n","import { RstNode, type RstNodeJson, type RstNodeObject, type RstNodeSource } from '../RstNode.ts'\nimport type { RstNodeRegistrar } from '../../Parser/RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNodeType.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node\n// ----------------------------------------------------------------------------\n\nexport type RstTableRowData = {\n    isHeadRow: boolean\n}\n\nexport class RstTableRow extends RstNode {\n    readonly isHeadRow: boolean\n\n    constructor(\n        registrar: RstNodeRegistrar,\n        source: RstNodeSource,\n        children: ReadonlyArray<RstNode> = [],\n        isHeadRow: boolean,\n    ) {\n        super(registrar, source, children)\n        this.isHeadRow = isHeadRow\n    }\n\n    override toObject(): RstNodeObject {\n        const root = super.toObject()\n\n        if (this.isHeadRow) {\n            root.data = {\n                isHeadRow: this.isHeadRow,\n            }\n        }\n\n        return root\n    }\n\n    override toJSON(): RstNodeJson {\n        const root = super.toJSON() as RstNodeJson<RstTableRowData>\n\n        root.data = {\n            isHeadRow: this.isHeadRow,\n        }\n\n        return root\n    }\n\n    static reviveRstNodeFromJson(registrar: RstNodeRegistrar, json: RstNodeJson<RstTableRowData>): RstTableRow {\n        const children = json.children.map((childJson) => registrar.reviveRstNodeFromJson(childJson))\n        return new RstTableRow(registrar, structuredClone(json.source), children, json.data.isHeadRow)\n    }\n\n    override clone(registrar: RstNodeRegistrar): RstTableRow {\n        const children = this.children.map((child) => child.clone(registrar))\n        return new RstTableRow(registrar, structuredClone(this.source), children, this.isHeadRow)\n    }\n\n    override get nodeType(): RstNodeType {\n        return 'TableRow'\n    }\n\n    override toShortString(): string {\n        return `${super.toShortString()} isHeadRow:${this.isHeadRow}`\n    }\n}\n","import type { Brand } from '../@types/Brand.ts'\nimport { RstBlockquote } from '../RstNode/Block/Blockquote.ts'\nimport { RstBlockquoteAttribution } from '../RstNode/Block/BlockquoteAttribution.ts'\nimport { RstDoctestBlock, type RstDoctestBlockData } from '../RstNode/Block/DoctestBlock.ts'\nimport { RstDocument, type RstDocumentData } from '../RstNode/Block/Document.ts'\nimport { RstLineBlock, RstLineBlockLine } from '../RstNode/Block/LineBlock.ts'\nimport { RstLiteralBlock, type RstLiteralBlockData } from '../RstNode/Block/LiteralBlock.ts'\nimport { RstParagraph } from '../RstNode/Block/Paragraph.ts'\nimport { RstSection, type RstSectionData } from '../RstNode/Block/Section.ts'\nimport { RstTransition } from '../RstNode/Block/Transition.ts'\nimport { RstCitationDef, type RstCitationDefData } from '../RstNode/ExplicitMarkup/CitationDef.ts'\nimport { RstCitationDefGroup } from '../RstNode/ExplicitMarkup/CitationDefGroup.ts'\nimport { RstComment, type RstCommentData } from '../RstNode/ExplicitMarkup/Comment.ts'\nimport { RstDirective, type RstDirectiveData } from '../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstFootnoteDef, type RstFootnoteDefData } from '../RstNode/ExplicitMarkup/FootnoteDef.ts'\nimport { RstFootnoteDefGroup } from '../RstNode/ExplicitMarkup/FootnoteDefGroup.ts'\nimport { RstHyperlinkTarget, type RstHyperlinkTargetData } from '../RstNode/ExplicitMarkup/HyperlinkTarget.ts'\nimport { RstSubstitutionDef, type RstSubstitutionDefData } from '../RstNode/ExplicitMarkup/SubstitutionDef.ts'\nimport { RstCitationRef } from '../RstNode/Inline/CitationRef.ts'\nimport { RstEmphasis } from '../RstNode/Inline/Emphasis.ts'\nimport { RstFootnoteRef } from '../RstNode/Inline/FootnoteRef.ts'\nimport { RstHyperlinkRef, type RstHyperlinkRefData } from '../RstNode/Inline/HyperlinkRef.ts'\nimport { RstInlineInternalTarget } from '../RstNode/Inline/InlineInternalTarget.ts'\nimport { RstInlineLiteral } from '../RstNode/Inline/InlineLiteral.ts'\nimport { RstInterpretedText, type RstInterpretedTextData } from '../RstNode/Inline/InterpretedText.ts'\nimport { RstStrongEmphasis } from '../RstNode/Inline/StrongEmphasis.ts'\nimport { RstSubstitutionRef } from '../RstNode/Inline/SubstitutionRef.ts'\nimport { RstText, type RstTextData } from '../RstNode/Inline/Text.ts'\nimport { RstBulletList } from '../RstNode/List/BulletList.ts'\nimport { RstBulletListItem, type RstBulletListItemData } from '../RstNode/List/BulletListItem.ts'\nimport { RstDefinitionList } from '../RstNode/List/DefinitionList.ts'\nimport { RstDefinitionListItem, type RstDefinitionListItemData } from '../RstNode/List/DefinitionListItem.ts'\nimport { RstEnumeratedList, type RstEnumeratedListData } from '../RstNode/List/EnumeratedList.ts'\nimport { RstFieldList } from '../RstNode/List/FieldList.ts'\nimport { RstFieldListItem, type RstFieldListItemData } from '../RstNode/List/FieldListItem.ts'\nimport { RstOptionList } from '../RstNode/List/OptionList.ts'\nimport { RstOptionListItem, type OptionListItemData } from '../RstNode/List/OptionListItem.ts'\nimport { RstNode, type RstNodeJson } from '../RstNode/RstNode.ts'\nimport type { RstNodeType } from '../RstNode/RstNodeType.ts'\nimport { RstTable, type RstTableData } from '../RstNode/Table/Table.ts'\nimport { RstTableCell, type RstTableCellData } from '../RstNode/Table/TableCell.ts'\nimport { RstTableRow, type RstTableRowData } from '../RstNode/Table/TableRow.ts'\n\nexport type RstNodeId = Brand<number, 'RstNodeId'>\nexport type RstNodeRegistration = {\n    id: RstNodeId // 1-based count\n    nthOfType: number // 1-based count\n}\n\nexport class RstNodeRegistrar {\n    // Not quite an exact Arena pattern\n    // Since we want to support arbitrary 3rd party node types, we can't implement factory functions inside this class\n    // Instead, we let nodes' constructors call this class to register themselves\n    private readonly _nodes = new Array<RstNode>()\n    private readonly _nodesOfType = new Map<RstNodeType, Array<RstNode>>()\n\n    registerNewNode(node: RstNode): RstNodeRegistration {\n        if (!this._nodesOfType.has(node.nodeType)) {\n            this._nodesOfType.set(node.nodeType, [])\n        }\n\n        this._nodes.push(node)\n        this._nodesOfType.get(node.nodeType)?.push(node)\n\n        return {\n            id: this._nodes.length as RstNodeId,\n            nthOfType: this._nodesOfType.get(node.nodeType)?.length ?? 0xDEADBEEF,\n        }\n    }\n\n    reviveRstNodeFromJson(json: RstNodeJson): RstNode {\n        switch (json.type) {\n            case 'Document': return RstDocument.reviveRstNodeFromJson(this, json as RstNodeJson<RstDocumentData>)\n\n            case 'Section': return RstSection.reviveRstNodeFromJson(this, json as RstNodeJson<RstSectionData>)\n            case 'Transition': return RstTransition.reviveRstNodeFromJson(this, json)\n            case 'Paragraph': return RstParagraph.reviveRstNodeFromJson(this, json)\n\n            case 'BulletList': return RstBulletList.reviveRstNodeFromJson(this, json)\n            case 'BulletListItem': return RstBulletListItem.reviveRstNodeFromJson(this, json as RstNodeJson<RstBulletListItemData>)\n            case 'EnumeratedList': return RstEnumeratedList.reviveRstNodeFromJson(this, json as RstNodeJson<RstEnumeratedListData>)\n            case 'DefinitionList': return RstDefinitionList.reviveRstNodeFromJson(this, json)\n            case 'DefinitionListItem': return RstDefinitionListItem.reviveRstNodeFromJson(this, json as RstNodeJson<RstDefinitionListItemData>)\n            case 'FieldList': return RstFieldList.reviveRstNodeFromJson(this, json)\n            case 'FieldListItem': return RstFieldListItem.reviveRstNodeFromJson(this, json as RstNodeJson<RstFieldListItemData>)\n            case 'OptionList': return RstOptionList.reviveRstNodeFromJson(this, json)\n            case 'OptionListItem': return RstOptionListItem.reviveRstNodeFromJson(this, json as RstNodeJson<OptionListItemData>)\n\n            case 'LiteralBlock': return RstLiteralBlock.reviveRstNodeFromJson(this, json as RstNodeJson<RstLiteralBlockData>)\n            case 'LineBlock': return RstLineBlock.reviveRstNodeFromJson(this, json)\n            case 'LineBlockLine': return RstLineBlockLine.reviveRstNodeFromJson(this, json)\n            case 'Blockquote': return RstBlockquote.reviveRstNodeFromJson(this, json)\n            case 'BlockquoteAttribution': return RstBlockquoteAttribution.reviveRstNodeFromJson(this, json)\n            case 'DoctestBlock': return RstDoctestBlock.reviveRstNodeFromJson(this, json as RstNodeJson<RstDoctestBlockData>)\n\n            case 'Table': return RstTable.reviveRstNodeFromJson(this, json as RstNodeJson<RstTableData>)\n            case 'TableRow': return RstTableRow.reviveRstNodeFromJson(this, json as RstNodeJson<RstTableRowData>)\n            case 'TableCell': return RstTableCell.reviveRstNodeFromJson(this, json as RstNodeJson<RstTableCellData>)\n\n            case 'FootnoteDefGroup': return RstFootnoteDefGroup.reviveRstNodeFromJson(this, json)\n            case 'FootnoteDef': return RstFootnoteDef.reviveRstNodeFromJson(this, json as RstNodeJson<RstFootnoteDefData>)\n            case 'CitationDefGroup': return RstCitationDefGroup.reviveRstNodeFromJson(this, json)\n            case 'CitationDef': return RstCitationDef.reviveRstNodeFromJson(this, json as RstNodeJson<RstCitationDefData>)\n            case 'HyperlinkTarget': return RstHyperlinkTarget.reviveRstNodeFromJson(this, json as RstNodeJson<RstHyperlinkTargetData>)\n            case 'Directive': return RstDirective.reviveRstNodeFromJson(this, json as RstNodeJson<RstDirectiveData>)\n            case 'SubstitutionDef': return RstSubstitutionDef.reviveRstNodeFromJson(this, json as RstNodeJson<RstSubstitutionDefData>)\n            case 'Comment': return RstComment.reviveRstNodeFromJson(this, json as RstNodeJson<RstCommentData>)\n\n            default: return this.reviveRstTextFromJson(json)\n        }\n    }\n\n    reviveRstTextFromJson(json: RstNodeJson): RstText {\n        switch (json.type) {\n            case 'Text': return RstText.reviveRstNodeFromJson(this, json as RstNodeJson<RstTextData>)\n            case 'StrongEmphasis': return RstStrongEmphasis.reviveRstNodeFromJson(this, json as RstNodeJson<RstTextData>)\n            case 'Emphasis': return RstEmphasis.reviveRstNodeFromJson(this, json as RstNodeJson<RstTextData>)\n            case 'InterpretedText': return RstInterpretedText.reviveRstNodeFromJson(this, json as RstNodeJson<RstInterpretedTextData>)\n            case 'InlineLiteral': return RstInlineLiteral.reviveRstNodeFromJson(this, json as RstNodeJson<RstTextData>)\n            case 'SubstitutionRef': return RstSubstitutionRef.reviveRstNodeFromJson(this, json as RstNodeJson<RstTextData>)\n            case 'InlineInternalTarget': return RstInlineInternalTarget.reviveRstNodeFromJson(this, json as RstNodeJson<RstTextData>)\n            case 'FootnoteRef': return RstFootnoteRef.reviveRstNodeFromJson(this, json as RstNodeJson<RstTextData>)\n            case 'CitationRef': return RstCitationRef.reviveRstNodeFromJson(this, json as RstNodeJson<RstTextData>)\n            case 'HyperlinkRef': return RstHyperlinkRef.reviveRstNodeFromJson(this, json as RstNodeJson<RstHyperlinkRefData>)\n\n            default: {\n                throw new Error(`Unhandled nodeType:\"${json.type}\"`)\n            }\n        }\n    }\n}\n","import { RstText } from '../RstNode/Inline/Text.ts'\nimport { RstNodeRegistrar } from '../Parser/RstNodeRegistrar.ts'\n\nexport function mergeSequentialTextNodes(registrar: RstNodeRegistrar, tokens: Array<RstText>): Array<RstText> {\n    const mergedTokens = new Array<RstText>()\n    if (tokens.length > 0) {\n        mergedTokens.push(tokens[0])\n    }\n\n    for (let i = 1; i < tokens.length; i++) {\n        const prevToken = mergedTokens.at(-1)\n        const currToken = tokens[i]\n\n        if (prevToken?.nodeType === 'Text' && currToken.nodeType === 'Text') {\n            mergedTokens[mergedTokens.length - 1] = new RstText(registrar, currToken.source, prevToken.textContent + currToken.textContent)\n        } else {\n            mergedTokens.push(currToken)\n        }\n    }\n\n    return mergedTokens\n}\n","import type { RstParserState } from './RstParserState.ts'\n\nexport class RstParserError extends Error {\n    private _parserState: RstParserState\n    private _msg: string\n\n    constructor(\n        parserState: RstParserState,\n        msg: string,\n    ) {\n        super(msg)\n        this.name = 'RstParserError'\n        this._parserState = parserState\n        this._msg = msg\n\n        // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, RstParserError)\n        }\n    }\n\n    toJSON(): unknown {\n        return {\n            name: this.name,\n            stack: this.stack,\n            msg: this._msg,\n        }\n    }\n\n    override toString(): string {\n        let str = `${this.name}: ${this._msg}`\n        str += `\\n  line:${this._parserState.lineIdx}`\n        return str\n    }\n}\n","import { romanUpperRe, romanLowerRe, romanToInt } from '../../utils/romanToInt.ts'\n\nexport type RstEnumeratedListType =\n    | 'Arabic'\n    | 'AlphabetUpper'\n    | 'AlphabetLower'\n    | 'RomanUpper'\n    | 'RomanLower'\n\nexport function getEnumeratedListType(bulletValue: string): RstEnumeratedListType | null {\n    switch (true) {\n        case romanUpperRe.test(bulletValue):\n            return 'RomanUpper'\n\n        case romanLowerRe.test(bulletValue):\n            return 'RomanLower'\n\n        case bulletValue === '#':\n        case /^[0-9]+$/.test(bulletValue):\n            return 'Arabic'\n\n        case /^[A-Z]$/.test(bulletValue):\n            return 'AlphabetUpper'\n\n        case /^[a-z]$/.test(bulletValue):\n            return 'AlphabetLower'\n\n        default:\n            return null\n    }\n}\n\nexport function isSequentialBullet(currBulletValue: string, prevBulletValue?: string): boolean {\n    if (!prevBulletValue) {\n        return true\n    }\n\n    if (currBulletValue === '#') {\n        return true\n    }\n\n    const prevType = getEnumeratedListType(prevBulletValue)\n    const currType = getEnumeratedListType(currBulletValue)\n    if (prevType !== currType) {\n        return false\n    }\n\n    switch (currType) {\n        case 'Arabic': {\n            const prev = parseInt(prevBulletValue)\n            const curr = parseInt(currBulletValue)\n            return prev + 1 === curr\n        }\n\n        case 'AlphabetUpper':\n        case 'AlphabetLower': {\n            const prev = prevBulletValue.toUpperCase().charCodeAt(0)\n            const curr = currBulletValue.toUpperCase().charCodeAt(0)\n            return prev + 1 === curr\n        }\n\n        case 'RomanUpper':\n        case 'RomanLower': {\n            const prev = romanToInt(prevBulletValue.toUpperCase())\n            const curr = romanToInt(currBulletValue.toUpperCase())\n            return prev + 1 === curr\n        }\n\n        default:\n            return true\n    }\n}\n","import { RstNodeRegistrar } from '../Parser/RstNodeRegistrar.ts'\nimport { RstNode, type RstNodeSource } from '../RstNode/RstNode.ts'\nimport { RstBulletList } from '../RstNode/List/BulletList.ts'\nimport { RstEnumeratedList } from '../RstNode/List/EnumeratedList.ts'\nimport { RstFieldList } from '../RstNode/List/FieldList.ts'\nimport { RstOptionList } from '../RstNode/List/OptionList.ts'\nimport { RstDefinitionList } from '../RstNode/List/DefinitionList.ts'\nimport { isSequentialBullet } from '../RstNode/List/EnumeratedListType.ts'\nimport { RstBulletListItem } from '../RstNode/List/BulletListItem.ts'\n\nexport function mergeSequentialLists(registrar: RstNodeRegistrar, nodes: ReadonlyArray<RstNode>): ReadonlyArray<RstNode> {\n    if (nodes.length === 0) {\n        return []\n    }\n\n    const mergedNodes = new Array<RstNode>()\n    mergedNodes.push(nodes[0])\n\n    for (let i = 1; i < nodes.length; i++) {\n        const prevNode = mergedNodes[mergedNodes.length - 1]\n        const currNode = nodes[i]\n\n        const mergedSource: RstNodeSource = { startLineIdx: prevNode.source.startLineIdx, endLineIdx: currNode.source.endLineIdx }\n        const mergedChildren = [...prevNode.children, ...currNode.children]\n\n        switch (true) {\n            case isCompatibleBulletLists(prevNode, currNode): {\n                mergedNodes.pop()\n                mergedNodes.push(new RstBulletList(registrar, mergedSource, mergedChildren))\n                break\n            }\n\n            case isCompatibleDefinitionLists(prevNode, currNode): {\n                mergedNodes.pop()\n                mergedNodes.push(new RstDefinitionList(registrar, mergedSource, mergedChildren))\n                break\n            }\n\n            case isCompatibleFieldLists(prevNode, currNode): {\n                mergedNodes.pop()\n                mergedNodes.push(new RstFieldList(registrar, mergedSource, mergedChildren))\n                break\n            }\n\n            case isCompatibleOptionLists(prevNode, currNode): {\n                mergedNodes.pop()\n                mergedNodes.push(new RstOptionList(registrar, mergedSource, mergedChildren))\n                break\n            }\n\n            case isCompatibleEnumeratedLists(prevNode, currNode): {\n                mergedNodes.pop()\n                mergedNodes.push(new RstEnumeratedList(registrar, mergedSource, mergedChildren, prevNode.listType))\n                break\n            }\n\n            default: {\n                mergedNodes.push(currNode)\n            }\n        }\n    }\n\n    return mergedNodes\n}\n\nfunction isCompatibleBulletLists(prevNode: RstNode, currNode: RstNode): boolean {\n    return prevNode instanceof RstBulletList && currNode instanceof RstBulletList\n}\n\nfunction isCompatibleDefinitionLists(prevNode: RstNode, currNode: RstNode): boolean {\n    return prevNode instanceof RstDefinitionList && currNode instanceof RstDefinitionList\n}\n\nfunction isCompatibleFieldLists(prevNode: RstNode, currNode: RstNode): boolean {\n    return prevNode instanceof RstFieldList && currNode instanceof RstFieldList\n}\n\nfunction isCompatibleOptionLists(prevNode: RstNode, currNode: RstNode): boolean {\n    return prevNode instanceof RstOptionList && currNode instanceof RstOptionList\n}\n\nfunction isCompatibleEnumeratedLists(prevNode: RstNode, currNode: RstNode): prevNode is RstEnumeratedList {\n    if (!(prevNode instanceof RstEnumeratedList)) {\n        return false\n    }\n    if (!(currNode instanceof RstEnumeratedList)) {\n        return false\n    }\n    if (prevNode.listType !== currNode.listType) {\n        return false\n    }\n\n    const prevListLastBullet = prevNode.children.at(-1)?.children.at(-1)\n    const currListFirstBullet = currNode.children.at(0)?.children.at(0)\n\n    if (!(prevListLastBullet instanceof RstBulletListItem)) {\n        return false\n    }\n    if (!(currListFirstBullet instanceof RstBulletListItem)) {\n        return false\n    }\n    if (!isSequentialBullet(prevListLastBullet.bullet, currListFirstBullet.bullet)) {\n        return false\n    }\n\n    return true\n}\n","import { RstFieldList } from '../../RstNode/List/FieldList.ts'\nimport { RstFieldListItem } from '../../RstNode/List/FieldListItem.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nexport const fieldListItemRe = new RegExp(\n    '^[ ]*' + // Whitespace at start\n    ':(?![: ])' + // Opening colon (cannot be immediately followed by colon or space)\n    '(?<fieldName>' +\n        '(?:' + // Any of:\n            '[^:\\\\\\\\]' + '|' + // Any char except : or \\\n            '\\\\\\\\.' + '|' + // Any escaped character\n\n            // If there is a colon, it must NOT be immediately followed by\n            // - Space (end of field list)\n            // - Backtick (start of interpted text since InterpretedText with prefixed roles are not allowed inside FieldListItem)\n            // - End of line (since last colon of FieldListItem must be followed by space and field body)\n            ':(?!([ `]|$))' +\n        ')*' +\n    ')' +\n    '(?<![ ]):' + // Closing colon (cannot be immediately preceded by space)\n    '(?:' +\n        ' ' + // Space\n        '(?<firstLineText>.+)' + // Any char to end of line\n    ')?' + // Optional firstLineText\n    '$',\n)\n\nexport const fieldListParser: RstNodeParser<'FieldList'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        const listItems = new Array<RstFieldListItem>()\n        while (true) {\n            parserState.consumeAllNewLines()\n\n            const listItem = parseListItem(parserState, indentSize)\n            if (!listItem) {\n                break\n            }\n\n            listItems.push(listItem)\n        }\n\n        if (listItems.length === 0) {\n            return null\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstFieldList(parserState.registrar, { startLineIdx, endLineIdx }, listItems)\n    },\n}\n\nfunction parseListItem(parserState: RstParserState, indentSize: number): RstFieldListItem | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    const firstLineMatches = parserState.peekTest(fieldListItemRe)\n    const fieldName = firstLineMatches?.groups?.fieldName\n    if (!fieldName) {\n        return null\n    }\n\n    const fieldNameNodes = parserState.parseInlineNodes(fieldName, {\n        startLineIdx,\n        endLineIdx: startLineIdx + 1,\n    })\n\n    // Consume first line that we've already peeked at and tested\n    parserState.consume()\n\n    const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n    const bodyIndentSize = parserState.peekNestedIndentSize(indentSize)\n    const initContent = parserState.parseInitContent(bodyIndentSize, firstLineText, startLineIdx)\n    const listItemChildren = parserState.parseBodyNodes(bodyIndentSize, 'OptionListItem', initContent)\n\n    const endLineIdx = parserState.lineIdx\n    return new RstFieldListItem(parserState.registrar, { startLineIdx, endLineIdx }, fieldNameNodes, listItemChildren)\n}\n","import type { Token } from '../Lexer/Token.ts'\nimport { RstNode, type RstNodeSource } from '../RstNode/RstNode.ts'\nimport { type ContinuousText, RstText } from '../RstNode/Inline/Text.ts'\nimport { RstCitationRef } from '../RstNode/Inline/CitationRef.ts'\nimport { RstEmphasis } from '../RstNode/Inline/Emphasis.ts'\nimport { RstFootnoteRef } from '../RstNode/Inline/FootnoteRef.ts'\nimport { RstHyperlinkRef } from '../RstNode/Inline/HyperlinkRef.ts'\nimport { RstInlineInternalTarget } from '../RstNode/Inline/InlineInternalTarget.ts'\nimport { RstInlineLiteral } from '../RstNode/Inline/InlineLiteral.ts'\nimport { RstInterpretedText, interpretedTextRoleRe } from '../RstNode/Inline/InterpretedText.ts'\nimport { RstStrongEmphasis } from '../RstNode/Inline/StrongEmphasis.ts'\nimport { RstSubstitutionRef } from '../RstNode/Inline/SubstitutionRef.ts'\nimport { isMatchingQuotationMarks } from '../utils/isMatchingQuotationMarks.ts'\nimport { mergeSequentialTextNodes } from '../utils/mergeSequentialTextNodes.ts'\nimport type { RstParserOptions } from './RstParserOptions.ts'\nimport { RstCompiler } from '../RstCompiler.ts'\nimport { RstDocument } from '../RstNode/Block/Document.ts'\nimport { RstFieldList } from '../RstNode/List/FieldList.ts'\nimport { tokenizeInput } from '../Lexer/tokenizeInput.ts'\nimport { RstNodeRegistrar } from './RstNodeRegistrar.ts'\nimport type { RstNodeType } from '../RstNode/RstNodeType.ts'\nimport { RstParserError } from './RstParserError.ts'\nimport { standaloneHyperlinkRefReStr } from '../utils/parseEmbededRef.ts'\nimport { mergeSequentialLists } from '../utils/mergeSequentialLists.ts'\nimport { HtmlAttrResolver } from './Resolver/HtmlAttrResolver.ts'\nimport { SimpleNameResolver } from './Resolver/SimpleNameResolver.ts'\nimport { SubstitutionResolver } from './Resolver/SubstitutionResolver.ts'\nimport { trimCommonIndent } from '../utils/trimCommonIndent.ts'\nimport { fieldListItemRe } from './NodeParsers/fieldListParser.ts'\n\nexport type RstParserOutput = {\n    root: RstDocument\n    htmlAttrResolver: HtmlAttrResolver\n    substitutionResolver: SubstitutionResolver\n    simpleNameResolver: SimpleNameResolver\n}\n\nexport class RstParserState {\n    readonly opts: Readonly<RstParserOptions>\n\n    private _tokenIdx: number\n    private readonly _tokens: ReadonlyArray<Token>\n    private readonly _compiler: RstCompiler\n    private readonly _registrar: RstNodeRegistrar\n    private readonly _sectionMarkers: Array<string>\n    private readonly _lineOffset: number\n\n    readonly rootBodyNodes: ReadonlyArray<RstNode>\n    readonly rootSource: RstNodeSource\n\n    constructor(\n        opts: Readonly<RstParserOptions>,\n        tokens: ReadonlyArray<Token>,\n        compiler: RstCompiler,\n        registrar = new RstNodeRegistrar(),\n        lineOffset = 0,\n    ) {\n        this.opts = opts\n\n        this._tokenIdx = 0\n        this._tokens = tokens\n        this._compiler = compiler\n        this._registrar = registrar\n        this._sectionMarkers = []\n        this._lineOffset = lineOffset\n\n        const startLineIdx = this.lineIdx\n        this.rootBodyNodes = this.parseBodyNodes(0, 'Document')\n        const endLineIdx = this.lineIdx\n        this.rootSource = { startLineIdx, endLineIdx }\n    }\n\n    get parserOutput(): RstParserOutput {\n        const root = this.opts.parseFirstFieldListAsDocumentMeta && this.rootBodyNodes.length >= 1 && this.rootBodyNodes[0] instanceof RstFieldList\n            ? new RstDocument(this._registrar, this.rootSource, this.rootBodyNodes.slice(1), this.rootBodyNodes[0])\n            : new RstDocument(this._registrar, this.rootSource, this.rootBodyNodes, null)\n\n        return this._compiler.createParserOutput(root)\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Document State\n    // ------------------------------------------------------------------------\n\n    get registrar(): RstNodeRegistrar {\n        return this._registrar\n    }\n\n    registerSectionMarker(marker: string): number {\n        if (!this._sectionMarkers.includes(marker)) {\n            this._sectionMarkers.push(marker)\n        }\n\n        // Get 1-based index of the marker\n        return this._sectionMarkers.indexOf(marker) + 1\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Consume/Peek\n    // Helpers for parsing\n    // ------------------------------------------------------------------------\n\n    get lineIdx(): number {\n        return this._tokenIdx + this._lineOffset\n    }\n\n    getTokens(startIdx: number, endIdx: number): Array<Token> {\n        return this._tokens.slice(startIdx, endIdx)\n    }\n\n    advance(n: number): void {\n        if (n < 1) {\n            throw new RstParserError(this, `Invalid n:${n}`)\n        }\n\n        const newIdx = this._tokenIdx + n\n        if (newIdx > this._tokens.length) {\n            throw new RstParserError(this, `Out of bounds n:${n} newIdx:${newIdx}`)\n        }\n\n        this._tokenIdx = newIdx\n    }\n\n    consume(): Token {\n        if (!this.canConsume()) {\n            throw new RstParserError(this, `Invalid tokenIdx:${this._tokenIdx}`)\n        }\n\n        return this._tokens[this._tokenIdx++]\n    }\n\n    consumeAllNewLines(): void {\n        while (this.peekIsNewLine()) {\n            this.consume()\n        }\n    }\n\n    canConsume(offset = 0): boolean {\n        const idx = this._tokenIdx + offset\n        return idx >= 0 && idx < this._tokens.length\n    }\n\n    peek(offset = 0): Token | null {\n        const idx = this._tokenIdx + offset\n        if (idx < 0 || idx >= this._tokens.length) {\n            return null\n        }\n\n        return this._tokens[idx]\n    }\n\n    peekIsNewLine(offset = 0): boolean {\n        const nextToken = this.peek(offset)\n        if (!nextToken) {\n            return false\n        }\n\n        return nextToken.str.trim().length === 0\n    }\n\n    peekIsContent(offset = 0): boolean {\n        const nextToken = this.peek(offset)\n        if (!nextToken) {\n            return false\n        }\n\n        return nextToken.str.trim().length > 0\n    }\n\n    peekTest(re: RegExp, offset = 0): RegExpExecArray | null {\n        const nextToken = this.peek(offset)\n        if (!nextToken) {\n            return null\n        }\n\n        return re.exec(nextToken.str)\n    }\n\n    peekIndentSize(offset = 0): number {\n        return this.peek(offset)?.str.search(/\\S|$/) ?? 0\n    }\n\n    peekIsIndented(expectedIndentSize: number, offset = 0): boolean {\n        return this.peekIndentSize(offset) === expectedIndentSize\n    }\n\n    peekIsAtleastIndented(expectedIndentSize: number, offset = 0): boolean {\n        return this.peekIndentSize(offset) >= expectedIndentSize\n    }\n\n    /**\n     * Returns the smallest nested indent size (guaranteed to be greater than currentIndentSize)\n     *\n     * Otherwise this returns default of `currentIndentSize + 1`\n     *\n     * **NOTE:** This does not imply the existence of nested blocks, just the indentation of what they should be at if they exists\n     */\n    peekNestedIndentSize(currentIndentSize: number, nextIndentSize = 1): number {\n        const defaultNestedIndentSize = currentIndentSize + nextIndentSize\n\n        let offset = 0\n        let bodyIndentSize = Number.MAX_SAFE_INTEGER\n        let foundNestedContent = false\n\n        while (true) {\n            if (!this.canConsume(offset)) {\n                break\n            }\n\n            const lineIndentSize = this.peekIndentSize(offset)\n            if (this.peekIsContent(offset) && lineIndentSize <= currentIndentSize) {\n                break\n            }\n\n            if (this.peekIsContent(offset)) {\n                bodyIndentSize = Math.min(bodyIndentSize, lineIndentSize)\n                foundNestedContent = true\n            }\n\n            offset += 1\n        }\n\n        if (foundNestedContent) {\n            return Math.max(bodyIndentSize, defaultNestedIndentSize)\n        } else {\n            return defaultNestedIndentSize\n        }\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: Parser\n    // ------------------------------------------------------------------------\n\n    parseRstToAst(input: string, startingLineIdx: number): ReadonlyArray<RstNode> {\n        const trimmedInput = trimCommonIndent(input)\n        const tokens = tokenizeInput(trimmedInput)\n        const subParserState = new RstParserState(this.opts, tokens, this._compiler, this.registrar, startingLineIdx)\n        return subParserState.rootBodyNodes\n    }\n\n    parseBodyNodes(indentSize: number, parentType: RstNodeType, initNodes: ReadonlyArray<RstNode> = []): ReadonlyArray<RstNode> {\n        const nodes = [...initNodes]\n\n        while (true) {\n            const prevNode = nodes.at(-1)\n\n            // Consume all blank lines before parsing next block\n            this.consumeAllNewLines()\n\n            // Exit when we're out of lines to consume\n            if (!this.canConsume()) {\n                break\n            }\n\n            // Exit if we are inside a node and encounted an empty comment\n            if (parentType !== 'Document' && this.peekTest(/^\\.\\.$/) && this.peekIsNewLine(1)) {\n                this.consume() // Consume the empty comment\n                break\n            }\n\n            // Exit if we are inside a node but encounter a new block without the same indentation\n            if (parentType !== 'Document' && this.peekIndentSize() < indentSize) {\n                break\n            }\n\n            const { node, shouldExitBody } = (() => {\n                for (const parser of this._compiler.nodeParsers) {\n                    const node = parser.parse(this, indentSize, parentType, prevNode)\n                    if (node === null) {\n                        continue\n                    }\n\n                    return {\n                        node,\n                        shouldExitBody: parser.onParseShouldExitBody,\n                    }\n                }\n\n                throw new RstParserError(this, `Failed to find parser to parse token: \"${this.peek()?.str ?? ''}\"`)\n            })()\n\n            nodes.push(node)\n\n            if (shouldExitBody) {\n                break\n            }\n        }\n\n        return mergeSequentialLists(this._registrar, nodes)\n    }\n\n    parseBodyText(indentSize: number, parentType: RstNodeType, lineRegex?: RegExp): string {\n        let bodyText = ''\n\n        while (true) {\n            // Exit if line does not match optional regex\n            if (lineRegex && !this.peekTest(lineRegex)) {\n                break\n            }\n\n            // Consume all blank lines before parsing next block\n            while (this.peekIsNewLine()) {\n                bodyText += '\\n'\n                this.consume()\n            }\n\n            // Exit when we're out of lines to consume\n            if (!this.canConsume()) {\n                break\n            }\n\n            // Exit if we are inside a node and encounted an empty comment\n            if (parentType !== 'Document' && this.peekTest(/^\\.\\.$/) && this.peekIsNewLine(1)) {\n                this.consume() // Consume the empty comment\n                break\n            }\n\n            // Exit if we are inside a node but encounter a new block without the same indentation\n            if (parentType !== 'Document' && this.peekIndentSize() < indentSize) {\n                break\n            }\n\n            const line = this.consume()\n            const lineText = line.str.substring(indentSize)\n            bodyText += '\\n' + lineText\n        }\n\n        bodyText = bodyText.replace(/^\\n+/, '') // Remove all newlines at start\n        bodyText = bodyText.replace(/\\n+$/, '') // Remove all newlines at end\n\n        return bodyText\n    }\n\n    /**\n     * After consuming first line of any ExplicitMarkup, this returns a Paragraph containing\n     * the first line and any subsequent continuous lines\n     */\n    parseInitContentText(nestedBodyIndentSize: number, firstLineText: string, preserveLineBreaks = true): string {\n        const isSecondLineContinuingFirstLine = (() => {\n            // FieldListItem cannot be included\n            if (this.peekTest(fieldListItemRe)) {\n                return false\n            }\n\n            // Other nested ExplicitMarkup (e.g. Comment) cannot be included\n            if (this.peekTest(/^ *\\.\\. +/)) {\n                return false\n            }\n\n            // Any non-empty line continues first line\n            return this.peekIsContent()\n        })()\n\n        let bodyText = firstLineText\n        if (isSecondLineContinuingFirstLine) {\n            while (this.peekIsContent() && this.peekIsAtleastIndented(nestedBodyIndentSize)) {\n                const line = this.consume()\n                const lineText = line.str.substring(nestedBodyIndentSize)\n\n                if (preserveLineBreaks) {\n                    bodyText += '\\n' + lineText\n                } else {\n                    bodyText += lineText\n                }\n            }\n        }\n\n        bodyText = bodyText.replace(/^\\n+/, '') // Remove all newlines at start\n        bodyText = bodyText.replace(/\\n+$/, '') // Remove all newlines at end\n\n        return bodyText\n    }\n\n    parseInitContent(nestedBodyIndentSize: number, firstLineText: string, startLineIdx: number, preserveLineBreaks = true): ReadonlyArray<RstNode> {\n        const bodyText = this.parseInitContentText(nestedBodyIndentSize, firstLineText, preserveLineBreaks)\n        this.consumeAllNewLines()\n        return this.parseRstToAst(bodyText, startLineIdx)\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: InlineParser\n    // ------------------------------------------------------------------------\n\n    parseInlineNodes(input: string, source: RstNodeSource): ContinuousText {\n        const parsedGroups = this.parseInlineNodesWithDelimiter(input, source)\n        if (parsedGroups.length !== 1) {\n            throw new RstParserError(this, 'Failed to parse without delimiter')\n        }\n\n        return parsedGroups[0]\n    }\n\n    parseInlineNodesWithDelimiter(input: string, source: RstNodeSource, delimiter?: string): Array<ContinuousText> {\n        const parsedGroups = new Array<ContinuousText>()\n        parsedGroups.push([])\n\n        const startRe = delimiter && delimiter.length > 1\n            ? new RegExp(`${this.getStartStringRe().source}|(?<delimiter>${delimiter})`, 'g')\n            : this.getStartStringRe()\n\n        let consumedIdx = 0\n        while (consumedIdx < input.length) {\n            // Start search after already consumed characters\n            startRe.lastIndex = consumedIdx\n\n            // Find next inline markup or delimiter in the input\n            // Otherwise break out of this search loop\n            const startMatch = startRe.exec(input)\n            if (!startMatch) {\n                break\n            }\n\n            // inlineTextIdx points to start of inline text (excluding start string)\n            //\n            //      startMatch.index\n            //      |\n            //      |       inlineTextIdx\n            //      |       |\n            //      :role:**test**:role:\n            //              |   |\n            //              |   endMatch.index\n            //              |\n            //              endMatch.index origin\n            //\n            const inlineTextIdx = startMatch.index + startMatch[0].length\n            const endStringSearchSpace = input.substring(inlineTextIdx)\n\n            // Everything between (old) idx and inlineTextIdx is treated as plaintext\n            const precedingTextLen = startMatch.index - consumedIdx\n            if (precedingTextLen > 0) {\n                const precedingTextRaw = input.substring(consumedIdx, startMatch.index)\n                const precedingTextTokens = this.parsePlaintextForUrls(precedingTextRaw, source)\n                parsedGroups.at(-1)?.push(...precedingTextTokens)\n                consumedIdx += precedingTextRaw.length\n            }\n\n            // Rule 5:\n            // If start string is preceded by quotation ' \" < ( [ {\n            // then it must NOT be followed by the closing quotation ' \" > ) ] }\n            const charBeforeStart = input[startMatch.index - 1]\n            const charAfterStart = input[startMatch.index + startMatch[0].length]\n            if (isMatchingQuotationMarks(charBeforeStart, charAfterStart)) {\n                // Do not parse as inline markup if startString is wrapped in quotation characters\n                parsedGroups.at(-1)?.push(new RstText(this.registrar, source, startMatch[0]))\n                consumedIdx += startMatch[0].length\n                continue\n            }\n\n            // If we find the delimiter, then register new group and keep parsing\n            if (startMatch.groups?.delimiter) {\n                parsedGroups.push([])\n                consumedIdx += startMatch[0].length\n                continue\n            }\n\n            const startString = startMatch?.groups?.startString\n            const rolePrefix = startMatch?.groups?.rolePrefix\n\n            const endRe = this.getEndStringRe(startString)\n            const endMatch = endRe.exec(endStringSearchSpace)\n            if (!endMatch) {\n                // Cannot find matching endString in the input so we skip the startString and treat it as plaintext\n                parsedGroups.at(-1)?.push(new RstText(this.registrar, source, startMatch[0]))\n                consumedIdx += startMatch[0].length\n                continue\n            }\n\n            const endString = endMatch?.groups?.endString\n            const roleSuffix = endMatch?.groups?.roleSuffix\n            const inlineTextRaw = endStringSearchSpace.substring(0, endMatch.index)\n\n            switch (true) {\n                case (startString === '**' && endString === '**'): {\n                    parsedGroups.at(-1)?.push(new RstStrongEmphasis(this.registrar, source, inlineTextRaw))\n                    break\n                }\n\n                case (startString === '*' && endString === '*'): {\n                    parsedGroups.at(-1)?.push(new RstEmphasis(this.registrar, source, inlineTextRaw))\n                    break\n                }\n\n                case (startString === '``' && endString === '``'): {\n                    parsedGroups.at(-1)?.push(new RstInlineLiteral(this.registrar, source, inlineTextRaw))\n                    break\n                }\n\n                case (startString === '`' && endString === '`' && this.isValidInterpretedText(inlineTextRaw, rolePrefix ?? roleSuffix)): {\n                    const role = rolePrefix ?? roleSuffix ?? this.opts.defaultInterpretedTextRole\n                    parsedGroups.at(-1)?.push(new RstInterpretedText(this.registrar, source, inlineTextRaw, role))\n                    break\n                }\n\n                case (startString === '|' && endString === '|'): {\n                    parsedGroups.at(-1)?.push(new RstSubstitutionRef(this.registrar, source, inlineTextRaw))\n                    break\n                }\n\n                case (startString === '_`' && endString === '`'): {\n                    parsedGroups.at(-1)?.push(new RstInlineInternalTarget(this.registrar, source, inlineTextRaw))\n                    break\n                }\n\n                case (startString === '[' && endString === ']_' && RstFootnoteRef.isValidText(inlineTextRaw)): {\n                    parsedGroups.at(-1)?.push(new RstFootnoteRef(this.registrar, source, inlineTextRaw))\n                    break\n                }\n\n                case (startString === '[' && endString === ']_' && RstCitationRef.isValidText(inlineTextRaw)): {\n                    parsedGroups.at(-1)?.push(new RstCitationRef(this.registrar, source, inlineTextRaw))\n                    break\n                }\n\n                // HyperlinkRef needs unescaped text since it needs to further parse the text for embeded links (if any)\n                // Example: `abc <123>`_ parses with label \"abc\"\n                // However, `abc \\<123>`_ parses with label \"abc <123>\"\n                case (startString === '`' && endString === '`_'): {\n                    const isAnonymous = false\n                    parsedGroups.at(-1)?.push(new RstHyperlinkRef(this.registrar, source, inlineTextRaw, isAnonymous))\n                    break\n                }\n\n                case (startString === '`' && endString === '`__'):{\n                    const isAnonymous = true\n                    parsedGroups.at(-1)?.push(new RstHyperlinkRef(this.registrar, source, inlineTextRaw, isAnonymous))\n                    break\n                }\n\n                default: {\n                    // Cannot find a matching inline markup (e.g. invalid inlineTextRaw) so we skip the startString and treat it as plaintext\n                    parsedGroups.at(-1)?.push(new RstText(this.registrar, source, startMatch[0]))\n                    consumedIdx += startMatch[0].length\n                    continue\n                }\n            }\n\n            consumedIdx = inlineTextIdx + endMatch.index + endMatch[0].length\n        }\n\n        // Finally add any leftover unmatched text\n        if (consumedIdx < input.length) {\n            const followingTextRaw = input.substring(consumedIdx)\n            const followingTextTokens = this.parsePlaintextForUrls(followingTextRaw, source)\n            parsedGroups.at(-1)?.push(...followingTextTokens)\n        }\n\n        return parsedGroups.map((group) => mergeSequentialTextNodes(this.registrar, group))\n    }\n\n    // ------------------------------------------------------------------------\n    // MARK: InlineParser Helpers\n    // ------------------------------------------------------------------------\n\n    private parsePlaintextForUrls(plaintext: string, source: RstNodeSource): ContinuousText {\n        const outputTokens = new Array<RstText>()\n        const escapedText = (plaintext) // Need to first escape text before parsing for standalone urls\n\n        let consumedIdx = 0\n        const hyperlinkReStr = `${this._inlineMarkupStartLookbehindReStr}(?:${standaloneHyperlinkRefReStr})${this._inlineMarkupEndLookaheadReStr}`\n        const hyperlinkRe = new RegExp(hyperlinkReStr, 'g') // Global flag so we can iterate over all matches\n\n        while (consumedIdx < escapedText.length) {\n            const urlMatch = hyperlinkRe.exec(escapedText)\n            if (!urlMatch) {\n                break\n            }\n\n            const precedingTextLen = urlMatch.index - consumedIdx\n            if (precedingTextLen > 0) {\n                const precedingText = escapedText.substring(consumedIdx, consumedIdx + precedingTextLen)\n                outputTokens.push(new RstText(this.registrar, source, precedingText))\n                consumedIdx += precedingText.length\n            }\n\n            const isAnonymous = urlMatch.groups?.simpleNameTail === '__'\n            const rawSimpleName = urlMatch.groups?.simpleName\n            const rawUrl = urlMatch.groups?.embedUrl ?? urlMatch.groups?.url\n            const rawEmail = urlMatch.groups?.embedEmail ?? urlMatch.groups?.email\n\n            const refTarget = rawSimpleName ?? rawUrl ?? rawEmail\n            if (!refTarget) {\n                throw new RstParserError(this, `Failed to parse url:${urlMatch[0]}`)\n            }\n\n            outputTokens.push(new RstHyperlinkRef(this.registrar, source, refTarget, isAnonymous))\n            consumedIdx += urlMatch[0].length\n        }\n\n        // Finally add any leftover unmatched text\n        if (consumedIdx < escapedText.length) {\n            const followingText = escapedText.substring(consumedIdx)\n            outputTokens.push(new RstText(this.registrar, source, followingText))\n        }\n\n        return outputTokens\n    }\n\n    private get _inlineMarkupStartLookbehindReStr(): string {\n        // If enabled, then we do not check the character before inline markup's startString\n        if (this.opts.enableCharacterLevelInlineMarkup) {\n            return ''\n        }\n\n        return '(?<=' +     // Positive lookbehind\n            '^' + '|' +     // Start of text\n            '\\\\s' + '|' +   // Whitespace\n            [\n                '-',\n                ':',\n                '/',\n                '\\'',\n                '\"',\n                '<',\n                '\\\\(',\n                '\\\\[',\n                '\\\\{',\n            ].join('|') + // Special punctuations\n        ')'\n    }\n\n    private get _inlineMarkupEndLookaheadReStr(): string {\n        // If enabled, then we do not check the character after inline markup's endString\n        if (this.opts.enableCharacterLevelInlineMarkup) {\n            return ''\n        }\n\n        return '(?=' +      // Positive lookahead\n            '$' + '|' +     // End of text\n            '\\\\s' + '|' +   // Whitespace\n            [               // Special punctuations\n                '-',\n                '\\\\.',\n                ',',\n                ':',\n                ';',\n                '!',\n                '\\\\?',\n                '\\\\/',\n                '\\\\\\\\',\n                \"'\",\n                '\"',\n                '>',\n                '\\\\)',\n                '\\\\]',\n                '\\\\}',\n            ].join('|') +\n        ')'\n    }\n\n    private getStartStringRe(): RegExp {\n        return new RegExp(\n            // Not preceded by single escape slash\n            '(?<!(?<!\\\\\\\\)\\\\\\\\)' +\n\n            // Assert lookbehind char\n            this._inlineMarkupStartLookbehindReStr +\n\n            // Role for InterpretedText\n            `(?::(?<rolePrefix>${interpretedTextRoleRe.source}):)?` +\n\n            // Match inline markup start string\n            '(?<startString>' +\n                '\\\\*\\\\*' + '|' +    // Strong emphasis\n                '\\\\*' + '|' +       // Emphasis\n                '``' + '|' +        // Inline literal\n                '`' + '|' +         // Interpreted text\n                '\\\\|' + '|' +       // Substitution ref\n\n                '_`' + '|' +        // Inline internal target\n                '\\\\[' + '|' +       // Footnote ref\n                '`' +               // Hyperlink ref\n            ')' +\n\n            // Followed by non-whitespace or escaped whitespace\n            '(?=\\\\S|\\\\\\\\\\\\s)',\n\n            // Global flag\n            'g',\n        )\n    }\n\n    private getEndStringRe(startString?: string): RegExp {\n        let endStringReString: string\n        let isInlineLiteral = false\n        switch (startString) {\n            // Emphasis\n            case '*':\n                endStringReString = '\\\\*'\n                break\n\n            // StrongEmphasis\n            case '**':\n                endStringReString = '\\\\*\\\\*'\n                break\n\n            // InterpretedText or HyperlinkRef\n            case '`':\n                // ` start is ambiguous whether it is InterpretedText or HyperlinkRef\n                // Need to see if endString is ` or `_ or `__\n                endStringReString = '`__?|`'\n                break\n\n            // InlineLiteral\n            case '``':\n                endStringReString = '``'\n                isInlineLiteral = true\n                break\n\n            // SubstitutionRef\n            case '|':\n                endStringReString = '\\\\|'\n                break\n\n            // InlineInternalTarget\n            case '_`':\n                endStringReString = '`'\n                break\n\n            // FootnoteRef\n            case '[':\n                endStringReString = '\\\\]_'\n                break\n\n            default:\n                throw new RstParserError(this, `Unrecognized startString:${startString}`)\n        }\n\n        return new RegExp(\n            // Preceded by non-whitespace or escaped whitespace\n            '(?<=\\\\S|\\\\\\\\\\\\s)' +\n\n            (\n                isInlineLiteral\n                    ? ''            // InlineLiteral can end with escape slash before endString e.g. ``This text ends with escape slash\\``\n                    : '(?<!\\\\\\\\)'   // Not preceded by escape slash if it's not inline literal\n            ) +\n\n            // Match inline markup end string\n            '(?<endString>' +\n                endStringReString +\n            ')' +\n\n            // Role for InterpretedText\n            `(?::(?<roleSuffix>${interpretedTextRoleRe.source}):)?` +\n\n            // Assert lookahead char\n            this._inlineMarkupEndLookaheadReStr,\n        )\n    }\n\n    private isValidInterpretedText(rawBodyText: string, role?: string): boolean {\n        if (role === undefined) {\n            return true\n        }\n\n        for (const plugin of this._compiler.plugins) {\n            const isValid = plugin.isValidInterpretedText?.(rawBodyText, role)\n            if (typeof isValid === 'boolean') {\n                return isValid\n            }\n        }\n\n        return interpretedTextRoleRe.test(role)\n    }\n}\n","/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n    HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    asyncTag = '[object AsyncFunction]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    nullTag = '[object Null]',\n    objectTag = '[object Object]',\n    proxyTag = '[object Proxy]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    undefinedTag = '[object Undefined]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n  switch (args.length) {\n    case 0: return func.call(thisArg);\n    case 1: return func.call(thisArg, args[0]);\n    case 2: return func.call(thisArg, args[0], args[1]);\n    case 3: return func.call(thisArg, args[0], args[1], args[2]);\n  }\n  return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n    funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n    Symbol = root.Symbol,\n    Uint8Array = root.Uint8Array,\n    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n    getPrototype = overArg(Object.getPrototypeOf, Object),\n    objectCreate = Object.create,\n    propertyIsEnumerable = objectProto.propertyIsEnumerable,\n    splice = arrayProto.splice,\n    symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n    nativeMax = Math.max,\n    nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n    nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n  function object() {}\n  return function(proto) {\n    if (!isObject(proto)) {\n      return {};\n    }\n    if (objectCreate) {\n      return objectCreate(proto);\n    }\n    object.prototype = proto;\n    var result = new object;\n    object.prototype = undefined;\n    return result;\n  };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n  if ((value !== undefined && !eq(object[key], value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n  var objValue = object[key];\n  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n      (value === undefined && !(key in object))) {\n    baseAssignValue(object, key, value);\n  }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n  if (!isObject(object)) {\n    return nativeKeysIn(object);\n  }\n  var isProto = isPrototype(object),\n      result = [];\n\n  for (var key in object) {\n    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n  if (object === source) {\n    return;\n  }\n  baseFor(source, function(srcValue, key) {\n    stack || (stack = new Stack);\n    if (isObject(srcValue)) {\n      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n    }\n    else {\n      var newValue = customizer\n        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      if (newValue === undefined) {\n        newValue = srcValue;\n      }\n      assignMergeValue(object, key, newValue);\n    }\n  }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n *  counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n  var objValue = safeGet(object, key),\n      srcValue = safeGet(source, key),\n      stacked = stack.get(srcValue);\n\n  if (stacked) {\n    assignMergeValue(object, key, stacked);\n    return;\n  }\n  var newValue = customizer\n    ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n    : undefined;\n\n  var isCommon = newValue === undefined;\n\n  if (isCommon) {\n    var isArr = isArray(srcValue),\n        isBuff = !isArr && isBuffer(srcValue),\n        isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n    newValue = srcValue;\n    if (isArr || isBuff || isTyped) {\n      if (isArray(objValue)) {\n        newValue = objValue;\n      }\n      else if (isArrayLikeObject(objValue)) {\n        newValue = copyArray(objValue);\n      }\n      else if (isBuff) {\n        isCommon = false;\n        newValue = cloneBuffer(srcValue, true);\n      }\n      else if (isTyped) {\n        isCommon = false;\n        newValue = cloneTypedArray(srcValue, true);\n      }\n      else {\n        newValue = [];\n      }\n    }\n    else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n      newValue = objValue;\n      if (isArguments(objValue)) {\n        newValue = toPlainObject(objValue);\n      }\n      else if (!isObject(objValue) || isFunction(objValue)) {\n        newValue = initCloneObject(srcValue);\n      }\n    }\n    else {\n      isCommon = false;\n    }\n  }\n  if (isCommon) {\n    // Recursively merge objects and arrays (susceptible to call stack limits).\n    stack.set(srcValue, newValue);\n    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n    stack['delete'](srcValue);\n  }\n  assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n  return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n  return defineProperty(func, 'toString', {\n    'configurable': true,\n    'enumerable': false,\n    'value': constant(string),\n    'writable': true\n  });\n};\n\n/**\n * Creates a clone of  `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n  if (isDeep) {\n    return buffer.slice();\n  }\n  var length = buffer.length,\n      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n  buffer.copy(result);\n  return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n  new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n  return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n  var index = -1,\n      length = source.length;\n\n  array || (array = Array(length));\n  while (++index < length) {\n    array[index] = source[index];\n  }\n  return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n  var isNew = !object;\n  object || (object = {});\n\n  var index = -1,\n      length = props.length;\n\n  while (++index < length) {\n    var key = props[index];\n\n    var newValue = customizer\n      ? customizer(object[key], source[key], key, object, source)\n      : undefined;\n\n    if (newValue === undefined) {\n      newValue = source[key];\n    }\n    if (isNew) {\n      baseAssignValue(object, key, newValue);\n    } else {\n      assignValue(object, key, newValue);\n    }\n  }\n  return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n  return baseRest(function(object, sources) {\n    var index = -1,\n        length = sources.length,\n        customizer = length > 1 ? sources[length - 1] : undefined,\n        guard = length > 2 ? sources[2] : undefined;\n\n    customizer = (assigner.length > 3 && typeof customizer == 'function')\n      ? (length--, customizer)\n      : undefined;\n\n    if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n      customizer = length < 3 ? undefined : customizer;\n      length = 1;\n    }\n    object = Object(object);\n    while (++index < length) {\n      var source = sources[index];\n      if (source) {\n        assigner(object, source, index, customizer);\n      }\n    }\n    return object;\n  });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n  return (typeof object.constructor == 'function' && !isPrototype(object))\n    ? baseCreate(getPrototype(object))\n    : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n *  else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n  if (!isObject(object)) {\n    return false;\n  }\n  var type = typeof index;\n  if (type == 'number'\n        ? (isArrayLike(object) && isIndex(index, object.length))\n        : (type == 'string' && index in object)\n      ) {\n    return eq(object[index], value);\n  }\n  return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n  var result = [];\n  if (object != null) {\n    for (var key in Object(object)) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n  return function() {\n    var args = arguments,\n        index = -1,\n        length = nativeMax(args.length - start, 0),\n        array = Array(length);\n\n    while (++index < length) {\n      array[index] = args[start + index];\n    }\n    index = -1;\n    var otherArgs = Array(start + 1);\n    while (++index < start) {\n      otherArgs[index] = args[index];\n    }\n    otherArgs[start] = transform(array);\n    return apply(func, this, otherArgs);\n  };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n  if (key === 'constructor' && typeof object[key] === 'function') {\n    return;\n  }\n\n  if (key == '__proto__') {\n    return;\n  }\n\n  return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n  var count = 0,\n      lastCalled = 0;\n\n  return function() {\n    var stamp = nativeNow(),\n        remaining = HOT_SPAN - (stamp - lastCalled);\n\n    lastCalled = stamp;\n    if (remaining > 0) {\n      if (++count >= HOT_COUNT) {\n        return arguments[0];\n      }\n    } else {\n      count = 0;\n    }\n    return func.apply(undefined, arguments);\n  };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n *  else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n  return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n    return false;\n  }\n  var proto = getPrototype(value);\n  if (proto === null) {\n    return true;\n  }\n  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n    funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n  return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n *   'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n *   'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n  baseMerge(object, source, srcIndex);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = merge;\n","import merge from 'lodash.merge'\nimport type { KatexOptions } from 'katex'\nimport type { createHighlighter, ShikiTransformer, CodeOptionsMultipleThemes } from 'shiki'\n\nexport type RstGeneratorOptions = {\n    disableWarnings: boolean\n    disableErrors: boolean\n\n    /**\n     * Number of spaces for output indentation\n     *\n     * Default: `4`\n     */\n    outputIndentSize: number\n\n    /**\n     * Prints m-dash before BlockquoteAttribution\n     *\n     * Default: `true`\n     */\n    enableBlockQuoteAttributionDash: boolean\n\n    /**\n     * Specify default format for SubstitutionDef with \"date\" directive\n     *\n     * This value is passed to `date-fns format()`\n     *\n     * See https://date-fns.org/v3.6.0/docs/format\n     *\n     * Default: `'y-MM-dd'`\n     */\n    substitutionDateFormat: string\n\n    /**\n     * Html class generated for nodes\n     */\n    htmlClass: Partial<{\n        lineBlock: string\n        lineBlockLine: string\n        definitionListItemClassifier: string\n        fieldList: string\n        optionList: string\n        optionListItemOption: string\n\n        citationRef: string\n        citationDef: string\n        citationDefGroup: string\n        citationDefBacklinks: string\n\n        footnoteRef: string\n        footnoteDef: string\n        footnoteDefGroup: string\n        footnoteDefBacklinks: string\n\n        inlineInternalTarget: string\n\n        literalBlock: string\n        literalInline: string\n        codeBlock: string\n        codeInline: string\n        docTestBlock: string\n\n        directiveAdmonition: string\n        directiveCentered: string\n        directiveContainer: string\n\n        mathBlock: string\n        mathInline: string\n\n        tocTree: string\n    }>\n\n    /**\n     * Values for resolving `only` directive's expression\n     */\n    outputEnv?: Record<string, boolean>\n\n    /**\n     * ### HTML ONLY\n     *\n     * Options for rendering math equations with katex\n     */\n    katex?: {\n        opts: KatexOptions\n    }\n\n    /**\n     * Default language for syntax highlighting LiteralBlock\n     *\n     * Default: `'txt'`\n     */\n    defaultLiteralBlockLanguage: string\n\n    /**\n     * Default language for syntax highlighting in `code` and `code-block` Directives\n     *\n     * Default: `'txt'`\n     */\n    defaultCodeDirectiveLanguage: string\n\n    /**\n     * ### HTML ONLY\n     *\n     * Options for syntax highlighting `code` and `code-block` Directives with shiki\n     *\n     * If not set, `code` and `code-block` Directives will output code inside plain `<pre>`\n     */\n    shiki?: {\n        highlighter: Awaited<ReturnType<typeof createHighlighter>>\n        theme: string | CodeOptionsMultipleThemes['themes']\n        transformers?: Array<ShikiTransformer>\n    }\n\n    /**\n     * Directives that will output markdown containers as defined by `markdown-it-container`\n     *\n     *      ::: warning\n     *      Hello World\n     *      :::\n     */\n    directivesWillOutputMdContainers: Array<string>\n}\n\nexport function createDefaultGeneratorOptions(opts?: Partial<RstGeneratorOptions>): RstGeneratorOptions {\n    const defaultOpts: RstGeneratorOptions = {\n        disableWarnings: false,\n        disableErrors: false,\n\n        outputIndentSize: 4,\n        enableBlockQuoteAttributionDash: true,\n        substitutionDateFormat: 'y-MM-dd',\n        htmlClass: {\n            lineBlock: 'line-block',\n            lineBlockLine: 'line',\n            definitionListItemClassifier: 'classifier',\n            fieldList: 'docinfo',\n            optionList: 'option-list',\n            optionListItemOption: 'option',\n\n            citationRef: 'citation-reference',\n            citationDef: 'citation-definition',\n            citationDefGroup: 'citations',\n            citationDefBacklinks: 'backlinks',\n\n            footnoteRef: 'footnote-reference',\n            footnoteDef: 'footnote-definition',\n            footnoteDefGroup: 'footnotes',\n            footnoteDefBacklinks: 'backlinks',\n\n            inlineInternalTarget: 'target',\n\n            literalBlock: 'literal-block',\n            literalInline: 'literal',\n            codeBlock: 'code',\n            codeInline: 'code',\n            docTestBlock: 'doctest',\n\n            directiveAdmonition: 'admonition',\n            directiveCentered: 'centered',\n            directiveContainer: 'container',\n\n            mathBlock: 'formula',\n            mathInline: 'formula',\n\n            tocTree: 'toc-tree',\n        } satisfies Required<RstGeneratorOptions['htmlClass']>,\n\n        defaultLiteralBlockLanguage: 'txt',\n        defaultCodeDirectiveLanguage: 'txt',\n\n        directivesWillOutputMdContainers: [],\n    }\n\n    return merge(defaultOpts, opts)\n}\n","import merge from 'lodash.merge'\n\nexport type RstParserOptions = {\n    disableWarnings: boolean\n    disableErrors: boolean\n\n    /**\n     * Treat first FieldList of Document as meta options for the document rather than content\n     *\n     * Default: `true`\n     */\n    parseFirstFieldListAsDocumentMeta: boolean\n\n    /**\n     * Number of spaces of input reStructuredText document use for indentation\n     *\n     * Used to denote the start of:\n     * * Blockquote\n     * * LineBlock\n     * * DefinitionList\n     *\n     * Default: `4`\n     */\n    inputIndentSize: number\n\n    /**\n     * Specify default role for InterpretedText when not provided\n     *\n     * Default: `'title-reference'`\n     */\n    defaultInterpretedTextRole: string\n\n    /**\n     * Relaxes inline parsing to allow whitespace and special characters immediately before inline markup and immediately after inline markup\n     *\n     * See https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#character-level-inline-markup\n     *\n     * Default: `false`\n     */\n    enableCharacterLevelInlineMarkup: boolean\n\n    /**\n     * Directives whose bodies should be consumed as raw text instead of parsing them as nested blocks\n     */\n    directivesWithRawText: Array<string>\n\n    /**\n     * Directives whose firstLineText should not be part of its children (i.e. it's specially parsed as separate text for other purposes)\n     */\n    directivesWithInitContent: Array<string>\n\n    /**\n     * Directives that will not render anything visible (i.e. control directives like \"rst-class\")\n     */\n    directivesWithInvisibleContent: Array<string>\n\n    /**\n     * String that will be included at the end of every source file\n     *\n     * This is a possible place to add substitutions that should be available in every file\n     *\n     * Default: `''`\n     */\n    epilog: string\n}\n\nexport function createDefaultParserOptions(opts?: Partial<RstParserOptions>): RstParserOptions {\n    const defaultOpts: RstParserOptions = {\n        disableWarnings: false,\n        disableErrors: false,\n\n        parseFirstFieldListAsDocumentMeta: true,\n        inputIndentSize: opts?.inputIndentSize ?? 4,\n        defaultInterpretedTextRole: opts?.defaultInterpretedTextRole ?? 'title-reference',\n        enableCharacterLevelInlineMarkup: opts?.enableCharacterLevelInlineMarkup ?? false,\n        directivesWithRawText: [],\n        directivesWithInitContent: [],\n        directivesWithInvisibleContent: [],\n\n        epilog: '',\n    }\n\n    return merge(defaultOpts, opts)\n}\n","// E -> ( E )\n//   -> not E\n//   -> E and E\n//   -> E or  E\n//   -> v\n\n// ----------------------------------------------------------------------------\n// MARK: Lexer\n// ----------------------------------------------------------------------------\n\nexport type PyTokenType =\n    | 'NOT'\n    | 'AND'\n    | 'OR'\n    | 'L_PAREN'\n    | 'R_PAREN'\n    | 'TERMINAL'\n\nexport type PyToken = {\n    type: PyTokenType\n    value?: string\n}\n\nexport function findEndOfWord(input: string, position: number): number {\n    // Already out of bounds\n    if (position >= input.length) {\n        return input.length\n    }\n\n    // If already at word boundary, return current position\n    const wordSeparatorRe = /[\\s()]/\n    if (wordSeparatorRe.test(input.charAt(position))) {\n        return position\n    }\n\n    // Advance position untill we find next boundary or the end of the string\n    while (position < input.length && !wordSeparatorRe.test(input.charAt(position))) {\n        position++\n    }\n\n    return position\n}\n\nexport function tokenizePythonBinaryExpr(input: string): Array<PyToken> {\n    const tokens = new Array<PyToken>()\n\n    let idx = 0\n    while (idx < input.length) {\n        const c = input.charAt(idx)\n\n        // Skip whitespace\n        if (/\\s/.test(c)) {\n            idx += 1\n            continue\n        }\n\n        const endOfWordIdx = findEndOfWord(input, idx)\n        const currentWord = input.substring(idx, endOfWordIdx)\n\n        switch (true) {\n            case c === '(': {\n                tokens.push({ type: 'L_PAREN' })\n                idx += 1\n                break\n            }\n            case c === ')': {\n                tokens.push({ type: 'R_PAREN' })\n                idx += 1\n                break\n            }\n            case currentWord === 'not': {\n                tokens.push({ type: 'NOT' })\n                idx += currentWord.length\n                break\n            }\n            case currentWord === 'and': {\n                tokens.push({ type: 'AND' })\n                idx += currentWord.length\n                break\n            }\n            case currentWord === 'or': {\n                tokens.push({ type: 'OR' })\n                idx += currentWord.length\n                break\n            }\n            default: {\n                tokens.push({ type: 'TERMINAL', value: currentWord })\n                idx += currentWord.length\n            }\n        }\n    }\n\n    return tokens\n}\n\n// ----------------------------------------------------------------------------\n// MARK: Parser\n// ----------------------------------------------------------------------------\n\nexport type PyExpr = {\n    operator?: 'AND' | 'OR' | 'NOT'\n    terminal?: string\n    left?: PyExpr\n    right?: PyExpr\n}\n\nexport function parsePythonBinaryExpr(input: string): PyExpr {\n    const tokens = tokenizePythonBinaryExpr(input)\n    let tokenIdx = 0\n\n    const peek = (offset = 0): PyToken | null => {\n        const idx = tokenIdx + offset\n        if (idx < 0 || idx >= tokens.length) {\n            return null\n        }\n\n        return tokens[idx]\n    }\n\n    const consume = (expectedTokenType?: PyTokenType): PyToken => {\n        if (tokenIdx < 0 || tokenIdx >= tokens.length) {\n            throw new Error('Out of tokens')\n        }\n\n        const token = tokens[tokenIdx]\n        if (expectedTokenType !== undefined && token.type !== expectedTokenType) {\n            throw new Error(`Unexpected token expected:${expectedTokenType} actual:${token.type}`)\n        }\n\n        tokenIdx += 1\n        return token\n    }\n\n    const parseExpr = (): PyExpr => {\n        switch (true) {\n            case peek()?.type === 'L_PAREN': {\n                consume('L_PAREN')\n                const expr = parseExpr()\n                consume('R_PAREN')\n\n                return expr\n            }\n\n            case peek()?.type === 'NOT': {\n                consume('NOT')\n                const expr = parseExpr()\n\n                return {\n                    operator: 'NOT',\n                    left: expr,\n                }\n            }\n\n            case peek(1)?.type === 'AND': {\n                const left = consume('TERMINAL')\n                if (!left.value) {\n                    throw new Error('Missing terminal')\n                }\n\n                consume('AND')\n                const right = parseExpr()\n\n                return {\n                    operator: 'AND',\n                    left: {\n                        terminal: left.value,\n                    },\n                    right,\n                }\n            }\n\n            case peek(1)?.type === 'OR': {\n                const left = consume('TERMINAL')\n                if (!left.value) {\n                    throw new Error('Missing terminal')\n                }\n\n                consume('OR')\n                const right = parseExpr()\n\n                return {\n                    operator: 'OR',\n                    left: {\n                        terminal: left.value,\n                    },\n                    right,\n                }\n            }\n\n            case peek()?.type === 'TERMINAL': {\n                const terminal = consume('TERMINAL').value\n                if (!terminal) {\n                    throw new Error('Missing terminal')\n                }\n\n                return {\n                    terminal,\n                }\n            }\n\n            default: {\n                throw new Error(`Unexpected token:${peek()?.type}`)\n            }\n        }\n    }\n\n    const expr = parseExpr()\n    if (tokenIdx !== tokens.length) {\n        throw new Error(`Failed to parseExpr tokenIdx:${tokenIdx} tokens:${tokens.length}`)\n    }\n\n    return expr\n}\n\n// ----------------------------------------------------------------------------\n// MARK: Evaluator\n// ----------------------------------------------------------------------------\n\nexport function evaluatePythonExpr(input: string, env?: Record<string, boolean>): boolean {\n    const evalExpr = (expr?: PyExpr): boolean => {\n        if (!expr) {\n            throw new Error('Missing expr')\n        }\n\n        switch (true) {\n            case expr.terminal !== undefined: {\n                return Boolean(env?.[expr.terminal])\n            }\n\n            case expr.operator === 'NOT': {\n                return !evalExpr(expr.left)\n            }\n\n            case expr.operator === 'AND': {\n                return evalExpr(expr.left) && evalExpr(expr.right)\n            }\n\n            case expr.operator === 'OR': {\n                return evalExpr(expr.left) || evalExpr(expr.right)\n            }\n        }\n\n        throw new Error('Failed to evalExpr')\n    }\n\n    const expr = parsePythonBinaryExpr(input)\n    return evalExpr(expr)\n}\n","import type { RstCompilerPlugin } from '../../RstCompilerPlugin.ts'\nimport { evaluatePythonExpr } from './parsePythonBinaryExpr.ts'\nimport { RstGeneratorError } from '../../Generator/RstGeneratorError.ts'\n\nconst ONLY_DIRECTIVE = 'only'\n\nexport const onlyDirectivePlugin: RstCompilerPlugin = {\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithInitContent.push(ONLY_DIRECTIVE)\n    },\n\n    onInstall: (compiler) => {\n        compiler.useDirectiveGenerator({\n            directives: [\n                ONLY_DIRECTIVE,\n            ],\n\n            generate: (generatorState, node) => {\n                const exprStr = node.initContentText\n                if (!exprStr) {\n                    throw new RstGeneratorError(generatorState, node, 'Missing exprStr')\n                }\n\n                try {\n                    const shouldShow = evaluatePythonExpr(exprStr, generatorState.opts.outputEnv)\n                    if (!shouldShow) {\n                        return\n                    }\n                } catch (err) {\n                    if (err instanceof Error) {\n                        throw new RstGeneratorError(generatorState, node, err.message)\n                    } else {\n                        throw err\n                    }\n                }\n\n                generatorState.visitNodes(node.children)\n            },\n        })\n    },\n}\n","import type { RstGeneratorState } from './RstGeneratorState.ts'\nimport type { RstNodeMap } from '../RstNode/RstNodeMap.ts'\nimport type { RstDirective } from '../RstNode/ExplicitMarkup/Directive.ts'\nimport type { RstInterpretedText } from '../RstNode/Inline/InterpretedText.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Generator\n// ----------------------------------------------------------------------------\n\ntype RstNodeGeneratorInstance<T extends keyof RstNodeMap, ExtraGeneratorArgs extends Array<unknown>> = Readonly<{\n    nodeType: T\n    generate: (generatorState: RstGeneratorState, node: RstNodeMap[T], ...args: ExtraGeneratorArgs) => void\n}>\n\nexport type RstNodeGenerator<T extends keyof RstNodeMap = keyof RstNodeMap, ExtraGeneratorArgs extends Array<unknown> = []> = T extends keyof RstNodeMap\n    ? RstNodeGeneratorInstance<T, ExtraGeneratorArgs>\n    : never\n\nexport function createNodeGenerators<\n    T extends keyof RstNodeMap,\n    ExtraGeneratorArgs extends Array<unknown>,\n>(\n    nodeType: T,\n    generateHtml: RstNodeGeneratorInstance<T, ExtraGeneratorArgs>['generate'],\n    generateMd?: RstNodeGeneratorInstance<T, ExtraGeneratorArgs>['generate'],\n) {\n    const htmlGenerator: RstNodeGeneratorInstance<T, ExtraGeneratorArgs> = {\n        nodeType,\n        generate: (generatorState, node, ...args: ExtraGeneratorArgs) => {\n            generateHtml(generatorState, node, ...args)\n        },\n    }\n\n    const mdGenerator: RstNodeGeneratorInstance<T, ExtraGeneratorArgs> = {\n        nodeType,\n        generate: (generatorState, node, ...args: ExtraGeneratorArgs) => {\n            if (generatorState.isUsingForcedHtmlMode) {\n                htmlGenerator.generate(generatorState, node, ...args)\n                return\n            }\n\n            if (!generateMd) {\n                generatorState.useForcedHtmlMode(() => {\n                    generateHtml(generatorState, node, ...args)\n                })\n                return\n            }\n\n            generateMd(generatorState, node, ...args)\n        },\n    }\n\n    return {\n        nodeType,\n        htmlGenerator,\n        mdGenerator,\n    }\n}\n\n// ----------------------------------------------------------------------------\n// MARK: InterpretedTextGenerator\n// ----------------------------------------------------------------------------\n\nexport type RstInterpretedTextGenerator = Readonly<{\n    roles: ReadonlyArray<string>\n    generate: (generatorState: RstGeneratorState, node: RstInterpretedText) => void\n}>\n\nexport function createInterpretedTextGenerators(roles: ReadonlyArray<string>, generateHtml: RstInterpretedTextGenerator['generate'], generateMd?: RstInterpretedTextGenerator['generate']) {\n    const htmlGenerator: RstInterpretedTextGenerator = {\n        roles,\n        generate: (generatorState, node) => {\n            generateHtml(generatorState, node)\n        },\n    }\n\n    const mdGenerator: RstInterpretedTextGenerator = {\n        roles,\n        generate: (generatorState, node) => {\n            if (generatorState.isUsingForcedHtmlMode) {\n                generateHtml(generatorState, node)\n                return\n            }\n\n            if (!generateMd) {\n                generatorState.useForcedHtmlMode(() => {\n                    generateHtml(generatorState, node)\n                })\n                return\n            }\n\n            generateMd(generatorState, node)\n        },\n    }\n\n    return {\n        roles,\n        htmlGenerator,\n        mdGenerator,\n    }\n}\n\n// ----------------------------------------------------------------------------\n// MARK: DirectiveGenerator\n// ----------------------------------------------------------------------------\n\nexport type RstDirectiveGenerator = Readonly<{\n    directives: ReadonlyArray<string>\n    generate: (generatorState: RstGeneratorState, node: RstDirective) => void\n}>\n\nexport function createDirectiveGenerators(directives: ReadonlyArray<string>, generateHtml: RstDirectiveGenerator['generate'], generateMd?: RstDirectiveGenerator['generate']) {\n    const htmlGenerator: RstDirectiveGenerator = {\n        directives,\n        generate: (generatorState, node) => {\n            generateHtml(generatorState, node)\n        },\n    }\n\n    const mdGenerator: RstDirectiveGenerator = {\n        directives,\n        generate: (generatorState, node) => {\n            if (generatorState.isUsingForcedHtmlMode) {\n                generateHtml(generatorState, node)\n                return\n            }\n\n            if (!generateMd) {\n                generatorState.useForcedHtmlMode(() => {\n                    generateHtml(generatorState, node)\n                })\n                return\n            }\n\n            generateMd(generatorState, node)\n        },\n    }\n\n    return {\n        directives,\n        htmlGenerator,\n        mdGenerator,\n    }\n}\n","import type { RstGeneratorOutput } from './Generator/RstGeneratorState.ts'\nimport type { RstCompiler } from './RstCompiler.ts'\nimport type { RstParserOptions } from './Parser/RstParserOptions.ts'\nimport type { RstGeneratorOptions } from './Generator/RstGeneratorOptions.ts'\nimport type { RstNode } from './RstNode/RstNode.ts'\nimport type { SimpleName } from './SimpleName.ts'\nimport type { createDirectiveGenerators, createInterpretedTextGenerators } from './Generator/RstGenerator.ts'\nimport type { RstParserOutput } from './Parser/RstParserState.ts'\n\nexport type RstCompilerPlugin = Partial<{\n    onInstall: (compiler: RstCompiler) => void\n    getSimpleName: (node: RstNode) => SimpleName | null\n\n    onBeforeParse: (parserOption: RstParserOptions) => void\n    onParse: (parserOutput: RstParserOutput) => void\n\n    onBeforeGenerate: (generatorOptions: RstGeneratorOptions) => void\n    onGenerate: (generatorOutput: RstGeneratorOutput) => void\n\n    isValidInterpretedText: (rawBodyText: string, role: string) => boolean | null\n}>\n\ntype CreateRstCompilerPluginsOptions = Omit<RstCompilerPlugin, 'onInstall'> & {\n    directiveGenerators?: Array<ReturnType<typeof createDirectiveGenerators>>\n    interpretedTextGenerators?: Array<ReturnType<typeof createInterpretedTextGenerators>>\n}\n\nexport function createRstCompilerPlugins(opts: CreateRstCompilerPluginsOptions) {\n    const htmlPlugin: RstCompilerPlugin = {\n        onInstall(compiler) {\n            for (const generators of opts.directiveGenerators ?? []) {\n                compiler.useDirectiveGenerator(generators.htmlGenerator)\n            }\n            for (const generators of opts.interpretedTextGenerators ?? []) {\n                compiler.useInterpretedTextGenerator(generators.htmlGenerator)\n            }\n        },\n        ...opts,\n    }\n\n    const mdPlugin: RstCompilerPlugin = {\n        onInstall(compiler) {\n            for (const generators of opts.directiveGenerators ?? []) {\n                compiler.useDirectiveGenerator(generators.mdGenerator)\n            }\n            for (const generators of opts.interpretedTextGenerators ?? []) {\n                compiler.useInterpretedTextGenerator(generators.mdGenerator)\n            }\n        },\n        ...opts,\n    }\n\n    return {\n        htmlPlugin,\n        mdPlugin,\n    }\n}\n","import { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { normalizeSimpleName } from '../../SimpleName.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nconst CONTAINER_DIRECTIVE = 'container'\n\nexport const containerDirectiveGenerators = createDirectiveGenerators(\n    [\n        CONTAINER_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const attrs = new HtmlAttributeStore()\n        attrs.append('class', generatorState.opts.htmlClass.directiveContainer)\n        attrs.append('class', normalizeSimpleName(node.initContentText))\n\n        generatorState.writeLineHtmlTagWithAttr('div', node, attrs, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.visitNodes(node.children)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const containerDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        containerDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithInitContent.push(CONTAINER_DIRECTIVE)\n    },\n})\n","import { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { normalizeSimpleName } from '../../SimpleName.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nconst RST_ADMONITION_DIRECTIVES = [\n    'info',\n    'attention',\n    'caution',\n    'danger',\n    'error',\n    'hint',\n    'important',\n    'seealso',\n    'note',\n    'tip',\n    'warning',\n]\n\nexport const specificAdmonitionDirectiveGenerators = createDirectiveGenerators(\n    RST_ADMONITION_DIRECTIVES,\n\n    (generatorState, node) => {\n        const attrs = new HtmlAttributeStore()\n        attrs.append('class', generatorState.opts.htmlClass.directiveAdmonition)\n        attrs.append('class', node.directive)\n\n        generatorState.writeLineHtmlTagWithAttr('div', node, attrs, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        const containerType = ((): string => {\n            switch (node.directive) {\n                case 'info':\n                case 'note':\n                case 'hint':\n                case 'important':\n                case 'seealso':\n                    return 'info'\n\n                case 'tip':\n                    return 'tip'\n\n                case 'warning':\n                    return 'warning'\n\n                case 'attention':\n                case 'caution':\n                case 'danger':\n                case 'error':\n                    return 'danger'\n\n                default:\n                    return 'info'\n            }\n        })()\n\n        generatorState.writeLineMdContainer(containerType, node, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n\nconst GENERIC_ADMONITION_DIRECTIVE = 'admonition'\n\nexport const genericAdmonitionDirectiveGenerators = createDirectiveGenerators(\n    [\n        GENERIC_ADMONITION_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const attrs = new HtmlAttributeStore()\n        attrs.append('class', generatorState.opts.htmlClass.directiveAdmonition)\n        attrs.append('class', node.directive)\n        attrs.append('class', normalizeSimpleName(node.initContentText))\n\n        generatorState.writeLineHtmlTagWithAttr('div', node, attrs, () => {\n            generatorState.visitNodes(node.initContent)\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        const admonition = normalizeSimpleName(node.initContentText)\n        generatorState.writeLineMdContainer(admonition, node, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const admonitionDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        specificAdmonitionDirectiveGenerators,\n        genericAdmonitionDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithInitContent.push(GENERIC_ADMONITION_DIRECTIVE)\n    },\n\n    onBeforeGenerate: (generatorOptions) => {\n        generatorOptions.directivesWillOutputMdContainers.push(GENERIC_ADMONITION_DIRECTIVE)\n        generatorOptions.directivesWillOutputMdContainers.push(...RST_ADMONITION_DIRECTIVES)\n    },\n})\n","import { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport { createDirectiveGenerators, createInterpretedTextGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport katex from 'katex'\n\nconst globalHeaderKey = 'katex'\nconst globalHeader = '<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css\" integrity=\"sha384-zh0CIslj+VczCZtlzBcjt5ppRcsAmDnRem7ESsYwWwg3m/OaJ2l4x7YBZl9Kxxib\" crossorigin=\"anonymous\">'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nconst MATH_DIRECTIVE = 'math'\n\nexport const mathDirectiveGenerators = createDirectiveGenerators(\n    [\n        MATH_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('div', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.mathBlock }), () => {\n            const renderedMath = katex.renderToString(node.rawBodyText, generatorState.opts.katex?.opts)\n            generatorState.writeLine(renderedMath)\n            generatorState.registerGlobalHeader(globalHeaderKey, globalHeader)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLine('$$')\n        generatorState.writeLine(node.rawBodyText)\n        generatorState.writeLine('$$')\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: InterpretedText\n// ----------------------------------------------------------------------------\n\nconst MATH_ROLE = 'math'\n\nexport const mathInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        MATH_ROLE,\n    ],\n\n    (generatorState, node) => {\n        const renderedMath = katex.renderToString(node.rawTextContent)\n        generatorState.writeTextWithLinePrefix(`<span class=\"${generatorState.opts.htmlClass.mathInline}\">${renderedMath}</span>`)\n        generatorState.registerGlobalHeader(globalHeaderKey, globalHeader)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`$${node.rawTextContent}$`)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const mathPlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        mathDirectiveGenerators,\n    ],\n\n    interpretedTextGenerators: [\n        mathInterpretedTextGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithRawText.push(MATH_DIRECTIVE)\n    },\n})\n","export function sanitizeHtml(input: string): string {\n    if (/&(amp|lt|gt|quot|apos);/.test(input)) {\n        throw new Error('Double sanitize')\n    }\n\n    return input\n        .replaceAll(/&(?![a-z]+;)/g, '&amp;')\n        .replaceAll('<', '&lt;')\n        .replaceAll('>', '&gt;')\n        .replaceAll('\"', '&quot;')\n        .replaceAll(\"'\", '&apos;')\n}\n","import { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport type { RstNode } from '../../RstNode/RstNode.ts'\nimport { sanitizeHtml } from '../../utils/sanitizeHtml.ts'\n\nexport function renderCodeBlockHtml(generatorState: RstGeneratorState, language: string, rawCode: string, node: RstNode) {\n    generatorState.writeLineHtmlTagWithAttrInSameLine('pre', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.codeBlock }), () => {\n        if (!generatorState.opts.shiki) {\n            generatorState.writeText(sanitizeHtml(rawCode))\n            return\n        }\n\n        let renderedCode: string\n\n        if (typeof generatorState.opts.shiki.theme === 'string') {\n            renderedCode = generatorState.opts.shiki.highlighter.codeToHtml(rawCode, {\n                lang: language,\n                theme: generatorState.opts.shiki.theme,\n                transformers: generatorState.opts.shiki.transformers,\n            })\n        } else {\n            renderedCode = generatorState.opts.shiki.highlighter.codeToHtml(rawCode, {\n                lang: language,\n                themes: generatorState.opts.shiki.theme,\n                transformers: generatorState.opts.shiki.transformers,\n            })\n        }\n\n        generatorState.writeText(renderedCode)\n    })\n}\n","import type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\n\nexport function renderCodeBlockMd(generatorState: RstGeneratorState, language: string, rawCode: string) {\n    generatorState.writeLine('```' + language)\n    generatorState.writeLine(rawCode)\n    generatorState.writeLine('```')\n}\n","import { createDirectiveGenerators, createInterpretedTextGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { sanitizeHtml } from '../../utils/sanitizeHtml.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { renderCodeBlockHtml } from './renderCodeBlockHtml.ts'\nimport { renderCodeBlockMd } from './renderCodeBlockMd.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nexport const highlightDirectiveGenerators = createDirectiveGenerators(\n    [\n        'highlight',\n    ],\n\n    (generatorState, node) => {\n        generatorState.opts.defaultLiteralBlockLanguage = node.initContentText\n        generatorState.opts.defaultCodeDirectiveLanguage = node.initContentText\n        generatorState.writeLineHtmlComment(node.toShortString())\n    },\n\n    (generatorState, node) => {\n        generatorState.opts.defaultLiteralBlockLanguage = node.initContentText\n        generatorState.opts.defaultCodeDirectiveLanguage = node.initContentText\n        generatorState.writeLineMdComment(node.toShortString())\n    },\n)\n\nexport const codeDirectiveGenerators = createDirectiveGenerators(\n    [\n        'code',\n        'code-block',\n    ],\n\n    (generatorState, node) => {\n        const language = getCodeLanguage(node) ?? generatorState.opts.defaultCodeDirectiveLanguage\n        renderCodeBlockHtml(generatorState, language, node.rawBodyText, node)\n    },\n\n    (generatorState, node) => {\n        const language = getCodeLanguage(node) ?? generatorState.opts.defaultCodeDirectiveLanguage\n        renderCodeBlockMd(generatorState, language, node.rawBodyText)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: InterpretedText\n// ----------------------------------------------------------------------------\n\nexport const codeInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'code',\n        'mimetype',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<code>${sanitizeHtml(node.textContent)}</code>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`\\`${node.textContent}\\``) // Don't sanitize since this is written inside literal text\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const codePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        highlightDirectiveGenerators,\n        codeDirectiveGenerators,\n    ],\n\n    interpretedTextGenerators: [\n        codeInterpretedTextGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        for (const directive of highlightDirectiveGenerators.directives) {\n            parserOption.directivesWithInitContent.push(directive)\n        }\n\n        for (const directive of codeDirectiveGenerators.directives) {\n            parserOption.directivesWithRawText.push(directive)\n            parserOption.directivesWithInitContent.push(directive)\n        }\n    },\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getCodeLanguage(node: RstDirective): string | null {\n    const language = node.initContentText\n    if (!language) {\n        return null\n    }\n\n    const isLanguageName = /^[a-z+]+$/.test(language)\n    if (!isLanguageName) {\n        return null\n    }\n\n    return language\n}\n","import { RstGeneratorError } from '../Generator/RstGeneratorError.ts'\nimport { RstGeneratorState } from '../Generator/RstGeneratorState.ts'\nimport { RstNode } from '../RstNode/RstNode.ts'\nimport type { RstNodeMap } from '../RstNode/RstNodeMap.ts'\n\nexport function assertNode<T extends keyof RstNodeMap>(generatorState: RstGeneratorState, node: RstNode | null | undefined, expectedNodeType: T, expectedNumChildren?: number): asserts node is RstNodeMap[T] {\n    if (!node) {\n        throw new RstGeneratorError(generatorState, 'Is not a node')\n    }\n\n    if (node.nodeType !== expectedNodeType) {\n        throw new RstGeneratorError(generatorState, node, `Is not ${expectedNodeType}`)\n    }\n\n    if (expectedNumChildren !== undefined && node.children.length !== expectedNumChildren) {\n        throw new RstGeneratorError(generatorState, node, `Does not have exactly ${expectedNumChildren} child`)\n    }\n}\n","import type { Brand } from '../../../@types/Brand.ts'\nimport { RstGeneratorError } from '../../../Generator/RstGeneratorError.ts'\nimport { RstGeneratorState } from '../../../Generator/RstGeneratorState.ts'\nimport { RstParagraph } from '../../../RstNode/Block/Paragraph.ts'\nimport { RstFieldList } from '../../../RstNode/List/FieldList.ts'\nimport { RstFieldListItem } from '../../../RstNode/List/FieldListItem.ts'\nimport { normalizeSimpleName } from '../../../SimpleName.ts'\nimport { assertNode } from '../../../utils/assertNode.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport type JsPropGroupType = Brand<string, 'JsPropGroupType'> // \"param\", \"throw\", \"return\", etc.\n\nexport type JsPropGroup = {\n    node: RstFieldListItem\n    propDataType?: string\n    propName?: string\n}\n\nexport function getJsPropGroups(generatorState: RstGeneratorState, fieldList: RstFieldList): Map<JsPropGroupType, Array<JsPropGroup>> {\n    const jsProps = new Map<JsPropGroupType, Array<JsPropGroup>>() // Maps prop type (\"param\", \"throw\", \"return\") to corresponding FieldListItems that describe them\n\n    for (const fieldListItem of fieldList.children) {\n        assertNode(generatorState, fieldListItem, 'FieldListItem')\n\n        const fieldName = fieldListItem.name.map((textNode) => textNode.textContent).join(' ')\n        const fieldNameParts = fieldName.split(' ')\n\n        const propType = fieldNameParts[0] as JsPropGroupType\n        if (!jsProps.has(propType)) {\n            jsProps.set(propType, [])\n        }\n\n        switch (fieldNameParts.length) {\n            case 1: {\n                jsProps.get(propType)?.push({\n                    node: fieldListItem,\n                })\n                break\n            }\n\n            case 2: {\n                if (propType === 'param') {\n                    jsProps.get(propType)?.push({\n                        node: fieldListItem,\n                        propName: fieldNameParts[1],\n                    })\n                } else {\n                    jsProps.get(propType)?.push({\n                        node: fieldListItem,\n                        propDataType: fieldNameParts[1],\n                    })\n                }\n                break\n            }\n\n            case 3: {\n                jsProps.get(propType)?.push({\n                    node: fieldListItem,\n                    propDataType: fieldNameParts[1],\n                    propName: fieldNameParts[2],\n                })\n                break\n            }\n\n            default:\n                throw new RstGeneratorError(generatorState, fieldListItem, `Unhandled fieldName:\"${fieldName}\"`)\n        }\n    }\n\n    return jsProps\n}\n\nexport function getJsPropGroupLabel(groupType: JsPropGroupType): string {\n    switch (groupType) {\n        case 'param':\n            return 'Arguments'\n\n        case 'rtype':\n            return 'Return Type'\n\n        default:\n            return groupType[0].toUpperCase() + groupType.substring(1)\n    }\n}\n\nexport function renderPropGroupAsHtml(generatorState: RstGeneratorState, propGroup: JsPropGroup): void {\n    const { node: fieldListItem, propName, propDataType } = propGroup\n    const isSingleLineDesc = fieldListItem.body.length === 1 && fieldListItem.body[0] instanceof RstParagraph\n\n    const propNameText = ((): string => {\n        if (!propName) {\n            return ''\n        }\n\n        let output = ''\n        output += '<strong>'\n        output += sanitizeHtml(propName)\n\n        if (propDataType) {\n            const jsRefSimpleName = normalizeSimpleName(`js-${propDataType}`)\n\n            let propDataTypeHtml: string\n\n            // Check if jsRef defined by propDataType exists, if it does link to it otherwise render it as plain code\n            if (generatorState.canResolveExternalRef(jsRefSimpleName)) {\n                const externalRef = generatorState.resolveExternalRef(propGroup.node, jsRefSimpleName)\n                propDataTypeHtml = `<a href=\"${externalRef.externalUrl}\">${sanitizeHtml(externalRef.externalLabel ?? propDataType)}</a>`\n            } else {\n                propDataTypeHtml = `<code>${sanitizeHtml(propDataType)}</code>`\n            }\n\n            output += ` (${propDataTypeHtml})`\n        }\n\n        output += '</strong>'\n        output += ' '\n\n        if (isSingleLineDesc) {\n            output += '&mdash;'\n        }\n\n        return output\n    })()\n\n    if (isSingleLineDesc) {\n        const descText = generatorState.getChildrenText(() => {\n            generatorState.visitNodes(fieldListItem.body[0].children)\n        })\n\n        generatorState.writeLine(propNameText + ' ' + descText)\n    } else {\n        generatorState.writeLineHtmlTag('p', null, () => {\n            generatorState.writeText(propNameText)\n        })\n\n        generatorState.visitNodes(fieldListItem.body)\n    }\n}\n","import { createNodeGenerators } from '../../../Generator/RstGenerator.ts'\nimport { getJsPropGroups, getJsPropGroupLabel, renderPropGroupAsHtml } from './JsPropGroup.ts'\n\nexport const jsDirectiveOptionsGenerator = createNodeGenerators(\n    'FieldList',\n\n    (generatorState, node) => {\n        const jsProps = getJsPropGroups(generatorState, node)\n\n        generatorState.writeLineHtmlTag('dl', node, () => {\n            for (const [propType, propGroups] of jsProps.entries()) {\n                generatorState.writeLineHtmlTag('dt', null, () => {\n                    const groupLabel = getJsPropGroupLabel(propType)\n                    generatorState.writeLine(groupLabel)\n                })\n\n                generatorState.writeLineHtmlTag('dd', null, () => {\n                    if (propGroups.length === 1) {\n                        renderPropGroupAsHtml(generatorState, propGroups[0])\n                    } else {\n                        generatorState.writeLineHtmlTag('ul', null, () => {\n                            for (const propGroup of propGroups) {\n                                generatorState.writeLineHtmlTag('li', node, () => {\n                                    renderPropGroupAsHtml(generatorState, propGroup)\n                                })\n                            }\n                        })\n                    }\n                })\n            }\n        })\n    },\n)\n","/**\n * Given a full JS signature, this function returns the local scoped name\n *\n * For `$.getJSON(href, callback[, errback])`, this function returns `getJSON`\n */\nexport function getJsLocalName(fullName: string): string | null {\n    return /(?<jsName>[a-zA-Z][\\w.]+)\\(?/.exec(fullName)?.groups?.jsName ?? null\n}\n","import { RstDirective } from '../../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstNode } from '../../../RstNode/RstNode.ts'\nimport { getJsLocalName } from './getJsLocalName.ts'\n\nexport function getParentModules(node: RstDirective): Array<string> {\n    const nameChain = new Array<string>()\n\n    // Walk up tree to find all js:module js:class that contribute to the full name\n    let parent: RstNode | null = node\n    while (true) {\n        parent = parent.parent\n        if (!parent) {\n            break\n        }\n\n        if (!(parent instanceof RstDirective)) {\n            continue\n        }\n        if (parent.directive !== 'js:class' && parent.directive !== 'js:module') {\n            continue\n        }\n\n        const localName = getJsLocalName(parent.initContentText)\n        if (!localName) {\n            continue\n        }\n\n        nameChain.unshift(localName)\n    }\n\n    return nameChain\n}\n","import { createDirectiveGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\nimport { jsDirectiveOptionsGenerator } from './jsDirectiveOptionsGenerator.ts'\nimport { getParentModules } from './getParentModules.ts'\nimport { HtmlAttributeStore } from '../../../Generator/HtmlAttributeStore.ts'\nimport { RstGeneratorError } from '../../../Generator/RstGeneratorError.ts'\n\nexport const jsDirectives = new Set([\n    'js:module',\n    'js:function',\n    'js:method',\n    'js:class',\n    'js:data',\n    'js:attribute',\n])\n\nexport const jsDirectiveGenerators = createDirectiveGenerators(\n    [...jsDirectives],\n\n    (generatorState, node) => {\n        const directive = /js:(?<directive>\\w+)/.exec(node.directive)?.groups?.directive\n        if (!directive) {\n            throw new RstGeneratorError(generatorState, node, 'Failed to get directive')\n        }\n\n        const attrs = new HtmlAttributeStore()\n        attrs.append('class', 'js')\n        attrs.append('class', directive)\n\n        generatorState.writeLineHtmlTagWithAttr('dl', node, attrs, () => {\n            generatorState.writeLineHtmlTag('dt', null, () => {\n                const nameChain = [...getParentModules(node), node.initContentText]\n                const url = generatorState.resolveNodeToUrl(node)\n                generatorState.writeLine(`<code>${sanitizeHtml(nameChain.join('.'))}</code>`)\n                generatorState.writeLine(`<a href=\"${url}\">&para;</a>`)\n            })\n\n            generatorState.writeLineHtmlTag('dd', null, () => {\n                generatorState.useNodeGenerator(jsDirectiveOptionsGenerator.htmlGenerator, () => {\n                    generatorState.visitNode(node.config)\n                    generatorState.visitNodes(node.children)\n                })\n            })\n        })\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { parseEmbededRef } from '../../../utils/parseEmbededRef.ts'\nimport { normalizeSimpleName } from '../../../SimpleName.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const jsRoles = new Set([\n    'js:mod',\n    'js:func',\n    'js:meth',\n    'js:class',\n    'js:data',\n    'js:attr',\n])\n\nexport const jsInterpretedTextGenerators = createInterpretedTextGenerators(\n    [...jsRoles],\n\n    (generatorState, node) => {\n        const { label, target } = parseEmbededRef(node.rawTextContent)\n        const simpleName = normalizeSimpleName(`js-${target}`)\n        const externalRef = generatorState.resolveExternalRef(node, simpleName)\n        generatorState.writeTextWithLinePrefix(`<a href=\"${externalRef.externalUrl}\">${sanitizeHtml(externalRef.externalLabel ?? label)}</a>`)\n    },\n\n    (generatorState, node) => {\n        const { label, target } = parseEmbededRef(node.rawTextContent)\n        const simpleName = normalizeSimpleName(`js-${target}`)\n        const externalRef = generatorState.resolveExternalRef(node, simpleName)\n        generatorState.writeTextWithLinePrefix(`[${sanitizeHtml(externalRef.externalLabel ?? label)}](${externalRef.externalUrl})`)\n    },\n)\n","import { createRstCompilerPlugins } from '../../../RstCompilerPlugin.ts'\nimport { RstDirective } from '../../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstNode } from '../../../RstNode/RstNode.ts'\nimport { type SimpleName, normalizeSimpleName } from '../../../SimpleName.ts'\nimport { jsDirectiveGenerators, jsDirectives } from './jsDirectiveGenerators.ts'\nimport { jsInterpretedTextGenerators } from './jsInterpretedTextGenerators.ts'\nimport { getJsLocalName } from './getJsLocalName.ts'\nimport { getParentModules } from './getParentModules.ts'\n\nexport const jsDomainPlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        jsDirectiveGenerators,\n    ],\n\n    interpretedTextGenerators: [\n        jsInterpretedTextGenerators,\n    ],\n\n    getSimpleName: getJsDirectiveSimpleName,\n\n    onBeforeParse: (parserOption) => {\n        for (const directive of jsDirectives) {\n            parserOption.directivesWithInitContent.push(directive)\n        }\n    },\n\n    onParse: (parserOutput) => {\n        const directives = parserOutput.root.findAllChildren('Directive')\n        const jsDomainDirectives = directives.filter((node) => jsDirectives.has(node.directive))\n\n        for (const directiveNode of jsDomainDirectives) {\n            const simpleName = getJsDirectiveSimpleName(directiveNode)\n            if (!simpleName) {\n                continue\n            }\n\n            parserOutput.simpleNameResolver.registerExplicitNode(directiveNode, simpleName)\n            parserOutput.simpleNameResolver.registerNodeAsLinkable(directiveNode, simpleName, true)\n        }\n    },\n})\n\nfunction getJsDirectiveSimpleName(node: RstNode): SimpleName | null {\n    if (!(node instanceof RstDirective)) {\n        return null\n    }\n\n    if (!jsDirectives.has(node.directive)) {\n        return null\n    }\n\n    const localName = getJsLocalName(node.initContentText)\n    const nameChain = [...getParentModules(node), localName]\n    return normalizeSimpleName(`js-${nameChain.join('.')}`)\n}\n","export default \"// ----------------------------------------------------------------------------\\n// MARK: Helpers\\n// ----------------------------------------------------------------------------\\n\\n/**\\n * @param {string} groupKey\\n * @returns string | null\\n */\\nconst loadStorage = (groupKey) => {\\n    try {\\n        return window.localStorage.getItem(`LOCAL_STORAGE_KEY:${groupKey}`)\\n    // eslint-disable-next-line no-unused-vars\\n    } catch (_err) {\\n        return null\\n    }\\n}\\n\\n/**\\n * @param {string} groupKey\\n * @param {string} value\\n * @returns string | null\\n */\\nconst saveStorage = (groupKey, value) => {\\n    try {\\n        window.localStorage.setItem(`LOCAL_STORAGE_KEY:${groupKey}`, value)\\n        return value\\n    // eslint-disable-next-line no-unused-vars\\n    } catch (_err) {\\n        return null\\n    }\\n}\\n\\n// ----------------------------------------------------------------------------\\n// MARK: Container\\n// ----------------------------------------------------------------------------\\n\\nconst template = document.createElement('template')\\ntemplate.innerHTML = `\\n    <style>\\n        :host {\\n            display: flex;\\n            flex-wrap: wrap;\\n        }\\n        ::slotted(ELEMENT_HEADING) {\\n            cursor: pointer;\\n        }\\n        ::slotted(ELEMENT_HEADING[selected]) {\\n            font-weight: bold;\\n        }\\n        ::slotted(ELEMENT_PANEL) {\\n            flex-basis: 100%;\\n        }\\n    </style>\\n\\n    <slot name=\\\"TEMPLATE_SLOT_NAME_HEADING\\\"></slot>\\n    <slot name=\\\"TEMPLATE_SLOT_NAME_PANEL\\\"></slot>\\n`\\n\\nclass TabContainer extends HTMLElement {\\n    constructor() {\\n        super()\\n        this.attachShadow({ mode: 'open' })\\n        this.shadowRoot.appendChild(template.content.cloneNode(true))\\n\\n        const headingSlot = this.shadowRoot.querySelector('slot[name=\\\"TEMPLATE_SLOT_NAME_HEADING\\\"]')\\n        headingSlot.addEventListener('slotchange', () => {\\n            this.#linkPanels()\\n        })\\n\\n        const panelSlot = this.shadowRoot.querySelector('slot[name=\\\"TEMPLATE_SLOT_NAME_PANEL\\\"]')\\n        panelSlot.addEventListener('slotchange', () => {\\n            this.#linkPanels()\\n        })\\n    }\\n\\n    connectedCallback() {\\n        this.setAttribute('role', 'tablist')\\n    }\\n\\n    get #headings() {\\n        return Array.from(this.querySelectorAll(':scope > ELEMENT_HEADING'))\\n    }\\n\\n    get #panels() {\\n        return Array.from(this.querySelectorAll(':scope > ELEMENT_PANEL'))\\n    }\\n\\n    #linkPanels() {\\n        for (const heading of this.#headings) {\\n            const panel = heading.nextElementSibling\\n            if (!panel) {\\n                continue\\n            }\\n\\n            heading.setAttribute('aria-controls', panel.id)\\n            panel.setAttribute('aria-labelledby', heading.id)\\n        }\\n\\n        // Since this function is called by the 'slotchange' event, this function runs before the child is finished attaching to the DOM\\n        // Thus we need to wait for next tick in the event loop to before we can access it via 'this.#headings'\\n        setTimeout(() => {\\n            const groupKey = this.getAttribute('ATTR_TAB_GROUP_NAME')\\n            const lastSelected = loadStorage(groupKey)\\n\\n            const selectedTab = groupKey\\n                ? this.#headings.find((heading) => heading.getAttribute('ATTR_HEADING_NAME') === lastSelected)\\n                : this.#headings.find((heading) => heading.selected)\\n\\n            const newTab = selectedTab ?? this.#headings[0]\\n            this.selectTab(newTab)\\n        }, 0)\\n    }\\n\\n    #resetTabs() {\\n        for (const heading of this.#headings) {\\n            heading.selected = false\\n        }\\n        for (const panel of this.#panels) {\\n            panel.hidden = true\\n        }\\n    }\\n\\n    /**\\n     * @param {TabHeading} newHeading\\n     * @returns void\\n     */\\n    selectTab(newHeading) {\\n        this.#resetTabs()\\n\\n        const newPanelId = newHeading.getAttribute('aria-controls')\\n        if (!newPanelId) {\\n            return\\n        }\\n\\n        const newPanel = this.querySelector(`#${newPanelId}`)\\n        if (!newPanel) {\\n            return\\n        }\\n\\n        newHeading.selected = true\\n        newPanel.hidden = false\\n    }\\n\\n    /**\\n     * Iterates all tab containers of current groupKey and selects the heading that matches current heading\\n     *\\n     * @param {string} selectedHeadingName\\n     * @returns void\\n     */\\n    selectTabForEveryoneElse(selectedHeadingName) {\\n        const groupKey = this.getAttribute('ATTR_TAB_GROUP_NAME')\\n        if (!groupKey) {\\n            return\\n        }\\n\\n        const allTabContainers = document.querySelectorAll(`ELEMENT_CONTAINER[ATTR_TAB_GROUP_NAME=\\\"${groupKey}\\\"]`)\\n\\n        for (const otherContainer of allTabContainers) {\\n            if (otherContainer === this) {\\n                continue\\n            }\\n            if (!(otherContainer instanceof TabContainer)) {\\n                continue\\n            }\\n\\n            const otherContainerHeading = otherContainer.querySelector(`ELEMENT_HEADING[ATTR_HEADING_NAME=\\\"${selectedHeadingName}\\\"]`)\\n            otherContainer.selectTab(otherContainerHeading)\\n        }\\n\\n        saveStorage(groupKey, selectedHeadingName)\\n    }\\n}\\n\\ncustomElements.define('ELEMENT_CONTAINER', TabContainer)\\n\\n// ----------------------------------------------------------------------------\\n// MARK: Panel\\n// ----------------------------------------------------------------------------\\n\\nclass TabPanel extends HTMLElement {\\n    static counter = 1\\n\\n    connectedCallback() {\\n        if (!this.id) {\\n            this.id = `ELEMENT_PANEL-${TabPanel.counter++}`\\n        }\\n\\n        this.setAttribute('role', 'tabpanel')\\n    }\\n}\\n\\ncustomElements.define('ELEMENT_PANEL', TabPanel)\\n\\n// ----------------------------------------------------------------------------\\n// MARK: Heading\\n// ----------------------------------------------------------------------------\\n\\nclass TabHeading extends HTMLElement {\\n    static counter = 1\\n\\n    connectedCallback() {\\n        if (!this.id) {\\n            this.id = `ELEMENT_HEADING-${TabHeading.counter++}`\\n        }\\n\\n        this.setAttribute('role', 'tab')\\n        this.setAttribute('aria-selected', 'false')\\n        this.setAttribute('tabindex', -1)\\n\\n        this.addEventListener('click', () => {\\n            const container = this.parentNode\\n            if (!(container instanceof TabContainer)) {\\n                throw new Error('parentNode is not TabContainer')\\n            }\\n\\n            container.selectTab(this)\\n            container.selectTabForEveryoneElse(this.getAttribute('ATTR_HEADING_NAME'))\\n        })\\n    }\\n\\n    get selected() {\\n        return this.hasAttribute('selected')\\n    }\\n\\n    set selected(value) {\\n        if (value) {\\n            this.setAttribute('selected', '')\\n        } else {\\n            this.removeAttribute('selected')\\n        }\\n    }\\n\\n    static get observedAttributes() {\\n        return ['selected']\\n    }\\n\\n    attributeChangedCallback() {\\n        const selected = this.hasAttribute('selected')\\n        this.setAttribute('aria-selected', selected)\\n        this.setAttribute('tabindex', selected ? 0 : -1)\\n    }\\n}\\n\\ncustomElements.define('ELEMENT_HEADING', TabHeading)\\n\"","import { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { normalizeSimpleName } from '../../SimpleName.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport browserCode from './Tabs.browser.js?raw'\nimport { renderCodeBlockHtml } from '../Code/renderCodeBlockHtml.ts'\nimport { renderCodeBlockMd } from '../Code/renderCodeBlockMd.ts'\nimport { bundledLanguagesInfo } from 'shiki'\nimport { assertNode } from '../../utils/assertNode.ts'\nimport { RstGeneratorError } from '../../Generator/RstGeneratorError.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Constants\n// ----------------------------------------------------------------------------\n\nexport const TAB_CONTAINER_DIRECTIVE = 'tabs'\nexport const TAB_PANEL_DIRECTIVE = 'tab'\nexport const TAB_PANEL_GROUP_DIRECTIVE = 'group-tab'\nexport const TAB_PANEL_CODEGROUP_DIRECTIVE = 'code-tab'\n\nexport const GENERATOR_GLOBAL_HEADER_KEY = 'tabs-plugin'\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const TabsClientConstant = Object.freeze({\n    ELEMENT_CONTAINER: 'rst-tabs-container',\n    ELEMENT_HEADING: 'rst-tab-heading',\n    ELEMENT_PANEL: 'rst-tab-panel',\n\n    TEMPLATE_SLOT_NAME_HEADING: 'heading',\n    TEMPLATE_SLOT_NAME_PANEL: 'panel',\n\n    ATTR_TAB_GROUP_NAME: 'data-group-name',\n    ATTR_HEADING_NAME: 'data-heading',\n\n    LOCAL_STORAGE_KEY: 'rst-compiler:tabs-plugin',\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Container Directive\n// ----------------------------------------------------------------------------\n\nexport const tabContainerDirectiveGenerators = createDirectiveGenerators(\n    [\n        TAB_CONTAINER_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const attrs = new HtmlAttributeStore()\n        attrs.append(TabsClientConstant.ATTR_TAB_GROUP_NAME, getTabsGroupKey(generatorState, node))\n\n        generatorState.registerGlobalHeader(GENERATOR_GLOBAL_HEADER_KEY, getTabsClientScript())\n        generatorState.writeLineHtmlTagWithAttr(TabsClientConstant.ELEMENT_CONTAINER, node, attrs, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        const groupKey = getTabsGroupKey(generatorState, node)\n        const containerLabel = groupKey\n            ? `tabs key:${groupKey}`\n            : 'tabs'\n\n        generatorState.writeLineMdContainer(containerLabel, node, () => {\n            generatorState.useNoLineBreaksBetweenBlocks(() => {\n                generatorState.visitNodes(node.children)\n            })\n        })\n    },\n)\n\nfunction getTabsGroupKey(generatorState: RstGeneratorState, node: RstDirective): string {\n    let childrenDirective: string | null = null\n\n    for (const child of node.children) {\n        assertNode(generatorState, child, 'Directive')\n\n        if (childrenDirective !== null && childrenDirective !== child.directive) {\n            throw new RstGeneratorError(generatorState, child, `Expected \"${childrenDirective}\" but got \"${child.directive}\"`)\n        }\n\n        childrenDirective = child.directive\n    }\n\n    if (!childrenDirective) {\n        throw new RstGeneratorError(generatorState, node, 'Failed to get childrenDirective')\n    }\n\n    switch (childrenDirective) {\n        case TAB_PANEL_DIRECTIVE:\n            return '' // No key needed for ungrouped tabs\n\n        case TAB_PANEL_GROUP_DIRECTIVE:\n            return TAB_PANEL_GROUP_DIRECTIVE\n\n        case TAB_PANEL_CODEGROUP_DIRECTIVE:\n            return TAB_PANEL_CODEGROUP_DIRECTIVE\n\n        default:\n            throw new RstGeneratorError(generatorState, node, `Unexpected directive:\"${childrenDirective}\"`)\n    }\n}\n\n// ----------------------------------------------------------------------------\n// MARK: Panel Directive\n// ----------------------------------------------------------------------------\n\nexport const tabPanelDirectiveGenerators = createDirectiveGenerators(\n    [\n        TAB_PANEL_DIRECTIVE,\n        TAB_PANEL_GROUP_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const headingAttrs = new HtmlAttributeStore()\n        headingAttrs.set('role', 'heading') // This will be dynamically changed by js later. When js is disabled, this role is more relevant in the static markup\n        headingAttrs.set('slot', TabsClientConstant.TEMPLATE_SLOT_NAME_HEADING)\n        headingAttrs.set(TabsClientConstant.ATTR_HEADING_NAME, normalizeSimpleName(node.initContentText))\n\n        const panelAttrs = new HtmlAttributeStore()\n        panelAttrs.set('role', 'region') // This will be dynamically changed by js later. When js is disabled, this role is more relevant in the static markup\n        panelAttrs.set('slot', TabsClientConstant.TEMPLATE_SLOT_NAME_PANEL)\n\n        generatorState.writeLineHtmlTagWithAttr(TabsClientConstant.ELEMENT_HEADING, null, headingAttrs, () => {\n            generatorState.writeLine(node.initContentText)\n        })\n\n        generatorState.writeLineHtmlTagWithAttr(TabsClientConstant.ELEMENT_PANEL, null, panelAttrs, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLine(`== ${node.initContentText}`)\n        generatorState.visitNodes(node.children)\n    },\n)\n\nexport const tabPanelCodeDirectiveGenerators = createDirectiveGenerators(\n    [\n        TAB_PANEL_CODEGROUP_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const { label, language } = getCodeTabInfo(node)\n\n        const headingAttrs = new HtmlAttributeStore()\n        headingAttrs.set('role', 'heading') // This will be dynamically changed by js later. When js is disabled, this role is more relevant in the static markup\n        headingAttrs.set('slot', TabsClientConstant.TEMPLATE_SLOT_NAME_HEADING)\n        headingAttrs.set(TabsClientConstant.ATTR_HEADING_NAME, normalizeSimpleName(label))\n\n        const panelAttrs = new HtmlAttributeStore()\n        panelAttrs.set('role', 'region') // This will be dynamically changed by js later. When js is disabled, this role is more relevant in the static markup\n        panelAttrs.set('slot', TabsClientConstant.TEMPLATE_SLOT_NAME_PANEL)\n\n        generatorState.writeLineHtmlTagWithAttr(TabsClientConstant.ELEMENT_HEADING, null, headingAttrs, () => {\n            generatorState.writeLine(label)\n        })\n\n        generatorState.writeLineHtmlTagWithAttr(TabsClientConstant.ELEMENT_PANEL, null, panelAttrs, () => {\n            renderCodeBlockHtml(generatorState, language, node.rawBodyText, node)\n        })\n    },\n\n    (generatorState, node) => {\n        const { label, language } = getCodeTabInfo(node)\n        generatorState.writeLine(`== ${label}`)\n        renderCodeBlockMd(generatorState, language, node.rawBodyText)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const tabsDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        tabContainerDirectiveGenerators,\n        tabPanelDirectiveGenerators,\n        tabPanelCodeDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithRawText.push(TAB_PANEL_CODEGROUP_DIRECTIVE)\n        parserOption.directivesWithInitContent.push(TAB_PANEL_DIRECTIVE)\n        parserOption.directivesWithInitContent.push(TAB_PANEL_GROUP_DIRECTIVE)\n        parserOption.directivesWithInitContent.push(TAB_PANEL_CODEGROUP_DIRECTIVE)\n    },\n\n    onBeforeGenerate: (generatorOptions) => {\n        generatorOptions.directivesWillOutputMdContainers.push(TAB_CONTAINER_DIRECTIVE)\n    },\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getCodeTabInfo(node: RstDirective) {\n    const origLabel = node.initContentText\n    const idxOfFirstSpace = origLabel.indexOf(' ')\n    const languageCandidate = idxOfFirstSpace >= 0\n        ? origLabel.substring(0, idxOfFirstSpace)\n        : origLabel\n\n    for (const languageInfo of bundledLanguagesInfo) {\n        if (languageInfo.id === languageCandidate || languageInfo.aliases?.includes(languageCandidate)) {\n            return {\n                language: languageCandidate,\n                label: idxOfFirstSpace >= 0\n                    ? origLabel.substring(idxOfFirstSpace + 1)\n                    : languageInfo.name,\n            }\n        }\n    }\n\n    return {\n        language: 'txt',\n        label: origLabel,\n    }\n}\n\nfunction getTabsClientScript() {\n    let output = `\n<script type=\"text/javascript\">\n(() => {\n${browserCode}\n})()\n</script>\n    `\n\n    for (const [origText, replacement] of Object.entries(TabsClientConstant)) {\n        output = output.replaceAll(origText, replacement)\n    }\n\n    return output\n}\n","import { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { parseEmbededRef } from '../../utils/parseEmbededRef.ts'\nimport { RstNode } from '../../RstNode/RstNode.ts'\nimport { type SimpleName, normalizeSimpleName } from '../../SimpleName.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nconst TOCTREE_DIRECTIVE = 'toctree'\n\nexport const tocTreeDirectiveGenerators = createDirectiveGenerators(\n    [\n        TOCTREE_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        if (node.config?.hasField('hidden')) {\n            generatorState.writeLineHtmlComment(node.toShortString())\n            return\n        }\n\n        generatorState.writeLineHtmlTagWithAttr('ul', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.tocTree }), () => {\n            const lines = node.rawBodyText.split('\\n')\n            for (const line of lines) {\n                if (!line) {\n                    continue\n                }\n\n                generatorState.writeLineHtmlTag('li', null, () => {\n                    const { label, target } = parseEmbededRef(line)\n                    const { externalUrl, externalLabel } = generatorState.resolveExternalDoc(node, target)\n                    const displayLabel = (label === target)\n                        ? externalLabel ?? label\n                        : label\n\n                    generatorState.writeLine(`<a href=\"${externalUrl}\">${displayLabel}</a>`)\n                })\n            }\n        })\n    },\n\n    (generatorState, node) => {\n        if (node.config?.hasField('hidden')) {\n            generatorState.writeLineMdComment(node.toShortString())\n            return\n        }\n\n        const lines = node.rawBodyText.split('\\n')\n        for (const line of lines) {\n            if (!line) {\n                continue\n            }\n\n            generatorState.usePrefix({\n                val: '* ',\n                replacementAfterOnce: '  ',\n            }, () => {\n                const { label, target } = parseEmbededRef(line)\n                const { externalUrl, externalLabel } = generatorState.resolveExternalDoc(node, target)\n                const displayLabel = (label === target)\n                    ? externalLabel ?? label\n                    : label\n\n                generatorState.writeLine(`[${displayLabel}](${externalUrl})`)\n            })\n        }\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const tocTreeDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        tocTreeDirectiveGenerators,\n    ],\n\n    getSimpleName: getTocTreeDirectiveSimpleName,\n\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithRawText.push(TOCTREE_DIRECTIVE)\n    },\n\n    onParse: (parserOutput) => {\n        const directives = parserOutput.root.findAllChildren('Directive')\n        const tocTreeDirectives = directives.filter((node) => node.directive === TOCTREE_DIRECTIVE)\n\n        for (const tocTreeNode of tocTreeDirectives) {\n            if (tocTreeNode.config?.hasField('hidden')) {\n                continue\n            }\n\n            const simpleName = getTocTreeDirectiveSimpleName(tocTreeNode)\n            if (!simpleName) {\n                continue\n            }\n\n            parserOutput.simpleNameResolver.registerExplicitNode(tocTreeNode, simpleName)\n            parserOutput.simpleNameResolver.registerNodeAsLinkable(tocTreeNode, simpleName, true)\n        }\n    },\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getTocTreeDirectiveSimpleName(node: RstNode): SimpleName | null {\n    if (!(node instanceof RstDirective)) {\n        return null\n    }\n\n    if (node.directive !== TOCTREE_DIRECTIVE) {\n        return null\n    }\n\n    const name = node.config?.getField('name')\n    if (!name) {\n        return null\n    }\n\n    return normalizeSimpleName(name)\n}\n","import { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nconst CENTERED_DIRECTIVE = 'centered'\n\nexport const centeredDirectiveGenerators = createDirectiveGenerators(\n    [\n        CENTERED_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('div', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.directiveCentered }), () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const centeredDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        centeredDirectiveGenerators,\n    ],\n})\n","import { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nexport const htmlClassDirectiveGenerators = createDirectiveGenerators(\n    [\n        'class',\n        'rst-class',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlComment(node.toShortString())\n        if (node.children.length > 0) {\n            generatorState.writeLine()\n            generatorState.visitNodes(node.children)\n        }\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLineMdComment(node.toShortString())\n        if (node.children.length > 0) {\n            generatorState.writeLine()\n            generatorState.visitNodes(node.children)\n        }\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const htmlClassDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        htmlClassDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        for (const directive of htmlClassDirectiveGenerators.directives) {\n            parserOption.directivesWithInitContent.push(directive)\n            parserOption.directivesWithInvisibleContent.push(directive)\n        }\n    },\n\n    onParse: (parserOutput) => {\n        const directiveNodes = parserOutput.root.findAllChildren('Directive')\n\n        for (const directiveNode of directiveNodes) {\n            if (!htmlClassDirectiveGenerators.directives.includes(directiveNode.directive)) {\n                continue\n            }\n\n            const targetNodes = (() => {\n                if (directiveNode.children.length > 0) {\n                    // Apply class to child nodes if they exist\n                    return directiveNode.children\n                } else {\n                    // Apply class to next rendered node in tree if any\n                    let targetNode = directiveNode.getNextNodeInTree()\n                    while (targetNode !== null) {\n                        if (targetNode.willRenderVisibleContent) {\n                            break\n                        }\n\n                        targetNode = targetNode.getNextNodeInTree()\n                    }\n\n                    if (!targetNode) {\n                        return []\n                    }\n\n                    return [targetNode]\n                }\n            })()\n\n            for (const targetNode of targetNodes) {\n                parserOutput.htmlAttrResolver.registerNodeWithClass(targetNode, directiveNode)\n            }\n        }\n    },\n})\n","import { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstSubstitutionDef } from '../../RstNode/ExplicitMarkup/SubstitutionDef.ts'\nimport { urlRe, filePathRe } from '../../utils/parseEmbededRef.ts'\n\nexport function getImageInfo(generatorState: RstGeneratorState, node: RstDirective | RstSubstitutionDef) {\n    let needHtmlTag = false\n    const attrs = new HtmlAttributeStore()\n    attrs.set('src', node.initContentText)\n\n    for (const attrKey of ['alt', 'width', 'height', 'loading', 'class'] as const) {\n        const attrValue = node.config?.getField(attrKey)\n        if (!attrValue) {\n            continue\n        }\n\n        needHtmlTag ||= (attrKey !== 'alt')\n        attrs.set(attrKey, attrValue)\n    }\n\n    // If this <img> should be inside an <a> tag\n    const targetUrl = (() => {\n        const target = node.config?.getField('target')\n        if (!target) {\n            return null\n        }\n\n        if (urlRe.test(target) || filePathRe.test(target)) {\n            return target\n        }\n\n        return generatorState.resolveNodeToUrl(node)\n    })()\n\n    return {\n        attrs,\n        targetUrl,\n        needHtmlTag,\n    }\n}\n","import { getImageInfo } from './getImageInfo.ts'\n\nexport function createImgTagHtml(imgInfo: ReturnType<typeof getImageInfo>): string {\n    const { attrs, targetUrl } = imgInfo\n    const imgTag = `<img${attrs.toString()} />`\n\n    if (imgInfo.targetUrl) {\n        return `<a href=\"${targetUrl}\">${imgTag}</a>`\n    } else {\n        return imgTag\n    }\n}\n","import { createImgTagHtml } from './createImgTagHtml.ts'\nimport { getImageInfo } from './getImageInfo.ts'\n\nexport function createImgTagMd(imgInfo: ReturnType<typeof getImageInfo>): string {\n    const { needHtmlTag, attrs, targetUrl } = imgInfo\n    if (needHtmlTag) {\n        return createImgTagHtml(imgInfo)\n    }\n\n    const alt = attrs.get('alt')\n    const src = attrs.get('src')\n    const imgTag = `![${alt}](${src})`\n\n    if (targetUrl) {\n        return `[${imgTag}](${targetUrl})`\n    } else {\n        return imgTag\n    }\n}\n","import { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { getImageInfo } from './getImageInfo.ts'\nimport { createImgTagMd } from './createImgTagMd.ts'\nimport { createImgTagHtml } from './createImgTagHtml.ts'\nimport { RstGeneratorError } from '../../Generator/RstGeneratorError.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nexport const imageDirectiveGenerators = createDirectiveGenerators(\n    [\n        'image',\n        'figure',\n    ],\n\n    (generatorState, node) => {\n        const imgInfo = getImageInfo(generatorState, node)\n        const imgTag = createImgTagHtml(imgInfo)\n\n        switch (node.directive) {\n            case 'image': {\n                generatorState.writeLine(imgTag)\n                break\n            }\n\n            case 'figure': {\n                generatorState.writeLineHtmlTag('figure', node, () => {\n                    generatorState.writeLine(imgTag)\n                    if (node.children.length > 0) {\n                        generatorState.writeLine()\n                        generatorState.visitNodes(node.children)\n                    }\n                })\n                break\n            }\n\n            default: {\n                throw new RstGeneratorError(generatorState, node, `Unhandled directive:\"${node.directive}\"`)\n            }\n        }\n    },\n\n    (generatorState, node) => {\n        const imgInfo = getImageInfo(generatorState, node)\n        const imgTag = createImgTagMd(imgInfo)\n\n        generatorState.writeLine(imgTag)\n        if (node.children.length > 0) {\n            generatorState.writeLine()\n            generatorState.visitNodes(node.children)\n        }\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const imageDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        imageDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        for (const directive of imageDirectiveGenerators.directives) {\n            parserOption.directivesWithInitContent.push(directive)\n        }\n    },\n})\n","import { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstFieldListItem } from '../../RstNode/List/FieldListItem.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nexport const metaDirectiveGenerators = createDirectiveGenerators(\n    [\n        'meta',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlComment(node.toShortString())\n\n        const metaInfos = getMetaInfo(node)\n        if (metaInfos.length === 0) {\n            return\n        }\n\n        const headerKey = `meta-${node.id}`\n        let headerText = ''\n\n        for (const metaInfo of metaInfos) {\n            headerText += '<meta'\n\n            for (const [attrKey, attrVal] of metaInfo.entries()) {\n                headerText += ` ${attrKey}=\"${attrVal ?? ''}\"`\n            }\n\n            headerText += '>\\n'\n        }\n\n        generatorState.registerGlobalHeader(headerKey, headerText)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLineMdComment(node.toShortString())\n\n        const metaInfos = getMetaInfo(node)\n        if (metaInfos.length === 0) {\n            return\n        }\n\n        const headerKey = `meta-${node.id}`\n        let headerText = ''\n\n        headerText += '---\\n'\n        headerText += 'head:\\n'\n\n        for (const metaInfo of metaInfos) {\n            headerText += '  - - meta\\n'\n\n            let isFirst = true\n            for (const [attrKey, attrVal] of metaInfo.entries()) {\n                if (isFirst) {\n                    headerText += `    - ${attrKey}:`\n                    isFirst = false\n                } else {\n                    headerText += `      ${attrKey}:`\n                }\n\n                if (attrVal) {\n                    headerText += ` ${attrVal}`\n                }\n\n                headerText += '\\n'\n            }\n        }\n\n        headerText += '---\\n'\n\n        generatorState.registerGlobalHeader(headerKey, headerText)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const metaDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        metaDirectiveGenerators,\n    ],\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getMetaInfo(directiveNode: RstDirective) {\n    const metaInfos = new Array<Map<string, string | null>>()\n\n    for (const fieldListItem of directiveNode.config?.children ?? []) {\n        if (!(fieldListItem instanceof RstFieldListItem)) {\n            continue\n        }\n\n        const metaTagAttrs = new Map<string, string | null>()\n        metaInfos.push(metaTagAttrs)\n\n        const nameText = fieldListItem.nameText\n        const metaNameEndIdx = nameText.search(' ') // Where the string of \"name\" attr of <meta> ends\n        if (metaNameEndIdx >= 0) {\n            // Additional attributes after first space\n            metaTagAttrs.set('name', nameText.substring(0, metaNameEndIdx))\n        } else if (!nameText.includes('=')) {\n            // No additional attributes and no space in nameText so entire nameText is just the <meta> name attr\n            metaTagAttrs.set('name', nameText)\n        }\n\n        if (nameText.includes('=')) {\n            const attrRe = /(?: |^)(?<key>[\\w-]+)(?:=(?<val>[\\w-]+))?/g\n            attrRe.lastIndex = metaNameEndIdx // Search nameText after where name attr ends\n\n            while (attrRe.lastIndex < nameText.length) {\n                const attrMatch = attrRe.exec(nameText)\n                const key = attrMatch?.groups?.key\n                if (!key) {\n                    break\n                }\n\n                const val = attrMatch?.groups?.val ?? null\n                metaTagAttrs.set(key, val)\n            }\n        }\n\n        const contentText = fieldListItem.bodyText\n        if (contentText) {\n            metaTagAttrs.set('content', contentText)\n        }\n    }\n\n    return metaInfos\n}\n","export function parseCsv(csvText?: string | null): Array<Array<string>> {\n    if (!csvText) {\n        return []\n    }\n\n    const rows = new Array<Array<string>>()\n\n    let columns = new Array<string>()\n    let columnText = ''\n    let isInQuote = false\n\n    const addRow = () => {\n        rows.push(columns)\n        columns = []\n    }\n    const addColumn = () => {\n        columns.push(columnText.trim())\n        columnText = ''\n    }\n\n    for (let i = 0; i < csvText.length; i++) {\n        const curr = csvText[i]\n        const next: string | undefined = csvText[i + 1]\n\n        if (curr === '\\n' && !isInQuote) {\n            addColumn() // Ends current column and row\n            addRow()\n            continue\n        }\n\n        if (curr === ',' && !isInQuote) {\n            addColumn() // Ends current column\n            continue\n        }\n\n        // Double quotes inside quote is treated as single literal quote\n        if (curr === '\"' && next === '\"' && isInQuote) {\n            columnText += '\"'\n            i += 1 // Skip second quote char\n            continue\n        }\n\n        if (curr === '\"') {\n            isInQuote = !isInQuote\n            continue\n        }\n\n        columnText += curr\n    }\n\n    addColumn()\n    addRow()\n\n    return rows\n}\n","import { RstParagraph } from '../../RstNode/Block/Paragraph.ts'\nimport type { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstNode } from '../../RstNode/RstNode.ts'\nimport { assertNode } from '../../utils/assertNode.ts'\nimport { parseCsv } from '../../utils/parseCsv.ts'\nimport { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\nimport { RstGeneratorError } from '../RstGeneratorError.ts'\nimport type { RstGeneratorState } from '../RstGeneratorState.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Table\n// ----------------------------------------------------------------------------\n\nexport const tableGenerators = createNodeGenerators<'Table', [RstDirective?]>(\n    'Table',\n\n    (generatorState, node, directiveNode) => {\n        const tableAlign = directiveNode?.config?.getField('align') ?? null\n        const tableWidth = directiveNode?.config?.getField('width') ?? null\n        const colWidths = getColWidths(generatorState, directiveNode, true)\n\n        const tableAttrs = new HtmlAttributeStore()\n        if (tableWidth) {\n            tableAttrs.set('style', getCssWidth(tableWidth))\n        }\n\n        generatorState.useNoLineBreaksBetweenBlocks(() => {\n            generatorState.writeLineHtmlTagWithAttr('table', node, tableAttrs, () => {\n                if (directiveNode?.initContent) {\n                    generatorState.writeLineHtmlTag('caption', null, () => {\n                        generatorState.visitNodes(directiveNode.initContent)\n                    })\n                }\n\n                if (node.headRows.length > 0) {\n                    generatorState.writeLineHtmlTag('thead', null, () => {\n                        generateTableRows(generatorState, node.headRows, 'th', colWidths, tableAlign)\n                    })\n                }\n\n                if (node.bodyRows.length > 0) {\n                    generatorState.writeLineHtmlTag('tbody', null, () => {\n                        generateTableRows(generatorState, node.bodyRows, 'td', colWidths, tableAlign)\n                    })\n                }\n            })\n        })\n    },\n\n    (generatorState, node, directiveNode) => {\n        if (directiveNode || node.isComplexTable) {\n            generatorState.useForcedHtmlMode(() => {\n                tableGenerators.htmlGenerator.generate(generatorState, node, directiveNode)\n            })\n        } else {\n            generatorState.useNoLineBreaksBetweenBlocks(() => {\n                generatorState.visitNodes(node.children)\n            })\n        }\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: ListTable\n// ----------------------------------------------------------------------------\n\nexport const listTableGenerators = createNodeGenerators<'BulletList', [RstDirective]>(\n    'BulletList',\n\n    (generatorState, node, directiveNode) => {\n        const numHeadRows = parseInt(directiveNode.config?.getField('header-rows') ?? '0')\n        const tableAlign = directiveNode.config?.getField('align') ?? null\n        const tableWidth = directiveNode.config?.getField('width') ?? null\n        const colWidths = getColWidths(generatorState, directiveNode, false)\n\n        const headRows = node.children.slice(0, numHeadRows)\n        const bodyRows = node.children.slice(numHeadRows)\n\n        const tableAttrs = new HtmlAttributeStore()\n        if (tableWidth) {\n            tableAttrs.set('style', getCssWidth(tableWidth))\n        }\n\n        generatorState.useNoLineBreaksBetweenBlocks(() => {\n            generatorState.writeLineHtmlTagWithAttr('table', node, tableAttrs, () => {\n                if (directiveNode.initContent.length > 0) {\n                    generatorState.writeLineHtmlTag('caption', null, () => {\n                        generatorState.visitNodes(directiveNode.initContent)\n                    })\n                }\n\n                if (headRows.length > 0) {\n                    generatorState.writeLineHtmlTag('thead', null, () => {\n                        generateListTableRows(generatorState, headRows, 'th', colWidths, tableAlign)\n                    })\n                }\n\n                if (bodyRows.length > 0) {\n                    generatorState.writeLineHtmlTag('tbody', null, () => {\n                        generateListTableRows(generatorState, bodyRows, 'td', colWidths, tableAlign)\n                    })\n                }\n            })\n        })\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: CsvTable\n// ----------------------------------------------------------------------------\n\nexport const csvTableGenerators = createNodeGenerators<'Paragraph', [RstDirective]>(\n    'Paragraph',\n\n    (generatorState, node, directiveNode) => {\n        const numHeadRows = parseInt(directiveNode.config?.getField('header-rows') ?? '0')\n        const tableAlign = directiveNode.config?.getField('align') ?? null\n        const tableWidth = directiveNode.config?.getField('width') ?? null\n        const colWidths = getColWidths(generatorState, directiveNode, false)\n\n        const explicitHeaderRows = parseCsv(directiveNode.config?.getField('header'))\n        const csvRows = parseCsv(node.rawTextContent)\n        const headRows = csvRows.slice(0, numHeadRows)\n        const bodyRows = csvRows.slice(numHeadRows)\n        const numColumns = Math.max(...csvRows.map((row) => row.length), explicitHeaderRows?.length ?? 0)\n\n        const tableAttrs = new HtmlAttributeStore()\n        if (tableWidth) {\n            tableAttrs.set('style', getCssWidth(tableWidth))\n        }\n\n        generatorState.useNoLineBreaksBetweenBlocks(() => {\n            generatorState.writeLineHtmlTagWithAttr('table', node, tableAttrs, () => {\n                if (directiveNode.initContent.length > 0) {\n                    generatorState.writeLineHtmlTag('caption', null, () => {\n                        generatorState.visitNodes(directiveNode.initContent)\n                    })\n                }\n\n                if (explicitHeaderRows.length > 0 || headRows.length > 0) {\n                    generatorState.writeLineHtmlTag('thead', null, () => {\n                        for (const headRow of explicitHeaderRows) {\n                            generateCsvTableRow(generatorState, headRow, numColumns, 'th', colWidths, tableAlign)\n                        }\n                        for (const headRow of headRows) {\n                            generateCsvTableRow(generatorState, headRow, numColumns, 'th', colWidths, tableAlign)\n                        }\n                    })\n                }\n\n                if (bodyRows.length > 0) {\n                    generatorState.writeLineHtmlTag('tbody', null, () => {\n                        for (const bodyRow of bodyRows) {\n                            generateCsvTableRow(generatorState, bodyRow, numColumns, 'td', colWidths, tableAlign)\n                        }\n                    })\n                }\n            })\n        })\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: TableRow\n// ----------------------------------------------------------------------------\n\nexport const tableRowGenerators = createNodeGenerators(\n    'TableRow',\n\n    (generatorState, node) => {\n        throw new RstGeneratorError(generatorState, node, 'This should not be called directly')\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLineVisitor(() => {\n            for (const cell of node.children) {\n                generatorState.writeText('|')\n                generatorState.visitNode(cell)\n            }\n\n            generatorState.writeText('|')\n        })\n\n        // Markdown requires header separator to be printed after first row to parse as table\n        if (node.getMyIndexInParent() === 0) {\n            generatorState.writeLineVisitor(() => {\n                for (let i = 0; i < node.children.length; i++) {\n                    generatorState.writeText('|')\n                    generatorState.writeText(' --- ')\n                }\n\n                generatorState.writeText('|')\n            })\n        }\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: TableCell\n// ----------------------------------------------------------------------------\n\nexport const tableCellGenerators = createNodeGenerators(\n    'TableCell',\n\n    (generatorState, node) => {\n        throw new RstGeneratorError(generatorState, node, 'This should not be called directly')\n    },\n\n    (generatorState, node) => {\n        const cellText = generatorState.getChildrenText(() => {\n            for (let i = 0; i < node.children.length; i++) {\n                const child = node.children[i]\n                if (!(child instanceof RstParagraph)) {\n                    throw new RstGeneratorError(generatorState, 'Cannot render non-paragraphs in Markdown tables')\n                }\n                if (i > 0) {\n                    generatorState.writeText('<br>')\n                }\n\n                generatorState.visitNodes(child.children)\n            }\n        })\n\n        generatorState.writeText(` ${cellText.replaceAll('\\n', ' ')} `)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getCssWidth(str: string): string {\n    const numVal = parseInt(str)\n    if (isNaN(numVal)) {\n        return `width:${str};`\n    } else {\n        return `width:${numVal}%;`\n    }\n}\n\nfunction getColWidths(generatorState: RstGeneratorState, directiveNode: RstDirective | undefined, allowGridValue: boolean): Array<string> {\n    const rawWidths = directiveNode?.config?.getField('widths')\n    if (!rawWidths || rawWidths === 'auto') {\n        return []\n    }\n\n    if (allowGridValue && rawWidths === 'grid') {\n        const table = directiveNode?.children.at(0)\n        assertNode(generatorState, table, 'Table')\n\n        let totalWidth = 0\n        const cellWidths = new Array<number>()\n\n        for (const cell of table.children[0].children) {\n            assertNode(generatorState, cell, 'TableCell')\n\n            totalWidth += cell.characterWidth\n            cellWidths.push(cell.characterWidth)\n        }\n\n        return cellWidths.map((width) => (width / totalWidth * 100).toString())\n    }\n\n    return rawWidths.split(' ')\n}\n\nfunction generateTableRows(generatorState: RstGeneratorState, rowNodes: ReadonlyArray<RstNode>, cellTag: 'th' | 'td', colWidths: Array<string>, tableAlign: string | null): void {\n    for (const rowNode of rowNodes) {\n        assertNode(generatorState, rowNode, 'TableRow')\n\n        generatorState.writeLineHtmlTag('tr', rowNode, () => {\n            for (const [idx, cellNode] of rowNode.children.entries()) {\n                assertNode(generatorState, cellNode, 'TableCell')\n\n                const attrs = new HtmlAttributeStore()\n\n                if (cellNode.rowSpan > 1) {\n                    attrs.set('rowspan', cellNode.rowSpan.toString())\n                }\n                if (cellNode.colSpan > 1) {\n                    attrs.set('colspan', cellNode.colSpan.toString())\n                }\n                if (colWidths.length > 0) {\n                    attrs.append('style', getCssWidth(colWidths[idx]))\n                }\n                if (tableAlign) {\n                    attrs.append('style', `text-align:${tableAlign};`)\n                }\n\n                generatorState.writeLineHtmlTagWithAttr(cellTag, cellNode, attrs, () => {\n                    generatorState.visitNodes(cellNode.children)\n                })\n            }\n        })\n    }\n}\n\nfunction generateListTableRows(generatorState: RstGeneratorState, rowNodes: ReadonlyArray<RstNode>, cellTag: 'th' | 'td', colWidths: Array<string>, tableAlign: string | null): void {\n    for (const rowNode of rowNodes) {\n        assertNode(generatorState, rowNode, 'BulletListItem', 1)\n\n        const colList = rowNode.children[0]\n        assertNode(generatorState, colList, 'BulletList')\n\n        if (colWidths.length > 0 && colList.children.length !== colWidths.length) {\n            throw new RstGeneratorError(generatorState, `Expected ${colList.children.length} widths but only got ${colWidths.length}`)\n        }\n\n        generatorState.writeLineHtmlTag('tr', colList, () => {\n            for (const [idx, cellNode] of colList.children.entries()) {\n                const attrs = new HtmlAttributeStore()\n                if (colWidths.length > 0) {\n                    attrs.append('style', getCssWidth(colWidths[idx]))\n                }\n                if (tableAlign) {\n                    attrs.append('style', `text-align:${tableAlign};`)\n                }\n\n                generatorState.writeLineHtmlTagWithAttr(cellTag, cellNode, attrs, () => {\n                    generatorState.visitNodes(cellNode.children)\n                })\n            }\n        })\n    }\n}\n\nfunction generateCsvTableRow(generatorState: RstGeneratorState, columns: Array<string>, numColumns: number, cellTag: 'th' | 'td', colWidths: Array<string>, tableAlign: string | null): void {\n    for (let i = columns.length; i < numColumns; i++) {\n        columns.push('')\n    }\n\n    generatorState.writeLineHtmlTag('tr', null, () => {\n        for (let idx = 0; idx < columns.length; idx++) {\n            const attrs = new HtmlAttributeStore()\n            if (colWidths.length > 0) {\n                attrs.append('style', getCssWidth(colWidths[idx]))\n            }\n            if (tableAlign) {\n                attrs.append('style', `text-align:${tableAlign};`)\n            }\n\n            generatorState.writeLineHtmlTagWithAttr(cellTag, null, attrs, () => {\n                generatorState.writeLine(columns[idx])\n            })\n        }\n    })\n}\n","import { tableGenerators, listTableGenerators, csvTableGenerators } from '../../Generator/NodeGenerators/tableGenerators.ts'\nimport { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { RstParagraph } from '../../RstNode/Block/Paragraph.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstBulletList } from '../../RstNode/List/BulletList.ts'\nimport { RstTable } from '../../RstNode/Table/Table.ts'\nimport { assertNode } from '../../utils/assertNode.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nconst TABLE_DIRECTIVE = 'table'\n\nexport const tableDirectiveGenerators = createDirectiveGenerators(\n    [\n        TABLE_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const table = getTableNode(generatorState, node)\n        tableGenerators.htmlGenerator.generate(generatorState, table, node)\n    },\n\n    (generatorState, node) => {\n        const table = getTableNode(generatorState, node)\n        tableGenerators.mdGenerator.generate(generatorState, table, node)\n    },\n)\n\nconst LIST_TABLE_DIRECTIVE = 'list-table'\n\nexport const listTableDirectiveGenerators = createDirectiveGenerators(\n    [\n        LIST_TABLE_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const list = getListTableNode(generatorState, node)\n        listTableGenerators.htmlGenerator.generate(generatorState, list, node)\n    },\n\n    (generatorState, node) => {\n        const list = getListTableNode(generatorState, node)\n        listTableGenerators.mdGenerator.generate(generatorState, list, node)\n    },\n)\n\nconst CSV_TABLE_DIRECTIVE = 'csv-table'\n\nexport const csvTableDirectiveGenerators = createDirectiveGenerators(\n    [\n        CSV_TABLE_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const paragraph = getCsvTableNode(generatorState, node)\n        csvTableGenerators.htmlGenerator.generate(generatorState, paragraph, node)\n    },\n\n    (generatorState, node) => {\n        const paragraph = getCsvTableNode(generatorState, node)\n        csvTableGenerators.mdGenerator.generate(generatorState, paragraph, node)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const tableDirectivePlugin = createRstCompilerPlugins({\n    directiveGenerators: [\n        tableDirectiveGenerators,\n        listTableDirectiveGenerators,\n        csvTableDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithInitContent.push(TABLE_DIRECTIVE)\n        parserOption.directivesWithInitContent.push(LIST_TABLE_DIRECTIVE)\n        parserOption.directivesWithInitContent.push(CSV_TABLE_DIRECTIVE)\n    },\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getTableNode(generatorState: RstGeneratorState, directiveNode: RstDirective): RstTable {\n    assertNode(generatorState, directiveNode, 'Directive', 1)\n\n    const table = directiveNode.children[0]\n    assertNode(generatorState, table, 'Table')\n\n    return table\n}\n\nfunction getListTableNode(generatorState: RstGeneratorState, directiveNode: RstDirective): RstBulletList {\n    assertNode(generatorState, directiveNode, 'Directive', 1)\n\n    const list = directiveNode.children[0]\n    assertNode(generatorState, list, 'BulletList')\n\n    return list\n}\n\nfunction getCsvTableNode(generatorState: RstGeneratorState, directiveNode: RstDirective): RstParagraph {\n    assertNode(generatorState, directiveNode, 'Directive', 1)\n\n    const paragraph = directiveNode.children[0]\n    assertNode(generatorState, paragraph, 'Paragraph')\n\n    return paragraph\n}\n","import { createDirectiveGenerators, createInterpretedTextGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nexport const rawDirectiveGenerators = createDirectiveGenerators(\n    [\n        'raw',\n    ],\n\n    (generatorState, node) => {\n        if (node.initContentText !== 'html') {\n            return\n        }\n\n        generatorState.writeLine(node.rawBodyText)\n    },\n\n    (generatorState, node) => {\n        if (!['html', 'md', 'markdown'].includes(node.initContentText)) {\n            return\n        }\n\n        generatorState.writeLine(node.rawBodyText)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: InterpretedText\n// ----------------------------------------------------------------------------\n\nexport const rawInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'raw',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(node.rawTextContent)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(node.rawTextContent)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const rawTextPlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        rawDirectiveGenerators,\n    ],\n\n    interpretedTextGenerators: [\n        rawInterpretedTextGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        for (const directive of rawDirectiveGenerators.directives) {\n            parserOption.directivesWithRawText.push(directive)\n            parserOption.directivesWithInitContent.push(directive)\n        }\n    },\n})\n","import { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\nimport { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { RstGeneratorError } from '../../Generator/RstGeneratorError.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nexport const videoDirectiveGenerators = createDirectiveGenerators(\n    [\n        'video',\n    ],\n\n    (generatorState, node) => {\n        const altText = node.config?.getField('alt')\n        const htmlClass = node.config?.getField('class')\n        const preloadSetting = node.config?.getField('preload')\n\n        const enableMute = node.config?.hasField('muted')\n        const enableControls = !node.config?.hasField('nocontrols')\n        const enableAutoPlay = node.config?.hasField('autoplay')\n        const enableLoop = node.config?.hasField('loop')\n\n        const videoAttrs = new HtmlAttributeStore()\n        if (htmlClass) {\n            videoAttrs.set('class', htmlClass)\n        }\n        if (preloadSetting) {\n            videoAttrs.set('preload', preloadSetting)\n        }\n        if (enableMute) {\n            videoAttrs.set('muted', 'true')\n        }\n        if (enableControls) {\n            videoAttrs.set('controls', 'true')\n        }\n        if (enableAutoPlay) {\n            videoAttrs.set('autoplay', 'true')\n        }\n        if (enableLoop) {\n            videoAttrs.set('loop', 'true')\n        }\n\n        generatorState.writeLineHtmlTagWithAttr('video', node, videoAttrs, () => {\n            const videoUrl = node.initContentText\n            const videoExt = /\\.(?<videoExt>\\w+)/.exec(videoUrl)?.groups?.videoExt\n            if (!videoExt) {\n                throw new RstGeneratorError(generatorState, node, 'Failed to get video extension')\n            }\n\n            const sourceAttrs = new HtmlAttributeStore()\n            sourceAttrs.set('src', videoUrl)\n            sourceAttrs.set('type', `video/${videoExt}`)\n\n            generatorState.writeLineHtmlTagWithAttr('source', null, sourceAttrs)\n\n            if (altText) {\n                generatorState.writeLineHtmlTag('p', null, () => {\n                    generatorState.writeLine(altText)\n                })\n            }\n        })\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const videoDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        videoDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        for (const directive of videoDirectiveGenerators.directives) {\n            parserOption.directivesWithInitContent.push(directive)\n        }\n    },\n})\n","import { createInterpretedTextGenerators } from '../../Generator/RstGenerator.ts'\nimport { RstGeneratorError } from '../../Generator/RstGeneratorError.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { RstInterpretedText } from '../../RstNode/Inline/InterpretedText.ts'\n\nconst pepRe = /^(?<pep>\\d+)$/\nconst rfcRe = /^(?<rfc>\\d+)(?<anchor>#.+)?$/\n\n// ----------------------------------------------------------------------------\n// MARK: InterpretedText\n// ----------------------------------------------------------------------------\n\nexport const pepInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'pep-reference',\n        'PEP',\n    ],\n\n    (generatorState, node) => {\n        const { label, url } = getPepInfo(generatorState, node)\n        generatorState.writeTextWithLinePrefix(`<a href=\"${url}\">${label}</a>`)\n    },\n\n    (generatorState, node) => {\n        const { label, url } = getPepInfo(generatorState, node)\n        generatorState.writeTextWithLinePrefix(`[${label}](${url})`)\n    },\n)\n\nexport const rfcInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'rfc-reference',\n        'RFC',\n    ],\n\n    (generatorState, node) => {\n        const { label, url } = getRfcInfo(generatorState, node)\n        generatorState.writeTextWithLinePrefix(`<a href=\"${url}\">${label}</a>`)\n    },\n\n    (generatorState, node) => {\n        const { label, url } = getRfcInfo(generatorState, node)\n        generatorState.writeTextWithLinePrefix(`[${label}](${url})`)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const pepRfcInterpretedTextPlugins = createRstCompilerPlugins({\n    interpretedTextGenerators: [\n        pepInterpretedTextGenerators,\n        rfcInterpretedTextGenerators,\n    ],\n\n    isValidInterpretedText: (rawBodyText, role) => {\n        if (pepInterpretedTextGenerators.roles.includes(role)) {\n            return pepRe.test(rawBodyText)\n        }\n\n        if (rfcInterpretedTextGenerators.roles.includes(role)) {\n            return rfcRe.test(rawBodyText)\n        }\n\n        return null\n    },\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getPepInfo(generatorState: RstGeneratorState, node: RstInterpretedText) {\n    const pep = pepRe.exec(node.textContent)?.groups?.pep\n    if (!pep) {\n        throw new RstGeneratorError(generatorState, 'Invalid PEP')\n    }\n\n    const label = `PEP ${pep}`\n    const url = `https://peps.python.org/pep-${pep.padStart(4, '0')}`\n\n    return {\n        label,\n        url,\n    }\n}\n\nfunction getRfcInfo(generatorState: RstGeneratorState, node: RstInterpretedText) {\n    const match = rfcRe.exec(node.textContent)\n    const rfc = match?.groups?.rfc\n    if (!rfc) {\n        throw new RstGeneratorError(generatorState, 'Invalid RFC')\n    }\n\n    const label = `RFC ${rfc}`\n    const anchor = match?.groups?.anchor\n    const url = anchor\n        ? `https://tools.ietf.org/html/rfc${rfc}.html#${anchor}`\n        : `https://tools.ietf.org/html/rfc${rfc}.html`\n\n    return {\n        label,\n        url,\n    }\n}\n","import { removeEscapeChar } from './removeEscapeChar.ts'\n\nconst abbrRe = new RegExp('' +\n    '^' +\n        '(?<shortForm>(?:.|\\n)+?)' +\n        '(\\\\s?' +\n            '(?<!\\\\\\\\)\\\\(' + // Opening bracket (not preceded by escape slash)\n            '(?<longForm>.+)' +\n            '(?<!\\\\\\\\)\\\\)' + // Closing bracket (not preceded by escape slash)\n        ')?' +\n    '$',\n)\n\nexport function parseAbbr(rawText: string) {\n    const abbrMatch = abbrRe.exec(rawText)\n    const rawShortForm = abbrMatch?.groups?.shortForm ?? rawText\n    const rawLongForm = abbrMatch?.groups?.longForm ?? ''\n\n    const shortForm = removeEscapeChar(rawShortForm)\n    const longForm = removeEscapeChar(rawLongForm)\n\n    return {\n        shortForm,\n        longForm,\n    }\n}\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { parseAbbr } from '../../../utils/parseAbbr.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const abbreviationInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'abbreviation',\n        'abbr',\n        'ab',\n    ],\n\n    (generatorState, node) => {\n        const abbr = parseAbbr(node.rawTextContent)\n        if (abbr.longForm) {\n            generatorState.writeTextWithLinePrefix(`<abbr title=\"${sanitizeHtml(abbr.longForm)}\">${sanitizeHtml(abbr.shortForm)}</abbr>`)\n        } else {\n            generatorState.writeTextWithLinePrefix(`<abbr>${sanitizeHtml(abbr.shortForm)}</abbr>`)\n        }\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const acronymInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'acronym',\n        'ac',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<abbr>${sanitizeHtml(node.textContent)}</abbr>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`*${sanitizeHtml(node.textContent)}*`)\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { parseEmbededRef } from '../../../utils/parseEmbededRef.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const docInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'doc',\n    ],\n\n    (generatorState, node) => {\n        const { label, target } = parseEmbededRef(node.rawTextContent)\n        const { externalUrl, externalLabel } = generatorState.resolveExternalDoc(node, target)\n        const displayLabel = (label === target)\n            ? externalLabel ?? label\n            : label\n\n        generatorState.writeTextWithLinePrefix(`<a href=\"${externalUrl}\">${sanitizeHtml(displayLabel)}</a>`)\n    },\n\n    (generatorState, node) => {\n        const { label, target } = parseEmbededRef(node.rawTextContent)\n        const { externalUrl, externalLabel } = generatorState.resolveExternalDoc(node, target)\n        const displayLabel = (label === target)\n            ? externalLabel ?? label\n            : label\n\n        generatorState.writeTextWithLinePrefix(`[${sanitizeHtml(displayLabel)}](${externalUrl})`)\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { parseEmbededRef } from '../../../utils/parseEmbededRef.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const downloadInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'download',\n    ],\n\n    (generatorState, node) => {\n        const { label, target } = parseEmbededRef(node.rawTextContent)\n        const { downloadDest, fileName } = generatorState.registerDownload(target)\n        generatorState.writeTextWithLinePrefix(`<a href=\"${downloadDest}\" download=\"${fileName}\">${sanitizeHtml(label)}</a>`)\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const emphasisInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'emphasis',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<em>${sanitizeHtml(node.textContent)}</em>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`*${sanitizeHtml(node.textContent)}*`)\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const kbdInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'kbd',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<kbd>${sanitizeHtml(node.textContent)}</kbd>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`\\`${node.textContent}\\``) // Don't sanitize since this is written inside literal text\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const literalInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'literal',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<span class=\"${generatorState.opts.htmlClass.literalInline}\">${sanitizeHtml(node.textContent)}</span>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`\\`${node.textContent}\\``) // Don't sanitize since this is written inside literal text\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\nimport { normalizeSimpleName } from '../../../SimpleName.ts'\nimport { parseEmbededRef } from '../../../utils/parseEmbededRef.ts'\n\nexport const refInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'ref',\n    ],\n\n    (generatorState, node) => {\n        const { label, target } = parseEmbededRef(node.rawTextContent)\n        const simpleName = normalizeSimpleName(target)\n        const { externalUrl, externalLabel } = generatorState.resolveExternalRef(node, simpleName)\n        generatorState.writeTextWithLinePrefix(`<a href=\"${externalUrl}\">${sanitizeHtml(externalLabel ?? label)}</a>`)\n    },\n\n    (generatorState, node) => {\n        const { label, target } = parseEmbededRef(node.rawTextContent)\n        const simpleName = normalizeSimpleName(target)\n        const { externalUrl, externalLabel } = generatorState.resolveExternalRef(node, simpleName)\n        generatorState.writeTextWithLinePrefix(`[${sanitizeHtml(externalLabel ?? label)}](${externalUrl})`)\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const strongInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'strong',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<strong>${sanitizeHtml(node.textContent)}</strong>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`**${sanitizeHtml(node.textContent)}**`)\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const subscriptInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'subscript',\n        'sub',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<sub>${sanitizeHtml(node.textContent)}</sub>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`~${sanitizeHtml(node.textContent)}~`)\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const superscriptInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'superscript',\n        'sup',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<sup>${sanitizeHtml(node.textContent)}</sup>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`^${sanitizeHtml(node.textContent)}^`)\n    },\n)\n","import { createInterpretedTextGenerators } from '../../../Generator/RstGenerator.ts'\nimport { sanitizeHtml } from '../../../utils/sanitizeHtml.ts'\n\nexport const titleRefInterpretedTextGenerators = createInterpretedTextGenerators(\n    [\n        'title-reference',\n        'title',\n        't',\n    ],\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<cite>${sanitizeHtml(node.textContent)}</cite>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`*${sanitizeHtml(node.textContent)}*`)\n    },\n)\n","import { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { abbreviationInterpretedTextGenerators } from './Generators/Abbreviation.ts'\nimport { acronymInterpretedTextGenerators } from './Generators/Acronym.ts'\nimport { docInterpretedTextGenerators } from './Generators/Doc.ts'\nimport { downloadInterpretedTextGenerators } from './Generators/Download.ts'\nimport { emphasisInterpretedTextGenerators } from './Generators/Emphasis.ts'\nimport { kbdInterpretedTextGenerators } from './Generators/Kbd.ts'\nimport { literalInterpretedTextGenerators } from './Generators/Literal.ts'\nimport { refInterpretedTextGenerators } from './Generators/Ref.ts'\nimport { strongInterpretedTextGenerators } from './Generators/Strong.ts'\nimport { subscriptInterpretedTextGenerators } from './Generators/Subscript.ts'\nimport { superscriptInterpretedTextGenerators } from './Generators/Superscript.ts'\nimport { titleRefInterpretedTextGenerators } from './Generators/TitleRef.ts'\n\nexport const interpretedTextPlugins = createRstCompilerPlugins({\n    interpretedTextGenerators: [\n        abbreviationInterpretedTextGenerators,\n        acronymInterpretedTextGenerators,\n        docInterpretedTextGenerators,\n        downloadInterpretedTextGenerators,\n        emphasisInterpretedTextGenerators,\n        kbdInterpretedTextGenerators,\n        literalInterpretedTextGenerators,\n        refInterpretedTextGenerators,\n        strongInterpretedTextGenerators,\n        subscriptInterpretedTextGenerators,\n        superscriptInterpretedTextGenerators,\n        titleRefInterpretedTextGenerators,\n    ],\n})\n","import { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nconst RUBRIC_DIRECTIVE = 'rubric'\n\nexport const rubricDirectiveGenerators = createDirectiveGenerators(\n    [\n        RUBRIC_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const level = getRubricLevel(node)\n\n        generatorState.writeLineHtmlTag(`h${level}`, node, () => {\n            generatorState.writeLineVisitor(() => {\n                generatorState.writeText(node.initContentText)\n            })\n        })\n    },\n\n    (generatorState, node) => {\n        const level = getRubricLevel(node)\n\n        generatorState.writeLineVisitor(() => {\n            generatorState.writeText('#'.repeat(level))\n            generatorState.writeText(' ')\n            generatorState.writeText(node.initContentText)\n        })\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const rubricDirectivePlugin = createRstCompilerPlugins({\n    directiveGenerators: [\n        rubricDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithInitContent.push(RUBRIC_DIRECTIVE)\n    },\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getRubricLevel(directiveNode: RstDirective): number {\n    const levelStr = directiveNode.config?.getField('heading-level')\n    if (!levelStr) {\n        return 1\n    }\n\n    const level = parseInt(levelStr)\n    if (isNaN(level)) {\n        return 1\n    }\n\n    return level\n}\n","import { RstSection } from '../../RstNode/Block/Section.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstNode } from '../../RstNode/RstNode.ts'\n\nexport type TocTree = {\n    section: RstSection\n    children: Array<TocTree>\n}\n\n// ----------------------------------------------------------------------------\n// MARK: Local TOC\n// ----------------------------------------------------------------------------\n\nexport function generateLocalToc(node: RstDirective, maxLevel: number): Array<TocTree> {\n    const prevSection = findPrevSection(node)\n    const localLevel = prevSection?.level\n    const sections = findSubSections(node, localLevel)\n    return groupSectionsToTocTree(sections.filter((section) => section.level <= maxLevel))\n}\n\n// ----------------------------------------------------------------------------\n// MARK: Global TOC\n// ----------------------------------------------------------------------------\n\nexport function generateGlobalToc(node: RstDirective, maxLevel: number): Array<TocTree> {\n    const root = node.getRoot()\n    const sections = root.findAllChildren('Section')\n    return groupSectionsToTocTree(sections.filter((section) => section.level <= maxLevel))\n}\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction findPrevSection(node: RstNode): RstSection | null {\n    let currNode: RstNode | null = node\n\n    while (true) {\n        if (!currNode) {\n            return null\n        }\n        if (currNode.nodeType === 'Section') {\n            return currNode as RstSection\n        }\n\n        currNode = currNode?.getPrevNodeInTree() ?? null\n    }\n}\n\nfunction findSubSections(node: RstNode, localLevel?: number): Array<RstSection> {\n    const foundNodes = new Array<RstSection>()\n\n    let currNode: RstNode | null = node\n    while (currNode) {\n        if (currNode.nodeType === 'Section') {\n            const section = currNode as RstSection\n\n            // Stop searching for more when we find a RstSection equal level to our local RstSection\n            if (localLevel !== undefined && section.level <= localLevel) {\n                break\n            }\n\n            foundNodes.push(section)\n        }\n\n        currNode = currNode.getNextNodeInTree()\n    }\n\n    return foundNodes\n}\n\nfunction groupSectionsToTocTree(sections: ReadonlyArray<RstSection>): Array<TocTree> {\n    if (sections.length === 0) {\n        return []\n    }\n    if (sections.length === 1) {\n        return [\n            {\n                section: sections[0],\n                children: [],\n            },\n        ]\n    }\n\n    const trees = new Array<TocTree>()\n\n    let idx = 0\n    while (idx < sections.length) {\n        const currIdx = idx\n        const currLevel = sections[idx].level\n        idx += 1\n\n        // Advance to next RstSection with equal/lower level than current\n        while (idx < sections.length && sections[idx].level > currLevel) {\n            idx += 1\n        }\n\n        trees.push({\n            section: sections[currIdx],\n            children: groupSectionsToTocTree(sections.slice(currIdx + 1, idx)),\n        })\n    }\n\n    return trees\n}\n","import { createDirectiveGenerators } from '../../Generator/RstGenerator.ts'\nimport { createRstCompilerPlugins } from '../../RstCompilerPlugin.ts'\nimport { generateGlobalToc, generateLocalToc, type TocTree } from './TocTree.ts'\nimport { normalizeSimpleName, type SimpleName } from '../../SimpleName.ts'\nimport { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport { RstNode } from '../../RstNode/RstNode.ts'\nimport type { RstGeneratorState } from '../../Generator/RstGeneratorState.ts'\nimport { HtmlAttributeStore } from '../../Generator/HtmlAttributeStore.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Directive\n// ----------------------------------------------------------------------------\n\nconst CONTENTS_DIRECTIVE = 'contents'\n\nexport const contentsDirectiveGenerators = createDirectiveGenerators(\n    [\n        CONTENTS_DIRECTIVE,\n    ],\n\n    (generatorState, node) => {\n        const maxDepth = parseInt(node.config?.getField('depth') ?? '6')\n        const trees = node.config?.hasField('local')\n            ? generateLocalToc(node, maxDepth)\n            : generateGlobalToc(node, maxDepth)\n\n        if (!node.initContentText && trees.length === 0) {\n            generatorState.writeLineHtmlComment(node.toShortString())\n            return\n        }\n\n        const attrs = new HtmlAttributeStore({ class: 'contents' })\n        const htmlId = generatorState.htmlAttrResolver.getNodeHtmlId(node)\n        if (htmlId) {\n            attrs.set('id', htmlId)\n        }\n\n        generatorState.writeLineHtmlTagWithAttr('div', node, attrs, () => {\n            if (node.initContentText) {\n                generatorState.writeLineHtmlTagWithAttr('p', null, new HtmlAttributeStore({ class: 'title' }), () => {\n                    generatorState.writeLine(node.initContentText)\n                })\n            }\n\n            if (trees.length > 0) {\n                generatorState.writeLineHtmlTag('ul', null, () => {\n                    for (const tree of trees) {\n                        generateHtmlTocTree(generatorState, tree)\n                    }\n                })\n            }\n        })\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Plugin\n// ----------------------------------------------------------------------------\n\nexport const contentsDirectivePlugins = createRstCompilerPlugins({\n    directiveGenerators: [\n        contentsDirectiveGenerators,\n    ],\n\n    onBeforeParse: (parserOption) => {\n        parserOption.directivesWithInitContent.push(CONTENTS_DIRECTIVE)\n    },\n\n    onParse: (parserOutput) => {\n        const directives = parserOutput.root.findAllChildren('Directive')\n        const contentsDirectives = directives.filter((node) => node.directive === CONTENTS_DIRECTIVE)\n\n        for (const directiveNode of contentsDirectives) {\n            const simpleName = getContentsDirectiveSimpleName(directiveNode)\n            if (!simpleName) {\n                continue\n            }\n\n            parserOutput.simpleNameResolver.registerExplicitNode(directiveNode, simpleName)\n            parserOutput.simpleNameResolver.registerNodeAsLinkable(directiveNode, simpleName, true)\n        }\n    },\n})\n\n// ----------------------------------------------------------------------------\n// MARK: Helpers\n// ----------------------------------------------------------------------------\n\nfunction getContentsDirectiveSimpleName(node: RstNode): SimpleName | null {\n    if (!(node instanceof RstDirective)) {\n        return null\n    }\n\n    if (node.directive !== CONTENTS_DIRECTIVE) {\n        return null\n    }\n\n    const name = node.initContentText\n    if (!name) {\n        return null\n    }\n\n    return normalizeSimpleName(name)\n}\n\nfunction generateHtmlTocTree(generatorState: RstGeneratorState, tree: TocTree) {\n    generatorState.writeLineHtmlTag('li', null, () => {\n        generatorState.writeLineHtmlTag('p', null, () => {\n            const url = generatorState.resolveNodeToUrl(tree.section)\n            const attrs = new HtmlAttributeStore({ href: url })\n            generatorState.writeLineHtmlTagWithAttr('a', null, attrs, () => {\n                generatorState.writeLineVisitor(() => {\n                    generatorState.visitNodes(tree.section.children)\n                })\n            })\n        })\n\n        if (tree.children.length > 0) {\n            generatorState.writeLineHtmlTag('ul', null, () => {\n                for (const childTree of tree.children) {\n                    generateHtmlTocTree(generatorState, childTree)\n                }\n            })\n        }\n    })\n}\n","import { RstCitationDef } from '../../RstNode/ExplicitMarkup/CitationDef.ts'\nimport { RstCitationDefGroup } from '../../RstNode/ExplicitMarkup/CitationDefGroup.ts'\nimport { simpleNameReStr } from '../../SimpleName.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nconst citationDefRe = new RegExp(\n    '^ *\\\\.\\\\. +' +\n    '\\\\[' +\n        `(?<label>${simpleNameReStr})` +\n    '\\\\]' +\n    ' +' +\n    '(?<firstLineText>.+)$', // Any char to end of line\n)\n\nexport const citationGroupParser: RstNodeParser<'CitationDefGroup'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        const citationDefs = new Array<RstCitationDef>()\n        while (true) {\n            parserState.consumeAllNewLines()\n\n            const citationDef = parseCitationDef(parserState, indentSize)\n            if (!citationDef) {\n                break\n            }\n\n            citationDefs.push(citationDef)\n        }\n\n        // Failed to parse any bullet list items thus this is not a bullet list\n        if (citationDefs.length === 0) {\n            return null\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstCitationDefGroup(parserState.registrar, { startLineIdx, endLineIdx }, citationDefs)\n    },\n}\n\nfunction parseCitationDef(parserState: RstParserState, indentSize: number): RstCitationDef | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    const firstLineMatches = parserState.peekTest(citationDefRe)\n    if (!firstLineMatches) {\n        return null\n    }\n\n    const rawLabel = firstLineMatches.groups?.label\n    if (!rawLabel) {\n        return null\n    }\n\n    // Consume first line that we've already peeked at and tested\n    parserState.consume()\n\n    const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n    const bodyIndentSize = parserState.peekNestedIndentSize(indentSize)\n    const initContent = parserState.parseInitContent(bodyIndentSize, firstLineText, startLineIdx)\n    const children = parserState.parseBodyNodes(bodyIndentSize, 'CitationDef', initContent)\n\n    const endLineIdx = parserState.lineIdx\n    return new RstCitationDef(parserState.registrar, { startLineIdx, endLineIdx }, children, rawLabel)\n}\n","import { RstDirective } from '../../RstNode/ExplicitMarkup/Directive.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport { fieldListParser } from './fieldListParser.ts'\n\nconst directiveRe = new RegExp(\n    '^ *\\\\.\\\\. +' +\n    '(?<directive>\\\\S+)' +\n    ' ?(?<!\\\\\\\\)::' + // Technically we should not accept the optional space but in practice some docs use it and docutils allows it\n    '(?: (?<firstLineText>.*))?' +\n    '$',\n)\n\nexport const directiveParser: RstNodeParser<'Directive'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!parserState.peekIsIndented(indentSize)) {\n            return null\n        }\n\n        const firstLineMatches = parserState.peekTest(directiveRe)\n        if (!firstLineMatches) {\n            return null\n        }\n\n        const directive = firstLineMatches.groups?.directive.toLowerCase()\n        if (!directive) {\n            return null\n        }\n\n        // Consume first line that we've already peeked at and tested\n        parserState.consume()\n\n        const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n        const bodyIndentSize = parserState.peekNestedIndentSize(indentSize)\n        const initContent = parserState.parseInitContent(bodyIndentSize, firstLineText, startLineIdx)\n        const directiveConfig = fieldListParser.parse(parserState, bodyIndentSize, 'Directive')\n\n        const isInvisibleContent = parserState.opts.directivesWithInvisibleContent.includes(directive)\n        const hasInitContent = parserState.opts.directivesWithInitContent.includes(directive)\n\n        const directiveInitContent = hasInitContent ? initContent : []\n        const directiveChildren = hasInitContent ? [] : initContent\n\n        if (parserState.opts.directivesWithRawText.includes(directive)) {\n            const rawBodyText = parserState.parseBodyText(bodyIndentSize, 'Directive')\n            const endLineIdx = parserState.lineIdx\n            return new RstDirective(\n                parserState.registrar,\n                {\n                    startLineIdx,\n                    endLineIdx,\n                },\n                directiveChildren,\n                directive,\n                isInvisibleContent,\n                directiveInitContent,\n                directiveConfig,\n                rawBodyText,\n            )\n        } else {\n            const children = parserState.parseBodyNodes(bodyIndentSize, 'Directive', directiveChildren)\n            const endLineIdx = parserState.lineIdx\n            return new RstDirective(\n                parserState.registrar,\n                {\n                    startLineIdx,\n                    endLineIdx,\n                },\n                children,\n                directive,\n                isInvisibleContent,\n                directiveInitContent,\n                directiveConfig,\n                '',\n            )\n        }\n    },\n}\n","import { RstFootnoteDef } from '../../RstNode/ExplicitMarkup/FootnoteDef.ts'\nimport { RstFootnoteDefGroup } from '../../RstNode/ExplicitMarkup/FootnoteDefGroup.ts'\nimport { simpleNameReStr } from '../../SimpleName.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nconst footnoteDefRe = new RegExp(\n    '^ *\\\\.\\\\. +' +\n    '\\\\[' +\n        '(?<label>' +\n            '[0-9]+' + // Any number\n            '|' +\n            `#(${simpleNameReStr})?` + // Auto number footnote with optional label\n            '|' +\n            '\\\\*' + // Auto symbol\n        ')' +\n    '\\\\]' +\n    ' +' +\n    '(?<firstLineText>.+)$', // Any char to end of line\n)\n\nexport const footnoteDefGroupParser: RstNodeParser<'FootnoteDefGroup'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        const footnoteDefs = new Array<RstFootnoteDef>()\n        while (true) {\n            parserState.consumeAllNewLines()\n\n            const footnoteDef = parseFootnoteDef(parserState, indentSize)\n            if (!footnoteDef) {\n                break\n            }\n\n            footnoteDefs.push(footnoteDef)\n        }\n\n        // Failed to parse any bullet list items thus this is not a bullet list\n        if (footnoteDefs.length === 0) {\n            return null\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstFootnoteDefGroup(parserState.registrar, { startLineIdx, endLineIdx }, footnoteDefs)\n    },\n}\n\nfunction parseFootnoteDef(parserState: RstParserState, indentSize: number): RstFootnoteDef | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    const firstLineMatches = parserState.peekTest(footnoteDefRe)\n    if (!firstLineMatches) {\n        return null\n    }\n\n    const rawLabel = firstLineMatches.groups?.label\n    if (!rawLabel) {\n        return null\n    }\n\n    // Consume first line that we've already peeked at and tested\n    parserState.consume()\n\n    const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n    const bodyIndentSize = parserState.peekNestedIndentSize(indentSize)\n    const initContent = parserState.parseInitContent(bodyIndentSize, firstLineText, startLineIdx)\n    const children = parserState.parseBodyNodes(bodyIndentSize, 'FootnoteDef', initContent)\n\n    const endLineIdx = parserState.lineIdx\n    return new RstFootnoteDef(parserState.registrar, { startLineIdx, endLineIdx }, children, rawLabel)\n}\n","import { RstComment } from '../../RstNode/ExplicitMarkup/Comment.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\n\nconst commentRe = /^(?<indent>[ ]*\\.\\.)(?: (?<commentText>.*))?$/\n\nexport const commentParser: RstNodeParser<'Comment'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!parserState.peekIsIndented(indentSize)) {\n            return null\n        }\n\n        const firstLineMatches = parserState.peekTest(commentRe)\n        if (!firstLineMatches) {\n            return null\n        }\n\n        // Consume first line that we've already peeked at and tested\n        parserState.consume()\n\n        const firstLineText = firstLineMatches.groups?.commentText\n        const bodyIndentSize = indentSize + 2\n\n        const restOfCommentLines = new Array<string>()\n        while ((parserState.peekIsContent() && parserState.peekIsAtleastIndented(bodyIndentSize)) || parserState.peekIsNewLine()) {\n            const line = parserState.consume()\n            restOfCommentLines.push(line.str)\n        }\n\n        const commonIndentSize = ((): number => {\n            // If first line of comment exists, then subsequent lines are assumed to be aligned with \".. \" (3 chars)\n            if (firstLineText) {\n                return indentSize + 3\n            }\n\n            // Otherwise first line is blank (just \"..\"), then subsequent lines' smallest indentation determine the common indentation\n            let smallestIndent = Number.MAX_SAFE_INTEGER\n\n            for (const line of restOfCommentLines) {\n                // Ignore empty lines\n                if (!line) {\n                    continue\n                }\n\n                const lineIndent = line.search(/\\S|$/) ?? 0\n                smallestIndent = Math.min(smallestIndent, lineIndent)\n            }\n\n            return smallestIndent\n        })()\n\n        // Trim non-first comments\n        const restOfCommentText = restOfCommentLines.map((line) => line.substring(commonIndentSize)).join('\\n')\n\n        // Finally join everything together\n        const commentText = [firstLineText, restOfCommentText].filter((s) => Boolean(s)).join('\\n')\n\n        const endLineIdx = parserState.lineIdx\n        return new RstComment(\n            parserState.registrar,\n            {\n                startLineIdx,\n                endLineIdx,\n            },\n            commentText,\n        )\n    },\n}\n","import { RstHyperlinkTarget } from '../../RstNode/ExplicitMarkup/HyperlinkTarget.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nconst explicitHyperlinkTargetRe = new RegExp(\n    '^ *\\\\.\\\\. +' +\n    '_' +\n        '(?:' +\n            '(?<anonymousName>_)' +\n            '|' +\n            '`(?<phraseName>(?:\\\\`|[^`])+)`' + // Backtick wraps any character except backtick (unless escaped backtick)\n            '|' +\n            '(?<linkName>(?:\\\\:|[^:])+)' + // Any non-colon character except colon (unless escaped colon)\n        ')' +\n    '(?<!\\\\\\\\):' + // Colon cannot be preceded by escape slash\n    '(?: (?<firstLineText>.*))?' +\n    '$',\n)\n\nconst anonymousHyperlinkTargetRe = /^ *__(?: (?<hyperlinkTarget>.+))?$/\n\nexport const hyperlinkTargetParser: RstNodeParser<'HyperlinkTarget'> = {\n    parse: (parserState, indentSize) => {\n        return parseExplicitTarget(parserState, indentSize) ?? parseAnonymousTarget(parserState, indentSize)\n    },\n}\n\nfunction parseExplicitTarget(parserState: RstParserState, indentSize: number): RstHyperlinkTarget | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    const firstLineMatches = parserState.peekTest(explicitHyperlinkTargetRe)\n    if (!firstLineMatches) {\n        return null\n    }\n\n    const rawLabel = firstLineMatches.groups?.anonymousName ?? firstLineMatches.groups?.phraseName ?? firstLineMatches.groups?.linkName\n    if (!rawLabel) {\n        return null\n    }\n\n    // Consume first line that we've already peeked at and tested\n    parserState.consume()\n\n    const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n    const bodyIndentSize = parserState.peekNestedIndentSize(indentSize)\n    const linkText = parserState.parseInitContentText(bodyIndentSize, firstLineText, false)\n\n    const endLineIdx = parserState.lineIdx\n    return new RstHyperlinkTarget(\n        parserState.registrar,\n        {\n            startLineIdx,\n            endLineIdx,\n        },\n        rawLabel,\n        linkText,\n    )\n}\n\nfunction parseAnonymousTarget(parserState: RstParserState, indentSize: number): RstHyperlinkTarget | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    const firstLineMatches = parserState.peekTest(anonymousHyperlinkTargetRe)\n    if (!firstLineMatches) {\n        return null\n    }\n\n    // Consume first line that we've already peeked at and tested\n    parserState.consume()\n\n    const hyperlinkTarget = firstLineMatches.groups?.hyperlinkTarget ?? ''\n\n    const endLineIdx = parserState.lineIdx\n    return new RstHyperlinkTarget(\n        parserState.registrar,\n        {\n            startLineIdx,\n            endLineIdx,\n        },\n        '_',\n        hyperlinkTarget,\n    )\n}\n","import { RstLiteralBlock } from '../../RstNode/Block/LiteralBlock.ts'\nimport { RstParagraph } from '../../RstNode/Block/Paragraph.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\n\nconst quotedLiteralBlockRe = /^([ ]*)>+(?: .+)?$/\n\nexport const literalBlockParser: RstNodeParser<'LiteralBlock'> = {\n    parse: (parserState, indentSize, parentType, prevNode) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!(prevNode instanceof RstParagraph)) {\n            return null\n        }\n\n        const prevNodelastChild = prevNode.children.at(-1)\n        if (prevNodelastChild?.nodeType !== 'Text') { // \"::\" must be in base Text node\n            return null\n        }\n        if (!prevNodelastChild.textContent.endsWith('::')) {\n            return null\n        }\n\n        const bodyIndentSize = parserState.peekNestedIndentSize(indentSize)\n        let literalText = ''\n\n        if (parserState.peekIsAtleastIndented(bodyIndentSize)) {\n            // Indented literal block must be on next level of indentation\n            literalText = parserState.parseBodyText(bodyIndentSize, 'LiteralBlock')\n        } else if (parserState.peekIsIndented(indentSize) && parserState.peekTest(quotedLiteralBlockRe)) {\n            // Quoted literal block must be on same indentation as current body\n            literalText = parserState.parseBodyText(indentSize, 'LiteralBlock', quotedLiteralBlockRe)\n        } else {\n            // Not a literal block despite prev paragraph indicating that it is\n            return null\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstLiteralBlock(parserState.registrar, { startLineIdx, endLineIdx }, literalText)\n    },\n}\n","import { RstParagraph } from '../../RstNode/Block/Paragraph.ts'\nimport type { RstNodeSource } from '../../RstNode/RstNode.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\n\nexport const paragraphParser: RstNodeParser<'Paragraph'> = {\n    parse: (parserState, indentSize, parentType) => {\n        const startLineIdx = parserState.lineIdx\n        const paragraphText = parserState.parseBodyText(indentSize, parentType, /^[^\\n]+$/)\n        const endLineIdx = parserState.lineIdx\n        const source: RstNodeSource = { startLineIdx, endLineIdx }\n        return new RstParagraph(parserState.registrar, source, parserState.parseInlineNodes(paragraphText, source))\n    },\n}\n","export function escapeForRegExp(str: string): string {\n    return str.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","import { RstSection } from '../../RstNode/Block/Section.ts'\nimport { escapeForRegExp } from '../../utils/escapeForRegExp.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nexport const sectionChars  = ['=', '-', '`', ':', '.', \"'\", '\"', '~', '^', '_', '*', '+', '#']\nexport const sectionMarkRe = new RegExp(`^(${sectionChars.map(escapeForRegExp).map((c) => `${c}{2,}`).join('|')})[ ]*$`)\n\nexport const sectionParser: RstNodeParser<'Section'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!parserState.peekIsIndented(indentSize)) {\n            return null\n        }\n\n        const section = getSectionInfo(parserState)\n        if (!section) {\n            return null\n        }\n\n        // Advance parser after the overline, body text, and underline\n        parserState.advance(section.numLinesConsumed)\n\n        const endLineIdx = parserState.lineIdx\n        const sectionTextNodes = parserState.parseInlineNodes(section.sectionText, {\n            startLineIdx: startLineIdx + (section.hasOverline ? 1 : 0),\n            endLineIdx: endLineIdx - 1,\n        })\n\n        const sectionLevel = parserState.registerSectionMarker(section.sectionMarker)\n        return new RstSection(parserState.registrar, { startLineIdx, endLineIdx }, sectionTextNodes, sectionLevel)\n    },\n}\n\ntype SectionInfo = {\n    hasOverline: boolean\n    sectionText: string\n    sectionMarker: string\n    numLinesConsumed: number\n}\n\nfunction getSectionInfo(parserState: RstParserState): SectionInfo | null {\n    let hasOverline: boolean\n    if (parserState.peekTest(sectionMarkRe, 0) && parserState.peekTest(sectionMarkRe, 2)) {\n        hasOverline = true\n    } else if (parserState.peekTest(sectionMarkRe, 1)) {\n        hasOverline = false\n    } else {\n        return null\n    }\n\n    if (hasOverline) {\n        const overline = parserState.peek(0)?.str\n        const sectionText = parserState.peek(1)?.str\n        const underline = parserState.peek(2)?.str\n        if (overline !== underline) {\n            return null\n        }\n        if (sectionText === undefined || underline === undefined) {\n            return null\n        }\n\n        return {\n            hasOverline,\n            sectionText,\n            sectionMarker: underline[0],\n            numLinesConsumed: 3,\n        }\n    } else {\n        const sectionText = parserState.peek(0)?.str\n        const underline = parserState.peek(1)?.str\n        if (sectionText === undefined || underline === undefined) {\n            return null\n        }\n\n        return {\n            hasOverline,\n            sectionText,\n            sectionMarker: underline[0],\n            numLinesConsumed: 2,\n        }\n    }\n}\n","import { RstSubstitutionDef } from '../../RstNode/ExplicitMarkup/SubstitutionDef.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport { fieldListParser } from './fieldListParser.ts'\n\nconst substitutionDefRe = new RegExp(\n    '^ *\\\\.\\\\. +' +\n    '\\\\|(?<needle>.+)\\\\| ' +\n    '(?<directive>\\\\S+)' +\n    '(?<!\\\\\\\\)::' +\n    '(?: (?<firstLineText>.*))?' +\n    '$',\n)\n\nexport const substitutionDefParser: RstNodeParser<'SubstitutionDef'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!parserState.peekIsIndented(indentSize)) {\n            return null\n        }\n\n        const firstLineMatches = parserState.peekTest(substitutionDefRe)\n        if (!firstLineMatches) {\n            return null\n        }\n\n        // Consume first line that we've already peeked at and tested\n        parserState.consume()\n\n        const needle = firstLineMatches.groups?.needle ?? ''\n        const directive = firstLineMatches.groups?.directive ?? ''\n        const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n        const bodyIndentSize = parserState.peekNestedIndentSize(indentSize)\n        const initContent = parserState.parseInitContent(bodyIndentSize, firstLineText, startLineIdx)\n        const directiveConfig = fieldListParser.parse(parserState, bodyIndentSize, 'SubstitutionDef')\n\n        const directiveInitContent = directive === 'image'\n            ? initContent\n            : []\n        const directiveChildren = directive === 'image'\n            ? []\n            : initContent\n        const children = parserState.parseBodyNodes(bodyIndentSize, 'SubstitutionDef', directiveChildren)\n\n        const endLineIdx = parserState.lineIdx\n        return new RstSubstitutionDef(\n            parserState.registrar,\n            {\n                startLineIdx,\n                endLineIdx,\n            },\n            children,\n            needle,\n            directive,\n            directiveInitContent,\n            directiveConfig,\n        )\n    },\n}\n","import { RstTransition } from '../../RstNode/Block/Transition.ts'\nimport { escapeForRegExp } from '../../utils/escapeForRegExp.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport { sectionChars } from './sectionParser.ts'\n\nconst transitionMarkRe = new RegExp(`^(${sectionChars.map(escapeForRegExp).map((c) => `${c}{4,}`).join('|')})[ ]*$`)\n\nexport const transitionParser: RstNodeParser<'Transition'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!parserState.peekIsIndented(indentSize)) {\n            return null\n        }\n        if (!parserState.peekTest(transitionMarkRe)) {\n            return null\n        }\n\n        // Consume the transition line\n        parserState.consume()\n\n        const endLineIdx = parserState.lineIdx\n        return new RstTransition(parserState.registrar, { startLineIdx, endLineIdx })\n    },\n}\n","import { RstBlockquoteAttribution } from '../../RstNode/Block/BlockquoteAttribution.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\n\nconst blockquoteAttributonRe = /^([ ]*)(?<bulletAndSpace>---?[ ]+)(?<firstLineText>.+)$/\n\nexport const blockquoteAttributionParser: RstNodeParser<'BlockquoteAttribution'> = {\n    onParseShouldExitBody: true,\n\n    parse: (parserState, indentSize, parentType) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (parentType !== 'Blockquote') {\n            return null\n        }\n        if (!parserState.peekIsIndented(indentSize)) {\n            return null\n        }\n\n        const firstLineMatches = parserState.peekTest(blockquoteAttributonRe)\n        if (!firstLineMatches) {\n            return null\n        }\n\n        // Consume first line that we've already peeked at and tested\n        parserState.consume()\n\n        const bulletAndSpace = firstLineMatches.groups?.bulletAndSpace ?? ''\n        const bodyIndentSize = indentSize + bulletAndSpace.length\n        const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n        const attributionText = parserState.parseInitContentText(bodyIndentSize, firstLineText)\n\n        const endLineIdx = parserState.lineIdx\n        const attributionTextSrc = { startLineIdx, endLineIdx }\n        const attributionTextNodes = parserState.parseInlineNodes(attributionText, attributionTextSrc)\n        return new RstBlockquoteAttribution(parserState.registrar, attributionTextSrc, attributionTextNodes)\n    },\n}\n","import { RstBlockquote } from '../../RstNode/Block/Blockquote.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\n\nexport const blockquoteParser: RstNodeParser<'Blockquote'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        const nextIndentSize = indentSize + parserState.opts.inputIndentSize\n        if (!parserState.peekIsAtleastIndented(nextIndentSize)) {\n            return null\n        }\n\n        const children = parserState.parseBodyNodes(nextIndentSize, 'Blockquote')\n\n        const endLineIdx = parserState.lineIdx\n        return new RstBlockquote(parserState.registrar, { startLineIdx, endLineIdx }, children)\n    },\n}\n","import { RstDoctestBlock } from '../../RstNode/Block/DoctestBlock.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\n\nconst doctestBlockRe = /^([ ]*)>>> (.+)$/\n\nexport const doctestBlockParser: RstNodeParser<'DoctestBlock'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!parserState.peekTest(doctestBlockRe)) {\n            return null\n        }\n\n        const doctestBlockText = parserState.parseBodyText(indentSize, 'DoctestBlock', /^[^\\n]+$/)\n        const endLineIdx = parserState.lineIdx\n        return new RstDoctestBlock(parserState.registrar, { startLineIdx, endLineIdx }, doctestBlockText)\n    },\n}\n","import { RstLineBlock, RstLineBlockLine } from '../../RstNode/Block/LineBlock.ts'\nimport type { RstNodeSource } from '../../RstNode/RstNode.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport { RstParserError } from '../RstParserError.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nconst lineBlockRe = /^([ ]*)\\|(?: (?<lineBlockIndent> *)(?<lineBlockText>.+))?$/\n\nexport const lineBlockParser: RstNodeParser<'LineBlock'> = {\n    parse: (parserState, indentSize) => {\n        return parseLineBlock(parserState, indentSize, 0)\n    },\n}\n\n//\n// Inside LineBlock, the left vertical bar prevents us from using the `indentSize` arg to\n// recursively track the expected indent size of nested LineBlock\n//\n//      | text\n//      |     text\n//        ^^^^\n//           |\n//           lineBlockIndentSize\n//\n// Thus we need to use a 3rd parameter to track it\n//\nfunction parseLineBlock(parserState: RstParserState, indentSize: number, lineBlockIndentSize: number): RstLineBlock | null {\n    const startLineIdx = parserState.lineIdx\n    const lines = new Array<RstLineBlock | RstLineBlockLine>()\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n    if (!parserState.peekTest(lineBlockRe)) {\n        return null\n    }\n\n    while (true) {\n        if (parserState.peekIndentSize() < indentSize) {\n            break\n        }\n\n        const lineMatches = parserState.peekTest(lineBlockRe)\n        if (!lineMatches) {\n            break\n        }\n\n        const nextBlockIndentSize = lineMatches.groups?.lineBlockIndent?.length ?? 0\n        if (nextBlockIndentSize < lineBlockIndentSize) {\n            break\n        }\n\n        const indentSizeForNestedBlock = lineBlockIndentSize + parserState.opts.inputIndentSize\n        if (nextBlockIndentSize >= indentSizeForNestedBlock) {\n            const innerBlock = parseLineBlock(parserState, indentSize, nextBlockIndentSize)\n            if (!innerBlock) {\n                throw new RstParserError(parserState, 'Failed to parseLineBlock')\n            }\n\n            lines.push(innerBlock)\n        } else {\n            parserState.consume()\n            const source: RstNodeSource = {\n                startLineIdx: parserState.lineIdx - 1,\n                endLineIdx: parserState.lineIdx,\n            }\n\n            const lineText = lineMatches.groups?.lineBlockText ?? ''\n            const lineTextNodes = parserState.parseInlineNodes(lineText, source)\n\n            lines.push(new RstLineBlockLine(\n                parserState.registrar,\n                source,\n                lineTextNodes,\n            ))\n        }\n    }\n\n    if (lines.length === 0) {\n        return null\n    }\n\n    const endLineIdx = parserState.lineIdx\n    return new RstLineBlock(parserState.registrar, { startLineIdx, endLineIdx }, lines)\n}\n","export function createBooleanTable(numRows: number, numCols: number): Array<Array<boolean>> {\n    const ret = new Array<Array<boolean>>()\n\n    for (let i = 0; i < numRows - 1; i++) {\n        ret.push(new Array<boolean>())\n\n        for (let j = 0; j < numCols - 1; j++) {\n            ret[i][j] = false\n        }\n    }\n\n    return ret\n}\n","import type { RstNodeParser } from '../RstParser.ts'\nimport { RstNode } from '../../RstNode/RstNode.ts'\nimport { RstTable } from '../../RstNode/Table/Table.ts'\nimport { RstTableCell } from '../../RstNode/Table/TableCell.ts'\nimport { RstTableRow } from '../../RstNode/Table/TableRow.ts'\nimport { createBooleanTable } from '../../utils/createBooleanTable.ts'\nimport { RstParserError } from '../RstParserError.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Grid Parser\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#grid-tables\n// ----------------------------------------------------------------------------\n\nconst gridTableRe        = /^([ ]*)(?:\\+-*)+\\+[ ]*$/\nconst gridTableHeadSepRe = /^([ ]*)(?:\\+=*)+\\+[ ]*$/\n\nexport const tableGridParser: RstNodeParser<'Table'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!parserState.peekTest(gridTableRe)) {\n            return null\n        }\n\n        // --------------------------------------------------------------------\n        // Step 1\n        //\n        // Collect all lines of the table into an array of strings for easy traversal and indexing\n        // --------------------------------------------------------------------\n\n        const tableLines = new Array<string>()\n        while (parserState.peekIsContent() && parserState.peekIsIndented(indentSize)) {\n            const line = parserState.consume()\n            const lineText = line.str.substring(indentSize)\n            tableLines.push(lineText)\n        }\n\n        // --------------------------------------------------------------------\n        // Step 2\n        //\n        // Find the header/body separation marker if exists (to be used to determine which rows go in <thead> or <tbody>)\n        // --------------------------------------------------------------------\n\n        let headSeparatorLocation = -1\n        for (let i = 0; i < tableLines.length; i++) {\n            if (!gridTableHeadSepRe.test(tableLines[i])) {\n                continue\n            }\n\n            if (headSeparatorLocation >= 0) {\n                throw new RstParserError(parserState, 'Table has multiple head/body row separators')\n            }\n\n            headSeparatorLocation = i\n\n            // Now that we know where the head/body is dived, we can replace separator \"=\" with '-' as if it didn't exist to make the table uniform for next step\n            tableLines[i] = tableLines[i].replaceAll('=', '-')\n        }\n\n        const parseTableCell = (top: number, left: number, right: number, bot: number): ReadonlyArray<RstNode> => {\n            let cellText = ''\n            for (let row = top + 1; row < bot; row++) {\n                const line = tableLines[row].substring(left + 1, right)\n                if (line.length === 0) {\n                    continue\n                }\n\n                cellText += line + '\\n'\n            }\n\n            const cellNodes = parserState.parseRstToAst(cellText, startLineIdx + top + 1) // +1 since \"top\" is the location of the top bar of the cell\n            return cellNodes\n        }\n\n        // --------------------------------------------------------------------\n        // Step 3\n        //\n        // Start from top-left corner of table and search for all the cells\n        // After we find a cell, we queue up the cell's top-right corner and bottom-left corner as candidates for other cells' top-right corners\n        // We skip queuing bottom-right since it is redudant as the next cell starting from current's top-right will queue up its bottom-left (current's bottom-right)\n        //\n        // For each cell, we start at the top-left corner and scan clockwise (right/down/left/up) for \"+\" markers\n        // At each step, we ensure we see the expected characters:\n        //      \"-\" when going left/right\n        //      \"|\" when going up/down\n        //\n        // If we cannot cycle back to the starting top-left corner, then the original top-left corner that we started with is not the start of an actual table cell (so we disard it and continue)\n        //\n        //       |  |  |\n        //      -0--1--2-\n        //       |     |\n        //      -3     4-\n        //       |     |\n        //      -5--6--7-\n        //       |  |  |\n        //\n        // We start at (0)\n        //  - Go right and encounter (1)\n        //      - Go down but did not find \"+\" or \"|\" [FAIL]\n        //  - Go right and encounter (2)\n        //      - Go down and see (4)\n        //          - Go left but did not see \"-\" [FAIL]\n        //      - Go down and see (7)\n        //          - Go left and see (6)\n        //              - Go up but did not see \"|\" [FAIL]\n        //          - Go left and see (5)\n        //              - Go up and see (3) [Ignore since we are not at starting row yet]\n        //              - Go up and see (0) [FINISH]\n        //\n        // Afterwards, we queue up coordinates of corner (2) and (5) and continue the search\n        // --------------------------------------------------------------------\n\n        const numRows = tableLines.length\n        const numCols = tableLines[0].length\n        const tableRight = numCols - 1\n        const tableBottom = numRows - 1\n\n        const corners = new Array<[number, number]>([0, 0])\n        const parsedCells = new Array<{\n            topLeft: [number, number]\n            bottomRight: [number, number]\n            contents: ReadonlyArray<RstNode>\n        }>()\n\n        const scanTopLeft = (top: number, left: number, right: number, bot: number): boolean => {\n            for (let i = bot - 1; i >= top; i--) {\n                const c = tableLines[i][left]\n\n                if (c === '+') {\n                    // Do nothing since this \"+\" might simply be an intermediate corner for row/col cell\n                    // In docutils lib, it tracks every intermediate \"+\" encountered\n                } else if (c !== '|') {\n                    // If above bottom-left corner is not \"|\", then we did not start from a valid bottom-left corner\n                    // +--+--+\n                    // |     |\n                    // +-(+)-+\n                    // |  |  |\n                    // +--+--+\n                    return false\n                }\n            }\n\n            // Reached top wall and our scan is now complete\n            return true\n        }\n\n        const scanBotLeft = (top: number, left: number, right: number, bot: number): boolean => {\n            for (let i = right - 1; i >= left; i--) {\n                const c = tableLines[bot][i]\n                if (c === '+') {\n                    // Do nothing since this \"+\" might simply be an intermediate corner for row/col cell\n                    // In docutils lib, it tracks every intermediate \"+\" encountered\n                } else if (c !== '-') {\n                    // If left of bottom-right corner is not \"-\", then we did not start from a valid bottom-right corner\n                    // +--+--+\n                    // |  |  |\n                    // +--+ (+)\n                    // |  |  |\n                    // +--+--+\n                    return false\n                }\n            }\n\n            // Reached left wall\n            // Finally check if we can go back up to top wall\n            return scanTopLeft(top, left, right, bot)\n        }\n\n        const scanBotRight = (top: number, left: number, right: number): [number, number] | null => {\n            for (let i = top + 1; i <= tableBottom; i++) {\n                const c = tableLines[i][right]\n                if (c === '+') {\n                    // Found candidate\n                    const isValid = scanBotLeft(top, left, right, i)\n                    if (isValid) {\n                        return [i, right]\n                    }\n                } else if (c !== '|') {\n                    // If below top-right corner is not \"|\", then we did not start from a valid top-right corner\n                    // +-(*)-+\n                    // |     |\n                    // +--+--|\n                    // |  |  |\n                    // +--+--+\n                    return null\n                }\n            }\n\n            return null\n        }\n\n        const scanTopRight = (top: number, left: number): [number, number] | null => {\n            for (let i = left + 1; i <= tableRight; i++) {\n                const c = tableLines[top][i]\n                if (c === '+') {\n                    const bottomRight = scanBotRight(top, left, i)\n                    if (bottomRight) {\n                        return bottomRight\n                    }\n                } else if (c !== '-') {\n                    // If right of top-left corner is not \"-\", then we did not start from a valid top-left corner\n                    // +--+--+\n                    // |  |  |\n                    // +-(*) |\n                    // |  |  |\n                    // +--+--+\n                    return null\n                }\n            }\n\n            return null\n        }\n\n        // Use this to track which parts of the table has been scanned and can be skipped later\n        // done[i][j] = i-th row (line) j-th column (character in line)\n        const done = createBooleanTable(numRows, numCols)\n\n        while (corners.length > 0) {\n            const [cornerTop, cornerLeft] = corners.shift() ?? [0xDEADBEEF, 0xDEADBEEF]\n\n            // Reached edges of table and don't need to parse this corner\n            if (cornerTop === tableBottom || cornerLeft === tableRight) {\n                continue\n            }\n\n            // Already processed past this row in current column\n            if (done[cornerTop][cornerLeft]) {\n                continue\n            }\n\n            // Check that we are actually starting in the top-left corner of a cell\n            if (tableLines[cornerTop][cornerLeft] !== '+') {\n                throw new RstParserError(parserState, 'TopLeft corner of TableCell is not \"+\"')\n            }\n\n            const botRight = scanTopRight(cornerTop, cornerLeft)\n            if (!botRight) {\n                continue\n            }\n\n            const [cornerBot, cornerRight] = botRight\n            for (let row = cornerTop; row < cornerBot; row++) {\n                for (let col = cornerLeft; col < cornerRight; col++) {\n                    done[row][col] = true\n                }\n            }\n\n            corners.push([cornerTop, cornerRight])\n            corners.push([cornerBot, cornerLeft])\n            parsedCells.push({\n                topLeft: [cornerTop, cornerLeft],\n                bottomRight: [cornerBot, cornerRight],\n                contents: parseTableCell(cornerTop, cornerLeft, cornerRight, cornerBot),\n            })\n        }\n\n        // --------------------------------------------------------------------\n        // Step 4\n        //\n        // Construct the final table AST structure from cells found\n        // 1. Get all unique top coordinates from table cells (each unique coordinate represents a new <tr> row)\n        // 2. For each row <tr>, find all the cells belonging to it based on their top-left coordinate and sort them by left edg\n        // 3. For each cell <td>, calculate how many rows/cols each one occupies based on their top/bot left/right edges\n        // --------------------------------------------------------------------\n\n        const rowSepCoords = [...new Set(parsedCells.map((cell) => cell.topLeft[0]))].toSorted((a, b) => a - b)\n        const getRowSpan = (startRow: number, endRow: number): number => {\n            const start = rowSepCoords.indexOf(startRow)\n            const end = rowSepCoords.indexOf(endRow)\n            if (end === -1) {\n                return rowSepCoords.length - start\n            } else {\n                return end - start\n            }\n        }\n\n        const colSepCoords = [...new Set(parsedCells.map((cell) => cell.topLeft[1]))].toSorted((a, b) => a - b)\n        const getColSpan = (startCol: number, endCol: number): number => {\n            const start = colSepCoords.indexOf(startCol)\n            const end = colSepCoords.indexOf(endCol)\n            if (end === -1) {\n                return colSepCoords.length - start\n            } else {\n                return end - start\n            }\n        }\n\n        // const rows = new Array<TableRow>()\n        const headRows = new Array<RstTableRow>()\n        const bodyRows = new Array<RstTableRow>()\n\n        for (const rowCoord of rowSepCoords) {\n            const rowCells = new Array<RstTableCell>()\n            const cellsOnThisRow = parsedCells\n                .filter((cell) => cell.topLeft[0] === rowCoord)\n                .toSorted((cellA, cellB) => cellA.topLeft[1] - cellB.topLeft[1])\n\n            let rowStartLineIdx = startLineIdx\n            let rowEndLineIdx = startLineIdx + 1\n\n            for (const parsedCell of cellsOnThisRow) {\n                const startRow = parsedCell.topLeft[0]\n                const startCol = parsedCell.topLeft[1]\n                const endRow = parsedCell.bottomRight[0]\n                const endCol = parsedCell.bottomRight[1]\n\n                const rowSpan = getRowSpan(startRow, endRow)\n                const colSpan = getColSpan(startCol, endCol)\n\n                const cellStartLineIdx = startLineIdx + startRow\n                const cellEndLineIdx = startLineIdx + endRow\n\n                rowStartLineIdx = Math.max(rowStartLineIdx, cellStartLineIdx)\n                rowEndLineIdx = Math.max(rowEndLineIdx, cellEndLineIdx)\n\n                rowCells.push(new RstTableCell(\n                    parserState.registrar,\n                    {\n                        startLineIdx: cellStartLineIdx,\n                        endLineIdx: cellEndLineIdx,\n                    },\n                    parsedCell.contents,\n                    rowSpan,\n                    colSpan,\n                    endCol - startCol,\n                ))\n            }\n\n            const isHeadRow = rowCoord < headSeparatorLocation\n            if (isHeadRow) {\n                headRows.push(new RstTableRow(parserState.registrar, { startLineIdx: rowStartLineIdx, endLineIdx: rowEndLineIdx }, rowCells, isHeadRow))\n            } else {\n                bodyRows.push(new RstTableRow(parserState.registrar, { startLineIdx: rowStartLineIdx, endLineIdx: rowEndLineIdx }, rowCells, isHeadRow))\n            }\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstTable(parserState.registrar, { startLineIdx, endLineIdx }, headRows, bodyRows)\n    },\n}\n","import type { RstNodeParser } from '../RstParser.ts'\nimport { RstTable } from '../../RstNode/Table/Table.ts'\nimport { RstTableCell } from '../../RstNode/Table/TableCell.ts'\nimport { RstTableRow } from '../../RstNode/Table/TableRow.ts'\nimport { RstParserError } from '../RstParserError.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Simple Parser\n// https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#simple-tables\n// ----------------------------------------------------------------------------\n\nconst simpleTableRe        = /^([ ]*)=+([ ]+[=]+)+$/\nconst simpleTableColSpanRe = /^([ ]*)-[ -]*$/\n\nexport const tableSimpleParser: RstNodeParser<'Table'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        if (!parserState.peekIsIndented(indentSize)) {\n            return null\n        }\n\n        if (!parserState.peekTest(simpleTableRe)) {\n            return null\n        }\n\n        // --------------------------------------------------------------------\n        // Step 1\n        //\n        // Collect all lines of the table into an array of strings for easy traversal and indexing\n        // This is slightly more tricky than grid table since simple table allows linebreaks inside the table\n        //\n        // 1. Keep consuming until we've matched 1 table header followed by blank line (bottom border)\n        // 2. Otherwise keep consuming until we've matched 2 table headers (header separator + bottom border)\n        // 3. Throw error if we've reached end of input (malformed table)\n        // --------------------------------------------------------------------\n\n        const tableLines = new Array<string>()\n        tableLines.push(parserState.consume().str.substring(indentSize)) // Top border\n\n        let numSeparatorMatched = 0\n        while (true) {\n            if (!parserState.canConsume()) {\n                throw new RstParserError(parserState, 'Reached end of input before finding simple table bottom border')\n            }\n\n            const isSeparator = parserState.peekTest(simpleTableRe)\n            if (isSeparator) {\n                numSeparatorMatched++\n            }\n\n            const line = parserState.consume()\n            tableLines.push(line.str.substring(indentSize))\n\n            // Found both header separator and bottom border\n            if (numSeparatorMatched === 2) {\n                break\n            }\n\n            // Found bottom border\n            if (isSeparator && (parserState.peekIsNewLine() || !parserState.canConsume())) {\n                break\n            }\n        }\n\n        let headSeparatorLocation = -1\n        for (let i = 1; i < tableLines.length - 1; i++) {\n            if (simpleTableRe.test(tableLines[i])) {\n                headSeparatorLocation = i\n                break\n            }\n        }\n\n        // --------------------------------------------------------------------\n        // Step 2\n        //\n        // Parse table\n        //\n        // Each sequence of \"=\" in table's top border denotes a column\n        // Each sequence of \"-\" in table column span row denotes a column (that potentially spans multiple columns)\n        //\n        // Each row either ends when\n        // - The following line only contains '-' denoting column span row\n        // - The following line's first column area contains text\n        // --------------------------------------------------------------------\n\n        const parseColumn = (line: string, marker: '-' | '='): Array<{ startCoord: number; endCoord: number }> => {\n            const columnData = new Array<{ startCoord: number; endCoord: number }>()\n            let endCoord = 0\n\n            while (true) {\n                const startCoord = line.indexOf(marker, endCoord)\n                endCoord = line.indexOf(' ', startCoord)\n\n                // Cannot find anymore column starts\n                if (startCoord === -1) {\n                    break\n                }\n\n                // Current column has no end space\n                if (endCoord === -1) {\n                    endCoord = line.length\n                }\n\n                columnData.push({ startCoord, endCoord })\n            }\n\n            return columnData\n        }\n\n        const columnData = parseColumn(tableLines[0], '=')\n        const getColSpan = (colStartCoord: number, colEndCoord?: number): number => {\n            let startColumnIdx = 0\n            while (startColumnIdx < columnData.length && colStartCoord > columnData[startColumnIdx].startCoord) {\n                startColumnIdx++\n            }\n\n            let endColumnIdx: number\n            if (colEndCoord === undefined) {\n                endColumnIdx = columnData.length\n            } else {\n                endColumnIdx = startColumnIdx + 1\n                while (endColumnIdx < columnData.length && colEndCoord > columnData[endColumnIdx].startCoord) {\n                    endColumnIdx++\n                }\n            }\n\n            return endColumnIdx - startColumnIdx\n        }\n\n        const parseRow = (isHeadRow: boolean, rowStartCoord: number, rowEndCoord: number): RstTableRow => {\n            const lastRowIsHeaderSeparator = simpleTableRe.test(tableLines[rowEndCoord - 1])\n            const lastRowIsColSpanMarker = simpleTableColSpanRe.test(tableLines[rowEndCoord - 1])\n\n            const rowLines = lastRowIsHeaderSeparator || lastRowIsColSpanMarker\n                ? tableLines.slice(rowStartCoord, rowEndCoord - 1)\n                : tableLines.slice(rowStartCoord, rowEndCoord)\n\n            const rowColumnData = lastRowIsColSpanMarker\n                ? parseColumn(tableLines[rowEndCoord - 1], '-')\n                : columnData\n\n            // Parse each cell based on column data\n            const rowCells = Array<RstTableCell>()\n            for (let i = 0; i < rowColumnData.length; i++) {\n                const { startCoord, endCoord } = rowColumnData[i]\n\n                // Last column of simple table has unbounded width\n                const colSpan = (i === rowColumnData.length - 1)\n                    ? getColSpan(startCoord)\n                    : getColSpan(startCoord, endCoord)\n                const cellText = (i === rowColumnData.length - 1)\n                    ? rowLines.map((line) => line.substring(startCoord)).join('\\n')\n                    : rowLines.map((line) => line.substring(startCoord, endCoord)).join('\\n')\n\n                const cellNodes = parserState.parseRstToAst(cellText, startLineIdx + rowStartCoord)\n\n                rowCells.push(new RstTableCell(\n                    parserState.registrar,\n                    {\n                        startLineIdx: startLineIdx + rowStartCoord,\n                        endLineIdx: lastRowIsHeaderSeparator || lastRowIsColSpanMarker\n                            ? startLineIdx + rowEndCoord - 1\n                            : startLineIdx + rowEndCoord,\n                    },\n                    cellNodes,\n                    1,\n                    colSpan,\n                    endCoord - startCoord,\n                ))\n            }\n\n            return new RstTableRow(\n                parserState.registrar,\n                {\n                    startLineIdx: startLineIdx + rowStartCoord,\n                    endLineIdx: lastRowIsHeaderSeparator || lastRowIsColSpanMarker\n                        ? startLineIdx + rowEndCoord - 1\n                        : startLineIdx + rowEndCoord,\n                },\n                rowCells,\n                isHeadRow,\n            )\n        }\n\n        const headRows = new Array<RstTableRow>()\n        const bodyRows = new Array<RstTableRow>()\n\n        for (let i = 1; i < tableLines.length - 1; i++) {\n            const rowStartCoord = i\n\n            // Advance i to end of current row\n            // Skip this search if [i === tableLines.length - 2] since it is the last content row\n            // [tableLines.length - 1] contains end of table border\n            for (let j = i; j < tableLines.length - 2; j++) {\n                // If next line is column span underlines or header separator, then we've reached end of current row\n                if (simpleTableRe.test(tableLines[j + 1]) || simpleTableColSpanRe.test(tableLines[j + 1])) {\n                    i += 1 // Skip the col-span underline\n                    break\n                }\n\n                // If next line has text in first column, then we've reached end of current row\n                const firstColumnOfNextLine = tableLines[j + 1].substring(columnData[0].startCoord, columnData[0].endCoord).trim()\n                if (firstColumnOfNextLine.length > 0) {\n                    break\n                }\n\n                i += 1\n            }\n\n            const rowEndCoord = i + 1\n            const isHeadRow = rowStartCoord < headSeparatorLocation\n            const row = parseRow(isHeadRow, rowStartCoord, rowEndCoord)\n\n            if (isHeadRow) {\n                headRows.push(row)\n            } else {\n                bodyRows.push(row)\n            }\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstTable(parserState.registrar, { startLineIdx, endLineIdx }, headRows, bodyRows)\n    },\n}\n","import { RstBulletList } from '../../RstNode/List/BulletList.ts'\nimport { RstBulletListItem } from '../../RstNode/List/BulletListItem.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nconst bulletListItemRe = /^[ ]*(?<bulletAndSpace>(?<bullet>[*+-])[ ]+)(?<firstLineText>.+)$/\n\nexport const bulletListParser: RstNodeParser<'BulletList'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        const listItems = new Array<RstBulletListItem>()\n        while (true) {\n            parserState.consumeAllNewLines()\n\n            const listItem = parseListItem(parserState, indentSize)\n            if (!listItem) {\n                break\n            }\n\n            listItems.push(listItem)\n        }\n\n        // Failed to parse any bullet list items thus this is not a bullet list\n        if (listItems.length === 0) {\n            return null\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstBulletList(parserState.registrar, { startLineIdx, endLineIdx }, listItems)\n    },\n}\n\nfunction parseListItem(parserState: RstParserState, indentSize: number): RstBulletListItem | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    const firstLineMatches = parserState.peekTest(bulletListItemRe)\n    if (!firstLineMatches) {\n        return null\n    }\n\n    const bulletValue = firstLineMatches.groups?.bullet ?? '' // Actual bullet excluding formating e.g. \"- text\" extracts \"-\"\n    const bulletAndSpace = firstLineMatches.groups?.bulletAndSpace ?? ''\n    const bulletIndentSize = indentSize + bulletAndSpace.length\n\n    // Check second line (if exists) to see if this is a valid list vs ordinary paragraph that happens to start with same characters as a bullet\n    if (parserState.peekIsContent(1) && !parserState.peekTest(bulletListItemRe, 1) && !parserState.peekIsAtleastIndented(bulletIndentSize, 1)) {\n        return null\n    }\n\n    // Consume first line that we've already peeked at and tested\n    parserState.consume()\n\n    const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n    const initContent = parserState.parseInitContent(bulletIndentSize, firstLineText, startLineIdx)\n    const listItemChildren = parserState.parseBodyNodes(bulletIndentSize, 'BulletListItem', initContent)\n\n    const endLineIdx = parserState.lineIdx\n    return new RstBulletListItem(parserState.registrar, { startLineIdx, endLineIdx }, listItemChildren, bulletValue)\n}\n","import { RstDefinitionList } from '../../RstNode/List/DefinitionList.ts'\nimport { RstDefinitionListItem } from '../../RstNode/List/DefinitionListItem.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nconst definitionListItemRe = /^[ ]*(?!\\.\\.)(?<lineText>.+)$/\n\nexport const definitionListParser: RstNodeParser<'DefinitionList'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        const listItems = new Array<RstDefinitionListItem>()\n        while (true) {\n            parserState.consumeAllNewLines()\n\n            const listItem = parseListItem(parserState, indentSize)\n            if (!listItem) {\n                break\n            }\n\n            listItems.push(listItem)\n        }\n\n        if (listItems.length === 0) {\n            return null\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstDefinitionList(parserState.registrar, { startLineIdx, endLineIdx }, listItems)\n    },\n}\n\nfunction parseListItem(parserState: RstParserState, indentSize: number): RstDefinitionListItem | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    // Definition must be immediately after term and is indented\n    if (!parserState.peekTest(definitionListItemRe) || !parserState.peekIsIndented(indentSize + parserState.opts.inputIndentSize, 1)) {\n        return null\n    }\n\n    const termMatches = parserState.peekTest(definitionListItemRe)\n    if (!termMatches) {\n        return null\n    }\n\n    // Consume term that we've already peeked at and tested\n    parserState.consume()\n\n    const lineText = termMatches.groups?.lineText ?? ''\n    const termSrc = { startLineIdx, endLineIdx: startLineIdx + 1 }\n    const termAndClassifiers = parserState.parseInlineNodesWithDelimiter(lineText, termSrc, ' : ')\n    const term = termAndClassifiers[0]\n    const classifiers = termAndClassifiers.slice(1)\n\n    const definitionBodyNodes = parserState.parseBodyNodes(indentSize + parserState.opts.inputIndentSize, 'DefinitionListItem')\n    const endLineIdx = parserState.lineIdx\n    return new RstDefinitionListItem(parserState.registrar, { startLineIdx, endLineIdx }, term, classifiers, definitionBodyNodes)\n}\n","import { RstBulletListItem } from '../../RstNode/List/BulletListItem.ts'\nimport { RstEnumeratedList } from '../../RstNode/List/EnumeratedList.ts'\nimport type { RstEnumeratedListItem } from '../../RstNode/List/EnumeratedListItem.ts'\nimport { getEnumeratedListType, isSequentialBullet } from '../../RstNode/List/EnumeratedListType.ts'\nimport { romanUpperRe, romanLowerRe } from '../../utils/romanToInt.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nconst enumeratedListItemRe = new RegExp(\n    '^[ ]*' + // Whitespace at start\n    '(?<bulletAndSpace>' +\n        '\\\\(?' + // Opening parenthesis\n        '(?<bullet>' +\n            '[0-9]+' + // Arabic\n            '|' +\n            '[A-Za-z]' + // Alphabet\n            '|' +\n            '#' + // Auto enumerator\n            '|' +\n            romanUpperRe.source + // Roman Numerals (uppercase)\n            '|' +\n            romanLowerRe.source + // Roman Numerals (lowercase)\n        ')' +\n        '[)\\\\.]' + // Closing parenthesis or period\n        '[ ]+' + // Space\n    ')' +\n    '(?<firstLineText>.+)$', // Any char to end of line\n)\n\nexport const enumeratedListParser: RstNodeParser<'EnumeratedList'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        const listItems = new Array<RstEnumeratedListItem>()\n        while (true) {\n            parserState.consumeAllNewLines()\n\n            const prevBulletValue = listItems.at(-1)?.bullet\n            const listItem = parseListItem(parserState, indentSize, prevBulletValue)\n            if (!listItem) {\n                break\n            }\n\n            listItems.push(listItem)\n        }\n\n        // Failed to parse any bullet list items thus this is not a bullet list\n        if (listItems.length === 0) {\n            return null\n        }\n\n        const listType = getEnumeratedListType(listItems[0].bullet)\n        if (listType === null) {\n            return null\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstEnumeratedList(parserState.registrar, { startLineIdx, endLineIdx }, listItems, listType)\n    },\n}\n\nfunction parseListItem(parserState: RstParserState, indentSize: number, prevBulletValue?: string): RstEnumeratedListItem | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    const firstLineMatches = parserState.peekTest(enumeratedListItemRe)\n    if (!firstLineMatches) {\n        return null\n    }\n\n    const bulletValue = firstLineMatches.groups?.bullet ?? '' // Actual bullet excluding formating e.g. \"1. text\" extracts \"1\"\n    const bulletAndSpace = firstLineMatches.groups?.bulletAndSpace ?? ''\n    const bulletIndentSize = indentSize + bulletAndSpace.length\n\n    // Check second line (if exists) to see if this is a valid list vs ordinary paragraph that happens to start with same characters as a bullet\n    if (parserState.peekIsContent(1) && !parserState.peekTest(enumeratedListItemRe, 1) && !parserState.peekIsAtleastIndented(bulletIndentSize, 1)) {\n        return null\n    }\n\n    // Check if current bullet is sequential (e.g. 1,2,3)\n    if (!isSequentialBullet(bulletValue, prevBulletValue)) {\n        return null\n    }\n\n    // Consume first line that we've already peeked at and tested\n    parserState.consume()\n\n    const firstLineText = firstLineMatches.groups?.firstLineText ?? ''\n    const initContent = parserState.parseInitContent(bulletIndentSize, firstLineText, startLineIdx)\n    const listItemChildren = parserState.parseBodyNodes(bulletIndentSize, 'BulletListItem', initContent)\n\n    const endLineIdx = parserState.lineIdx\n    return new RstBulletListItem(parserState.registrar, { startLineIdx, endLineIdx }, listItemChildren, bulletValue)\n}\n","import { RstOptionList } from '../../RstNode/List/OptionList.ts'\nimport { RstOptionListItem, type CommandOption } from '../../RstNode/List/OptionListItem.ts'\nimport type { RstNodeParser } from '../RstParser.ts'\nimport type { RstParserState } from '../RstParserState.ts'\n\nconst optionListItemOptionArgRe = /[a-zA-Z][a-zA-Z0-9_-]*|<.+>/\n\nconst optionListItemOptionRe = new RegExp(\n    '(?<=(?:^|, ))' + // Must be preceded by start of line or \", \"\n    '(' +\n        `(-[a-zA-Z0-9])(?:( )(${optionListItemOptionArgRe.source}))?` + // Short form (delimiter must be space)\n    '|' +\n        `(--[a-zA-Z][a-zA-Z-]*)(?:( |=)(${optionListItemOptionArgRe.source}))?` + // Long form (delimiter can either be equals or space)\n    '|' +\n        '(\\\\/[A-Z])' + // DOS/VMS-style option\n    ')',\n)\n\nconst optionListItemRe = new RegExp(\n    '^[ ]*' + // Whitespace at start\n    optionListItemOptionRe.source + // Must match the start of an option\n    '.*$', // Any char to end of line\n)\n\nexport const optionListParser: RstNodeParser<'OptionList'> = {\n    parse: (parserState, indentSize) => {\n        const startLineIdx = parserState.lineIdx\n\n        const listItems = new Array<RstOptionListItem>()\n        while (true) {\n            parserState.consumeAllNewLines()\n\n            const listItem = parseListItem(parserState, indentSize)\n            if (!listItem) {\n                break\n            }\n\n            listItems.push(listItem)\n        }\n\n        if (listItems.length === 0) {\n            return null\n        }\n\n        const endLineIdx = parserState.lineIdx\n        return new RstOptionList(parserState.registrar, { startLineIdx, endLineIdx }, listItems)\n    },\n}\n\nfunction parseListItem(parserState: RstParserState, indentSize: number): RstOptionListItem | null {\n    const startLineIdx = parserState.lineIdx\n\n    if (!parserState.peekIsIndented(indentSize)) {\n        return null\n    }\n\n    const firstLineMatches = parserState.peekTest(optionListItemRe)\n    if (!firstLineMatches) {\n        return null\n    }\n\n    // Consume first line that we've already peeked at and tested\n    parserState.consume()\n\n    const options = new Array<CommandOption>()\n    const optionReWithState = new RegExp(optionListItemOptionRe, 'g')\n    const optionMatches = firstLineMatches[0].matchAll(optionReWithState)\n\n    // Advance parsedStrIdx to next non-whitespace char\n    // Afterwards, parsedStrIdx will point to the char after option\n    //\n    // -a   Output all.\n    //      |\n    //      parsedStrIdx (descStartIdx)\n    //\n    let parsedStrIdx = 0\n    for (const optionMatch of optionMatches) {\n        parsedStrIdx = (optionMatch.index ?? 0) + optionMatch[0].length\n\n        options.push({\n            name: optionMatch[2] ?? optionMatch[5] ?? optionMatch[8],\n            delimiter: optionMatch[3] ?? optionMatch[6],\n            rawArgName: optionMatch[4] ?? optionMatch[7],\n        })\n    }\n\n    const nextNonWhitespaceIdx = firstLineMatches[0].substring(parsedStrIdx).search(/\\S/)\n    const descStartIdx = parsedStrIdx + Math.max(nextNonWhitespaceIdx, 0)\n    const firstLineText = firstLineMatches[0].substring(descStartIdx)\n    const bodyIndentSize = parserState.peekNestedIndentSize(indentSize)\n    const initContent = parserState.parseInitContent(bodyIndentSize, firstLineText, startLineIdx)\n    const listItemChildren = parserState.parseBodyNodes(bodyIndentSize, 'OptionListItem', initContent)\n\n    const endLineIdx = parserState.lineIdx\n    return new RstOptionListItem(parserState.registrar, { startLineIdx, endLineIdx }, listItemChildren, options)\n}\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const paragraphGenerators = createNodeGenerators(\n    'Paragraph',\n\n    (generatorState, node) => {\n        const outputText = node.getOutputText(generatorState)\n        if (outputText === null) {\n            generatorState.writeLineHtmlComment(node.textContent)\n            return\n        }\n\n        generatorState.writeLineHtmlTag('p', node, () => {\n            generatorState.writeLine(outputText)\n        })\n    },\n\n    (generatorState, node) => {\n        const outputText = node.getOutputText(generatorState)\n        if (outputText === null) {\n            generatorState.writeLineMdComment(node.textContent)\n            return\n        }\n\n        generatorState.writeLine(outputText)\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Blockquote\n// ----------------------------------------------------------------------------\n\nexport const blockquoteGenerators = createNodeGenerators(\n    'Blockquote',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTag('blockquote', node, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.usePrefix({ val: '> ' }, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: BlockquoteAttribution\n// ----------------------------------------------------------------------------\n\nexport const blockquoteAttributonGenerators = createNodeGenerators(\n    'BlockquoteAttribution',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTag('footer', node, () => {\n            generatorState.writeLineHtmlTag('cite', node, () => {\n                generatorState.writeLineVisitor(() => {\n                    if (generatorState.opts.enableBlockQuoteAttributionDash) {\n                        generatorState.writeText('&mdash; ')\n                    }\n\n                    generatorState.visitNodes(node.children)\n                })\n            })\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLineVisitor(() => {\n            if (generatorState.opts.enableBlockQuoteAttributionDash) {\n                generatorState.writeText('--- ')\n            }\n\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\nimport { RstEnumeratedList } from '../../RstNode/List/EnumeratedList.ts'\nimport { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: BulletList\n// ----------------------------------------------------------------------------\n\nexport const bulletListGenerators = createNodeGenerators(\n    'BulletList',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTag('ul', node, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.visitNodes(node.children)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: BulletListItem\n// ----------------------------------------------------------------------------\n\nexport const bulletListItemGenerators = createNodeGenerators(\n    'BulletListItem',\n\n    (generatorState, node) => {\n        const attrs = new HtmlAttributeStore()\n        if (node.parent instanceof RstEnumeratedList && node.isFirstChild() && !node.isEnumeratedListFirstValue()) {\n            attrs.set('value', node.getEnumeratedListValue(generatorState).toString())\n        }\n\n        generatorState.writeLineHtmlTagWithAttr('li', node, attrs, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        const bullet = node.parent instanceof RstEnumeratedList\n            ? `${node.getEnumeratedListValue(generatorState)}. `\n            : `${node.bullet} `\n        const bulletWhitespace = ' '.repeat(bullet.length)\n\n        generatorState.usePrefix({\n            val: bullet,\n            replacementAfterOnce: bulletWhitespace,\n        }, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n","import { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: CitationDefGroup\n// ----------------------------------------------------------------------------\n\nexport const citationDefGroupGenerators = createNodeGenerators(\n    'CitationDefGroup',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('dl', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.citationDefGroup }), () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.visitNodes(node.children)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: CitationDef\n// ----------------------------------------------------------------------------\n\nexport const citationDefGenerators = createNodeGenerators(\n    'CitationDef',\n\n    (generatorState, node) => {\n        const backlinks = generatorState.resolveCitationDefBacklinks(node)\n\n        generatorState.writeLineHtmlTag('dt', node, () => {\n            generatorState.writeLineHtmlTagWithAttr('span', null, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.citationDef }), () => {\n                generatorState.writeLine(node.label)\n\n                if (backlinks.length > 0) {\n                    generatorState.writeLineHtmlTagWithAttr('span', null, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.citationDefBacklinks }), () => {\n                        for (const [idx, backlink] of backlinks.entries()) {\n                            generatorState.writeLine(`<a href=\"${backlink}\">[${idx + 1}]</a>`)\n                        }\n                    })\n                }\n            })\n        })\n\n        generatorState.writeLineHtmlTag('dd', null, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLine(`[^${node.nthOfType}]:`)\n        generatorState.useIndent(() => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n","import { sanitizeHtml } from '../../utils/sanitizeHtml.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const commentGenerators = createNodeGenerators(\n    'Comment',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlComment(sanitizeHtml(node.textContent))\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLineMdComment(sanitizeHtml(node.textContent))\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: DefinitionList\n// ----------------------------------------------------------------------------\n\nexport const definitionListGenerators = createNodeGenerators(\n    'DefinitionList',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTag('dl', node, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.visitNodes(node.children)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: DefinitionListItem\n// ----------------------------------------------------------------------------\n\nexport const definitionListItemGenerators = createNodeGenerators(\n    'DefinitionListItem',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTag('dt', node, () => {\n            generatorState.writeLineVisitor(() => {\n                for (const textNode of node.term) {\n                    generatorState.visitNode(textNode)\n                }\n\n                for (const classifier of node.classifiers) {\n                    generatorState.writeText(' ')\n                    generatorState.writeText(`<span class=\"${generatorState.opts.htmlClass.definitionListItemClassifier}\">`)\n\n                    for (const textNode of classifier) {\n                        generatorState.visitNode(textNode)\n                    }\n\n                    generatorState.writeText('</span>')\n                }\n            })\n        })\n\n        generatorState.writeLineHtmlTag('dd', node, () => {\n            generatorState.visitNodes(node.definition)\n        })\n    },\n\n    (generatorState, node) => {\n        // First line contains term\n        generatorState.writeLineVisitor(() => {\n            generatorState.writeText('**')\n\n            for (const textNode of node.term) {\n                generatorState.visitNode(textNode)\n            }\n\n            for (const classifier of node.classifiers) {\n                generatorState.writeText(' ')\n                generatorState.writeText('*')\n\n                for (const textNode of classifier) {\n                    generatorState.visitNode(textNode)\n                }\n\n                generatorState.writeText('*')\n            }\n\n            generatorState.writeText('**')\n        })\n\n        // Empty line between term and definition\n        generatorState.writeLine()\n\n        // Subsequent lines contain definitions\n        generatorState.visitNodes(node.definition)\n    },\n)\n","import { renderCodeBlockHtml } from '../../Plugins/Code/renderCodeBlockHtml.ts'\nimport { renderCodeBlockMd } from '../../Plugins/Code/renderCodeBlockMd.ts'\nimport { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const docTestBlockGenerators = createNodeGenerators(\n    'DoctestBlock',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('div', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.docTestBlock }), () => {\n            renderCodeBlockHtml(generatorState, 'python', node.rawTextContent, node)\n        })\n    },\n\n    (generatorState, node) => {\n        renderCodeBlockMd(generatorState, 'python', node.rawTextContent)\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const documentGenerators = createNodeGenerators(\n    'Document',\n\n    (generatorState, node) => {\n        if (node.docMeta) {\n            generatorState.writeLineHtmlComment(node.docMeta.toMapString())\n            generatorState.writeLine()\n        }\n\n        generatorState.visitNodes(node.children)\n    },\n\n    (generatorState, node) => {\n        if (node.docMeta) {\n            generatorState.writeLineMdComment(node.docMeta.toMapString())\n            generatorState.writeLine()\n        }\n\n        generatorState.visitNodes(node.children)\n    },\n)\n","import { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const enumeratedListGenerators = createNodeGenerators(\n    'EnumeratedList',\n\n    (generatorState, node) => {\n        const attrs = new HtmlAttributeStore()\n        switch (node.listType) {\n            case 'AlphabetUpper':\n                attrs.set('type', 'A')\n                break\n\n            case 'AlphabetLower':\n                attrs.set('type', 'a')\n                break\n\n            case 'RomanUpper':\n                attrs.set('type', 'I')\n                break\n\n            case 'RomanLower':\n                attrs.set('type', 'i')\n                break\n        }\n\n        generatorState.writeLineHtmlTagWithAttr('ol', node, attrs, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.visitNodes(node.children)\n    },\n)\n","import { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\nimport { normalizeSimpleName } from '../../SimpleName.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: FieldList\n// ----------------------------------------------------------------------------\n\nexport const fieldListGenerators = createNodeGenerators(\n    'FieldList',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('dl', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.fieldList }), () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.visitNodes(node.children)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: FieldListItem\n// ----------------------------------------------------------------------------\n\nexport const fieldListItemGenerators = createNodeGenerators(\n    'FieldListItem',\n\n    (generatorState, node) => {\n        const className = normalizeSimpleName(node.name.map((nameNode) => nameNode.textContent).join(''))\n        const attr = new HtmlAttributeStore({ class: className })\n\n        generatorState.writeLineHtmlTagWithAttr('dt', node, attr, () => {\n            generatorState.writeLineVisitor(() => {\n                generatorState.visitNodes(node.name)\n            })\n        })\n\n        generatorState.writeLineHtmlTagWithAttr('dd', node, attr, () => {\n            generatorState.visitNodes(node.body)\n        })\n    },\n\n    (generatorState, node) => {\n        // First line contains term\n        generatorState.writeLineVisitor(() => {\n            generatorState.writeText('**')\n\n            for (const textNode of node.name) {\n                generatorState.visitNode(textNode)\n            }\n\n            generatorState.writeText('**')\n        })\n\n        // Empty line between term and definition\n        generatorState.writeLine()\n\n        // Subsequent lines contain definitions\n        generatorState.visitNodes(node.body)\n    },\n)\n","import { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: FootnoteDefGroup\n// ----------------------------------------------------------------------------\n\nexport const footnoteDefGroupGenerators = createNodeGenerators(\n    'FootnoteDefGroup',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('dl', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.footnoteDefGroup }), () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.visitNodes(node.children)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: FootnoteDef\n// ----------------------------------------------------------------------------\n\nexport const footnoteDefGenerators = createNodeGenerators(\n    'FootnoteDef',\n\n    (generatorState, node) => {\n        const label = generatorState.resolveFootnoteDefLabel(node)\n        const backlinks = generatorState.resolveFootnoteDefBacklinks(node)\n\n        generatorState.writeLineHtmlTag('dt', node, () => {\n            generatorState.writeLineHtmlTagWithAttr('span', null, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.footnoteDef }), () => {\n                generatorState.writeLine(label)\n\n                if (backlinks.length > 0) {\n                    generatorState.writeLineHtmlTagWithAttr('span', null, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.footnoteDefBacklinks }), () => {\n                        for (const [idx, backlink] of backlinks.entries()) {\n                            generatorState.writeLine(`<a href=\"${backlink}\">[${idx + 1}]</a>`)\n                        }\n                    })\n                }\n            })\n        })\n\n        generatorState.writeLineHtmlTag('dd', null, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        const label = generatorState.resolveFootnoteDefLabel(node)\n\n        generatorState.writeLine(`[^${label}]:`)\n        generatorState.useIndent(() => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n","import { sanitizeHtml } from '../../utils/sanitizeHtml.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const hyperlinkRefGenerators = createNodeGenerators(\n    'HyperlinkRef',\n\n    (generatorState, node) => {\n        const url = generatorState.resolveHyperlinkRefToUrl(node)\n        generatorState.writeTextWithLinePrefix(`<a href=\"${url}\">${sanitizeHtml(node.label)}</a>`)\n    },\n\n    (generatorState, node) => {\n        const url = generatorState.resolveHyperlinkRefToUrl(node)\n        generatorState.writeTextWithLinePrefix(`[${sanitizeHtml(node.label)}](${url})`)\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const hyperlinkTargetGenerators = createNodeGenerators(\n    'HyperlinkTarget',\n\n    (generatorState, node) => {\n        const resolvedUrl = generatorState.resolveNodeToUrl(node)\n        generatorState.writeLineHtmlComment(`${node.toShortString()} resolvedUrl:\"${resolvedUrl}\"`)\n    },\n\n    (generatorState, node) => {\n        const resolvedUrl = generatorState.resolveNodeToUrl(node)\n        generatorState.writeLineMdComment(`${node.toShortString()} resolvedUrl:\"${resolvedUrl}\"`)\n    },\n)\n","import { sanitizeHtml } from '../../utils/sanitizeHtml.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const inlineInternalTargetGenerators = createNodeGenerators(\n    'InlineInternalTarget',\n\n    (generatorState, node) => {\n        const htmlId = generatorState.htmlAttrResolver.getNodeHtmlId(node)\n        generatorState.writeTextWithLinePrefix(`<span class=\"${generatorState.opts.htmlClass.inlineInternalTarget}\" id=\"${htmlId}\">${sanitizeHtml(node.textContent)}</span>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(sanitizeHtml(node.textContent))\n    },\n)\n","import { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const lineBlockGenerators = createNodeGenerators(\n    'LineBlock',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('div', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.lineBlock }), () => {\n            generatorState.useNoLineBreaksBetweenBlocks(() => {\n                generatorState.visitNodes(node.children)\n            })\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.usePrefix({ val: '> ' }, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n)\n\nexport const lineBlockLineGenerators = createNodeGenerators(\n    'LineBlockLine',\n\n    (generatorState, node) => {\n        const attrs = new HtmlAttributeStore({ class: generatorState.opts.htmlClass.lineBlockLine })\n\n        generatorState.writeLineHtmlTagWithAttrInSameLine('div', node, attrs, () => {\n            if (node.children.length > 0) {\n                generatorState.visitNodes(node.children)\n            } else {\n                generatorState.writeText('<br />')\n            }\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.writeLineVisitor(() => {\n            if (node.children.length > 0) {\n                generatorState.visitNodes(node.children)\n            } else {\n                generatorState.writeText('<br />')\n            }\n        })\n    },\n)\n","import { renderCodeBlockHtml } from '../../Plugins/Code/renderCodeBlockHtml.ts'\nimport { renderCodeBlockMd } from '../../Plugins/Code/renderCodeBlockMd.ts'\nimport { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const literalBlockGenerators = createNodeGenerators(\n    'LiteralBlock',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('div', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.literalBlock }), () => {\n            const language = generatorState.opts.defaultLiteralBlockLanguage\n            renderCodeBlockHtml(generatorState, language, node.rawTextContent, node)\n        })\n    },\n\n    (generatorState, node) => {\n        const language = generatorState.opts.defaultLiteralBlockLanguage\n        renderCodeBlockMd(generatorState, language, node.rawTextContent)\n    },\n)\n","import { HtmlAttributeStore } from '../HtmlAttributeStore.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\nimport { sanitizeHtml } from '../../utils/sanitizeHtml.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: OptionList\n// ----------------------------------------------------------------------------\n\nexport const optionListGenerators = createNodeGenerators(\n    'OptionList',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTagWithAttr('dl', node, new HtmlAttributeStore({ class: generatorState.opts.htmlClass.optionList }), () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        generatorState.visitNodes(node.children)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: OptionListItem\n// ----------------------------------------------------------------------------\n\nexport const optionListItemGenerators = createNodeGenerators(\n    'OptionListItem',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTag('dt', node, () => {\n            generatorState.writeLineVisitor(() => {\n                generatorState.writeText('<kbd>')\n\n                for (const [idx, option] of node.options.entries()) {\n                    if (idx > 0) {\n                        generatorState.writeText(', ')\n                    }\n\n                    generatorState.writeText(`<span class=\"${generatorState.opts.htmlClass.optionListItemOption}\">`)\n\n                    generatorState.writeText(sanitizeHtml(option.name))\n                    if (option.rawArgName && option.delimiter) {\n                        generatorState.writeText(option.delimiter)\n                        generatorState.writeText(`<var>${sanitizeHtml(option.rawArgName)}</var>`)\n                    }\n\n                    generatorState.writeText('</span>')\n                }\n\n                generatorState.writeText('</kbd>')\n            })\n        })\n\n        generatorState.writeLineHtmlTag('dd', node, () => {\n            generatorState.visitNodes(node.children)\n        })\n    },\n\n    (generatorState, node) => {\n        // First line contains option\n        generatorState.writeLineVisitor(() => {\n            generatorState.writeText('`')\n\n            for (const [idx, option] of node.options.entries()) {\n                if (idx > 0) {\n                    generatorState.writeText(', ')\n                }\n\n                generatorState.writeText(option.name)\n                if (option.rawArgName && option.delimiter) {\n                    generatorState.writeText(option.delimiter)\n                    generatorState.writeText(option.rawArgName) // Don't sanitize since this is written inside literal text\n                }\n            }\n\n            generatorState.writeText('`')\n        })\n\n        // Empty line between option and description\n        generatorState.writeLine()\n\n        // Subsequent lines contain description\n        generatorState.visitNodes(node.children)\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const sectionGenerators = createNodeGenerators(\n    'Section',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTag(`h${node.level}`, node, () => {\n            generatorState.writeLineVisitor(() => {\n                generatorState.visitNodes(node.children)\n            })\n        })\n    },\n\n    (generatorState, node) => {\n        const htmlId = generatorState.htmlAttrResolver.getNodeHtmlId(node)\n\n        generatorState.writeLineVisitor(() => {\n            generatorState.writeText('#'.repeat(node.level))\n            generatorState.writeText(' ')\n            generatorState.visitNodes(node.children)\n            generatorState.writeText(` {#${htmlId}}`)\n        })\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const substitutionDefGenerators = createNodeGenerators(\n    'SubstitutionDef',\n\n    (generatorState, node) => {\n        const replacementText = generatorState.getChildrenText(() => {\n            generatorState.writeLine(node.toShortString())\n            generatorState.useNoCommentMarkup(() => {\n                generatorState.useNoLineBreaksBetweenBlocks(() => {\n                    generatorState.visitNodes(node.children)\n                })\n            })\n        })\n\n        generatorState.writeLineHtmlComment(replacementText)\n    },\n\n    (generatorState, node) => {\n        const replacementText = generatorState.getChildrenText(() => {\n            generatorState.writeLine(node.toShortString())\n            generatorState.useNoCommentMarkup(() => {\n                generatorState.useNoLineBreaksBetweenBlocks(() => {\n                    generatorState.visitNodes(node.children)\n                })\n            })\n        })\n\n        generatorState.writeLineMdComment(replacementText)\n    },\n)\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n *   return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n *   return constructFrom(\n *     date, // Use constructor from the given date\n *     date.getTime() // Use the date value to create a new date\n *   );\n * }\n */\nexport function constructFrom(date, value) {\n  if (typeof date === \"function\") return date(value);\n\n  if (date && typeof date === \"object\" && constructFromSymbol in date)\n    return date[constructFromSymbol](value);\n\n  if (date instanceof Date) return new date.constructor(value);\n\n  return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n  // [TODO] Get rid of `toDate` or `constructFrom`?\n  return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n  return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n  defaultOptions = newOptions;\n}\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const _date = toDate(date, options?.in);\n  const day = _date.getDay();\n  const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n  _date.setDate(_date.getDate() - diff);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n  return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n\n  const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n  fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n  fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n  const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n  const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n  fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n  fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n  const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n  if (_date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (_date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n  const _date = toDate(date);\n  const utcDate = new Date(\n    Date.UTC(\n      _date.getFullYear(),\n      _date.getMonth(),\n      _date.getDate(),\n      _date.getHours(),\n      _date.getMinutes(),\n      _date.getSeconds(),\n      _date.getMilliseconds(),\n    ),\n  );\n  utcDate.setUTCFullYear(_date.getFullYear());\n  return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n  const normalize = constructFrom.bind(\n    null,\n    context || dates.find((date) => typeof date === \"object\"),\n  );\n  return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n  const _date = toDate(date, options?.in);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const laterStartOfDay = startOfDay(laterDate_);\n  const earlierStartOfDay = startOfDay(earlierDate_);\n\n  const laterTimestamp =\n    +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n  const earlierTimestamp =\n    +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n  // Round the number of days to the nearest integer because the number of\n  // milliseconds in a day is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n  const year = getISOWeekYear(date, options);\n  const fourthOfJanuary = constructFrom(options?.in || date, 0);\n  fourthOfJanuary.setFullYear(year, 0, 4);\n  fourthOfJanuary.setHours(0, 0, 0, 0);\n  return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n  return (\n    value instanceof Date ||\n    (typeof value === \"object\" &&\n      Object.prototype.toString.call(value) === \"[object Date]\")\n  );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n  return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n  const date_ = toDate(date, options?.in);\n  date_.setFullYear(date_.getFullYear(), 0, 1);\n  date_.setHours(0, 0, 0, 0);\n  return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"less than a second\",\n    other: \"less than {{count}} seconds\",\n  },\n\n  xSeconds: {\n    one: \"1 second\",\n    other: \"{{count}} seconds\",\n  },\n\n  halfAMinute: \"half a minute\",\n\n  lessThanXMinutes: {\n    one: \"less than a minute\",\n    other: \"less than {{count}} minutes\",\n  },\n\n  xMinutes: {\n    one: \"1 minute\",\n    other: \"{{count}} minutes\",\n  },\n\n  aboutXHours: {\n    one: \"about 1 hour\",\n    other: \"about {{count}} hours\",\n  },\n\n  xHours: {\n    one: \"1 hour\",\n    other: \"{{count}} hours\",\n  },\n\n  xDays: {\n    one: \"1 day\",\n    other: \"{{count}} days\",\n  },\n\n  aboutXWeeks: {\n    one: \"about 1 week\",\n    other: \"about {{count}} weeks\",\n  },\n\n  xWeeks: {\n    one: \"1 week\",\n    other: \"{{count}} weeks\",\n  },\n\n  aboutXMonths: {\n    one: \"about 1 month\",\n    other: \"about {{count}} months\",\n  },\n\n  xMonths: {\n    one: \"1 month\",\n    other: \"{{count}} months\",\n  },\n\n  aboutXYears: {\n    one: \"about 1 year\",\n    other: \"about {{count}} years\",\n  },\n\n  xYears: {\n    one: \"1 year\",\n    other: \"{{count}} years\",\n  },\n\n  overXYears: {\n    one: \"over 1 year\",\n    other: \"over {{count}} years\",\n  },\n\n  almostXYears: {\n    one: \"almost 1 year\",\n    other: \"almost {{count}} years\",\n  },\n};\n\nexport const formatDistance = (token, count, options) => {\n  let result;\n\n  const tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === \"string\") {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", count.toString());\n  }\n\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"in \" + result;\n    } else {\n      return result + \" ago\";\n    }\n  }\n\n  return result;\n};\n","export function buildFormatLongFn(args) {\n  return (options = {}) => {\n    // TODO: Remove String()\n    const width = options.width ? String(options.width) : args.defaultWidth;\n    const format = args.formats[width] || args.formats[args.defaultWidth];\n    return format;\n  };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n  full: \"EEEE, MMMM do, y\",\n  long: \"MMMM do, y\",\n  medium: \"MMM d, y\",\n  short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n  full: \"h:mm:ss a zzzz\",\n  long: \"h:mm:ss a z\",\n  medium: \"h:mm:ss a\",\n  short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: \"{{date}}, {{time}}\",\n  short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: \"full\",\n  }),\n\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: \"full\",\n  }),\n\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: \"full\",\n  }),\n};\n","const formatRelativeLocale = {\n  lastWeek: \"'last' eeee 'at' p\",\n  yesterday: \"'yesterday at' p\",\n  today: \"'today at' p\",\n  tomorrow: \"'tomorrow at' p\",\n  nextWeek: \"eeee 'at' p\",\n  other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n  formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n  return (value, options) => {\n    const context = options?.context ? String(options.context) : \"standalone\";\n\n    let valuesArray;\n    if (context === \"formatting\" && args.formattingValues) {\n      const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      const width = options?.width ? String(options.width) : defaultWidth;\n\n      valuesArray =\n        args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      const defaultWidth = args.defaultWidth;\n      const width = options?.width ? String(options.width) : args.defaultWidth;\n\n      valuesArray = args.values[width] || args.values[defaultWidth];\n    }\n    const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n    // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n    return valuesArray[index];\n  };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n  narrow: [\"B\", \"A\"],\n  abbreviated: [\"BC\", \"AD\"],\n  wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n  narrow: [\"1\", \"2\", \"3\", \"4\"],\n  abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n  wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n  narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n  abbreviated: [\n    \"Jan\",\n    \"Feb\",\n    \"Mar\",\n    \"Apr\",\n    \"May\",\n    \"Jun\",\n    \"Jul\",\n    \"Aug\",\n    \"Sep\",\n    \"Oct\",\n    \"Nov\",\n    \"Dec\",\n  ],\n\n  wide: [\n    \"January\",\n    \"February\",\n    \"March\",\n    \"April\",\n    \"May\",\n    \"June\",\n    \"July\",\n    \"August\",\n    \"September\",\n    \"October\",\n    \"November\",\n    \"December\",\n  ],\n};\n\nconst dayValues = {\n  narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n  short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n  abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  wide: [\n    \"Sunday\",\n    \"Monday\",\n    \"Tuesday\",\n    \"Wednesday\",\n    \"Thursday\",\n    \"Friday\",\n    \"Saturday\",\n  ],\n};\n\nconst dayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n};\n\nconst formattingDayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n  const number = Number(dirtyNumber);\n\n  // If ordinal numbers depend on context, for example,\n  // if they are different for different grammatical genders,\n  // use `options.unit`.\n  //\n  // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n  // 'day', 'hour', 'minute', 'second'.\n\n  const rem100 = number % 100;\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + \"st\";\n      case 2:\n        return number + \"nd\";\n      case 3:\n        return number + \"rd\";\n    }\n  }\n  return number + \"th\";\n};\n\nexport const localize = {\n  ordinalNumber,\n\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: \"wide\",\n  }),\n\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: \"wide\",\n    argumentCallback: (quarter) => quarter - 1,\n  }),\n\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: \"wide\",\n  }),\n\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: \"wide\",\n  }),\n\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: \"wide\",\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: \"wide\",\n  }),\n};\n","export function buildMatchFn(args) {\n  return (string, options = {}) => {\n    const width = options.width;\n\n    const matchPattern =\n      (width && args.matchPatterns[width]) ||\n      args.matchPatterns[args.defaultMatchWidth];\n    const matchResult = string.match(matchPattern);\n\n    if (!matchResult) {\n      return null;\n    }\n    const matchedString = matchResult[0];\n\n    const parsePatterns =\n      (width && args.parsePatterns[width]) ||\n      args.parsePatterns[args.defaultParseWidth];\n\n    const key = Array.isArray(parsePatterns)\n      ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n      : // [TODO] -- I challenge you to fix the type\n        findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n    let value;\n\n    value = args.valueCallback ? args.valueCallback(key) : key;\n    value = options.valueCallback\n      ? // [TODO] -- I challenge you to fix the type\n        options.valueCallback(value)\n      : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n\nfunction findKey(object, predicate) {\n  for (const key in object) {\n    if (\n      Object.prototype.hasOwnProperty.call(object, key) &&\n      predicate(object[key])\n    ) {\n      return key;\n    }\n  }\n  return undefined;\n}\n\nfunction findIndex(array, predicate) {\n  for (let key = 0; key < array.length; key++) {\n    if (predicate(array[key])) {\n      return key;\n    }\n  }\n  return undefined;\n}\n","export function buildMatchPatternFn(args) {\n  return (string, options = {}) => {\n    const matchResult = string.match(args.matchPattern);\n    if (!matchResult) return null;\n    const matchedString = matchResult[0];\n\n    const parseResult = string.match(args.parsePattern);\n    if (!parseResult) return null;\n    let value = args.valueCallback\n      ? args.valueCallback(parseResult[0])\n      : parseResult[0];\n\n    // [TODO] I challenge you to fix the type\n    value = options.valueCallback ? options.valueCallback(value) : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n  narrow: /^(b|a)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n  any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n  narrow: [\n    /^j/i,\n    /^f/i,\n    /^m/i,\n    /^a/i,\n    /^m/i,\n    /^j/i,\n    /^j/i,\n    /^a/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n\n  any: [\n    /^ja/i,\n    /^f/i,\n    /^mar/i,\n    /^ap/i,\n    /^may/i,\n    /^jun/i,\n    /^jul/i,\n    /^au/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n};\n\nconst matchDayPatterns = {\n  narrow: /^[smtwf]/i,\n  short: /^(su|mo|tu|we|th|fr|sa)/i,\n  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n  any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mi/i,\n    noon: /^no/i,\n    morning: /morning/i,\n    afternoon: /afternoon/i,\n    evening: /evening/i,\n    night: /night/i,\n  },\n};\n\nexport const match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: (value) => parseInt(value, 10),\n  }),\n\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: \"any\",\n    valueCallback: (index) => index + 1,\n  }),\n\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: \"any\",\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: \"any\",\n  }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n  code: \"en-US\",\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0 /* Sunday */,\n    firstWeekContainsDate: 1,\n  },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = differenceInCalendarDays(_date, startOfYear(_date));\n  const dayOfYear = diff + 1;\n  return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n  // Round the number of weeks to the nearest integer because the number of\n  // milliseconds in a week is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n\n  const defaultOptions = getDefaultOptions();\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n  firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n  firstWeekOfNextYear.setHours(0, 0, 0, 0);\n  const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n  const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n  firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n  firstWeekOfThisYear.setHours(0, 0, 0, 0);\n  const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n  if (+_date >= +startOfNextYear) {\n    return year + 1;\n  } else if (+_date >= +startOfThisYear) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const year = getWeekYear(date, options);\n  const firstWeek = constructFrom(options?.in || date, 0);\n  firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n  firstWeek.setHours(0, 0, 0, 0);\n  const _date = startOfWeek(firstWeek, options);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n  // Round the number of weeks to the nearest integer because the number of\n  // milliseconds in a week is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n  const sign = number < 0 ? \"-\" : \"\";\n  const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n  return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* |                                |\n * |  d  | Day of month                   |  D  |                                |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  m  | Minute                         |  M  | Month                          |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  y  | Year (abs)                     |  Y  |                                |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n  // Year\n  y(date, token) {\n    // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n    // | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n    // |----------|-------|----|-------|-------|-------|\n    // | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n    // | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n    // | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n    // | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n    // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n    const signedYear = date.getFullYear();\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    const year = signedYear > 0 ? signedYear : 1 - signedYear;\n    return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n  },\n\n  // Month\n  M(date, token) {\n    const month = date.getMonth();\n    return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n  },\n\n  // Day of the month\n  d(date, token) {\n    return addLeadingZeros(date.getDate(), token.length);\n  },\n\n  // AM or PM\n  a(date, token) {\n    const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n        return dayPeriodEnumValue.toUpperCase();\n      case \"aaa\":\n        return dayPeriodEnumValue;\n      case \"aaaaa\":\n        return dayPeriodEnumValue[0];\n      case \"aaaa\":\n      default:\n        return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n    }\n  },\n\n  // Hour [1-12]\n  h(date, token) {\n    return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n  },\n\n  // Hour [0-23]\n  H(date, token) {\n    return addLeadingZeros(date.getHours(), token.length);\n  },\n\n  // Minute\n  m(date, token) {\n    return addLeadingZeros(date.getMinutes(), token.length);\n  },\n\n  // Second\n  s(date, token) {\n    return addLeadingZeros(date.getSeconds(), token.length);\n  },\n\n  // Fraction of second\n  S(date, token) {\n    const numberOfDigits = token.length;\n    const milliseconds = date.getMilliseconds();\n    const fractionalSeconds = Math.trunc(\n      milliseconds * Math.pow(10, numberOfDigits - 3),\n    );\n    return addLeadingZeros(fractionalSeconds, token.length);\n  },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n  am: \"am\",\n  pm: \"pm\",\n  midnight: \"midnight\",\n  noon: \"noon\",\n  morning: \"morning\",\n  afternoon: \"afternoon\",\n  evening: \"evening\",\n  night: \"night\",\n};\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |\n * |  p! | Long localized time            |  P! | Long localized date            |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n  // Era\n  G: function (date, token, localize) {\n    const era = date.getFullYear() > 0 ? 1 : 0;\n    switch (token) {\n      // AD, BC\n      case \"G\":\n      case \"GG\":\n      case \"GGG\":\n        return localize.era(era, { width: \"abbreviated\" });\n      // A, B\n      case \"GGGGG\":\n        return localize.era(era, { width: \"narrow\" });\n      // Anno Domini, Before Christ\n      case \"GGGG\":\n      default:\n        return localize.era(era, { width: \"wide\" });\n    }\n  },\n\n  // Year\n  y: function (date, token, localize) {\n    // Ordinal number\n    if (token === \"yo\") {\n      const signedYear = date.getFullYear();\n      // Returns 1 for 1 BC (which is year 0 in JavaScript)\n      const year = signedYear > 0 ? signedYear : 1 - signedYear;\n      return localize.ordinalNumber(year, { unit: \"year\" });\n    }\n\n    return lightFormatters.y(date, token);\n  },\n\n  // Local week-numbering year\n  Y: function (date, token, localize, options) {\n    const signedWeekYear = getWeekYear(date, options);\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n    // Two digit year\n    if (token === \"YY\") {\n      const twoDigitYear = weekYear % 100;\n      return addLeadingZeros(twoDigitYear, 2);\n    }\n\n    // Ordinal number\n    if (token === \"Yo\") {\n      return localize.ordinalNumber(weekYear, { unit: \"year\" });\n    }\n\n    // Padding\n    return addLeadingZeros(weekYear, token.length);\n  },\n\n  // ISO week-numbering year\n  R: function (date, token) {\n    const isoWeekYear = getISOWeekYear(date);\n\n    // Padding\n    return addLeadingZeros(isoWeekYear, token.length);\n  },\n\n  // Extended year. This is a single number designating the year of this calendar system.\n  // The main difference between `y` and `u` localizers are B.C. years:\n  // | Year | `y` | `u` |\n  // |------|-----|-----|\n  // | AC 1 |   1 |   1 |\n  // | BC 1 |   1 |   0 |\n  // | BC 2 |   2 |  -1 |\n  // Also `yy` always returns the last two digits of a year,\n  // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n  u: function (date, token) {\n    const year = date.getFullYear();\n    return addLeadingZeros(year, token.length);\n  },\n\n  // Quarter\n  Q: function (date, token, localize) {\n    const quarter = Math.ceil((date.getMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"Q\":\n        return String(quarter);\n      // 01, 02, 03, 04\n      case \"QQ\":\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case \"Qo\":\n        return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"QQQ\":\n        return localize.quarter(quarter, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"QQQQQ\":\n        return localize.quarter(quarter, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"QQQQ\":\n      default:\n        return localize.quarter(quarter, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Stand-alone quarter\n  q: function (date, token, localize) {\n    const quarter = Math.ceil((date.getMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"q\":\n        return String(quarter);\n      // 01, 02, 03, 04\n      case \"qq\":\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case \"qo\":\n        return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"qqq\":\n        return localize.quarter(quarter, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"qqqqq\":\n        return localize.quarter(quarter, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"qqqq\":\n      default:\n        return localize.quarter(quarter, {\n          width: \"wide\",\n          context: \"standalone\",\n        });\n    }\n  },\n\n  // Month\n  M: function (date, token, localize) {\n    const month = date.getMonth();\n    switch (token) {\n      case \"M\":\n      case \"MM\":\n        return lightFormatters.M(date, token);\n      // 1st, 2nd, ..., 12th\n      case \"Mo\":\n        return localize.ordinalNumber(month + 1, { unit: \"month\" });\n      // Jan, Feb, ..., Dec\n      case \"MMM\":\n        return localize.month(month, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // J, F, ..., D\n      case \"MMMMM\":\n        return localize.month(month, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // January, February, ..., December\n      case \"MMMM\":\n      default:\n        return localize.month(month, { width: \"wide\", context: \"formatting\" });\n    }\n  },\n\n  // Stand-alone month\n  L: function (date, token, localize) {\n    const month = date.getMonth();\n    switch (token) {\n      // 1, 2, ..., 12\n      case \"L\":\n        return String(month + 1);\n      // 01, 02, ..., 12\n      case \"LL\":\n        return addLeadingZeros(month + 1, 2);\n      // 1st, 2nd, ..., 12th\n      case \"Lo\":\n        return localize.ordinalNumber(month + 1, { unit: \"month\" });\n      // Jan, Feb, ..., Dec\n      case \"LLL\":\n        return localize.month(month, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // J, F, ..., D\n      case \"LLLLL\":\n        return localize.month(month, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // January, February, ..., December\n      case \"LLLL\":\n      default:\n        return localize.month(month, { width: \"wide\", context: \"standalone\" });\n    }\n  },\n\n  // Local week of year\n  w: function (date, token, localize, options) {\n    const week = getWeek(date, options);\n\n    if (token === \"wo\") {\n      return localize.ordinalNumber(week, { unit: \"week\" });\n    }\n\n    return addLeadingZeros(week, token.length);\n  },\n\n  // ISO week of year\n  I: function (date, token, localize) {\n    const isoWeek = getISOWeek(date);\n\n    if (token === \"Io\") {\n      return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n    }\n\n    return addLeadingZeros(isoWeek, token.length);\n  },\n\n  // Day of the month\n  d: function (date, token, localize) {\n    if (token === \"do\") {\n      return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n    }\n\n    return lightFormatters.d(date, token);\n  },\n\n  // Day of year\n  D: function (date, token, localize) {\n    const dayOfYear = getDayOfYear(date);\n\n    if (token === \"Do\") {\n      return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n    }\n\n    return addLeadingZeros(dayOfYear, token.length);\n  },\n\n  // Day of week\n  E: function (date, token, localize) {\n    const dayOfWeek = date.getDay();\n    switch (token) {\n      // Tue\n      case \"E\":\n      case \"EE\":\n      case \"EEE\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"EEEEE\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"EEEEEE\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"EEEE\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Local day of week\n  e: function (date, token, localize, options) {\n    const dayOfWeek = date.getDay();\n    const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (Nth day of week with current locale or weekStartsOn)\n      case \"e\":\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case \"ee\":\n        return addLeadingZeros(localDayOfWeek, 2);\n      // 1st, 2nd, ..., 7th\n      case \"eo\":\n        return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n      case \"eee\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"eeeee\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"eeeeee\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"eeee\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Stand-alone local day of week\n  c: function (date, token, localize, options) {\n    const dayOfWeek = date.getDay();\n    const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (same as in `e`)\n      case \"c\":\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case \"cc\":\n        return addLeadingZeros(localDayOfWeek, token.length);\n      // 1st, 2nd, ..., 7th\n      case \"co\":\n        return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n      case \"ccc\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // T\n      case \"ccccc\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // Tu\n      case \"cccccc\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"standalone\",\n        });\n      // Tuesday\n      case \"cccc\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"standalone\",\n        });\n    }\n  },\n\n  // ISO day of week\n  i: function (date, token, localize) {\n    const dayOfWeek = date.getDay();\n    const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n    switch (token) {\n      // 2\n      case \"i\":\n        return String(isoDayOfWeek);\n      // 02\n      case \"ii\":\n        return addLeadingZeros(isoDayOfWeek, token.length);\n      // 2nd\n      case \"io\":\n        return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n      // Tue\n      case \"iii\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"iiiii\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"iiiiii\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"iiii\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // AM or PM\n  a: function (date, token, localize) {\n    const hours = date.getHours();\n    const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"aaa\":\n        return localize\n          .dayPeriod(dayPeriodEnumValue, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          })\n          .toLowerCase();\n      case \"aaaaa\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"aaaa\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // AM, PM, midnight, noon\n  b: function (date, token, localize) {\n    const hours = date.getHours();\n    let dayPeriodEnumValue;\n    if (hours === 12) {\n      dayPeriodEnumValue = dayPeriodEnum.noon;\n    } else if (hours === 0) {\n      dayPeriodEnumValue = dayPeriodEnum.midnight;\n    } else {\n      dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n    }\n\n    switch (token) {\n      case \"b\":\n      case \"bb\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"bbb\":\n        return localize\n          .dayPeriod(dayPeriodEnumValue, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          })\n          .toLowerCase();\n      case \"bbbbb\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"bbbb\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // in the morning, in the afternoon, in the evening, at night\n  B: function (date, token, localize) {\n    const hours = date.getHours();\n    let dayPeriodEnumValue;\n    if (hours >= 17) {\n      dayPeriodEnumValue = dayPeriodEnum.evening;\n    } else if (hours >= 12) {\n      dayPeriodEnumValue = dayPeriodEnum.afternoon;\n    } else if (hours >= 4) {\n      dayPeriodEnumValue = dayPeriodEnum.morning;\n    } else {\n      dayPeriodEnumValue = dayPeriodEnum.night;\n    }\n\n    switch (token) {\n      case \"B\":\n      case \"BB\":\n      case \"BBB\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"BBBBB\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"BBBB\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Hour [1-12]\n  h: function (date, token, localize) {\n    if (token === \"ho\") {\n      let hours = date.getHours() % 12;\n      if (hours === 0) hours = 12;\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return lightFormatters.h(date, token);\n  },\n\n  // Hour [0-23]\n  H: function (date, token, localize) {\n    if (token === \"Ho\") {\n      return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n    }\n\n    return lightFormatters.H(date, token);\n  },\n\n  // Hour [0-11]\n  K: function (date, token, localize) {\n    const hours = date.getHours() % 12;\n\n    if (token === \"Ko\") {\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n\n  // Hour [1-24]\n  k: function (date, token, localize) {\n    let hours = date.getHours();\n    if (hours === 0) hours = 24;\n\n    if (token === \"ko\") {\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n\n  // Minute\n  m: function (date, token, localize) {\n    if (token === \"mo\") {\n      return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n    }\n\n    return lightFormatters.m(date, token);\n  },\n\n  // Second\n  s: function (date, token, localize) {\n    if (token === \"so\") {\n      return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n    }\n\n    return lightFormatters.s(date, token);\n  },\n\n  // Fraction of second\n  S: function (date, token) {\n    return lightFormatters.S(date, token);\n  },\n\n  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n  X: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    if (timezoneOffset === 0) {\n      return \"Z\";\n    }\n\n    switch (token) {\n      // Hours and optional minutes\n      case \"X\":\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XX`\n      case \"XXXX\":\n      case \"XX\": // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XXX`\n      case \"XXXXX\":\n      case \"XXX\": // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n  x: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Hours and optional minutes\n      case \"x\":\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xx`\n      case \"xxxx\":\n      case \"xx\": // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xxx`\n      case \"xxxxx\":\n      case \"xxx\": // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (GMT)\n  O: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case \"O\":\n      case \"OO\":\n      case \"OOO\":\n        return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n      // Long\n      case \"OOOO\":\n      default:\n        return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (specific non-location)\n  z: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case \"z\":\n      case \"zz\":\n      case \"zzz\":\n        return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n      // Long\n      case \"zzzz\":\n      default:\n        return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Seconds timestamp\n  t: function (date, token, _localize) {\n    const timestamp = Math.trunc(+date / 1000);\n    return addLeadingZeros(timestamp, token.length);\n  },\n\n  // Milliseconds timestamp\n  T: function (date, token, _localize) {\n    return addLeadingZeros(+date, token.length);\n  },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n  const sign = offset > 0 ? \"-\" : \"+\";\n  const absOffset = Math.abs(offset);\n  const hours = Math.trunc(absOffset / 60);\n  const minutes = absOffset % 60;\n  if (minutes === 0) {\n    return sign + String(hours);\n  }\n  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n  if (offset % 60 === 0) {\n    const sign = offset > 0 ? \"-\" : \"+\";\n    return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n  }\n  return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n  const sign = offset > 0 ? \"-\" : \"+\";\n  const absOffset = Math.abs(offset);\n  const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n  const minutes = addLeadingZeros(absOffset % 60, 2);\n  return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n  switch (pattern) {\n    case \"P\":\n      return formatLong.date({ width: \"short\" });\n    case \"PP\":\n      return formatLong.date({ width: \"medium\" });\n    case \"PPP\":\n      return formatLong.date({ width: \"long\" });\n    case \"PPPP\":\n    default:\n      return formatLong.date({ width: \"full\" });\n  }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n  switch (pattern) {\n    case \"p\":\n      return formatLong.time({ width: \"short\" });\n    case \"pp\":\n      return formatLong.time({ width: \"medium\" });\n    case \"ppp\":\n      return formatLong.time({ width: \"long\" });\n    case \"pppp\":\n    default:\n      return formatLong.time({ width: \"full\" });\n  }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n  const matchResult = pattern.match(/(P+)(p+)?/) || [];\n  const datePattern = matchResult[1];\n  const timePattern = matchResult[2];\n\n  if (!timePattern) {\n    return dateLongFormatter(pattern, formatLong);\n  }\n\n  let dateTimeFormat;\n\n  switch (datePattern) {\n    case \"P\":\n      dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n      break;\n    case \"PP\":\n      dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n      break;\n    case \"PPP\":\n      dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n      break;\n    case \"PPPP\":\n    default:\n      dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n      break;\n  }\n\n  return dateTimeFormat\n    .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n    .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n  p: timeLongFormatter,\n  P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n  return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n  return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n  const _message = message(token, format, input);\n  console.warn(_message);\n  if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n  const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n  return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n  isProtectedDayOfYearToken,\n  isProtectedWeekYearToken,\n  warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n  /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit                            | Pattern | Result examples                   | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era                             | G..GGG  | AD, BC                            |       |\n * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 | GGGGG   | A, B                              |       |\n * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |\n * |                                 | yy      | 44, 01, 00, 17                    | 5     |\n * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |\n * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |\n * |                                 | yyyyy   | ...                               | 3,5   |\n * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |\n * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |\n * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |\n * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |\n * |                                 | YYYYY   | ...                               | 3,5   |\n * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |\n * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |\n * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |\n * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |\n * |                                 | RRRRR   | ...                               | 3,5,7 |\n * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |\n * |                                 | uu      | -43, 01, 1900, 2017               | 5     |\n * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |\n * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |\n * |                                 | uuuuu   | ...                               | 3,5   |\n * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |\n * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | QQ      | 01, 02, 03, 04                    |       |\n * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |\n * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | qq      | 01, 02, 03, 04                    |       |\n * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |\n * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |\n * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | MM      | 01, 02, ..., 12                   |       |\n * |                                 | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 | MMMM    | January, February, ..., December  | 2     |\n * |                                 | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |\n * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | LL      | 01, 02, ..., 12                   |       |\n * |                                 | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 | LLLL    | January, February, ..., December  | 2     |\n * |                                 | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | w       | 1, 2, ..., 53                     |       |\n * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |\n * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | II      | 01, 02, ..., 53                   | 7     |\n * | Day of month                    | d       | 1, 2, ..., 31                     |       |\n * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |\n * |                                 | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |\n * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |\n * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |\n * |                                 | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 | DDDD    | ...                               | 3     |\n * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |\n * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |\n * |                                 | ii      | 01, 02, ..., 07                   | 7     |\n * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |\n * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |\n * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |\n * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |\n * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | ee      | 02, 03, ..., 01                   |       |\n * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | cc      | 02, 03, ..., 01                   |       |\n * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          | a..aa   | AM, PM                            |       |\n * |                                 | aaa     | am, pm                            |       |\n * |                                 | aaaa    | a.m., p.m.                        | 2     |\n * |                                 | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |\n * |                                 | bbb     | am, pm, noon, midnight            |       |\n * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |\n * |                                 | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |\n * |                                 | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |\n * |                                 | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |\n * |                                 | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |\n * |                                 | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          | m       | 0, 1, ..., 59                     |       |\n * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | mm      | 00, 01, ..., 59                   |       |\n * | Second                          | s       | 0, 1, ..., 59                     |       |\n * |                                 | so      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | ss      | 00, 01, ..., 59                   |       |\n * | Fraction of second              | S       | 0, 1, ..., 9                      |       |\n * |                                 | SS      | 00, 01, ..., 99                   |       |\n * |                                 | SSS     | 000, 001, ..., 999                |       |\n * |                                 | SSSS    | ...                               | 3     |\n * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |\n * |                                 | XX      | -0800, +0530, Z                   |       |\n * |                                 | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |\n * |                                 | xx      | -0800, +0530, +0000               |       |\n * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |\n * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |\n * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |\n * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |\n * | Seconds timestamp               | t       | 512969520                         | 7     |\n * |                                 | tt      | ...                               | 3,7   |\n * | Milliseconds timestamp          | T       | 512969520900                      | 7     |\n * |                                 | TT      | ...                               | 3,7   |\n * | Long localized date             | P       | 04/29/1453                        | 7     |\n * |                                 | PP      | Apr 29, 1453                      | 7     |\n * |                                 | PPP     | April 29th, 1453                  | 7     |\n * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |\n * | Long localized time             | p       | 12:00 AM                          | 7     |\n * |                                 | pp      | 12:00:00 AM                       | 7     |\n * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |\n * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |\n * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |\n * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |\n * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |\n * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n *    the output will be the same as default pattern for this unit, usually\n *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n *    are marked with \"2\" in the last column of the table.\n *\n *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n *    The output will be padded with zeros to match the length of the pattern.\n *\n *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` always returns the last two digits of a year,\n *    while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n *    | Year | `yy` | `uu` |\n *    |------|------|------|\n *    | 1    |   01 |   01 |\n *    | 14   |   14 |   14 |\n *    | 376  |   76 |  376 |\n *    | 1453 |   53 | 1453 |\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n *    and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n *    so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `t`: seconds timestamp\n *    - `T`: milliseconds timestamp\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n *   locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n  const defaultOptions = getDefaultOptions();\n  const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const originalDate = toDate(date, options?.in);\n\n  if (!isValid(originalDate)) {\n    throw new RangeError(\"Invalid time value\");\n  }\n\n  let parts = formatStr\n    .match(longFormattingTokensRegExp)\n    .map((substring) => {\n      const firstCharacter = substring[0];\n      if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n        const longFormatter = longFormatters[firstCharacter];\n        return longFormatter(substring, locale.formatLong);\n      }\n      return substring;\n    })\n    .join(\"\")\n    .match(formattingTokensRegExp)\n    .map((substring) => {\n      // Replace two single quote characters with one single quote character\n      if (substring === \"''\") {\n        return { isToken: false, value: \"'\" };\n      }\n\n      const firstCharacter = substring[0];\n      if (firstCharacter === \"'\") {\n        return { isToken: false, value: cleanEscapedString(substring) };\n      }\n\n      if (formatters[firstCharacter]) {\n        return { isToken: true, value: substring };\n      }\n\n      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n        throw new RangeError(\n          \"Format string contains an unescaped latin alphabet character `\" +\n            firstCharacter +\n            \"`\",\n        );\n      }\n\n      return { isToken: false, value: substring };\n    });\n\n  // invoke localize preprocessor (only for french locales at the moment)\n  if (locale.localize.preprocessor) {\n    parts = locale.localize.preprocessor(originalDate, parts);\n  }\n\n  const formatterOptions = {\n    firstWeekContainsDate,\n    weekStartsOn,\n    locale,\n  };\n\n  return parts\n    .map((part) => {\n      if (!part.isToken) return part.value;\n\n      const token = part.value;\n\n      if (\n        (!options?.useAdditionalWeekYearTokens &&\n          isProtectedWeekYearToken(token)) ||\n        (!options?.useAdditionalDayOfYearTokens &&\n          isProtectedDayOfYearToken(token))\n      ) {\n        warnOrThrowProtectedError(token, formatStr, String(date));\n      }\n\n      const formatter = formatters[token[0]];\n      return formatter(originalDate, token, locale.localize, formatterOptions);\n    })\n    .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n  const matched = input.match(escapedStringRegExp);\n\n  if (!matched) {\n    return input;\n  }\n\n  return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { format } from 'date-fns'\nimport { createImgTagHtml } from '../../Plugins/Image/createImgTagHtml.ts'\nimport { createImgTagMd } from '../../Plugins/Image/createImgTagMd.ts'\nimport { getImageInfo } from '../../Plugins/Image/getImageInfo.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\nimport { RstGeneratorError } from '../RstGeneratorError.ts'\n\nexport const substitutionRefGenerators = createNodeGenerators(\n    'SubstitutionRef',\n\n    (generatorState, node) => {\n        const substitutionDef = generatorState.substitutionResolver.resolveSubstitution(generatorState, node)\n        const replacementText = generatorState.getChildrenText(() => {\n            if (substitutionDef.children.length < 1) {\n                return\n            }\n\n            // First child is the replacement text of the substitution\n            // Other children (if any) customizes the substitution e.g. FieldList contains options for editing the replacementText\n            generatorState.visitNodes(substitutionDef.children[0].children)\n        })\n\n        switch (substitutionDef.directive) {\n            case 'image': {\n                const imgInfo = getImageInfo(generatorState, substitutionDef)\n                if (!imgInfo.attrs.has('alt')) {\n                    imgInfo.attrs.set('alt', node.textContent)\n                }\n\n                const imgTag = createImgTagHtml(imgInfo)\n                generatorState.writeText(imgTag)\n                break\n            }\n\n            case 'replace': {\n                generatorState.writeText(replacementText)\n                break\n            }\n\n            case 'unicode': {\n                generatorState.useUnicodeConversion(() => {\n                    generatorState.writeText(replacementText)\n                })\n                break\n            }\n\n            case 'date': {\n                const dateStr = format(new Date(), replacementText || generatorState.opts.substitutionDateFormat)\n                generatorState.writeText(dateStr)\n                break\n            }\n\n            default: {\n                throw new RstGeneratorError(generatorState, substitutionDef, 'Unhandled directive')\n            }\n        }\n    },\n\n    (generatorState, node) => {\n        const substitutionDef = generatorState.substitutionResolver.resolveSubstitution(generatorState, node)\n        const replacementText = generatorState.getChildrenText(() => {\n            if (substitutionDef.children.length < 1) {\n                return\n            }\n\n            // First child is the replacement text of the substitution\n            // Other children (if any) customizes the substitution e.g. FieldList contains options for editing the replacementText\n            generatorState.visitNodes(substitutionDef.children[0].children)\n        })\n\n        switch (substitutionDef.directive) {\n            case 'image': {\n                const imgInfo = getImageInfo(generatorState, substitutionDef)\n                if (!imgInfo.attrs.has('alt')) {\n                    imgInfo.attrs.set('alt', node.textContent)\n                }\n\n                const imgTag = createImgTagMd(imgInfo)\n                generatorState.writeText(imgTag)\n                break\n            }\n\n            case 'replace': {\n                generatorState.writeText(replacementText)\n                break\n            }\n\n            case 'unicode': {\n                generatorState.useUnicodeConversion(() => {\n                    generatorState.writeText(replacementText)\n                })\n                break\n            }\n\n            case 'date': {\n                const dateStr = format(new Date(), replacementText || generatorState.opts.substitutionDateFormat)\n                generatorState.writeText(dateStr)\n                break\n            }\n\n            default: {\n                throw new RstGeneratorError(generatorState, substitutionDef, 'Unhandled directive')\n            }\n        }\n    },\n)\n","import { sanitizeHtml } from '../../utils/sanitizeHtml.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Text\n// ----------------------------------------------------------------------------\n\nexport const textGenerators = createNodeGenerators(\n    'Text',\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(sanitizeHtml(node.textContent))\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(sanitizeHtml(node.textContent))\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: Emphasis\n// ----------------------------------------------------------------------------\n\nexport const emphasisGenerators = createNodeGenerators(\n    'Emphasis',\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<em>${sanitizeHtml(node.textContent)}</em>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`*${sanitizeHtml(node.textContent)}*`)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: StrongEmphasis\n// ----------------------------------------------------------------------------\n\nexport const strongEmphasisGenerators = createNodeGenerators(\n    'StrongEmphasis',\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`<strong>${sanitizeHtml(node.textContent)}</strong>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeTextWithLinePrefix(`**${sanitizeHtml(node.textContent)}**`)\n    },\n)\n\n// ----------------------------------------------------------------------------\n// MARK: InlineLiteral\n// ----------------------------------------------------------------------------\n\nexport const inlineLiteralGenerators = createNodeGenerators(\n    'InlineLiteral',\n\n    (generatorState, node) => {\n        generatorState.writeText(`<span class=\"${generatorState.opts.htmlClass.literalInline}\">${sanitizeHtml(node.textContent)}</span>`)\n    },\n\n    (generatorState, node) => {\n        generatorState.writeText(`\\`${node.textContent}\\``) // Don't sanitize since this is written inside literal text\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const transitionGenerators = createNodeGenerators(\n    'Transition',\n\n    (generatorState, node) => {\n        generatorState.writeLineHtmlTag('hr', node)\n    },\n\n    (generatorState) => {\n        generatorState.writeLine('---')\n    },\n)\n","import { sanitizeHtml } from '../../utils/sanitizeHtml.ts'\nimport { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const citationRefGenerators = createNodeGenerators(\n    'CitationRef',\n\n    (generatorState, node) => {\n        const refId = generatorState.htmlAttrResolver.getNodeHtmlId(node)\n        const targetDef = generatorState.resolveCitationDef(node)\n        const targetDefUrl = generatorState.resolveNodeToUrl(targetDef)\n        generatorState.writeTextWithLinePrefix(`<a href=\"${targetDefUrl}\" id=\"${refId}\" class=\"${generatorState.opts.htmlClass.citationRef}\">${sanitizeHtml(node.textContent)}</a>`)\n    },\n\n    (generatorState, node) => {\n        const label = node.nthOfType\n        generatorState.writeTextWithLinePrefix(`[^${label}]`)\n    },\n)\n","import { createNodeGenerators } from '../RstGenerator.ts'\n\nexport const footnoteRefGenerators = createNodeGenerators(\n    'FootnoteRef',\n\n    (generatorState, node) => {\n        const targetDef = generatorState.resolveFootnoteDef(node)\n        const targetDefUrl = generatorState.resolveNodeToUrl(targetDef)\n        const refId = generatorState.htmlAttrResolver.getNodeHtmlId(node)\n        const refLabel = generatorState.resolveFootnoteRefLabel(node)\n        generatorState.writeTextWithLinePrefix(`<a href=\"${targetDefUrl}\" id=\"${refId}\" class=\"${generatorState.opts.htmlClass.footnoteRef}\">${refLabel}</a>`)\n    },\n\n    (generatorState, node) => {\n        const refLabel = generatorState.resolveFootnoteRefLabel(node)\n        generatorState.writeTextWithLinePrefix(`[^${refLabel}]`)\n    },\n)\n","import type { RstNodeGenerator } from './Generator/RstGenerator.ts'\nimport type { RstNodeParser } from './Parser/RstParser.ts'\nimport type { RstCompilerPlugin } from './RstCompilerPlugin.ts'\nimport { onlyDirectivePlugin } from './Plugins/Only/OnlyPlugin.ts'\nimport { containerDirectivePlugins } from './Plugins/Container/ContainerPlugin.ts'\nimport { admonitionDirectivePlugins } from './Plugins/Admonition/AdmonitionPlugin.ts'\nimport { mathPlugins } from './Plugins/Math/MathPlugin.ts'\nimport { codePlugins } from './Plugins/Code/CodePlugin.ts'\nimport { jsDomainPlugins } from './Plugins/Domains/Js/JsPlugin.ts'\nimport { tabsDirectivePlugins } from './Plugins/Tabs/TabsPlugin.ts'\nimport { tocTreeDirectivePlugins } from './Plugins/TocTree/TocTreePlugin.ts'\nimport { centeredDirectivePlugins } from './Plugins/Centered/CenteredPlugin.ts'\nimport { htmlClassDirectivePlugins } from './Plugins/HtmlClass/HtmlClassPlugin.ts'\nimport { imageDirectivePlugins } from './Plugins/Image/ImagePlugin.ts'\nimport { metaDirectivePlugins } from './Plugins/Meta/MetaPlugin.ts'\nimport { tableDirectivePlugin } from './Plugins/Table/TablePlugin.ts'\nimport { rawTextPlugins } from './Plugins/RawText/RawTextPlugin.ts'\nimport { videoDirectivePlugins } from './Plugins/Video/VideoPlugin.ts'\nimport { pepRfcInterpretedTextPlugins } from './Plugins/InterpretedText/PepRfcPlugin.ts'\nimport { interpretedTextPlugins } from './Plugins/InterpretedText/InterpretedTextPlugin.ts'\nimport { rubricDirectivePlugin } from './Plugins/Rubric/RubricPlugin.ts'\nimport { contentsDirectivePlugins } from './Plugins/Contents/ContentsPlugin.ts'\nimport { citationGroupParser } from './Parser/NodeParsers/citationGroupParser.ts'\nimport { directiveParser } from './Parser/NodeParsers/directiveParser.ts'\nimport { footnoteDefGroupParser } from './Parser/NodeParsers/footnoteDefGroupParser.ts'\nimport { commentParser } from './Parser/NodeParsers/commentParser.ts'\nimport { hyperlinkTargetParser } from './Parser/NodeParsers/hyperlinkTargetParser.ts'\nimport { literalBlockParser } from './Parser/NodeParsers/literalBlockParser.ts'\nimport { paragraphParser } from './Parser/NodeParsers/paragraphParser.ts'\nimport { sectionParser } from './Parser/NodeParsers/sectionParser.ts'\nimport { substitutionDefParser } from './Parser/NodeParsers/substitutionDefParser.ts'\nimport { transitionParser } from './Parser/NodeParsers/transitionParser.ts'\nimport { blockquoteAttributionParser } from './Parser/NodeParsers/blockquoteAttributionParser.ts'\nimport { blockquoteParser } from './Parser/NodeParsers/blockquoteParser.ts'\nimport { doctestBlockParser } from './Parser/NodeParsers/doctestBlockParser.ts'\nimport { lineBlockParser } from './Parser/NodeParsers/lineBlockParser.ts'\nimport { tableGridParser } from './Parser/NodeParsers/tableGridParser.ts'\nimport { tableSimpleParser } from './Parser/NodeParsers/tableSimpleParser.ts'\nimport { bulletListParser } from './Parser/NodeParsers/bulletListParser.ts'\nimport { definitionListParser } from './Parser/NodeParsers/definitionListParser.ts'\nimport { enumeratedListParser } from './Parser/NodeParsers/enumeratedListParser.ts'\nimport { fieldListParser } from './Parser/NodeParsers/fieldListParser.ts'\nimport { optionListParser } from './Parser/NodeParsers/optionListParser.ts'\nimport { paragraphGenerators } from './Generator/NodeGenerators/paragraphGenerators.ts'\nimport { blockquoteAttributonGenerators, blockquoteGenerators } from './Generator/NodeGenerators/blockquoteGenerators.ts'\nimport { bulletListGenerators, bulletListItemGenerators } from './Generator/NodeGenerators/bulletListGenerators.ts'\nimport { citationDefGenerators, citationDefGroupGenerators } from './Generator/NodeGenerators/citationDefGenerators.ts'\nimport { commentGenerators } from './Generator/NodeGenerators/commentGenerators.ts'\nimport { definitionListGenerators, definitionListItemGenerators } from './Generator/NodeGenerators/definitionListGenerators.ts'\nimport { docTestBlockGenerators } from './Generator/NodeGenerators/docTestBlockGenerators.ts'\nimport { documentGenerators } from './Generator/NodeGenerators/documentGenerators.ts'\nimport { enumeratedListGenerators } from './Generator/NodeGenerators/enumeratedListGenerators.ts'\nimport { fieldListGenerators, fieldListItemGenerators } from './Generator/NodeGenerators/fieldListGenerators.ts'\nimport { footnoteDefGenerators, footnoteDefGroupGenerators } from './Generator/NodeGenerators/footnoteDefGenerators.ts'\nimport { hyperlinkRefGenerators } from './Generator/NodeGenerators/hyperlinkRefGenerators.ts'\nimport { hyperlinkTargetGenerators } from './Generator/NodeGenerators/hyperlinkTargetGenerators.ts'\nimport { inlineInternalTargetGenerators } from './Generator/NodeGenerators/inlineInternalTargetGenerators.ts'\nimport { lineBlockGenerators, lineBlockLineGenerators } from './Generator/NodeGenerators/lineBlockGenerators.ts'\nimport { literalBlockGenerators } from './Generator/NodeGenerators/literalBlockGenerators.ts'\nimport { optionListGenerators, optionListItemGenerators } from './Generator/NodeGenerators/optionListGenerators.ts'\nimport { sectionGenerators } from './Generator/NodeGenerators/sectionGenerators.ts'\nimport { substitutionDefGenerators } from './Generator/NodeGenerators/substitutionDefGenerators.ts'\nimport { substitutionRefGenerators } from './Generator/NodeGenerators/substitutionRefGenerators.ts'\nimport { tableCellGenerators, tableGenerators, tableRowGenerators } from './Generator/NodeGenerators/tableGenerators.ts'\nimport { emphasisGenerators, inlineLiteralGenerators, strongEmphasisGenerators, textGenerators } from './Generator/NodeGenerators/textGenerators.ts'\nimport { transitionGenerators } from './Generator/NodeGenerators/transitionGenerators.ts'\nimport { citationRefGenerators } from './Generator/NodeGenerators/citationRefGenerators.ts'\nimport { footnoteRefGenerators } from './Generator/NodeGenerators/footnoteRefGenerators.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Node Parsers\n// ----------------------------------------------------------------------------\n\n// Order matters here since this array determines priority\nexport const nodeParsers: ReadonlyArray<RstNodeParser> = [\n    directiveParser,\n    footnoteDefGroupParser,\n    citationGroupParser,\n    substitutionDefParser,\n    hyperlinkTargetParser,\n    commentParser,\n\n    bulletListParser,\n    enumeratedListParser,\n    fieldListParser,\n    optionListParser,\n    definitionListParser,\n\n    literalBlockParser,\n    lineBlockParser,\n    blockquoteAttributionParser,\n    blockquoteParser,\n    doctestBlockParser,\n    tableGridParser,\n    tableSimpleParser,\n\n    sectionParser,\n    transitionParser,\n    paragraphParser,\n]\n\n// ----------------------------------------------------------------------------\n// MARK: Node Generators\n// ----------------------------------------------------------------------------\n\nexport const htmlNodeGenerators: ReadonlyArray<RstNodeGenerator> = [\n    documentGenerators.htmlGenerator,\n    sectionGenerators.htmlGenerator,\n    transitionGenerators.htmlGenerator,\n    paragraphGenerators.htmlGenerator,\n\n    bulletListGenerators.htmlGenerator,\n    bulletListItemGenerators.htmlGenerator,\n    enumeratedListGenerators.htmlGenerator,\n    definitionListGenerators.htmlGenerator,\n    definitionListItemGenerators.htmlGenerator,\n    fieldListGenerators.htmlGenerator,\n    fieldListItemGenerators.htmlGenerator,\n    optionListGenerators.htmlGenerator,\n    optionListItemGenerators.htmlGenerator,\n\n    literalBlockGenerators.htmlGenerator,\n    lineBlockGenerators.htmlGenerator,\n    lineBlockLineGenerators.htmlGenerator,\n    blockquoteGenerators.htmlGenerator,\n    blockquoteAttributonGenerators.htmlGenerator,\n    docTestBlockGenerators.htmlGenerator,\n    tableGenerators.htmlGenerator,\n    tableRowGenerators.htmlGenerator,\n    tableCellGenerators.htmlGenerator,\n\n    footnoteDefGenerators.htmlGenerator,\n    footnoteDefGroupGenerators.htmlGenerator,\n    citationDefGenerators.htmlGenerator,\n    citationDefGroupGenerators.htmlGenerator,\n    hyperlinkTargetGenerators.htmlGenerator,\n    substitutionDefGenerators.htmlGenerator,\n    commentGenerators.htmlGenerator,\n\n    textGenerators.htmlGenerator,\n    strongEmphasisGenerators.htmlGenerator,\n    emphasisGenerators.htmlGenerator,\n    inlineLiteralGenerators.htmlGenerator,\n    substitutionRefGenerators.htmlGenerator,\n    inlineInternalTargetGenerators.htmlGenerator,\n    footnoteRefGenerators.htmlGenerator,\n    citationRefGenerators.htmlGenerator,\n    hyperlinkRefGenerators.htmlGenerator,\n]\n\nexport const mdNodeGenerators: ReadonlyArray<RstNodeGenerator> = [\n    documentGenerators.mdGenerator,\n    sectionGenerators.mdGenerator,\n    transitionGenerators.mdGenerator,\n    paragraphGenerators.mdGenerator,\n\n    bulletListGenerators.mdGenerator,\n    bulletListItemGenerators.mdGenerator,\n    enumeratedListGenerators.mdGenerator,\n    definitionListGenerators.mdGenerator,\n    definitionListItemGenerators.mdGenerator,\n    fieldListGenerators.mdGenerator,\n    fieldListItemGenerators.mdGenerator,\n    optionListGenerators.mdGenerator,\n    optionListItemGenerators.mdGenerator,\n\n    literalBlockGenerators.mdGenerator,\n    lineBlockGenerators.mdGenerator,\n    lineBlockLineGenerators.mdGenerator,\n    blockquoteGenerators.mdGenerator,\n    blockquoteAttributonGenerators.mdGenerator,\n    docTestBlockGenerators.mdGenerator,\n    tableGenerators.mdGenerator,\n    tableRowGenerators.mdGenerator,\n    tableCellGenerators.mdGenerator,\n\n    footnoteDefGenerators.mdGenerator,\n    footnoteDefGroupGenerators.mdGenerator,\n    citationDefGenerators.mdGenerator,\n    citationDefGroupGenerators.mdGenerator,\n    hyperlinkTargetGenerators.mdGenerator,\n    substitutionDefGenerators.mdGenerator,\n    commentGenerators.mdGenerator,\n\n    textGenerators.mdGenerator,\n    strongEmphasisGenerators.mdGenerator,\n    emphasisGenerators.mdGenerator,\n    inlineLiteralGenerators.mdGenerator,\n    substitutionRefGenerators.mdGenerator,\n    inlineInternalTargetGenerators.mdGenerator,\n    footnoteRefGenerators.mdGenerator,\n    citationRefGenerators.mdGenerator,\n    hyperlinkRefGenerators.mdGenerator,\n]\n\n// ----------------------------------------------------------------------------\n// MARK: Plugins\n// ----------------------------------------------------------------------------\n\nexport const htmlPlugins: ReadonlyArray<RstCompilerPlugin> = [\n    admonitionDirectivePlugins.htmlPlugin,\n    centeredDirectivePlugins.htmlPlugin,\n    codePlugins.htmlPlugin,\n    containerDirectivePlugins.htmlPlugin,\n    contentsDirectivePlugins.htmlPlugin,\n    htmlClassDirectivePlugins.htmlPlugin,\n    imageDirectivePlugins.htmlPlugin,\n    interpretedTextPlugins.htmlPlugin,\n    jsDomainPlugins.htmlPlugin,\n    mathPlugins.htmlPlugin,\n    metaDirectivePlugins.htmlPlugin,\n    onlyDirectivePlugin,\n    pepRfcInterpretedTextPlugins.htmlPlugin,\n    rawTextPlugins.htmlPlugin,\n    rubricDirectivePlugin.htmlPlugin,\n    tableDirectivePlugin.htmlPlugin,\n    tabsDirectivePlugins.htmlPlugin,\n    tocTreeDirectivePlugins.htmlPlugin,\n    videoDirectivePlugins.htmlPlugin,\n]\n\nexport const mdPlugins: ReadonlyArray<RstCompilerPlugin> = [\n    admonitionDirectivePlugins.mdPlugin,\n    centeredDirectivePlugins.mdPlugin,\n    codePlugins.mdPlugin,\n    containerDirectivePlugins.mdPlugin,\n    contentsDirectivePlugins.mdPlugin,\n    htmlClassDirectivePlugins.mdPlugin,\n    imageDirectivePlugins.mdPlugin,\n    interpretedTextPlugins.mdPlugin,\n    jsDomainPlugins.mdPlugin,\n    mathPlugins.mdPlugin,\n    metaDirectivePlugins.mdPlugin,\n    onlyDirectivePlugin,\n    pepRfcInterpretedTextPlugins.mdPlugin,\n    rawTextPlugins.mdPlugin,\n    rubricDirectivePlugin.mdPlugin,\n    tableDirectivePlugin.mdPlugin,\n    tabsDirectivePlugins.mdPlugin,\n    tocTreeDirectivePlugins.mdPlugin,\n    videoDirectivePlugins.mdPlugin,\n]\n","import { tokenizeInput } from './Lexer/tokenizeInput.ts'\nimport { type RstParserOutput, RstParserState } from './Parser/RstParserState.ts'\nimport type { RstDirectiveGenerator, RstInterpretedTextGenerator, RstNodeGenerator } from './Generator/RstGenerator.ts'\nimport { RstGeneratorState, type RstGeneratorInput, type RstGeneratorOutput } from './Generator/RstGeneratorState.ts'\nimport { type RstGeneratorOptions, createDefaultGeneratorOptions } from './Generator/RstGeneratorOptions.ts'\nimport { type RstParserOptions, createDefaultParserOptions } from './Parser/RstParserOptions.ts'\nimport { htmlNodeGenerators, htmlPlugins, mdNodeGenerators, mdPlugins, nodeParsers } from './Defaults.ts'\nimport type { RstNodeType } from './RstNode/RstNodeType.ts'\nimport type { RstNodeParser } from './Parser/RstParser.ts'\nimport type { RstCompilerPlugin } from './RstCompilerPlugin.ts'\nimport type { RstNodeJson } from './RstNode/RstNode.ts'\nimport { RstNodeRegistrar } from './Parser/RstNodeRegistrar.ts'\nimport { RstDocument } from './RstNode/Block/Document.ts'\nimport { HtmlAttrResolver } from './Parser/Resolver/HtmlAttrResolver.ts'\nimport { SimpleNameResolver } from './Parser/Resolver/SimpleNameResolver.ts'\nimport { SubstitutionResolver } from './Parser/Resolver/SubstitutionResolver.ts'\n\n// ----------------------------------------------------------------------------\n// MARK: Base\n// ----------------------------------------------------------------------------\n\nexport class RstCompiler {\n    readonly nodeParsers = [...nodeParsers]\n    readonly nodeGenerators = new Map<RstNodeType, RstNodeGenerator>()\n    readonly directiveGenerators = new Map<string, RstDirectiveGenerator>()\n    readonly interpretedTextGenerators = new Map<string, RstInterpretedTextGenerator>()\n    readonly plugins = new Array<RstCompilerPlugin>()\n\n    private readonly _outputWarnings = new Array<string>()\n    private readonly _outputErrors = new Array<string>()\n\n    useNodeParser(parser: RstNodeParser) {\n        this.nodeParsers.unshift(parser)\n    }\n\n    useNodeGenerator(generator: RstNodeGenerator) {\n        this.nodeGenerators.set(generator.nodeType, generator)\n    }\n\n    useDirectiveGenerator(generator: RstDirectiveGenerator) {\n        for (const directive of generator.directives) {\n            this.directiveGenerators.set(directive.toLowerCase(), generator)\n        }\n    }\n\n    useInterpretedTextGenerator(generator: RstInterpretedTextGenerator) {\n        for (const role of generator.roles) {\n            this.interpretedTextGenerators.set(role.toLowerCase(), generator)\n        }\n    }\n\n    usePlugin(plugin: RstCompilerPlugin) {\n        this.plugins.push(plugin)\n        plugin.onInstall?.(this)\n    }\n\n    notifyWarning(text: string) {\n        this._outputWarnings.push(text)\n    }\n\n    notifyError(text: string) {\n        this._outputErrors.push(text)\n    }\n\n    clearNotifications() {\n        this._outputWarnings.length = 0\n        this._outputErrors.length = 0\n    }\n\n    get outputWarnings(): ReadonlyArray<string> {\n        return this._outputWarnings\n    }\n\n    get outputErrors(): ReadonlyArray<string> {\n        return this._outputErrors\n    }\n\n    consoleLogProblems(opts?: { disableWarnings?: boolean; disableErrors?: boolean }): void {\n        if (!opts?.disableWarnings) {\n            for (const warning of this.outputWarnings) {\n                console.warn(warning)\n            }\n        }\n\n        if (!opts?.disableErrors) {\n            for (const error of this.outputErrors) {\n                console.error(error)\n            }\n        }\n    }\n\n    parse(input: string, parserOptions?: Partial<RstParserOptions>): RstParserOutput {\n        this.clearNotifications()\n\n        const opts = createDefaultParserOptions(parserOptions)\n        for (const plugin of this.plugins) {\n            plugin.onBeforeParse?.(opts)\n        }\n\n        if (opts.epilog) {\n            input += `\\n\\n${opts.epilog}`\n        }\n\n        const tokens = tokenizeInput(input)\n        const parserState = new RstParserState(opts, tokens, this)\n        const parserOutput = parserState.parserOutput\n\n        for (const plugin of this.plugins) {\n            plugin.onParse?.(parserOutput)\n        }\n\n        this.consoleLogProblems(opts)\n        return parserOutput\n    }\n\n    parseJson(rootJson: RstNodeJson, parserOptions?: Partial<RstParserOptions>): RstParserOutput {\n        this.clearNotifications()\n\n        const opts = createDefaultParserOptions(parserOptions)\n        for (const plugin of this.plugins) {\n            plugin.onBeforeParse?.(opts)\n        }\n\n        const registrar = new RstNodeRegistrar()\n        const root = registrar.reviveRstNodeFromJson(rootJson)\n        if (!(root instanceof RstDocument)) {\n            throw new Error('Failed to parseJson')\n        }\n\n        const parserOutput = this.createParserOutput(root)\n        for (const plugin of this.plugins) {\n            plugin.onParse?.(parserOutput)\n        }\n\n        this.consoleLogProblems(opts)\n        return parserOutput\n    }\n\n    generate(generatorInput: RstGeneratorInput, generatorOptions?: Partial<RstGeneratorOptions>): RstGeneratorOutput {\n        this.clearNotifications()\n\n        const opts = createDefaultGeneratorOptions(generatorOptions)\n        for (const plugin of this.plugins) {\n            plugin.onBeforeGenerate?.(opts)\n        }\n\n        const generatorState = new RstGeneratorState(opts, generatorInput, this)\n        const generatorOutput = generatorState.generatorOutput\n\n        for (const plugin of this.plugins) {\n            plugin.onGenerate?.(generatorOutput)\n        }\n\n        this.consoleLogProblems(generatorOptions)\n        return generatorOutput\n    }\n\n    createParserOutput(root: RstDocument): RstParserOutput {\n        // Need to create a bundle around root (with resolves) after parse() instead of before generate()\n        // because plugins' onParse hook need access to resolvers\n\n        const htmlAttrResolver = new HtmlAttrResolver()\n        const substitutionResolver = new SubstitutionResolver(root.findAllChildren('SubstitutionDef'))\n        const simpleNameResolver = new SimpleNameResolver(this, htmlAttrResolver, root)\n\n        return {\n            root,\n            htmlAttrResolver,\n            substitutionResolver,\n            simpleNameResolver,\n        }\n    }\n\n    compile(input: string | RstParserOutput, parserOptions?: Partial<RstParserOptions>, generatorOptions?: Partial<RstGeneratorOptions>): RstGeneratorOutput {\n        const parserOutput = typeof input === 'string'\n            ? this.parse(input, parserOptions)\n            : input\n\n        const basePath = '/'\n        const docPath = 'index'\n        const generatorInput: RstGeneratorInput = {\n            basePath,\n            currentDocPath: docPath,\n            docs: [\n                {\n                    docPath,\n                    parserOutput,\n                },\n            ],\n        }\n\n        return this.generate(generatorInput, generatorOptions)\n    }\n}\n\n// ----------------------------------------------------------------------------\n// MARK: Html\n// ----------------------------------------------------------------------------\n\nexport class RstToHtmlCompiler extends RstCompiler {\n    constructor() {\n        super()\n\n        for (const generator of htmlNodeGenerators) {\n            this.useNodeGenerator(generator)\n        }\n\n        for (const plugin of htmlPlugins) {\n            this.usePlugin(plugin)\n        }\n    }\n}\n\n// ----------------------------------------------------------------------------\n// MARK: Markdown\n// ----------------------------------------------------------------------------\n\nexport class RstToMdCompiler extends RstCompiler {\n    constructor() {\n        super()\n\n        for (const generator of mdNodeGenerators) {\n            this.useNodeGenerator(generator)\n        }\n\n        for (const plugin of mdPlugins) {\n            this.usePlugin(plugin)\n        }\n    }\n}\n"],"x_google_ignoreList":[65,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196],"mappings":";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