"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([["vendors-node_modules_jupyterlab_codemirror_lib_index_js"],{

/***/ "../node_modules/@jupyterlab/codemirror/lib/commands.js":
/*!**************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/commands.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   StateCommands: () => (/* binding */ StateCommands)\n/* harmony export */ });\n/* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/commands */ \"webpack/sharing/consume/default/@codemirror/commands/@codemirror/commands\");\n/* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/codeeditor */ \"webpack/sharing/consume/default/@jupyterlab/codeeditor/@jupyterlab/codeeditor\");\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n\n/**\n * Selector for a widget that can run code.\n */\nconst CODE_RUNNER_SELECTOR = '[data-jp-code-runner]';\n/**\n * Selector for a widget that can open a tooltip.\n */\nconst TOOLTIP_OPENER_SELECTOR = '.jp-CodeMirrorEditor:not(.jp-mod-has-primary-selection):not(.jp-mod-in-leading-whitespace):not(.jp-mod-completer-active)';\n/**\n * Selector for an active cell in edit mode.\n */\nconst ACTIVE_CELL_IN_EDIT_MODE_SELECTOR = '.jp-mod-editMode .jp-Cell.jp-mod-active';\n/**\n * CodeMirror commands namespace\n */\nvar StateCommands;\n(function (StateCommands) {\n    /**\n     * Indent or insert a tab as appropriate.\n     */\n    function indentMoreOrInsertTab(target) {\n        var _a;\n        if ((_a = target.dom.parentElement) === null || _a === void 0 ? void 0 : _a.classList.contains(_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__.COMPLETER_ENABLED_CLASS)) {\n            return false;\n        }\n        const arg = { state: target.state, dispatch: target.dispatch };\n        const from = target.state.selection.main.from;\n        const to = target.state.selection.main.to;\n        if (from != to) {\n            return (0,_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.indentMore)(arg);\n        }\n        const line = target.state.doc.lineAt(from);\n        const before = target.state.doc.slice(line.from, from).toString();\n        if (/^\\s*$/.test(before)) {\n            return (0,_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.indentMore)(arg);\n        }\n        else {\n            return (0,_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.insertTab)(arg);\n        }\n    }\n    StateCommands.indentMoreOrInsertTab = indentMoreOrInsertTab;\n    /**\n     * Insert new line if completer is not active.\n     */\n    function completerOrInsertNewLine(target) {\n        var _a;\n        if ((_a = target.dom.parentElement) === null || _a === void 0 ? void 0 : _a.classList.contains(_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__.COMPLETER_ACTIVE_CLASS)) {\n            // do not prevent default to allow completer `enter` action\n            return false;\n        }\n        const arg = { state: target.state, dispatch: target.dispatch };\n        return (0,_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.insertNewlineAndIndent)(arg);\n    }\n    StateCommands.completerOrInsertNewLine = completerOrInsertNewLine;\n    /**\n     * Prevent insertion of new line when running cell with Ctrl/Command + Enter\n     * @deprecated\n     */\n    function preventNewLineOnRun(target) {\n        if (target.dom.closest(CODE_RUNNER_SELECTOR)) {\n            return true;\n        }\n        return false;\n    }\n    StateCommands.preventNewLineOnRun = preventNewLineOnRun;\n    /**\n     * Insert a new line or run a cell with Ctrl/Command + Enter\n     */\n    function insertBlankLineOnRun(target) {\n        if (target.dom.closest(CODE_RUNNER_SELECTOR)) {\n            // do not prevent default to allow `run` action to be handled by lumino\n            return false;\n        }\n        else {\n            const arg = { state: target.state, dispatch: target.dispatch };\n            return (0,_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.insertBlankLine)(arg);\n        }\n    }\n    StateCommands.insertBlankLineOnRun = insertBlankLineOnRun;\n    /**\n     * Simplify selection but do not prevent default to allow switching to command mode.\n     */\n    function simplifySelectionAndMaybeSwitchToCommandMode(target) {\n        const arg = { state: target.state, dispatch: target.dispatch };\n        const preventDefault = (0,_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.simplifySelection)(arg);\n        if (target.dom.closest(ACTIVE_CELL_IN_EDIT_MODE_SELECTOR)) {\n            // do not prevent default to allow switching to command mode\n            return false;\n        }\n        else {\n            return preventDefault;\n        }\n    }\n    StateCommands.simplifySelectionAndMaybeSwitchToCommandMode = simplifySelectionAndMaybeSwitchToCommandMode;\n    /**\n     * Prevent dedenting when launching inspection request (a.k.a tooltip).\n     *\n     * This function should be removed once a better way to prevent default\n     * CodeMirror commands is implemented, as tracked in\n     * https://github.com/jupyterlab/jupyterlab/issues/15897\n     */\n    function dedentIfNotLaunchingTooltip(target) {\n        if (target.dom.closest(TOOLTIP_OPENER_SELECTOR)) {\n            return true;\n        }\n        return (0,_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.indentLess)(target);\n    }\n    StateCommands.dedentIfNotLaunchingTooltip = dedentIfNotLaunchingTooltip;\n})(StateCommands || (StateCommands = {}));\n//# sourceMappingURL=commands.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/commands.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/editor.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/editor.js ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   CodeMirrorEditor: () => (/* binding */ CodeMirrorEditor)\n/* harmony export */ });\n/* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/commands */ \"webpack/sharing/consume/default/@codemirror/commands/@codemirror/commands\");\n/* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @codemirror/language */ \"webpack/sharing/consume/default/@codemirror/language/@codemirror/language\");\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_codemirror_language__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @codemirror/state */ \"../node_modules/@codemirror/state/dist/index.js\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _extension__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./extension */ \"../node_modules/@jupyterlab/codemirror/lib/extension.js\");\n/* harmony import */ var _language__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./language */ \"../node_modules/@jupyterlab/codemirror/lib/language.js\");\n/* eslint-disable @typescript-eslint/ban-types */\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n\n\n\n/**\n * The class name added to CodeMirrorWidget instances.\n */\nconst EDITOR_CLASS = 'jp-CodeMirrorEditor';\n/**\n * The key code for the up arrow key.\n */\nconst UP_ARROW = 38;\n/**\n * The key code for the down arrow key.\n */\nconst DOWN_ARROW = 40;\n/**\n * CodeMirror editor.\n */\nclass CodeMirrorEditor {\n    /**\n     * Construct a CodeMirror editor.\n     */\n    constructor(options) {\n        var _a, _b, _c, _d, _e, _f;\n        /**\n         * A signal emitted when either the top or bottom edge is requested.\n         */\n        this.edgeRequested = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__.Signal(this);\n        this._isDisposed = false;\n        this._language = new _codemirror_state__WEBPACK_IMPORTED_MODULE_7__.Compartment();\n        this._uuid = '';\n        this._languages = (_a = options.languages) !== null && _a !== void 0 ? _a : new _language__WEBPACK_IMPORTED_MODULE_6__.EditorLanguageRegistry();\n        this._configurator =\n            (_d = (_b = options.extensionsRegistry) === null || _b === void 0 ? void 0 : _b.createNew({\n                ...options,\n                inline: (_c = options.inline) !== null && _c !== void 0 ? _c : false\n            })) !== null && _d !== void 0 ? _d : new _extension__WEBPACK_IMPORTED_MODULE_5__.ExtensionsHandler();\n        const host = (this.host = options.host);\n        host.classList.add(EDITOR_CLASS);\n        host.classList.add('jp-Editor');\n        host.addEventListener('focus', this, true);\n        host.addEventListener('blur', this, true);\n        host.addEventListener('scroll', this, true);\n        this._uuid = (_e = options.uuid) !== null && _e !== void 0 ? _e : _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__.UUID.uuid4();\n        const model = (this._model = options.model);\n        // Default keydown handler - it will have low priority\n        const onKeyDown = _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.domEventHandlers({\n            keydown: (event, view) => {\n                return this.onKeydown(event);\n            }\n        });\n        const updateListener = _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.updateListener.of((update) => {\n            this._onDocChanged(update);\n        });\n        this._editor = Private.createEditor(host, this._configurator, [\n            // We need to set the order to high, otherwise the keybinding for ArrowUp/ArrowDown\n            // will process the event shunting our edge detection code.\n            _codemirror_state__WEBPACK_IMPORTED_MODULE_7__.Prec.high(onKeyDown),\n            updateListener,\n            // Initialize with empty extension\n            this._language.of([]),\n            ...((_f = options.extensions) !== null && _f !== void 0 ? _f : [])\n        ], model.sharedModel.source);\n        this._onMimeTypeChanged();\n        this._onCursorActivity();\n        this._configurator.configChanged.connect(this.onConfigChanged, this);\n        model.mimeTypeChanged.connect(this._onMimeTypeChanged, this);\n    }\n    /**\n     * The uuid of this editor;\n     */\n    get uuid() {\n        return this._uuid;\n    }\n    set uuid(value) {\n        this._uuid = value;\n    }\n    /**\n     * Get the codemirror editor wrapped by the editor.\n     */\n    get editor() {\n        return this._editor;\n    }\n    /**\n     * Get the codemirror doc wrapped by the widget.\n     */\n    get doc() {\n        return this._editor.state.doc;\n    }\n    /**\n     * Get the number of lines in the editor.\n     */\n    get lineCount() {\n        return this.doc.lines;\n    }\n    /**\n     * Returns a model for this editor.\n     */\n    get model() {\n        return this._model;\n    }\n    /**\n     * The height of a line in the editor in pixels.\n     */\n    get lineHeight() {\n        return this._editor.defaultLineHeight;\n    }\n    /**\n     * The widget of a character in the editor in pixels.\n     */\n    get charWidth() {\n        return this._editor.defaultCharacterWidth;\n    }\n    /**\n     * Tests whether the editor is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources held by the widget.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        this.host.removeEventListener('focus', this, true);\n        this.host.removeEventListener('blur', this, true);\n        this.host.removeEventListener('scroll', this, true);\n        this._configurator.dispose();\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__.Signal.clearData(this);\n        this.editor.destroy();\n    }\n    /**\n     * Get a config option for the editor.\n     */\n    getOption(option) {\n        return this._configurator.getOption(option);\n    }\n    /**\n     * Whether the option exists or not.\n     */\n    hasOption(option) {\n        return this._configurator.hasOption(option);\n    }\n    /**\n     * Set a config option for the editor.\n     */\n    setOption(option, value) {\n        this._configurator.setOption(option, value);\n    }\n    /**\n     * Set config options for the editor.\n     *\n     * This method is preferred when setting several options. The\n     * options are set within an operation, which only performs\n     * the costly update at the end, and not after every option\n     * is set.\n     */\n    setOptions(options) {\n        this._configurator.setOptions(options);\n    }\n    /**\n     * Inject an extension into the editor\n     *\n     * @alpha\n     * @experimental\n     * @param ext CodeMirror 6 extension\n     */\n    injectExtension(ext) {\n        this._configurator.injectExtension(this._editor, ext);\n    }\n    /**\n     * Returns the content for the given line number.\n     */\n    getLine(line) {\n        // TODO: CM6 remove +1 when CM6 first line number has propagated\n        line = line + 1;\n        return line <= this.doc.lines ? this.doc.line(line).text : undefined;\n    }\n    /**\n     * Find an offset for the given position.\n     */\n    getOffsetAt(position) {\n        // TODO: CM6 remove +1 when CM6 first line number has propagated\n        return this.doc.line(position.line + 1).from + position.column;\n    }\n    /**\n     * Find a position for the given offset.\n     */\n    getPositionAt(offset) {\n        // TODO: CM6 remove -1 when CM6 first line number has propagated\n        const line = this.doc.lineAt(offset);\n        return { line: line.number - 1, column: offset - line.from };\n    }\n    /**\n     * Undo one edit (if any undo events are stored).\n     */\n    undo() {\n        this.model.sharedModel.undo();\n    }\n    /**\n     * Redo one undone edit.\n     */\n    redo() {\n        this.model.sharedModel.redo();\n    }\n    /**\n     * Clear the undo history.\n     */\n    clearHistory() {\n        this.model.sharedModel.clearUndoHistory();\n    }\n    /**\n     * Brings browser focus to this editor text.\n     */\n    focus() {\n        this._editor.focus();\n    }\n    /**\n     * Test whether the editor has keyboard focus.\n     */\n    hasFocus() {\n        return this._editor.hasFocus;\n    }\n    /**\n     * Explicitly blur the editor.\n     */\n    blur() {\n        this._editor.contentDOM.blur();\n    }\n    get state() {\n        return this._editor.state;\n    }\n    firstLine() {\n        // TODO: return 1 when CM6 first line number has propagated\n        return 0;\n    }\n    lastLine() {\n        return this.doc.lines - 1;\n    }\n    cursorCoords(where, mode) {\n        const selection = this.state.selection.main;\n        const pos = where ? selection.from : selection.to;\n        const rect = this.editor.coordsAtPos(pos);\n        return rect;\n    }\n    getRange(from, to, separator) {\n        const fromOffset = this.getOffsetAt(this._toPosition(from));\n        const toOffset = this.getOffsetAt(this._toPosition(to));\n        return this.state.sliceDoc(fromOffset, toOffset);\n    }\n    /**\n     * Reveal the given position in the editor.\n     */\n    revealPosition(position) {\n        const offset = this.getOffsetAt(position);\n        this._editor.dispatch({\n            effects: _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.scrollIntoView(offset)\n        });\n    }\n    /**\n     * Reveal the given selection in the editor.\n     */\n    revealSelection(selection) {\n        const start = this.getOffsetAt(selection.start);\n        const end = this.getOffsetAt(selection.end);\n        this._editor.dispatch({\n            effects: _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.scrollIntoView(_codemirror_state__WEBPACK_IMPORTED_MODULE_7__.EditorSelection.range(start, end))\n        });\n    }\n    /**\n     * Get the window coordinates given a cursor position.\n     */\n    getCoordinateForPosition(position) {\n        const offset = this.getOffsetAt(position);\n        const rect = this.editor.coordsAtPos(offset);\n        return rect;\n    }\n    /**\n     * Get the cursor position given window coordinates.\n     *\n     * @param coordinate - The desired coordinate.\n     *\n     * @returns The position of the coordinates, or null if not\n     *   contained in the editor.\n     */\n    getPositionForCoordinate(coordinate) {\n        const offset = this.editor.posAtCoords({\n            x: coordinate.left,\n            y: coordinate.top\n        });\n        return this.getPositionAt(offset) || null;\n    }\n    /**\n     * Returns the primary position of the cursor, never `null`.\n     */\n    getCursorPosition() {\n        const offset = this.state.selection.main.head;\n        return this.getPositionAt(offset);\n    }\n    /**\n     * Set the primary position of the cursor.\n     *\n     * #### Notes\n     * This will remove any secondary cursors.\n     *\n     * @deprecated options bias and origin are not used\n     */\n    setCursorPosition(position, options = {}) {\n        const offset = this.getOffsetAt(position);\n        this.editor.dispatch({\n            selection: { anchor: offset },\n            scrollIntoView: options.scroll === false ? false : true\n        });\n        // If the editor does not have focus, this cursor change\n        // will get screened out in _onCursorsChanged(). Make an\n        // exception for this method.\n        if (!this.editor.hasFocus) {\n            this.model.selections.set(this.uuid, this.getSelections());\n        }\n    }\n    /**\n     * Returns the primary selection, never `null`.\n     */\n    getSelection() {\n        return this.getSelections()[0];\n    }\n    /**\n     * Set the primary selection. This will remove any secondary cursors.\n     */\n    setSelection(selection) {\n        this.setSelections([selection]);\n    }\n    /**\n     * Gets the selections for all the cursors, never `null` or empty.\n     */\n    getSelections() {\n        const selections = this.state.selection.ranges; //= [{anchor: number, head: number}]\n        if (selections.length > 0) {\n            const sel = selections.map(r => ({\n                anchor: this._toCodeMirrorPosition(this.getPositionAt(r.from)),\n                head: this._toCodeMirrorPosition(this.getPositionAt(r.to))\n            }));\n            return sel.map(selection => this._toSelection(selection));\n        }\n        const cursor = this._toCodeMirrorPosition(this.getPositionAt(this.state.selection.main.head));\n        const selection = this._toSelection({ anchor: cursor, head: cursor });\n        return [selection];\n    }\n    /**\n     * Sets the selections for all the cursors, should not be empty.\n     * Cursors will be removed or added, as necessary.\n     * Passing an empty array resets a cursor position to the start of a document.\n     */\n    setSelections(selections) {\n        const sel = selections.length\n            ? selections.map(r => _codemirror_state__WEBPACK_IMPORTED_MODULE_7__.EditorSelection.range(this.getOffsetAt(r.start), this.getOffsetAt(r.end)))\n            : [_codemirror_state__WEBPACK_IMPORTED_MODULE_7__.EditorSelection.range(0, 0)];\n        this.editor.dispatch({ selection: _codemirror_state__WEBPACK_IMPORTED_MODULE_7__.EditorSelection.create(sel) });\n    }\n    /**\n     * Replaces the current selection with the given text.\n     *\n     * Behaviour for multiple selections is undefined.\n     *\n     * @param text The text to be inserted.\n     */\n    replaceSelection(text) {\n        const firstSelection = this.getSelections()[0];\n        this.model.sharedModel.updateSource(this.getOffsetAt(firstSelection.start), this.getOffsetAt(firstSelection.end), text);\n        const newPosition = this.getPositionAt(this.getOffsetAt(firstSelection.start) + text.length);\n        this.setSelection({ start: newPosition, end: newPosition });\n    }\n    /**\n     * Get a list of tokens for the current editor text content.\n     */\n    getTokens() {\n        const tokens = [];\n        const tree = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.ensureSyntaxTree)(this.state, this.doc.length);\n        if (tree) {\n            tree.iterate({\n                enter: (ref) => {\n                    if (ref.node.firstChild === null) {\n                        tokens.push({\n                            value: this.state.sliceDoc(ref.from, ref.to),\n                            offset: ref.from,\n                            type: ref.name\n                        });\n                    }\n                    return true;\n                }\n            });\n        }\n        return tokens;\n    }\n    /**\n     * Get the token at a given editor position.\n     */\n    getTokenAt(offset) {\n        const tree = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.ensureSyntaxTree)(this.state, offset);\n        let token = null;\n        if (tree) {\n            tree.iterate({\n                enter: (ref) => {\n                    // If a token has already been discovered, stop iterating.\n                    if (token) {\n                        return false;\n                    }\n                    // If it is not a leaf, keep iterating.\n                    if (ref.node.firstChild) {\n                        return true;\n                    }\n                    // If the relevant leaf token has been found, stop iterating.\n                    if (offset >= ref.from && offset <= ref.to) {\n                        token = {\n                            value: this.state.sliceDoc(ref.from, ref.to),\n                            offset: ref.from,\n                            type: ref.name\n                        };\n                        return false;\n                    }\n                    return true;\n                }\n            });\n        }\n        return token || { offset, value: '' };\n    }\n    /**\n     * Get the token a the cursor position.\n     */\n    getTokenAtCursor() {\n        return this.getTokenAt(this.state.selection.main.head);\n    }\n    /**\n     * Insert a new indented line at the current cursor position.\n     */\n    newIndentedLine() {\n        (0,_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.insertNewlineAndIndent)({\n            state: this.state,\n            dispatch: this.editor.dispatch\n        });\n    }\n    /**\n     * Execute a codemirror command on the editor.\n     *\n     * @param command - The name of the command to execute.\n     */\n    execCommand(command) {\n        command(this.editor);\n    }\n    onConfigChanged(configurator, changes) {\n        configurator.reconfigureExtensions(this._editor, changes);\n        // when customStyles change and the editor is not initialized\n        if (changes['customStyles'] && !changes['fontSize']) {\n            // update the state to change the gutter height\n            this.editor.setState(this.editor.state);\n        }\n    }\n    /**\n     * Handle keydown events from the editor.\n     */\n    onKeydown(event) {\n        const position = this.state.selection.main.head;\n        if (position === 0 && event.keyCode === UP_ARROW) {\n            if (!event.shiftKey) {\n                this.edgeRequested.emit('top');\n            }\n            return false;\n        }\n        const line = this.doc.lineAt(position).number;\n        if (line === 1 && event.keyCode === UP_ARROW) {\n            if (!event.shiftKey) {\n                this.edgeRequested.emit('topLine');\n            }\n            return false;\n        }\n        const length = this.doc.length;\n        if (position === length && event.keyCode === DOWN_ARROW) {\n            if (!event.shiftKey) {\n                this.edgeRequested.emit('bottom');\n            }\n            return false;\n        }\n        return false;\n    }\n    /**\n     * Handles a mime type change.\n     */\n    _onMimeTypeChanged() {\n        // TODO: should we provide a hook for when the mode is done being set?\n        this._languages\n            .getLanguage(this._model.mimeType)\n            .then(language => {\n            var _a;\n            this._editor.dispatch({\n                effects: this._language.reconfigure((_a = language === null || language === void 0 ? void 0 : language.support) !== null && _a !== void 0 ? _a : [])\n            });\n        })\n            .catch(reason => {\n            console.log(`Failed to load language for '${this._model.mimeType}'.`, reason);\n            this._editor.dispatch({\n                effects: this._language.reconfigure([])\n            });\n        });\n    }\n    /**\n     * Handles a cursor activity event.\n     */\n    _onCursorActivity() {\n        // Only add selections if the editor has focus. This avoids unwanted\n        // triggering of cursor activity due to collaborator actions.\n        if (this._editor.hasFocus) {\n            const selections = this.getSelections();\n            this.model.selections.set(this.uuid, selections);\n        }\n    }\n    /**\n     * Converts a code mirror selection to an editor selection.\n     */\n    _toSelection(selection) {\n        return {\n            uuid: this.uuid,\n            start: this._toPosition(selection.anchor),\n            end: this._toPosition(selection.head)\n        };\n    }\n    /**\n     * Convert a code mirror position to an editor position.\n     */\n    _toPosition(position) {\n        return {\n            line: position.line,\n            column: position.ch\n        };\n    }\n    /**\n     * Convert an editor position to a code mirror position.\n     */\n    _toCodeMirrorPosition(position) {\n        return {\n            line: position.line,\n            ch: position.column\n        };\n    }\n    /**\n     * Handles document changes.\n     */\n    _onDocChanged(update) {\n        if (update.transactions.length && update.transactions[0].selection) {\n            this._onCursorActivity();\n        }\n    }\n    /**\n     * Handle the DOM events for the editor.\n     *\n     * @param event - The DOM event sent to the editor.\n     *\n     * #### Notes\n     * This method implements the DOM `EventListener` interface and is\n     * called in response to events on the editor's DOM node. It should\n     * not be called directly by user code.\n     */\n    handleEvent(event) {\n        switch (event.type) {\n            case 'focus':\n                this._evtFocus(event);\n                break;\n            case 'blur':\n                this._evtBlur(event);\n                break;\n            default:\n                break;\n        }\n    }\n    /**\n     * Handle `focus` events for the editor.\n     */\n    _evtFocus(event) {\n        this.host.classList.add('jp-mod-focused');\n        // Update the selections on editor gaining focus because\n        // the onCursorActivity function filters usual cursor events\n        // based on the editor's focus.\n        this._onCursorActivity();\n    }\n    /**\n     * Handle `blur` events for the editor.\n     */\n    _evtBlur(event) {\n        this.host.classList.remove('jp-mod-focused');\n    }\n}\n/**\n * The namespace for module private data.\n */\nvar Private;\n(function (Private) {\n    function createEditor(host, editorConfig, additionalExtensions, doc) {\n        const extensions = editorConfig.getInitialExtensions();\n        extensions.push(...additionalExtensions);\n        const view = new _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView({\n            state: _codemirror_state__WEBPACK_IMPORTED_MODULE_7__.EditorState.create({\n                doc,\n                extensions\n            }),\n            parent: host\n        });\n        return view;\n    }\n    Private.createEditor = createEditor;\n})(Private || (Private = {}));\n//# sourceMappingURL=editor.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/editor.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/extension.js":
/*!***************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/extension.js ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   EditorExtensionRegistry: () => (/* binding */ EditorExtensionRegistry),\n/* harmony export */   ExtensionsHandler: () => (/* binding */ ExtensionsHandler)\n/* harmony export */ });\n/* harmony import */ var _codemirror_autocomplete__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @codemirror/autocomplete */ \"../node_modules/@codemirror/autocomplete/dist/index.js\");\n/* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/commands */ \"webpack/sharing/consume/default/@codemirror/commands/@codemirror/commands\");\n/* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @codemirror/language */ \"webpack/sharing/consume/default/@codemirror/language/@codemirror/language\");\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_codemirror_language__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @codemirror/state */ \"../node_modules/@codemirror/state/dist/index.js\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./commands */ \"../node_modules/@jupyterlab/codemirror/lib/commands.js\");\n/* harmony import */ var _extensions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./extensions */ \"../node_modules/@jupyterlab/codemirror/lib/extensions/index.js\");\n/* harmony import */ var _codemirror_search__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @codemirror/search */ \"webpack/sharing/consume/default/@codemirror/search/@codemirror/search\");\n/* harmony import */ var _codemirror_search__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_codemirror_search__WEBPACK_IMPORTED_MODULE_8__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n\n\n\n\n\n\n/**\n * The class name added to read only editor widgets.\n */\nconst READ_ONLY_CLASS = 'jp-mod-readOnly';\n/**\n * Editor configuration handler\n *\n * It stores the editor configuration and the editor extensions.\n * It also allows to inject new extensions into an editor.\n */\nclass ExtensionsHandler {\n    constructor({ baseConfiguration, config, defaultExtensions } = {}) {\n        this._configChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__.Signal(this);\n        this._disposed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__.Signal(this);\n        this._isDisposed = false;\n        this._immutables = new Set();\n        this._baseConfig = baseConfiguration !== null && baseConfiguration !== void 0 ? baseConfiguration : {};\n        this._config = config !== null && config !== void 0 ? config : {};\n        this._configurableBuilderMap = new Map(defaultExtensions);\n        const configurables = Object.keys(this._config).concat(Object.keys(this._baseConfig));\n        this._immutables = new Set([...this._configurableBuilderMap.keys()].filter(key => !configurables.includes(key)));\n    }\n    /**\n     * Signal triggered when the editor configuration changes.\n     * It provides the mapping of the new configuration (only those that changed).\n     *\n     * It should result in a call to `IExtensionsHandler.reconfigureExtensions`.\n     */\n    get configChanged() {\n        return this._configChanged;\n    }\n    /**\n     * A signal emitted when the object is disposed.\n     */\n    get disposed() {\n        return this._disposed;\n    }\n    /**\n     * Tests whether the object is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources held by the object.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        this._disposed.emit();\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__.Signal.clearData(this);\n    }\n    /**\n     * Get a config option for the editor.\n     */\n    getOption(option) {\n        var _a;\n        return (_a = this._config[option]) !== null && _a !== void 0 ? _a : this._baseConfig[option];\n    }\n    /**\n     * Whether the option exists or not.\n     */\n    hasOption(option) {\n        return (Object.keys(this._config).includes(option) ||\n            Object.keys(this._baseConfig).includes(option));\n    }\n    /**\n     * Set a config option for the editor.\n     *\n     * You will need to reconfigure the editor extensions by listening\n     * to `IExtensionsHandler.configChanged`.\n     */\n    setOption(option, value) {\n        // Don't bother setting the option if it is already the same.\n        if (this._config[option] !== value) {\n            this._config[option] = value;\n            this._configChanged.emit({ [option]: value });\n        }\n    }\n    /**\n     * Set a base config option for the editor.\n     *\n     * You will need to reconfigure the editor extensions by listening\n     * to `IExtensionsHandler.configChanged`.\n     */\n    setBaseOptions(options) {\n        const changed = this._getChangedOptions(options, this._baseConfig);\n        if (changed.length > 0) {\n            this._baseConfig = options;\n            const customizedKeys = Object.keys(this._config);\n            const notOverridden = changed.filter(k => !customizedKeys.includes(k));\n            if (notOverridden.length > 0) {\n                this._configChanged.emit(notOverridden.reduce((agg, key) => {\n                    agg[key] = this._baseConfig[key];\n                    return agg;\n                }, {}));\n            }\n        }\n    }\n    /**\n     * Set config options for the editor.\n     *\n     * You will need to reconfigure the editor extensions by listening\n     * to `EditorHandler.configChanged`.\n     *\n     * This method is preferred when setting several options. The\n     * options are set within an operation, which only performs\n     * the costly update at the end, and not after every option\n     * is set.\n     */\n    setOptions(options) {\n        const changed = this._getChangedOptions(options, this._config);\n        if (changed.length > 0) {\n            this._config = { ...options };\n            this._configChanged.emit(changed.reduce((agg, key) => {\n                var _a;\n                agg[key] = (_a = this._config[key]) !== null && _a !== void 0 ? _a : this._baseConfig[key];\n                return agg;\n            }, {}));\n        }\n    }\n    /**\n     * Reconfigures the extension mapped with key with the provided value.\n     *\n     * @param view Editor view\n     * @param key Parameter unique key\n     * @param value Parameter value to be applied\n     */\n    reconfigureExtension(view, key, value) {\n        const effect = this.getEffect(view.state, key, value);\n        if (effect) {\n            view.dispatch({\n                effects: [effect]\n            });\n        }\n    }\n    /**\n     * Reconfigures all the extensions mapped with the options from the\n     * provided partial configuration.\n     *\n     * @param view Editor view\n     * @param configuration Editor configuration\n     */\n    reconfigureExtensions(view, configuration) {\n        const effects = Object.keys(configuration)\n            .filter(key => this.has(key))\n            .map(key => this.getEffect(view.state, key, configuration[key]));\n        view.dispatch({\n            effects: effects.filter(effect => effect !== null)\n        });\n    }\n    /**\n     * Appends extensions to the top-level configuration of the\n     * editor.\n     *\n     * Injected extension cannot be removed.\n     *\n     * ### Notes\n     * You should prefer registering a IEditorExtensionFactory instead\n     * of this feature.\n     *\n     * @alpha\n     * @param view Editor view\n     * @param extension Editor extension to inject\n     */\n    injectExtension(view, extension) {\n        view.dispatch({\n            effects: _codemirror_state__WEBPACK_IMPORTED_MODULE_9__.StateEffect.appendConfig.of(extension)\n        });\n    }\n    /**\n     * Returns the list of initial extensions of an editor\n     * based on the configuration.\n     *\n     * @returns The initial editor extensions\n     */\n    getInitialExtensions() {\n        const configuration = { ...this._baseConfig, ...this._config };\n        const extensions = [...this._immutables]\n            .map(key => { var _a; return (_a = this.get(key)) === null || _a === void 0 ? void 0 : _a.instance(undefined); })\n            .filter(ext => ext);\n        for (const k of Object.keys(configuration)) {\n            const builder = this.get(k);\n            if (builder) {\n                const value = configuration[k];\n                extensions.push(builder.instance(value));\n            }\n        }\n        return extensions;\n    }\n    /**\n     * Get a extension builder\n     * @param key Extension unique identifier\n     * @returns The extension builder\n     */\n    get(key) {\n        return this._configurableBuilderMap.get(key);\n    }\n    /**\n     * Whether the editor has an extension for the identifier.\n     *\n     * @param key Extension unique identifier\n     * @returns Extension existence\n     */\n    has(key) {\n        return this._configurableBuilderMap.has(key);\n    }\n    getEffect(state, key, value) {\n        var _a;\n        const builder = this.get(key);\n        return (_a = builder === null || builder === void 0 ? void 0 : builder.reconfigure(value)) !== null && _a !== void 0 ? _a : null;\n    }\n    _getChangedOptions(newConfig, oldConfig) {\n        const changed = new Array();\n        const newKeys = new Array();\n        for (const [key, value] of Object.entries(newConfig)) {\n            newKeys.push(key);\n            if (oldConfig[key] !== value) {\n                changed.push(key);\n            }\n        }\n        // Add removed old keys\n        changed.push(...Object.keys(oldConfig).filter(k => !newKeys.includes(k)));\n        return changed;\n    }\n}\n/**\n * CodeMirror extensions registry\n */\nclass EditorExtensionRegistry {\n    constructor() {\n        this.configurationBuilder = new Map();\n        this.configurationSchema = {};\n        this.defaultOptions = {};\n        this.handlers = new Set();\n        this.immutableExtensions = new Set();\n        this._baseConfiguration = {};\n    }\n    /**\n     * Base editor configuration\n     *\n     * This is the default configuration optionally modified by the user;\n     * e.g. through user settings.\n     */\n    get baseConfiguration() {\n        return { ...this.defaultOptions, ...this._baseConfiguration };\n    }\n    set baseConfiguration(v) {\n        if (!_lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.JSONExt.deepEqual(v, this._baseConfiguration)) {\n            this._baseConfiguration = v;\n            for (const handler of this.handlers) {\n                handler.setBaseOptions(this.baseConfiguration);\n            }\n        }\n    }\n    /**\n     * Default editor configuration\n     *\n     * This is the default configuration as defined when extensions\n     * are registered.\n     */\n    get defaultConfiguration() {\n        // Only options with schema should be JSON serializable\n        // So we cannot use `JSONExt.deepCopy` on the default options.\n        return Object.freeze({ ...this.defaultOptions });\n    }\n    /**\n     * Editor configuration JSON schema\n     */\n    get settingsSchema() {\n        return Object.freeze(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.JSONExt.deepCopy(this.configurationSchema));\n    }\n    /**\n     * Add a default editor extension\n     *\n     * @template T Extension parameter type\n     * @param factory Extension factory\n     */\n    addExtension(factory) {\n        var _a;\n        if (this.configurationBuilder.has(factory.name)) {\n            throw new Error(`Extension named ${factory.name} is already registered.`);\n        }\n        this.configurationBuilder.set(factory.name, factory);\n        if (typeof factory.default != 'undefined') {\n            this.defaultOptions[factory.name] = factory.default;\n        }\n        if (factory.schema) {\n            this.configurationSchema[factory.name] = {\n                default: (_a = factory.default) !== null && _a !== void 0 ? _a : null,\n                ...factory.schema\n            };\n            this.defaultOptions[factory.name] =\n                this.configurationSchema[factory.name].default;\n        }\n    }\n    /**\n     * Create a new extensions handler for an editor\n     *\n     * @param options Extensions options and initial editor configuration\n     */\n    createNew(options) {\n        const configuration = new Array();\n        for (const [key, builder] of this.configurationBuilder.entries()) {\n            const extension = builder.factory(options);\n            if (extension) {\n                configuration.push([key, extension]);\n            }\n        }\n        const handler = new ExtensionsHandler({\n            baseConfiguration: this.baseConfiguration,\n            config: options.config,\n            defaultExtensions: configuration\n        });\n        this.handlers.add(handler);\n        handler.disposed.connect(() => {\n            this.handlers.delete(handler);\n        });\n        return handler;\n    }\n}\n/**\n * Editor extension registry namespace\n */\n(function (EditorExtensionRegistry) {\n    /**\n     * Dynamically configurable editor extension.\n     */\n    class ConfigurableExtension {\n        /**\n         * Create a dynamic editor extension.\n         *\n         * @param builder Extension builder\n         */\n        constructor(builder) {\n            this._compartment = new _codemirror_state__WEBPACK_IMPORTED_MODULE_9__.Compartment();\n            this._builder = builder;\n        }\n        /**\n         * Create an editor extension for the provided value.\n         *\n         * @param value Editor extension parameter value\n         * @returns The editor extension\n         */\n        instance(value) {\n            return this._compartment.of(this._builder(value));\n        }\n        /**\n         * Reconfigure an editor extension.\n         *\n         * @param value Editor extension value\n         * @returns Editor state effect\n         */\n        reconfigure(value) {\n            return this._compartment.reconfigure(this._builder(value));\n        }\n    }\n    /**\n     * Immutable editor extension class\n     */\n    class ImmutableExtension {\n        /**\n         * Create an immutable editor extension.\n         *\n         * @param extension Extension\n         */\n        constructor(extension) {\n            this._extension = extension;\n        }\n        /**\n         * Create an editor extension.\n         *\n         * @returns The editor extension\n         */\n        instance() {\n            return this._extension;\n        }\n        /**\n         * Reconfigure an editor extension.\n         *\n         * This is a no-op\n         */\n        reconfigure() {\n            // This is a no-op\n            return null;\n        }\n    }\n    /**\n     * Creates a dynamically configurable editor extension.\n     *\n     * @param builder Extension builder\n     * @return The extension\n     */\n    function createConfigurableExtension(builder) {\n        return new ConfigurableExtension(builder);\n    }\n    EditorExtensionRegistry.createConfigurableExtension = createConfigurableExtension;\n    /**\n     * Creates a configurable extension returning\n     * one of two extensions depending on a boolean value.\n     *\n     * @param truthy Extension to apply when the parameter is true\n     * @param falsy Extension to apply when the parameter is false\n     * @return The extension\n     */\n    function createConditionalExtension(truthy, falsy = []) {\n        return new ConfigurableExtension(value => value ? truthy : falsy);\n    }\n    EditorExtensionRegistry.createConditionalExtension = createConditionalExtension;\n    /**\n     * Creates an immutable extension.\n     *\n     * @param extension Immutable extension\n     * @return The extension\n     */\n    function createImmutableExtension(extension) {\n        return new ImmutableExtension(extension);\n    }\n    EditorExtensionRegistry.createImmutableExtension = createImmutableExtension;\n    /**\n     * Get the default editor extensions.\n     *\n     * @returns CodeMirror 6 extension factories\n     */\n    function getDefaultExtensions(options = {}) {\n        const { themes, translator } = options;\n        const trans = (translator !== null && translator !== void 0 ? translator : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__.nullTranslator).load('jupyterlab');\n        const extensions = [\n            Object.freeze({\n                name: 'autoClosingBrackets',\n                default: false,\n                factory: () => createConditionalExtension((0,_codemirror_autocomplete__WEBPACK_IMPORTED_MODULE_10__.closeBrackets)()),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Auto Closing Brackets')\n                }\n            }),\n            Object.freeze({\n                name: 'codeFolding',\n                default: false,\n                factory: () => createConditionalExtension((0,_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.foldGutter)()),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Code Folding')\n                }\n            }),\n            Object.freeze({\n                name: 'cursorBlinkRate',\n                default: 1200,\n                factory: () => createConfigurableExtension((value) => (0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.drawSelection)({ cursorBlinkRate: value })),\n                schema: {\n                    type: 'number',\n                    title: trans.__('Cursor blinking rate'),\n                    description: trans.__('Half-period in milliseconds used for cursor blinking. The default blink rate is 1200ms. By setting this to zero, blinking can be disabled.')\n                }\n            }),\n            Object.freeze({\n                name: 'highlightActiveLine',\n                default: false,\n                factory: () => createConditionalExtension((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.highlightActiveLine)()),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Highlight the active line')\n                }\n            }),\n            Object.freeze({\n                name: 'highlightSpecialCharacters',\n                default: true,\n                factory: () => createConditionalExtension((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.highlightSpecialChars)()),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Highlight special characters')\n                }\n            }),\n            Object.freeze({\n                name: 'highlightTrailingWhitespace',\n                default: false,\n                factory: () => createConditionalExtension((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.highlightTrailingWhitespace)()),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Highlight trailing white spaces')\n                }\n            }),\n            Object.freeze({\n                name: 'highlightWhitespace',\n                default: false,\n                factory: () => createConditionalExtension((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.highlightWhitespace)()),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Highlight white spaces')\n                }\n            }),\n            Object.freeze({\n                name: 'indentUnit',\n                default: '4',\n                factory: () => createConfigurableExtension((value) => value == 'Tab'\n                    ? _codemirror_language__WEBPACK_IMPORTED_MODULE_1__.indentUnit.of('\\t')\n                    : _codemirror_language__WEBPACK_IMPORTED_MODULE_1__.indentUnit.of(' '.repeat(parseInt(value, 10)))),\n                schema: {\n                    type: 'string',\n                    title: trans.__('Indentation unit'),\n                    description: trans.__('The indentation is a `Tab` or the number of spaces. This defaults to 4 spaces.'),\n                    enum: ['Tab', '1', '2', '4', '8']\n                }\n            }),\n            // Default keyboard shortcuts\n            // TODO at some point we may want to get this configurable\n            Object.freeze({\n                name: 'keymap',\n                default: [\n                    {\n                        key: 'Mod-Enter',\n                        run: _commands__WEBPACK_IMPORTED_MODULE_6__.StateCommands.insertBlankLineOnRun\n                    },\n                    {\n                        key: 'Enter',\n                        run: _commands__WEBPACK_IMPORTED_MODULE_6__.StateCommands.completerOrInsertNewLine\n                    },\n                    {\n                        key: 'Escape',\n                        run: _commands__WEBPACK_IMPORTED_MODULE_6__.StateCommands.simplifySelectionAndMaybeSwitchToCommandMode\n                    },\n                    ..._codemirror_commands__WEBPACK_IMPORTED_MODULE_0__.defaultKeymap.filter(binding => {\n                        // - Disable the default Mod-Enter handler as it always prevents default,\n                        //   preventing us from running cells with Ctrl + Enter. Instead we provide\n                        //   our own handler (insertBlankLineOnRun) which does not prevent default\n                        //   when used in code runner editors.\n                        // - Disable the default Shift-Mod-k handler because users prefer Ctrl+D\n                        //   for deleting lines, and because it prevents opening Table of Contents\n                        //   with Ctrl+Shift+K.\n                        // - Disable shortcuts for toggling comments (\"Mod-/\" and \"Alt-A\")\n                        //   as these as handled by lumino command\n                        // - Disable Escape handler because it prevents default and we\n                        //   want to run a cell action (switch to command mode) on Esc\n                        // - Disable default Enter handler because it prevents us from\n                        //   accepting a completer suggestion with Enter.\n                        return ![\n                            'Mod-Enter',\n                            'Shift-Mod-k',\n                            'Mod-/',\n                            'Alt-A',\n                            'Escape',\n                            'Enter'\n                        ].includes(binding.key);\n                    }),\n                    {\n                        key: 'Tab',\n                        run: _commands__WEBPACK_IMPORTED_MODULE_6__.StateCommands.indentMoreOrInsertTab,\n                        shift: _commands__WEBPACK_IMPORTED_MODULE_6__.StateCommands.dedentIfNotLaunchingTooltip\n                    }\n                ],\n                factory: () => createConfigurableExtension(value => _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.keymap.of(value))\n            }),\n            Object.freeze({\n                name: 'lineNumbers',\n                default: true,\n                factory: () => createConditionalExtension((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.lineNumbers)()),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Line Numbers')\n                }\n            }),\n            Object.freeze({\n                name: 'lineWrap',\n                factory: () => createConditionalExtension(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.lineWrapping),\n                default: true,\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Line Wrap')\n                }\n            }),\n            Object.freeze({\n                name: 'matchBrackets',\n                default: true,\n                factory: () => createConditionalExtension([\n                    (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.bracketMatching)(),\n                    // closeBracketsKeymap must have higher precedence over defaultKeymap\n                    _codemirror_state__WEBPACK_IMPORTED_MODULE_9__.Prec.high(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.keymap.of(_codemirror_autocomplete__WEBPACK_IMPORTED_MODULE_10__.closeBracketsKeymap))\n                ]),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Match Brackets')\n                }\n            }),\n            Object.freeze({\n                name: 'rectangularSelection',\n                default: true,\n                factory: () => createConditionalExtension([\n                    (0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.rectangularSelection)(),\n                    (0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.crosshairCursor)()\n                ]),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Rectangular selection'),\n                    description: trans.__('Rectangular (block) selection can be created by dragging the mouse pointer while holding the left mouse button and the Alt key. When the Alt key is pressed, a crosshair cursor will appear, indicating that the rectangular selection mode is active.')\n                }\n            }),\n            Object.freeze({\n                name: 'readOnly',\n                default: false,\n                factory: () => createConfigurableExtension((value) => [\n                    _codemirror_state__WEBPACK_IMPORTED_MODULE_9__.EditorState.readOnly.of(value),\n                    value\n                        ? _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.editorAttributes.of({ class: READ_ONLY_CLASS })\n                        : []\n                ])\n            }),\n            Object.freeze({\n                name: 'rulers',\n                default: [],\n                factory: () => createConfigurableExtension((value) => value.length > 0 ? (0,_extensions__WEBPACK_IMPORTED_MODULE_7__.rulers)(value) : []),\n                schema: {\n                    type: 'array',\n                    title: trans.__('Rulers'),\n                    items: {\n                        type: 'number',\n                        minimum: 0\n                    }\n                }\n            }),\n            Object.freeze({\n                name: 'extendSelection',\n                default: true,\n                factory: () => createConditionalExtension(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.keymap.of([\n                    {\n                        key: 'Mod-Shift-l',\n                        run: _codemirror_search__WEBPACK_IMPORTED_MODULE_8__.selectSelectionMatches,\n                        preventDefault: true\n                    }\n                ]))\n            }),\n            Object.freeze({\n                // Whether to activate the native CodeMirror search panel or not.\n                name: 'searchWithCM',\n                default: false,\n                factory: () => createConditionalExtension(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.keymap.of([\n                    {\n                        key: 'Mod-f',\n                        run: _codemirror_search__WEBPACK_IMPORTED_MODULE_8__.openSearchPanel,\n                        scope: 'editor search-panel'\n                    },\n                    {\n                        key: 'F3',\n                        run: _codemirror_search__WEBPACK_IMPORTED_MODULE_8__.findNext,\n                        shift: _codemirror_search__WEBPACK_IMPORTED_MODULE_8__.findPrevious,\n                        scope: 'editor search-panel',\n                        preventDefault: true\n                    },\n                    {\n                        key: 'Mod-g',\n                        run: _codemirror_search__WEBPACK_IMPORTED_MODULE_8__.findNext,\n                        shift: _codemirror_search__WEBPACK_IMPORTED_MODULE_8__.findPrevious,\n                        scope: 'editor search-panel',\n                        preventDefault: true\n                    },\n                    {\n                        key: 'Escape',\n                        run: _codemirror_search__WEBPACK_IMPORTED_MODULE_8__.closeSearchPanel,\n                        scope: 'editor search-panel'\n                    }\n                ]))\n            }),\n            Object.freeze({\n                name: 'scrollPastEnd',\n                default: false,\n                factory: (options) => options.inline ? null : createConditionalExtension((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.scrollPastEnd)())\n            }),\n            Object.freeze({\n                name: 'smartIndent',\n                default: true,\n                factory: () => createConditionalExtension((0,_codemirror_language__WEBPACK_IMPORTED_MODULE_1__.indentOnInput)()),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Smart Indentation')\n                }\n            }),\n            /**\n             * tabFocusable\n             *\n             * Can the user use the tab key to focus on / enter the CodeMirror editor?\n             * If this is false, the CodeMirror editor can still be focused (via\n             * mouse-click, for example), just not via tab key navigation.\n             *\n             * It can be useful to set tabFocusable to false when the editor is\n             * embedded in a context that provides an alternative to the tab key for\n             * navigation. For example, the Notebook widget allows the user to move\n             * from one cell to another using the up and down arrow keys and to enter\n             * and exit the CodeMirror editor associated with that cell by pressing\n             * the enter and escape keys, respectively.\n             */\n            Object.freeze({\n                name: 'tabFocusable',\n                // The default for this needs to be true because the CodeMirror editor\n                // is used in lots of different places. By default, a user should be\n                // able to tab into a CodeMirror editor on the page, and by default, the\n                // user should be able to get out of the editor by pressing the escape\n                // key then immediately pressing the tab key (or shift+tab to go\n                // backwards on the page). If there are places in the app where this\n                // model of user interaction doesn't make sense or is broken, those\n                // places should be remedied on a case-by-case basis, **not** by making\n                // `tabFocusable` false by default.\n                default: true,\n                factory: () => createConditionalExtension(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.contentAttributes.of({\n                    tabIndex: '0'\n                }), _codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.contentAttributes.of({\n                    tabIndex: '-1'\n                }))\n            }),\n            Object.freeze({\n                name: 'tabSize',\n                default: 4,\n                factory: () => createConfigurableExtension((value) => _codemirror_state__WEBPACK_IMPORTED_MODULE_9__.EditorState.tabSize.of(value)),\n                schema: {\n                    type: 'number',\n                    title: trans.__('Tab size')\n                }\n            }),\n            Object.freeze({\n                name: 'tooltips',\n                factory: () => \n                // we need `absolute` due to use of `contain: layout` in lumino;\n                // we attach to body to ensure cursor collaboration tooltip is\n                // visible in first line of the editor.\n                createImmutableExtension((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.tooltips)({\n                    position: 'absolute',\n                    parent: document.body\n                }))\n            }),\n            Object.freeze({\n                name: 'allowMultipleSelections',\n                default: true,\n                factory: () => createConfigurableExtension((value) => _codemirror_state__WEBPACK_IMPORTED_MODULE_9__.EditorState.allowMultipleSelections.of(value)),\n                schema: {\n                    type: 'boolean',\n                    title: trans.__('Multiple selections')\n                }\n            }),\n            Object.freeze({\n                name: 'customStyles',\n                factory: () => createConfigurableExtension(config => (0,_extensions__WEBPACK_IMPORTED_MODULE_7__.customTheme)(config)),\n                default: {\n                    fontFamily: null,\n                    fontSize: null,\n                    lineHeight: null\n                },\n                schema: {\n                    title: trans.__('Custom editor styles'),\n                    type: 'object',\n                    properties: {\n                        fontFamily: {\n                            type: ['string', 'null'],\n                            title: trans.__('Font Family')\n                        },\n                        fontSize: {\n                            type: ['number', 'null'],\n                            minimum: 1,\n                            maximum: 100,\n                            title: trans.__('Font Size')\n                        },\n                        lineHeight: {\n                            type: ['number', 'null'],\n                            title: trans.__('Line Height')\n                        }\n                    },\n                    additionalProperties: false\n                }\n            })\n        ];\n        if (themes) {\n            extensions.push(Object.freeze({\n                name: 'theme',\n                default: 'jupyter',\n                factory: () => createConfigurableExtension(value => themes.getTheme(value)),\n                schema: {\n                    type: 'string',\n                    title: trans.__('Theme'),\n                    description: trans.__('CodeMirror theme')\n                }\n            }));\n        }\n        if (translator) {\n            extensions.push(Object.freeze({\n                name: 'translation',\n                // The list of internal strings is available at https://codemirror.net/examples/translate/\n                default: {\n                    // @codemirror/view\n                    'Control character': trans.__('Control character'),\n                    // @codemirror/commands\n                    'Selection deleted': trans.__('Selection deleted'),\n                    // @codemirror/language\n                    'Folded lines': trans.__('Folded lines'),\n                    'Unfolded lines': trans.__('Unfolded lines'),\n                    to: trans.__('to'),\n                    'folded code': trans.__('folded code'),\n                    unfold: trans.__('unfold'),\n                    'Fold line': trans.__('Fold line'),\n                    'Unfold line': trans.__('Unfold line'),\n                    // @codemirror/search\n                    'Go to line': trans.__('Go to line'),\n                    go: trans.__('go'),\n                    Find: trans.__('Find'),\n                    Replace: trans.__('Replace'),\n                    next: trans.__('next'),\n                    previous: trans.__('previous'),\n                    all: trans.__('all'),\n                    'match case': trans.__('match case'),\n                    replace: trans.__('replace'),\n                    'replace all': trans.__('replace all'),\n                    close: trans.__('close'),\n                    'current match': trans.__('current match'),\n                    'replaced $ matches': trans.__('replaced $ matches'),\n                    'replaced match on line $': trans.__('replaced match on line $'),\n                    'on line': trans.__('on line'),\n                    // @codemirror/autocomplete\n                    Completions: trans.__('Completions'),\n                    // @codemirror/lint\n                    Diagnostics: trans.__('Diagnostics'),\n                    'No diagnostics': trans.__('No diagnostics')\n                },\n                factory: () => createConfigurableExtension(value => _codemirror_state__WEBPACK_IMPORTED_MODULE_9__.EditorState.phrases.of(value))\n            }));\n        }\n        return extensions;\n    }\n    EditorExtensionRegistry.getDefaultExtensions = getDefaultExtensions;\n})(EditorExtensionRegistry || (EditorExtensionRegistry = {}));\n//# sourceMappingURL=extension.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/extension.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/extensions/customStyle.js":
/*!****************************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/extensions/customStyle.js ***!
  \****************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   customTheme: () => (/* binding */ customTheme)\n/* harmony export */ });\n/* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @codemirror/state */ \"../node_modules/@codemirror/state/dist/index.js\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_0__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n\n/**\n * Custom theme configuration\n *\n * The first non-null value takes precedence\n */\nconst customThemeConfig = _codemirror_state__WEBPACK_IMPORTED_MODULE_1__.Facet.define({\n    combine(configs) {\n        return (0,_codemirror_state__WEBPACK_IMPORTED_MODULE_1__.combineConfig)(configs, {\n            fontFamily: null,\n            fontSize: null,\n            lineHeight: null\n        }, {\n            fontFamily: (a, b) => a !== null && a !== void 0 ? a : b,\n            fontSize: (a, b) => a !== null && a !== void 0 ? a : b,\n            lineHeight: (a, b) => a !== null && a !== void 0 ? a : b\n        });\n    }\n});\nfunction setEditorStyle(view) {\n    const { fontFamily, fontSize, lineHeight } = view.state.facet(customThemeConfig);\n    let style = '';\n    if (fontSize) {\n        style += `font-size: ${fontSize}px !important;`;\n    }\n    if (fontFamily) {\n        style += `font-family: ${fontFamily} !important;`;\n    }\n    if (lineHeight) {\n        style += `line-height: ${lineHeight.toString()} !important`;\n    }\n    return { style: style };\n}\n/**\n * Get the extension to customize an editor theme.\n *\n * @param config Theme customization\n * @returns Editor extension\n */\nfunction customTheme(config) {\n    return [\n        customThemeConfig.of(config),\n        _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.EditorView.editorAttributes.of(setEditorStyle)\n    ];\n}\n//# sourceMappingURL=customStyle.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/extensions/customStyle.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/extensions/index.js":
/*!**********************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/extensions/index.js ***!
  \**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   YRange: () => (/* reexport safe */ _ybinding__WEBPACK_IMPORTED_MODULE_3__.YRange),\n/* harmony export */   YSyncConfig: () => (/* reexport safe */ _ybinding__WEBPACK_IMPORTED_MODULE_3__.YSyncConfig),\n/* harmony export */   customTheme: () => (/* reexport safe */ _customStyle__WEBPACK_IMPORTED_MODULE_0__.customTheme),\n/* harmony export */   parseMathIPython: () => (/* reexport safe */ _ipython_md__WEBPACK_IMPORTED_MODULE_1__.parseMathIPython),\n/* harmony export */   rulers: () => (/* reexport safe */ _rulers__WEBPACK_IMPORTED_MODULE_2__.rulers),\n/* harmony export */   ySync: () => (/* reexport safe */ _ybinding__WEBPACK_IMPORTED_MODULE_3__.ySync),\n/* harmony export */   ySyncAnnotation: () => (/* reexport safe */ _ybinding__WEBPACK_IMPORTED_MODULE_3__.ySyncAnnotation),\n/* harmony export */   ySyncFacet: () => (/* reexport safe */ _ybinding__WEBPACK_IMPORTED_MODULE_3__.ySyncFacet),\n/* harmony export */   ybinding: () => (/* reexport safe */ _ybinding__WEBPACK_IMPORTED_MODULE_3__.ybinding)\n/* harmony export */ });\n/* harmony import */ var _customStyle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./customStyle */ \"../node_modules/@jupyterlab/codemirror/lib/extensions/customStyle.js\");\n/* harmony import */ var _ipython_md__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ipython-md */ \"../node_modules/@jupyterlab/codemirror/lib/extensions/ipython-md.js\");\n/* harmony import */ var _rulers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rulers */ \"../node_modules/@jupyterlab/codemirror/lib/extensions/rulers.js\");\n/* harmony import */ var _ybinding__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ybinding */ \"../node_modules/@jupyterlab/codemirror/lib/extensions/ybinding.js\");\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/extensions/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/extensions/ipython-md.js":
/*!***************************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/extensions/ipython-md.js ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   parseMathIPython: () => (/* binding */ parseMathIPython)\n/* harmony export */ });\n/* harmony import */ var _lezer_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lezer/common */ \"../node_modules/@lezer/common/dist/index.js\");\n/* harmony import */ var _lezer_highlight__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lezer/highlight */ \"../node_modules/@lezer/highlight/dist/index.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n// Mathematical expression delimiters\nconst INLINE_MATH_DOLLAR = 'InlineMathDollar';\nconst INLINE_MATH_BRACKET = 'InlineMathBracket';\nconst BLOCK_MATH_DOLLAR = 'BlockMathDollar';\nconst BLOCK_MATH_BRACKET = 'BlockMathBracket';\n/**\n * Lengh of the delimiter for a math expression\n */\nconst DELIMITER_LENGTH = {\n    [INLINE_MATH_DOLLAR]: 1,\n    [INLINE_MATH_BRACKET]: 3,\n    [BLOCK_MATH_DOLLAR]: 2,\n    [BLOCK_MATH_BRACKET]: 3\n};\n/**\n * Delimiters for math expressions\n */\n// Delimiters must be defined as constant because they are used in object match tests\nconst DELIMITERS = Object.keys(DELIMITER_LENGTH).reduce((agg, name) => {\n    agg[name] = { mark: `${name}Mark`, resolve: name };\n    return agg;\n}, {});\n/**\n * Define an IPython mathematical expression parser for Markdown.\n *\n * @param latexParser CodeMirror {@link Parser} for LaTeX mathematical expression\n * @returns Markdown extension\n */\nfunction parseMathIPython(latexParser) {\n    const defineNodes = new Array();\n    Object.keys(DELIMITER_LENGTH).forEach(name => {\n        defineNodes.push({\n            name,\n            style: _lezer_highlight__WEBPACK_IMPORTED_MODULE_1__.tags.emphasis\n        }, { name: `${name}Mark`, style: _lezer_highlight__WEBPACK_IMPORTED_MODULE_1__.tags.processingInstruction });\n    });\n    return {\n        defineNodes,\n        parseInline: [\n            {\n                name: BLOCK_MATH_DOLLAR,\n                parse(cx, next, pos) {\n                    if (next != 36 /* '$' */ || cx.char(pos + 1) != 36) {\n                        return -1;\n                    }\n                    return cx.addDelimiter(DELIMITERS[BLOCK_MATH_DOLLAR], pos, pos + DELIMITER_LENGTH[BLOCK_MATH_DOLLAR], true, true);\n                }\n            },\n            {\n                name: INLINE_MATH_DOLLAR,\n                parse(cx, next, pos) {\n                    if (next != 36 /* '$' */ || cx.char(pos + 1) == 36) {\n                        return -1;\n                    }\n                    return cx.addDelimiter(DELIMITERS[INLINE_MATH_DOLLAR], pos, pos + DELIMITER_LENGTH[INLINE_MATH_DOLLAR], true, true);\n                }\n            },\n            // Inline expression wrapped in \\\\( ... \\\\)\n            {\n                name: INLINE_MATH_BRACKET,\n                before: 'Escape',\n                parse(cx, next, pos) {\n                    if (next != 92 /* '\\' */ ||\n                        cx.char(pos + 1) != 92 ||\n                        ![40 /* '(' */, 41 /* ')' */].includes(cx.char(pos + 2))) {\n                        return -1;\n                    }\n                    return cx.addDelimiter(DELIMITERS[INLINE_MATH_BRACKET], pos, pos + DELIMITER_LENGTH[INLINE_MATH_BRACKET], cx.char(pos + 2) == 40, cx.char(pos + 2) == 41);\n                }\n            },\n            // Block expression wrapped in \\\\[ ... \\\\]\n            {\n                name: BLOCK_MATH_BRACKET,\n                before: 'Escape',\n                parse(cx, next, pos) {\n                    if (next != 92 /* '\\' */ ||\n                        cx.char(pos + 1) != 92 ||\n                        ![91 /* '[' */, 93 /* ']' */].includes(cx.char(pos + 2))) {\n                        return -1;\n                    }\n                    return cx.addDelimiter(DELIMITERS[BLOCK_MATH_BRACKET], pos, pos + DELIMITER_LENGTH[BLOCK_MATH_BRACKET], cx.char(pos + 2) == 91, cx.char(pos + 2) == 93);\n                }\n            }\n        ],\n        wrap: latexParser\n            ? (0,_lezer_common__WEBPACK_IMPORTED_MODULE_0__.parseMixed)((node, input) => {\n                // Test if the node type is one of the math expression\n                const delimiterLength = DELIMITER_LENGTH[node.type.name];\n                if (delimiterLength) {\n                    return {\n                        parser: latexParser,\n                        // Remove delimiter from LaTeX parser otherwise it won't be highlighted\n                        overlay: [\n                            {\n                                from: node.from + delimiterLength,\n                                to: node.to - delimiterLength\n                            }\n                        ]\n                    };\n                }\n                return null;\n            })\n            : undefined\n    };\n}\n//# sourceMappingURL=ipython-md.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/extensions/ipython-md.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/extensions/rulers.js":
/*!***********************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/extensions/rulers.js ***!
  \***********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   rulers: () => (/* binding */ rulers)\n/* harmony export */ });\n/* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @codemirror/state */ \"../node_modules/@codemirror/state/dist/index.js\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n// Inspired by https://discuss.codemirror.net/t/how-to-implement-ruler/4616/\n\n\n\nconst RULERS_CLASSNAME = 'cm-rulers';\n/**\n * Rulers style\n */\nconst baseTheme = _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.EditorView.baseTheme({\n    [`.${RULERS_CLASSNAME}`]: { borderRight: '1px dotted gray', opacity: 0.7 }\n});\n/**\n * Rulers facet\n */\nconst rulerConfig = _codemirror_state__WEBPACK_IMPORTED_MODULE_2__.Facet.define({\n    // Merge all unique values\n    combine(value) {\n        const final = value.reduce((agg, arr) => agg.concat(\n        // Check value is not in aggregate nor multiple time in the array.\n        arr.filter((v, idx) => !agg.includes(v) && idx == arr.lastIndexOf(v))), []);\n        return final;\n    }\n});\n/**\n * View plugin displaying the rulers\n */\nconst plugin = _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.ViewPlugin.fromClass(class {\n    constructor(view) {\n        var _a, _b;\n        this.rulersContainer = view.dom.appendChild(document.createElement('div'));\n        this.rulersContainer.style.cssText = `\n                position: absolute;\n                left: 0;\n                top: 0;\n                width: 100%;\n                height: 100%;\n                pointer-events: none;\n                overflow: hidden;\n            `;\n        const defaultCharacterWidth = view.defaultCharacterWidth;\n        const widths = view.state.facet(rulerConfig);\n        const guttersWidths = (_b = (_a = view.scrollDOM.querySelector('.cm-gutters')) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;\n        this.rulers = widths.map(width => {\n            const ruler = this.rulersContainer.appendChild(document.createElement('div'));\n            ruler.classList.add(RULERS_CLASSNAME);\n            ruler.style.cssText = `\n                position: absolute;\n                left: ${guttersWidths + width * defaultCharacterWidth}px;\n                height: 100%;\n            `;\n            // FIXME: This should be equal to the amount of padding on a line.\n            // This value should be extracted from CodeMirror rather than hardcoded.\n            ruler.style.width = '6px';\n            return ruler;\n        });\n    }\n    update(update) {\n        var _a, _b;\n        const widths = update.view.state.facet(rulerConfig);\n        if (update.viewportChanged ||\n            update.geometryChanged ||\n            !_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.JSONExt.deepEqual(widths, update.startState.facet(rulerConfig))) {\n            const guttersWidth = (_b = (_a = update.view.scrollDOM.querySelector('.cm-gutters')) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;\n            const defaultCharacterWidth = update.view.defaultCharacterWidth;\n            this.rulers.forEach((ruler, rulerIdx) => {\n                ruler.style.left = `${guttersWidth + widths[rulerIdx] * defaultCharacterWidth}px`;\n            });\n        }\n    }\n    destroy() {\n        this.rulers.forEach(ruler => {\n            ruler.remove();\n        });\n        this.rulersContainer.remove();\n    }\n});\n/**\n * Extension for CodeMirror 6 displaying rulers.\n *\n * @param value Rulers position\n * @returns CodeMirror 6 extension\n */\nfunction rulers(value) {\n    return [baseTheme, rulerConfig.of(value), plugin];\n}\n//# sourceMappingURL=rulers.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/extensions/rulers.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/extensions/ybinding.js":
/*!*************************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/extensions/ybinding.js ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   YRange: () => (/* binding */ YRange),\n/* harmony export */   YSyncConfig: () => (/* binding */ YSyncConfig),\n/* harmony export */   ySync: () => (/* binding */ ySync),\n/* harmony export */   ySyncAnnotation: () => (/* binding */ ySyncAnnotation),\n/* harmony export */   ySyncFacet: () => (/* binding */ ySyncFacet),\n/* harmony export */   ybinding: () => (/* binding */ ybinding)\n/* harmony export */ });\n/* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @codemirror/state */ \"../node_modules/@codemirror/state/dist/index.js\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var yjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! yjs */ \"webpack/sharing/consume/default/yjs/yjs\");\n/* harmony import */ var yjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(yjs__WEBPACK_IMPORTED_MODULE_1__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n *\n * Binding for yjs and codemirror\n *\n * It is a simplification of https://github.com/yjs/y-codemirror.next\n * licensed under MIT License by Kevin Jahns\n */\n\n\n\n/**\n * Defines a range on text using relative positions that can be transformed back to\n * absolute positions. (https://docs.yjs.dev/api/relative-positions)\n */\nclass YRange {\n    /**\n     * @param yanchor\n     * @param yhead\n     */\n    constructor(yanchor, yhead) {\n        this.yanchor = yanchor;\n        this.yhead = yhead;\n    }\n    /**\n     * Convert the position to JSON\n     */\n    toJSON() {\n        return {\n            yanchor: (0,yjs__WEBPACK_IMPORTED_MODULE_1__.relativePositionToJSON)(this.yanchor),\n            yhead: (0,yjs__WEBPACK_IMPORTED_MODULE_1__.relativePositionToJSON)(this.yhead)\n        };\n    }\n    /**\n     * Convert a JSON range to a YRange\n     * @param json Range to convert\n     * @return The range as YRange\n     */\n    static fromJSON(json) {\n        return new YRange((0,yjs__WEBPACK_IMPORTED_MODULE_1__.createRelativePositionFromJSON)(json.yanchor), (0,yjs__WEBPACK_IMPORTED_MODULE_1__.createRelativePositionFromJSON)(json.yhead));\n    }\n}\n/**\n * Yjs binding configuration\n */\nclass YSyncConfig {\n    /**\n     * Create a new binding configuration\n     *\n     * @param ytext Yjs text to synchronize\n     */\n    constructor(ytext) {\n        this.ytext = ytext;\n    }\n    /**\n     * Helper function to transform an absolute index position to a Yjs-based relative position\n     * (https://docs.yjs.dev/api/relative-positions).\n     *\n     * A relative position can be transformed back to an absolute position even after the document has changed. The position is\n     * automatically adapted. This does not require any position transformations. Relative positions are computed based on\n     * the internal Yjs document model. Peers that share content through Yjs are guaranteed that their positions will always\n     * synced up when using relative positions.\n     *\n     * ```js\n     * import { ySyncFacet } from 'y-codemirror'\n     *\n     * ..\n     * const ysync = view.state.facet(ySyncFacet)\n     * // transform an absolute index position to a ypos\n     * const ypos = ysync.getYPos(3)\n     * // transform the ypos back to an absolute position\n     * ysync.fromYPos(ypos) // => 3\n     * ```\n     *\n     * It cannot be guaranteed that absolute index positions can be synced up between peers.\n     * This might lead to undesired behavior when implementing features that require that all peers see the\n     * same marked range (e.g. a comment plugin).\n     *\n     * @param pos\n     * @param assoc\n     */\n    toYPos(pos, assoc = 0) {\n        return (0,yjs__WEBPACK_IMPORTED_MODULE_1__.createRelativePositionFromTypeIndex)(this.ytext, pos, assoc);\n    }\n    /**\n     * @param rpos\n     */\n    fromYPos(rpos) {\n        const pos = (0,yjs__WEBPACK_IMPORTED_MODULE_1__.createAbsolutePositionFromRelativePosition)((0,yjs__WEBPACK_IMPORTED_MODULE_1__.createRelativePositionFromJSON)(rpos), this.ytext.doc);\n        if (pos == null || pos.type !== this.ytext) {\n            throw new Error('[y-codemirror] The position you want to retrieve was created by a different document');\n        }\n        return {\n            pos: pos.index,\n            assoc: pos.assoc\n        };\n    }\n    /**\n     * @param range\n     * @return\n     */\n    toYRange(range) {\n        const assoc = range.assoc;\n        const yanchor = this.toYPos(range.anchor, assoc);\n        const yhead = this.toYPos(range.head, assoc);\n        return new YRange(yanchor, yhead);\n    }\n    /**\n     * @param yrange\n     */\n    fromYRange(yrange) {\n        const anchor = this.fromYPos(yrange.yanchor);\n        const head = this.fromYPos(yrange.yhead);\n        if (anchor.pos === head.pos) {\n            return _codemirror_state__WEBPACK_IMPORTED_MODULE_2__.EditorSelection.cursor(head.pos, head.assoc);\n        }\n        return _codemirror_state__WEBPACK_IMPORTED_MODULE_2__.EditorSelection.range(anchor.pos, head.pos);\n    }\n}\n/**\n * Yjs binding facet\n */\nconst ySyncFacet = _codemirror_state__WEBPACK_IMPORTED_MODULE_2__.Facet.define({\n    combine(inputs) {\n        return inputs[inputs.length - 1];\n    }\n});\n/**\n * Yjs binding annotation\n *\n * It is used to track the origin of the document changes\n */\nconst ySyncAnnotation = _codemirror_state__WEBPACK_IMPORTED_MODULE_2__.Annotation.define();\n/**\n * Yjs binding view plugin to synchronize the\n * editor state with the Yjs document.\n */\nconst ySync = _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.ViewPlugin.fromClass(class {\n    constructor(view) {\n        this.conf = view.state.facet(ySyncFacet);\n        this._observer = (event, tr) => {\n            var _a;\n            if (tr.origin !== this.conf) {\n                const delta = event.delta;\n                const changes = [];\n                let pos = 0;\n                for (let i = 0; i < delta.length; i++) {\n                    const d = delta[i];\n                    if (d.insert != null) {\n                        changes.push({ from: pos, to: pos, insert: d.insert });\n                    }\n                    else if (d.delete != null) {\n                        changes.push({ from: pos, to: pos + d.delete, insert: '' });\n                        pos += d.delete;\n                    }\n                    else {\n                        pos += (_a = d.retain) !== null && _a !== void 0 ? _a : 0;\n                    }\n                }\n                view.dispatch({\n                    changes,\n                    // Specified the changes origin to not loop when synchronizing\n                    annotations: [ySyncAnnotation.of(this.conf)]\n                });\n            }\n        };\n        this._ytext = this.conf.ytext;\n        this._ytext.observe(this._observer);\n    }\n    update(update) {\n        if (!update.docChanged ||\n            (update.transactions.length > 0 &&\n                update.transactions[0].annotation(ySyncAnnotation) === this.conf)) {\n            return;\n        }\n        const ytext = this.conf.ytext;\n        ytext.doc.transact(() => {\n            /**\n             * This variable adjusts the fromA position to the current position in the Y.Text type.\n             */\n            let adj = 0;\n            update.changes.iterChanges((fromA, toA, fromB, toB, insert) => {\n                const insertText = insert.sliceString(0, insert.length, '\\n');\n                if (fromA !== toA) {\n                    ytext.delete(fromA + adj, toA - fromA);\n                }\n                if (insertText.length > 0) {\n                    ytext.insert(fromA + adj, insertText);\n                }\n                adj += insertText.length - (toA - fromA);\n            });\n            // Set the configuration as origin to not loop when synchronizing\n        }, this.conf);\n    }\n    destroy() {\n        this._ytext.unobserve(this._observer);\n    }\n});\n/**\n * Extension for CodeMirror 6 binding the Yjs text (source of truth)\n * and the editor state.\n *\n * @param ytext Yjs text to bind\n * @param undoManager Yjs text undo manager\n * @returns CodeMirror 6 extension\n */\nfunction ybinding({ ytext, undoManager }) {\n    const ySyncConfig = new YSyncConfig(ytext);\n    // We don't need the undo manager extension as in y-codemirror.next\n    // because we deal with undo/redo with our own keyboard shortcut mechanism.\n    return [\n        ySyncFacet.of(ySyncConfig),\n        ySync,\n        // We need to add a new origin to the undo manager to ensure text updates\n        // are tracked.\n        undoManager\n            ? _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.ViewPlugin.define(() => {\n                undoManager.addTrackedOrigin(ySyncConfig);\n                return {\n                    destroy: () => {\n                        undoManager.removeTrackedOrigin(ySyncConfig);\n                    }\n                };\n            })\n            : []\n    ];\n}\n//# sourceMappingURL=ybinding.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/extensions/ybinding.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/factory.js":
/*!*************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/factory.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   CodeMirrorEditorFactory: () => (/* binding */ CodeMirrorEditorFactory)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _extension__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./extension */ \"../node_modules/@jupyterlab/codemirror/lib/extension.js\");\n/* harmony import */ var _editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor */ \"../node_modules/@jupyterlab/codemirror/lib/editor.js\");\n/* harmony import */ var _language__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./language */ \"../node_modules/@jupyterlab/codemirror/lib/language.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n/**\n * CodeMirror editor factory.\n */\nclass CodeMirrorEditorFactory {\n    /**\n     * Construct an IEditorFactoryService for CodeMirrorEditors.\n     */\n    constructor(options = {}) {\n        var _a, _b, _c;\n        /**\n         * Create a new editor for inline code.\n         */\n        this.newInlineEditor = (options) => {\n            options.host.dataset.type = 'inline';\n            return this.newEditor({\n                ...options,\n                config: { ...this.inlineCodeMirrorConfig, ...(options.config || {}) },\n                inline: true\n            });\n        };\n        /**\n         * Create a new editor for a full document.\n         */\n        this.newDocumentEditor = (options) => {\n            var _a, _b;\n            options.host.dataset.type = 'document';\n            return this.newEditor({\n                ...options,\n                config: { ...this.documentCodeMirrorConfig, ...((_a = options.config) !== null && _a !== void 0 ? _a : {}) },\n                inline: false,\n                extensions: [\n                    _codemirror_view__WEBPACK_IMPORTED_MODULE_1__.keymap.of([\n                        {\n                            key: 'Shift-Enter',\n                            run: (target) => {\n                                return true;\n                            }\n                        }\n                    ])\n                ].concat((_b = options.extensions) !== null && _b !== void 0 ? _b : [])\n            });\n        };\n        this.languages = (_a = options.languages) !== null && _a !== void 0 ? _a : new _language__WEBPACK_IMPORTED_MODULE_4__.EditorLanguageRegistry();\n        this.extensions = (_b = options.extensions) !== null && _b !== void 0 ? _b : new _extension__WEBPACK_IMPORTED_MODULE_2__.EditorExtensionRegistry();\n        this.translator = (_c = options.translator) !== null && _c !== void 0 ? _c : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_0__.nullTranslator;\n        this.inlineCodeMirrorConfig = {\n            searchWithCM: true\n        };\n        this.documentCodeMirrorConfig = {\n            lineNumbers: true,\n            scrollPastEnd: true\n        };\n    }\n    /**\n     * Create a new editor\n     *\n     * @param options Editor options\n     * @returns The editor\n     */\n    newEditor(options) {\n        const editor = new _editor__WEBPACK_IMPORTED_MODULE_3__.CodeMirrorEditor({\n            extensionsRegistry: this.extensions,\n            languages: this.languages,\n            translator: this.translator,\n            ...options\n        });\n        return editor;\n    }\n}\n//# sourceMappingURL=factory.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/factory.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/index.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/index.js ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   CodeMirrorEditor: () => (/* reexport safe */ _editor__WEBPACK_IMPORTED_MODULE_1__.CodeMirrorEditor),\n/* harmony export */   CodeMirrorEditorFactory: () => (/* reexport safe */ _factory__WEBPACK_IMPORTED_MODULE_4__.CodeMirrorEditorFactory),\n/* harmony export */   CodeMirrorMimeTypeService: () => (/* reexport safe */ _mimetype__WEBPACK_IMPORTED_MODULE_6__.CodeMirrorMimeTypeService),\n/* harmony export */   CodeMirrorSearchHighlighter: () => (/* reexport safe */ _searchprovider__WEBPACK_IMPORTED_MODULE_7__.CodeMirrorSearchHighlighter),\n/* harmony export */   EditorExtensionRegistry: () => (/* reexport safe */ _extension__WEBPACK_IMPORTED_MODULE_2__.EditorExtensionRegistry),\n/* harmony export */   EditorLanguageRegistry: () => (/* reexport safe */ _language__WEBPACK_IMPORTED_MODULE_5__.EditorLanguageRegistry),\n/* harmony export */   EditorSearchProvider: () => (/* reexport safe */ _searchprovider__WEBPACK_IMPORTED_MODULE_7__.EditorSearchProvider),\n/* harmony export */   EditorThemeRegistry: () => (/* reexport safe */ _theme__WEBPACK_IMPORTED_MODULE_8__.EditorThemeRegistry),\n/* harmony export */   ExtensionsHandler: () => (/* reexport safe */ _extension__WEBPACK_IMPORTED_MODULE_2__.ExtensionsHandler),\n/* harmony export */   IEditorExtensionRegistry: () => (/* reexport safe */ _token__WEBPACK_IMPORTED_MODULE_9__.IEditorExtensionRegistry),\n/* harmony export */   IEditorLanguageRegistry: () => (/* reexport safe */ _token__WEBPACK_IMPORTED_MODULE_9__.IEditorLanguageRegistry),\n/* harmony export */   IEditorThemeRegistry: () => (/* reexport safe */ _token__WEBPACK_IMPORTED_MODULE_9__.IEditorThemeRegistry),\n/* harmony export */   PythonBuiltin: () => (/* reexport safe */ _pythonBuiltin__WEBPACK_IMPORTED_MODULE_10__.PythonBuiltin),\n/* harmony export */   StateCommands: () => (/* reexport safe */ _commands__WEBPACK_IMPORTED_MODULE_0__.StateCommands),\n/* harmony export */   YRange: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.YRange),\n/* harmony export */   YSyncConfig: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.YSyncConfig),\n/* harmony export */   customTheme: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.customTheme),\n/* harmony export */   jupyterEditorTheme: () => (/* reexport safe */ _theme__WEBPACK_IMPORTED_MODULE_8__.jupyterEditorTheme),\n/* harmony export */   jupyterHighlightStyle: () => (/* reexport safe */ _theme__WEBPACK_IMPORTED_MODULE_8__.jupyterHighlightStyle),\n/* harmony export */   jupyterTheme: () => (/* reexport safe */ _theme__WEBPACK_IMPORTED_MODULE_8__.jupyterTheme),\n/* harmony export */   parseMathIPython: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.parseMathIPython),\n/* harmony export */   pythonBuiltin: () => (/* reexport safe */ _pythonBuiltin__WEBPACK_IMPORTED_MODULE_10__.pythonBuiltin),\n/* harmony export */   rulers: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.rulers),\n/* harmony export */   ySync: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.ySync),\n/* harmony export */   ySyncAnnotation: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.ySyncAnnotation),\n/* harmony export */   ySyncFacet: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.ySyncFacet),\n/* harmony export */   ybinding: () => (/* reexport safe */ _extensions__WEBPACK_IMPORTED_MODULE_3__.ybinding)\n/* harmony export */ });\n/* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./commands */ \"../node_modules/@jupyterlab/codemirror/lib/commands.js\");\n/* harmony import */ var _editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./editor */ \"../node_modules/@jupyterlab/codemirror/lib/editor.js\");\n/* harmony import */ var _extension__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./extension */ \"../node_modules/@jupyterlab/codemirror/lib/extension.js\");\n/* harmony import */ var _extensions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extensions */ \"../node_modules/@jupyterlab/codemirror/lib/extensions/index.js\");\n/* harmony import */ var _factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./factory */ \"../node_modules/@jupyterlab/codemirror/lib/factory.js\");\n/* harmony import */ var _language__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./language */ \"../node_modules/@jupyterlab/codemirror/lib/language.js\");\n/* harmony import */ var _mimetype__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./mimetype */ \"../node_modules/@jupyterlab/codemirror/lib/mimetype.js\");\n/* harmony import */ var _searchprovider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./searchprovider */ \"../node_modules/@jupyterlab/codemirror/lib/searchprovider.js\");\n/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./theme */ \"../node_modules/@jupyterlab/codemirror/lib/theme.js\");\n/* harmony import */ var _token__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./token */ \"../node_modules/@jupyterlab/codemirror/lib/token.js\");\n/* harmony import */ var _pythonBuiltin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./pythonBuiltin */ \"../node_modules/@jupyterlab/codemirror/lib/pythonBuiltin.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module codemirror\n */\n\n\n\n\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/language.js":
/*!**************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/language.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   EditorLanguageRegistry: () => (/* binding */ EditorLanguageRegistry)\n/* harmony export */ });\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/language */ \"webpack/sharing/consume/default/@codemirror/language/@codemirror/language\");\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_language__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/codeeditor */ \"webpack/sharing/consume/default/@jupyterlab/codeeditor/@jupyterlab/codeeditor\");\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lezer_generator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lezer/generator */ \"../node_modules/@lezer/generator/dist/index.js\");\n/* harmony import */ var _lezer_highlight__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lezer/highlight */ \"../node_modules/@lezer/highlight/dist/index.js\");\n/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./theme */ \"../node_modules/@jupyterlab/codemirror/lib/theme.js\");\n/* harmony import */ var _pythonBuiltin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pythonBuiltin */ \"../node_modules/@jupyterlab/codemirror/lib/pythonBuiltin.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n\n\n\n\n/**\n * CodeMirror language registry\n */\nclass EditorLanguageRegistry {\n    constructor() {\n        this._modeList = [];\n        // Add default language text/plain -> No expressions to parse\n        this.addLanguage({\n            name: 'none',\n            mime: 'text/plain',\n            support: new _codemirror_language__WEBPACK_IMPORTED_MODULE_0__.LanguageSupport(\n            // Create a dummy parser that as no expression to parse\n            _codemirror_language__WEBPACK_IMPORTED_MODULE_0__.LRLanguage.define({ parser: (0,_lezer_generator__WEBPACK_IMPORTED_MODULE_4__.buildParser)('@top Program { }') }))\n        });\n    }\n    /**\n     * Register a new language for CodeMirror\n     *\n     * @param language Language to register\n     */\n    addLanguage(language) {\n        var _a;\n        const info = (_a = this.findByName(language.name)) !== null && _a !== void 0 ? _a : this.findByMIME(language.mime, true);\n        if (info) {\n            throw new Error(`${language.mime} already registered`);\n        }\n        this._modeList.push(this.makeSpec(language));\n    }\n    /**\n     * Ensure a codemirror mode is available by name or Codemirror spec.\n     *\n     * @param language - The mode to ensure.  If it is a string, uses [findBest]\n     *   to get the appropriate spec.\n     *\n     * @returns A promise that resolves when the mode is available.\n     */\n    async getLanguage(language) {\n        const spec = this.findBest(language);\n        if (spec && !spec.support) {\n            spec.support = await spec.load();\n        }\n        return spec;\n    }\n    /**\n     * Get the raw list of available modes specs.\n     *\n     * @returns The available modes\n     */\n    getLanguages() {\n        return [...this._modeList];\n    }\n    /**\n     * Find a codemirror mode by MIME.\n     *\n     * @param mime Mime type to look for\n     * @param strict Whether xml and json should be assimilated to the generic mimetype\n     * @returns The mode or null\n     */\n    findByMIME(mime, strict = false) {\n        if (Array.isArray(mime)) {\n            for (let i = 0; i < mime.length; i++) {\n                const spec = this.findByMIME(mime[i]);\n                if (spec)\n                    return spec;\n            }\n            return null;\n        }\n        mime = mime.toLowerCase();\n        for (let i = 0; i < this._modeList.length; i++) {\n            let info = this._modeList[i];\n            if (Array.isArray(info.mime)) {\n                for (let j = 0; j < info.mime.length; j++) {\n                    if (info.mime[j] == mime) {\n                        return info;\n                    }\n                }\n            }\n            else if (info.mime == mime) {\n                return info;\n            }\n        }\n        if (!strict) {\n            if (/\\+xml$/.test(mime))\n                return this.findByMIME('application/xml');\n            if (/\\+json$/.test(mime))\n                return this.findByMIME('application/json');\n        }\n        return null;\n    }\n    /**\n     * Find a codemirror mode by name.\n     *\n     * @param name The mode name\n     * @returns The mode or null\n     */\n    findByName(name) {\n        name = name.toLowerCase();\n        for (let i = 0; i < this._modeList.length; i++) {\n            let info = this._modeList[i];\n            if (info.name.toLowerCase() == name)\n                return info;\n            if (info.alias) {\n                for (let j = 0; j < info.alias.length; j++) {\n                    if (info.alias[j].toLowerCase() == name) {\n                        return info;\n                    }\n                }\n            }\n        }\n        return null;\n    }\n    /**\n     * Find a codemirror mode by extension.\n     *\n     * @param ext The extension name\n     * @returns The mode or null\n     */\n    findByExtension(ext) {\n        if (Array.isArray(ext)) {\n            for (let i = 0; i < ext.length; i++) {\n                const spec = this.findByExtension(ext[i]);\n                if (spec)\n                    return spec;\n            }\n            return null;\n        }\n        ext = ext.toLowerCase();\n        for (let i = 0; i < this._modeList.length; i++) {\n            let info = this._modeList[i];\n            for (let j = 0; j < info.extensions.length; j++) {\n                if (info.extensions[j].toLowerCase() == ext) {\n                    return info;\n                }\n            }\n        }\n        return null;\n    }\n    /**\n     * Find a codemirror mode by filename.\n     *\n     * @param name File name\n     * @returns The mode or null\n     */\n    findByFileName(name) {\n        const basename = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PathExt.basename(name);\n        for (let i = 0; i < this._modeList.length; i++) {\n            let info = this._modeList[i];\n            if (info.filename && info.filename.test(basename)) {\n                return info;\n            }\n        }\n        let dot = basename.lastIndexOf('.');\n        let ext = dot > -1 && basename.substring(dot + 1, basename.length);\n        if (ext) {\n            return this.findByExtension(ext);\n        }\n        return null;\n    }\n    /**\n     * Find a codemirror mode by name or CodeMirror spec.\n     *\n     * @param language The CodeMirror mode\n     * @param fallback Whether to fallback to default mimetype spec or not\n     * @returns The mode or null\n     */\n    findBest(language, fallback = true) {\n        var _a, _b, _c, _d;\n        const modename = typeof language === 'string' ? language : language.name;\n        const mimetype = typeof language !== 'string' ? language.mime : modename;\n        const ext = typeof language !== 'string' ? (_a = language.extensions) !== null && _a !== void 0 ? _a : [] : [];\n        return ((_d = (_c = (_b = (modename ? this.findByName(modename) : null)) !== null && _b !== void 0 ? _b : (mimetype ? this.findByMIME(mimetype) : null)) !== null && _c !== void 0 ? _c : this.findByExtension(ext)) !== null && _d !== void 0 ? _d : (fallback\n            ? this.findByMIME(_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__.IEditorMimeTypeService.defaultMimeType)\n            : null));\n    }\n    /**\n     * Parse and style a string.\n     *\n     * @param code Code to highlight\n     * @param language Code language\n     * @param el HTML element into which the highlighted code will be inserted\n     */\n    async highlight(code, language, el) {\n        var _a;\n        if (language) {\n            await this.getLanguage(language);\n        }\n        const language_ = (_a = language === null || language === void 0 ? void 0 : language.support) === null || _a === void 0 ? void 0 : _a.language;\n        if (!language_) {\n            el.appendChild(document.createTextNode(code));\n            return;\n        }\n        const tree = language_.parser.parse(code);\n        // position state required because unstyled tokens are not emitted\n        // in highlightTree\n        let pos = 0;\n        (0,_lezer_highlight__WEBPACK_IMPORTED_MODULE_5__.highlightTree)(tree, _theme__WEBPACK_IMPORTED_MODULE_6__.jupyterHighlightStyle, (from, to, classes) => {\n            if (from > pos) {\n                // No style applied to the token between pos and from\n                el.appendChild(document.createTextNode(code.slice(pos, from)));\n            }\n            const sp = el.appendChild(document.createElement('span'));\n            sp.className = classes;\n            sp.appendChild(document.createTextNode(code.slice(from, to)));\n            pos = to;\n        });\n        if (pos < tree.length - 1) {\n            // No style applied on the trailing text\n            el.appendChild(document.createTextNode(code.slice(pos, tree.length)));\n        }\n    }\n    // Code mirror uses two similar structures, a plain object with optional fields,\n    // and a class with the same fields but all mandatory. Maybe adopting the same\n    // pattern would be less confusing (although far more verbose)\n    makeSpec(spec) {\n        let res = _codemirror_language__WEBPACK_IMPORTED_MODULE_0__.LanguageDescription.of(spec);\n        // CodeMirror does not store/use mime type of a language\n        res.mime = spec.mime;\n        res.displayName = spec.displayName;\n        return res;\n    }\n}\n/**\n * EditorLanguageRegistry namespace\n */\n(function (EditorLanguageRegistry) {\n    /**\n     * Convert an CodeMirror 5 language parser to CodeMirror 6\n     *\n     * @param parser Legacy parser\n     * @returns Language object\n     */\n    function legacy(parser) {\n        return new _codemirror_language__WEBPACK_IMPORTED_MODULE_0__.LanguageSupport(_codemirror_language__WEBPACK_IMPORTED_MODULE_0__.StreamLanguage.define(parser));\n    }\n    EditorLanguageRegistry.legacy = legacy;\n    /**\n     * Create a dialect of SQL\n     *\n     * @param dialectName SQL dialect\n     * @returns Language object\n     */\n    async function sql(dialectName) {\n        const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-sql_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-sql */ \"../node_modules/@codemirror/lang-sql/dist/index.js\"));\n        return m.sql({ dialect: m[dialectName] });\n    }\n    /**\n     * Get the default editor languages\n     *\n     * @param translator Application translator\n     * @returns Default CodeMirror 6 languages\n     */\n    function getDefaultLanguages(translator) {\n        const trans = (translator !== null && translator !== void 0 ? translator : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__.nullTranslator).load('jupyterlab');\n        return [\n            {\n                name: 'C',\n                displayName: trans.__('C'),\n                mime: 'text/x-csrc',\n                extensions: ['c', 'h', 'ino'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-cpp_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-cpp */ \"../node_modules/@codemirror/lang-cpp/dist/index.js\"));\n                    return m.cpp();\n                }\n            },\n            {\n                name: 'C++',\n                displayName: trans.__('C++'),\n                mime: 'text/x-c++src',\n                extensions: ['cpp', 'c++', 'cc', 'cxx', 'hpp', 'h++', 'hh', 'hxx'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-cpp_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-cpp */ \"../node_modules/@codemirror/lang-cpp/dist/index.js\"));\n                    return m.cpp();\n                }\n            },\n            {\n                name: 'CQL',\n                displayName: trans.__('CQL'),\n                mime: 'text/x-cassandra',\n                extensions: ['cql'],\n                load() {\n                    return sql('Cassandra');\n                }\n            },\n            {\n                name: 'CSS',\n                displayName: trans.__('CSS'),\n                mime: 'text/css',\n                extensions: ['css'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-css_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-css */ \"../node_modules/@codemirror/lang-css/dist/index.js\"));\n                    return m.css();\n                }\n            },\n            {\n                name: 'HTML',\n                displayName: trans.__('HTML'),\n                alias: ['xhtml'],\n                mime: 'text/html',\n                extensions: ['html', 'htm', 'handlebars', 'hbs'],\n                async load() {\n                    const m = await Promise.all(/*! import() */[__webpack_require__.e(\"vendors-node_modules_codemirror_lang-javascript_dist_index_js\"), __webpack_require__.e(\"vendors-node_modules_codemirror_lang-css_dist_index_js\"), __webpack_require__.e(\"vendors-node_modules_codemirror_lang-html_dist_index_js\")]).then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-html */ \"../node_modules/@codemirror/lang-html/dist/index.js\"));\n                    return m.html();\n                }\n            },\n            {\n                name: 'Java',\n                displayName: trans.__('Java'),\n                mime: 'text/x-java',\n                extensions: ['java'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-java_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-java */ \"../node_modules/@codemirror/lang-java/dist/index.js\"));\n                    return m.java();\n                }\n            },\n            {\n                name: 'Javascript',\n                displayName: trans.__('Javascript'),\n                alias: ['ecmascript', 'js', 'node'],\n                mime: [\n                    'text/javascript',\n                    'text/ecmascript',\n                    'application/javascript',\n                    'application/x-javascript',\n                    'application/ecmascript'\n                ],\n                extensions: ['js', 'mjs', 'cjs'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-javascript_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-javascript */ \"../node_modules/@codemirror/lang-javascript/dist/index.js\"));\n                    return m.javascript();\n                }\n            },\n            {\n                name: 'JSON',\n                displayName: trans.__('JSON'),\n                alias: ['json5'],\n                mime: ['application/json', 'application/x-json'],\n                extensions: ['json', 'map'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_lang-json_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-json */ \"../node_modules/@codemirror/lang-json/dist/index.js\"));\n                    return m.json();\n                }\n            },\n            {\n                name: 'JSX',\n                displayName: trans.__('JSX'),\n                mime: 'text/jsx',\n                extensions: ['jsx'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-javascript_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-javascript */ \"../node_modules/@codemirror/lang-javascript/dist/index.js\"));\n                    return m.javascript({ jsx: true });\n                }\n            },\n            {\n                name: 'MariaDB SQL',\n                displayName: trans.__('MariaDB SQL'),\n                mime: 'text/x-mariadb',\n                load() {\n                    return sql('MariaSQL');\n                }\n            },\n            {\n                name: 'Markdown',\n                displayName: trans.__('Markdown'),\n                mime: 'text/x-markdown',\n                extensions: ['md', 'markdown', 'mkd'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"webpack_sharing_consume_default_codemirror_lang-markdown_codemirror_lang-markdown\").then(__webpack_require__.t.bind(__webpack_require__, /*! @codemirror/lang-markdown */ \"webpack/sharing/consume/default/@codemirror/lang-markdown/@codemirror/lang-markdown\", 23));\n                    return m.markdown({ codeLanguages: this._modeList });\n                }\n            },\n            {\n                name: 'MS SQL',\n                displayName: trans.__('MS SQL'),\n                mime: 'text/x-mssql',\n                load() {\n                    return sql('MSSQL');\n                }\n            },\n            {\n                name: 'MySQL',\n                displayName: trans.__('MySQL'),\n                mime: 'text/x-mysql',\n                load() {\n                    return sql('MySQL');\n                }\n            },\n            {\n                name: 'PHP',\n                displayName: trans.__('PHP'),\n                mime: [\n                    'text/x-php',\n                    'application/x-httpd-php',\n                    'application/x-httpd-php-open'\n                ],\n                extensions: ['php', 'php3', 'php4', 'php5', 'php7', 'phtml'],\n                async load() {\n                    const m = await Promise.all(/*! import() */[__webpack_require__.e(\"vendors-node_modules_codemirror_lang-javascript_dist_index_js\"), __webpack_require__.e(\"vendors-node_modules_codemirror_lang-css_dist_index_js\"), __webpack_require__.e(\"vendors-node_modules_codemirror_lang-html_dist_index_js\"), __webpack_require__.e(\"vendors-node_modules_codemirror_lang-php_dist_index_js\")]).then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-php */ \"../node_modules/@codemirror/lang-php/dist/index.js\"));\n                    return m.php();\n                }\n            },\n            {\n                name: 'PLSQL',\n                displayName: trans.__('PLSQL'),\n                mime: 'text/x-plsql',\n                extensions: ['pls'],\n                load() {\n                    return sql('PLSQL');\n                }\n            },\n            {\n                name: 'PostgreSQL',\n                displayName: trans.__('PostgreSQL'),\n                mime: 'text/x-pgsql',\n                load() {\n                    return sql('PostgreSQL');\n                }\n            },\n            {\n                name: 'Python',\n                displayName: trans.__('Python'),\n                mime: 'text/x-python',\n                extensions: ['BUILD', 'bzl', 'py', 'pyw'],\n                filename: /^(BUCK|BUILD)$/,\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-python_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-python */ \"../node_modules/@codemirror/lang-python/dist/index.js\"));\n                    return new _codemirror_language__WEBPACK_IMPORTED_MODULE_0__.LanguageSupport(m.pythonLanguage, (0,_pythonBuiltin__WEBPACK_IMPORTED_MODULE_7__.pythonBuiltin)(m.pythonLanguage));\n                }\n            },\n            {\n                name: 'ipython',\n                displayName: trans.__('ipython'),\n                mime: 'text/x-ipython',\n                async load() {\n                    // FIXME Restore '?' operator - using the default python LanguageSupport allows\n                    // to activate feature such as code folding.\n                    // return Promise.resolve(legacy(mkPython({ singleOperators: /\\?/ })));\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-python_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-python */ \"../node_modules/@codemirror/lang-python/dist/index.js\"));\n                    return new _codemirror_language__WEBPACK_IMPORTED_MODULE_0__.LanguageSupport(m.pythonLanguage, (0,_pythonBuiltin__WEBPACK_IMPORTED_MODULE_7__.pythonBuiltin)(m.pythonLanguage));\n                }\n            },\n            {\n                name: 'Rust',\n                displayName: trans.__('Rust'),\n                mime: 'text/x-rustsrc',\n                extensions: ['rs'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-rust_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-rust */ \"../node_modules/@codemirror/lang-rust/dist/index.js\"));\n                    return m.rust();\n                }\n            },\n            {\n                name: 'SQL',\n                displayName: trans.__('SQL'),\n                mime: ['application/sql', 'text/x-sql'],\n                extensions: ['sql'],\n                load() {\n                    return sql('StandardSQL');\n                }\n            },\n            {\n                name: 'SQLite',\n                displayName: trans.__('SQLite'),\n                mime: 'text/x-sqlite',\n                load() {\n                    return sql('SQLite');\n                }\n            },\n            {\n                name: 'TSX',\n                displayName: trans.__('TSX'),\n                alias: ['TypeScript-JSX'],\n                mime: 'text/typescript-jsx',\n                extensions: ['tsx'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-javascript_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-javascript */ \"../node_modules/@codemirror/lang-javascript/dist/index.js\"));\n                    return m.javascript({ jsx: true, typescript: true });\n                }\n            },\n            {\n                name: 'TypeScript',\n                displayName: trans.__('TypeScript'),\n                alias: ['ts'],\n                mime: 'application/typescript',\n                extensions: ['ts'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-javascript_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-javascript */ \"../node_modules/@codemirror/lang-javascript/dist/index.js\"));\n                    return m.javascript({ typescript: true });\n                }\n            },\n            {\n                name: 'WebAssembly',\n                displayName: trans.__('WebAssembly'),\n                mime: 'text/webassembly',\n                extensions: ['wat', 'wast'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_lang-wast_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-wast */ \"../node_modules/@codemirror/lang-wast/dist/index.js\"));\n                    return m.wast();\n                }\n            },\n            {\n                name: 'XML',\n                displayName: trans.__('XML'),\n                alias: ['rss', 'wsdl', 'xsd'],\n                mime: ['application/xml', 'text/xml'],\n                extensions: ['xml', 'xsl', 'xsd', 'svg'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_lang-xml_dist_index_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/lang-xml */ \"../node_modules/@codemirror/lang-xml/dist/index.js\"));\n                    return m.xml();\n                }\n            },\n            // Legacy modes ported from CodeMirror 5\n            {\n                name: 'APL',\n                displayName: trans.__('APL'),\n                mime: 'text/apl',\n                extensions: ['dyalog', 'apl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_apl_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/apl */ \"../node_modules/@codemirror/legacy-modes/mode/apl.js\"));\n                    return legacy(m.apl);\n                }\n            },\n            {\n                name: 'PGP',\n                displayName: trans.__('PGP'),\n                alias: ['asciiarmor'],\n                mime: [\n                    'application/pgp',\n                    'application/pgp-encrypted',\n                    'application/pgp-keys',\n                    'application/pgp-signature'\n                ],\n                extensions: ['asc', 'pgp', 'sig'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_asciiarmor_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/asciiarmor */ \"../node_modules/@codemirror/legacy-modes/mode/asciiarmor.js\"));\n                    return legacy(m.asciiArmor);\n                }\n            },\n            {\n                name: 'ASN.1',\n                displayName: trans.__('ASN.1'),\n                mime: 'text/x-ttcn-asn',\n                extensions: ['asn', 'asn1'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_asn1_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/asn1 */ \"../node_modules/@codemirror/legacy-modes/mode/asn1.js\"));\n                    return legacy(m.asn1({}));\n                }\n            },\n            {\n                name: 'Asterisk',\n                displayName: trans.__('Asterisk'),\n                mime: 'text/x-asterisk',\n                filename: /^extensions\\.conf$/i,\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_asterisk_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/asterisk */ \"../node_modules/@codemirror/legacy-modes/mode/asterisk.js\"));\n                    return legacy(m.asterisk);\n                }\n            },\n            {\n                name: 'Brainfuck',\n                displayName: trans.__('Brainfuck'),\n                mime: 'text/x-brainfuck',\n                extensions: ['b', 'bf'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_brainfuck_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/brainfuck */ \"../node_modules/@codemirror/legacy-modes/mode/brainfuck.js\"));\n                    return legacy(m.brainfuck);\n                }\n            },\n            {\n                name: 'Cobol',\n                displayName: trans.__('Cobol'),\n                mime: 'text/x-cobol',\n                extensions: ['cob', 'cpy'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_cobol_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/cobol */ \"../node_modules/@codemirror/legacy-modes/mode/cobol.js\"));\n                    return legacy(m.cobol);\n                }\n            },\n            {\n                name: 'C#',\n                displayName: trans.__('C#'),\n                alias: ['csharp', 'cs'],\n                mime: 'text/x-csharp',\n                extensions: ['cs'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clike */ \"../node_modules/@codemirror/legacy-modes/mode/clike.js\"));\n                    return legacy(m.csharp);\n                }\n            },\n            {\n                name: 'Clojure',\n                displayName: trans.__('Clojure'),\n                mime: 'text/x-clojure',\n                extensions: ['clj', 'cljc', 'cljx'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clojure_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clojure */ \"../node_modules/@codemirror/legacy-modes/mode/clojure.js\"));\n                    return legacy(m.clojure);\n                }\n            },\n            {\n                name: 'ClojureScript',\n                displayName: trans.__('ClojureScript'),\n                mime: 'text/x-clojurescript',\n                extensions: ['cljs'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clojure_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clojure */ \"../node_modules/@codemirror/legacy-modes/mode/clojure.js\"));\n                    return legacy(m.clojure);\n                }\n            },\n            {\n                name: 'Closure Stylesheets (GSS)',\n                displayName: trans.__('Closure Stylesheets (GSS)'),\n                mime: 'text/x-gss',\n                extensions: ['gss'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_css_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/css */ \"../node_modules/@codemirror/legacy-modes/mode/css.js\"));\n                    return legacy(m.gss);\n                }\n            },\n            {\n                name: 'CMake',\n                displayName: trans.__('CMake'),\n                mime: 'text/x-cmake',\n                extensions: ['cmake', 'cmake.in'],\n                filename: /^CMakeLists\\.txt$/,\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_cmake_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/cmake */ \"../node_modules/@codemirror/legacy-modes/mode/cmake.js\"));\n                    return legacy(m.cmake);\n                }\n            },\n            {\n                name: 'CoffeeScript',\n                displayName: trans.__('CoffeeScript'),\n                alias: ['coffee', 'coffee-script'],\n                mime: [\n                    'application/vnd.coffeescript',\n                    'text/coffeescript',\n                    'text/x-coffeescript'\n                ],\n                extensions: ['coffee'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_coffeescript_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/coffeescript */ \"../node_modules/@codemirror/legacy-modes/mode/coffeescript.js\"));\n                    return legacy(m.coffeeScript);\n                }\n            },\n            {\n                name: 'Common Lisp',\n                displayName: trans.__('Common Lisp'),\n                alias: ['lisp'],\n                mime: 'text/x-common-lisp',\n                extensions: ['cl', 'lisp', 'el'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_commonlisp_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/commonlisp */ \"../node_modules/@codemirror/legacy-modes/mode/commonlisp.js\"));\n                    return legacy(m.commonLisp);\n                }\n            },\n            {\n                name: 'Cypher',\n                displayName: trans.__('Cypher'),\n                mime: 'application/x-cypher-query',\n                extensions: ['cyp', 'cypher'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_cypher_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/cypher */ \"../node_modules/@codemirror/legacy-modes/mode/cypher.js\"));\n                    return legacy(m.cypher);\n                }\n            },\n            {\n                name: 'Cython',\n                displayName: trans.__('Cython'),\n                mime: 'text/x-cython',\n                extensions: ['pyx', 'pxd', 'pxi'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_python_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/python */ \"../node_modules/@codemirror/legacy-modes/mode/python.js\"));\n                    return legacy(m.cython);\n                }\n            },\n            {\n                name: 'Crystal',\n                displayName: trans.__('Crystal'),\n                mime: 'text/x-crystal',\n                extensions: ['cr'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_crystal_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/crystal */ \"../node_modules/@codemirror/legacy-modes/mode/crystal.js\"));\n                    return legacy(m.crystal);\n                }\n            },\n            {\n                name: 'D',\n                displayName: trans.__('D'),\n                mime: 'text/x-d',\n                extensions: ['d'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_d_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/d */ \"../node_modules/@codemirror/legacy-modes/mode/d.js\"));\n                    return legacy(m.d);\n                }\n            },\n            {\n                name: 'Dart',\n                displayName: trans.__('Dart'),\n                mime: ['application/dart', 'text/x-dart'],\n                extensions: ['dart'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clike */ \"../node_modules/@codemirror/legacy-modes/mode/clike.js\"));\n                    return legacy(m.dart);\n                }\n            },\n            {\n                name: 'diff',\n                displayName: trans.__('diff'),\n                mime: 'text/x-diff',\n                extensions: ['diff', 'patch'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_diff_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/diff */ \"../node_modules/@codemirror/legacy-modes/mode/diff.js\"));\n                    return legacy(m.diff);\n                }\n            },\n            {\n                name: 'Dockerfile',\n                displayName: trans.__('Dockerfile'),\n                mime: 'text/x-dockerfile',\n                filename: /^Dockerfile$/,\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_dockerfile_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/dockerfile */ \"../node_modules/@codemirror/legacy-modes/mode/dockerfile.js\"));\n                    return legacy(m.dockerFile);\n                }\n            },\n            {\n                name: 'DTD',\n                displayName: trans.__('DTD'),\n                mime: 'application/xml-dtd',\n                extensions: ['dtd'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_dtd_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/dtd */ \"../node_modules/@codemirror/legacy-modes/mode/dtd.js\"));\n                    return legacy(m.dtd);\n                }\n            },\n            {\n                name: 'Dylan',\n                displayName: trans.__('Dylan'),\n                mime: 'text/x-dylan',\n                extensions: ['dylan', 'dyl', 'intr'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_dylan_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/dylan */ \"../node_modules/@codemirror/legacy-modes/mode/dylan.js\"));\n                    return legacy(m.dylan);\n                }\n            },\n            {\n                name: 'EBNF',\n                displayName: trans.__('EBNF'),\n                mime: 'text/x-ebnf',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_ebnf_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/ebnf */ \"../node_modules/@codemirror/legacy-modes/mode/ebnf.js\"));\n                    return legacy(m.ebnf);\n                }\n            },\n            {\n                name: 'ECL',\n                displayName: trans.__('ECL'),\n                mime: 'text/x-ecl',\n                extensions: ['ecl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_ecl_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/ecl */ \"../node_modules/@codemirror/legacy-modes/mode/ecl.js\"));\n                    return legacy(m.ecl);\n                }\n            },\n            {\n                name: 'edn',\n                displayName: trans.__('edn'),\n                mime: 'application/edn',\n                extensions: ['edn'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clojure_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clojure */ \"../node_modules/@codemirror/legacy-modes/mode/clojure.js\"));\n                    return legacy(m.clojure);\n                }\n            },\n            {\n                name: 'Eiffel',\n                displayName: trans.__('Eiffel'),\n                mime: 'text/x-eiffel',\n                extensions: ['e'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_eiffel_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/eiffel */ \"../node_modules/@codemirror/legacy-modes/mode/eiffel.js\"));\n                    return legacy(m.eiffel);\n                }\n            },\n            {\n                name: 'Elm',\n                displayName: trans.__('Elm'),\n                mime: 'text/x-elm',\n                extensions: ['elm'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_elm_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/elm */ \"../node_modules/@codemirror/legacy-modes/mode/elm.js\"));\n                    return legacy(m.elm);\n                }\n            },\n            {\n                name: 'Erlang',\n                displayName: trans.__('Erlang'),\n                mime: 'text/x-erlang',\n                extensions: ['erl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_erlang_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/erlang */ \"../node_modules/@codemirror/legacy-modes/mode/erlang.js\"));\n                    return legacy(m.erlang);\n                }\n            },\n            {\n                name: 'Esper',\n                displayName: trans.__('Esper'),\n                mime: 'text/x-esper',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_sql_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/sql */ \"../node_modules/@codemirror/legacy-modes/mode/sql.js\"));\n                    return legacy(m.esper);\n                }\n            },\n            {\n                name: 'Factor',\n                displayName: trans.__('Factor'),\n                mime: 'text/x-factor',\n                extensions: ['factor'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_factor_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/factor */ \"../node_modules/@codemirror/legacy-modes/mode/factor.js\"));\n                    return legacy(m.factor);\n                }\n            },\n            {\n                name: 'FCL',\n                displayName: trans.__('FCL'),\n                mime: 'text/x-fcl',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_fcl_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/fcl */ \"../node_modules/@codemirror/legacy-modes/mode/fcl.js\"));\n                    return legacy(m.fcl);\n                }\n            },\n            {\n                name: 'Forth',\n                displayName: trans.__('Forth'),\n                mime: 'text/x-forth',\n                extensions: ['forth', 'fth', '4th'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_forth_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/forth */ \"../node_modules/@codemirror/legacy-modes/mode/forth.js\"));\n                    return legacy(m.forth);\n                }\n            },\n            {\n                name: 'Fortran',\n                displayName: trans.__('Fortran'),\n                mime: 'text/x-fortran',\n                extensions: ['f', 'for', 'f77', 'f90', 'f95'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_fortran_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/fortran */ \"../node_modules/@codemirror/legacy-modes/mode/fortran.js\"));\n                    return legacy(m.fortran);\n                }\n            },\n            {\n                name: 'F#',\n                displayName: trans.__('F#'),\n                alias: ['fsharp'],\n                mime: 'text/x-fsharp',\n                extensions: ['fs'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mllike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mllike */ \"../node_modules/@codemirror/legacy-modes/mode/mllike.js\"));\n                    return legacy(m.fSharp);\n                }\n            },\n            {\n                name: 'Gas',\n                displayName: trans.__('Gas'),\n                mime: 'text/x-gas',\n                extensions: ['s'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_gas_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/gas */ \"../node_modules/@codemirror/legacy-modes/mode/gas.js\"));\n                    return legacy(m.gas);\n                }\n            },\n            {\n                name: 'Gherkin',\n                displayName: trans.__('Gherkin'),\n                mime: 'text/x-feature',\n                extensions: ['feature'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_gherkin_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/gherkin */ \"../node_modules/@codemirror/legacy-modes/mode/gherkin.js\"));\n                    return legacy(m.gherkin);\n                }\n            },\n            {\n                name: 'Go',\n                displayName: trans.__('Go'),\n                mime: 'text/x-go',\n                extensions: ['go'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_go_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/go */ \"../node_modules/@codemirror/legacy-modes/mode/go.js\"));\n                    return legacy(m.go);\n                }\n            },\n            {\n                name: 'Groovy',\n                displayName: trans.__('Groovy'),\n                mime: 'text/x-groovy',\n                extensions: ['groovy', 'gradle'],\n                filename: /^Jenkinsfile$/,\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_groovy_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/groovy */ \"../node_modules/@codemirror/legacy-modes/mode/groovy.js\"));\n                    return legacy(m.groovy);\n                }\n            },\n            {\n                name: 'Haskell',\n                displayName: trans.__('Haskell'),\n                mime: 'text/x-haskell',\n                extensions: ['hs'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_haskell_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/haskell */ \"../node_modules/@codemirror/legacy-modes/mode/haskell.js\"));\n                    return legacy(m.haskell);\n                }\n            },\n            {\n                name: 'Haxe',\n                displayName: trans.__('Haxe'),\n                mime: 'text/x-haxe',\n                extensions: ['hx'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_haxe_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/haxe */ \"../node_modules/@codemirror/legacy-modes/mode/haxe.js\"));\n                    return legacy(m.haxe);\n                }\n            },\n            {\n                name: 'HXML',\n                displayName: trans.__('HXML'),\n                mime: 'text/x-hxml',\n                extensions: ['hxml'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_haxe_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/haxe */ \"../node_modules/@codemirror/legacy-modes/mode/haxe.js\"));\n                    return legacy(m.hxml);\n                }\n            },\n            {\n                name: 'HTTP',\n                displayName: trans.__('HTTP'),\n                mime: 'message/http',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_http_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/http */ \"../node_modules/@codemirror/legacy-modes/mode/http.js\"));\n                    return legacy(m.http);\n                }\n            },\n            {\n                name: 'IDL',\n                displayName: trans.__('IDL'),\n                mime: 'text/x-idl',\n                extensions: ['pro'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_idl_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/idl */ \"../node_modules/@codemirror/legacy-modes/mode/idl.js\"));\n                    return legacy(m.idl);\n                }\n            },\n            {\n                name: 'JSON-LD',\n                displayName: trans.__('JSON-LD'),\n                alias: ['jsonld'],\n                mime: 'application/ld+json',\n                extensions: ['jsonld'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_javascript_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/javascript */ \"../node_modules/@codemirror/legacy-modes/mode/javascript.js\"));\n                    return legacy(m.jsonld);\n                }\n            },\n            {\n                name: 'Jinja2',\n                displayName: trans.__('Jinja2'),\n                mime: 'text/jinja2',\n                extensions: ['j2', 'jinja', 'jinja2'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_jinja2_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/jinja2 */ \"../node_modules/@codemirror/legacy-modes/mode/jinja2.js\"));\n                    return legacy(m.jinja2);\n                }\n            },\n            {\n                name: 'Julia',\n                displayName: trans.__('Julia'),\n                mime: 'text/x-julia',\n                extensions: ['jl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_julia_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/julia */ \"../node_modules/@codemirror/legacy-modes/mode/julia.js\"));\n                    return legacy(m.julia);\n                }\n            },\n            {\n                name: 'Kotlin',\n                displayName: trans.__('Kotlin'),\n                mime: 'text/x-kotlin',\n                extensions: ['kt'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clike */ \"../node_modules/@codemirror/legacy-modes/mode/clike.js\"));\n                    return legacy(m.kotlin);\n                }\n            },\n            {\n                name: 'LESS',\n                displayName: trans.__('LESS'),\n                mime: 'text/x-less',\n                extensions: ['less'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_css_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/css */ \"../node_modules/@codemirror/legacy-modes/mode/css.js\"));\n                    return legacy(m.less);\n                }\n            },\n            {\n                name: 'LiveScript',\n                displayName: trans.__('LiveScript'),\n                alias: ['ls'],\n                mime: 'text/x-livescript',\n                extensions: ['ls'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_livescript_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/livescript */ \"../node_modules/@codemirror/legacy-modes/mode/livescript.js\"));\n                    return legacy(m.liveScript);\n                }\n            },\n            {\n                name: 'Lua',\n                displayName: trans.__('Lua'),\n                mime: 'text/x-lua',\n                extensions: ['lua'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_lua_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/lua */ \"../node_modules/@codemirror/legacy-modes/mode/lua.js\"));\n                    return legacy(m.lua);\n                }\n            },\n            {\n                name: 'mIRC',\n                displayName: trans.__('mIRC'),\n                mime: 'text/mirc',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mirc_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mirc */ \"../node_modules/@codemirror/legacy-modes/mode/mirc.js\"));\n                    return legacy(m.mirc);\n                }\n            },\n            {\n                name: 'Mathematica',\n                displayName: trans.__('Mathematica'),\n                mime: 'text/x-mathematica',\n                extensions: ['m', 'nb', 'wl', 'wls'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mathematica_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mathematica */ \"../node_modules/@codemirror/legacy-modes/mode/mathematica.js\"));\n                    return legacy(m.mathematica);\n                }\n            },\n            {\n                name: 'Modelica',\n                displayName: trans.__('Modelica'),\n                mime: 'text/x-modelica',\n                extensions: ['mo'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_modelica_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/modelica */ \"../node_modules/@codemirror/legacy-modes/mode/modelica.js\"));\n                    return legacy(m.modelica);\n                }\n            },\n            {\n                name: 'MUMPS',\n                displayName: trans.__('MUMPS'),\n                mime: 'text/x-mumps',\n                extensions: ['mps'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mumps_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mumps */ \"../node_modules/@codemirror/legacy-modes/mode/mumps.js\"));\n                    return legacy(m.mumps);\n                }\n            },\n            {\n                name: 'mbox',\n                displayName: trans.__('mbox'),\n                mime: 'application/mbox',\n                extensions: ['mbox'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mbox_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mbox */ \"../node_modules/@codemirror/legacy-modes/mode/mbox.js\"));\n                    return legacy(m.mbox);\n                }\n            },\n            {\n                name: 'Nginx',\n                displayName: trans.__('Nginx'),\n                mime: 'text/x-nginx-conf',\n                filename: /nginx.*\\.conf$/i,\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_nginx_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/nginx */ \"../node_modules/@codemirror/legacy-modes/mode/nginx.js\"));\n                    return legacy(m.nginx);\n                }\n            },\n            {\n                name: 'NSIS',\n                displayName: trans.__('NSIS'),\n                mime: 'text/x-nsis',\n                extensions: ['nsh', 'nsi'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_nsis_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/nsis */ \"../node_modules/@codemirror/legacy-modes/mode/nsis.js\"));\n                    return legacy(m.nsis);\n                }\n            },\n            {\n                name: 'NTriples',\n                displayName: trans.__('NTriples'),\n                mime: [\n                    'application/n-triples',\n                    'application/n-quads',\n                    'text/n-triples'\n                ],\n                extensions: ['nt', 'nq'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_ntriples_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/ntriples */ \"../node_modules/@codemirror/legacy-modes/mode/ntriples.js\"));\n                    return legacy(m.ntriples);\n                }\n            },\n            {\n                name: 'Objective-C',\n                displayName: trans.__('Objective-C'),\n                alias: ['objective-c', 'objc'],\n                mime: 'text/x-objectivec',\n                extensions: ['m'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clike */ \"../node_modules/@codemirror/legacy-modes/mode/clike.js\"));\n                    return legacy(m.objectiveC);\n                }\n            },\n            {\n                name: 'Objective-C++',\n                displayName: trans.__('Objective-C++'),\n                alias: ['objective-c++', 'objc++'],\n                mime: 'text/x-objectivec++',\n                extensions: ['mm'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clike */ \"../node_modules/@codemirror/legacy-modes/mode/clike.js\"));\n                    return legacy(m.objectiveCpp);\n                }\n            },\n            {\n                name: 'OCaml',\n                displayName: trans.__('OCaml'),\n                mime: 'text/x-ocaml',\n                extensions: ['ml', 'mli', 'mll', 'mly'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mllike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mllike */ \"../node_modules/@codemirror/legacy-modes/mode/mllike.js\"));\n                    return legacy(m.oCaml);\n                }\n            },\n            {\n                name: 'Octave',\n                displayName: trans.__('Octave'),\n                mime: 'text/x-octave',\n                extensions: ['m'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_octave_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/octave */ \"../node_modules/@codemirror/legacy-modes/mode/octave.js\"));\n                    return legacy(m.octave);\n                }\n            },\n            {\n                name: 'Oz',\n                displayName: trans.__('Oz'),\n                mime: 'text/x-oz',\n                extensions: ['oz'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_oz_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/oz */ \"../node_modules/@codemirror/legacy-modes/mode/oz.js\"));\n                    return legacy(m.oz);\n                }\n            },\n            {\n                name: 'Pascal',\n                displayName: trans.__('Pascal'),\n                mime: 'text/x-pascal',\n                extensions: ['p', 'pas'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_pascal_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/pascal */ \"../node_modules/@codemirror/legacy-modes/mode/pascal.js\"));\n                    return legacy(m.pascal);\n                }\n            },\n            {\n                name: 'Perl',\n                displayName: trans.__('Perl'),\n                mime: 'text/x-perl',\n                extensions: ['pl', 'pm'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_perl_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/perl */ \"../node_modules/@codemirror/legacy-modes/mode/perl.js\"));\n                    return legacy(m.perl);\n                }\n            },\n            {\n                name: 'Pig',\n                displayName: trans.__('Pig'),\n                mime: 'text/x-pig',\n                extensions: ['pig'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_pig_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/pig */ \"../node_modules/@codemirror/legacy-modes/mode/pig.js\"));\n                    return legacy(m.pig);\n                }\n            },\n            {\n                name: 'PowerShell',\n                displayName: trans.__('PowerShell'),\n                mime: 'application/x-powershell',\n                extensions: ['ps1', 'psd1', 'psm1'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_powershell_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/powershell */ \"../node_modules/@codemirror/legacy-modes/mode/powershell.js\"));\n                    return legacy(m.powerShell);\n                }\n            },\n            {\n                name: 'Properties files',\n                displayName: trans.__('Properties files'),\n                alias: ['ini', 'properties'],\n                mime: 'text/x-properties',\n                extensions: ['properties', 'ini', 'in'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_properties_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/properties */ \"../node_modules/@codemirror/legacy-modes/mode/properties.js\"));\n                    return legacy(m.properties);\n                }\n            },\n            {\n                name: 'ProtoBuf',\n                displayName: trans.__('ProtoBuf'),\n                mime: 'text/x-protobuf',\n                extensions: ['proto'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_protobuf_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/protobuf */ \"../node_modules/@codemirror/legacy-modes/mode/protobuf.js\"));\n                    return legacy(m.protobuf);\n                }\n            },\n            {\n                name: 'Puppet',\n                displayName: trans.__('Puppet'),\n                mime: 'text/x-puppet',\n                extensions: ['pp'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_puppet_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/puppet */ \"../node_modules/@codemirror/legacy-modes/mode/puppet.js\"));\n                    return legacy(m.puppet);\n                }\n            },\n            {\n                name: 'Q',\n                displayName: trans.__('Q'),\n                mime: 'text/x-q',\n                extensions: ['q'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_q_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/q */ \"../node_modules/@codemirror/legacy-modes/mode/q.js\"));\n                    return legacy(m.q);\n                }\n            },\n            {\n                name: 'R',\n                displayName: trans.__('R'),\n                alias: ['rscript'],\n                mime: 'text/x-rsrc',\n                extensions: ['r', 'R'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_r_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/r */ \"../node_modules/@codemirror/legacy-modes/mode/r.js\"));\n                    return legacy(m.r);\n                }\n            },\n            {\n                name: 'RPM Changes',\n                displayName: trans.__('RPM Changes'),\n                mime: 'text/x-rpm-changes',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_rpm_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/rpm */ \"../node_modules/@codemirror/legacy-modes/mode/rpm.js\"));\n                    return legacy(m.rpmChanges);\n                }\n            },\n            {\n                name: 'RPM Spec',\n                displayName: trans.__('RPM Spec'),\n                mime: 'text/x-rpm-spec',\n                extensions: ['spec'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_rpm_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/rpm */ \"../node_modules/@codemirror/legacy-modes/mode/rpm.js\"));\n                    return legacy(m.rpmSpec);\n                }\n            },\n            {\n                name: 'Ruby',\n                displayName: trans.__('Ruby'),\n                alias: ['jruby', 'macruby', 'rake', 'rb', 'rbx'],\n                mime: 'text/x-ruby',\n                extensions: ['rb'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_ruby_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/ruby */ \"../node_modules/@codemirror/legacy-modes/mode/ruby.js\"));\n                    return legacy(m.ruby);\n                }\n            },\n            {\n                name: 'SAS',\n                displayName: trans.__('SAS'),\n                mime: 'text/x-sas',\n                extensions: ['sas'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_sas_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/sas */ \"../node_modules/@codemirror/legacy-modes/mode/sas.js\"));\n                    return legacy(m.sas);\n                }\n            },\n            {\n                name: 'Scala',\n                displayName: trans.__('Scala'),\n                mime: 'text/x-scala',\n                extensions: ['scala'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clike */ \"../node_modules/@codemirror/legacy-modes/mode/clike.js\"));\n                    return legacy(m.scala);\n                }\n            },\n            {\n                name: 'Scheme',\n                displayName: trans.__('Scheme'),\n                mime: 'text/x-scheme',\n                extensions: ['scm', 'ss'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_scheme_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/scheme */ \"../node_modules/@codemirror/legacy-modes/mode/scheme.js\"));\n                    return legacy(m.scheme);\n                }\n            },\n            {\n                name: 'SCSS',\n                displayName: trans.__('SCSS'),\n                mime: 'text/x-scss',\n                extensions: ['scss'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_css_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/css */ \"../node_modules/@codemirror/legacy-modes/mode/css.js\"));\n                    return legacy(m.sCSS);\n                }\n            },\n            {\n                name: 'Shell',\n                displayName: trans.__('Shell'),\n                alias: ['bash', 'sh', 'zsh'],\n                mime: ['text/x-sh', 'application/x-sh'],\n                extensions: ['sh', 'ksh', 'bash'],\n                filename: /^PKGBUILD$/,\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_shell_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/shell */ \"../node_modules/@codemirror/legacy-modes/mode/shell.js\"));\n                    return legacy(m.shell);\n                }\n            },\n            {\n                name: 'Sieve',\n                displayName: trans.__('Sieve'),\n                mime: 'application/sieve',\n                extensions: ['siv', 'sieve'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_sieve_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/sieve */ \"../node_modules/@codemirror/legacy-modes/mode/sieve.js\"));\n                    return legacy(m.sieve);\n                }\n            },\n            {\n                name: 'Smalltalk',\n                displayName: trans.__('Smalltalk'),\n                mime: 'text/x-stsrc',\n                extensions: ['st'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_smalltalk_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/smalltalk */ \"../node_modules/@codemirror/legacy-modes/mode/smalltalk.js\"));\n                    return legacy(m.smalltalk);\n                }\n            },\n            {\n                name: 'Solr',\n                displayName: trans.__('Solr'),\n                mime: 'text/x-solr',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_solr_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/solr */ \"../node_modules/@codemirror/legacy-modes/mode/solr.js\"));\n                    return legacy(m.solr);\n                }\n            },\n            {\n                name: 'SML',\n                displayName: trans.__('SML'),\n                mime: 'text/x-sml',\n                extensions: ['sml', 'sig', 'fun', 'smackspec'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mllike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mllike */ \"../node_modules/@codemirror/legacy-modes/mode/mllike.js\"));\n                    return legacy(m.sml);\n                }\n            },\n            {\n                name: 'SPARQL',\n                displayName: trans.__('SPARQL'),\n                alias: ['sparul'],\n                mime: 'application/sparql-query',\n                extensions: ['rq', 'sparql'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_sparql_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/sparql */ \"../node_modules/@codemirror/legacy-modes/mode/sparql.js\"));\n                    return legacy(m.sparql);\n                }\n            },\n            {\n                name: 'Spreadsheet',\n                displayName: trans.__('Spreadsheet'),\n                alias: ['excel', 'formula'],\n                mime: 'text/x-spreadsheet',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_spreadsheet_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/spreadsheet */ \"../node_modules/@codemirror/legacy-modes/mode/spreadsheet.js\"));\n                    return legacy(m.spreadsheet);\n                }\n            },\n            {\n                name: 'Squirrel',\n                displayName: trans.__('Squirrel'),\n                mime: 'text/x-squirrel',\n                extensions: ['nut'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_clike_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/clike */ \"../node_modules/@codemirror/legacy-modes/mode/clike.js\"));\n                    return legacy(m.squirrel);\n                }\n            },\n            {\n                name: 'Stylus',\n                displayName: trans.__('Stylus'),\n                mime: 'text/x-styl',\n                extensions: ['styl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_stylus_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/stylus */ \"../node_modules/@codemirror/legacy-modes/mode/stylus.js\"));\n                    return legacy(m.stylus);\n                }\n            },\n            {\n                name: 'Swift',\n                displayName: trans.__('Swift'),\n                mime: 'text/x-swift',\n                extensions: ['swift'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_swift_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/swift */ \"../node_modules/@codemirror/legacy-modes/mode/swift.js\"));\n                    return legacy(m.swift);\n                }\n            },\n            {\n                name: 'sTeX',\n                displayName: trans.__('sTeX'),\n                mime: 'text/x-stex',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_stex_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/stex */ \"../node_modules/@codemirror/legacy-modes/mode/stex.js\"));\n                    return legacy(m.stex);\n                }\n            },\n            {\n                name: 'LaTeX',\n                displayName: trans.__('LaTeX'),\n                alias: ['tex'],\n                mime: 'text/x-latex',\n                extensions: ['text', 'ltx', 'tex'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_stex_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/stex */ \"../node_modules/@codemirror/legacy-modes/mode/stex.js\"));\n                    return legacy(m.stex);\n                }\n            },\n            {\n                name: 'SystemVerilog',\n                displayName: trans.__('SystemVerilog'),\n                mime: 'text/x-systemverilog',\n                extensions: ['v', 'sv', 'svh'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_verilog_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/verilog */ \"../node_modules/@codemirror/legacy-modes/mode/verilog.js\"));\n                    return legacy(m.verilog);\n                }\n            },\n            {\n                name: 'Tcl',\n                displayName: trans.__('Tcl'),\n                mime: 'text/x-tcl',\n                extensions: ['tcl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_tcl_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/tcl */ \"../node_modules/@codemirror/legacy-modes/mode/tcl.js\"));\n                    return legacy(m.tcl);\n                }\n            },\n            {\n                name: 'Textile',\n                displayName: trans.__('Textile'),\n                mime: 'text/x-textile',\n                extensions: ['textile'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_textile_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/textile */ \"../node_modules/@codemirror/legacy-modes/mode/textile.js\"));\n                    return legacy(m.textile);\n                }\n            },\n            {\n                name: 'TiddlyWiki',\n                displayName: trans.__('TiddlyWiki'),\n                mime: 'text/x-tiddlywiki',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_tiddlywiki_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/tiddlywiki */ \"../node_modules/@codemirror/legacy-modes/mode/tiddlywiki.js\"));\n                    return legacy(m.tiddlyWiki);\n                }\n            },\n            {\n                name: 'Tiki wiki',\n                displayName: trans.__('Tiki wiki'),\n                mime: 'text/tiki',\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_tiki_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/tiki */ \"../node_modules/@codemirror/legacy-modes/mode/tiki.js\"));\n                    return legacy(m.tiki);\n                }\n            },\n            {\n                name: 'TOML',\n                displayName: trans.__('TOML'),\n                mime: 'text/x-toml',\n                extensions: ['toml'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_toml_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/toml */ \"../node_modules/@codemirror/legacy-modes/mode/toml.js\"));\n                    return legacy(m.toml);\n                }\n            },\n            {\n                name: 'troff',\n                displayName: trans.__('troff'),\n                mime: 'text/troff',\n                extensions: ['1', '2', '3', '4', '5', '6', '7', '8', '9'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_troff_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/troff */ \"../node_modules/@codemirror/legacy-modes/mode/troff.js\"));\n                    return legacy(m.troff);\n                }\n            },\n            {\n                name: 'TTCN',\n                displayName: trans.__('TTCN'),\n                mime: 'text/x-ttcn',\n                extensions: ['ttcn', 'ttcn3', 'ttcnpp'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_ttcn_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/ttcn */ \"../node_modules/@codemirror/legacy-modes/mode/ttcn.js\"));\n                    return legacy(m.ttcn);\n                }\n            },\n            {\n                name: 'TTCN_CFG',\n                displayName: trans.__('TTCN_CFG'),\n                mime: 'text/x-ttcn-cfg',\n                extensions: ['cfg'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_ttcn-cfg_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/ttcn-cfg */ \"../node_modules/@codemirror/legacy-modes/mode/ttcn-cfg.js\"));\n                    return legacy(m.ttcnCfg);\n                }\n            },\n            {\n                name: 'Turtle',\n                displayName: trans.__('Turtle'),\n                mime: 'text/turtle',\n                extensions: ['ttl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_turtle_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/turtle */ \"../node_modules/@codemirror/legacy-modes/mode/turtle.js\"));\n                    return legacy(m.turtle);\n                }\n            },\n            {\n                name: 'Web IDL',\n                displayName: trans.__('Web IDL'),\n                mime: 'text/x-webidl',\n                extensions: ['webidl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_webidl_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/webidl */ \"../node_modules/@codemirror/legacy-modes/mode/webidl.js\"));\n                    return legacy(m.webIDL);\n                }\n            },\n            {\n                name: 'VB.NET',\n                displayName: trans.__('VB.NET'),\n                mime: 'text/x-vb',\n                extensions: ['vb'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_vb_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/vb */ \"../node_modules/@codemirror/legacy-modes/mode/vb.js\"));\n                    return legacy(m.vb);\n                }\n            },\n            {\n                name: 'VBScript',\n                displayName: trans.__('VBScript'),\n                mime: 'text/vbscript',\n                extensions: ['vbs'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_vbscript_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/vbscript */ \"../node_modules/@codemirror/legacy-modes/mode/vbscript.js\"));\n                    return legacy(m.vbScript);\n                }\n            },\n            {\n                name: 'Velocity',\n                displayName: trans.__('Velocity'),\n                mime: 'text/velocity',\n                extensions: ['vtl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_velocity_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/velocity */ \"../node_modules/@codemirror/legacy-modes/mode/velocity.js\"));\n                    return legacy(m.velocity);\n                }\n            },\n            {\n                name: 'Verilog',\n                displayName: trans.__('Verilog'),\n                mime: 'text/x-verilog',\n                extensions: ['v'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_verilog_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/verilog */ \"../node_modules/@codemirror/legacy-modes/mode/verilog.js\"));\n                    return legacy(m.verilog);\n                }\n            },\n            {\n                name: 'VHDL',\n                displayName: trans.__('VHDL'),\n                mime: 'text/x-vhdl',\n                extensions: ['vhd', 'vhdl'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_vhdl_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/vhdl */ \"../node_modules/@codemirror/legacy-modes/mode/vhdl.js\"));\n                    return legacy(m.vhdl);\n                }\n            },\n            {\n                name: 'XQuery',\n                displayName: trans.__('XQuery'),\n                mime: 'application/xquery',\n                extensions: ['xy', 'xquery'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"vendors-node_modules_codemirror_legacy-modes_mode_xquery_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/xquery */ \"../node_modules/@codemirror/legacy-modes/mode/xquery.js\"));\n                    return legacy(m.xQuery);\n                }\n            },\n            {\n                name: 'Yacas',\n                displayName: trans.__('Yacas'),\n                mime: 'text/x-yacas',\n                extensions: ['ys'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_yacas_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/yacas */ \"../node_modules/@codemirror/legacy-modes/mode/yacas.js\"));\n                    return legacy(m.yacas);\n                }\n            },\n            {\n                name: 'YAML',\n                displayName: trans.__('YAML'),\n                alias: ['yml'],\n                mime: ['text/x-yaml', 'text/yaml'],\n                extensions: ['yaml', 'yml'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_yaml_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/yaml */ \"../node_modules/@codemirror/legacy-modes/mode/yaml.js\"));\n                    return legacy(m.yaml);\n                }\n            },\n            {\n                name: 'Z80',\n                displayName: trans.__('Z80'),\n                mime: 'text/x-z80',\n                extensions: ['z80'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_z80_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/z80 */ \"../node_modules/@codemirror/legacy-modes/mode/z80.js\"));\n                    return legacy(m.z80);\n                }\n            },\n            {\n                name: 'mscgen',\n                displayName: trans.__('mscgen'),\n                mime: 'text/x-mscgen',\n                extensions: ['mscgen', 'mscin', 'msc'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mscgen_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mscgen */ \"../node_modules/@codemirror/legacy-modes/mode/mscgen.js\"));\n                    return legacy(m.mscgen);\n                }\n            },\n            {\n                name: 'xu',\n                displayName: trans.__('xu'),\n                mime: 'text/x-xu',\n                extensions: ['xu'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mscgen_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mscgen */ \"../node_modules/@codemirror/legacy-modes/mode/mscgen.js\"));\n                    return legacy(m.xu);\n                }\n            },\n            {\n                name: 'msgenny',\n                displayName: trans.__('msgenny'),\n                mime: 'text/x-msgenny',\n                extensions: ['msgenny'],\n                async load() {\n                    const m = await __webpack_require__.e(/*! import() */ \"node_modules_codemirror_legacy-modes_mode_mscgen_js\").then(__webpack_require__.bind(__webpack_require__, /*! @codemirror/legacy-modes/mode/mscgen */ \"../node_modules/@codemirror/legacy-modes/mode/mscgen.js\"));\n                    return legacy(m.msgenny);\n                }\n            }\n        ];\n    }\n    EditorLanguageRegistry.getDefaultLanguages = getDefaultLanguages;\n})(EditorLanguageRegistry || (EditorLanguageRegistry = {}));\n//# sourceMappingURL=language.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/language.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/mimetype.js":
/*!**************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/mimetype.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   CodeMirrorMimeTypeService: () => (/* binding */ CodeMirrorMimeTypeService)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/codeeditor */ \"webpack/sharing/consume/default/@jupyterlab/codeeditor/@jupyterlab/codeeditor\");\n/* harmony import */ var _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n/**\n * The mime type service for CodeMirror.\n */\nclass CodeMirrorMimeTypeService {\n    constructor(languages) {\n        this.languages = languages;\n    }\n    /**\n     * Returns a mime type for the given language info.\n     *\n     * #### Notes\n     * If a mime type cannot be found returns the default mime type `text/plain`, never `null`.\n     * There may be more than one mime type, but only the first one will be returned.\n     * To access all mime types, use `IEditorLanguageRegistry` instead.\n     */\n    getMimeTypeByLanguage(info) {\n        var _a;\n        const ext = info.file_extension || '';\n        const mode = this.languages.findBest(info.codemirror_mode || {\n            mimetype: info.mimetype,\n            name: info.name,\n            ext: [ext.split('.').slice(-1)[0]]\n        });\n        return mode\n            ? Array.isArray(mode.mime)\n                ? (_a = mode.mime[0]) !== null && _a !== void 0 ? _a : _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__.IEditorMimeTypeService.defaultMimeType\n                : mode.mime\n            : _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__.IEditorMimeTypeService.defaultMimeType;\n    }\n    /**\n     * Returns a mime type for the given file path.\n     *\n     * #### Notes\n     * If a mime type cannot be found returns the default mime type `text/plain`, never `null`.\n     * There may be more than one mime type, but only the first one will be returned.\n     * To access all mime types, use `IEditorLanguageRegistry` instead.\n     */\n    getMimeTypeByFilePath(path) {\n        var _a;\n        const ext = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.extname(path);\n        if (ext === '.ipy') {\n            return 'text/x-python';\n        }\n        else if (ext === '.md') {\n            return 'text/x-ipythongfm';\n        }\n        const mode = this.languages.findByFileName(path);\n        return mode\n            ? Array.isArray(mode.mime)\n                ? (_a = mode.mime[0]) !== null && _a !== void 0 ? _a : _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__.IEditorMimeTypeService.defaultMimeType\n                : mode.mime\n            : _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_0__.IEditorMimeTypeService.defaultMimeType;\n    }\n}\n//# sourceMappingURL=mimetype.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/mimetype.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/pythonBuiltin.js":
/*!*******************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/pythonBuiltin.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   PythonBuiltin: () => (/* binding */ PythonBuiltin),\n/* harmony export */   pythonBuiltin: () => (/* binding */ pythonBuiltin)\n/* harmony export */ });\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/language */ \"webpack/sharing/consume/default/@codemirror/language/@codemirror/language\");\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_language__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @codemirror/state */ \"../node_modules/@codemirror/state/dist/index.js\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lezer_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lezer/common */ \"../node_modules/@lezer/common/dist/index.js\");\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n\n\n\nclass PythonBuiltin {\n    constructor(view, langPython) {\n        this.langPython = langPython;\n        this.tree = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_0__.syntaxTree)(view.state);\n        this.mark = _codemirror_view__WEBPACK_IMPORTED_MODULE_1__.Decoration.mark({ class: 'cm-builtin' });\n        this.decorations = this.buildDeco(view);\n        this.decoratedTo = view.viewport.to;\n    }\n    update(update) {\n        let tree = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_0__.syntaxTree)(update.state);\n        let { viewport } = update.view, decoratedToMapped = update.changes.mapPos(this.decoratedTo, 1);\n        if (tree.length < viewport.to &&\n            tree.type == this.tree.type &&\n            decoratedToMapped >= viewport.to) {\n            this.decorations = this.decorations.map(update.changes);\n            this.decoratedTo = decoratedToMapped;\n        }\n        else if (tree != this.tree || update.viewportChanged) {\n            this.tree = tree;\n            this.decorations = this.buildDeco(update.view);\n            this.decoratedTo = viewport.to;\n        }\n    }\n    buildDeco(view) {\n        if (!this.tree.length)\n            return _codemirror_view__WEBPACK_IMPORTED_MODULE_1__.Decoration.none;\n        let builder = new _codemirror_state__WEBPACK_IMPORTED_MODULE_3__.RangeSetBuilder();\n        const enter = (node) => {\n            var _a;\n            const cursor = node.node.cursor();\n            // Handle nested language, e.g. Markdown\n            const mounted = cursor.tree && cursor.tree.prop(_lezer_common__WEBPACK_IMPORTED_MODULE_2__.NodeProp.mounted);\n            if (mounted && mounted.overlay) {\n                (_a = node.node\n                    .enter(mounted.overlay[0].from + node.from, 1)) === null || _a === void 0 ? void 0 : _a.cursor().iterate(enter);\n            }\n            if (this.langPython.isActiveAt(view.state, node.from + 1) &&\n                node.name === 'VariableName') {\n                const variableName = view.state.sliceDoc(node.from, node.to);\n                if (builtins.includes(variableName)) {\n                    builder.add(node.from, node.to, this.mark);\n                }\n            }\n        };\n        for (let { from, to } of view.visibleRanges) {\n            this.tree.iterate({ enter, from, to });\n        }\n        return builder.finish();\n    }\n}\nfunction pythonBuiltin(langPython) {\n    return _codemirror_view__WEBPACK_IMPORTED_MODULE_1__.ViewPlugin.define(view => new PythonBuiltin(view, langPython), {\n        decorations: v => v.decorations\n    });\n}\nconst builtins = [\n    'abs',\n    'aiter',\n    'all',\n    'any',\n    'anext',\n    'ascii',\n    'bin',\n    'bool',\n    'breakpoint',\n    'bytearray',\n    'bytes',\n    'callable',\n    'chr',\n    'classmethod',\n    'compile',\n    'complex',\n    'delattr',\n    'dict',\n    'dir',\n    'divmod',\n    'enumerate',\n    'eval',\n    'exec',\n    'filter',\n    'float',\n    'format',\n    'frozenset',\n    'getattr',\n    'globals',\n    'hasattr',\n    'hash',\n    'help',\n    'hex',\n    'id',\n    'input',\n    'int',\n    'isinstance',\n    'issubclass',\n    'iter',\n    'len',\n    'list',\n    'locals',\n    'map',\n    'max',\n    'memoryview',\n    'min',\n    'next',\n    'object',\n    'oct',\n    'open',\n    'ord',\n    'pow',\n    'print',\n    'property',\n    'range',\n    'repr',\n    'reversed',\n    'round',\n    'set',\n    'setattr',\n    'slice',\n    'sorted',\n    'staticmethod',\n    'str',\n    'sum',\n    'super',\n    'tuple',\n    'type',\n    'vars',\n    'zip',\n    '__import__'\n];\n//# sourceMappingURL=pythonBuiltin.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/pythonBuiltin.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/searchprovider.js":
/*!********************************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/searchprovider.js ***!
  \********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   CodeMirrorSearchHighlighter: () => (/* binding */ CodeMirrorSearchHighlighter),\n/* harmony export */   EditorSearchProvider: () => (/* binding */ EditorSearchProvider)\n/* harmony export */ });\n/* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @codemirror/state */ \"../node_modules/@codemirror/state/dist/index.js\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_documentsearch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/documentsearch */ \"webpack/sharing/consume/default/@jupyterlab/documentsearch/@jupyterlab/documentsearch\");\n/* harmony import */ var _jupyterlab_documentsearch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_documentsearch__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_2__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n/**\n * Search provider for editors.\n */\nclass EditorSearchProvider {\n    /**\n     * Constructor\n     */\n    constructor() {\n        /**\n         * Current match index\n         */\n        this.currentIndex = null;\n        /**\n         * Current search query\n         */\n        this.query = null;\n        this._isActive = true;\n        this._inSelection = null;\n        this._isDisposed = false;\n        this._cmHandler = null;\n        this.currentIndex = null;\n        this._stateChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal(this);\n    }\n    /**\n     * CodeMirror search highlighter\n     */\n    get cmHandler() {\n        if (!this._cmHandler) {\n            this._cmHandler = new CodeMirrorSearchHighlighter(this.editor);\n        }\n        return this._cmHandler;\n    }\n    /**\n     * Changed signal to be emitted when search matches change.\n     */\n    get stateChanged() {\n        return this._stateChanged;\n    }\n    /**\n     * Current match index\n     */\n    get currentMatchIndex() {\n        return this.isActive ? this.currentIndex : null;\n    }\n    /**\n     * Whether the cell search is active.\n     *\n     * This is used when applying search only on selected cells.\n     */\n    get isActive() {\n        return this._isActive;\n    }\n    /**\n     * Whether the search provider is disposed or not.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Number of matches in the cell.\n     */\n    get matchesCount() {\n        return this.isActive ? this.cmHandler.matches.length : 0;\n    }\n    /**\n     * Clear currently highlighted match\n     */\n    clearHighlight() {\n        this.currentIndex = null;\n        this.cmHandler.clearHighlight();\n        return Promise.resolve();\n    }\n    /**\n     * Dispose the search provider\n     */\n    dispose() {\n        if (this._isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal.clearData(this);\n        if (this.isActive) {\n            this.endQuery().catch(reason => {\n                console.error(`Failed to end search query on cells.`, reason);\n            });\n        }\n    }\n    /**\n     * Set `isActive` status.\n     *\n     * #### Notes\n     * It will start or end the search\n     *\n     * @param v New value\n     */\n    async setIsActive(v) {\n        if (this._isActive === v) {\n            return;\n        }\n        this._isActive = v;\n        if (this._isActive) {\n            if (this.query !== null) {\n                await this.startQuery(this.query, this.filters);\n            }\n        }\n        else {\n            await this.endQuery();\n        }\n    }\n    /**\n     * Set whether search should be limitted to specified text selection.\n     */\n    async setSearchSelection(selection) {\n        if (this._inSelection === selection) {\n            return;\n        }\n        this._inSelection = selection;\n        await this.updateCodeMirror(this.model.sharedModel.getSource());\n        this._stateChanged.emit();\n    }\n    /**\n     * Set whether user selection should be protected from modifications.\n     *\n     * If disabled, the selection will be updated on search and on editor focus\n     * to cover the current match. We need to protect selection from modifications\n     * for both: search in text and search in cells; since `setSearchSelection`\n     * is only telling us about search in text, we need to have an additional\n     * way to signal that either search in text or in cells is active, or for\n     * any other reason selection range should be protected.\n     */\n    setProtectSelection(v) {\n        this.cmHandler.protectSelection = v;\n    }\n    /**\n     * Initialize the search using the provided options. Should update the UI\n     * to highlight all matches and \"select\" the first match.\n     *\n     * @param query A RegExp to be use to perform the search\n     * @param filters Filter parameters to pass to provider\n     */\n    async startQuery(query, filters) {\n        this.query = query;\n        this.filters = filters;\n        // Search input\n        const content = this.model.sharedModel.getSource();\n        await this.updateCodeMirror(content);\n        this.model.sharedModel.changed.connect(this.onSharedModelChanged, this);\n    }\n    /**\n     * Stop the search and clean any UI elements.\n     */\n    async endQuery() {\n        await this.clearHighlight();\n        await this.cmHandler.endQuery();\n        this.currentIndex = null;\n    }\n    /**\n     * Highlight the next match.\n     *\n     * @returns The next match if there is one.\n     */\n    async highlightNext(loop = true, options) {\n        if (this.matchesCount === 0 || !this.isActive) {\n            this.currentIndex = null;\n        }\n        else {\n            let match = await this.cmHandler.highlightNext(options);\n            if (match) {\n                this.currentIndex = this.cmHandler.currentIndex;\n            }\n            else {\n                // Note: the loop logic is only used in single-editor (e.g. file editor)\n                // provider sub-classes, notebook has its own loop logic and ignores\n                // `currentIndex` as set here.\n                this.currentIndex = loop ? 0 : null;\n            }\n            return match;\n        }\n        return Promise.resolve(this.getCurrentMatch());\n    }\n    /**\n     * Highlight the previous match.\n     *\n     * @returns The previous match if there is one.\n     */\n    async highlightPrevious(loop = true, options) {\n        if (this.matchesCount === 0 || !this.isActive) {\n            this.currentIndex = null;\n        }\n        else {\n            let match = await this.cmHandler.highlightPrevious(options);\n            if (match) {\n                this.currentIndex = this.cmHandler.currentIndex;\n            }\n            else {\n                this.currentIndex = loop ? this.matchesCount - 1 : null;\n            }\n            return match;\n        }\n        return Promise.resolve(this.getCurrentMatch());\n    }\n    /**\n     * Replace the currently selected match with the provided text.\n     *\n     * If no match is selected, it won't do anything.\n     *\n     * The caller of this method is expected to call `highlightNext` if after\n     * calling `replaceCurrentMatch()` attribute `this.currentIndex` is null.\n     * It is necessary to let the caller handle highlighting because this\n     * method is used in composition pattern (search engine of notebook cells)\n     * and highlighting on the composer (notebook) level needs to switch to next\n     * engine (cell) with matches.\n     *\n     * @param newText The replacement text.\n     * @returns Whether a replace occurred.\n     */\n    replaceCurrentMatch(newText, loop, options) {\n        if (!this.isActive) {\n            return Promise.resolve(false);\n        }\n        if (this.currentIndex !== null &&\n            this.currentIndex < this.cmHandler.matches.length) {\n            const match = this.getCurrentMatch();\n            if (!match) {\n                this.currentIndex = null;\n            }\n            else {\n                const substitutedText = (options === null || options === void 0 ? void 0 : options.regularExpression)\n                    ? match.text.replace(this.query, newText)\n                    : newText;\n                const insertText = (options === null || options === void 0 ? void 0 : options.preserveCase)\n                    ? _jupyterlab_documentsearch__WEBPACK_IMPORTED_MODULE_1__.GenericSearchProvider.preserveCase(match.text, substitutedText)\n                    : substitutedText;\n                this.model.sharedModel.updateSource(match.position, match.position + match.text.length, insertText);\n                // Regenerate the match list, then iterate through it.\n                return new Promise((resolve, reject) => {\n                    this.updateCodeMirror(this.model.sharedModel.getSource())\n                        .then(() => {\n                        const allMatches = this.cmHandler.matches;\n                        const positionAfterReplacement = match.position + insertText.length;\n                        let nextMatchFound = false;\n                        for (let matchIdx = this.currentIndex || 0; matchIdx < allMatches.length; matchIdx++) {\n                            if (allMatches[matchIdx].position >= positionAfterReplacement) {\n                                this.currentIndex = matchIdx;\n                                nextMatchFound = true;\n                                break;\n                            }\n                            // Move the highlight forward from the previous match, not looping.\n                            void this.highlightNext(false, { from: 'previous-match' });\n                        }\n                        if (!nextMatchFound) {\n                            this.currentIndex = null; // No more matches in this string\n                        }\n                        resolve(true);\n                    })\n                        .catch(err => {\n                        const errorMessage = `Failed to regenerate match list: ${err}`;\n                        console.error(errorMessage);\n                        reject(errorMessage);\n                    });\n                });\n            }\n        }\n        return Promise.resolve(false);\n    }\n    /**\n     * Replace all matches in the cell source with the provided text\n     *\n     * @param newText The replacement text.\n     * @returns Whether a replace occurred.\n     */\n    replaceAllMatches(newText, options) {\n        if (!this.isActive) {\n            return Promise.resolve(false);\n        }\n        let occurred = this.cmHandler.matches.length > 0;\n        let src = this.model.sharedModel.getSource();\n        let lastEnd = 0;\n        const finalSrc = this.cmHandler.matches.reduce((agg, match) => {\n            const start = match.position;\n            const end = start + match.text.length;\n            const substitutedText = (options === null || options === void 0 ? void 0 : options.regularExpression)\n                ? match.text.replace(this.query, newText)\n                : newText;\n            const insertText = (options === null || options === void 0 ? void 0 : options.preserveCase)\n                ? _jupyterlab_documentsearch__WEBPACK_IMPORTED_MODULE_1__.GenericSearchProvider.preserveCase(match.text, substitutedText)\n                : substitutedText;\n            const newStep = `${agg}${src.slice(lastEnd, start)}${insertText}`;\n            lastEnd = end;\n            return newStep;\n        }, '');\n        if (occurred) {\n            this.cmHandler.matches = [];\n            this.currentIndex = null;\n            this.model.sharedModel.setSource(`${finalSrc}${src.slice(lastEnd)}`);\n        }\n        return Promise.resolve(occurred);\n    }\n    /**\n     * Get the current match if it exists.\n     *\n     * @returns The current match\n     */\n    getCurrentMatch() {\n        if (this.currentIndex === null) {\n            return undefined;\n        }\n        else {\n            let match = undefined;\n            if (this.currentIndex < this.cmHandler.matches.length) {\n                match = this.cmHandler.matches[this.currentIndex];\n            }\n            return match;\n        }\n    }\n    /**\n     * Callback on source change\n     *\n     * @param emitter Source of the change\n     * @param changes Source change\n     */\n    async onSharedModelChanged(emitter, changes) {\n        if (changes.sourceChange) {\n            await this.updateCodeMirror(emitter.getSource());\n            this._stateChanged.emit();\n        }\n    }\n    /**\n     * Update matches\n     */\n    async updateCodeMirror(content) {\n        if (this.query !== null && this.isActive) {\n            const allMatches = await _jupyterlab_documentsearch__WEBPACK_IMPORTED_MODULE_1__.TextSearchEngine.search(this.query, content);\n            if (this._inSelection) {\n                const editor = this.editor;\n                const start = editor.getOffsetAt(this._inSelection.start);\n                const end = editor.getOffsetAt(this._inSelection.end);\n                this.cmHandler.matches = allMatches.filter(match => match.position >= start && match.position <= end);\n                // A special case to always have a current match when in line selection mode.\n                if (this.cmHandler.currentIndex === null &&\n                    this.cmHandler.matches.length > 0) {\n                    await this.cmHandler.highlightNext({\n                        from: 'selection',\n                        select: false,\n                        scroll: false\n                    });\n                }\n                this.currentIndex = this.cmHandler.currentIndex;\n            }\n            else {\n                this.cmHandler.matches = allMatches;\n            }\n        }\n        else {\n            this.cmHandler.matches = [];\n        }\n    }\n}\n/**\n * Helper class to highlight texts in a code mirror editor.\n *\n * Highlighted texts (aka `matches`) must be provided through\n * the `matches` attributes.\n *\n * **NOTES:**\n * - to retain the selection visibility `drawSelection` extension is needed.\n * - highlighting starts from the cursor (if editor is focused and `from` is set\n *   to `'auto'`, cursor moved, or `from` argument is set to `'selection'` or\n *   `'selection-start'`), or from last \"current\" match otherwise.\n * - `currentIndex` is the (readonly) source of truth for the current match.\n */\nclass CodeMirrorSearchHighlighter {\n    /**\n     * Constructor\n     *\n     * @param editor The CodeMirror editor\n     */\n    constructor(editor) {\n        this._current = null;\n        this._cm = editor;\n        this._matches = new Array();\n        this._currentIndex = null;\n        this._highlightEffect = _codemirror_state__WEBPACK_IMPORTED_MODULE_3__.StateEffect.define({\n            map: (value, mapping) => {\n                const transform = (v) => ({\n                    text: v.text,\n                    position: mapping.mapPos(v.position)\n                });\n                return {\n                    matches: value.matches.map(transform),\n                    currentMatch: value.currentMatch\n                        ? transform(value.currentMatch)\n                        : null\n                };\n            }\n        });\n        this._highlightMark = _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.Decoration.mark({ class: 'cm-searching' });\n        this._currentMark = _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.Decoration.mark({ class: 'jp-current-match' });\n        this._highlightField = _codemirror_state__WEBPACK_IMPORTED_MODULE_3__.StateField.define({\n            create: () => {\n                return _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.Decoration.none;\n            },\n            update: (highlights, transaction) => {\n                highlights = highlights.map(transaction.changes);\n                for (let ef of transaction.effects) {\n                    if (ef.is(this._highlightEffect)) {\n                        const e = ef;\n                        if (e.value.matches.length) {\n                            // Note: nesting will vary; sometimes `.cm-searching` will be\n                            // inside `.jp-current-match`, sometime the other way round.\n                            highlights = highlights.update({\n                                add: e.value.matches.map(m => this._highlightMark.range(m.position, m.position + m.text.length)),\n                                // filter out old marks\n                                filter: () => false\n                            });\n                            highlights = highlights.update({\n                                add: e.value.currentMatch\n                                    ? [\n                                        this._currentMark.range(e.value.currentMatch.position, e.value.currentMatch.position +\n                                            e.value.currentMatch.text.length)\n                                    ]\n                                    : []\n                            });\n                        }\n                        else {\n                            highlights = _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.Decoration.none;\n                        }\n                    }\n                }\n                return highlights;\n            },\n            provide: f => _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.EditorView.decorations.from(f)\n        });\n        this._domEventHandlers = _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.EditorView.domEventHandlers({\n            focus: () => {\n                // Set cursor on active match when editor gets focused.\n                this._selectCurrentMatch();\n            }\n        });\n    }\n    /**\n     * The current index of the selected match.\n     */\n    get currentIndex() {\n        return this._currentIndex;\n    }\n    /**\n     * The list of matches\n     */\n    get matches() {\n        return this._matches;\n    }\n    set matches(v) {\n        this._matches = v;\n        if (this._currentIndex !== null &&\n            this._currentIndex > this._matches.length) {\n            this._currentIndex = this._matches.length > 0 ? 0 : null;\n        }\n        this._highlightCurrentMatch({ select: false });\n    }\n    /**\n     * Whether the cursor/selection should not be modified.\n     */\n    get protectSelection() {\n        return this._protectSelection;\n    }\n    set protectSelection(v) {\n        this._protectSelection = v;\n    }\n    /**\n     * Clear all highlighted matches\n     */\n    clearHighlight() {\n        this._currentIndex = null;\n        this._highlightCurrentMatch();\n    }\n    /**\n     * Clear the highlighted matches.\n     */\n    endQuery() {\n        this._currentIndex = null;\n        this._matches = [];\n        if (this._cm) {\n            this._cm.editor.dispatch({\n                effects: this._highlightEffect.of({ matches: [], currentMatch: null })\n            });\n        }\n        return Promise.resolve();\n    }\n    /**\n     * Highlight the next match\n     *\n     * @returns The next match if available\n     */\n    highlightNext(options) {\n        var _a;\n        this._currentIndex = this._findNext(false, (_a = options === null || options === void 0 ? void 0 : options.from) !== null && _a !== void 0 ? _a : 'auto');\n        this._highlightCurrentMatch(options);\n        return Promise.resolve(this._currentIndex !== null\n            ? this._matches[this._currentIndex]\n            : undefined);\n    }\n    /**\n     * Highlight the previous match\n     *\n     * @returns The previous match if available\n     */\n    highlightPrevious(options) {\n        var _a;\n        this._currentIndex = this._findNext(true, (_a = options === null || options === void 0 ? void 0 : options.from) !== null && _a !== void 0 ? _a : 'auto');\n        this._highlightCurrentMatch(options);\n        return Promise.resolve(this._currentIndex !== null\n            ? this._matches[this._currentIndex]\n            : undefined);\n    }\n    /**\n     * Set the editor\n     *\n     * @param editor Editor\n     */\n    setEditor(editor) {\n        if (this._cm) {\n            throw new Error('CodeMirrorEditor already set.');\n        }\n        else {\n            this._cm = editor;\n            if (this._currentIndex !== null) {\n                this._highlightCurrentMatch();\n            }\n            this._cm.editor.dispatch({\n                effects: _codemirror_state__WEBPACK_IMPORTED_MODULE_3__.StateEffect.appendConfig.of(this._domEventHandlers)\n            });\n            this._refresh();\n        }\n    }\n    _selectCurrentMatch(scroll = true) {\n        // This method has two responsibilities:\n        // 1) Scroll the current match into the view - useful for long lines,\n        //    and file editors with more lines that fit on the screen\n        // 2) When user has focus on the editor (not search box) and presses\n        //    ctrl + g/ctrl + shift + g to jump to next match they want their\n        //    cursor to jump too.\n        // We execute (1) and (2) together as CodeMirror has a special code path\n        // to handle both in a single dispatch.\n        // The (2) case is inapplicable to search in selection mode, as it would\n        // invalidate the query selection, so in that case we only execute (1).\n        const match = this._current;\n        if (!match) {\n            return;\n        }\n        if (!this._cm) {\n            return;\n        }\n        const cursor = {\n            anchor: match.position,\n            head: match.position + match.text.length\n        };\n        const selection = this._cm.editor.state.selection.main;\n        if ((selection.from === match.position &&\n            selection.to === match.position + match.text.length) ||\n            this._protectSelection) {\n            // Correct selection is already set or search is restricted to selection:\n            // scroll without changing the selection.\n            if (scroll) {\n                this._cm.editor.dispatch({\n                    effects: _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.EditorView.scrollIntoView(_codemirror_state__WEBPACK_IMPORTED_MODULE_3__.EditorSelection.range(cursor.anchor, cursor.head))\n                });\n                return;\n            }\n        }\n        else {\n            this._cm.editor.dispatch({\n                selection: cursor,\n                scrollIntoView: scroll\n            });\n        }\n    }\n    _highlightCurrentMatch(options) {\n        var _a, _b, _c;\n        if (!this._cm) {\n            // no-op\n            return;\n        }\n        // Highlight the current index\n        if (this._currentIndex !== null) {\n            const match = this.matches[this._currentIndex];\n            this._current = match;\n            // We do not change selection nor scroll if:\n            // - user is selecting text,\n            // - document was modified\n            if ((_a = options === null || options === void 0 ? void 0 : options.select) !== null && _a !== void 0 ? _a : true) {\n                if (this._cm.hasFocus()) {\n                    // If editor is focused we actually set the cursor on the match.\n                    this._selectCurrentMatch((_b = options === null || options === void 0 ? void 0 : options.scroll) !== null && _b !== void 0 ? _b : true);\n                }\n                else if ((_c = options === null || options === void 0 ? void 0 : options.scroll) !== null && _c !== void 0 ? _c : true) {\n                    // otherwise we just scroll to preserve the selection.\n                    this._cm.editor.dispatch({\n                        effects: _codemirror_view__WEBPACK_IMPORTED_MODULE_0__.EditorView.scrollIntoView(match.position)\n                    });\n                }\n            }\n        }\n        else {\n            this._current = null;\n        }\n        this._refresh();\n    }\n    _refresh() {\n        if (!this._cm) {\n            // no-op\n            return;\n        }\n        let effects = [\n            this._highlightEffect.of({\n                matches: this.matches,\n                currentMatch: this._current\n            })\n        ];\n        if (!this._cm.state.field(this._highlightField, false)) {\n            effects.push(_codemirror_state__WEBPACK_IMPORTED_MODULE_3__.StateEffect.appendConfig.of([this._highlightField]));\n        }\n        this._cm.editor.dispatch({ effects });\n    }\n    _findNext(reverse, from = 'auto') {\n        var _a, _b, _c, _d;\n        if (this._matches.length === 0) {\n            // No-op\n            return null;\n        }\n        // If the editor has not be instantiated yet (e.g. a cell that has not yet be seen in the viewport),\n        // force the behavior\n        if (!this._cm && !['previous-match', 'start'].includes(from)) {\n            from = 'previous-match';\n        }\n        let lastPosition = 0;\n        if ((from === 'auto' && ((_b = (_a = this._cm) === null || _a === void 0 ? void 0 : _a.hasFocus()) !== null && _b !== void 0 ? _b : false)) ||\n            from === 'selection') {\n            const cursor = this._cm.state.selection.main;\n            lastPosition = reverse ? cursor.anchor : cursor.head;\n        }\n        else if (from === 'selection-start') {\n            const cursor = this._cm.state.selection.main;\n            lastPosition = Math.min(cursor.anchor, cursor.head);\n        }\n        else if (from === 'start') {\n            lastPosition = 0;\n        }\n        else if (this._current) {\n            lastPosition = reverse\n                ? this._current.position\n                : this._current.position + this._current.text.length;\n        }\n        if (lastPosition === 0 && reverse && this.currentIndex === null) {\n            // The default position is (0, 0) but we want to start from the end in that case\n            // Fallback to the end of the latest match if the editor is not instantiated\n            lastPosition =\n                (_d = (_c = this._cm) === null || _c === void 0 ? void 0 : _c.doc.length) !== null && _d !== void 0 ? _d : endLastMatch(this._matches[this._matches.length - 1]);\n        }\n        const position = lastPosition;\n        let found = Utils.findNext(this._matches, position, 0, this._matches.length - 1);\n        if (found === null) {\n            // Don't loop\n            return reverse ? this._matches.length - 1 : null;\n        }\n        if (reverse) {\n            found -= 1;\n            if (found < 0) {\n                // Don't loop\n                return null;\n            }\n        }\n        return found;\n        function endLastMatch(lastMatch) {\n            return lastMatch ? lastMatch.position + lastMatch.text.length : 0;\n        }\n    }\n}\n/**\n * Helpers namespace\n */\nvar Utils;\n(function (Utils) {\n    /**\n     * Find the closest match at `position` just after it.\n     *\n     * #### Notes\n     * Search is done using a binary search algorithm\n     *\n     * @param matches List of matches\n     * @param position Searched position\n     * @param lowerBound Lower range index\n     * @param higherBound High range index\n     * @returns The next match or null if none exists\n     */\n    function findNext(matches, position, lowerBound = 0, higherBound = Infinity) {\n        higherBound = Math.min(matches.length - 1, higherBound);\n        while (lowerBound <= higherBound) {\n            let middle = Math.floor(0.5 * (lowerBound + higherBound));\n            const currentPosition = matches[middle].position;\n            if (currentPosition < position) {\n                lowerBound = middle + 1;\n                if (lowerBound < matches.length &&\n                    matches[lowerBound].position > position) {\n                    return lowerBound;\n                }\n            }\n            else if (currentPosition > position) {\n                higherBound = middle - 1;\n                if (higherBound > 0 && matches[higherBound].position < position) {\n                    return middle;\n                }\n            }\n            else {\n                return middle;\n            }\n        }\n        // Next could be the first item\n        const first = lowerBound > 0 ? lowerBound - 1 : 0;\n        const match = matches[first];\n        return match.position >= position ? first : null;\n    }\n    Utils.findNext = findNext;\n})(Utils || (Utils = {}));\n//# sourceMappingURL=searchprovider.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/searchprovider.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/theme.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/theme.js ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   EditorThemeRegistry: () => (/* binding */ EditorThemeRegistry),\n/* harmony export */   jupyterEditorTheme: () => (/* binding */ jupyterEditorTheme),\n/* harmony export */   jupyterHighlightStyle: () => (/* binding */ jupyterHighlightStyle),\n/* harmony export */   jupyterTheme: () => (/* binding */ jupyterTheme)\n/* harmony export */ });\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @codemirror/language */ \"webpack/sharing/consume/default/@codemirror/language/@codemirror/language\");\n/* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_codemirror_language__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @codemirror/view */ \"webpack/sharing/consume/default/@codemirror/view/@codemirror/view\");\n/* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lezer/highlight */ \"../node_modules/@lezer/highlight/dist/index.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\nconst jupyterEditorTheme = _codemirror_view__WEBPACK_IMPORTED_MODULE_1__.EditorView.theme({\n    /**\n     * CodeMirror themes are handling the background/color in this way. This works\n     * fine for CodeMirror editors outside the notebook, but the notebook styles\n     * these things differently.\n     */\n    '&': {\n        background: 'var(--jp-layout-color0)',\n        color: 'var(--jp-content-font-color1)'\n    },\n    /* In the notebook, we want this styling to be handled by its container */\n    '.jp-CodeConsole &, .jp-Notebook &': {\n        background: 'transparent'\n    },\n    '.cm-content': {\n        caretColor: 'var(--jp-editor-cursor-color)'\n    },\n    /* Inherit font family from .cm-editor */\n    '.cm-scroller': {\n        fontFamily: 'inherit'\n    },\n    '.cm-cursor, .cm-dropCursor': {\n        borderLeft: 'var(--jp-code-cursor-width0) solid var(--jp-editor-cursor-color)'\n    },\n    '.cm-selectionBackground, .cm-content ::selection': {\n        backgroundColor: 'var(--jp-editor-selected-background)'\n    },\n    '&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground': {\n        backgroundColor: 'var(--jp-editor-selected-focused-background)'\n    },\n    '.cm-gutters': {\n        borderRight: '1px solid var(--jp-border-color2)',\n        backgroundColor: 'var(--jp-layout-color2)'\n    },\n    '.cm-gutter': {\n        backgroundColor: 'var(--jp-layout-color2)'\n    },\n    '.cm-activeLine': {\n        backgroundColor: 'color-mix(in srgb, var(--jp-layout-color3) 25%, transparent)'\n    },\n    '.cm-lineNumbers': {\n        color: 'var(--jp-ui-font-color2)'\n    },\n    '.cm-searchMatch': {\n        backgroundColor: 'var(--jp-search-unselected-match-background-color)',\n        color: 'var(--jp-search-unselected-match-color)'\n    },\n    '.cm-searchMatch.cm-searchMatch-selected': {\n        backgroundColor: 'var(--jp-search-selected-match-background-color) !important',\n        color: 'var(--jp-search-selected-match-color) !important'\n    },\n    '.cm-tooltip': {\n        backgroundColor: 'var(--jp-layout-color1)'\n    },\n    '.cm-builtin': {\n        color: 'var(--jp-mirror-editor-builtin-color)'\n    }\n});\n// The list of available tags for syntax highlighting is available at\n// https://lezer.codemirror.net/docs/ref/#highlight.tags\nconst jupyterHighlightStyle = _codemirror_language__WEBPACK_IMPORTED_MODULE_0__.HighlightStyle.define([\n    // Order matters - a rule will override the previous ones; important for example for in headings styles.\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.meta, color: 'var(--jp-mirror-editor-meta-color)' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.heading, color: 'var(--jp-mirror-editor-header-color)' },\n    {\n        tag: [_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.heading1, _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.heading2, _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.heading3, _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.heading4],\n        color: 'var(--jp-mirror-editor-header-color)',\n        fontWeight: 'bold'\n    },\n    {\n        tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.keyword,\n        color: 'var(--jp-mirror-editor-keyword-color)',\n        fontWeight: 'bold'\n    },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.atom, color: 'var(--jp-mirror-editor-atom-color)' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.number, color: 'var(--jp-mirror-editor-number-color)' },\n    {\n        tag: [_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.definition(_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.name), _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.function(_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.definition(_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.variableName))],\n        color: 'var(--jp-mirror-editor-def-color)'\n    },\n    {\n        tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.standard(_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.variableName),\n        color: 'var(--jp-mirror-editor-builtin-color)'\n    },\n    {\n        tag: [_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.variableName), _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.self],\n        color: 'var(--jp-mirror-editor-variable-2-color)'\n    },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.punctuation, color: 'var(--jp-mirror-editor-punctuation-color)' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.propertyName, color: 'var(--jp-mirror-editor-property-color)' },\n    {\n        tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.operator,\n        color: 'var(--jp-mirror-editor-operator-color)',\n        fontWeight: 'bold'\n    },\n    {\n        tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.comment,\n        color: 'var(--jp-mirror-editor-comment-color)',\n        fontStyle: 'italic'\n    },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.string, color: 'var(--jp-mirror-editor-string-color)' },\n    {\n        tag: [_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.labelName, _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.monospace, _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.special(_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.string)],\n        color: 'var(--jp-mirror-editor-string-2-color)'\n    },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.bracket, color: 'var(--jp-mirror-editor-bracket-color)' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.tagName, color: 'var(--jp-mirror-editor-tag-color)' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.attributeName, color: 'var(--jp-mirror-editor-attribute-color)' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.quote, color: 'var(--jp-mirror-editor-quote-color)' },\n    {\n        tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.link,\n        color: 'var(--jp-mirror-editor-link-color)',\n        textDecoration: 'underline'\n    },\n    { tag: [_lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.separator, _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.derefOperator, _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.paren], color: '' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.strong, fontWeight: 'bold' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.emphasis, fontStyle: 'italic' },\n    { tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.strikethrough, textDecoration: 'line-through' },\n    {\n        tag: _lezer_highlight__WEBPACK_IMPORTED_MODULE_3__.tags.bool,\n        color: 'var(--jp-mirror-editor-keyword-color)',\n        fontWeight: 'bold'\n    }\n]);\n/**\n * JupyterLab CodeMirror 6 theme\n */\nconst jupyterTheme = [\n    jupyterEditorTheme,\n    (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_0__.syntaxHighlighting)(jupyterHighlightStyle)\n];\n/**\n * CodeMirror 6 theme registry\n */\nclass EditorThemeRegistry {\n    constructor() {\n        /**\n         * CodeMirror 6 themes\n         */\n        this._themeMap = new Map([\n            ['jupyter', Object.freeze({ name: 'jupyter', theme: jupyterTheme })]\n        ]);\n    }\n    /**\n     * Get all themes\n     */\n    get themes() {\n        return Array.from(this._themeMap.values());\n    }\n    /**\n     * Get the default CodeMirror 6 theme for JupyterLab\n     *\n     * @returns Default theme\n     */\n    defaultTheme() {\n        return this._themeMap.get('jupyter').theme;\n    }\n    /**\n     * Register a new theme.\n     *\n     * @param theme Codemirror 6 theme\n     */\n    addTheme(theme) {\n        if (this._themeMap.has(theme.name)) {\n            throw new Error(`A theme named '${theme.name}' is already registered.`);\n        }\n        this._themeMap.set(theme.name, { displayName: theme.name, ...theme });\n    }\n    /**\n     * Get a theme.\n     *\n     * #### Notes\n     * It falls back to the default theme\n     *\n     * @param name Theme name\n     * @returns Theme extension\n     */\n    getTheme(name) {\n        var _a;\n        const ext = (_a = this._themeMap.get(name)) === null || _a === void 0 ? void 0 : _a.theme;\n        return ext !== null && ext !== void 0 ? ext : this.defaultTheme();\n    }\n}\n/**\n * EditorThemeRegistry namespace\n */\n(function (EditorThemeRegistry) {\n    /**\n     * Get the default editor themes.\n     *\n     * @param translator Application translator\n     * @returns Default CodeMirror 6 themes\n     */\n    function getDefaultThemes(translator) {\n        const trans = (translator !== null && translator !== void 0 ? translator : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator).load('jupyterlab');\n        return [\n            Object.freeze({\n                name: 'codemirror',\n                displayName: trans.__('codemirror'),\n                theme: [\n                    _codemirror_view__WEBPACK_IMPORTED_MODULE_1__.EditorView.baseTheme({}),\n                    (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_0__.syntaxHighlighting)(_codemirror_language__WEBPACK_IMPORTED_MODULE_0__.defaultHighlightStyle)\n                ]\n            })\n        ];\n    }\n    EditorThemeRegistry.getDefaultThemes = getDefaultThemes;\n})(EditorThemeRegistry || (EditorThemeRegistry = {}));\n//# sourceMappingURL=theme.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/theme.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/codemirror/lib/token.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/codemirror/lib/token.js ***!
  \***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   IEditorExtensionRegistry: () => (/* binding */ IEditorExtensionRegistry),\n/* harmony export */   IEditorLanguageRegistry: () => (/* binding */ IEditorLanguageRegistry),\n/* harmony export */   IEditorThemeRegistry: () => (/* binding */ IEditorThemeRegistry)\n/* harmony export */ });\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n/**\n * Editor language token.\n */\nconst IEditorExtensionRegistry = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/codemirror:IEditorExtensionRegistry', `A registry for CodeMirror extension factories.`);\n/**\n * Editor language token.\n */\nconst IEditorLanguageRegistry = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/codemirror:IEditorLanguageRegistry', 'A registry for CodeMirror languages.');\n/**\n * Editor theme token.\n */\nconst IEditorThemeRegistry = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/codemirror:IEditorThemeRegistry', 'A registry for CodeMirror theme.');\n//# sourceMappingURL=token.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/codemirror/lib/token.js?");

/***/ }),

/***/ "../node_modules/@lezer/generator/dist/index.js":
/*!******************************************************!*\
  !*** ../node_modules/@lezer/generator/dist/index.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   GenError: () => (/* binding */ GenError),\n/* harmony export */   buildParser: () => (/* binding */ buildParser),\n/* harmony export */   buildParserFile: () => (/* binding */ buildParserFile)\n/* harmony export */ });\n/* harmony import */ var _lezer_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lezer/common */ \"../node_modules/@lezer/common/dist/index.js\");\n/* harmony import */ var _lezer_lr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lezer/lr */ \"../node_modules/@lezer/lr/dist/index.js\");\n/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"../node_modules/process/browser.js\");\n\n\n\nclass Node {\n    constructor(start) {\n        this.start = start;\n    }\n}\nclass GrammarDeclaration extends Node {\n    constructor(start, rules, topRules, tokens, localTokens, context, externalTokens, externalSpecializers, externalPropSources, precedences, mainSkip, scopedSkip, dialects, externalProps, autoDelim) {\n        super(start);\n        this.rules = rules;\n        this.topRules = topRules;\n        this.tokens = tokens;\n        this.localTokens = localTokens;\n        this.context = context;\n        this.externalTokens = externalTokens;\n        this.externalSpecializers = externalSpecializers;\n        this.externalPropSources = externalPropSources;\n        this.precedences = precedences;\n        this.mainSkip = mainSkip;\n        this.scopedSkip = scopedSkip;\n        this.dialects = dialects;\n        this.externalProps = externalProps;\n        this.autoDelim = autoDelim;\n    }\n    toString() { return Object.values(this.rules).join(\"\\n\"); }\n}\nclass RuleDeclaration extends Node {\n    constructor(start, id, props, params, expr) {\n        super(start);\n        this.id = id;\n        this.props = props;\n        this.params = params;\n        this.expr = expr;\n    }\n    toString() {\n        return this.id.name + (this.params.length ? `<${this.params.join()}>` : \"\") + \" -> \" + this.expr;\n    }\n}\nclass PrecDeclaration extends Node {\n    constructor(start, items) {\n        super(start);\n        this.items = items;\n    }\n}\nclass TokenPrecDeclaration extends Node {\n    constructor(start, items) {\n        super(start);\n        this.items = items;\n    }\n}\nclass TokenConflictDeclaration extends Node {\n    constructor(start, a, b) {\n        super(start);\n        this.a = a;\n        this.b = b;\n    }\n}\nclass TokenDeclaration extends Node {\n    constructor(start, precedences, conflicts, rules, literals) {\n        super(start);\n        this.precedences = precedences;\n        this.conflicts = conflicts;\n        this.rules = rules;\n        this.literals = literals;\n    }\n}\nclass LocalTokenDeclaration extends Node {\n    constructor(start, precedences, rules, fallback) {\n        super(start);\n        this.precedences = precedences;\n        this.rules = rules;\n        this.fallback = fallback;\n    }\n}\nclass LiteralDeclaration extends Node {\n    constructor(start, literal, props) {\n        super(start);\n        this.literal = literal;\n        this.props = props;\n    }\n}\nclass ContextDeclaration extends Node {\n    constructor(start, id, source) {\n        super(start);\n        this.id = id;\n        this.source = source;\n    }\n}\nclass ExternalTokenDeclaration extends Node {\n    constructor(start, id, source, tokens) {\n        super(start);\n        this.id = id;\n        this.source = source;\n        this.tokens = tokens;\n    }\n}\nclass ExternalSpecializeDeclaration extends Node {\n    constructor(start, type, token, id, source, tokens) {\n        super(start);\n        this.type = type;\n        this.token = token;\n        this.id = id;\n        this.source = source;\n        this.tokens = tokens;\n    }\n}\nclass ExternalPropSourceDeclaration extends Node {\n    constructor(start, id, source) {\n        super(start);\n        this.id = id;\n        this.source = source;\n    }\n}\nclass ExternalPropDeclaration extends Node {\n    constructor(start, id, externalID, source) {\n        super(start);\n        this.id = id;\n        this.externalID = externalID;\n        this.source = source;\n    }\n}\nclass Identifier extends Node {\n    constructor(start, name) {\n        super(start);\n        this.name = name;\n    }\n    toString() { return this.name; }\n}\nclass Expression extends Node {\n    walk(f) { return f(this); }\n    eq(_other) { return false; }\n}\nExpression.prototype.prec = 10;\nclass NameExpression extends Expression {\n    constructor(start, id, args) {\n        super(start);\n        this.id = id;\n        this.args = args;\n    }\n    toString() { return this.id.name + (this.args.length ? `<${this.args.join()}>` : \"\"); }\n    eq(other) {\n        return this.id.name == other.id.name && exprsEq(this.args, other.args);\n    }\n    walk(f) {\n        let args = walkExprs(this.args, f);\n        return f(args == this.args ? this : new NameExpression(this.start, this.id, args));\n    }\n}\nclass SpecializeExpression extends Expression {\n    constructor(start, type, props, token, content) {\n        super(start);\n        this.type = type;\n        this.props = props;\n        this.token = token;\n        this.content = content;\n    }\n    toString() { return `@${this.type}[${this.props.join(\",\")}]<${this.token}, ${this.content}>`; }\n    eq(other) {\n        return this.type == other.type && Prop.eqProps(this.props, other.props) && exprEq(this.token, other.token) &&\n            exprEq(this.content, other.content);\n    }\n    walk(f) {\n        let token = this.token.walk(f), content = this.content.walk(f);\n        return f(token == this.token && content == this.content ? this : new SpecializeExpression(this.start, this.type, this.props, token, content));\n    }\n}\nclass InlineRuleExpression extends Expression {\n    constructor(start, rule) {\n        super(start);\n        this.rule = rule;\n    }\n    toString() {\n        let rule = this.rule;\n        return `${rule.id}${rule.props.length ? `[${rule.props.join(\",\")}]` : \"\"} { ${rule.expr} }`;\n    }\n    eq(other) {\n        let rule = this.rule, oRule = other.rule;\n        return exprEq(rule.expr, oRule.expr) && rule.id.name == oRule.id.name && Prop.eqProps(rule.props, oRule.props);\n    }\n    walk(f) {\n        let rule = this.rule, expr = rule.expr.walk(f);\n        return f(expr == rule.expr ? this :\n            new InlineRuleExpression(this.start, new RuleDeclaration(rule.start, rule.id, rule.props, [], expr)));\n    }\n}\nclass ChoiceExpression extends Expression {\n    constructor(start, exprs) {\n        super(start);\n        this.exprs = exprs;\n    }\n    toString() { return this.exprs.map(e => maybeParens(e, this)).join(\" | \"); }\n    eq(other) {\n        return exprsEq(this.exprs, other.exprs);\n    }\n    walk(f) {\n        let exprs = walkExprs(this.exprs, f);\n        return f(exprs == this.exprs ? this : new ChoiceExpression(this.start, exprs));\n    }\n}\nChoiceExpression.prototype.prec = 1;\nclass SequenceExpression extends Expression {\n    constructor(start, exprs, markers, empty = false) {\n        super(start);\n        this.exprs = exprs;\n        this.markers = markers;\n        this.empty = empty;\n    }\n    toString() { return this.empty ? \"()\" : this.exprs.map(e => maybeParens(e, this)).join(\" \"); }\n    eq(other) {\n        return exprsEq(this.exprs, other.exprs) && this.markers.every((m, i) => {\n            let om = other.markers[i];\n            return m.length == om.length && m.every((x, i) => x.eq(om[i]));\n        });\n    }\n    walk(f) {\n        let exprs = walkExprs(this.exprs, f);\n        return f(exprs == this.exprs ? this : new SequenceExpression(this.start, exprs, this.markers, this.empty && !exprs.length));\n    }\n}\nSequenceExpression.prototype.prec = 2;\nclass ConflictMarker extends Node {\n    constructor(start, id, type) {\n        super(start);\n        this.id = id;\n        this.type = type;\n    }\n    toString() { return (this.type == \"ambig\" ? \"~\" : \"!\") + this.id.name; }\n    eq(other) { return this.id.name == other.id.name && this.type == other.type; }\n}\nclass RepeatExpression extends Expression {\n    constructor(start, expr, kind) {\n        super(start);\n        this.expr = expr;\n        this.kind = kind;\n    }\n    toString() { return maybeParens(this.expr, this) + this.kind; }\n    eq(other) {\n        return exprEq(this.expr, other.expr) && this.kind == other.kind;\n    }\n    walk(f) {\n        let expr = this.expr.walk(f);\n        return f(expr == this.expr ? this : new RepeatExpression(this.start, expr, this.kind));\n    }\n}\nRepeatExpression.prototype.prec = 3;\nclass LiteralExpression extends Expression {\n    // value.length is always > 0\n    constructor(start, value) {\n        super(start);\n        this.value = value;\n    }\n    toString() { return JSON.stringify(this.value); }\n    eq(other) { return this.value == other.value; }\n}\nclass SetExpression extends Expression {\n    constructor(start, ranges, inverted) {\n        super(start);\n        this.ranges = ranges;\n        this.inverted = inverted;\n    }\n    toString() {\n        return `[${this.inverted ? \"^\" : \"\"}${this.ranges.map(([a, b]) => {\n            return String.fromCodePoint(a) + (b == a + 1 ? \"\" : \"-\" + String.fromCodePoint(b));\n        })}]`;\n    }\n    eq(other) {\n        return this.inverted == other.inverted && this.ranges.length == other.ranges.length &&\n            this.ranges.every(([a, b], i) => { let [x, y] = other.ranges[i]; return a == x && b == y; });\n    }\n}\nclass AnyExpression extends Expression {\n    constructor(start) {\n        super(start);\n    }\n    toString() { return \"_\"; }\n    eq() { return true; }\n}\nfunction walkExprs(exprs, f) {\n    let result = null;\n    for (let i = 0; i < exprs.length; i++) {\n        let expr = exprs[i].walk(f);\n        if (expr != exprs[i] && !result)\n            result = exprs.slice(0, i);\n        if (result)\n            result.push(expr);\n    }\n    return result || exprs;\n}\nconst CharClasses = {\n    asciiLetter: [[65, 91], [97, 123]],\n    asciiLowercase: [[97, 123]],\n    asciiUppercase: [[65, 91]],\n    digit: [[48, 58]],\n    whitespace: [[9, 14], [32, 33], [133, 134], [160, 161], [5760, 5761], [8192, 8203],\n        [8232, 8234], [8239, 8240], [8287, 8288], [12288, 12289]],\n    eof: [[0xffff, 0xffff]]\n};\nclass CharClass extends Expression {\n    constructor(start, type) {\n        super(start);\n        this.type = type;\n    }\n    toString() { return \"@\" + this.type; }\n    eq(expr) { return this.type == expr.type; }\n}\nfunction exprEq(a, b) {\n    return a.constructor == b.constructor && a.eq(b);\n}\nfunction exprsEq(a, b) {\n    return a.length == b.length && a.every((e, i) => exprEq(e, b[i]));\n}\nclass Prop extends Node {\n    constructor(start, at, name, value) {\n        super(start);\n        this.at = at;\n        this.name = name;\n        this.value = value;\n    }\n    eq(other) {\n        return this.name == other.name && this.value.length == other.value.length &&\n            this.value.every((v, i) => v.value == other.value[i].value && v.name == other.value[i].name);\n    }\n    toString() {\n        let result = (this.at ? \"@\" : \"\") + this.name;\n        if (this.value.length) {\n            result += \"=\";\n            for (let { name, value } of this.value)\n                result += name ? `{${name}}` : /[^\\w-]/.test(value) ? JSON.stringify(value) : value;\n        }\n        return result;\n    }\n    static eqProps(a, b) {\n        return a.length == b.length && a.every((p, i) => p.eq(b[i]));\n    }\n}\nclass PropPart extends Node {\n    constructor(start, value, name) {\n        super(start);\n        this.value = value;\n        this.name = name;\n    }\n}\nfunction maybeParens(node, parent) {\n    return node.prec < parent.prec ? \"(\" + node.toString() + \")\" : node.toString();\n}\n\n/**\nThe type of error raised when the parser generator finds an issue.\n*/\nclass GenError extends Error {\n}\n\nfunction hasProps(props) {\n    for (let _p in props)\n        return true;\n    return false;\n}\nlet termHash = 0;\nclass Term {\n    constructor(name, flags, nodeName, props = {}) {\n        this.name = name;\n        this.flags = flags;\n        this.nodeName = nodeName;\n        this.props = props;\n        this.hash = ++termHash; // Used for sorting and hashing during parser generation\n        this.id = -1; // Assigned in a later stage, used in actual output\n        // Filled in only after the rules are simplified, used in automaton.ts\n        this.rules = [];\n    }\n    toString() { return this.name; }\n    get nodeType() { return this.top || this.nodeName != null || hasProps(this.props) || this.repeated; }\n    get terminal() { return (this.flags & 1 /* TermFlag.Terminal */) > 0; }\n    get eof() { return (this.flags & 4 /* TermFlag.Eof */) > 0; }\n    get error() { return \"error\" in this.props; }\n    get top() { return (this.flags & 2 /* TermFlag.Top */) > 0; }\n    get interesting() { return this.flags > 0 || this.nodeName != null; }\n    get repeated() { return (this.flags & 16 /* TermFlag.Repeated */) > 0; }\n    set preserve(value) { this.flags = value ? this.flags | 8 /* TermFlag.Preserve */ : this.flags & ~8 /* TermFlag.Preserve */; }\n    get preserve() { return (this.flags & 8 /* TermFlag.Preserve */) > 0; }\n    set inline(value) { this.flags = value ? this.flags | 32 /* TermFlag.Inline */ : this.flags & ~32 /* TermFlag.Inline */; }\n    get inline() { return (this.flags & 32 /* TermFlag.Inline */) > 0; }\n    cmp(other) { return this.hash - other.hash; }\n}\nclass TermSet {\n    constructor() {\n        this.terms = [];\n        // Map from term names to Term instances\n        this.names = Object.create(null);\n        this.tops = [];\n        this.eof = this.term(\"␄\", null, 1 /* TermFlag.Terminal */ | 4 /* TermFlag.Eof */);\n        this.error = this.term(\"⚠\", \"⚠\", 8 /* TermFlag.Preserve */);\n    }\n    term(name, nodeName, flags = 0, props = {}) {\n        let term = new Term(name, flags, nodeName, props);\n        this.terms.push(term);\n        this.names[name] = term;\n        return term;\n    }\n    makeTop(nodeName, props) {\n        const term = this.term(\"@top\", nodeName, 2 /* TermFlag.Top */, props);\n        this.tops.push(term);\n        return term;\n    }\n    makeTerminal(name, nodeName, props = {}) {\n        return this.term(name, nodeName, 1 /* TermFlag.Terminal */, props);\n    }\n    makeNonTerminal(name, nodeName, props = {}) {\n        return this.term(name, nodeName, 0, props);\n    }\n    makeRepeat(name) {\n        return this.term(name, null, 16 /* TermFlag.Repeated */);\n    }\n    uniqueName(name) {\n        for (let i = 0;; i++) {\n            let cur = i ? `${name}-${i}` : name;\n            if (!this.names[cur])\n                return cur;\n        }\n    }\n    finish(rules) {\n        for (let rule of rules)\n            rule.name.rules.push(rule);\n        this.terms = this.terms.filter(t => t.terminal || t.preserve || rules.some(r => r.name == t || r.parts.includes(t)));\n        let names = {};\n        let nodeTypes = [this.error];\n        this.error.id = 0 /* T.Err */;\n        let nextID = 0 /* T.Err */ + 1;\n        // Assign ids to terms that represent node types\n        for (let term of this.terms)\n            if (term.id < 0 && term.nodeType && !term.repeated) {\n                term.id = nextID++;\n                nodeTypes.push(term);\n            }\n        // Put all repeated terms after the regular node types\n        let minRepeatTerm = nextID;\n        for (let term of this.terms)\n            if (term.repeated) {\n                term.id = nextID++;\n                nodeTypes.push(term);\n            }\n        // Then comes the EOF term\n        this.eof.id = nextID++;\n        // And then the remaining (non-node, non-repeat) terms.\n        for (let term of this.terms) {\n            if (term.id < 0)\n                term.id = nextID++;\n            if (term.name)\n                names[term.id] = term.name;\n        }\n        if (nextID >= 0xfffe)\n            throw new GenError(\"Too many terms\");\n        return { nodeTypes, names, minRepeatTerm, maxTerm: nextID - 1 };\n    }\n}\nfunction cmpSet(a, b, cmp) {\n    if (a.length != b.length)\n        return a.length - b.length;\n    for (let i = 0; i < a.length; i++) {\n        let diff = cmp(a[i], b[i]);\n        if (diff)\n            return diff;\n    }\n    return 0;\n}\nconst none$3 = [];\nclass Conflicts {\n    constructor(precedence, ambigGroups = none$3, cut = 0) {\n        this.precedence = precedence;\n        this.ambigGroups = ambigGroups;\n        this.cut = cut;\n    }\n    join(other) {\n        if (this == Conflicts.none || this == other)\n            return other;\n        if (other == Conflicts.none)\n            return this;\n        return new Conflicts(Math.max(this.precedence, other.precedence), union(this.ambigGroups, other.ambigGroups), Math.max(this.cut, other.cut));\n    }\n    cmp(other) {\n        return this.precedence - other.precedence || cmpSet(this.ambigGroups, other.ambigGroups, (a, b) => a < b ? -1 : a > b ? 1 : 0) ||\n            this.cut - other.cut;\n    }\n}\nConflicts.none = new Conflicts(0);\nfunction union(a, b) {\n    if (a.length == 0 || a == b)\n        return b;\n    if (b.length == 0)\n        return a;\n    let result = a.slice();\n    for (let value of b)\n        if (!a.includes(value))\n            result.push(value);\n    return result.sort();\n}\nlet ruleID = 0;\nclass Rule {\n    constructor(name, parts, conflicts, skip) {\n        this.name = name;\n        this.parts = parts;\n        this.conflicts = conflicts;\n        this.skip = skip;\n        this.id = ruleID++;\n    }\n    cmp(rule) {\n        return this.id - rule.id;\n    }\n    cmpNoName(rule) {\n        return this.parts.length - rule.parts.length ||\n            this.skip.hash - rule.skip.hash ||\n            this.parts.reduce((r, s, i) => r || s.cmp(rule.parts[i]), 0) ||\n            cmpSet(this.conflicts, rule.conflicts, (a, b) => a.cmp(b));\n    }\n    toString() {\n        return this.name + \" -> \" + this.parts.join(\" \");\n    }\n    get isRepeatWrap() {\n        return this.name.repeated && this.parts.length == 2 && this.parts[0] == this.name;\n    }\n    sameReduce(other) {\n        return this.name == other.name && this.parts.length == other.parts.length && this.isRepeatWrap == other.isRepeatWrap;\n    }\n}\n\nconst MAX_CHAR = 0xffff;\nclass Edge {\n    constructor(from, to, target) {\n        this.from = from;\n        this.to = to;\n        this.target = target;\n    }\n    toString() {\n        return `-> ${this.target.id}[label=${JSON.stringify(this.from < 0 ? \"ε\" : charFor(this.from) +\n            (this.to > this.from + 1 ? \"-\" + charFor(this.to - 1) : \"\"))}]`;\n    }\n}\nfunction charFor(n) {\n    return n > MAX_CHAR ? \"∞\"\n        : n == 10 ? \"\\\\n\"\n            : n == 13 ? \"\\\\r\"\n                : n < 32 || n >= 0xd800 && n < 0xdfff ? \"\\\\u{\" + n.toString(16) + \"}\"\n                    : String.fromCharCode(n);\n}\nfunction minimize(states, start) {\n    let partition = Object.create(null);\n    let byAccepting = Object.create(null);\n    for (let state of states) {\n        let id = ids(state.accepting);\n        let group = byAccepting[id] || (byAccepting[id] = []);\n        group.push(state);\n        partition[state.id] = group;\n    }\n    for (;;) {\n        let split = false, newPartition = Object.create(null);\n        for (let state of states) {\n            if (newPartition[state.id])\n                continue;\n            let group = partition[state.id];\n            if (group.length == 1) {\n                newPartition[group[0].id] = group;\n                continue;\n            }\n            let parts = [];\n            groups: for (let state of group) {\n                for (let p of parts) {\n                    if (isEquivalent(state, p[0], partition)) {\n                        p.push(state);\n                        continue groups;\n                    }\n                }\n                parts.push([state]);\n            }\n            if (parts.length > 1)\n                split = true;\n            for (let p of parts)\n                for (let s of p)\n                    newPartition[s.id] = p;\n        }\n        if (!split)\n            return applyMinimization(states, start, partition);\n        partition = newPartition;\n    }\n}\nfunction isEquivalent(a, b, partition) {\n    if (a.edges.length != b.edges.length)\n        return false;\n    for (let i = 0; i < a.edges.length; i++) {\n        let eA = a.edges[i], eB = b.edges[i];\n        if (eA.from != eB.from || eA.to != eB.to || partition[eA.target.id] != partition[eB.target.id])\n            return false;\n    }\n    return true;\n}\nfunction applyMinimization(states, start, partition) {\n    for (let state of states) {\n        for (let i = 0; i < state.edges.length; i++) {\n            let edge = state.edges[i], target = partition[edge.target.id][0];\n            if (target != edge.target)\n                state.edges[i] = new Edge(edge.from, edge.to, target);\n        }\n    }\n    return partition[start.id][0];\n}\nlet stateID = 1;\nlet State$1 = class State {\n    constructor(accepting = [], id = stateID++) {\n        this.accepting = accepting;\n        this.id = id;\n        this.edges = [];\n    }\n    edge(from, to, target) {\n        this.edges.push(new Edge(from, to, target));\n    }\n    nullEdge(target) { this.edge(-1, -1, target); }\n    compile() {\n        let labeled = Object.create(null), localID = 0;\n        let startState = explore(this.closure().sort((a, b) => a.id - b.id));\n        return minimize(Object.values(labeled), startState);\n        function explore(states) {\n            let newState = labeled[ids(states)] =\n                new State(states.reduce((a, s) => union(a, s.accepting), []), localID++);\n            let out = [];\n            for (let state of states)\n                for (let edge of state.edges) {\n                    if (edge.from >= 0)\n                        out.push(edge);\n                }\n            let transitions = mergeEdges(out);\n            for (let merged of transitions) {\n                let targets = merged.targets.sort((a, b) => a.id - b.id);\n                newState.edge(merged.from, merged.to, labeled[ids(targets)] || explore(targets));\n            }\n            return newState;\n        }\n    }\n    closure() {\n        let result = [], seen = Object.create(null);\n        function explore(state) {\n            if (seen[state.id])\n                return;\n            seen[state.id] = true;\n            // States with only epsilon edges and no accepting term that\n            // isn't also in the next states are left out to help reduce the\n            // number of unique state combinations\n            if (state.edges.some(e => e.from >= 0) ||\n                (state.accepting.length > 0 && !state.edges.some(e => sameSet$1(state.accepting, e.target.accepting))))\n                result.push(state);\n            for (let edge of state.edges)\n                if (edge.from < 0)\n                    explore(edge.target);\n        }\n        explore(this);\n        return result;\n    }\n    findConflicts(occurTogether) {\n        let conflicts = [], cycleTerms = this.cycleTerms();\n        function add(a, b, soft, aEdges, bEdges) {\n            if (a.id < b.id) {\n                [a, b] = [b, a];\n                soft = -soft;\n            }\n            let found = conflicts.find(c => c.a == a && c.b == b);\n            if (!found)\n                conflicts.push(new Conflict$1(a, b, soft, exampleFromEdges(aEdges), bEdges && exampleFromEdges(bEdges)));\n            else if (found.soft != soft)\n                found.soft = 0;\n        }\n        this.reachable((state, edges) => {\n            if (state.accepting.length == 0)\n                return;\n            for (let i = 0; i < state.accepting.length; i++)\n                for (let j = i + 1; j < state.accepting.length; j++)\n                    add(state.accepting[i], state.accepting[j], 0, edges);\n            state.reachable((s, es) => {\n                if (s != state)\n                    for (let term of s.accepting) {\n                        let hasCycle = cycleTerms.includes(term);\n                        for (let orig of state.accepting)\n                            if (term != orig)\n                                add(term, orig, hasCycle || cycleTerms.includes(orig) || !occurTogether(term, orig) ? 0 : 1, edges, edges.concat(es));\n                    }\n            });\n        });\n        return conflicts;\n    }\n    cycleTerms() {\n        let work = [];\n        this.reachable(state => {\n            for (let { target } of state.edges)\n                work.push(state, target);\n        });\n        let table = new Map;\n        let haveCycle = [];\n        for (let i = 0; i < work.length;) {\n            let from = work[i++], to = work[i++];\n            let entry = table.get(from);\n            if (!entry)\n                table.set(from, entry = []);\n            if (entry.includes(to))\n                continue;\n            if (from == to) {\n                if (!haveCycle.includes(from))\n                    haveCycle.push(from);\n            }\n            else {\n                for (let next of entry)\n                    work.push(from, next);\n                entry.push(to);\n            }\n        }\n        let result = [];\n        for (let state of haveCycle) {\n            for (let term of state.accepting) {\n                if (!result.includes(term))\n                    result.push(term);\n            }\n        }\n        return result;\n    }\n    reachable(f) {\n        let seen = [], edges = [];\n        (function explore(s) {\n            f(s, edges);\n            seen.push(s);\n            for (let edge of s.edges)\n                if (!seen.includes(edge.target)) {\n                    edges.push(edge);\n                    explore(edge.target);\n                    edges.pop();\n                }\n        })(this);\n    }\n    toString() {\n        let out = \"digraph {\\n\";\n        this.reachable(state => {\n            if (state.accepting.length)\n                out += `  ${state.id} [label=${JSON.stringify(state.accepting.join())}];\\n`;\n            for (let edge of state.edges)\n                out += `  ${state.id} ${edge};\\n`;\n        });\n        return out + \"}\";\n    }\n    // Tokenizer data is represented as a single flat array. This\n    // contains regions for each tokenizer state. Region offsets are\n    // used to identify states.\n    //\n    // Each state is laid out as:\n    //  - Token group mask\n    //  - Offset of the end of the accepting data\n    //  - Number of outgoing edges in the state\n    //  - Pairs of token masks and term ids that indicate the accepting\n    //    states, sorted by precedence\n    //  - Triples for the edges: each with a low and high bound and the\n    //    offset of the next state.\n    toArray(groupMasks, precedence) {\n        let offsets = []; // Used to 'link' the states after building the arrays\n        let data = [];\n        this.reachable(state => {\n            let start = data.length;\n            let acceptEnd = start + 3 + state.accepting.length * 2;\n            offsets[state.id] = start;\n            data.push(state.stateMask(groupMasks), acceptEnd, state.edges.length);\n            state.accepting.sort((a, b) => precedence.indexOf(a.id) - precedence.indexOf(b.id));\n            for (let term of state.accepting)\n                data.push(term.id, groupMasks[term.id] || 0xffff);\n            for (let edge of state.edges)\n                data.push(edge.from, edge.to, -edge.target.id - 1);\n        });\n        // Replace negative numbers with resolved state offsets\n        for (let i = 0; i < data.length; i++)\n            if (data[i] < 0)\n                data[i] = offsets[-data[i] - 1];\n        if (data.length > Math.pow(2, 16))\n            throw new GenError(\"Tokenizer tables too big to represent with 16-bit offsets.\");\n        return Uint16Array.from(data);\n    }\n    stateMask(groupMasks) {\n        let mask = 0;\n        this.reachable(state => {\n            for (let term of state.accepting)\n                mask |= (groupMasks[term.id] || 0xffff);\n        });\n        return mask;\n    }\n};\nlet Conflict$1 = class Conflict {\n    constructor(a, b, \n    // Conflicts between two non-cyclic tokens are marked as\n    // 'soft', with a negative number if a is shorter than\n    // b, and a positive if b is shorter than a.\n    soft, exampleA, exampleB) {\n        this.a = a;\n        this.b = b;\n        this.soft = soft;\n        this.exampleA = exampleA;\n        this.exampleB = exampleB;\n    }\n};\nfunction exampleFromEdges(edges) {\n    let str = \"\";\n    for (let i = 0; i < edges.length; i++)\n        str += String.fromCharCode(edges[i].from);\n    return str;\n}\nfunction ids(elts) {\n    let result = \"\";\n    for (let elt of elts) {\n        if (result.length)\n            result += \"-\";\n        result += elt.id;\n    }\n    return result;\n}\nfunction sameSet$1(a, b) {\n    if (a.length != b.length)\n        return false;\n    for (let i = 0; i < a.length; i++)\n        if (a[i] != b[i])\n            return false;\n    return true;\n}\nclass MergedEdge {\n    constructor(from, to, targets) {\n        this.from = from;\n        this.to = to;\n        this.targets = targets;\n    }\n}\n// Merge multiple edges (tagged by character ranges) into a set of\n// mutually exclusive ranges pointing at all target states for that\n// range\nfunction mergeEdges(edges) {\n    let separate = [], result = [];\n    for (let edge of edges) {\n        if (!separate.includes(edge.from))\n            separate.push(edge.from);\n        if (!separate.includes(edge.to))\n            separate.push(edge.to);\n    }\n    separate.sort((a, b) => a - b);\n    for (let i = 1; i < separate.length; i++) {\n        let from = separate[i - 1], to = separate[i];\n        let found = [];\n        for (let edge of edges)\n            if (edge.to > from && edge.from < to) {\n                for (let target of edge.target.closure())\n                    if (!found.includes(target))\n                        found.push(target);\n            }\n        if (found.length)\n            result.push(new MergedEdge(from, to, found));\n    }\n    let eof = edges.filter(e => e.from == 65535 /* Seq.End */ && e.to == 65535 /* Seq.End */);\n    if (eof.length) {\n        let found = [];\n        for (let edge of eof)\n            for (let target of edge.target.closure())\n                if (!found.includes(target))\n                    found.push(target);\n        if (found.length)\n            result.push(new MergedEdge(65535 /* Seq.End */, 65535 /* Seq.End */, found));\n    }\n    return result;\n}\n\n// Note that this is the parser for grammar files, not the generated parser\nlet word = /[\\w_-]+/gy;\n// Some engines (specifically SpiderMonkey) have still not implemented \\p\ntry {\n    word = /[\\p{Alphabetic}\\d_-]+/ugy;\n}\ncatch (_) { }\nconst none$2 = [];\nclass Input {\n    constructor(string, fileName = null) {\n        this.string = string;\n        this.fileName = fileName;\n        this.type = \"sof\";\n        this.value = null;\n        this.start = 0;\n        this.end = 0;\n        this.next();\n    }\n    lineInfo(pos) {\n        for (let line = 1, cur = 0;;) {\n            let next = this.string.indexOf(\"\\n\", cur);\n            if (next > -1 && next < pos) {\n                ++line;\n                cur = next + 1;\n            }\n            else {\n                return { line, ch: pos - cur };\n            }\n        }\n    }\n    message(msg, pos = -1) {\n        let posInfo = this.fileName || \"\";\n        if (pos > -1) {\n            let info = this.lineInfo(pos);\n            posInfo += (posInfo ? \" \" : \"\") + info.line + \":\" + info.ch;\n        }\n        return posInfo ? msg + ` (${posInfo})` : msg;\n    }\n    raise(msg, pos = -1) {\n        throw new GenError(this.message(msg, pos));\n    }\n    match(pos, re) {\n        let match = re.exec(this.string.slice(pos));\n        return match ? pos + match[0].length : -1;\n    }\n    next() {\n        let start = this.match(this.end, /^(\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/);\n        if (start == this.string.length)\n            return this.set(\"eof\", null, start, start);\n        let next = this.string[start];\n        if (next == '\"') {\n            let end = this.match(start + 1, /^(\\\\.|[^\"\\\\])*\"/);\n            if (end == -1)\n                this.raise(\"Unterminated string literal\", start);\n            return this.set(\"string\", readString(this.string.slice(start + 1, end - 1)), start, end);\n        }\n        else if (next == \"'\") {\n            let end = this.match(start + 1, /^(\\\\.|[^'\\\\])*'/);\n            if (end == -1)\n                this.raise(\"Unterminated string literal\", start);\n            return this.set(\"string\", readString(this.string.slice(start + 1, end - 1)), start, end);\n        }\n        else if (next == \"@\") {\n            word.lastIndex = start + 1;\n            let m = word.exec(this.string);\n            if (!m)\n                return this.raise(\"@ without a name\", start);\n            return this.set(\"at\", m[0], start, start + 1 + m[0].length);\n        }\n        else if ((next == \"$\" || next == \"!\") && this.string[start + 1] == \"[\") {\n            let end = this.match(start + 2, /^(?:\\\\.|[^\\]\\\\])*\\]/);\n            if (end == -1)\n                this.raise(\"Unterminated character set\", start);\n            return this.set(\"set\", this.string.slice(start + 2, end - 1), start, end);\n        }\n        else if (/[\\[\\]()!~+*?{}<>\\.,|:$=]/.test(next)) {\n            return this.set(next, null, start, start + 1);\n        }\n        else {\n            word.lastIndex = start;\n            let m = word.exec(this.string);\n            if (!m)\n                return this.raise(\"Unexpected character \" + JSON.stringify(next), start);\n            return this.set(\"id\", m[0], start, start + m[0].length);\n        }\n    }\n    set(type, value, start, end) {\n        this.type = type;\n        this.value = value;\n        this.start = start;\n        this.end = end;\n    }\n    eat(type, value = null) {\n        if (this.type == type && (value == null || this.value === value)) {\n            this.next();\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n    unexpected() {\n        return this.raise(`Unexpected token '${this.string.slice(this.start, this.end)}'`, this.start);\n    }\n    expect(type, value = null) {\n        let val = this.value;\n        if (this.type != type || !(value == null || val === value))\n            this.unexpected();\n        this.next();\n        return val;\n    }\n    parse() {\n        return parseGrammar(this);\n    }\n}\nfunction parseGrammar(input) {\n    let start = input.start;\n    let rules = [];\n    let prec = null;\n    let tokens = null;\n    let localTokens = [];\n    let mainSkip = null;\n    let scopedSkip = [];\n    let dialects = [];\n    let context = null;\n    let external = [];\n    let specialized = [];\n    let props = [];\n    let propSources = [];\n    let tops = [];\n    let sawTop = false;\n    let autoDelim = false;\n    while (input.type != \"eof\") {\n        let start = input.start;\n        if (input.eat(\"at\", \"top\")) {\n            if (input.type != \"id\")\n                input.raise(`Top rules must have a name`, input.start);\n            tops.push(parseRule(input, parseIdent(input)));\n            sawTop = true;\n        }\n        else if (input.type == \"at\" && input.value == \"tokens\") {\n            if (tokens)\n                input.raise(`Multiple @tokens declaractions`, input.start);\n            else\n                tokens = parseTokens(input);\n        }\n        else if (input.eat(\"at\", \"local\")) {\n            input.expect(\"id\", \"tokens\");\n            localTokens.push(parseLocalTokens(input, start));\n        }\n        else if (input.eat(\"at\", \"context\")) {\n            if (context)\n                input.raise(`Multiple @context declarations`, start);\n            let id = parseIdent(input);\n            input.expect(\"id\", \"from\");\n            let source = input.expect(\"string\");\n            context = new ContextDeclaration(start, id, source);\n        }\n        else if (input.eat(\"at\", \"external\")) {\n            if (input.eat(\"id\", \"tokens\"))\n                external.push(parseExternalTokens(input, start));\n            else if (input.eat(\"id\", \"prop\"))\n                props.push(parseExternalProp(input, start));\n            else if (input.eat(\"id\", \"extend\"))\n                specialized.push(parseExternalSpecialize(input, \"extend\", start));\n            else if (input.eat(\"id\", \"specialize\"))\n                specialized.push(parseExternalSpecialize(input, \"specialize\", start));\n            else if (input.eat(\"id\", \"propSource\"))\n                propSources.push(parseExternalPropSource(input, start));\n            else\n                input.unexpected();\n        }\n        else if (input.eat(\"at\", \"dialects\")) {\n            input.expect(\"{\");\n            for (let first = true; !input.eat(\"}\"); first = false) {\n                if (!first)\n                    input.eat(\",\");\n                dialects.push(parseIdent(input));\n            }\n        }\n        else if (input.type == \"at\" && input.value == \"precedence\") {\n            if (prec)\n                input.raise(`Multiple precedence declarations`, input.start);\n            prec = parsePrecedence(input);\n        }\n        else if (input.eat(\"at\", \"detectDelim\")) {\n            autoDelim = true;\n        }\n        else if (input.eat(\"at\", \"skip\")) {\n            let skip = parseBracedExpr(input);\n            if (input.type == \"{\") {\n                input.next();\n                let rules = [], topRules = [];\n                while (!input.eat(\"}\")) {\n                    if (input.eat(\"at\", \"top\")) {\n                        topRules.push(parseRule(input, parseIdent(input)));\n                        sawTop = true;\n                    }\n                    else {\n                        rules.push(parseRule(input));\n                    }\n                }\n                scopedSkip.push({ expr: skip, topRules, rules });\n            }\n            else {\n                if (mainSkip)\n                    input.raise(`Multiple top-level skip declarations`, input.start);\n                mainSkip = skip;\n            }\n        }\n        else {\n            rules.push(parseRule(input));\n        }\n    }\n    if (!sawTop)\n        return input.raise(`Missing @top declaration`);\n    return new GrammarDeclaration(start, rules, tops, tokens, localTokens, context, external, specialized, propSources, prec, mainSkip, scopedSkip, dialects, props, autoDelim);\n}\nfunction parseRule(input, named) {\n    let start = named ? named.start : input.start;\n    let id = named || parseIdent(input);\n    let props = parseProps(input);\n    let params = [];\n    if (input.eat(\"<\"))\n        while (!input.eat(\">\")) {\n            if (params.length)\n                input.expect(\",\");\n            params.push(parseIdent(input));\n        }\n    let expr = parseBracedExpr(input);\n    return new RuleDeclaration(start, id, props, params, expr);\n}\nfunction parseProps(input) {\n    if (input.type != \"[\")\n        return none$2;\n    let props = [];\n    input.expect(\"[\");\n    while (!input.eat(\"]\")) {\n        if (props.length)\n            input.expect(\",\");\n        props.push(parseProp(input));\n    }\n    return props;\n}\nfunction parseProp(input) {\n    let start = input.start, value = [], name = input.value, at = input.type == \"at\";\n    if (!input.eat(\"at\") && !input.eat(\"id\"))\n        input.unexpected();\n    if (input.eat(\"=\"))\n        for (;;) {\n            if (input.type == \"string\" || input.type == \"id\") {\n                value.push(new PropPart(input.start, input.value, null));\n                input.next();\n            }\n            else if (input.eat(\".\")) {\n                value.push(new PropPart(input.start, \".\", null));\n            }\n            else if (input.eat(\"{\")) {\n                value.push(new PropPart(input.start, null, input.expect(\"id\")));\n                input.expect(\"}\");\n            }\n            else {\n                break;\n            }\n        }\n    return new Prop(start, at, name, value);\n}\nfunction parseBracedExpr(input) {\n    input.expect(\"{\");\n    let expr = parseExprChoice(input);\n    input.expect(\"}\");\n    return expr;\n}\nconst SET_MARKER = \"\\ufdda\"; // (Invalid unicode character)\nfunction parseExprInner(input) {\n    let start = input.start;\n    if (input.eat(\"(\")) {\n        if (input.eat(\")\"))\n            return new SequenceExpression(start, none$2, [none$2, none$2]);\n        let expr = parseExprChoice(input);\n        input.expect(\")\");\n        return expr;\n    }\n    else if (input.type == \"string\") {\n        let value = input.value;\n        input.next();\n        if (value.length == 0)\n            return new SequenceExpression(start, none$2, [none$2, none$2]);\n        return new LiteralExpression(start, value);\n    }\n    else if (input.eat(\"id\", \"_\")) {\n        return new AnyExpression(start);\n    }\n    else if (input.type == \"set\") {\n        let content = input.value, invert = input.string[input.start] == \"!\";\n        let unescaped = readString(content.replace(/\\\\.|-|\"/g, (m) => {\n            return m == \"-\" ? SET_MARKER : m == '\"' ? '\\\\\"' : m;\n        }));\n        let ranges = [];\n        for (let pos = 0; pos < unescaped.length;) {\n            let code = unescaped.codePointAt(pos);\n            pos += code > 0xffff ? 2 : 1;\n            if (pos < unescaped.length - 1 && unescaped[pos] == SET_MARKER) {\n                let end = unescaped.codePointAt(pos + 1);\n                pos += end > 0xffff ? 3 : 2;\n                if (end < code)\n                    input.raise(\"Invalid character range\", input.start);\n                addRange(input, ranges, code, end + 1);\n            }\n            else {\n                if (code == SET_MARKER.charCodeAt(0))\n                    code = 45;\n                addRange(input, ranges, code, code + 1);\n            }\n        }\n        input.next();\n        return new SetExpression(start, ranges.sort((a, b) => a[0] - b[0]), invert);\n    }\n    else if (input.type == \"at\" && (input.value == \"specialize\" || input.value == \"extend\")) {\n        let { start, value } = input;\n        input.next();\n        let props = parseProps(input);\n        input.expect(\"<\");\n        let token = parseExprChoice(input), content;\n        if (input.eat(\",\")) {\n            content = parseExprChoice(input);\n        }\n        else if (token instanceof LiteralExpression) {\n            content = token;\n        }\n        else {\n            input.raise(`@${value} requires two arguments when its first argument isn't a literal string`);\n        }\n        input.expect(\">\");\n        return new SpecializeExpression(start, value, props, token, content);\n    }\n    else if (input.type == \"at\" && CharClasses.hasOwnProperty(input.value)) {\n        let cls = new CharClass(input.start, input.value);\n        input.next();\n        return cls;\n    }\n    else if (input.type == \"[\") {\n        let rule = parseRule(input, new Identifier(start, \"_anon\"));\n        if (rule.params.length)\n            input.raise(`Inline rules can't have parameters`, rule.start);\n        return new InlineRuleExpression(start, rule);\n    }\n    else {\n        let id = parseIdent(input);\n        if (input.type == \"[\" || input.type == \"{\") {\n            let rule = parseRule(input, id);\n            if (rule.params.length)\n                input.raise(`Inline rules can't have parameters`, rule.start);\n            return new InlineRuleExpression(start, rule);\n        }\n        else {\n            if (input.eat(\".\") && id.name == \"std\" && CharClasses.hasOwnProperty(input.value)) {\n                let cls = new CharClass(start, input.value);\n                input.next();\n                return cls;\n            }\n            return new NameExpression(start, id, parseArgs(input));\n        }\n    }\n}\nfunction parseArgs(input) {\n    let args = [];\n    if (input.eat(\"<\"))\n        while (!input.eat(\">\")) {\n            if (args.length)\n                input.expect(\",\");\n            args.push(parseExprChoice(input));\n        }\n    return args;\n}\nfunction addRange(input, ranges, from, to) {\n    if (!ranges.every(([a, b]) => b <= from || a >= to))\n        input.raise(\"Overlapping character range\", input.start);\n    ranges.push([from, to]);\n}\nfunction parseExprSuffix(input) {\n    let start = input.start;\n    let expr = parseExprInner(input);\n    for (;;) {\n        let kind = input.type;\n        if (input.eat(\"*\") || input.eat(\"?\") || input.eat(\"+\"))\n            expr = new RepeatExpression(start, expr, kind);\n        else\n            return expr;\n    }\n}\nfunction endOfSequence(input) {\n    return input.type == \"}\" || input.type == \")\" || input.type == \"|\" || input.type == \"/\" ||\n        input.type == \"/\\\\\" || input.type == \"{\" || input.type == \",\" || input.type == \">\";\n}\nfunction parseExprSequence(input) {\n    let start = input.start, exprs = [], markers = [none$2];\n    do {\n        // Add markers at this position\n        for (;;) {\n            let localStart = input.start, markerType;\n            if (input.eat(\"~\"))\n                markerType = \"ambig\";\n            else if (input.eat(\"!\"))\n                markerType = \"prec\";\n            else\n                break;\n            markers[markers.length - 1] =\n                markers[markers.length - 1].concat(new ConflictMarker(localStart, parseIdent(input), markerType));\n        }\n        if (endOfSequence(input))\n            break;\n        exprs.push(parseExprSuffix(input));\n        markers.push(none$2);\n    } while (!endOfSequence(input));\n    if (exprs.length == 1 && markers.every(ms => ms.length == 0))\n        return exprs[0];\n    return new SequenceExpression(start, exprs, markers, !exprs.length);\n}\nfunction parseExprChoice(input) {\n    let start = input.start, left = parseExprSequence(input);\n    if (!input.eat(\"|\"))\n        return left;\n    let exprs = [left];\n    do {\n        exprs.push(parseExprSequence(input));\n    } while (input.eat(\"|\"));\n    let empty = exprs.find(s => s instanceof SequenceExpression && s.empty);\n    if (empty)\n        input.raise(\"Empty expression in choice operator. If this is intentional, use () to make it explicit.\", empty.start);\n    return new ChoiceExpression(start, exprs);\n}\nfunction parseIdent(input) {\n    if (input.type != \"id\")\n        input.unexpected();\n    let start = input.start, name = input.value;\n    input.next();\n    return new Identifier(start, name);\n}\nfunction parsePrecedence(input) {\n    let start = input.start;\n    input.next();\n    input.expect(\"{\");\n    let items = [];\n    while (!input.eat(\"}\")) {\n        if (items.length)\n            input.eat(\",\");\n        items.push({\n            id: parseIdent(input),\n            type: input.eat(\"at\", \"left\") ? \"left\" : input.eat(\"at\", \"right\") ? \"right\" : input.eat(\"at\", \"cut\") ? \"cut\" : null\n        });\n    }\n    return new PrecDeclaration(start, items);\n}\nfunction parseTokens(input) {\n    let start = input.start;\n    input.next();\n    input.expect(\"{\");\n    let tokenRules = [];\n    let literals = [];\n    let precedences = [];\n    let conflicts = [];\n    while (!input.eat(\"}\")) {\n        if (input.type == \"at\" && input.value == \"precedence\") {\n            precedences.push(parseTokenPrecedence(input));\n        }\n        else if (input.type == \"at\" && input.value == \"conflict\") {\n            conflicts.push(parseTokenConflict(input));\n        }\n        else if (input.type == \"string\") {\n            literals.push(new LiteralDeclaration(input.start, input.expect(\"string\"), parseProps(input)));\n        }\n        else {\n            tokenRules.push(parseRule(input));\n        }\n    }\n    return new TokenDeclaration(start, precedences, conflicts, tokenRules, literals);\n}\nfunction parseLocalTokens(input, start) {\n    input.expect(\"{\");\n    let tokenRules = [];\n    let precedences = [];\n    let fallback = null;\n    while (!input.eat(\"}\")) {\n        if (input.type == \"at\" && input.value == \"precedence\") {\n            precedences.push(parseTokenPrecedence(input));\n        }\n        else if (input.eat(\"at\", \"else\") && !fallback) {\n            fallback = { id: parseIdent(input), props: parseProps(input) };\n        }\n        else {\n            tokenRules.push(parseRule(input));\n        }\n    }\n    return new LocalTokenDeclaration(start, precedences, tokenRules, fallback);\n}\nfunction parseTokenPrecedence(input) {\n    let start = input.start;\n    input.next();\n    input.expect(\"{\");\n    let tokens = [];\n    while (!input.eat(\"}\")) {\n        if (tokens.length)\n            input.eat(\",\");\n        let expr = parseExprInner(input);\n        if (expr instanceof LiteralExpression || expr instanceof NameExpression)\n            tokens.push(expr);\n        else\n            input.raise(`Invalid expression in token precedences`, expr.start);\n    }\n    return new TokenPrecDeclaration(start, tokens);\n}\nfunction parseTokenConflict(input) {\n    let start = input.start;\n    input.next();\n    input.expect(\"{\");\n    let a = parseExprInner(input);\n    if (!(a instanceof LiteralExpression || a instanceof NameExpression))\n        input.raise(`Invalid expression in token conflict`, a.start);\n    input.eat(\",\");\n    let b = parseExprInner(input);\n    if (!(b instanceof LiteralExpression || b instanceof NameExpression))\n        input.raise(`Invalid expression in token conflict`, b.start);\n    input.expect(\"}\");\n    return new TokenConflictDeclaration(start, a, b);\n}\nfunction parseExternalTokenSet(input) {\n    let tokens = [];\n    input.expect(\"{\");\n    while (!input.eat(\"}\")) {\n        if (tokens.length)\n            input.eat(\",\");\n        let id = parseIdent(input);\n        let props = parseProps(input);\n        tokens.push({ id, props });\n    }\n    return tokens;\n}\nfunction parseExternalTokens(input, start) {\n    let id = parseIdent(input);\n    input.expect(\"id\", \"from\");\n    let from = input.expect(\"string\");\n    return new ExternalTokenDeclaration(start, id, from, parseExternalTokenSet(input));\n}\nfunction parseExternalSpecialize(input, type, start) {\n    let token = parseBracedExpr(input);\n    let id = parseIdent(input);\n    input.expect(\"id\", \"from\");\n    let from = input.expect(\"string\");\n    return new ExternalSpecializeDeclaration(start, type, token, id, from, parseExternalTokenSet(input));\n}\nfunction parseExternalPropSource(input, start) {\n    let id = parseIdent(input);\n    input.expect(\"id\", \"from\");\n    return new ExternalPropSourceDeclaration(start, id, input.expect(\"string\"));\n}\nfunction parseExternalProp(input, start) {\n    let externalID = parseIdent(input);\n    let id = input.eat(\"id\", \"as\") ? parseIdent(input) : externalID;\n    input.expect(\"id\", \"from\");\n    let from = input.expect(\"string\");\n    return new ExternalPropDeclaration(start, id, externalID, from);\n}\nfunction readString(string) {\n    let point = /\\\\(?:u\\{([\\da-f]+)\\}|u([\\da-f]{4})|x([\\da-f]{2})|([ntbrf0])|(.))|[^]/yig;\n    let out = \"\", m;\n    while (m = point.exec(string)) {\n        let [all, u1, u2, u3, single, unknown] = m;\n        if (u1 || u2 || u3)\n            out += String.fromCodePoint(parseInt(u1 || u2 || u3, 16));\n        else if (single)\n            out += single == \"n\" ? \"\\n\" : single == \"t\" ? \"\\t\" : single == \"0\" ? \"\\0\" : single == \"r\" ? \"\\r\" : single == \"f\" ? \"\\f\" : \"\\b\";\n        else if (unknown)\n            out += unknown;\n        else\n            out += all;\n    }\n    return out;\n}\n\nfunction hash(a, b) { return (a << 5) + a + b; }\nfunction hashString(h, s) {\n    for (let i = 0; i < s.length; i++)\n        h = hash(h, s.charCodeAt(i));\n    return h;\n}\n\nconst verbose = (typeof process != \"undefined\" && process.env.LOG) || \"\";\nconst timing = /\\btime\\b/.test(verbose);\nconst time = timing ? (label, f) => {\n    let t0 = Date.now();\n    let result = f();\n    console.log(`${label} (${((Date.now() - t0) / 1000).toFixed(2)}s)`);\n    return result;\n} : (_label, f) => f();\n\nclass Pos {\n    constructor(rule, pos, \n    // NOTE `ahead` and `ambigAhead` aren't mutated anymore after `finish()` has been called\n    ahead, ambigAhead, skipAhead, via) {\n        this.rule = rule;\n        this.pos = pos;\n        this.ahead = ahead;\n        this.ambigAhead = ambigAhead;\n        this.skipAhead = skipAhead;\n        this.via = via;\n        this.hash = 0;\n    }\n    finish() {\n        let h = hash(hash(this.rule.id, this.pos), this.skipAhead.hash);\n        for (let a of this.ahead)\n            h = hash(h, a.hash);\n        for (let group of this.ambigAhead)\n            h = hashString(h, group);\n        this.hash = h;\n        return this;\n    }\n    get next() {\n        return this.pos < this.rule.parts.length ? this.rule.parts[this.pos] : null;\n    }\n    advance() {\n        return new Pos(this.rule, this.pos + 1, this.ahead, this.ambigAhead, this.skipAhead, this.via).finish();\n    }\n    get skip() {\n        return this.pos == this.rule.parts.length ? this.skipAhead : this.rule.skip;\n    }\n    cmp(pos) {\n        return this.rule.cmp(pos.rule) || this.pos - pos.pos || this.skipAhead.hash - pos.skipAhead.hash ||\n            cmpSet(this.ahead, pos.ahead, (a, b) => a.cmp(b)) || cmpSet(this.ambigAhead, pos.ambigAhead, cmpStr);\n    }\n    eqSimple(pos) {\n        return pos.rule == this.rule && pos.pos == this.pos;\n    }\n    toString() {\n        let parts = this.rule.parts.map(t => t.name);\n        parts.splice(this.pos, 0, \"·\");\n        return `${this.rule.name} -> ${parts.join(\" \")}`;\n    }\n    eq(other) {\n        return this == other ||\n            this.hash == other.hash && this.rule == other.rule && this.pos == other.pos && this.skipAhead == other.skipAhead &&\n                sameSet(this.ahead, other.ahead) &&\n                sameSet(this.ambigAhead, other.ambigAhead);\n    }\n    trail(maxLen = 60) {\n        let result = [];\n        for (let pos = this; pos; pos = pos.via) {\n            for (let i = pos.pos - 1; i >= 0; i--)\n                result.push(pos.rule.parts[i]);\n        }\n        let value = result.reverse().join(\" \");\n        if (value.length > maxLen)\n            value = value.slice(value.length - maxLen).replace(/.*? /, \"… \");\n        return value;\n    }\n    conflicts(pos = this.pos) {\n        let result = this.rule.conflicts[pos];\n        if (pos == this.rule.parts.length && this.ambigAhead.length)\n            result = result.join(new Conflicts(0, this.ambigAhead));\n        return result;\n    }\n    static addOrigins(group, context) {\n        let result = group.slice();\n        for (let i = 0; i < result.length; i++) {\n            let next = result[i];\n            if (next.pos == 0)\n                for (let pos of context) {\n                    if (pos.next == next.rule.name && !result.includes(pos))\n                        result.push(pos);\n                }\n        }\n        return result;\n    }\n}\nfunction conflictsAt(group) {\n    let result = Conflicts.none;\n    for (let pos of group)\n        result = result.join(pos.conflicts());\n    return result;\n}\n// Applies automatic action precedence based on repeat productions.\n// These are left-associative, so reducing the `R -> R R` rule has\n// higher precedence.\nfunction compareRepeatPrec(a, b) {\n    for (let pos of a)\n        if (pos.rule.name.repeated) {\n            for (let posB of b)\n                if (posB.rule.name == pos.rule.name) {\n                    if (pos.rule.isRepeatWrap && pos.pos == 2)\n                        return 1;\n                    if (posB.rule.isRepeatWrap && posB.pos == 2)\n                        return -1;\n                }\n        }\n    return 0;\n}\nfunction cmpStr(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction termsAhead(rule, pos, after, first) {\n    let found = [];\n    for (let i = pos + 1; i < rule.parts.length; i++) {\n        let next = rule.parts[i], cont = false;\n        if (next.terminal) {\n            addTo(next, found);\n        }\n        else\n            for (let term of first[next.name]) {\n                if (term == null)\n                    cont = true;\n                else\n                    addTo(term, found);\n            }\n        if (!cont)\n            return found;\n    }\n    for (let a of after)\n        addTo(a, found);\n    return found;\n}\nfunction eqSet(a, b) {\n    if (a.length != b.length)\n        return false;\n    for (let i = 0; i < a.length; i++)\n        if (!a[i].eq(b[i]))\n            return false;\n    return true;\n}\nfunction sameSet(a, b) {\n    if (a.length != b.length)\n        return false;\n    for (let i = 0; i < a.length; i++)\n        if (a[i] != b[i])\n            return false;\n    return true;\n}\nclass Shift {\n    constructor(term, target) {\n        this.term = term;\n        this.target = target;\n    }\n    eq(other) { return other instanceof Shift && this.term == other.term && other.target.id == this.target.id; }\n    cmp(other) { return other instanceof Reduce ? -1 : this.term.id - other.term.id || this.target.id - other.target.id; }\n    matches(other, mapping) {\n        return other instanceof Shift && mapping[other.target.id] == mapping[this.target.id];\n    }\n    toString() { return \"s\" + this.target.id; }\n    map(mapping, states) {\n        let mapped = states[mapping[this.target.id]];\n        return mapped == this.target ? this : new Shift(this.term, mapped);\n    }\n}\nclass Reduce {\n    constructor(term, rule) {\n        this.term = term;\n        this.rule = rule;\n    }\n    eq(other) {\n        return other instanceof Reduce && this.term == other.term && other.rule.sameReduce(this.rule);\n    }\n    cmp(other) {\n        return other instanceof Shift ? 1 : this.term.id - other.term.id || this.rule.name.id - other.rule.name.id ||\n            this.rule.parts.length - other.rule.parts.length;\n    }\n    matches(other, mapping) {\n        return other instanceof Reduce && other.rule.sameReduce(this.rule);\n    }\n    toString() { return `${this.rule.name.name}(${this.rule.parts.length})`; }\n    map() { return this; }\n}\nfunction hashPositions(set) {\n    let h = 5381;\n    for (let pos of set)\n        h = hash(h, pos.hash);\n    return h;\n}\nclass ConflictContext {\n    constructor(first) {\n        this.first = first;\n        this.conflicts = [];\n    }\n}\nclass State {\n    constructor(id, set, flags = 0, skip, hash = hashPositions(set), startRule = null) {\n        this.id = id;\n        this.set = set;\n        this.flags = flags;\n        this.skip = skip;\n        this.hash = hash;\n        this.startRule = startRule;\n        this.actions = [];\n        this.actionPositions = [];\n        this.goto = [];\n        this.tokenGroup = -1;\n        this.defaultReduce = null;\n        this._actionsByTerm = null;\n    }\n    toString() {\n        let actions = this.actions.map(t => t.term + \"=\" + t).join(\",\") +\n            (this.goto.length ? \" | \" + this.goto.map(g => g.term + \"=\" + g).join(\",\") : \"\");\n        return this.id + \": \" + this.set.filter(p => p.pos > 0).join() +\n            (this.defaultReduce ? `\\n  always ${this.defaultReduce.name}(${this.defaultReduce.parts.length})`\n                : actions.length ? \"\\n  \" + actions : \"\");\n    }\n    addActionInner(value, positions) {\n        check: for (let i = 0; i < this.actions.length; i++) {\n            let action = this.actions[i];\n            if (action.term == value.term) {\n                if (action.eq(value))\n                    return null;\n                let fullPos = Pos.addOrigins(positions, this.set), actionFullPos = Pos.addOrigins(this.actionPositions[i], this.set);\n                let conflicts = conflictsAt(fullPos), actionConflicts = conflictsAt(actionFullPos);\n                let diff = compareRepeatPrec(fullPos, actionFullPos) || conflicts.precedence - actionConflicts.precedence;\n                if (diff > 0) { // Drop the existing action\n                    this.actions.splice(i, 1);\n                    this.actionPositions.splice(i, 1);\n                    i--;\n                    continue check;\n                }\n                else if (diff < 0) { // Drop this one\n                    return null;\n                }\n                else if (conflicts.ambigGroups.some(g => actionConflicts.ambigGroups.includes(g))) { // Explicitly allowed ambiguity\n                    continue check;\n                }\n                else { // Not resolved\n                    return action;\n                }\n            }\n        }\n        this.actions.push(value);\n        this.actionPositions.push(positions);\n        return null;\n    }\n    addAction(value, positions, context) {\n        let conflict = this.addActionInner(value, positions);\n        if (conflict) {\n            let conflictPos = this.actionPositions[this.actions.indexOf(conflict)][0];\n            let rules = [positions[0].rule.name, conflictPos.rule.name];\n            if (context.conflicts.some(c => c.rules.some(r => rules.includes(r))))\n                return;\n            let error;\n            if (conflict instanceof Shift)\n                error = `shift/reduce conflict between\\n  ${conflictPos}\\nand\\n  ${positions[0].rule}`;\n            else\n                error = `reduce/reduce conflict between\\n  ${conflictPos.rule}\\nand\\n  ${positions[0].rule}`;\n            error += `\\nWith input:\\n  ${positions[0].trail(70)} · ${value.term} …`;\n            if (conflict instanceof Shift)\n                error += findConflictShiftSource(positions[0], conflict.term, context.first);\n            error += findConflictOrigin(conflictPos, positions[0]);\n            context.conflicts.push(new Conflict(error, rules));\n        }\n    }\n    getGoto(term) {\n        return this.goto.find(a => a.term == term);\n    }\n    hasSet(set) {\n        return eqSet(this.set, set);\n    }\n    actionsByTerm() {\n        let result = this._actionsByTerm;\n        if (!result) {\n            this._actionsByTerm = result = Object.create(null);\n            for (let action of this.actions)\n                (result[action.term.id] || (result[action.term.id] = [])).push(action);\n        }\n        return result;\n    }\n    finish() {\n        if (this.actions.length) {\n            let first = this.actions[0];\n            if (first instanceof Reduce) {\n                let { rule } = first;\n                if (this.actions.every(a => a instanceof Reduce && a.rule.sameReduce(rule)))\n                    this.defaultReduce = rule;\n            }\n        }\n        this.actions.sort((a, b) => a.cmp(b));\n        this.goto.sort((a, b) => a.cmp(b));\n    }\n    eq(other) {\n        let dThis = this.defaultReduce, dOther = other.defaultReduce;\n        if (dThis || dOther)\n            return dThis && dOther ? dThis.sameReduce(dOther) : false;\n        return this.skip == other.skip &&\n            this.tokenGroup == other.tokenGroup &&\n            eqSet(this.actions, other.actions) &&\n            eqSet(this.goto, other.goto);\n    }\n}\nfunction closure(set, first) {\n    let added = [], redo = [];\n    function addFor(name, ahead, ambigAhead, skipAhead, via) {\n        for (let rule of name.rules) {\n            let add = added.find(a => a.rule == rule);\n            if (!add) {\n                let existing = set.find(p => p.pos == 0 && p.rule == rule);\n                add = existing ? new Pos(rule, 0, existing.ahead.slice(), existing.ambigAhead, existing.skipAhead, existing.via)\n                    : new Pos(rule, 0, [], none$1, skipAhead, via);\n                added.push(add);\n            }\n            if (add.skipAhead != skipAhead)\n                throw new GenError(\"Inconsistent skip sets after \" + via.trail());\n            add.ambigAhead = union(add.ambigAhead, ambigAhead);\n            for (let term of ahead)\n                if (!add.ahead.includes(term)) {\n                    add.ahead.push(term);\n                    if (add.rule.parts.length && !add.rule.parts[0].terminal)\n                        addTo(add, redo);\n                }\n        }\n    }\n    for (let pos of set) {\n        let next = pos.next;\n        if (next && !next.terminal)\n            addFor(next, termsAhead(pos.rule, pos.pos, pos.ahead, first), pos.conflicts(pos.pos + 1).ambigGroups, pos.pos == pos.rule.parts.length - 1 ? pos.skipAhead : pos.rule.skip, pos);\n    }\n    while (redo.length) {\n        let add = redo.pop();\n        addFor(add.rule.parts[0], termsAhead(add.rule, 0, add.ahead, first), union(add.rule.conflicts[1].ambigGroups, add.rule.parts.length == 1 ? add.ambigAhead : none$1), add.rule.parts.length == 1 ? add.skipAhead : add.rule.skip, add);\n    }\n    let result = set.slice();\n    for (let add of added) {\n        add.ahead.sort((a, b) => a.hash - b.hash);\n        add.finish();\n        let origIndex = set.findIndex(p => p.pos == 0 && p.rule == add.rule);\n        if (origIndex > -1)\n            result[origIndex] = add;\n        else\n            result.push(add);\n    }\n    return result.sort((a, b) => a.cmp(b));\n}\nfunction addTo(value, array) {\n    if (!array.includes(value))\n        array.push(value);\n}\nfunction computeFirstSets(terms) {\n    let table = Object.create(null);\n    for (let t of terms.terms)\n        if (!t.terminal)\n            table[t.name] = [];\n    for (;;) {\n        let change = false;\n        for (let nt of terms.terms)\n            if (!nt.terminal)\n                for (let rule of nt.rules) {\n                    let set = table[nt.name];\n                    let found = false, startLen = set.length;\n                    for (let part of rule.parts) {\n                        found = true;\n                        if (part.terminal) {\n                            addTo(part, set);\n                        }\n                        else {\n                            for (let t of table[part.name]) {\n                                if (t == null)\n                                    found = false;\n                                else\n                                    addTo(t, set);\n                            }\n                        }\n                        if (found)\n                            break;\n                    }\n                    if (!found)\n                        addTo(null, set);\n                    if (set.length > startLen)\n                        change = true;\n                }\n        if (!change)\n            return table;\n    }\n}\nclass Core {\n    constructor(set, state) {\n        this.set = set;\n        this.state = state;\n    }\n}\nclass Conflict {\n    constructor(error, rules) {\n        this.error = error;\n        this.rules = rules;\n    }\n}\nfunction findConflictOrigin(a, b) {\n    if (a.eqSimple(b))\n        return \"\";\n    function via(root, start) {\n        let hist = [];\n        for (let p = start.via; !p.eqSimple(root); p = p.via)\n            hist.push(p);\n        if (!hist.length)\n            return \"\";\n        hist.unshift(start);\n        return hist.reverse().map((p, i) => \"\\n\" + \"  \".repeat(i + 1) + (p == start ? \"\" : \"via \") + p).join(\"\");\n    }\n    for (let p = a; p; p = p.via)\n        for (let p2 = b; p2; p2 = p2.via) {\n            if (p.eqSimple(p2))\n                return \"\\nShared origin: \" + p + via(p, a) + via(p, b);\n        }\n    return \"\";\n}\n// Search for the reason that a given 'after' token exists at the\n// given pos, by scanning up the trail of positions. Because the `via`\n// link is only one source of a pos, of potentially many, this\n// requires a re-simulation of the whole path up to the pos.\nfunction findConflictShiftSource(conflictPos, termAfter, first) {\n    let pos = conflictPos, path = [];\n    for (;;) {\n        for (let i = pos.pos - 1; i >= 0; i--)\n            path.push(pos.rule.parts[i]);\n        if (!pos.via)\n            break;\n        pos = pos.via;\n    }\n    path.reverse();\n    let seen = new Set();\n    function explore(pos, i, hasMatch) {\n        if (i == path.length && hasMatch && !pos.next)\n            return `\\nThe reduction of ${conflictPos.rule.name} is allowed before ${termAfter} because of this rule:\\n  ${hasMatch}`;\n        for (let next; next = pos.next;) {\n            if (i < path.length && next == path[i]) {\n                let inner = explore(pos.advance(), i + 1, hasMatch);\n                if (inner)\n                    return inner;\n            }\n            let after = pos.rule.parts[pos.pos + 1], match = pos.pos + 1 == pos.rule.parts.length ? hasMatch : null;\n            if (after && (after.terminal ? after == termAfter : first[after.name].includes(termAfter)))\n                match = pos.advance();\n            for (let rule of next.rules) {\n                let hash = (rule.id << 5) + i + (match ? 555 : 0);\n                if (!seen.has(hash)) {\n                    seen.add(hash);\n                    let inner = explore(new Pos(rule, 0, [], [], next, pos), i, match);\n                    if (inner)\n                        return inner;\n                }\n            }\n            if (!next.terminal && first[next.name].includes(null))\n                pos = pos.advance();\n            else\n                break;\n        }\n        return \"\";\n    }\n    return explore(pos, 0, null);\n}\n// Builds a full LR(1) automaton\nfunction buildFullAutomaton(terms, startTerms, first) {\n    let states = [], statesBySetHash = {};\n    let cores = {};\n    let t0 = Date.now();\n    function getState(core, top) {\n        if (core.length == 0)\n            return null;\n        let coreHash = hashPositions(core), byHash = cores[coreHash];\n        let skip;\n        for (let pos of core) {\n            if (!skip)\n                skip = pos.skip;\n            else if (skip != pos.skip)\n                throw new GenError(\"Inconsistent skip sets after \" + pos.trail());\n        }\n        if (byHash)\n            for (let known of byHash)\n                if (eqSet(core, known.set)) {\n                    if (known.state.skip != skip)\n                        throw new GenError(\"Inconsistent skip sets after \" + known.set[0].trail());\n                    return known.state;\n                }\n        let set = closure(core, first);\n        let hash = hashPositions(set), forHash = statesBySetHash[hash] || (statesBySetHash[hash] = []);\n        let found;\n        if (!top)\n            for (let state of forHash)\n                if (state.hasSet(set))\n                    found = state;\n        if (!found) {\n            found = new State(states.length, set, 0, skip, hash, top);\n            forHash.push(found);\n            states.push(found);\n            if (timing && states.length % 500 == 0)\n                console.log(`${states.length} states after ${((Date.now() - t0) / 1000).toFixed(2)}s`);\n        }\n        (cores[coreHash] || (cores[coreHash] = [])).push(new Core(core, found));\n        return found;\n    }\n    for (const startTerm of startTerms) {\n        const startSkip = startTerm.rules.length ? startTerm.rules[0].skip : terms.names[\"%noskip\"];\n        getState(startTerm.rules.map(rule => new Pos(rule, 0, [terms.eof], none$1, startSkip, null).finish()), startTerm);\n    }\n    let conflicts = new ConflictContext(first);\n    for (let filled = 0; filled < states.length; filled++) {\n        let state = states[filled];\n        let byTerm = [], byTermPos = [], atEnd = [];\n        for (let pos of state.set) {\n            if (pos.pos == pos.rule.parts.length) {\n                if (!pos.rule.name.top)\n                    atEnd.push(pos);\n            }\n            else {\n                let next = pos.rule.parts[pos.pos];\n                let index = byTerm.indexOf(next);\n                if (index < 0) {\n                    byTerm.push(next);\n                    byTermPos.push([pos]);\n                }\n                else {\n                    byTermPos[index].push(pos);\n                }\n            }\n        }\n        for (let i = 0; i < byTerm.length; i++) {\n            let term = byTerm[i], positions = byTermPos[i].map(p => p.advance());\n            if (term.terminal) {\n                let set = applyCut(positions);\n                let next = getState(set);\n                if (next)\n                    state.addAction(new Shift(term, next), byTermPos[i], conflicts);\n            }\n            else {\n                let goto = getState(positions);\n                if (goto)\n                    state.goto.push(new Shift(term, goto));\n            }\n        }\n        let replaced = false;\n        for (let pos of atEnd)\n            for (let ahead of pos.ahead) {\n                let count = state.actions.length;\n                state.addAction(new Reduce(ahead, pos.rule), [pos], conflicts);\n                if (state.actions.length == count)\n                    replaced = true;\n            }\n        // If some actions were replaced by others, double-check whether\n        // goto entries are now superfluous (for example, in an operator\n        // precedence-related state that has a shift for `*` but only a\n        // reduce for `+`, we don't need a goto entry for rules that start\n        // with `+`)\n        if (replaced)\n            for (let i = 0; i < state.goto.length; i++) {\n                let start = first[state.goto[i].term.name];\n                if (!start.some(term => state.actions.some(a => a.term == term && (a instanceof Shift))))\n                    state.goto.splice(i--, 1);\n            }\n    }\n    if (conflicts.conflicts.length)\n        throw new GenError(conflicts.conflicts.map(c => c.error).join(\"\\n\\n\"));\n    // Resolve alwaysReduce and sort actions\n    for (let state of states)\n        state.finish();\n    if (timing)\n        console.log(`${states.length} states total.`);\n    return states;\n}\nfunction applyCut(set) {\n    let found = null, cut = 1;\n    for (let pos of set) {\n        let value = pos.rule.conflicts[pos.pos - 1].cut;\n        if (value < cut)\n            continue;\n        if (!found || value > cut) {\n            cut = value;\n            found = [];\n        }\n        found.push(pos);\n    }\n    return found || set;\n}\n// Verify that there are no conflicting actions or goto entries in the\n// two given states (using the state ID remapping provided in mapping)\nfunction canMerge(a, b, mapping) {\n    // If a goto for the same term differs, that makes the states\n    // incompatible\n    for (let goto of a.goto)\n        for (let other of b.goto) {\n            if (goto.term == other.term && mapping[goto.target.id] != mapping[other.target.id])\n                return false;\n        }\n    // If there is an action where a conflicting action exists in the\n    // other state, the merge is only allowed when both states have the\n    // exact same set of actions for this term.\n    let byTerm = b.actionsByTerm();\n    for (let action of a.actions) {\n        let setB = byTerm[action.term.id];\n        if (setB && setB.some(other => !other.matches(action, mapping))) {\n            if (setB.length == 1)\n                return false;\n            let setA = a.actionsByTerm()[action.term.id];\n            if (setA.length != setB.length || setA.some(a1 => !setB.some(a2 => a1.matches(a2, mapping))))\n                return false;\n        }\n    }\n    return true;\n}\nfunction mergeStates(states, mapping) {\n    let newStates = [];\n    for (let state of states) {\n        let newID = mapping[state.id];\n        if (!newStates[newID]) {\n            newStates[newID] = new State(newID, state.set, 0, state.skip, state.hash, state.startRule);\n            newStates[newID].tokenGroup = state.tokenGroup;\n            newStates[newID].defaultReduce = state.defaultReduce;\n        }\n    }\n    for (let state of states) {\n        let newID = mapping[state.id], target = newStates[newID];\n        target.flags |= state.flags;\n        for (let i = 0; i < state.actions.length; i++) {\n            let action = state.actions[i].map(mapping, newStates);\n            if (!target.actions.some(a => a.eq(action))) {\n                target.actions.push(action);\n                target.actionPositions.push(state.actionPositions[i]);\n            }\n        }\n        for (let goto of state.goto) {\n            let mapped = goto.map(mapping, newStates);\n            if (!target.goto.some(g => g.eq(mapped)))\n                target.goto.push(mapped);\n        }\n    }\n    return newStates;\n}\nclass Group {\n    constructor(origin, member) {\n        this.origin = origin;\n        this.members = [member];\n    }\n}\nfunction samePosSet(a, b) {\n    if (a.length != b.length)\n        return false;\n    for (let i = 0; i < a.length; i++)\n        if (!a[i].eqSimple(b[i]))\n            return false;\n    return true;\n}\n// Collapse an LR(1) automaton to an LALR-like automaton\nfunction collapseAutomaton(states) {\n    let mapping = [], groups = [];\n    assignGroups: for (let i = 0; i < states.length; i++) {\n        let state = states[i];\n        if (!state.startRule)\n            for (let j = 0; j < groups.length; j++) {\n                let group = groups[j], other = states[group.members[0]];\n                if (state.tokenGroup == other.tokenGroup &&\n                    state.skip == other.skip &&\n                    !other.startRule &&\n                    samePosSet(state.set, other.set)) {\n                    group.members.push(i);\n                    mapping.push(j);\n                    continue assignGroups;\n                }\n            }\n        mapping.push(groups.length);\n        groups.push(new Group(groups.length, i));\n    }\n    function spill(groupIndex, index) {\n        let group = groups[groupIndex], state = states[group.members[index]];\n        let pop = group.members.pop();\n        if (index != group.members.length)\n            group.members[index] = pop;\n        for (let i = groupIndex + 1; i < groups.length; i++) {\n            mapping[state.id] = i;\n            if (groups[i].origin == group.origin &&\n                groups[i].members.every(id => canMerge(state, states[id], mapping))) {\n                groups[i].members.push(state.id);\n                return;\n            }\n        }\n        mapping[state.id] = groups.length;\n        groups.push(new Group(group.origin, state.id));\n    }\n    for (let pass = 1;; pass++) {\n        let conflicts = false, t0 = Date.now();\n        for (let g = 0, startLen = groups.length; g < startLen; g++) {\n            let group = groups[g];\n            for (let i = 0; i < group.members.length - 1; i++) {\n                for (let j = i + 1; j < group.members.length; j++) {\n                    let idA = group.members[i], idB = group.members[j];\n                    if (!canMerge(states[idA], states[idB], mapping)) {\n                        conflicts = true;\n                        spill(g, j--);\n                    }\n                }\n            }\n        }\n        if (timing)\n            console.log(`Collapse pass ${pass}${conflicts ? `` : `, done`} (${((Date.now() - t0) / 1000).toFixed(2)}s)`);\n        if (!conflicts)\n            return mergeStates(states, mapping);\n    }\n}\nfunction mergeIdentical(states) {\n    for (let pass = 1;; pass++) {\n        let mapping = [], didMerge = false, t0 = Date.now();\n        let newStates = [];\n        // Find states that either have the same alwaysReduce or the same\n        // actions, and merge them.\n        for (let i = 0; i < states.length; i++) {\n            let state = states[i];\n            let match = newStates.findIndex(s => state.eq(s));\n            if (match < 0) {\n                mapping[i] = newStates.length;\n                newStates.push(state);\n            }\n            else {\n                mapping[i] = match;\n                didMerge = true;\n                let other = newStates[match], add = null;\n                for (let pos of state.set)\n                    if (!other.set.some(p => p.eqSimple(pos)))\n                        (add || (add = [])).push(pos);\n                if (add)\n                    other.set = add.concat(other.set).sort((a, b) => a.cmp(b));\n            }\n        }\n        if (timing)\n            console.log(`Merge identical pass ${pass}${didMerge ? \"\" : \", done\"} (${((Date.now() - t0) / 1000).toFixed(2)}s)`);\n        if (!didMerge)\n            return states;\n        // Make sure actions point at merged state objects\n        for (let state of newStates)\n            if (!state.defaultReduce) {\n                state.actions = state.actions.map(a => a.map(mapping, newStates));\n                state.goto = state.goto.map(a => a.map(mapping, newStates));\n            }\n        // Renumber ids\n        for (let i = 0; i < newStates.length; i++)\n            newStates[i].id = i;\n        states = newStates;\n    }\n}\nconst none$1 = [];\nfunction finishAutomaton(full) {\n    return mergeIdentical(collapseAutomaton(full));\n}\n\n// Encode numbers as groups of printable ascii characters\n//\n// - 0xffff, which is often used as placeholder, is encoded as \"~\"\n//\n// - The characters from \" \" (32) to \"}\" (125), excluding '\"' and\n//   \"\\\\\", indicate values from 0 to 92\n//\n// - The first bit in a 'digit' is used to indicate whether this is\n//   the end of a number.\n//\n// - That leaves 46 other values, which are actually significant.\n//\n// - The digits in a number are ordered from high to low significance.\nfunction digitToChar(digit) {\n    let ch = digit + 32 /* Encode.Start */;\n    if (ch >= 34 /* Encode.Gap1 */)\n        ch++;\n    if (ch >= 92 /* Encode.Gap2 */)\n        ch++;\n    return String.fromCharCode(ch);\n}\nfunction encode(value, max = 0xffff) {\n    if (value > max)\n        throw new Error(\"Trying to encode a number that's too big: \" + value);\n    if (value == 65535 /* Encode.BigVal */)\n        return String.fromCharCode(126 /* Encode.BigValCode */);\n    let result = \"\";\n    for (let first = 46 /* Encode.Base */;; first = 0) {\n        let low = value % 46 /* Encode.Base */, rest = value - low;\n        result = digitToChar(low + first) + result;\n        if (rest == 0)\n            break;\n        value = rest / 46 /* Encode.Base */;\n    }\n    return result;\n}\nfunction encodeArray(values, max = 0xffff) {\n    let result = '\"' + encode(values.length, 0xffffffff);\n    for (let i = 0; i < values.length; i++)\n        result += encode(values[i], max);\n    result += '\"';\n    return result;\n}\n\nconst none = [];\nclass Parts {\n    constructor(terms, conflicts) {\n        this.terms = terms;\n        this.conflicts = conflicts;\n    }\n    concat(other) {\n        if (this == Parts.none)\n            return other;\n        if (other == Parts.none)\n            return this;\n        let conflicts = null;\n        if (this.conflicts || other.conflicts) {\n            conflicts = this.conflicts ? this.conflicts.slice() : this.ensureConflicts();\n            let otherConflicts = other.ensureConflicts();\n            conflicts[conflicts.length - 1] = conflicts[conflicts.length - 1].join(otherConflicts[0]);\n            for (let i = 1; i < otherConflicts.length; i++)\n                conflicts.push(otherConflicts[i]);\n        }\n        return new Parts(this.terms.concat(other.terms), conflicts);\n    }\n    withConflicts(pos, conflicts) {\n        if (conflicts == Conflicts.none)\n            return this;\n        let array = this.conflicts ? this.conflicts.slice() : this.ensureConflicts();\n        array[pos] = array[pos].join(conflicts);\n        return new Parts(this.terms, array);\n    }\n    ensureConflicts() {\n        if (this.conflicts)\n            return this.conflicts;\n        let empty = [];\n        for (let i = 0; i <= this.terms.length; i++)\n            empty.push(Conflicts.none);\n        return empty;\n    }\n}\nParts.none = new Parts(none, null);\nfunction p(...terms) { return new Parts(terms, null); }\nclass BuiltRule {\n    constructor(id, args, term) {\n        this.id = id;\n        this.args = args;\n        this.term = term;\n    }\n    matches(expr) {\n        return this.id == expr.id.name && exprsEq(expr.args, this.args);\n    }\n    matchesRepeat(expr) {\n        return this.id == \"+\" && exprEq(expr.expr, this.args[0]);\n    }\n}\nclass Builder {\n    constructor(text, options) {\n        this.options = options;\n        this.terms = new TermSet;\n        this.specialized = Object.create(null);\n        this.tokenOrigins = Object.create(null);\n        this.rules = [];\n        this.built = [];\n        this.ruleNames = Object.create(null);\n        this.namespaces = Object.create(null);\n        this.namedTerms = Object.create(null);\n        this.termTable = Object.create(null);\n        this.knownProps = Object.create(null);\n        this.dynamicRulePrecedences = [];\n        this.definedGroups = [];\n        this.astRules = [];\n        this.currentSkip = [];\n        time(\"Parse\", () => {\n            this.input = new Input(text, options.fileName);\n            this.ast = this.input.parse();\n        });\n        let NP = _lezer_common__WEBPACK_IMPORTED_MODULE_0__.NodeProp;\n        for (let prop in NP) {\n            if (NP[prop] instanceof _lezer_common__WEBPACK_IMPORTED_MODULE_0__.NodeProp && !NP[prop].perNode)\n                this.knownProps[prop] = { prop: NP[prop], source: { name: prop, from: null } };\n        }\n        for (let prop of this.ast.externalProps) {\n            this.knownProps[prop.id.name] = {\n                prop: this.options.externalProp ? this.options.externalProp(prop.id.name) : new _lezer_common__WEBPACK_IMPORTED_MODULE_0__.NodeProp(),\n                source: { name: prop.externalID.name, from: prop.source }\n            };\n        }\n        this.dialects = this.ast.dialects.map(d => d.name);\n        this.tokens = new MainTokenSet(this, this.ast.tokens);\n        this.localTokens = this.ast.localTokens.map(g => new LocalTokenSet(this, g));\n        this.externalTokens = this.ast.externalTokens.map(ext => new ExternalTokenSet(this, ext));\n        this.externalSpecializers = this.ast.externalSpecializers.map(decl => new ExternalSpecializer(this, decl));\n        time(\"Build rules\", () => {\n            let noSkip = this.newName(\"%noskip\", true);\n            this.defineRule(noSkip, []);\n            let mainSkip = this.ast.mainSkip ? this.newName(\"%mainskip\", true) : noSkip;\n            let scopedSkip = [], topRules = [];\n            for (let rule of this.ast.rules)\n                this.astRules.push({ skip: mainSkip, rule });\n            for (let rule of this.ast.topRules)\n                topRules.push({ skip: mainSkip, rule });\n            for (let scoped of this.ast.scopedSkip) {\n                let skip = noSkip, found = this.ast.scopedSkip.findIndex((sc, i) => i < scopedSkip.length && exprEq(sc.expr, scoped.expr));\n                if (found > -1)\n                    skip = scopedSkip[found];\n                else if (this.ast.mainSkip && exprEq(scoped.expr, this.ast.mainSkip))\n                    skip = mainSkip;\n                else if (!isEmpty(scoped.expr))\n                    skip = this.newName(\"%skip\", true);\n                scopedSkip.push(skip);\n                for (let rule of scoped.rules)\n                    this.astRules.push({ skip, rule });\n                for (let rule of scoped.topRules)\n                    topRules.push({ skip, rule });\n            }\n            for (let { rule } of this.astRules) {\n                this.unique(rule.id);\n            }\n            this.currentSkip.push(noSkip);\n            this.skipRules = mainSkip == noSkip ? [mainSkip] : [noSkip, mainSkip];\n            if (mainSkip != noSkip)\n                this.defineRule(mainSkip, this.normalizeExpr(this.ast.mainSkip));\n            for (let i = 0; i < this.ast.scopedSkip.length; i++) {\n                let skip = scopedSkip[i];\n                if (!this.skipRules.includes(skip)) {\n                    this.skipRules.push(skip);\n                    if (skip != noSkip)\n                        this.defineRule(skip, this.normalizeExpr(this.ast.scopedSkip[i].expr));\n                }\n            }\n            this.currentSkip.pop();\n            for (let { rule, skip } of topRules.sort((a, b) => a.rule.start - b.rule.start)) {\n                this.unique(rule.id);\n                this.used(rule.id.name);\n                this.currentSkip.push(skip);\n                let { name, props } = this.nodeInfo(rule.props, \"a\", rule.id.name, none, none, rule.expr);\n                let term = this.terms.makeTop(name, props);\n                this.namedTerms[name] = term;\n                this.defineRule(term, this.normalizeExpr(rule.expr));\n                this.currentSkip.pop();\n            }\n            for (let ext of this.externalSpecializers)\n                ext.finish();\n            for (let { skip, rule } of this.astRules) {\n                if (this.ruleNames[rule.id.name] && isExported(rule) && !rule.params.length) {\n                    this.buildRule(rule, [], skip, false);\n                    if (rule.expr instanceof SequenceExpression && rule.expr.exprs.length == 0)\n                        this.used(rule.id.name);\n                }\n            }\n        });\n        for (let name in this.ruleNames) {\n            let value = this.ruleNames[name];\n            if (value)\n                this.warn(`Unused rule '${value.name}'`, value.start);\n        }\n        this.tokens.takePrecedences();\n        this.tokens.takeConflicts();\n        for (let lt of this.localTokens)\n            lt.takePrecedences();\n        for (let { name, group, rule } of this.definedGroups)\n            this.defineGroup(name, group, rule);\n        this.checkGroups();\n    }\n    unique(id) {\n        if (id.name in this.ruleNames)\n            this.raise(`Duplicate definition of rule '${id.name}'`, id.start);\n        this.ruleNames[id.name] = id;\n    }\n    used(name) {\n        this.ruleNames[name] = null;\n    }\n    newName(base, nodeName = null, props = {}) {\n        for (let i = nodeName ? 0 : 1;; i++) {\n            let name = i ? `${base}-${i}` : base;\n            if (!this.terms.names[name])\n                return this.terms.makeNonTerminal(name, nodeName === true ? null : nodeName, props);\n        }\n    }\n    prepareParser() {\n        let rules = time(\"Simplify rules\", () => simplifyRules(this.rules, [\n            ...this.skipRules,\n            ...this.terms.tops\n        ]));\n        let { nodeTypes, names: termNames, minRepeatTerm, maxTerm } = this.terms.finish(rules);\n        for (let prop in this.namedTerms)\n            this.termTable[prop] = this.namedTerms[prop].id;\n        if (/\\bgrammar\\b/.test(verbose))\n            console.log(rules.join(\"\\n\"));\n        let startTerms = this.terms.tops.slice();\n        let first = computeFirstSets(this.terms);\n        let skipInfo = this.skipRules.map((name, id) => {\n            let skip = [], startTokens = [], rules = [];\n            for (let rule of name.rules) {\n                if (!rule.parts.length)\n                    continue;\n                let start = rule.parts[0];\n                for (let t of start.terminal ? [start] : first[start.name] || [])\n                    if (t && !startTokens.includes(t))\n                        startTokens.push(t);\n                if (start.terminal && rule.parts.length == 1 && !rules.some(r => r != rule && r.parts[0] == start))\n                    skip.push(start);\n                else\n                    rules.push(rule);\n            }\n            name.rules = rules;\n            if (rules.length)\n                startTerms.push(name);\n            return { skip, rule: rules.length ? name : null, startTokens, id };\n        });\n        let fullTable = time(\"Build full automaton\", () => buildFullAutomaton(this.terms, startTerms, first));\n        let localTokens = this.localTokens\n            .map((grp, i) => grp.buildLocalGroup(fullTable, skipInfo, i));\n        let { tokenGroups, tokenPrec, tokenData } = time(\"Build token groups\", () => this.tokens.buildTokenGroups(fullTable, skipInfo, localTokens.length));\n        let table = time(\"Finish automaton\", () => finishAutomaton(fullTable));\n        let skipState = findSkipStates(table, this.terms.tops);\n        if (/\\blr\\b/.test(verbose))\n            console.log(table.join(\"\\n\"));\n        let specialized = [];\n        for (let ext of this.externalSpecializers)\n            specialized.push(ext);\n        for (let name in this.specialized)\n            specialized.push({ token: this.terms.names[name], table: buildSpecializeTable(this.specialized[name]) });\n        let tokStart = (tokenizer) => {\n            if (tokenizer instanceof ExternalTokenSet)\n                return tokenizer.ast.start;\n            return this.tokens.ast ? this.tokens.ast.start : -1;\n        };\n        let tokenizers = tokenGroups\n            .concat(this.externalTokens)\n            .sort((a, b) => tokStart(a) - tokStart(b))\n            .concat(localTokens);\n        let data = new DataBuilder;\n        let skipData = skipInfo.map(info => {\n            let actions = [];\n            for (let term of info.skip)\n                actions.push(term.id, 0, 262144 /* Action.StayFlag */ >> 16);\n            if (info.rule) {\n                let state = table.find(s => s.startRule == info.rule);\n                for (let action of state.actions)\n                    actions.push(action.term.id, state.id, 131072 /* Action.GotoFlag */ >> 16);\n            }\n            actions.push(65535 /* Seq.End */, 0 /* Seq.Done */);\n            return data.storeArray(actions);\n        });\n        let states = time(\"Finish states\", () => {\n            let states = new Uint32Array(table.length * 6 /* ParseState.Size */);\n            let forceReductions = this.computeForceReductions(table, skipInfo);\n            let finishCx = new FinishStateContext(tokenizers, data, states, skipData, skipInfo, table, this);\n            for (let s of table)\n                finishCx.finish(s, skipState(s.id), forceReductions[s.id]);\n            return states;\n        });\n        let dialects = Object.create(null);\n        for (let i = 0; i < this.dialects.length; i++)\n            dialects[this.dialects[i]] = data.storeArray((this.tokens.byDialect[i] || none).map(t => t.id).concat(65535 /* Seq.End */));\n        let dynamicPrecedences = null;\n        if (this.dynamicRulePrecedences.length) {\n            dynamicPrecedences = Object.create(null);\n            for (let { rule, prec } of this.dynamicRulePrecedences)\n                dynamicPrecedences[rule.id] = prec;\n        }\n        let topRules = Object.create(null);\n        for (let term of this.terms.tops)\n            topRules[term.nodeName] = [table.find(state => state.startRule == term).id, term.id];\n        let precTable = data.storeArray(tokenPrec.concat(65535 /* Seq.End */));\n        let { nodeProps, skippedTypes } = this.gatherNodeProps(nodeTypes);\n        return {\n            states,\n            stateData: data.finish(),\n            goto: computeGotoTable(table),\n            nodeNames: nodeTypes.filter(t => t.id < minRepeatTerm).map(t => t.nodeName).join(\" \"),\n            nodeProps,\n            skippedTypes,\n            maxTerm,\n            repeatNodeCount: nodeTypes.length - minRepeatTerm,\n            tokenizers,\n            tokenData,\n            topRules,\n            dialects,\n            dynamicPrecedences,\n            specialized,\n            tokenPrec: precTable,\n            termNames\n        };\n    }\n    getParser() {\n        let { states, stateData, goto, nodeNames, nodeProps: rawNodeProps, skippedTypes, maxTerm, repeatNodeCount, tokenizers, tokenData, topRules, dialects, dynamicPrecedences, specialized: rawSpecialized, tokenPrec, termNames } = this.prepareParser();\n        let specialized = rawSpecialized.map(v => {\n            if (v instanceof ExternalSpecializer) {\n                let ext = this.options.externalSpecializer(v.ast.id.name, this.termTable);\n                return {\n                    term: v.term.id,\n                    get: (value, stack) => (ext(value, stack) << 1) |\n                        (v.ast.type == \"extend\" ? 1 /* Specialize.Extend */ : 0 /* Specialize.Specialize */),\n                    external: ext,\n                    extend: v.ast.type == \"extend\"\n                };\n            }\n            else {\n                return { term: v.token.id, get: (value) => v.table[value] || -1 };\n            }\n        });\n        return _lezer_lr__WEBPACK_IMPORTED_MODULE_1__.LRParser.deserialize({\n            version: 14 /* File.Version */,\n            states,\n            stateData,\n            goto,\n            nodeNames,\n            maxTerm,\n            repeatNodeCount,\n            nodeProps: rawNodeProps.map(({ prop, terms }) => [this.knownProps[prop].prop, ...terms]),\n            propSources: !this.options.externalPropSource ? undefined\n                : this.ast.externalPropSources.map(s => this.options.externalPropSource(s.id.name)),\n            skippedNodes: skippedTypes,\n            tokenData,\n            tokenizers: tokenizers.map(tok => tok.create()),\n            context: !this.ast.context ? undefined\n                : typeof this.options.contextTracker == \"function\" ? this.options.contextTracker(this.termTable)\n                    : this.options.contextTracker,\n            topRules,\n            dialects,\n            dynamicPrecedences,\n            specialized,\n            tokenPrec,\n            termNames\n        });\n    }\n    getParserFile() {\n        let { states, stateData, goto, nodeNames, nodeProps: rawNodeProps, skippedTypes, maxTerm, repeatNodeCount, tokenizers: rawTokenizers, tokenData, topRules, dialects: rawDialects, dynamicPrecedences, specialized: rawSpecialized, tokenPrec, termNames } = this.prepareParser();\n        let mod = this.options.moduleStyle || \"es\";\n        let gen = \"// This file was generated by lezer-generator. You probably shouldn't edit it.\\n\", head = gen;\n        let imports = {}, imported = Object.create(null);\n        let defined = Object.create(null);\n        for (let word of KEYWORDS)\n            defined[word] = true;\n        let exportName = this.options.exportName || \"parser\";\n        defined[exportName] = true;\n        let getName = (prefix) => {\n            for (let i = 0;; i++) {\n                let id = prefix + (i ? \"_\" + i : \"\");\n                if (!defined[id])\n                    return id;\n            }\n        };\n        let importName = (name, source, prefix = name) => {\n            let spec = name + \" from \" + source;\n            if (imported[spec])\n                return imported[spec];\n            let src = JSON.stringify(source), varName = name;\n            if (name in defined) {\n                varName = getName(prefix);\n                name += `${mod == \"cjs\" ? \":\" : \" as\"} ${varName}`;\n            }\n            defined[varName] = true;\n            (imports[src] || (imports[src] = [])).push(name);\n            return imported[spec] = varName;\n        };\n        let lrParser = importName(\"LRParser\", \"@lezer/lr\");\n        let tokenizers = rawTokenizers.map(tok => tok.createSource(importName));\n        let context = this.ast.context ? importName(this.ast.context.id.name, this.ast.context.source) : null;\n        let nodeProps = rawNodeProps.map(({ prop, terms }) => {\n            let { source } = this.knownProps[prop];\n            let propID = source.from ? importName(source.name, source.from) : JSON.stringify(source.name);\n            return `[${propID}, ${terms.map(serializePropValue).join(\",\")}]`;\n        });\n        function specializationTableString(table) {\n            return \"{__proto__:null,\" + Object.keys(table).map(key => `${/^(\\d+|[a-zA-Z_]\\w*)$/.test(key) ? key : JSON.stringify(key)}:${table[key]}`)\n                .join(\", \") + \"}\";\n        }\n        let specHead = \"\";\n        let specialized = rawSpecialized.map(v => {\n            if (v instanceof ExternalSpecializer) {\n                let name = importName(v.ast.id.name, v.ast.source);\n                let ts = this.options.typeScript ? \": any\" : \"\";\n                return `{term: ${v.term.id}, get: (value${ts}, stack${ts}) => (${name}(value, stack) << 1)${v.ast.type == \"extend\" ? ` | ${1 /* Specialize.Extend */}` : ''}, external: ${name}${v.ast.type == \"extend\" ? ', extend: true' : ''}}`;\n            }\n            else {\n                let tableName = getName(\"spec_\" + v.token.name.replace(/\\W/g, \"\"));\n                defined[tableName] = true;\n                specHead += `const ${tableName} = ${specializationTableString(v.table)}\\n`;\n                let ts = this.options.typeScript ? `: keyof typeof ${tableName}` : \"\";\n                return `{term: ${v.token.id}, get: (value${ts}) => ${tableName}[value] || -1}`;\n            }\n        });\n        let propSources = this.ast.externalPropSources.map(s => importName(s.id.name, s.source));\n        for (let source in imports) {\n            if (mod == \"cjs\")\n                head += `const {${imports[source].join(\", \")}} = require(${source})\\n`;\n            else\n                head += `import {${imports[source].join(\", \")}} from ${source}\\n`;\n        }\n        head += specHead;\n        function serializePropValue(value) {\n            return typeof value != \"string\" || /^(true|false|\\d+(\\.\\d+)?|\\.\\d+)$/.test(value) ? value : JSON.stringify(value);\n        }\n        let dialects = Object.keys(rawDialects).map(d => `${d}: ${rawDialects[d]}`);\n        let parserStr = `${lrParser}.deserialize({\n  version: ${14 /* File.Version */},\n  states: ${encodeArray(states, 0xffffffff)},\n  stateData: ${encodeArray(stateData)},\n  goto: ${encodeArray(goto)},\n  nodeNames: ${JSON.stringify(nodeNames)},\n  maxTerm: ${maxTerm}${context ? `,\n  context: ${context}` : \"\"}${nodeProps.length ? `,\n  nodeProps: [\n    ${nodeProps.join(\",\\n    \")}\n  ]` : \"\"}${propSources.length ? `,\n  propSources: [${propSources.join()}]` : \"\"}${skippedTypes.length ? `,\n  skippedNodes: ${JSON.stringify(skippedTypes)}` : \"\"},\n  repeatNodeCount: ${repeatNodeCount},\n  tokenData: ${encodeArray(tokenData)},\n  tokenizers: [${tokenizers.join(\", \")}],\n  topRules: ${JSON.stringify(topRules)}${dialects.length ? `,\n  dialects: {${dialects.join(\", \")}}` : \"\"}${dynamicPrecedences ? `,\n  dynamicPrecedences: ${JSON.stringify(dynamicPrecedences)}` : \"\"}${specialized.length ? `,\n  specialized: [${specialized.join(\",\")}]` : \"\"},\n  tokenPrec: ${tokenPrec}${this.options.includeNames ? `,\n  termNames: ${JSON.stringify(termNames)}` : ''}\n})`;\n        let terms = [];\n        for (let name in this.termTable) {\n            let id = name;\n            if (KEYWORDS.includes(id))\n                for (let i = 1;; i++) {\n                    id = \"_\".repeat(i) + name;\n                    if (!(id in this.termTable))\n                        break;\n                }\n            else if (!/^[\\w$]+$/.test(name)) {\n                continue;\n            }\n            terms.push(`${id}${mod == \"cjs\" ? \":\" : \" =\"} ${this.termTable[name]}`);\n        }\n        for (let id = 0; id < this.dialects.length; id++)\n            terms.push(`Dialect_${this.dialects[id]}${mod == \"cjs\" ? \":\" : \" =\"} ${id}`);\n        return {\n            parser: head + (mod == \"cjs\" ? `exports.${exportName} = ${parserStr}\\n` : `export const ${exportName} = ${parserStr}\\n`),\n            terms: mod == \"cjs\" ? `${gen}module.exports = {\\n  ${terms.join(\",\\n  \")}\\n}`\n                : `${gen}export const\\n  ${terms.join(\",\\n  \")}\\n`\n        };\n    }\n    gatherNonSkippedNodes() {\n        let seen = Object.create(null);\n        let work = [];\n        let add = (term) => {\n            if (!seen[term.id]) {\n                seen[term.id] = true;\n                work.push(term);\n            }\n        };\n        this.terms.tops.forEach(add);\n        for (let i = 0; i < work.length; i++) {\n            for (let rule of work[i].rules)\n                for (let part of rule.parts)\n                    add(part);\n        }\n        return seen;\n    }\n    gatherNodeProps(nodeTypes) {\n        let notSkipped = this.gatherNonSkippedNodes(), skippedTypes = [];\n        let nodeProps = [];\n        for (let type of nodeTypes) {\n            if (!notSkipped[type.id] && !type.error)\n                skippedTypes.push(type.id);\n            for (let prop in type.props) {\n                let known = this.knownProps[prop];\n                if (!known)\n                    throw new GenError(\"No known prop type for \" + prop);\n                if (known.source.from == null && (known.source.name == \"repeated\" || known.source.name == \"error\"))\n                    continue;\n                let rec = nodeProps.find(r => r.prop == prop);\n                if (!rec)\n                    nodeProps.push(rec = { prop, values: {} });\n                (rec.values[type.props[prop]] || (rec.values[type.props[prop]] = [])).push(type.id);\n            }\n        }\n        return {\n            nodeProps: nodeProps.map(({ prop, values }) => {\n                let terms = [];\n                for (let val in values) {\n                    let ids = values[val];\n                    if (ids.length == 1) {\n                        terms.push(ids[0], val);\n                    }\n                    else {\n                        terms.push(-ids.length);\n                        for (let id of ids)\n                            terms.push(id);\n                        terms.push(val);\n                    }\n                }\n                return { prop, terms };\n            }),\n            skippedTypes\n        };\n    }\n    makeTerminal(name, tag, props) {\n        return this.terms.makeTerminal(this.terms.uniqueName(name), tag, props);\n    }\n    computeForceReductions(states, skipInfo) {\n        // This finds a forced reduction for every state, trying to guard\n        // against cyclic forced reductions, where a given parse stack can\n        // endlessly continue running forced reductions without making any\n        // progress.\n        //\n        // This occurs with length-1 reductions. We never generate\n        // length-0 reductions, and length-2+ reductions always shrink the\n        // stack, so they are guaranteed to make progress.\n        //\n        // If there are states S1 and S2 whose forced reductions reduce\n        // terms T1 and T2 respectively, both with a length of 1, _and_\n        // there is a state S3, which has goto entries T1 -> S2, T2 -> S1,\n        // you can get cyclic reductions. Of course, the cycle may also\n        // contain more than two steps.\n        let reductions = [];\n        let candidates = [];\n        // A map from terms to states that they are mapped to in goto\n        // entries.\n        let gotoEdges = Object.create(null);\n        for (let state of states) {\n            reductions.push(0);\n            for (let edge of state.goto) {\n                let array = gotoEdges[edge.term.id] || (gotoEdges[edge.term.id] = []);\n                let found = array.find(o => o.target == edge.target.id);\n                if (found)\n                    found.parents.push(state.id);\n                else\n                    array.push({ parents: [state.id], target: edge.target.id });\n            }\n            candidates[state.id] = state.set.filter(pos => pos.pos > 0 && !pos.rule.name.top)\n                .sort((a, b) => b.pos - a.pos || a.rule.parts.length - b.rule.parts.length);\n        }\n        // Mapping from state ids to terms that that state has a length-1\n        // forced reduction for.\n        let length1Reductions = Object.create(null);\n        function createsCycle(term, startState, parents = null) {\n            let edges = gotoEdges[term];\n            if (!edges)\n                return false;\n            return edges.some(val => {\n                let parentIntersection = parents ? parents.filter(id => val.parents.includes(id)) : val.parents;\n                if (parentIntersection.length == 0)\n                    return false;\n                if (val.target == startState)\n                    return true;\n                let found = length1Reductions[val.target];\n                return found != null && createsCycle(found, startState, parentIntersection);\n            });\n        }\n        for (let state of states) {\n            if (state.defaultReduce && state.defaultReduce.parts.length > 0) {\n                reductions[state.id] = reduceAction(state.defaultReduce, skipInfo);\n                if (state.defaultReduce.parts.length == 1)\n                    length1Reductions[state.id] = state.defaultReduce.name.id;\n            }\n        }\n        // To avoid painting states that only have one potential forced\n        // reduction into a corner, reduction assignment is done by\n        // candidate size, starting with the states with fewer candidates.\n        for (let setSize = 1;; setSize++) {\n            let done = true;\n            for (let state of states) {\n                if (state.defaultReduce)\n                    continue;\n                let set = candidates[state.id];\n                if (set.length != setSize) {\n                    if (set.length > setSize)\n                        done = false;\n                    continue;\n                }\n                for (let pos of set) {\n                    if (pos.pos != 1 || !createsCycle(pos.rule.name.id, state.id)) {\n                        reductions[state.id] = reduceAction(pos.rule, skipInfo, pos.pos);\n                        if (pos.pos == 1)\n                            length1Reductions[state.id] = pos.rule.name.id;\n                        break;\n                    }\n                }\n            }\n            if (done)\n                break;\n        }\n        return reductions;\n    }\n    substituteArgs(expr, args, params) {\n        if (args.length == 0)\n            return expr;\n        return expr.walk(expr => {\n            let found;\n            if (expr instanceof NameExpression &&\n                (found = params.findIndex(p => p.name == expr.id.name)) > -1) {\n                let arg = args[found];\n                if (expr.args.length) {\n                    if (arg instanceof NameExpression && !arg.args.length)\n                        return new NameExpression(expr.start, arg.id, expr.args);\n                    this.raise(`Passing arguments to a parameter that already has arguments`, expr.start);\n                }\n                return arg;\n            }\n            else if (expr instanceof InlineRuleExpression) {\n                let r = expr.rule, props = this.substituteArgsInProps(r.props, args, params);\n                return props == r.props ? expr :\n                    new InlineRuleExpression(expr.start, new RuleDeclaration(r.start, r.id, props, r.params, r.expr));\n            }\n            else if (expr instanceof SpecializeExpression) {\n                let props = this.substituteArgsInProps(expr.props, args, params);\n                return props == expr.props ? expr :\n                    new SpecializeExpression(expr.start, expr.type, props, expr.token, expr.content);\n            }\n            return expr;\n        });\n    }\n    substituteArgsInProps(props, args, params) {\n        let substituteInValue = (value) => {\n            let result = value;\n            for (let i = 0; i < value.length; i++) {\n                let part = value[i];\n                if (!part.name)\n                    continue;\n                let found = params.findIndex(p => p.name == part.name);\n                if (found < 0)\n                    continue;\n                if (result == value)\n                    result = value.slice();\n                let expr = args[found];\n                if (expr instanceof NameExpression && !expr.args.length)\n                    result[i] = new PropPart(part.start, expr.id.name, null);\n                else if (expr instanceof LiteralExpression)\n                    result[i] = new PropPart(part.start, expr.value, null);\n                else\n                    this.raise(`Trying to interpolate expression '${expr}' into a prop`, part.start);\n            }\n            return result;\n        };\n        let result = props;\n        for (let i = 0; i < props.length; i++) {\n            let prop = props[i], value = substituteInValue(prop.value);\n            if (value != prop.value) {\n                if (result == props)\n                    result = props.slice();\n                result[i] = new Prop(prop.start, prop.at, prop.name, value);\n            }\n        }\n        return result;\n    }\n    conflictsFor(markers) {\n        let here = Conflicts.none, atEnd = Conflicts.none;\n        for (let marker of markers) {\n            if (marker.type == \"ambig\") {\n                here = here.join(new Conflicts(0, [marker.id.name]));\n            }\n            else {\n                let precs = this.ast.precedences;\n                let index = precs ? precs.items.findIndex(item => item.id.name == marker.id.name) : -1;\n                if (index < 0)\n                    this.raise(`Reference to unknown precedence: '${marker.id.name}'`, marker.id.start);\n                let prec = precs.items[index], value = precs.items.length - index;\n                if (prec.type == \"cut\") {\n                    here = here.join(new Conflicts(0, none, value));\n                }\n                else {\n                    here = here.join(new Conflicts(value << 2));\n                    atEnd = atEnd.join(new Conflicts((value << 2) + (prec.type == \"left\" ? 1 : prec.type == \"right\" ? -1 : 0)));\n                }\n            }\n        }\n        return { here, atEnd };\n    }\n    raise(message, pos = 1) {\n        return this.input.raise(message, pos);\n    }\n    warn(message, pos = -1) {\n        let msg = this.input.message(message, pos);\n        if (this.options.warn)\n            this.options.warn(msg);\n        else\n            console.warn(msg);\n    }\n    defineRule(name, choices) {\n        let skip = this.currentSkip[this.currentSkip.length - 1];\n        for (let choice of choices)\n            this.rules.push(new Rule(name, choice.terms, choice.ensureConflicts(), skip));\n    }\n    resolve(expr) {\n        for (let built of this.built)\n            if (built.matches(expr))\n                return [p(built.term)];\n        let found = this.tokens.getToken(expr);\n        if (found)\n            return [p(found)];\n        for (let grp of this.localTokens) {\n            let found = grp.getToken(expr);\n            if (found)\n                return [p(found)];\n        }\n        for (let ext of this.externalTokens) {\n            let found = ext.getToken(expr);\n            if (found)\n                return [p(found)];\n        }\n        for (let ext of this.externalSpecializers) {\n            let found = ext.getToken(expr);\n            if (found)\n                return [p(found)];\n        }\n        let known = this.astRules.find(r => r.rule.id.name == expr.id.name);\n        if (!known)\n            return this.raise(`Reference to undefined rule '${expr.id.name}'`, expr.start);\n        if (known.rule.params.length != expr.args.length)\n            this.raise(`Wrong number or arguments for '${expr.id.name}'`, expr.start);\n        this.used(known.rule.id.name);\n        return [p(this.buildRule(known.rule, expr.args, known.skip))];\n    }\n    // For tree-balancing reasons, repeat expressions X+ have to be\n    // normalized to something like\n    //\n    //     R -> X | R R\n    //\n    // Returns the `R` term.\n    normalizeRepeat(expr) {\n        let known = this.built.find(b => b.matchesRepeat(expr));\n        if (known)\n            return p(known.term);\n        let name = expr.expr.prec < expr.prec ? `(${expr.expr})+` : `${expr.expr}+`;\n        let term = this.terms.makeRepeat(this.terms.uniqueName(name));\n        this.built.push(new BuiltRule(\"+\", [expr.expr], term));\n        this.defineRule(term, this.normalizeExpr(expr.expr).concat(p(term, term)));\n        return p(term);\n    }\n    normalizeSequence(expr) {\n        let result = expr.exprs.map(e => this.normalizeExpr(e));\n        let builder = this;\n        function complete(start, from, endConflicts) {\n            let { here, atEnd } = builder.conflictsFor(expr.markers[from]);\n            if (from == result.length)\n                return [start.withConflicts(start.terms.length, here.join(endConflicts))];\n            let choices = [];\n            for (let choice of result[from]) {\n                for (let full of complete(start.concat(choice).withConflicts(start.terms.length, here), from + 1, endConflicts.join(atEnd)))\n                    choices.push(full);\n            }\n            return choices;\n        }\n        return complete(Parts.none, 0, Conflicts.none);\n    }\n    normalizeExpr(expr) {\n        if (expr instanceof RepeatExpression && expr.kind == \"?\") {\n            return [Parts.none, ...this.normalizeExpr(expr.expr)];\n        }\n        else if (expr instanceof RepeatExpression) {\n            let repeated = this.normalizeRepeat(expr);\n            return expr.kind == \"+\" ? [repeated] : [Parts.none, repeated];\n        }\n        else if (expr instanceof ChoiceExpression) {\n            return expr.exprs.reduce((o, e) => o.concat(this.normalizeExpr(e)), []);\n        }\n        else if (expr instanceof SequenceExpression) {\n            return this.normalizeSequence(expr);\n        }\n        else if (expr instanceof LiteralExpression) {\n            return [p(this.tokens.getLiteral(expr))];\n        }\n        else if (expr instanceof NameExpression) {\n            return this.resolve(expr);\n        }\n        else if (expr instanceof SpecializeExpression) {\n            return [p(this.resolveSpecialization(expr))];\n        }\n        else if (expr instanceof InlineRuleExpression) {\n            return [p(this.buildRule(expr.rule, none, this.currentSkip[this.currentSkip.length - 1], true))];\n        }\n        else {\n            return this.raise(`This type of expression ('${expr}') may not occur in non-token rules`, expr.start);\n        }\n    }\n    buildRule(rule, args, skip, inline = false) {\n        let expr = this.substituteArgs(rule.expr, args, rule.params);\n        let { name: nodeName, props, dynamicPrec, inline: explicitInline, group, exported } = this.nodeInfo(rule.props || none, inline ? \"pg\" : \"pgi\", rule.id.name, args, rule.params, rule.expr);\n        if (exported && rule.params.length)\n            this.warn(`Can't export parameterized rules`, rule.start);\n        if (exported && inline)\n            this.warn(`Can't export inline rule`, rule.start);\n        let name = this.newName(rule.id.name + (args.length ? \"<\" + args.join(\",\") + \">\" : \"\"), nodeName || true, props);\n        if (explicitInline)\n            name.inline = true;\n        if (dynamicPrec)\n            this.registerDynamicPrec(name, dynamicPrec);\n        if ((name.nodeType || exported) && rule.params.length == 0) {\n            if (!nodeName)\n                name.preserve = true;\n            if (!inline)\n                this.namedTerms[exported || rule.id.name] = name;\n        }\n        if (!inline)\n            this.built.push(new BuiltRule(rule.id.name, args, name));\n        this.currentSkip.push(skip);\n        let parts = this.normalizeExpr(expr);\n        if (parts.length > 100 * (expr instanceof ChoiceExpression ? expr.exprs.length : 1))\n            this.warn(`Rule ${rule.id.name} is generating a lot (${parts.length}) of choices.\\n  Consider splitting it up or reducing the amount of ? or | operator uses.`, rule.start);\n        if (/\\brulesize\\b/.test(verbose) && parts.length > 10)\n            console.log(`Rule ${rule.id.name}: ${parts.length} variants`);\n        this.defineRule(name, parts);\n        this.currentSkip.pop();\n        if (group)\n            this.definedGroups.push({ name, group, rule });\n        return name;\n    }\n    nodeInfo(props, \n    // p for dynamic precedence, d for dialect, i for inline, g for group, a for disabling the ignore test for default name\n    allow, defaultName = null, args = none, params = none, expr, defaultProps) {\n        let result = {};\n        let name = defaultName && (allow.indexOf(\"a\") > -1 || !ignored(defaultName)) && !/ /.test(defaultName) ? defaultName : null;\n        let dialect = null, dynamicPrec = 0, inline = false, group = null, exported = null;\n        for (let prop of props) {\n            if (!prop.at) {\n                if (!this.knownProps[prop.name]) {\n                    let builtin = [\"name\", \"dialect\", \"dynamicPrecedence\", \"export\", \"isGroup\"].includes(prop.name)\n                        ? ` (did you mean '@${prop.name}'?)` : \"\";\n                    this.raise(`Unknown prop name '${prop.name}'${builtin}`, prop.start);\n                }\n                result[prop.name] = this.finishProp(prop, args, params);\n            }\n            else if (prop.name == \"name\") {\n                name = this.finishProp(prop, args, params);\n                if (/ /.test(name))\n                    this.raise(`Node names cannot have spaces ('${name}')`, prop.start);\n            }\n            else if (prop.name == \"dialect\") {\n                if (allow.indexOf(\"d\") < 0)\n                    this.raise(\"Can't specify a dialect on non-token rules\", props[0].start);\n                if (prop.value.length != 1 && !prop.value[0].value)\n                    this.raise(\"The '@dialect' rule prop must hold a plain string value\");\n                let dialectID = this.dialects.indexOf(prop.value[0].value);\n                if (dialectID < 0)\n                    this.raise(`Unknown dialect '${prop.value[0].value}'`, prop.value[0].start);\n                dialect = dialectID;\n            }\n            else if (prop.name == \"dynamicPrecedence\") {\n                if (allow.indexOf(\"p\") < 0)\n                    this.raise(\"Dynamic precedence can only be specified on nonterminals\");\n                if (prop.value.length != 1 || !/^-?(?:10|\\d)$/.test(prop.value[0].value))\n                    this.raise(\"The '@dynamicPrecedence' rule prop must hold an integer between -10 and 10\");\n                dynamicPrec = +prop.value[0].value;\n            }\n            else if (prop.name == \"inline\") {\n                if (prop.value.length)\n                    this.raise(\"'@inline' doesn't take a value\", prop.value[0].start);\n                if (allow.indexOf(\"i\") < 0)\n                    this.raise(\"Inline can only be specified on nonterminals\");\n                inline = true;\n            }\n            else if (prop.name == \"isGroup\") {\n                if (allow.indexOf(\"g\") < 0)\n                    this.raise(\"'@isGroup' can only be specified on nonterminals\");\n                group = prop.value.length ? this.finishProp(prop, args, params) : defaultName;\n            }\n            else if (prop.name == \"export\") {\n                if (prop.value.length)\n                    exported = this.finishProp(prop, args, params);\n                else\n                    exported = defaultName;\n            }\n            else {\n                this.raise(`Unknown built-in prop name '@${prop.name}'`, prop.start);\n            }\n        }\n        if (expr && this.ast.autoDelim && (name || hasProps(result))) {\n            let delim = this.findDelimiters(expr);\n            if (delim) {\n                addToProp(delim[0], \"closedBy\", delim[1].nodeName);\n                addToProp(delim[1], \"openedBy\", delim[0].nodeName);\n            }\n        }\n        if (defaultProps && hasProps(defaultProps)) {\n            for (let prop in defaultProps)\n                if (!(prop in result))\n                    result[prop] = defaultProps[prop];\n        }\n        if (hasProps(result) && !name)\n            this.raise(`Node has properties but no name`, props.length ? props[0].start : expr.start);\n        if (inline && (hasProps(result) || dialect || dynamicPrec))\n            this.raise(`Inline nodes can't have props, dynamic precedence, or a dialect`, props[0].start);\n        if (inline && name)\n            name = null;\n        return { name, props: result, dialect, dynamicPrec, inline, group, exported };\n    }\n    finishProp(prop, args, params) {\n        return prop.value.map(part => {\n            if (part.value)\n                return part.value;\n            let pos = params.findIndex(param => param.name == part.name);\n            if (pos < 0)\n                this.raise(`Property refers to '${part.name}', but no parameter by that name is in scope`, part.start);\n            let expr = args[pos];\n            if (expr instanceof NameExpression && !expr.args.length)\n                return expr.id.name;\n            if (expr instanceof LiteralExpression)\n                return expr.value;\n            return this.raise(`Expression '${expr}' can not be used as part of a property value`, part.start);\n        }).join(\"\");\n    }\n    resolveSpecialization(expr) {\n        let type = expr.type;\n        let { name, props, dialect, exported } = this.nodeInfo(expr.props, \"d\");\n        let terminal = this.normalizeExpr(expr.token);\n        if (terminal.length != 1 || terminal[0].terms.length != 1 || !terminal[0].terms[0].terminal)\n            this.raise(`The first argument to '${type}' must resolve to a token`, expr.token.start);\n        let values;\n        if (expr.content instanceof LiteralExpression)\n            values = [expr.content.value];\n        else if ((expr.content instanceof ChoiceExpression) && expr.content.exprs.every(e => e instanceof LiteralExpression))\n            values = expr.content.exprs.map(expr => expr.value);\n        else\n            return this.raise(`The second argument to '${expr.type}' must be a literal or choice of literals`, expr.content.start);\n        let term = terminal[0].terms[0], token = null;\n        let table = this.specialized[term.name] || (this.specialized[term.name] = []);\n        for (let value of values) {\n            let known = table.find(sp => sp.value == value);\n            if (known == null) {\n                if (!token) {\n                    token = this.makeTerminal(term.name + \"/\" + JSON.stringify(value), name, props);\n                    if (dialect != null)\n                        (this.tokens.byDialect[dialect] || (this.tokens.byDialect[dialect] = [])).push(token);\n                }\n                table.push({ value, term: token, type, dialect, name });\n                this.tokenOrigins[token.name] = { spec: term };\n                if (name || exported) {\n                    if (!name)\n                        token.preserve = true;\n                    this.namedTerms[exported || name] = token;\n                }\n            }\n            else {\n                if (known.type != type)\n                    this.raise(`Conflicting specialization types for ${JSON.stringify(value)} of ${term.name} (${type} vs ${known.type})`, expr.start);\n                if (known.dialect != dialect)\n                    this.raise(`Conflicting dialects for specialization ${JSON.stringify(value)} of ${term.name}`, expr.start);\n                if (known.name != name)\n                    this.raise(`Conflicting names for specialization ${JSON.stringify(value)} of ${term.name}`, expr.start);\n                if (token && known.term != token)\n                    this.raise(`Conflicting specialization tokens for ${JSON.stringify(value)} of ${term.name}`, expr.start);\n                token = known.term;\n            }\n        }\n        return token;\n    }\n    findDelimiters(expr) {\n        if (!(expr instanceof SequenceExpression) || expr.exprs.length < 2)\n            return null;\n        let findToken = (expr) => {\n            if (expr instanceof LiteralExpression)\n                return { term: this.tokens.getLiteral(expr), str: expr.value };\n            if (expr instanceof NameExpression && expr.args.length == 0) {\n                let rule = this.ast.rules.find(r => r.id.name == expr.id.name);\n                if (rule)\n                    return findToken(rule.expr);\n                let token = this.tokens.rules.find(r => r.id.name == expr.id.name);\n                if (token && token.expr instanceof LiteralExpression)\n                    return { term: this.tokens.getToken(expr), str: token.expr.value };\n            }\n            return null;\n        };\n        let lastToken = findToken(expr.exprs[expr.exprs.length - 1]);\n        if (!lastToken || !lastToken.term.nodeName)\n            return null;\n        const brackets = [\"()\", \"[]\", \"{}\", \"<>\"];\n        let bracket = brackets.find(b => lastToken.str.indexOf(b[1]) > -1 && lastToken.str.indexOf(b[0]) < 0);\n        if (!bracket)\n            return null;\n        let firstToken = findToken(expr.exprs[0]);\n        if (!firstToken || !firstToken.term.nodeName ||\n            firstToken.str.indexOf(bracket[0]) < 0 || firstToken.str.indexOf(bracket[1]) > -1)\n            return null;\n        return [firstToken.term, lastToken.term];\n    }\n    registerDynamicPrec(term, prec) {\n        this.dynamicRulePrecedences.push({ rule: term, prec });\n        term.preserve = true;\n    }\n    defineGroup(rule, group, ast) {\n        var _a;\n        let recur = [];\n        let getNamed = (rule) => {\n            if (rule.nodeName)\n                return [rule];\n            if (recur.includes(rule))\n                this.raise(`Rule '${ast.id.name}' cannot define a group because it contains a non-named recursive rule ('${rule.name}')`, ast.start);\n            let result = [];\n            recur.push(rule);\n            for (let r of this.rules)\n                if (r.name == rule) {\n                    let names = r.parts.map(getNamed).filter(x => x.length);\n                    if (names.length > 1)\n                        this.raise(`Rule '${ast.id.name}' cannot define a group because some choices produce multiple named nodes`, ast.start);\n                    if (names.length == 1)\n                        for (let n of names[0])\n                            result.push(n);\n                }\n            recur.pop();\n            return result;\n        };\n        for (let name of getNamed(rule))\n            name.props[\"group\"] = (((_a = name.props[\"group\"]) === null || _a === void 0 ? void 0 : _a.split(\" \")) || []).concat(group).sort().join(\" \");\n    }\n    checkGroups() {\n        let groups = Object.create(null), nodeNames = Object.create(null);\n        for (let term of this.terms.terms)\n            if (term.nodeName) {\n                nodeNames[term.nodeName] = true;\n                if (term.props[\"group\"])\n                    for (let group of term.props[\"group\"].split(\" \")) {\n                        (groups[group] || (groups[group] = [])).push(term);\n                    }\n            }\n        let names = Object.keys(groups);\n        for (let i = 0; i < names.length; i++) {\n            let name = names[i], terms = groups[name];\n            if (nodeNames[name])\n                this.warn(`Group name '${name}' conflicts with a node of the same name`);\n            for (let j = i + 1; j < names.length; j++) {\n                let other = groups[names[j]];\n                if (terms.some(t => other.includes(t)) &&\n                    (terms.length > other.length ? other.some(t => !terms.includes(t)) : terms.some(t => !other.includes(t))))\n                    this.warn(`Groups '${name}' and '${names[j]}' overlap without one being a superset of the other`);\n            }\n        }\n    }\n}\nconst MinSharedActions = 5;\nclass FinishStateContext {\n    constructor(tokenizers, data, stateArray, skipData, skipInfo, states, builder) {\n        this.tokenizers = tokenizers;\n        this.data = data;\n        this.stateArray = stateArray;\n        this.skipData = skipData;\n        this.skipInfo = skipInfo;\n        this.states = states;\n        this.builder = builder;\n        this.sharedActions = [];\n    }\n    findSharedActions(state) {\n        if (state.actions.length < MinSharedActions)\n            return null;\n        let found = null;\n        for (let shared of this.sharedActions) {\n            if ((!found || shared.actions.length > found.actions.length) &&\n                shared.actions.every(a => state.actions.some(b => b.eq(a))))\n                found = shared;\n        }\n        if (found)\n            return found;\n        let max = null, scratch = [];\n        for (let i = state.id + 1; i < this.states.length; i++) {\n            let other = this.states[i], fill = 0;\n            if (other.defaultReduce || other.actions.length < MinSharedActions)\n                continue;\n            for (let a of state.actions)\n                for (let b of other.actions)\n                    if (a.eq(b))\n                        scratch[fill++] = a;\n            if (fill >= MinSharedActions && (!max || max.length < fill)) {\n                max = scratch;\n                scratch = [];\n            }\n        }\n        if (!max)\n            return null;\n        let result = { actions: max, addr: this.storeActions(max, -1, null) };\n        this.sharedActions.push(result);\n        return result;\n    }\n    storeActions(actions, skipReduce, shared) {\n        if (skipReduce < 0 && shared && shared.actions.length == actions.length)\n            return shared.addr;\n        let data = [];\n        for (let action of actions) {\n            if (shared && shared.actions.some(a => a.eq(action)))\n                continue;\n            if (action instanceof Shift) {\n                data.push(action.term.id, action.target.id, 0);\n            }\n            else {\n                let code = reduceAction(action.rule, this.skipInfo);\n                if (code != skipReduce)\n                    data.push(action.term.id, code & 65535 /* Action.ValueMask */, code >> 16);\n            }\n        }\n        data.push(65535 /* Seq.End */);\n        if (skipReduce > -1)\n            data.push(2 /* Seq.Other */, skipReduce & 65535 /* Action.ValueMask */, skipReduce >> 16);\n        else if (shared)\n            data.push(1 /* Seq.Next */, shared.addr & 0xffff, shared.addr >> 16);\n        else\n            data.push(0 /* Seq.Done */);\n        return this.data.storeArray(data);\n    }\n    finish(state, isSkip, forcedReduce) {\n        let b = this.builder;\n        let skipID = b.skipRules.indexOf(state.skip);\n        let skipTable = this.skipData[skipID], skipTerms = this.skipInfo[skipID].startTokens;\n        let defaultReduce = state.defaultReduce ? reduceAction(state.defaultReduce, this.skipInfo) : 0;\n        let flags = isSkip ? 1 /* StateFlag.Skipped */ : 0;\n        let skipReduce = -1, shared = null;\n        if (defaultReduce == 0) {\n            if (isSkip)\n                for (const action of state.actions)\n                    if (action instanceof Reduce && action.term.eof)\n                        skipReduce = reduceAction(action.rule, this.skipInfo);\n            if (skipReduce < 0)\n                shared = this.findSharedActions(state);\n        }\n        if (state.set.some(p => p.rule.name.top && p.pos == p.rule.parts.length))\n            flags |= 2 /* StateFlag.Accepting */;\n        let external = [];\n        for (let i = 0; i < state.actions.length + skipTerms.length; i++) {\n            let term = i < state.actions.length ? state.actions[i].term : skipTerms[i - state.actions.length];\n            for (;;) {\n                let orig = b.tokenOrigins[term.name];\n                if (orig && orig.spec) {\n                    term = orig.spec;\n                    continue;\n                }\n                if (orig && (orig.external instanceof ExternalTokenSet))\n                    addToSet(external, orig.external);\n                break;\n            }\n        }\n        let tokenizerMask = 0;\n        for (let i = 0; i < this.tokenizers.length; i++) {\n            let tok = this.tokenizers[i];\n            if (external.includes(tok) || tok.groupID == state.tokenGroup)\n                tokenizerMask |= (1 << i);\n        }\n        let base = state.id * 6 /* ParseState.Size */;\n        this.stateArray[base + 0 /* ParseState.Flags */] = flags;\n        this.stateArray[base + 1 /* ParseState.Actions */] = this.storeActions(defaultReduce ? none : state.actions, skipReduce, shared);\n        this.stateArray[base + 2 /* ParseState.Skip */] = skipTable;\n        this.stateArray[base + 3 /* ParseState.TokenizerMask */] = tokenizerMask;\n        this.stateArray[base + 4 /* ParseState.DefaultReduce */] = defaultReduce;\n        this.stateArray[base + 5 /* ParseState.ForcedReduce */] = forcedReduce;\n    }\n}\nfunction addToProp(term, prop, value) {\n    let cur = term.props[prop];\n    if (!cur || cur.split(\" \").indexOf(value) < 0)\n        term.props[prop] = cur ? cur + \" \" + value : value;\n}\nfunction buildSpecializeTable(spec) {\n    let table = Object.create(null);\n    for (let { value, term, type } of spec) {\n        let code = type == \"specialize\" ? 0 /* Specialize.Specialize */ : 1 /* Specialize.Extend */;\n        table[value] = (term.id << 1) | code;\n    }\n    return table;\n}\nfunction reduceAction(rule, skipInfo, depth = rule.parts.length) {\n    return rule.name.id | 65536 /* Action.ReduceFlag */ |\n        (rule.isRepeatWrap && depth == rule.parts.length ? 131072 /* Action.RepeatFlag */ : 0) |\n        (skipInfo.some(i => i.rule == rule.name) ? 262144 /* Action.StayFlag */ : 0) |\n        (depth << 19 /* Action.ReduceDepthShift */);\n}\nfunction findArray(data, value) {\n    search: for (let i = 0;;) {\n        let next = data.indexOf(value[0], i);\n        if (next == -1 || next + value.length > data.length)\n            break;\n        for (let j = 1; j < value.length; j++) {\n            if (value[j] != data[next + j]) {\n                i = next + 1;\n                continue search;\n            }\n        }\n        return next;\n    }\n    return -1;\n}\nfunction findSkipStates(table, startRules) {\n    let nonSkip = Object.create(null);\n    let work = [];\n    let add = (state) => {\n        if (!nonSkip[state.id]) {\n            nonSkip[state.id] = true;\n            work.push(state);\n        }\n    };\n    for (let state of table)\n        if (state.startRule && startRules.includes(state.startRule))\n            add(state);\n    for (let i = 0; i < work.length; i++) {\n        for (let a of work[i].actions)\n            if (a instanceof Shift)\n                add(a.target);\n        for (let a of work[i].goto)\n            add(a.target);\n    }\n    return (id) => !nonSkip[id];\n}\nclass DataBuilder {\n    constructor() {\n        this.data = [];\n    }\n    storeArray(data) {\n        let found = findArray(this.data, data);\n        if (found > -1)\n            return found;\n        let pos = this.data.length;\n        for (let num of data)\n            this.data.push(num);\n        return pos;\n    }\n    finish() {\n        return Uint16Array.from(this.data);\n    }\n}\n// The goto table maps a start state + a term to a new state, and is\n// used to determine the new state when reducing. Because this allows\n// more more efficient representation and access, unlike the action\n// tables, the goto table is organized by term, with groups of start\n// states that map to a given end state enumerated for each term.\n// Since many terms only have a single valid goto target, this makes\n// it cheaper to look those up.\n//\n// (Unfortunately, though the standard LR parsing mechanism never\n// looks up invalid goto states, the incremental parsing mechanism\n// needs accurate goto information for a state/term pair, so we do\n// need to store state ids even for terms that have only one target.)\n//\n// - First comes the amount of terms in the table\n//\n// - Then, for each term, the offset of the term's data\n//\n// - At these offsets, there's a record for each target state\n//\n//   - Such a record starts with the amount of start states that go to\n//     this target state, shifted one to the left, with the first bit\n//     only set if this is the last record for this term.\n//\n//   - Then follows the target state id\n//\n//   - And then the start state ids\nfunction computeGotoTable(states) {\n    let goto = {};\n    let maxTerm = 0;\n    for (let state of states) {\n        for (let entry of state.goto) {\n            maxTerm = Math.max(entry.term.id, maxTerm);\n            let set = goto[entry.term.id] || (goto[entry.term.id] = {});\n            (set[entry.target.id] || (set[entry.target.id] = [])).push(state.id);\n        }\n    }\n    let data = new DataBuilder;\n    let index = [];\n    let offset = maxTerm + 2; // Offset of the data, taking index size into account\n    for (let term = 0; term <= maxTerm; term++) {\n        let entries = goto[term];\n        if (!entries) {\n            index.push(1);\n            continue;\n        }\n        let termTable = [];\n        let keys = Object.keys(entries);\n        for (let target of keys) {\n            let list = entries[target];\n            termTable.push((target == keys[keys.length - 1] ? 1 : 0) + (list.length << 1));\n            termTable.push(+target);\n            for (let source of list)\n                termTable.push(source);\n        }\n        index.push(data.storeArray(termTable) + offset);\n    }\n    if (index.some(n => n > 0xffff))\n        throw new GenError(\"Goto table too large\");\n    return Uint16Array.from([maxTerm + 1, ...index, ...data.data]);\n}\nclass TokenGroup {\n    constructor(tokens, groupID) {\n        this.tokens = tokens;\n        this.groupID = groupID;\n    }\n    create() { return this.groupID; }\n    createSource() { return String(this.groupID); }\n}\nfunction addToSet(set, value) {\n    if (!set.includes(value))\n        set.push(value);\n}\nfunction buildTokenMasks(groups) {\n    let masks = Object.create(null);\n    for (let group of groups) {\n        let groupMask = 1 << group.groupID;\n        for (let term of group.tokens) {\n            masks[term.id] = (masks[term.id] || 0) | groupMask;\n        }\n    }\n    return masks;\n}\nclass TokenArg {\n    constructor(name, expr, scope) {\n        this.name = name;\n        this.expr = expr;\n        this.scope = scope;\n    }\n}\nclass BuildingRule {\n    constructor(name, start, to, args) {\n        this.name = name;\n        this.start = start;\n        this.to = to;\n        this.args = args;\n    }\n}\nclass TokenSet {\n    constructor(b, ast) {\n        this.b = b;\n        this.ast = ast;\n        this.startState = new State$1;\n        this.built = [];\n        this.building = []; // Used for recursion check\n        this.byDialect = Object.create(null);\n        this.precedenceRelations = [];\n        this.rules = ast ? ast.rules : none;\n        for (let rule of this.rules)\n            b.unique(rule.id);\n    }\n    getToken(expr) {\n        for (let built of this.built)\n            if (built.matches(expr))\n                return built.term;\n        let name = expr.id.name;\n        let rule = this.rules.find(r => r.id.name == name);\n        if (!rule)\n            return null;\n        let { name: nodeName, props, dialect, exported } = this.b.nodeInfo(rule.props, \"d\", name, expr.args, rule.params.length != expr.args.length ? none : rule.params);\n        let term = this.b.makeTerminal(expr.toString(), nodeName, props);\n        if (dialect != null)\n            (this.byDialect[dialect] || (this.byDialect[dialect] = [])).push(term);\n        if ((term.nodeType || exported) && rule.params.length == 0) {\n            if (!term.nodeType)\n                term.preserve = true;\n            this.b.namedTerms[exported || name] = term;\n        }\n        this.buildRule(rule, expr, this.startState, new State$1([term]));\n        this.built.push(new BuiltRule(name, expr.args, term));\n        return term;\n    }\n    buildRule(rule, expr, from, to, args = none) {\n        let name = expr.id.name;\n        if (rule.params.length != expr.args.length)\n            this.b.raise(`Incorrect number of arguments for token '${name}'`, expr.start);\n        let building = this.building.find(b => b.name == name && exprsEq(expr.args, b.args));\n        if (building) {\n            if (building.to == to) {\n                from.nullEdge(building.start);\n                return;\n            }\n            let lastIndex = this.building.length - 1;\n            while (this.building[lastIndex].name != name)\n                lastIndex--;\n            this.b.raise(`Invalid (non-tail) recursion in token rules: ${this.building.slice(lastIndex).map(b => b.name).join(\" -> \")}`, expr.start);\n        }\n        this.b.used(rule.id.name);\n        let start = new State$1;\n        from.nullEdge(start);\n        this.building.push(new BuildingRule(name, start, to, expr.args));\n        this.build(this.b.substituteArgs(rule.expr, expr.args, rule.params), start, to, expr.args.map((e, i) => new TokenArg(rule.params[i].name, e, args)));\n        this.building.pop();\n    }\n    build(expr, from, to, args) {\n        if (expr instanceof NameExpression) {\n            let name = expr.id.name, arg = args.find(a => a.name == name);\n            if (arg)\n                return this.build(arg.expr, from, to, arg.scope);\n            let rule;\n            for (let i = 0, lt = this.b.localTokens; i <= lt.length; i++) {\n                let set = i == lt.length ? this.b.tokens : lt[i];\n                rule = set.rules.find(r => r.id.name == name);\n            }\n            if (!rule)\n                return this.b.raise(`Reference to token rule '${expr.id.name}', which isn't found`, expr.start);\n            this.buildRule(rule, expr, from, to, args);\n        }\n        else if (expr instanceof CharClass) {\n            for (let [a, b] of CharClasses[expr.type])\n                from.edge(a, b, to);\n        }\n        else if (expr instanceof ChoiceExpression) {\n            for (let choice of expr.exprs)\n                this.build(choice, from, to, args);\n        }\n        else if (isEmpty(expr)) {\n            from.nullEdge(to);\n        }\n        else if (expr instanceof SequenceExpression) {\n            let conflict = expr.markers.find(c => c.length > 0);\n            if (conflict)\n                this.b.raise(\"Conflict marker in token expression\", conflict[0].start);\n            for (let i = 0; i < expr.exprs.length; i++) {\n                let next = i == expr.exprs.length - 1 ? to : new State$1;\n                this.build(expr.exprs[i], from, next, args);\n                from = next;\n            }\n        }\n        else if (expr instanceof RepeatExpression) {\n            if (expr.kind == \"*\") {\n                let loop = new State$1;\n                from.nullEdge(loop);\n                this.build(expr.expr, loop, loop, args);\n                loop.nullEdge(to);\n            }\n            else if (expr.kind == \"+\") {\n                let loop = new State$1;\n                this.build(expr.expr, from, loop, args);\n                this.build(expr.expr, loop, loop, args);\n                loop.nullEdge(to);\n            }\n            else { // expr.kind == \"?\"\n                from.nullEdge(to);\n                this.build(expr.expr, from, to, args);\n            }\n        }\n        else if (expr instanceof SetExpression) {\n            for (let [a, b] of expr.inverted ? invertRanges(expr.ranges) : expr.ranges)\n                rangeEdges(from, to, a, b);\n        }\n        else if (expr instanceof LiteralExpression) {\n            for (let i = 0; i < expr.value.length; i++) {\n                let ch = expr.value.charCodeAt(i);\n                let next = i == expr.value.length - 1 ? to : new State$1;\n                from.edge(ch, ch + 1, next);\n                from = next;\n            }\n        }\n        else if (expr instanceof AnyExpression) {\n            let mid = new State$1;\n            from.edge(0, 0xDC00, to);\n            from.edge(0xDC00, MAX_CHAR + 1, to);\n            from.edge(0xD800, 0xDC00, mid);\n            mid.edge(0xDC00, 0xE000, to);\n        }\n        else {\n            return this.b.raise(`Unrecognized expression type in token`, expr.start);\n        }\n    }\n    takePrecedences() {\n        let rel = this.precedenceRelations = [];\n        if (this.ast)\n            for (let group of this.ast.precedences) {\n                let prev = [];\n                for (let item of group.items) {\n                    let level = [];\n                    if (item instanceof NameExpression) {\n                        for (let built of this.built)\n                            if (item.args.length ? built.matches(item) : built.id == item.id.name)\n                                level.push(built.term);\n                    }\n                    else {\n                        let id = JSON.stringify(item.value), found = this.built.find(b => b.id == id);\n                        if (found)\n                            level.push(found.term);\n                    }\n                    if (!level.length)\n                        this.b.warn(`Precedence specified for unknown token ${item}`, item.start);\n                    for (let term of level)\n                        addRel(rel, term, prev);\n                    prev = prev.concat(level);\n                }\n            }\n    }\n    precededBy(a, b) {\n        let found = this.precedenceRelations.find(r => r.term == a);\n        return found && found.after.includes(b);\n    }\n    buildPrecTable(softConflicts) {\n        let precTable = [], rel = this.precedenceRelations.slice();\n        // Add entries for soft-conflicting tokens that are in the\n        // precedence table, to make sure they'll appear in the right\n        // order and don't mess up the longer-wins default rule.\n        for (let { a, b, soft } of softConflicts)\n            if (soft) {\n                if (!rel.some(r => r.term == a) || !rel.some(r => r.term == b))\n                    continue;\n                if (soft < 0)\n                    [a, b] = [b, a]; // Now a is longer than b (and should thus take precedence)\n                addRel(rel, b, [a]);\n                addRel(rel, a, []);\n            }\n        add: while (rel.length) {\n            for (let i = 0; i < rel.length; i++) {\n                let record = rel[i];\n                if (record.after.every(t => precTable.includes(t.id))) {\n                    precTable.push(record.term.id);\n                    if (rel.length == 1)\n                        break add;\n                    rel[i] = rel.pop();\n                    continue add;\n                }\n            }\n            this.b.raise(`Cyclic token precedence relation between ${rel.map(r => r.term).join(\", \")}`);\n        }\n        return precTable;\n    }\n}\nclass MainTokenSet extends TokenSet {\n    constructor() {\n        super(...arguments);\n        this.explicitConflicts = [];\n    }\n    getLiteral(expr) {\n        let id = JSON.stringify(expr.value);\n        for (let built of this.built)\n            if (built.id == id)\n                return built.term;\n        let name = null, props = {}, dialect = null, exported = null;\n        let decl = this.ast ? this.ast.literals.find(l => l.literal == expr.value) : null;\n        if (decl)\n            ({ name, props, dialect, exported } = this.b.nodeInfo(decl.props, \"da\", expr.value));\n        let term = this.b.makeTerminal(id, name, props);\n        if (dialect != null)\n            (this.byDialect[dialect] || (this.byDialect[dialect] = [])).push(term);\n        if (exported)\n            this.b.namedTerms[exported] = term;\n        this.build(expr, this.startState, new State$1([term]), none);\n        this.built.push(new BuiltRule(id, none, term));\n        return term;\n    }\n    takeConflicts() {\n        var _a;\n        let resolve = (expr) => {\n            if (expr instanceof NameExpression) {\n                for (let built of this.built)\n                    if (built.matches(expr))\n                        return built.term;\n            }\n            else {\n                let id = JSON.stringify(expr.value), found = this.built.find(b => b.id == id);\n                if (found)\n                    return found.term;\n            }\n            this.b.warn(`Precedence specified for unknown token ${expr}`, expr.start);\n            return null;\n        };\n        for (let c of ((_a = this.ast) === null || _a === void 0 ? void 0 : _a.conflicts) || []) {\n            let a = resolve(c.a), b = resolve(c.b);\n            if (a && b) {\n                if (a.id < b.id)\n                    [a, b] = [b, a];\n                this.explicitConflicts.push({ a, b });\n            }\n        }\n    }\n    // Token groups are a mechanism for allowing conflicting (matching\n    // overlapping input, without an explicit precedence being given)\n    // tokens to exist in a grammar _if_ they don't occur in the same\n    // place (aren't used in the same states).\n    //\n    // States that use tokens that conflict will raise an error when any\n    // of the conflicting pairs of tokens both occur in that state.\n    // Otherwise, they are assigned a token group, which includes all\n    // the potentially-conflicting tokens they use. If there's already a\n    // group that doesn't have any conflicts with those tokens, that is\n    // reused, otherwise a new group is created.\n    //\n    // So each state has zero or one token groups, and each conflicting\n    // token may belong to one or more groups. Tokens get assigned a\n    // 16-bit bitmask with the groups they belong to set to 1 (all-1s\n    // for non-conflicting tokens). When tokenizing, that mask is\n    // compared to the current state's group (again using all-1s for\n    // group-less states) to determine whether a token is applicable for\n    // this state.\n    //\n    // Extended/specialized tokens are treated as their parent token for\n    // this purpose.\n    buildTokenGroups(states, skipInfo, startID) {\n        let tokens = this.startState.compile();\n        if (tokens.accepting.length)\n            this.b.raise(`Grammar contains zero-length tokens (in '${tokens.accepting[0].name}')`, this.rules.find(r => r.id.name == tokens.accepting[0].name).start);\n        if (/\\btokens\\b/.test(verbose))\n            console.log(tokens.toString());\n        // If there is a precedence specified for the pair, the conflict is resolved\n        let allConflicts = tokens.findConflicts(checkTogether(states, this.b, skipInfo))\n            .filter(({ a, b }) => !this.precededBy(a, b) && !this.precededBy(b, a));\n        for (let { a, b } of this.explicitConflicts) {\n            if (!allConflicts.some(c => c.a == a && c.b == b))\n                allConflicts.push(new Conflict$1(a, b, 0, \"\", \"\"));\n        }\n        let softConflicts = allConflicts.filter(c => c.soft), conflicts = allConflicts.filter(c => !c.soft);\n        let errors = [];\n        let groups = [];\n        for (let state of states) {\n            if (state.defaultReduce || state.tokenGroup > -1)\n                continue;\n            // Find potentially-conflicting terms (in terms) and the things\n            // they conflict with (in conflicts), and raise an error if\n            // there's a token conflict directly in this state.\n            let terms = [], incompatible = [];\n            let skip = skipInfo[this.b.skipRules.indexOf(state.skip)].startTokens;\n            for (let term of skip)\n                if (state.actions.some(a => a.term == term))\n                    this.b.raise(`Use of token ${term.name} conflicts with skip rule`);\n            let stateTerms = [];\n            for (let i = 0; i < state.actions.length + (skip ? skip.length : 0); i++) {\n                let term = i < state.actions.length ? state.actions[i].term : skip[i - state.actions.length];\n                let orig = this.b.tokenOrigins[term.name];\n                if (orig && orig.spec)\n                    term = orig.spec;\n                else if (orig && orig.external)\n                    continue;\n                addToSet(stateTerms, term);\n            }\n            if (stateTerms.length == 0)\n                continue;\n            for (let term of stateTerms) {\n                for (let conflict of conflicts) {\n                    let conflicting = conflict.a == term ? conflict.b : conflict.b == term ? conflict.a : null;\n                    if (!conflicting)\n                        continue;\n                    if (stateTerms.includes(conflicting) && !errors.some(e => e.conflict == conflict)) {\n                        let example = conflict.exampleA ? ` (example: ${JSON.stringify(conflict.exampleA)}${conflict.exampleB ? ` vs ${JSON.stringify(conflict.exampleB)}` : \"\"})` : \"\";\n                        errors.push({\n                            error: `Overlapping tokens ${term.name} and ${conflicting.name} used in same context${example}\\n` +\n                                `After: ${state.set[0].trail()}`,\n                            conflict\n                        });\n                    }\n                    addToSet(terms, term);\n                    addToSet(incompatible, conflicting);\n                }\n            }\n            let tokenGroup = null;\n            for (let group of groups) {\n                if (incompatible.some(term => group.tokens.includes(term)))\n                    continue;\n                for (let term of terms)\n                    addToSet(group.tokens, term);\n                tokenGroup = group;\n                break;\n            }\n            if (!tokenGroup) {\n                tokenGroup = new TokenGroup(terms, groups.length + startID);\n                groups.push(tokenGroup);\n            }\n            state.tokenGroup = tokenGroup.groupID;\n        }\n        if (errors.length)\n            this.b.raise(errors.map(e => e.error).join(\"\\n\\n\"));\n        if (groups.length + startID > 16)\n            this.b.raise(`Too many different token groups (${groups.length}) to represent them as a 16-bit bitfield`);\n        let precTable = this.buildPrecTable(softConflicts);\n        return {\n            tokenGroups: groups,\n            tokenPrec: precTable,\n            tokenData: tokens.toArray(buildTokenMasks(groups), precTable)\n        };\n    }\n}\nclass LocalTokenSet extends TokenSet {\n    constructor(b, ast) {\n        super(b, ast);\n        this.fallback = null;\n        if (ast.fallback)\n            b.unique(ast.fallback.id);\n    }\n    getToken(expr) {\n        let term = null;\n        if (this.ast.fallback && this.ast.fallback.id.name == expr.id.name) {\n            if (expr.args.length)\n                this.b.raise(`Incorrect number of arguments for ${expr.id.name}`, expr.start);\n            if (!this.fallback) {\n                let { name: nodeName, props, exported } = this.b.nodeInfo(this.ast.fallback.props, \"\", expr.id.name, none, none);\n                let term = this.fallback = this.b.makeTerminal(expr.id.name, nodeName, props);\n                if (term.nodeType || exported) {\n                    if (!term.nodeType)\n                        term.preserve = true;\n                    this.b.namedTerms[exported || expr.id.name] = term;\n                }\n                this.b.used(expr.id.name);\n            }\n            term = this.fallback;\n        }\n        else {\n            term = super.getToken(expr);\n        }\n        if (term && !this.b.tokenOrigins[term.name])\n            this.b.tokenOrigins[term.name] = { group: this };\n        return term;\n    }\n    buildLocalGroup(states, skipInfo, id) {\n        let tokens = this.startState.compile();\n        if (tokens.accepting.length)\n            this.b.raise(`Grammar contains zero-length tokens (in '${tokens.accepting[0].name}')`, this.rules.find(r => r.id.name == tokens.accepting[0].name).start);\n        for (let { a, b, exampleA } of tokens.findConflicts(() => true)) {\n            if (!this.precededBy(a, b) && !this.precededBy(b, a))\n                this.b.raise(`Overlapping tokens ${a.name} and ${b.name} in local token group${exampleA ? ` (example: ${JSON.stringify(exampleA)})` : ''}`);\n        }\n        for (let state of states) {\n            if (state.defaultReduce)\n                continue;\n            // See if this state uses any of the tokens in this group, and\n            // if so, make sure it *only* uses tokens from this group.\n            let usesThis = null;\n            let usesOther = skipInfo[this.b.skipRules.indexOf(state.skip)].startTokens[0];\n            for (let { term } of state.actions) {\n                let orig = this.b.tokenOrigins[term.name];\n                if ((orig === null || orig === void 0 ? void 0 : orig.group) == this)\n                    usesThis = term;\n                else\n                    usesOther = term;\n            }\n            if (usesThis) {\n                if (usesOther)\n                    this.b.raise(`Tokens from a local token group used together with other tokens (${usesThis.name} with ${usesOther.name})`);\n                state.tokenGroup = id;\n            }\n        }\n        let precTable = this.buildPrecTable(none);\n        let tokenData = tokens.toArray({ [id]: 65535 /* Seq.End */ }, precTable);\n        let precOffset = tokenData.length;\n        let fullData = new Uint16Array(tokenData.length + precTable.length + 1);\n        fullData.set(tokenData, 0);\n        fullData.set(precTable, precOffset);\n        fullData[fullData.length - 1] = 65535 /* Seq.End */;\n        return {\n            groupID: id,\n            create: () => new _lezer_lr__WEBPACK_IMPORTED_MODULE_1__.LocalTokenGroup(fullData, precOffset, this.fallback ? this.fallback.id : undefined),\n            createSource: importName => `new ${importName(\"LocalTokenGroup\", \"@lezer/lr\")}(${encodeArray(fullData)}, ${precOffset}${this.fallback ? `, ${this.fallback.id}` : ''})`\n        };\n    }\n}\nfunction checkTogether(states, b, skipInfo) {\n    let cache = Object.create(null);\n    function hasTerm(state, term) {\n        return state.actions.some(a => a.term == term) ||\n            skipInfo[b.skipRules.indexOf(state.skip)].startTokens.includes(term);\n    }\n    return (a, b) => {\n        if (a.id < b.id)\n            [a, b] = [b, a];\n        let key = a.id | (b.id << 16), cached = cache[key];\n        if (cached != null)\n            return cached;\n        return cache[key] = states.some(state => hasTerm(state, a) && hasTerm(state, b));\n    };\n}\nfunction invertRanges(ranges) {\n    let pos = 0, result = [];\n    for (let [a, b] of ranges) {\n        if (a > pos)\n            result.push([pos, a]);\n        pos = b;\n    }\n    if (pos <= MAX_CODE)\n        result.push([pos, MAX_CODE + 1]);\n    return result;\n}\nconst ASTRAL = 0x10000, GAP_START = 0xd800, GAP_END = 0xe000, MAX_CODE = 0x10ffff;\nconst LOW_SURR_B = 0xdc00, HIGH_SURR_B = 0xdfff;\n// Create intermediate states for astral characters in a range, if\n// necessary, since the tokenizer acts on UTF16 characters\nfunction rangeEdges(from, to, low, hi) {\n    if (low < ASTRAL) {\n        if (low < GAP_START)\n            from.edge(low, Math.min(hi, GAP_START), to);\n        if (hi > GAP_END)\n            from.edge(Math.max(low, GAP_END), Math.min(hi, MAX_CHAR + 1), to);\n        low = ASTRAL;\n    }\n    if (hi <= ASTRAL)\n        return;\n    let lowStr = String.fromCodePoint(low), hiStr = String.fromCodePoint(hi - 1);\n    let lowA = lowStr.charCodeAt(0), lowB = lowStr.charCodeAt(1);\n    let hiA = hiStr.charCodeAt(0), hiB = hiStr.charCodeAt(1);\n    if (lowA == hiA) { // Share the first char code\n        let hop = new State$1;\n        from.edge(lowA, lowA + 1, hop);\n        hop.edge(lowB, hiB + 1, to);\n    }\n    else {\n        let midStart = lowA, midEnd = hiA;\n        if (lowB > LOW_SURR_B) {\n            midStart++;\n            let hop = new State$1;\n            from.edge(lowA, lowA + 1, hop);\n            hop.edge(lowB, HIGH_SURR_B + 1, to);\n        }\n        if (hiB < HIGH_SURR_B) {\n            midEnd--;\n            let hop = new State$1;\n            from.edge(hiA, hiA + 1, hop);\n            hop.edge(LOW_SURR_B, hiB + 1, to);\n        }\n        if (midStart <= midEnd) {\n            let hop = new State$1;\n            from.edge(midStart, midEnd + 1, hop);\n            hop.edge(LOW_SURR_B, HIGH_SURR_B + 1, to);\n        }\n    }\n}\nfunction isEmpty(expr) {\n    return expr instanceof SequenceExpression && expr.exprs.length == 0;\n}\nfunction gatherExtTokens(b, tokens) {\n    let result = Object.create(null);\n    for (let token of tokens) {\n        b.unique(token.id);\n        let { name, props, dialect } = b.nodeInfo(token.props, \"d\", token.id.name);\n        let term = b.makeTerminal(token.id.name, name, props);\n        if (dialect != null)\n            (b.tokens.byDialect[dialect] || (b.tokens.byDialect[dialect] = [])).push(term);\n        b.namedTerms[token.id.name] = result[token.id.name] = term;\n    }\n    return result;\n}\nfunction findExtToken(b, tokens, expr) {\n    let found = tokens[expr.id.name];\n    if (!found)\n        return null;\n    if (expr.args.length)\n        b.raise(\"External tokens cannot take arguments\", expr.args[0].start);\n    b.used(expr.id.name);\n    return found;\n}\nfunction addRel(rel, term, after) {\n    let found = rel.findIndex(r => r.term == term);\n    if (found < 0)\n        rel.push({ term, after });\n    else\n        rel[found] = { term, after: rel[found].after.concat(after) };\n}\nclass ExternalTokenSet {\n    constructor(b, ast) {\n        this.b = b;\n        this.ast = ast;\n        this.tokens = gatherExtTokens(b, ast.tokens);\n        for (let name in this.tokens)\n            this.b.tokenOrigins[this.tokens[name].name] = { external: this };\n    }\n    getToken(expr) { return findExtToken(this.b, this.tokens, expr); }\n    create() {\n        return this.b.options.externalTokenizer(this.ast.id.name, this.b.termTable);\n    }\n    createSource(importName) {\n        let { source, id: { name } } = this.ast;\n        return importName(name, source);\n    }\n}\nclass ExternalSpecializer {\n    constructor(b, ast) {\n        this.b = b;\n        this.ast = ast;\n        this.term = null;\n        this.tokens = gatherExtTokens(b, ast.tokens);\n    }\n    finish() {\n        let terms = this.b.normalizeExpr(this.ast.token);\n        if (terms.length != 1 || terms[0].terms.length != 1 || !terms[0].terms[0].terminal)\n            this.b.raise(`The token expression to '@external ${this.ast.type}' must resolve to a token`, this.ast.token.start);\n        this.term = terms[0].terms[0];\n        for (let name in this.tokens)\n            this.b.tokenOrigins[this.tokens[name].name] = { spec: this.term, external: this };\n    }\n    getToken(expr) { return findExtToken(this.b, this.tokens, expr); }\n}\nfunction inlineRules(rules, preserve) {\n    for (let pass = 0;; pass++) {\n        let inlinable = Object.create(null), found;\n        if (pass == 0)\n            for (let rule of rules) {\n                if (rule.name.inline && !inlinable[rule.name.name]) {\n                    let group = rules.filter(r => r.name == rule.name);\n                    if (group.some(r => r.parts.includes(rule.name)))\n                        continue;\n                    found = inlinable[rule.name.name] = group;\n                }\n            }\n        for (let i = 0; i < rules.length; i++) {\n            let rule = rules[i];\n            if (!rule.name.interesting && !rule.parts.includes(rule.name) && rule.parts.length < 3 &&\n                !preserve.includes(rule.name) &&\n                (rule.parts.length == 1 || rules.every(other => other.skip == rule.skip || !other.parts.includes(rule.name))) &&\n                !rule.parts.some(p => !!inlinable[p.name]) &&\n                !rules.some((r, j) => j != i && r.name == rule.name))\n                found = inlinable[rule.name.name] = [rule];\n        }\n        if (!found)\n            return rules;\n        let newRules = [];\n        for (let rule of rules) {\n            if (inlinable[rule.name.name])\n                continue;\n            if (!rule.parts.some(p => !!inlinable[p.name])) {\n                newRules.push(rule);\n                continue;\n            }\n            function expand(at, conflicts, parts) {\n                if (at == rule.parts.length) {\n                    newRules.push(new Rule(rule.name, parts, conflicts, rule.skip));\n                    return;\n                }\n                let next = rule.parts[at], replace = inlinable[next.name];\n                if (!replace) {\n                    expand(at + 1, conflicts.concat(rule.conflicts[at + 1]), parts.concat(next));\n                    return;\n                }\n                for (let r of replace)\n                    expand(at + 1, conflicts.slice(0, conflicts.length - 1)\n                        .concat(conflicts[at].join(r.conflicts[0]))\n                        .concat(r.conflicts.slice(1, r.conflicts.length - 1))\n                        .concat(rule.conflicts[at + 1].join(r.conflicts[r.conflicts.length - 1])), parts.concat(r.parts));\n            }\n            expand(0, [rule.conflicts[0]], []);\n        }\n        rules = newRules;\n    }\n}\nfunction mergeRules(rules) {\n    let merged = Object.create(null), found;\n    for (let i = 0; i < rules.length;) {\n        let groupStart = i;\n        let name = rules[i++].name;\n        while (i < rules.length && rules[i].name == name)\n            i++;\n        let size = i - groupStart;\n        if (name.interesting)\n            continue;\n        for (let j = i; j < rules.length;) {\n            let otherStart = j, otherName = rules[j++].name;\n            while (j < rules.length && rules[j].name == otherName)\n                j++;\n            if (j - otherStart != size || otherName.interesting)\n                continue;\n            let match = true;\n            for (let k = 0; k < size && match; k++) {\n                let a = rules[groupStart + k], b = rules[otherStart + k];\n                if (a.cmpNoName(b) != 0)\n                    match = false;\n            }\n            if (match)\n                found = merged[name.name] = otherName;\n        }\n    }\n    if (!found)\n        return rules;\n    let newRules = [];\n    for (let rule of rules)\n        if (!merged[rule.name.name]) {\n            newRules.push(rule.parts.every(p => !merged[p.name]) ? rule :\n                new Rule(rule.name, rule.parts.map(p => merged[p.name] || p), rule.conflicts, rule.skip));\n        }\n    return newRules;\n}\nfunction simplifyRules(rules, preserve) {\n    return mergeRules(inlineRules(rules, preserve));\n}\n/**\nBuild an in-memory parser instance for a given grammar. This is\nmostly useful for testing. If your grammar uses external\ntokenizers, you'll have to provide the `externalTokenizer` option\nfor the returned parser to be able to parse anything.\n*/\nfunction buildParser(text, options = {}) {\n    let builder = new Builder(text, options), parser = builder.getParser();\n    parser.termTable = builder.termTable;\n    return parser;\n}\nconst KEYWORDS = [\"await\", \"break\", \"case\", \"catch\", \"continue\", \"debugger\", \"default\", \"do\", \"else\", \"finally\",\n    \"for\", \"function\", \"if\", \"return\", \"switch\", \"throw\", \"try\", \"var\", \"while\", \"with\",\n    \"null\", \"true\", \"false\", \"instanceof\", \"typeof\", \"void\", \"delete\", \"new\", \"in\", \"this\",\n    \"const\", \"class\", \"extends\", \"export\", \"import\", \"super\", \"enum\", \"implements\", \"interface\",\n    \"let\", \"package\", \"private\", \"protected\", \"public\", \"static\", \"yield\", \"require\"];\n/**\nBuild the code that represents the parser tables for a given\ngrammar description. The `parser` property in the return value\nholds the main file that exports the `Parser` instance. The\n`terms` property holds a declaration file that defines constants\nfor all of the named terms in grammar, holding their ids as value.\nThis is useful when external code, such as a tokenizer, needs to\nbe able to use these ids. It is recommended to run a tree-shaking\nbundler when importing this file, since you usually only need a\nhandful of the many terms in your code.\n*/\nfunction buildParserFile(text, options = {}) {\n    return new Builder(text, options).getParserFile();\n}\nfunction ignored(name) {\n    let first = name[0];\n    return first == \"_\" || first.toUpperCase() != first;\n}\nfunction isExported(rule) {\n    return rule.props.some(p => p.at && p.name == \"export\");\n}\n\n\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@lezer/generator/dist/index.js?");

/***/ })

}]);