/*
 * 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_shared-models_lib_index_js"],{

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"YBaseCell\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.YBaseCell),\n/* harmony export */   \"YCodeCell\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.YCodeCell),\n/* harmony export */   \"YDocument\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.YDocument),\n/* harmony export */   \"YFile\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.YFile),\n/* harmony export */   \"YMarkdownCell\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.YMarkdownCell),\n/* harmony export */   \"YNotebook\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.YNotebook),\n/* harmony export */   \"YRawCell\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.YRawCell),\n/* harmony export */   \"createCellFromType\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.createCellFromType),\n/* harmony export */   \"createStandaloneCell\": () => (/* reexport safe */ _ymodels__WEBPACK_IMPORTED_MODULE_0__.createStandaloneCell),\n/* harmony export */   \"convertYMapEventToMapChange\": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_1__.convertYMapEventToMapChange),\n/* harmony export */   \"createMutex\": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_1__.createMutex)\n/* harmony export */ });\n/* harmony import */ var _ymodels__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ymodels */ \"../node_modules/@jupyterlab/shared-models/lib/ymodels.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"../node_modules/@jupyterlab/shared-models/lib/utils.js\");\n/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module shared-models\n */\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/shared-models/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/shared-models/lib/utils.js":
/*!**************************************************************!*\
  !*** ../node_modules/@jupyterlab/shared-models/lib/utils.js ***!
  \**************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"convertYMapEventToMapChange\": () => (/* binding */ convertYMapEventToMapChange),\n/* harmony export */   \"createMutex\": () => (/* binding */ createMutex)\n/* harmony export */ });\n/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\nfunction convertYMapEventToMapChange(event) {\n    let changes = new Map();\n    event.changes.keys.forEach((event, key) => {\n        changes.set(key, {\n            action: event.action,\n            oldValue: event.oldValue,\n            newValue: this.ymeta.get(key)\n        });\n    });\n    return changes;\n}\n/**\n * Creates a mutual exclude function with the following property:\n *\n * ```js\n * const mutex = createMutex()\n * mutex(() => {\n *   // This function is immediately executed\n *   mutex(() => {\n *     // This function is not executed, as the mutex is already active.\n *   })\n * })\n * ```\n */\nconst createMutex = () => {\n    let token = true;\n    return (f) => {\n        if (token) {\n            token = false;\n            try {\n                f();\n            }\n            finally {\n                token = true;\n            }\n        }\n    };\n};\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/shared-models/lib/utils.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/shared-models/lib/ymodels.js":
/*!****************************************************************!*\
  !*** ../node_modules/@jupyterlab/shared-models/lib/ymodels.js ***!
  \****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"YDocument\": () => (/* binding */ YDocument),\n/* harmony export */   \"YFile\": () => (/* binding */ YFile),\n/* harmony export */   \"YNotebook\": () => (/* binding */ YNotebook),\n/* harmony export */   \"createCellFromType\": () => (/* binding */ createCellFromType),\n/* harmony export */   \"createStandaloneCell\": () => (/* binding */ createStandaloneCell),\n/* harmony export */   \"YBaseCell\": () => (/* binding */ YBaseCell),\n/* harmony export */   \"YCodeCell\": () => (/* binding */ YCodeCell),\n/* harmony export */   \"YRawCell\": () => (/* binding */ YRawCell),\n/* harmony export */   \"YMarkdownCell\": () => (/* binding */ YMarkdownCell),\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\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/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var y_protocols_awareness__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! y-protocols/awareness */ \"../node_modules/y-protocols/awareness.js\");\n/* harmony import */ var yjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! yjs */ \"webpack/sharing/consume/default/yjs/yjs\");\n/* harmony import */ var yjs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(yjs__WEBPACK_IMPORTED_MODULE_3__);\n/* -----------------------------------------------------------------------------\n| Copyright (c) Jupyter Development Team.\n| Distributed under the terms of the Modified BSD License.\n|----------------------------------------------------------------------------*/\n\n\n\n\nconst deepCopy = (o) => JSON.parse(JSON.stringify(o));\nclass YDocument {\n    constructor() {\n        this.isDisposed = false;\n        this.ydoc = new yjs__WEBPACK_IMPORTED_MODULE_3__.Doc();\n        this.source = this.ydoc.getText('source');\n        this.ystate = this.ydoc.getMap('state');\n        this.undoManager = new yjs__WEBPACK_IMPORTED_MODULE_3__.UndoManager([this.source], {\n            trackedOrigins: new Set([this])\n        });\n        this.awareness = new y_protocols_awareness__WEBPACK_IMPORTED_MODULE_2__.Awareness(this.ydoc);\n        this._changed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__.Signal(this);\n    }\n    /**\n     * Perform a transaction. While the function f is called, all changes to the shared\n     * document are bundled into a single event.\n     */\n    transact(f, undoable = true) {\n        this.ydoc.transact(f, undoable ? this : null);\n    }\n    /**\n     * Dispose of the resources.\n     */\n    dispose() {\n        this.isDisposed = true;\n        this.ydoc.destroy();\n    }\n    /**\n     * Whether the object can undo changes.\n     */\n    canUndo() {\n        return this.undoManager.undoStack.length > 0;\n    }\n    /**\n     * Whether the object can redo changes.\n     */\n    canRedo() {\n        return this.undoManager.redoStack.length > 0;\n    }\n    /**\n     * Undo an operation.\n     */\n    undo() {\n        this.undoManager.undo();\n    }\n    /**\n     * Redo an operation.\n     */\n    redo() {\n        this.undoManager.redo();\n    }\n    /**\n     * Clear the change stack.\n     */\n    clearUndoHistory() {\n        this.undoManager.clear();\n    }\n    /**\n     * The changed signal.\n     */\n    get changed() {\n        return this._changed;\n    }\n}\nclass YFile extends YDocument {\n    constructor() {\n        super();\n        /**\n         * Handle a change to the ymodel.\n         */\n        this._modelObserver = (event) => {\n            const changes = {};\n            changes.sourceChange = event.changes.delta;\n            this._changed.emit(changes);\n        };\n        /**\n         * Handle a change to the ystate.\n         */\n        this._onStateChanged = (event) => {\n            const stateChange = [];\n            event.keysChanged.forEach(key => {\n                const change = event.changes.keys.get(key);\n                stateChange.push({\n                    name: key,\n                    oldValue: (change === null || change === void 0 ? void 0 : change.oldValue) ? change.oldValue : 0,\n                    newValue: this.ystate.get(key)\n                });\n            });\n            this._changed.emit({ stateChange });\n        };\n        this.ysource = this.ydoc.getText('source');\n        this.ysource.observe(this._modelObserver);\n        this.ystate.observe(this._onStateChanged);\n    }\n    /**\n     * Dispose of the resources.\n     */\n    dispose() {\n        this.ysource.unobserve(this._modelObserver);\n        this.ystate.unobserve(this._onStateChanged);\n    }\n    static create() {\n        return new YFile();\n    }\n    /**\n     * Gets cell's source.\n     *\n     * @returns Cell's source.\n     */\n    getSource() {\n        return this.ysource.toString();\n    }\n    /**\n     * Sets cell's source.\n     *\n     * @param value: New source.\n     */\n    setSource(value) {\n        this.transact(() => {\n            const ytext = this.ysource;\n            ytext.delete(0, ytext.length);\n            ytext.insert(0, value);\n        });\n    }\n    /**\n     * Replace content from `start' to `end` with `value`.\n     *\n     * @param start: The start index of the range to replace (inclusive).\n     *\n     * @param end: The end index of the range to replace (exclusive).\n     *\n     * @param value: New source (optional).\n     */\n    updateSource(start, end, value = '') {\n        this.transact(() => {\n            const ysource = this.ysource;\n            // insert and then delete.\n            // This ensures that the cursor position is adjusted after the replaced content.\n            ysource.insert(start, value);\n            ysource.delete(start + value.length, end - start);\n        });\n    }\n}\n/**\n * Shared implementation of the Shared Document types.\n *\n * Shared cells can be inserted into a SharedNotebook.\n * Shared cells only start emitting events when they are connected to a SharedNotebook.\n *\n * \"Standalone\" cells must not be inserted into a (Shared)Notebook.\n * Standalone cells emit events immediately after they have been created, but they must not\n * be included into a (Shared)Notebook.\n */\nclass YNotebook extends YDocument {\n    constructor() {\n        super();\n        /**\n         * Handle a change to the list of cells.\n         */\n        this._onYCellsChanged = (event) => {\n            // update the type⇔cell mapping by iterating through the added/removed types\n            event.changes.added.forEach(item => {\n                const type = item.content.type;\n                if (!this._ycellMapping.has(type)) {\n                    this._ycellMapping.set(type, createCellFromType(type));\n                }\n                const cell = this._ycellMapping.get(type);\n                cell._notebook = this;\n                cell._undoManager = this.undoManager;\n            });\n            event.changes.deleted.forEach(item => {\n                const type = item.content.type;\n                const model = this._ycellMapping.get(type);\n                if (model) {\n                    model.dispose();\n                    this._ycellMapping.delete(type);\n                }\n            });\n            let index = 0;\n            // this reflects the event.changes.delta, but replaces the content of delta.insert with ycells\n            const cellsChange = [];\n            event.changes.delta.forEach((d) => {\n                if (d.insert != null) {\n                    const insertedCells = d.insert.map((ycell) => this._ycellMapping.get(ycell));\n                    cellsChange.push({ insert: insertedCells });\n                    this.cells.splice(index, 0, ...insertedCells);\n                    index += d.insert.length;\n                }\n                else if (d.delete != null) {\n                    cellsChange.push(d);\n                    this.cells.splice(index, d.delete);\n                }\n                else if (d.retain != null) {\n                    cellsChange.push(d);\n                    index += d.retain;\n                }\n            });\n            this._changed.emit({\n                cellsChange: cellsChange\n            });\n        };\n        /**\n         * Handle a change to the ystate.\n         */\n        this._onStateChanged = (event) => {\n            const stateChange = [];\n            event.keysChanged.forEach(key => {\n                const change = event.changes.keys.get(key);\n                stateChange.push({\n                    name: key,\n                    oldValue: (change === null || change === void 0 ? void 0 : change.oldValue) ? change.oldValue : 0,\n                    newValue: this.ystate.get(key)\n                });\n            });\n            this._changed.emit({ stateChange });\n        };\n        this.ycells = this.ydoc.getArray('cells');\n        this.ymeta = this.ydoc.getMap('meta');\n        this.ymodel = this.ydoc.getMap('model');\n        this.undoManager = new yjs__WEBPACK_IMPORTED_MODULE_3__.UndoManager([this.ycells], {\n            trackedOrigins: new Set([this])\n        });\n        this._ycellMapping = new Map();\n        this.ycells.observe(this._onYCellsChanged);\n        this.cells = this.ycells.toArray().map(ycell => {\n            if (!this._ycellMapping.has(ycell)) {\n                this._ycellMapping.set(ycell, createCellFromType(ycell));\n            }\n            return this._ycellMapping.get(ycell);\n        });\n        this.ystate.observe(this._onStateChanged);\n    }\n    get nbformat() {\n        return this.ystate.get('nbformat');\n    }\n    set nbformat(value) {\n        this.transact(() => {\n            this.ystate.set('nbformat', value);\n        }, false);\n    }\n    get nbformat_minor() {\n        return this.ystate.get('nbformatMinor');\n    }\n    set nbformat_minor(value) {\n        this.transact(() => {\n            this.ystate.set('nbformatMinor', value);\n        }, false);\n    }\n    /**\n     * Dispose of the resources.\n     */\n    dispose() {\n        this.ycells.unobserve(this._onYCellsChanged);\n        this.ystate.unobserve(this._onStateChanged);\n    }\n    /**\n     * Get a shared cell by index.\n     *\n     * @param index: Cell's position.\n     *\n     * @returns The requested shared cell.\n     */\n    getCell(index) {\n        return this.cells[index];\n    }\n    /**\n     * Insert a shared cell into a specific position.\n     *\n     * @param index: Cell's position.\n     *\n     * @param cell: Cell to insert.\n     */\n    insertCell(index, cell) {\n        this.insertCells(index, [cell]);\n    }\n    /**\n     * Insert a list of shared cells into a specific position.\n     *\n     * @param index: Position to insert the cells.\n     *\n     * @param cells: Array of shared cells to insert.\n     */\n    insertCells(index, cells) {\n        cells.forEach(cell => {\n            this._ycellMapping.set(cell.ymodel, cell);\n            // cell.yawareness = this.yawareness;\n            // cell.yUndoManager = this.yUndoManager;\n        });\n        this.transact(() => {\n            this.ycells.insert(index, cells.map(cell => cell.ymodel));\n        });\n    }\n    /**\n     * Move a cell.\n     *\n     * @param fromIndex: Index of the cell to move.\n     *\n     * @param toIndex: New position of the cell.\n     */\n    moveCell(fromIndex, toIndex) {\n        this.transact(() => {\n            const fromCell = this.getCell(fromIndex).clone();\n            this.deleteCell(fromIndex);\n            this.insertCell(toIndex, fromCell);\n        });\n    }\n    /**\n     * Remove a cell.\n     *\n     * @param index: Index of the cell to remove.\n     */\n    deleteCell(index) {\n        this.deleteCellRange(index, index + 1);\n    }\n    /**\n     * Remove a range of cells.\n     *\n     * @param from: The start index of the range to remove (inclusive).\n     *\n     * @param to: The end index of the range to remove (exclusive).\n     */\n    deleteCellRange(from, to) {\n        this.transact(() => {\n            this.ycells.delete(from, to - from);\n        });\n    }\n    /**\n     * Returns the metadata associated with the notebook.\n     *\n     * @returns Notebook's metadata.\n     */\n    getMetadata() {\n        const meta = this.ymeta.get('metadata');\n        return meta ? deepCopy(meta) : { orig_nbformat: 1 };\n    }\n    /**\n     * Sets the metadata associated with the notebook.\n     *\n     * @param metadata: Notebook's metadata.\n     */\n    setMetadata(value) {\n        this.ymeta.set('metadata', deepCopy(value));\n    }\n    /**\n     * Updates the metadata associated with the notebook.\n     *\n     * @param value: Metadata's attribute to update.\n     */\n    updateMetadata(value) {\n        this.ymeta.set('metadata', Object.assign({}, this.getMetadata(), value));\n    }\n    /**\n     * Create a new YNotebook.\n     */\n    static create() {\n        return new YNotebook();\n    }\n}\n/**\n * Create a new shared cell given the type.\n */\nconst createCellFromType = (type) => {\n    switch (type.get('cell_type')) {\n        case 'code':\n            return new YCodeCell(type);\n        case 'markdown':\n            return new YMarkdownCell(type);\n        case 'raw':\n            return new YRawCell(type);\n        default:\n            throw new Error('Found unknown cell type');\n    }\n};\n/**\n * Create a new standalone cell given the type.\n */\nconst createStandaloneCell = (cellType, id) => {\n    switch (cellType) {\n        case 'markdown':\n            return YMarkdownCell.createStandalone(id);\n        case 'code':\n            return YCodeCell.createStandalone(id);\n        default:\n            // raw\n            return YRawCell.createStandalone(id);\n    }\n};\nclass YBaseCell {\n    constructor(ymodel) {\n        /**\n         * The notebook that this cell belongs to.\n         */\n        this._notebook = null;\n        /**\n         * Whether the cell is standalone or not.\n         *\n         * If the cell is standalone. It cannot be\n         * inserted into a YNotebook because the Yjs model is already\n         * attached to an anonymous Y.Doc instance.\n         */\n        this.isStandalone = false;\n        /**\n         * Handle a change to the ymodel.\n         */\n        this._modelObserver = (events) => {\n            const changes = {};\n            const sourceEvent = events.find(event => event.target === this.ymodel.get('source'));\n            if (sourceEvent) {\n                changes.sourceChange = sourceEvent.changes.delta;\n            }\n            const outputEvent = events.find(event => event.target === this.ymodel.get('outputs'));\n            if (outputEvent) {\n                changes.outputsChange = outputEvent.changes.delta;\n            }\n            const modelEvent = events.find(event => event.target === this.ymodel);\n            if (modelEvent && modelEvent.keysChanged.has('metadata')) {\n                const change = modelEvent.changes.keys.get('metadata');\n                changes.metadataChange = {\n                    oldValue: (change === null || change === void 0 ? void 0 : change.oldValue) ? change.oldValue : undefined,\n                    newValue: this.getMetadata()\n                };\n            }\n            if (modelEvent && modelEvent.keysChanged.has('execution_count')) {\n                const change = modelEvent.changes.keys.get('execution_count');\n                changes.executionCountChange = {\n                    oldValue: change.oldValue,\n                    newValue: this.ymodel.get('execution_count')\n                };\n            }\n            // The model allows us to replace the complete source with a new string. We express this in the Delta format\n            // as a replace of the complete string.\n            const ysource = this.ymodel.get('source');\n            if (modelEvent && modelEvent.keysChanged.has('source')) {\n                changes.sourceChange = [\n                    { delete: this._prevSourceLength },\n                    { insert: ysource.toString() }\n                ];\n            }\n            this._prevSourceLength = ysource.length;\n            this._changed.emit(changes);\n        };\n        this.isDisposed = false;\n        this._undoManager = null;\n        this._changed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_1__.Signal(this);\n        this.ymodel = ymodel;\n        const ysource = ymodel.get('source');\n        this._prevSourceLength = ysource ? ysource.length : 0;\n        this.ymodel.observeDeep(this._modelObserver);\n    }\n    get ysource() {\n        return this.ymodel.get('source');\n    }\n    get awareness() {\n        var _a;\n        return ((_a = this.notebook) === null || _a === void 0 ? void 0 : _a.awareness) || null;\n    }\n    /**\n     * Perform a transaction. While the function f is called, all changes to the shared\n     * document are bundled into a single event.\n     */\n    transact(f, undoable = true) {\n        this.notebook && undoable\n            ? this.notebook.transact(f)\n            : this.ymodel.doc.transact(f, this);\n    }\n    /**\n     * The notebook that this cell belongs to.\n     */\n    get undoManager() {\n        return this.notebook ? this.notebook.undoManager : this._undoManager;\n    }\n    /**\n     * Undo an operation.\n     */\n    undo() {\n        var _a;\n        (_a = this.undoManager) === null || _a === void 0 ? void 0 : _a.undo();\n    }\n    /**\n     * Redo an operation.\n     */\n    redo() {\n        var _a;\n        (_a = this.undoManager) === null || _a === void 0 ? void 0 : _a.redo();\n    }\n    /**\n     * Whether the object can undo changes.\n     */\n    canUndo() {\n        return !!this.undoManager && this.undoManager.undoStack.length > 0;\n    }\n    /**\n     * Whether the object can redo changes.\n     */\n    canRedo() {\n        return !!this.undoManager && this.undoManager.redoStack.length > 0;\n    }\n    /**\n     * Clear the change stack.\n     */\n    clearUndoHistory() {\n        var _a;\n        (_a = this.undoManager) === null || _a === void 0 ? void 0 : _a.clear();\n    }\n    /**\n     * The notebook that this cell belongs to.\n     */\n    get notebook() {\n        return this._notebook;\n    }\n    /**\n     * Create a new YRawCell that can be inserted into a YNotebook\n     */\n    static create(id = _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.UUID.uuid4()) {\n        const ymodel = new yjs__WEBPACK_IMPORTED_MODULE_3__.Map();\n        const ysource = new yjs__WEBPACK_IMPORTED_MODULE_3__.Text();\n        ymodel.set('source', ysource);\n        ymodel.set('metadata', {});\n        ymodel.set('cell_type', this.prototype.cell_type);\n        ymodel.set('id', id);\n        return new this(ymodel);\n    }\n    /**\n     * Create a new YRawCell that works standalone. It cannot be\n     * inserted into a YNotebook because the Yjs model is already\n     * attached to an anonymous Y.Doc instance.\n     */\n    static createStandalone(id) {\n        const cell = this.create(id);\n        cell.isStandalone = true;\n        new yjs__WEBPACK_IMPORTED_MODULE_3__.Doc().getArray().insert(0, [cell.ymodel]);\n        cell._undoManager = new yjs__WEBPACK_IMPORTED_MODULE_3__.UndoManager([cell.ymodel], {\n            trackedOrigins: new Set([cell])\n        });\n        return cell;\n    }\n    /**\n     * Clone the cell.\n     *\n     * @todo clone should only be available in the specific implementations i.e. ISharedCodeCell\n     */\n    clone() {\n        const ymodel = new yjs__WEBPACK_IMPORTED_MODULE_3__.Map();\n        const ysource = new yjs__WEBPACK_IMPORTED_MODULE_3__.Text(this.getSource());\n        ymodel.set('source', ysource);\n        ymodel.set('metadata', this.getMetadata());\n        ymodel.set('cell_type', this.cell_type);\n        ymodel.set('id', this.getId());\n        const Self = this.constructor;\n        return new Self(ymodel);\n    }\n    /**\n     * The changed signal.\n     */\n    get changed() {\n        return this._changed;\n    }\n    /**\n     * Dispose of the resources.\n     */\n    dispose() {\n        this.ymodel.unobserveDeep(this._modelObserver);\n    }\n    /**\n     * Gets the cell attachments.\n     *\n     * @returns The cell attachments.\n     */\n    getAttachments() {\n        return this.ymodel.get('attachments');\n    }\n    /**\n     * Sets the cell attachments\n     *\n     * @param attachments: The cell attachments.\n     */\n    setAttachments(attachments) {\n        this.transact(() => {\n            if (attachments == null) {\n                this.ymodel.set('attachments', attachments);\n            }\n            else {\n                this.ymodel.delete('attachments');\n            }\n        });\n    }\n    /**\n     * Get cell id.\n     *\n     * @returns Cell id\n     */\n    getId() {\n        return this.ymodel.get('id');\n    }\n    /**\n     * Gets cell's source.\n     *\n     * @returns Cell's source.\n     */\n    getSource() {\n        return this.ymodel.get('source').toString();\n    }\n    /**\n     * Sets cell's source.\n     *\n     * @param value: New source.\n     */\n    setSource(value) {\n        const ytext = this.ymodel.get('source');\n        this.transact(() => {\n            ytext.delete(0, ytext.length);\n            ytext.insert(0, value);\n        });\n        // @todo Do we need proper replace semantic? This leads to issues in editor bindings because they don't switch source.\n        // this.ymodel.set('source', new Y.Text(value));\n    }\n    /**\n     * Replace content from `start' to `end` with `value`.\n     *\n     * @param start: The start index of the range to replace (inclusive).\n     *\n     * @param end: The end index of the range to replace (exclusive).\n     *\n     * @param value: New source (optional).\n     */\n    updateSource(start, end, value = '') {\n        this.transact(() => {\n            const ysource = this.ysource;\n            // insert and then delete.\n            // This ensures that the cursor position is adjusted after the replaced content.\n            ysource.insert(start, value);\n            ysource.delete(start + value.length, end - start);\n        });\n    }\n    /**\n     * The type of the cell.\n     */\n    get cell_type() {\n        throw new Error('A YBaseCell must not be constructed');\n    }\n    /**\n     * Returns the metadata associated with the notebook.\n     *\n     * @returns Notebook's metadata.\n     */\n    getMetadata() {\n        return deepCopy(this.ymodel.get('metadata'));\n    }\n    /**\n     * Sets the metadata associated with the notebook.\n     *\n     * @param metadata: Notebook's metadata.\n     */\n    setMetadata(value) {\n        this.transact(() => {\n            this.ymodel.set('metadata', deepCopy(value));\n        });\n    }\n    /**\n     * Serialize the model to JSON.\n     */\n    toJSON() {\n        return {\n            id: this.getId(),\n            cell_type: this.cell_type,\n            source: this.getSource(),\n            metadata: this.getMetadata()\n        };\n    }\n}\nclass YCodeCell extends YBaseCell {\n    /**\n     * The type of the cell.\n     */\n    get cell_type() {\n        return 'code';\n    }\n    /**\n     * The code cell's prompt number. Will be null if the cell has not been run.\n     */\n    get execution_count() {\n        return this.ymodel.get('execution_count');\n    }\n    /**\n     * The code cell's prompt number. Will be null if the cell has not been run.\n     */\n    set execution_count(count) {\n        this.transact(() => {\n            this.ymodel.set('execution_count', count);\n        });\n    }\n    /**\n     * Execution, display, or stream outputs.\n     */\n    getOutputs() {\n        return deepCopy(this.ymodel.get('outputs').toArray());\n    }\n    /**\n     * Replace all outputs.\n     */\n    setOutputs(outputs) {\n        const youtputs = this.ymodel.get('outputs');\n        this.transact(() => {\n            youtputs.delete(0, youtputs.length);\n            youtputs.insert(0, outputs);\n        }, false);\n    }\n    /**\n     * Replace content from `start' to `end` with `outputs`.\n     *\n     * @param start: The start index of the range to replace (inclusive).\n     *\n     * @param end: The end index of the range to replace (exclusive).\n     *\n     * @param outputs: New outputs (optional).\n     */\n    updateOutputs(start, end, outputs = []) {\n        const youtputs = this.ymodel.get('outputs');\n        const fin = end < youtputs.length ? end - start : youtputs.length - start;\n        this.transact(() => {\n            youtputs.delete(start, fin);\n            youtputs.insert(start, outputs);\n        }, false);\n    }\n    /**\n     * Create a new YCodeCell that can be inserted into a YNotebook\n     */\n    static create(id) {\n        const cell = super.create(id);\n        cell.ymodel.set('execution_count', 0); // for some default value\n        cell.ymodel.set('outputs', new yjs__WEBPACK_IMPORTED_MODULE_3__.Array());\n        return cell;\n    }\n    /**\n     * Create a new YCodeCell that works standalone. It cannot be\n     * inserted into a YNotebook because the Yjs model is already\n     * attached to an anonymous Y.Doc instance.\n     */\n    static createStandalone(id) {\n        const cell = super.createStandalone(id);\n        cell.ymodel.set('execution_count', null); // for some default value\n        cell.ymodel.set('outputs', new yjs__WEBPACK_IMPORTED_MODULE_3__.Array());\n        return cell;\n    }\n    /**\n     * Create a new YCodeCell that can be inserted into a YNotebook\n     *\n     * @todo clone should only be available in the specific implementations i.e. ISharedCodeCell\n     */\n    clone() {\n        const cell = super.clone();\n        const youtputs = new yjs__WEBPACK_IMPORTED_MODULE_3__.Array();\n        youtputs.insert(0, this.getOutputs());\n        cell.ymodel.set('execution_count', this.execution_count); // for some default value\n        cell.ymodel.set('outputs', youtputs);\n        return cell;\n    }\n    /**\n     * Serialize the model to JSON.\n     */\n    toJSON() {\n        return {\n            id: this.getId(),\n            cell_type: 'code',\n            source: this.getSource(),\n            metadata: this.getMetadata(),\n            outputs: this.getOutputs(),\n            execution_count: this.execution_count\n        };\n    }\n}\nclass YRawCell extends YBaseCell {\n    /**\n     * Create a new YRawCell that can be inserted into a YNotebook\n     */\n    static create(id) {\n        return super.create(id);\n    }\n    /**\n     * Create a new YRawCell that works standalone. It cannot be\n     * inserted into a YNotebook because the Yjs model is already\n     * attached to an anonymous Y.Doc instance.\n     */\n    static createStandalone(id) {\n        return super.createStandalone(id);\n    }\n    /**\n     * String identifying the type of cell.\n     */\n    get cell_type() {\n        return 'raw';\n    }\n    /**\n     * Serialize the model to JSON.\n     */\n    toJSON() {\n        return {\n            id: this.getId(),\n            cell_type: 'raw',\n            source: this.getSource(),\n            metadata: this.getMetadata(),\n            attachments: this.getAttachments()\n        };\n    }\n}\nclass YMarkdownCell extends YBaseCell {\n    /**\n     * Create a new YMarkdownCell that can be inserted into a YNotebook\n     */\n    static create(id) {\n        return super.create(id);\n    }\n    /**\n     * Create a new YMarkdownCell that works standalone. It cannot be\n     * inserted into a YNotebook because the Yjs model is already\n     * attached to an anonymous Y.Doc instance.\n     */\n    static createStandalone(id) {\n        return super.createStandalone(id);\n    }\n    /**\n     * String identifying the type of cell.\n     */\n    get cell_type() {\n        return 'markdown';\n    }\n    /**\n     * Serialize the model to JSON.\n     */\n    toJSON() {\n        return {\n            id: this.getId(),\n            cell_type: 'markdown',\n            source: this.getSource(),\n            metadata: this.getMetadata(),\n            attachments: this.getAttachments()\n        };\n    }\n}\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (YNotebook);\n//# sourceMappingURL=ymodels.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/shared-models/lib/ymodels.js?");

/***/ })

}]);