"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_docregistry_lib_index_js"],{

/***/ "../node_modules/@jupyterlab/docregistry/lib/components.js":
/*!*****************************************************************!*\
  !*** ../node_modules/@jupyterlab/docregistry/lib/components.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 */   createReadonlyLabel: () => (/* binding */ createReadonlyLabel)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/*\n * Copyright (c) Jupyter Development Team.\n * Distributed under the terms of the Modified BSD License.\n */\n\n\n\n/**\n * create readonly label toolbar item\n */\nfunction createReadonlyLabel(panel, translator) {\n    var _a;\n    let trans = (translator !== null && translator !== void 0 ? translator : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator).load('jupyterlab');\n    return _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.ReactWidget.create(react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"div\", null,\n        react__WEBPACK_IMPORTED_MODULE_2__.createElement(\"span\", { className: \"jp-ToolbarLabelComponent\", title: trans.__(`Document is read-only. \"Save\" is disabled; use \"Save as…\" instead`) }, trans.__(`%1 is read-only`, (_a = panel.context.contentsModel) === null || _a === void 0 ? void 0 : _a.type))));\n}\n//# sourceMappingURL=components.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docregistry/lib/components.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/docregistry/lib/context.js":
/*!**************************************************************!*\
  !*** ../node_modules/@jupyterlab/docregistry/lib/context.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 */   Context: () => (/* binding */ Context)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__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/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/rendermime */ \"webpack/sharing/consume/default/@jupyterlab/rendermime/@jupyterlab/rendermime\");\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__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_disposable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/disposable */ \"webpack/sharing/consume/default/@lumino/disposable/@lumino/disposable\");\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_disposable__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_7__);\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 * An implementation of a document context.\n *\n * This class is typically instantiated by the document manager.\n */\nclass Context {\n    /**\n     * Construct a new document context.\n     */\n    constructor(options) {\n        var _a, _b;\n        this._isReady = false;\n        this._isDisposed = false;\n        this._isPopulated = false;\n        this._path = '';\n        this._lineEnding = null;\n        this._contentsModel = null;\n        this._populatedPromise = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_4__.PromiseDelegate();\n        this._pathChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_6__.Signal(this);\n        this._fileChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_6__.Signal(this);\n        this._saveState = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_6__.Signal(this);\n        this._disposed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_6__.Signal(this);\n        this._lastModifiedCheckMargin = 500;\n        this._conflictModalIsOpen = false;\n        const manager = (this._manager = options.manager);\n        this.translator = options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__.nullTranslator;\n        this._trans = this.translator.load('jupyterlab');\n        this._factory = options.factory;\n        this._dialogs =\n            (_a = options.sessionDialogs) !== null && _a !== void 0 ? _a : new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.SessionContextDialogs({ translator: options.translator });\n        this._opener = options.opener || Private.noOp;\n        this._path = this._manager.contents.normalize(options.path);\n        this._lastModifiedCheckMargin = options.lastModifiedCheckMargin || 500;\n        const localPath = this._manager.contents.localPath(this._path);\n        const lang = this._factory.preferredLanguage(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(localPath));\n        const sharedFactory = this._manager.contents.getSharedModelFactory(this._path);\n        const sharedModel = sharedFactory === null || sharedFactory === void 0 ? void 0 : sharedFactory.createNew({\n            path: localPath,\n            format: this._factory.fileFormat,\n            contentType: this._factory.contentType,\n            collaborative: this._factory.collaborative\n        });\n        this._model = this._factory.createNew({\n            languagePreference: lang,\n            sharedModel,\n            collaborationEnabled: (_b = sharedFactory === null || sharedFactory === void 0 ? void 0 : sharedFactory.collaborative) !== null && _b !== void 0 ? _b : false\n        });\n        this._readyPromise = manager.ready.then(() => {\n            return this._populatedPromise.promise;\n        });\n        const ext = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.extname(this._path);\n        this.sessionContext = new _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.SessionContext({\n            sessionManager: manager.sessions,\n            specsManager: manager.kernelspecs,\n            path: localPath,\n            type: ext === '.ipynb' ? 'notebook' : 'file',\n            name: _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(localPath),\n            kernelPreference: options.kernelPreference || { shouldStart: false },\n            setBusy: options.setBusy\n        });\n        this.sessionContext.propertyChanged.connect(this._onSessionChanged, this);\n        manager.contents.fileChanged.connect(this._onFileChanged, this);\n        this.urlResolver = new _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_2__.RenderMimeRegistry.UrlResolver({\n            path: this._path,\n            contents: manager.contents\n        });\n    }\n    /**\n     * A signal emitted when the path changes.\n     */\n    get pathChanged() {\n        return this._pathChanged;\n    }\n    /**\n     * A signal emitted when the model is saved or reverted.\n     */\n    get fileChanged() {\n        return this._fileChanged;\n    }\n    /**\n     * A signal emitted on the start and end of a saving operation.\n     */\n    get saveState() {\n        return this._saveState;\n    }\n    /**\n     * A signal emitted when the context is disposed.\n     */\n    get disposed() {\n        return this._disposed;\n    }\n    /**\n     * Configurable margin used to detect document modification conflicts, in milliseconds\n     */\n    get lastModifiedCheckMargin() {\n        return this._lastModifiedCheckMargin;\n    }\n    set lastModifiedCheckMargin(value) {\n        this._lastModifiedCheckMargin = value;\n    }\n    /**\n     * Get the model associated with the document.\n     */\n    get model() {\n        return this._model;\n    }\n    /**\n     * The current path associated with the document.\n     */\n    get path() {\n        return this._path;\n    }\n    /**\n     * The current local path associated with the document.\n     * If the document is in the default notebook file browser,\n     * this is the same as the path.\n     */\n    get localPath() {\n        return this._manager.contents.localPath(this._path);\n    }\n    /**\n     * The document metadata, stored as a services contents model.\n     *\n     * #### Notes\n     * The contents model will be `null` until the context is populated.\n     * It will not have a `content` field.\n     */\n    get contentsModel() {\n        return this._contentsModel ? { ...this._contentsModel } : null;\n    }\n    /**\n     * Get the model factory name.\n     *\n     * #### Notes\n     * This is not part of the `IContext` API.\n     */\n    get factoryName() {\n        return this.isDisposed ? '' : this._factory.name;\n    }\n    /**\n     * Test whether the context is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources held by the context.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        this.sessionContext.dispose();\n        this._model.dispose();\n        // Ensure we dispose the `sharedModel` as it may have been generated in the context\n        // through the shared model factory.\n        this._model.sharedModel.dispose();\n        this._disposed.emit(void 0);\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_6__.Signal.clearData(this);\n    }\n    /**\n     * Whether the context is ready.\n     */\n    get isReady() {\n        return this._isReady;\n    }\n    /**\n     * A promise that is fulfilled when the context is ready.\n     */\n    get ready() {\n        return this._readyPromise;\n    }\n    /**\n     * Whether the document can be saved via the Contents API.\n     */\n    get canSave() {\n        var _a;\n        return !!(((_a = this._contentsModel) === null || _a === void 0 ? void 0 : _a.writable) && !this._model.collaborative);\n    }\n    /**\n     * Initialize the context.\n     *\n     * @param isNew - Whether it is a new file.\n     *\n     * @returns a promise that resolves upon initialization.\n     */\n    async initialize(isNew) {\n        if (isNew) {\n            await this._save();\n        }\n        else {\n            await this._revert();\n        }\n        this.model.sharedModel.clearUndoHistory();\n    }\n    /**\n     * Rename the document.\n     *\n     * @param newName - the new name for the document.\n     */\n    rename(newName) {\n        return this.ready.then(() => {\n            return this._manager.ready.then(() => {\n                return this._rename(newName);\n            });\n        });\n    }\n    /**\n     * Save the document contents to disk.\n     */\n    async save() {\n        await this.ready;\n        await this._save();\n    }\n    /**\n     * Save the document to a different path chosen by the user.\n     *\n     * It will be rejected if the user abort providing a new path.\n     */\n    async saveAs() {\n        await this.ready;\n        const localPath = this._manager.contents.localPath(this.path);\n        const newLocalPath = await Private.getSavePath(localPath);\n        if (this.isDisposed || !newLocalPath) {\n            return;\n        }\n        const drive = this._manager.contents.driveName(this.path);\n        const newPath = drive == '' ? newLocalPath : `${drive}:${newLocalPath}`;\n        if (newPath === this._path) {\n            return this.save();\n        }\n        // Make sure the path does not exist.\n        try {\n            await this._manager.ready;\n            await this._manager.contents.get(newPath);\n            await this._maybeOverWrite(newPath);\n        }\n        catch (err) {\n            if (!err.response || err.response.status !== 404) {\n                throw err;\n            }\n            await this._finishSaveAs(newPath);\n        }\n    }\n    /**\n     * Download a file.\n     *\n     * @returns A promise which resolves when the file has begun\n     *   downloading.\n     */\n    async download() {\n        const url = await this._manager.contents.getDownloadUrl(this._path);\n        const element = document.createElement('a');\n        element.href = url;\n        element.download = '';\n        document.body.appendChild(element);\n        element.click();\n        document.body.removeChild(element);\n        return void 0;\n    }\n    /**\n     * Revert the document contents to disk contents.\n     */\n    async revert() {\n        await this.ready;\n        await this._revert();\n    }\n    /**\n     * Create a checkpoint for the file.\n     */\n    createCheckpoint() {\n        const contents = this._manager.contents;\n        return this._manager.ready.then(() => {\n            return contents.createCheckpoint(this._path);\n        });\n    }\n    /**\n     * Delete a checkpoint for the file.\n     */\n    deleteCheckpoint(checkpointId) {\n        const contents = this._manager.contents;\n        return this._manager.ready.then(() => {\n            return contents.deleteCheckpoint(this._path, checkpointId);\n        });\n    }\n    /**\n     * Restore the file to a known checkpoint state.\n     */\n    restoreCheckpoint(checkpointId) {\n        const contents = this._manager.contents;\n        const path = this._path;\n        return this._manager.ready.then(() => {\n            if (checkpointId) {\n                return contents.restoreCheckpoint(path, checkpointId);\n            }\n            return this.listCheckpoints().then(checkpoints => {\n                if (this.isDisposed || !checkpoints.length) {\n                    return;\n                }\n                checkpointId = checkpoints[checkpoints.length - 1].id;\n                return contents.restoreCheckpoint(path, checkpointId);\n            });\n        });\n    }\n    /**\n     * List available checkpoints for a file.\n     */\n    listCheckpoints() {\n        const contents = this._manager.contents;\n        return this._manager.ready.then(() => {\n            return contents.listCheckpoints(this._path);\n        });\n    }\n    /**\n     * Add a sibling widget to the document manager.\n     *\n     * @param widget - The widget to add to the document manager.\n     *\n     * @param options - The desired options for adding the sibling.\n     *\n     * @returns A disposable used to remove the sibling if desired.\n     *\n     * #### Notes\n     * It is assumed that the widget has the same model and context\n     * as the original widget.\n     */\n    addSibling(widget, options = {}) {\n        const opener = this._opener;\n        if (opener) {\n            opener(widget, options);\n        }\n        return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_5__.DisposableDelegate(() => {\n            widget.close();\n        });\n    }\n    /**\n     * Handle a change on the contents manager.\n     */\n    _onFileChanged(sender, change) {\n        var _a;\n        if (change.type !== 'rename') {\n            return;\n        }\n        let oldPath = change.oldValue && change.oldValue.path;\n        let newPath = change.newValue && change.newValue.path;\n        if (newPath && this._path.indexOf(oldPath || '') === 0) {\n            let changeModel = change.newValue;\n            // When folder name changed, `oldPath` is `foo`, `newPath` is `bar` and `this._path` is `foo/test`,\n            // we should update `foo/test` to `bar/test` as well\n            if (oldPath !== this._path) {\n                newPath = this._path.replace(new RegExp(`^${oldPath}/`), `${newPath}/`);\n                oldPath = this._path;\n                // Update client file model from folder change\n                changeModel = {\n                    last_modified: (_a = change.newValue) === null || _a === void 0 ? void 0 : _a.created,\n                    path: newPath\n                };\n            }\n            this._updateContentsModel({\n                ...this._contentsModel,\n                ...changeModel\n            });\n            this._updatePath(newPath);\n        }\n    }\n    /**\n     * Handle a change to a session property.\n     */\n    _onSessionChanged(sender, type) {\n        if (type !== 'path') {\n            return;\n        }\n        // The session uses local paths.\n        // We need to convert it to a global path.\n        const driveName = this._manager.contents.driveName(this.path);\n        let newPath = this.sessionContext.session.path;\n        if (driveName) {\n            newPath = `${driveName}:${newPath}`;\n        }\n        this._updatePath(newPath);\n    }\n    /**\n     * Update our contents model, without the content.\n     */\n    _updateContentsModel(model) {\n        var _a, _b, _c, _d;\n        const writable = model.writable && !this._model.collaborative;\n        const newModel = {\n            path: model.path,\n            name: model.name,\n            type: model.type,\n            writable,\n            created: model.created,\n            last_modified: model.last_modified,\n            mimetype: model.mimetype,\n            format: model.format,\n            hash: model.hash,\n            hash_algorithm: model.hash_algorithm\n        };\n        const mod = (_b = (_a = this._contentsModel) === null || _a === void 0 ? void 0 : _a.last_modified) !== null && _b !== void 0 ? _b : null;\n        const hash = (_d = (_c = this._contentsModel) === null || _c === void 0 ? void 0 : _c.hash) !== null && _d !== void 0 ? _d : null;\n        this._contentsModel = newModel;\n        if (\n        // If neither modification date nor hash available, assume the file has changed\n        (!mod && !hash) ||\n            // Compare last_modified if no hash\n            (!hash && newModel.last_modified !== mod) ||\n            // Compare hash if available\n            (hash && newModel.hash !== hash)) {\n            this._fileChanged.emit(newModel);\n        }\n    }\n    _updatePath(newPath) {\n        var _a, _b, _c, _d;\n        if (this._path === newPath) {\n            return;\n        }\n        this._path = newPath;\n        const localPath = this._manager.contents.localPath(newPath);\n        const name = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(localPath);\n        if (((_a = this.sessionContext.session) === null || _a === void 0 ? void 0 : _a.path) !== localPath) {\n            void ((_b = this.sessionContext.session) === null || _b === void 0 ? void 0 : _b.setPath(localPath));\n        }\n        if (((_c = this.sessionContext.session) === null || _c === void 0 ? void 0 : _c.name) !== name) {\n            void ((_d = this.sessionContext.session) === null || _d === void 0 ? void 0 : _d.setName(name));\n        }\n        if (this.urlResolver.path !== newPath) {\n            this.urlResolver.path = newPath;\n        }\n        if (this._contentsModel &&\n            (this._contentsModel.path !== newPath ||\n                this._contentsModel.name !== name)) {\n            const contentsModel = {\n                ...this._contentsModel,\n                name: name,\n                path: newPath\n            };\n            this._updateContentsModel(contentsModel);\n        }\n        this._pathChanged.emit(newPath);\n    }\n    /**\n     * Handle an initial population.\n     */\n    async _populate() {\n        this._isPopulated = true;\n        this._isReady = true;\n        this._populatedPromise.resolve(void 0);\n        // Add a checkpoint if none exists and the file is writable.\n        await this._maybeCheckpoint(false);\n        if (this.isDisposed) {\n            return;\n        }\n        // Update the kernel preference.\n        const name = this._model.defaultKernelName ||\n            this.sessionContext.kernelPreference.name;\n        this.sessionContext.kernelPreference = {\n            ...this.sessionContext.kernelPreference,\n            name,\n            language: this._model.defaultKernelLanguage\n        };\n        // Note: we don't wait on the session to initialize\n        // so that the user can be shown the content before\n        // any kernel has started.\n        void this.sessionContext.initialize().then(shouldSelect => {\n            if (shouldSelect) {\n                void this._dialogs.selectKernel(this.sessionContext);\n            }\n        });\n    }\n    /**\n     * Rename the document.\n     *\n     * @param newName - the new name for the document.\n     */\n    async _rename(newName) {\n        const splitPath = this.localPath.split('/');\n        splitPath[splitPath.length - 1] = newName;\n        let newPath = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.join(...splitPath);\n        const driveName = this._manager.contents.driveName(this.path);\n        if (driveName) {\n            newPath = `${driveName}:${newPath}`;\n        }\n        // rename triggers a fileChanged which updates the contents model\n        await this._manager.contents.rename(this.path, newPath);\n    }\n    /**\n     * Save the document contents to disk.\n     */\n    async _save() {\n        this._saveState.emit('started');\n        const options = this._createSaveOptions();\n        try {\n            await this._manager.ready;\n            const value = await this._maybeSave(options);\n            if (this.isDisposed) {\n                return;\n            }\n            this._model.dirty = false;\n            this._updateContentsModel(value);\n            if (!this._isPopulated) {\n                await this._populate();\n            }\n            // Emit completion.\n            this._saveState.emit('completed');\n        }\n        catch (err) {\n            // If the save has been canceled by the user, throw the error\n            // so that whoever called save() can decide what to do.\n            const { name } = err;\n            if (name === 'ModalCancelError' || name === 'ModalDuplicateError') {\n                throw err;\n            }\n            // Otherwise show an error message and throw the error.\n            const localPath = this._manager.contents.localPath(this._path);\n            const file = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(localPath);\n            void this._handleError(err, this._trans.__('File Save Error for %1', file));\n            // Emit failure.\n            this._saveState.emit('failed');\n            throw err;\n        }\n    }\n    /**\n     * Revert the document contents to disk contents.\n     *\n     * @param initializeModel - call the model's initialization function after\n     * deserializing the content.\n     */\n    _revert(initializeModel = false) {\n        const opts = {\n            type: this._factory.contentType,\n            content: this._factory.fileFormat !== null,\n            hash: this._factory.fileFormat !== null,\n            ...(this._factory.fileFormat !== null\n                ? { format: this._factory.fileFormat }\n                : {})\n        };\n        const path = this._path;\n        const model = this._model;\n        return this._manager.ready\n            .then(() => {\n            return this._manager.contents.get(path, opts);\n        })\n            .then(contents => {\n            if (this.isDisposed) {\n                return;\n            }\n            if (contents.content) {\n                if (contents.format === 'json') {\n                    model.fromJSON(contents.content);\n                }\n                else {\n                    let content = contents.content;\n                    // Convert line endings if necessary, marking the file\n                    // as dirty.\n                    if (content.indexOf('\\r\\n') !== -1) {\n                        this._lineEnding = '\\r\\n';\n                        content = content.replace(/\\r\\n/g, '\\n');\n                    }\n                    else if (content.indexOf('\\r') !== -1) {\n                        this._lineEnding = '\\r';\n                        content = content.replace(/\\r/g, '\\n');\n                    }\n                    else {\n                        this._lineEnding = null;\n                    }\n                    model.fromString(content);\n                }\n            }\n            this._updateContentsModel(contents);\n            model.dirty = false;\n            if (!this._isPopulated) {\n                return this._populate();\n            }\n        })\n            .catch(async (err) => {\n            const localPath = this._manager.contents.localPath(this._path);\n            const name = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(localPath);\n            void this._handleError(err, this._trans.__('File Load Error for %1', name));\n            throw err;\n        });\n    }\n    /**\n     * Save a file, dealing with conflicts.\n     */\n    _maybeSave(options) {\n        const path = this._path;\n        // Make sure the file has not changed on disk.\n        const promise = this._manager.contents.get(path, {\n            content: false,\n            hash: true\n        });\n        return promise.then(model => {\n            var _a, _b, _c, _d;\n            if (this.isDisposed) {\n                return Promise.reject(new Error('Disposed'));\n            }\n            // Since jupyter server may provide hash in model, we compare hash first\n            const hashAvailable = ((_a = this.contentsModel) === null || _a === void 0 ? void 0 : _a.hash) !== undefined &&\n                ((_b = this.contentsModel) === null || _b === void 0 ? void 0 : _b.hash) !== null &&\n                model.hash !== undefined &&\n                model.hash !== null;\n            const hClient = (_c = this.contentsModel) === null || _c === void 0 ? void 0 : _c.hash;\n            const hDisk = model.hash;\n            if (hashAvailable && hClient !== hDisk) {\n                console.warn(`Different hash found for ${this.path}`);\n                return this._raiseConflict(model, options);\n            }\n            // When hash is not provided, we compare last_modified\n            // We want to check last_modified (disk) > last_modified (client)\n            // (our last save)\n            // In some cases the filesystem reports an inconsistent time, so we allow buffer when comparing.\n            const lastModifiedCheckMargin = this._lastModifiedCheckMargin;\n            const modified = (_d = this.contentsModel) === null || _d === void 0 ? void 0 : _d.last_modified;\n            const tClient = modified ? new Date(modified) : new Date();\n            const tDisk = new Date(model.last_modified);\n            if (!hashAvailable &&\n                modified &&\n                tDisk.getTime() - tClient.getTime() > lastModifiedCheckMargin) {\n                console.warn(`Last saving performed ${tClient} ` +\n                    `while the current file seems to have been saved ` +\n                    `${tDisk}`);\n                return this._raiseConflict(model, options);\n            }\n            return this._manager.contents\n                .save(path, options)\n                .then(async (contentsModel) => {\n                const model = await this._manager.contents.get(path, {\n                    content: false,\n                    hash: true\n                });\n                return {\n                    ...contentsModel,\n                    hash: model.hash,\n                    hash_algorithm: model.hash_algorithm\n                };\n            });\n        }, err => {\n            if (err.response && err.response.status === 404) {\n                return this._manager.contents\n                    .save(path, options)\n                    .then(async (contentsModel) => {\n                    const model = await this._manager.contents.get(path, {\n                        content: false,\n                        hash: true\n                    });\n                    return {\n                        ...contentsModel,\n                        hash: model.hash,\n                        hash_algorithm: model.hash_algorithm\n                    };\n                });\n            }\n            throw err;\n        });\n    }\n    /**\n     * Handle a save/load error with a dialog.\n     */\n    async _handleError(err, title) {\n        await (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showErrorMessage)(title, err);\n        return;\n    }\n    /**\n     * Add a checkpoint the file is writable.\n     */\n    _maybeCheckpoint(force) {\n        let promise = Promise.resolve(void 0);\n        if (!this.canSave) {\n            return promise;\n        }\n        if (force) {\n            promise = this.createCheckpoint().then( /* no-op */);\n        }\n        else {\n            promise = this.listCheckpoints().then(checkpoints => {\n                if (!this.isDisposed && !checkpoints.length && this.canSave) {\n                    return this.createCheckpoint().then( /* no-op */);\n                }\n            });\n        }\n        return promise.catch(err => {\n            // Handle a read-only folder.\n            if (!err.response || err.response.status !== 403) {\n                throw err;\n            }\n        });\n    }\n    /**\n     * Handle a time conflict.\n     */\n    _raiseConflict(model, options) {\n        if (this._conflictModalIsOpen) {\n            const error = new Error('Modal is already displayed');\n            error.name = 'ModalDuplicateError';\n            return Promise.reject(error);\n        }\n        const body = this._trans.__(`\"%1\" has changed on disk since the last time it was opened or saved.\nDo you want to overwrite the file on disk with the version open here,\nor load the version on disk (revert)?`, this.path);\n        const revertBtn = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.okButton({\n            label: this._trans.__('Revert'),\n            actions: ['revert']\n        });\n        const overwriteBtn = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.warnButton({\n            label: this._trans.__('Overwrite'),\n            actions: ['overwrite']\n        });\n        this._conflictModalIsOpen = true;\n        return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showDialog)({\n            title: this._trans.__('File Changed'),\n            body,\n            buttons: [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.cancelButton(), revertBtn, overwriteBtn]\n        }).then(result => {\n            this._conflictModalIsOpen = false;\n            if (this.isDisposed) {\n                return Promise.reject(new Error('Disposed'));\n            }\n            if (result.button.actions.includes('overwrite')) {\n                return this._manager.contents.save(this._path, options);\n            }\n            if (result.button.actions.includes('revert')) {\n                return this.revert().then(() => {\n                    return model;\n                });\n            }\n            const error = new Error('Cancel');\n            error.name = 'ModalCancelError';\n            return Promise.reject(error); // Otherwise cancel the save.\n        });\n    }\n    /**\n     * Handle a time conflict.\n     */\n    _maybeOverWrite(path) {\n        const body = this._trans.__('\"%1\" already exists. Do you want to replace it?', path);\n        const overwriteBtn = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.warnButton({\n            label: this._trans.__('Overwrite'),\n            accept: true\n        });\n        return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showDialog)({\n            title: this._trans.__('File Overwrite?'),\n            body,\n            buttons: [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.cancelButton(), overwriteBtn]\n        }).then(result => {\n            if (this.isDisposed) {\n                return Promise.reject(new Error('Disposed'));\n            }\n            if (result.button.accept) {\n                return this._manager.contents.delete(path).then(() => {\n                    return this._finishSaveAs(path);\n                });\n            }\n        });\n    }\n    /**\n     * Finish a saveAs operation given a new path.\n     */\n    async _finishSaveAs(newPath) {\n        this._saveState.emit('started');\n        try {\n            await this._manager.ready;\n            const options = this._createSaveOptions();\n            await this._manager.contents.save(newPath, options);\n            await this._maybeCheckpoint(true);\n            // Emit completion.\n            this._saveState.emit('completed');\n        }\n        catch (err) {\n            // If the save has been canceled by the user,\n            // throw the error so that whoever called save()\n            // can decide what to do.\n            if (err.message === 'Cancel' ||\n                err.message === 'Modal is already displayed') {\n                throw err;\n            }\n            // Otherwise show an error message and throw the error.\n            const localPath = this._manager.contents.localPath(this._path);\n            const name = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(localPath);\n            void this._handleError(err, this._trans.__('File Save Error for %1', name));\n            // Emit failure.\n            this._saveState.emit('failed');\n            return;\n        }\n    }\n    _createSaveOptions() {\n        let content = null;\n        if (this._factory.fileFormat === 'json') {\n            content = this._model.toJSON();\n        }\n        else {\n            content = this._model.toString();\n            if (this._lineEnding) {\n                content = content.replace(/\\n/g, this._lineEnding);\n            }\n        }\n        return {\n            type: this._factory.contentType,\n            format: this._factory.fileFormat,\n            content\n        };\n    }\n}\n/**\n * A namespace for private data.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Get a new file path from the user.\n     */\n    function getSavePath(path, translator) {\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__.nullTranslator;\n        const trans = translator.load('jupyterlab');\n        const saveBtn = _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.okButton({ label: trans.__('Save'), accept: true });\n        return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showDialog)({\n            title: trans.__('Save File As…'),\n            body: new SaveWidget(path),\n            buttons: [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.cancelButton(), saveBtn]\n        }).then(result => {\n            var _a;\n            if (result.button.accept) {\n                return (_a = result.value) !== null && _a !== void 0 ? _a : undefined;\n            }\n            return;\n        });\n    }\n    Private.getSavePath = getSavePath;\n    /**\n     * A no-op function.\n     */\n    function noOp() {\n        /* no-op */\n    }\n    Private.noOp = noOp;\n    /*\n     * A widget that gets a file path from a user.\n     */\n    class SaveWidget extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_7__.Widget {\n        /**\n         * Construct a new save widget.\n         */\n        constructor(path) {\n            super({ node: createSaveNode(path) });\n        }\n        /**\n         * Get the value for the widget.\n         */\n        getValue() {\n            return this.node.value;\n        }\n    }\n    /**\n     * Create the node for a save widget.\n     */\n    function createSaveNode(path) {\n        const input = document.createElement('input');\n        input.value = path;\n        return input;\n    }\n})(Private || (Private = {}));\n//# sourceMappingURL=context.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docregistry/lib/context.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/docregistry/lib/default.js":
/*!**************************************************************!*\
  !*** ../node_modules/@jupyterlab/docregistry/lib/default.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 */   ABCWidgetFactory: () => (/* binding */ ABCWidgetFactory),\n/* harmony export */   Base64ModelFactory: () => (/* binding */ Base64ModelFactory),\n/* harmony export */   DocumentModel: () => (/* binding */ DocumentModel),\n/* harmony export */   DocumentWidget: () => (/* binding */ DocumentWidget),\n/* harmony export */   TextModelFactory: () => (/* binding */ TextModelFactory)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__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 _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 _components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components */ \"../node_modules/@jupyterlab/docregistry/lib/components.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 * The default implementation of a document model.\n */\nclass DocumentModel extends _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__.CodeEditor.Model {\n    /**\n     * Construct a new document model.\n     */\n    constructor(options = {}) {\n        var _a;\n        super({ sharedModel: options.sharedModel });\n        this._defaultLang = '';\n        this._dirty = false;\n        this._readOnly = false;\n        this._contentChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__.Signal(this);\n        this._stateChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__.Signal(this);\n        this._defaultLang = (_a = options.languagePreference) !== null && _a !== void 0 ? _a : '';\n        this._collaborationEnabled = !!options.collaborationEnabled;\n        this.sharedModel.changed.connect(this._onStateChanged, this);\n    }\n    /**\n     * A signal emitted when the document content changes.\n     */\n    get contentChanged() {\n        return this._contentChanged;\n    }\n    /**\n     * A signal emitted when the document state changes.\n     */\n    get stateChanged() {\n        return this._stateChanged;\n    }\n    /**\n     * The dirty state of the document.\n     */\n    get dirty() {\n        return this._dirty;\n    }\n    set dirty(newValue) {\n        const oldValue = this._dirty;\n        if (newValue === oldValue) {\n            return;\n        }\n        this._dirty = newValue;\n        this.triggerStateChange({\n            name: 'dirty',\n            oldValue,\n            newValue\n        });\n    }\n    /**\n     * The read only state of the document.\n     */\n    get readOnly() {\n        return this._readOnly;\n    }\n    set readOnly(newValue) {\n        if (newValue === this._readOnly) {\n            return;\n        }\n        const oldValue = this._readOnly;\n        this._readOnly = newValue;\n        this.triggerStateChange({ name: 'readOnly', oldValue, newValue });\n    }\n    /**\n     * The default kernel name of the document.\n     *\n     * #### Notes\n     * This is a read-only property.\n     */\n    get defaultKernelName() {\n        return '';\n    }\n    /**\n     * The default kernel language of the document.\n     *\n     * #### Notes\n     * This is a read-only property.\n     */\n    get defaultKernelLanguage() {\n        return this._defaultLang;\n    }\n    /**\n     * Whether the model is collaborative or not.\n     */\n    get collaborative() {\n        return this._collaborationEnabled;\n    }\n    /**\n     * Serialize the model to a string.\n     */\n    toString() {\n        return this.sharedModel.getSource();\n    }\n    /**\n     * Deserialize the model from a string.\n     *\n     * #### Notes\n     * Should emit a [contentChanged] signal.\n     */\n    fromString(value) {\n        this.sharedModel.setSource(value);\n    }\n    /**\n     * Serialize the model to JSON.\n     */\n    toJSON() {\n        return JSON.parse(this.sharedModel.getSource() || 'null');\n    }\n    /**\n     * Deserialize the model from JSON.\n     *\n     * #### Notes\n     * Should emit a [contentChanged] signal.\n     */\n    fromJSON(value) {\n        this.fromString(JSON.stringify(value));\n    }\n    /**\n     * Initialize the model with its current state.\n     */\n    initialize() {\n        return;\n    }\n    /**\n     * Trigger a state change signal.\n     */\n    triggerStateChange(args) {\n        this._stateChanged.emit(args);\n    }\n    /**\n     * Trigger a content changed signal.\n     */\n    triggerContentChange() {\n        this._contentChanged.emit(void 0);\n        this.dirty = true;\n    }\n    _onStateChanged(sender, changes) {\n        if (changes.sourceChange) {\n            this.triggerContentChange();\n        }\n        if (changes.stateChange) {\n            changes.stateChange.forEach(value => {\n                if (value.name === 'dirty') {\n                    // Setting `dirty` will trigger the state change.\n                    // We always set `dirty` because the shared model state\n                    // and the local attribute are synchronized one way shared model -> _dirty\n                    this.dirty = value.newValue;\n                }\n                else if (value.oldValue !== value.newValue) {\n                    this.triggerStateChange({\n                        newValue: undefined,\n                        oldValue: undefined,\n                        ...value\n                    });\n                }\n            });\n        }\n    }\n}\n/**\n * An implementation of a model factory for text files.\n */\nclass TextModelFactory {\n    /**\n     * Instantiates a TextModelFactory.\n     */\n    constructor(collaborative) {\n        this._isDisposed = false;\n        this._collaborative = collaborative !== null && collaborative !== void 0 ? collaborative : true;\n    }\n    /**\n     * The name of the model type.\n     *\n     * #### Notes\n     * This is a read-only property.\n     */\n    get name() {\n        return 'text';\n    }\n    /**\n     * The type of the file.\n     *\n     * #### Notes\n     * This is a read-only property.\n     */\n    get contentType() {\n        return 'file';\n    }\n    /**\n     * The format of the file.\n     *\n     * This is a read-only property.\n     */\n    get fileFormat() {\n        return 'text';\n    }\n    /**\n     * Whether the model is collaborative or not.\n     */\n    get collaborative() {\n        return this._collaborative;\n    }\n    /**\n     * Get whether the model factory has been disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources held by the model factory.\n     */\n    dispose() {\n        this._isDisposed = true;\n    }\n    /**\n     * Create a new model.\n     *\n     * @param options - Model options.\n     *\n     * @returns A new document model.\n     */\n    createNew(options = {}) {\n        const collaborative = options.collaborationEnabled && this.collaborative;\n        return new DocumentModel({\n            ...options,\n            collaborationEnabled: collaborative\n        });\n    }\n    /**\n     * Get the preferred kernel language given a file path.\n     */\n    preferredLanguage(path) {\n        return '';\n    }\n}\n/**\n * An implementation of a model factory for base64 files.\n */\nclass Base64ModelFactory extends TextModelFactory {\n    /**\n     * The name of the model type.\n     *\n     * #### Notes\n     * This is a read-only property.\n     */\n    get name() {\n        return 'base64';\n    }\n    /**\n     * The type of the file.\n     *\n     * #### Notes\n     * This is a read-only property.\n     */\n    get contentType() {\n        return 'file';\n    }\n    /**\n     * The format of the file.\n     *\n     * This is a read-only property.\n     */\n    get fileFormat() {\n        return 'base64';\n    }\n}\n/**\n * The default implementation of a widget factory.\n */\nclass ABCWidgetFactory {\n    /**\n     * Construct a new `ABCWidgetFactory`.\n     */\n    constructor(options) {\n        this._isDisposed = false;\n        this._widgetCreated = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__.Signal(this);\n        this._translator = options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__.nullTranslator;\n        this._name = options.name;\n        this._label = options.label || options.name;\n        this._readOnly = options.readOnly === undefined ? false : options.readOnly;\n        this._defaultFor = options.defaultFor ? options.defaultFor.slice() : [];\n        this._defaultRendered = (options.defaultRendered || []).slice();\n        this._fileTypes = options.fileTypes.slice();\n        this._modelName = options.modelName || 'text';\n        this._preferKernel = !!options.preferKernel;\n        this._canStartKernel = !!options.canStartKernel;\n        this._shutdownOnClose = !!options.shutdownOnClose;\n        this._autoStartDefault = !!options.autoStartDefault;\n        this._toolbarFactory = options.toolbarFactory;\n    }\n    /**\n     * A signal emitted when a widget is created.\n     */\n    get widgetCreated() {\n        return this._widgetCreated;\n    }\n    /**\n     * Get whether the model factory has been disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources used by the document manager.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_4__.Signal.clearData(this);\n    }\n    /**\n     * Whether the widget factory is read only.\n     */\n    get readOnly() {\n        return this._readOnly;\n    }\n    /**\n     * A unique name identifying of the widget.\n     */\n    get name() {\n        return this._name;\n    }\n    /**\n     * The label of the widget to display in dialogs.\n     * If not given, name is used instead.\n     */\n    get label() {\n        return this._label;\n    }\n    /**\n     * The file types the widget can view.\n     */\n    get fileTypes() {\n        return this._fileTypes.slice();\n    }\n    /**\n     * The registered name of the model type used to create the widgets.\n     */\n    get modelName() {\n        return this._modelName;\n    }\n    /**\n     * The file types for which the factory should be the default.\n     */\n    get defaultFor() {\n        return this._defaultFor.slice();\n    }\n    /**\n     * The file types for which the factory should be the default for\n     * rendering a document model, if different from editing.\n     */\n    get defaultRendered() {\n        return this._defaultRendered.slice();\n    }\n    /**\n     * Whether the widgets prefer having a kernel started.\n     */\n    get preferKernel() {\n        return this._preferKernel;\n    }\n    /**\n     * Whether the widgets can start a kernel when opened.\n     */\n    get canStartKernel() {\n        return this._canStartKernel;\n    }\n    /**\n     * The application language translator.\n     */\n    get translator() {\n        return this._translator;\n    }\n    /**\n     * Whether the kernel should be shutdown when the widget is closed.\n     */\n    get shutdownOnClose() {\n        return this._shutdownOnClose;\n    }\n    set shutdownOnClose(value) {\n        this._shutdownOnClose = value;\n    }\n    /**\n     * Whether to automatically select the preferred kernel during a kernel start\n     */\n    get autoStartDefault() {\n        return this._autoStartDefault;\n    }\n    set autoStartDefault(value) {\n        this._autoStartDefault = value;\n    }\n    /**\n     * Create a new widget given a document model and a context.\n     *\n     * #### Notes\n     * It should emit the [widgetCreated] signal with the new widget.\n     */\n    createNew(context, source) {\n        var _a;\n        // Create the new widget\n        const widget = this.createNewWidget(context, source);\n        // Add toolbar\n        (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.setToolbar)(widget, (_a = this._toolbarFactory) !== null && _a !== void 0 ? _a : this.defaultToolbarFactory.bind(this));\n        // Emit widget created signal\n        this._widgetCreated.emit(widget);\n        return widget;\n    }\n    /**\n     * Default factory for toolbar items to be added after the widget is created.\n     */\n    defaultToolbarFactory(widget) {\n        return [];\n    }\n}\n/**\n * The class name added to a dirty widget.\n */\nconst DIRTY_CLASS = 'jp-mod-dirty';\n/**\n * A document widget implementation.\n */\nclass DocumentWidget extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.MainAreaWidget {\n    constructor(options) {\n        var _a;\n        // Include the context ready promise in the widget reveal promise\n        options.reveal = Promise.all([options.reveal, options.context.ready]);\n        super(options);\n        this._trans = ((_a = options.translator) !== null && _a !== void 0 ? _a : _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__.nullTranslator).load('jupyterlab');\n        this.context = options.context;\n        // Handle context path changes\n        this.context.pathChanged.connect(this._onPathChanged, this);\n        this._onPathChanged(this.context, this.context.path);\n        // Listen for changes in the dirty state.\n        this.context.model.stateChanged.connect(this._onModelStateChanged, this);\n        void this.context.ready.then(() => {\n            this._handleDirtyState();\n        });\n        // listen for changes to the title object\n        this.title.changed.connect(this._onTitleChanged, this);\n    }\n    /**\n     * Set URI fragment identifier.\n     */\n    setFragment(fragment) {\n        /* no-op */\n    }\n    /**\n     * Handle a title change.\n     */\n    async _onTitleChanged(_sender) {\n        const validNameExp = /[\\/\\\\:]/;\n        const name = this.title.label;\n        // Use localPath to avoid the drive name\n        const filename = this.context.localPath.split('/').pop() || this.context.localPath;\n        if (name === filename) {\n            return;\n        }\n        if (name.length > 0 && !validNameExp.test(name)) {\n            const oldPath = this.context.path;\n            await this.context.rename(name);\n            if (this.context.path !== oldPath) {\n                // Rename succeeded\n                return;\n            }\n        }\n        // Reset title if name is invalid or rename fails\n        this.title.label = filename;\n    }\n    /**\n     * Handle a path change.\n     */\n    _onPathChanged(sender, path) {\n        this.title.label = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.PathExt.basename(sender.localPath);\n        // The document is not untitled any more.\n        this.isUntitled = false;\n    }\n    /**\n     * Handle a change to the context model state.\n     */\n    _onModelStateChanged(sender, args) {\n        var _a;\n        if (args.name === 'dirty') {\n            this._handleDirtyState();\n        }\n        if (!this.context.model.dirty) {\n            if (!this.context.model.collaborative) {\n                if (!((_a = this.context.contentsModel) === null || _a === void 0 ? void 0 : _a.writable)) {\n                    const readOnlyIndicator = (0,_components__WEBPACK_IMPORTED_MODULE_5__.createReadonlyLabel)(this);\n                    let roi = this.toolbar.insertBefore('kernelName', 'read-only-indicator', readOnlyIndicator);\n                    if (!roi) {\n                        this.toolbar.addItem('read-only-indicator', readOnlyIndicator);\n                    }\n                }\n            }\n        }\n    }\n    /**\n     * Handle the dirty state of the context model.\n     */\n    _handleDirtyState() {\n        if (this.context.model.dirty &&\n            !this.title.className.includes(DIRTY_CLASS)) {\n            this.title.className += ` ${DIRTY_CLASS}`;\n        }\n        else {\n            this.title.className = this.title.className.replace(DIRTY_CLASS, '');\n        }\n    }\n}\n//# sourceMappingURL=default.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docregistry/lib/default.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/docregistry/lib/index.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/docregistry/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 */   ABCWidgetFactory: () => (/* reexport safe */ _default__WEBPACK_IMPORTED_MODULE_1__.ABCWidgetFactory),\n/* harmony export */   Base64ModelFactory: () => (/* reexport safe */ _default__WEBPACK_IMPORTED_MODULE_1__.Base64ModelFactory),\n/* harmony export */   Context: () => (/* reexport safe */ _context__WEBPACK_IMPORTED_MODULE_0__.Context),\n/* harmony export */   DocumentModel: () => (/* reexport safe */ _default__WEBPACK_IMPORTED_MODULE_1__.DocumentModel),\n/* harmony export */   DocumentRegistry: () => (/* reexport safe */ _registry__WEBPACK_IMPORTED_MODULE_3__.DocumentRegistry),\n/* harmony export */   DocumentWidget: () => (/* reexport safe */ _default__WEBPACK_IMPORTED_MODULE_1__.DocumentWidget),\n/* harmony export */   MimeContent: () => (/* reexport safe */ _mimedocument__WEBPACK_IMPORTED_MODULE_2__.MimeContent),\n/* harmony export */   MimeDocument: () => (/* reexport safe */ _mimedocument__WEBPACK_IMPORTED_MODULE_2__.MimeDocument),\n/* harmony export */   MimeDocumentFactory: () => (/* reexport safe */ _mimedocument__WEBPACK_IMPORTED_MODULE_2__.MimeDocumentFactory),\n/* harmony export */   TextModelFactory: () => (/* reexport safe */ _default__WEBPACK_IMPORTED_MODULE_1__.TextModelFactory),\n/* harmony export */   createReadonlyLabel: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_4__.createReadonlyLabel)\n/* harmony export */ });\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context */ \"../node_modules/@jupyterlab/docregistry/lib/context.js\");\n/* harmony import */ var _default__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./default */ \"../node_modules/@jupyterlab/docregistry/lib/default.js\");\n/* harmony import */ var _mimedocument__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mimedocument */ \"../node_modules/@jupyterlab/docregistry/lib/mimedocument.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./registry */ \"../node_modules/@jupyterlab/docregistry/lib/registry.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components */ \"../node_modules/@jupyterlab/docregistry/lib/components.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module docregistry\n */\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docregistry/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/docregistry/lib/mimedocument.js":
/*!*******************************************************************!*\
  !*** ../node_modules/@jupyterlab/docregistry/lib/mimedocument.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 */   MimeContent: () => (/* binding */ MimeContent),\n/* harmony export */   MimeDocument: () => (/* binding */ MimeDocument),\n/* harmony export */   MimeDocumentFactory: () => (/* binding */ MimeDocumentFactory)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__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_rendermime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @jupyterlab/rendermime */ \"webpack/sharing/consume/default/@jupyterlab/rendermime/@jupyterlab/rendermime\");\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @lumino/messaging */ \"webpack/sharing/consume/default/@lumino/messaging/@lumino/messaging\");\n/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_lumino_messaging__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _default__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./default */ \"../node_modules/@jupyterlab/docregistry/lib/default.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/**\n * A content widget for a rendered mimetype document.\n */\nclass MimeContent extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_7__.Widget {\n    /**\n     * Construct a new widget.\n     */\n    constructor(options) {\n        super();\n        /**\n         * A bound change callback.\n         */\n        this._changeCallback = (options) => {\n            if (!options.data || !options.data[this.mimeType]) {\n                return;\n            }\n            const data = options.data[this.mimeType];\n            if (typeof data === 'string') {\n                if (data !== this._context.model.toString()) {\n                    this._context.model.fromString(data);\n                }\n            }\n            else if (data !== null &&\n                data !== undefined &&\n                !_lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__.JSONExt.deepEqual(data, this._context.model.toJSON())) {\n                this._context.model.fromJSON(data);\n            }\n        };\n        this._fragment = '';\n        this._ready = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__.PromiseDelegate();\n        this._isRendering = false;\n        this._renderRequested = false;\n        this.addClass('jp-MimeDocument');\n        this.translator = options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_4__.nullTranslator;\n        this._trans = this.translator.load('jupyterlab');\n        this.mimeType = options.mimeType;\n        this._dataType = options.dataType || 'string';\n        this._context = options.context;\n        this.renderer = options.renderer;\n        const layout = (this.layout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_7__.StackedLayout());\n        layout.addWidget(this.renderer);\n        this._context.ready\n            .then(() => {\n            return this._render();\n        })\n            .then(() => {\n            // After rendering for the first time, send an activation request if we\n            // are currently focused.\n            if (this.node === document.activeElement) {\n                // We want to synchronously send (not post) the activate message, while\n                // we know this node still has focus.\n                _lumino_messaging__WEBPACK_IMPORTED_MODULE_6__.MessageLoop.sendMessage(this.renderer, _lumino_widgets__WEBPACK_IMPORTED_MODULE_7__.Widget.Msg.ActivateRequest);\n            }\n            // Throttle the rendering rate of the widget.\n            this._monitor = new _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_2__.ActivityMonitor({\n                signal: this._context.model.contentChanged,\n                timeout: options.renderTimeout\n            });\n            this._monitor.activityStopped.connect(this.update, this);\n            this._ready.resolve(undefined);\n        })\n            .catch(reason => {\n            // Dispose the document if rendering fails.\n            requestAnimationFrame(() => {\n                this.dispose();\n            });\n            void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showErrorMessage)(this._trans.__('Renderer Failure: %1', this._context.path), reason);\n        });\n    }\n    /**\n     * Print method. Deferred to the renderer.\n     */\n    [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Printing.symbol]() {\n        return _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Printing.getPrintFunction(this.renderer);\n    }\n    /**\n     * A promise that resolves when the widget is ready.\n     */\n    get ready() {\n        return this._ready.promise;\n    }\n    /**\n     * Set URI fragment identifier.\n     */\n    setFragment(fragment) {\n        this._fragment = fragment;\n        this.update();\n    }\n    /**\n     * Dispose of the resources held by the widget.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        if (this._monitor) {\n            this._monitor.dispose();\n        }\n        this._monitor = null;\n        super.dispose();\n    }\n    /**\n     * Handle an `update-request` message to the widget.\n     */\n    onUpdateRequest(msg) {\n        if (this._context.isReady) {\n            void this._render();\n            this._fragment = '';\n        }\n    }\n    /**\n     * Render the mime content.\n     */\n    async _render() {\n        if (this.isDisposed) {\n            return;\n        }\n        // Since rendering is async, we note render requests that happen while we\n        // actually are rendering for a future rendering.\n        if (this._isRendering) {\n            this._renderRequested = true;\n            return;\n        }\n        // Set up for this rendering pass.\n        this._renderRequested = false;\n        const context = this._context;\n        const model = context.model;\n        const data = {};\n        if (this._dataType === 'string') {\n            data[this.mimeType] = model.toString();\n        }\n        else {\n            data[this.mimeType] = model.toJSON();\n        }\n        const mimeModel = new _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_3__.MimeModel({\n            data,\n            callback: this._changeCallback,\n            metadata: { fragment: this._fragment }\n        });\n        try {\n            // Do the rendering asynchronously.\n            this._isRendering = true;\n            await this.renderer.renderModel(mimeModel);\n            this._isRendering = false;\n            // If there is an outstanding request to render, go ahead and render\n            if (this._renderRequested) {\n                return this._render();\n            }\n        }\n        catch (reason) {\n            // Dispose the document if rendering fails.\n            requestAnimationFrame(() => {\n                this.dispose();\n            });\n            void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showErrorMessage)(this._trans.__('Renderer Failure: %1', context.path), reason);\n        }\n    }\n}\n/**\n * A document widget for mime content.\n */\nclass MimeDocument extends _default__WEBPACK_IMPORTED_MODULE_8__.DocumentWidget {\n    setFragment(fragment) {\n        this.content.setFragment(fragment);\n    }\n}\n/**\n * An implementation of a widget factory for a rendered mimetype document.\n */\nclass MimeDocumentFactory extends _default__WEBPACK_IMPORTED_MODULE_8__.ABCWidgetFactory {\n    /**\n     * Construct a new mimetype widget factory.\n     */\n    constructor(options) {\n        super(Private.createRegistryOptions(options));\n        this._rendermime = options.rendermime;\n        this._renderTimeout = options.renderTimeout || 1000;\n        this._dataType = options.dataType || 'string';\n        this._fileType = options.primaryFileType;\n        this._factory = options.factory;\n    }\n    /**\n     * Create a new widget given a context.\n     */\n    createNewWidget(context) {\n        var _a, _b;\n        const ft = this._fileType;\n        const mimeType = (ft === null || ft === void 0 ? void 0 : ft.mimeTypes.length)\n            ? ft.mimeTypes[0]\n            : _jupyterlab_codeeditor__WEBPACK_IMPORTED_MODULE_1__.IEditorMimeTypeService.defaultMimeType;\n        const rendermime = this._rendermime.clone({\n            resolver: context.urlResolver\n        });\n        let renderer;\n        if (this._factory && this._factory.mimeTypes.includes(mimeType)) {\n            renderer = this._factory.createRenderer({\n                mimeType,\n                resolver: rendermime.resolver,\n                sanitizer: rendermime.sanitizer,\n                linkHandler: rendermime.linkHandler,\n                latexTypesetter: rendermime.latexTypesetter,\n                markdownParser: rendermime.markdownParser\n            });\n        }\n        else {\n            renderer = rendermime.createRenderer(mimeType);\n        }\n        const content = new MimeContent({\n            context,\n            renderer,\n            mimeType,\n            renderTimeout: this._renderTimeout,\n            dataType: this._dataType\n        });\n        content.title.icon = ft === null || ft === void 0 ? void 0 : ft.icon;\n        content.title.iconClass = (_a = ft === null || ft === void 0 ? void 0 : ft.iconClass) !== null && _a !== void 0 ? _a : '';\n        content.title.iconLabel = (_b = ft === null || ft === void 0 ? void 0 : ft.iconLabel) !== null && _b !== void 0 ? _b : '';\n        const widget = new MimeDocument({ content, context });\n        return widget;\n    }\n}\n/**\n * The namespace for the module implementation details.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Create the document registry options.\n     */\n    function createRegistryOptions(options) {\n        return {\n            ...options,\n            readOnly: true\n        };\n    }\n    Private.createRegistryOptions = createRegistryOptions;\n})(Private || (Private = {}));\n//# sourceMappingURL=mimedocument.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docregistry/lib/mimedocument.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/docregistry/lib/registry.js":
/*!***************************************************************!*\
  !*** ../node_modules/@jupyterlab/docregistry/lib/registry.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 */   DocumentRegistry: () => (/* binding */ DocumentRegistry)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/coreutils */ \"webpack/sharing/consume/default/@jupyterlab/coreutils/@jupyterlab/coreutils\");\n/* harmony import */ var _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/ui-components */ \"webpack/sharing/consume/default/@jupyterlab/ui-components/@jupyterlab/ui-components\");\n/* harmony import */ var _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/algorithm */ \"webpack/sharing/consume/default/@lumino/algorithm/@lumino/algorithm\");\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/disposable */ \"webpack/sharing/consume/default/@lumino/disposable/@lumino/disposable\");\n/* harmony import */ var _lumino_disposable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_disposable__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 _default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./default */ \"../node_modules/@jupyterlab/docregistry/lib/default.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 * The document registry.\n */\nclass DocumentRegistry {\n    /**\n     * Construct a new document registry.\n     */\n    constructor(options = {}) {\n        this._modelFactories = Object.create(null);\n        this._widgetFactories = Object.create(null);\n        this._defaultWidgetFactory = '';\n        this._defaultWidgetFactoryOverrides = Object.create(null);\n        this._defaultWidgetFactories = Object.create(null);\n        this._defaultRenderedWidgetFactories = Object.create(null);\n        this._widgetFactoriesForFileType = Object.create(null);\n        this._fileTypes = [];\n        this._extenders = Object.create(null);\n        this._changed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__.Signal(this);\n        this._isDisposed = false;\n        const factory = options.textModelFactory;\n        this.translator = options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        if (factory && factory.name !== 'text') {\n            throw new Error('Text model factory must have the name `text`');\n        }\n        this._modelFactories['text'] = factory || new _default__WEBPACK_IMPORTED_MODULE_6__.TextModelFactory(true);\n        const fts = options.initialFileTypes ||\n            DocumentRegistry.getDefaultFileTypes(this.translator);\n        fts.forEach(ft => {\n            const value = {\n                ...DocumentRegistry.getFileTypeDefaults(this.translator),\n                ...ft\n            };\n            this._fileTypes.push(value);\n        });\n    }\n    /**\n     * A signal emitted when the registry has changed.\n     */\n    get changed() {\n        return this._changed;\n    }\n    /**\n     * Get whether the document registry has been disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources held by the document registry.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        for (const modelName in this._modelFactories) {\n            this._modelFactories[modelName].dispose();\n        }\n        for (const widgetName in this._widgetFactories) {\n            this._widgetFactories[widgetName].dispose();\n        }\n        for (const widgetName in this._extenders) {\n            this._extenders[widgetName].length = 0;\n        }\n        this._fileTypes.length = 0;\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_5__.Signal.clearData(this);\n    }\n    /**\n     * Add a widget factory to the registry.\n     *\n     * @param factory - The factory instance to register.\n     *\n     * @returns A disposable which will unregister the factory.\n     *\n     * #### Notes\n     * If a factory with the given `'name'` is already registered,\n     * a warning will be logged, and this will be a no-op.\n     * If `'*'` is given as a default extension, the factory will be registered\n     * as the global default.\n     * If an extension or global default is already registered, this factory\n     * will override the existing default.\n     * The factory cannot be named an empty string or the string `'default'`.\n     */\n    addWidgetFactory(factory) {\n        const name = factory.name.toLowerCase();\n        if (!name || name === 'default') {\n            throw Error('Invalid factory name');\n        }\n        if (this._widgetFactories[name]) {\n            console.warn(`Duplicate registered factory ${name}`);\n            return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableDelegate(Private.noOp);\n        }\n        this._widgetFactories[name] = factory;\n        for (const ft of factory.defaultFor || []) {\n            if (factory.fileTypes.indexOf(ft) === -1) {\n                continue;\n            }\n            if (ft === '*') {\n                this._defaultWidgetFactory = name;\n            }\n            else {\n                this._defaultWidgetFactories[ft] = name;\n            }\n        }\n        for (const ft of factory.defaultRendered || []) {\n            if (factory.fileTypes.indexOf(ft) === -1) {\n                continue;\n            }\n            this._defaultRenderedWidgetFactories[ft] = name;\n        }\n        // For convenience, store a mapping of file type name -> name\n        for (const ft of factory.fileTypes) {\n            if (!this._widgetFactoriesForFileType[ft]) {\n                this._widgetFactoriesForFileType[ft] = [];\n            }\n            this._widgetFactoriesForFileType[ft].push(name);\n        }\n        this._changed.emit({\n            type: 'widgetFactory',\n            name,\n            change: 'added'\n        });\n        return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableDelegate(() => {\n            delete this._widgetFactories[name];\n            if (this._defaultWidgetFactory === name) {\n                this._defaultWidgetFactory = '';\n            }\n            for (const ext of Object.keys(this._defaultWidgetFactories)) {\n                if (this._defaultWidgetFactories[ext] === name) {\n                    delete this._defaultWidgetFactories[ext];\n                }\n            }\n            for (const ext of Object.keys(this._defaultRenderedWidgetFactories)) {\n                if (this._defaultRenderedWidgetFactories[ext] === name) {\n                    delete this._defaultRenderedWidgetFactories[ext];\n                }\n            }\n            for (const ext of Object.keys(this._widgetFactoriesForFileType)) {\n                _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.removeFirstOf(this._widgetFactoriesForFileType[ext], name);\n                if (this._widgetFactoriesForFileType[ext].length === 0) {\n                    delete this._widgetFactoriesForFileType[ext];\n                }\n            }\n            for (const ext of Object.keys(this._defaultWidgetFactoryOverrides)) {\n                if (this._defaultWidgetFactoryOverrides[ext] === name) {\n                    delete this._defaultWidgetFactoryOverrides[ext];\n                }\n            }\n            this._changed.emit({\n                type: 'widgetFactory',\n                name,\n                change: 'removed'\n            });\n        });\n    }\n    /**\n     * Add a model factory to the registry.\n     *\n     * @param factory - The factory instance.\n     *\n     * @returns A disposable which will unregister the factory.\n     *\n     * #### Notes\n     * If a factory with the given `name` is already registered, or\n     * the given factory is already registered, a warning will be logged\n     * and this will be a no-op.\n     */\n    addModelFactory(factory) {\n        const name = factory.name.toLowerCase();\n        if (this._modelFactories[name]) {\n            console.warn(`Duplicate registered factory ${name}`);\n            return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableDelegate(Private.noOp);\n        }\n        this._modelFactories[name] = factory;\n        this._changed.emit({\n            type: 'modelFactory',\n            name,\n            change: 'added'\n        });\n        return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableDelegate(() => {\n            delete this._modelFactories[name];\n            this._changed.emit({\n                type: 'modelFactory',\n                name,\n                change: 'removed'\n            });\n        });\n    }\n    /**\n     * Add a widget extension to the registry.\n     *\n     * @param widgetName - The name of the widget factory.\n     *\n     * @param extension - A widget extension.\n     *\n     * @returns A disposable which will unregister the extension.\n     *\n     * #### Notes\n     * If the extension is already registered for the given\n     * widget name, a warning will be logged and this will be a no-op.\n     */\n    addWidgetExtension(widgetName, extension) {\n        widgetName = widgetName.toLowerCase();\n        if (!(widgetName in this._extenders)) {\n            this._extenders[widgetName] = [];\n        }\n        const extenders = this._extenders[widgetName];\n        const index = _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.firstIndexOf(extenders, extension);\n        if (index !== -1) {\n            console.warn(`Duplicate registered extension for ${widgetName}`);\n            return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableDelegate(Private.noOp);\n        }\n        this._extenders[widgetName].push(extension);\n        this._changed.emit({\n            type: 'widgetExtension',\n            name: widgetName,\n            change: 'added'\n        });\n        return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableDelegate(() => {\n            _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.removeFirstOf(this._extenders[widgetName], extension);\n            this._changed.emit({\n                type: 'widgetExtension',\n                name: widgetName,\n                change: 'removed'\n            });\n        });\n    }\n    /**\n     * Add a file type to the document registry.\n     *\n     * @param fileType - The file type object to register.\n     * @param factories - Optional factories to use for the file type.\n     *\n     * @returns A disposable which will unregister the command.\n     *\n     * #### Notes\n     * These are used to populate the \"Create New\" dialog.\n     *\n     * If no default factory exists for the file type, the first factory will\n     * be defined as default factory.\n     */\n    addFileType(fileType, factories) {\n        const value = {\n            ...DocumentRegistry.getFileTypeDefaults(this.translator),\n            ...fileType,\n            // fall back to fileIcon if needed\n            ...(!(fileType.icon || fileType.iconClass) && { icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.fileIcon })\n        };\n        this._fileTypes.push(value);\n        // Add the filetype to the factory - filetype mapping\n        //  We do not change the factory itself\n        if (factories) {\n            const fileTypeName = value.name.toLowerCase();\n            factories\n                .map(factory => factory.toLowerCase())\n                .forEach(factory => {\n                if (!this._widgetFactoriesForFileType[fileTypeName]) {\n                    this._widgetFactoriesForFileType[fileTypeName] = [];\n                }\n                if (!this._widgetFactoriesForFileType[fileTypeName].includes(factory)) {\n                    this._widgetFactoriesForFileType[fileTypeName].push(factory);\n                }\n            });\n            if (!this._defaultWidgetFactories[fileTypeName]) {\n                this._defaultWidgetFactories[fileTypeName] =\n                    this._widgetFactoriesForFileType[fileTypeName][0];\n            }\n        }\n        this._changed.emit({\n            type: 'fileType',\n            name: value.name,\n            change: 'added'\n        });\n        return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableDelegate(() => {\n            _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.removeFirstOf(this._fileTypes, value);\n            if (factories) {\n                const fileTypeName = value.name.toLowerCase();\n                for (const name of factories.map(factory => factory.toLowerCase())) {\n                    _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.removeFirstOf(this._widgetFactoriesForFileType[fileTypeName], name);\n                }\n                if (this._defaultWidgetFactories[fileTypeName] ===\n                    factories[0].toLowerCase()) {\n                    delete this._defaultWidgetFactories[fileTypeName];\n                }\n            }\n            this._changed.emit({\n                type: 'fileType',\n                name: fileType.name,\n                change: 'removed'\n            });\n        });\n    }\n    /**\n     * Get a list of the preferred widget factories.\n     *\n     * @param path - The file path to filter the results.\n     *\n     * @returns A new array of widget factories.\n     *\n     * #### Notes\n     * Only the widget factories whose associated model factory have\n     * been registered will be returned.\n     * The first item is considered the default. The returned array\n     * has widget factories in the following order:\n     * - path-specific default factory\n     * - path-specific default rendered factory\n     * - global default factory\n     * - all other path-specific factories\n     * - all other global factories\n     */\n    preferredWidgetFactories(path) {\n        const factories = new Set();\n        // Get the ordered matching file types.\n        const fts = this.getFileTypesForPath(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.basename(path));\n        // Start with any user overrides for the defaults.\n        fts.forEach(ft => {\n            if (ft.name in this._defaultWidgetFactoryOverrides) {\n                factories.add(this._defaultWidgetFactoryOverrides[ft.name]);\n            }\n        });\n        // Next add the file type default factories.\n        fts.forEach(ft => {\n            if (ft.name in this._defaultWidgetFactories) {\n                factories.add(this._defaultWidgetFactories[ft.name]);\n            }\n        });\n        // Add the file type default rendered factories.\n        fts.forEach(ft => {\n            if (ft.name in this._defaultRenderedWidgetFactories) {\n                factories.add(this._defaultRenderedWidgetFactories[ft.name]);\n            }\n        });\n        // Add the global default factory.\n        if (this._defaultWidgetFactory) {\n            factories.add(this._defaultWidgetFactory);\n        }\n        // Add the file type factories in registration order.\n        for (const ft of fts) {\n            if (ft.name in this._widgetFactoriesForFileType) {\n                for (const n of this._widgetFactoriesForFileType[ft.name]) {\n                    factories.add(n);\n                }\n            }\n        }\n        // Add the rest of the global factories, in registration order.\n        if ('*' in this._widgetFactoriesForFileType) {\n            for (const n of this._widgetFactoriesForFileType['*']) {\n                factories.add(n);\n            }\n        }\n        // Construct the return list, checking to make sure the corresponding\n        // model factories are registered.\n        const factoryList = [];\n        for (const name of factories) {\n            const factory = this._widgetFactories[name];\n            if (!factory) {\n                continue;\n            }\n            const modelName = factory.modelName || 'text';\n            if (modelName in this._modelFactories) {\n                factoryList.push(factory);\n            }\n        }\n        return factoryList;\n    }\n    /**\n     * Get the default rendered widget factory for a path.\n     *\n     * @param path - The path to for which to find a widget factory.\n     *\n     * @returns The default rendered widget factory for the path.\n     *\n     * ### Notes\n     * If the widget factory has registered a separate set of `defaultRendered`\n     * file types and there is a match in that set, this returns that.\n     * Otherwise, this returns the same widget factory as\n     * [[defaultWidgetFactory]].\n     *\n     * The user setting `defaultViewers` took precedence on this one too.\n     */\n    defaultRenderedWidgetFactory(path) {\n        // Get the matching file types.\n        const ftNames = this.getFileTypesForPath(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.basename(path)).map(ft => ft.name);\n        // Start with any user overrides for the defaults.\n        for (const name in ftNames) {\n            if (name in this._defaultWidgetFactoryOverrides) {\n                return this._widgetFactories[this._defaultWidgetFactoryOverrides[name]];\n            }\n        }\n        // Find if a there is a default rendered factory for this type.\n        for (const name in ftNames) {\n            if (name in this._defaultRenderedWidgetFactories) {\n                return this._widgetFactories[this._defaultRenderedWidgetFactories[name]];\n            }\n        }\n        // Fallback to the default widget factory\n        return this.defaultWidgetFactory(path);\n    }\n    /**\n     * Get the default widget factory for a path.\n     *\n     * @param path - An optional file path to filter the results.\n     *\n     * @returns The default widget factory for an path.\n     *\n     * #### Notes\n     * This is equivalent to the first value in [[preferredWidgetFactories]].\n     */\n    defaultWidgetFactory(path) {\n        if (!path) {\n            return this._widgetFactories[this._defaultWidgetFactory];\n        }\n        return this.preferredWidgetFactories(path)[0];\n    }\n    /**\n     * Set overrides for the default widget factory for a file type.\n     *\n     * Normally, a widget factory informs the document registry which file types\n     * it should be the default for using the `defaultFor` option in the\n     * IWidgetFactoryOptions. This function can be used to override that after\n     * the fact.\n     *\n     * @param fileType The name of the file type.\n     *\n     * @param factory The name of the factory.\n     *\n     * #### Notes\n     * If `factory` is undefined, then any override will be unset, and the\n     * default factory will revert to the original value.\n     *\n     * If `factory` or `fileType` are not known to the docregistry, or\n     * if `factory` cannot open files of type `fileType`, this will throw\n     * an error.\n     */\n    setDefaultWidgetFactory(fileType, factory) {\n        fileType = fileType.toLowerCase();\n        if (!this.getFileType(fileType)) {\n            throw Error(`Cannot find file type ${fileType}`);\n        }\n        if (!factory) {\n            if (this._defaultWidgetFactoryOverrides[fileType]) {\n                delete this._defaultWidgetFactoryOverrides[fileType];\n            }\n            return;\n        }\n        if (!this.getWidgetFactory(factory)) {\n            throw Error(`Cannot find widget factory ${factory}`);\n        }\n        factory = factory.toLowerCase();\n        const factories = this._widgetFactoriesForFileType[fileType];\n        if (factory !== this._defaultWidgetFactory &&\n            !(factories && factories.includes(factory))) {\n            throw Error(`Factory ${factory} cannot view file type ${fileType}`);\n        }\n        this._defaultWidgetFactoryOverrides[fileType] = factory;\n    }\n    /**\n     * Create an iterator over the widget factories that have been registered.\n     *\n     * @returns A new iterator of widget factories.\n     */\n    *widgetFactories() {\n        for (const name in this._widgetFactories) {\n            yield this._widgetFactories[name];\n        }\n    }\n    /**\n     * Create an iterator over the model factories that have been registered.\n     *\n     * @returns A new iterator of model factories.\n     */\n    *modelFactories() {\n        for (const name in this._modelFactories) {\n            yield this._modelFactories[name];\n        }\n    }\n    /**\n     * Create an iterator over the registered extensions for a given widget.\n     *\n     * @param widgetName - The name of the widget factory.\n     *\n     * @returns A new iterator over the widget extensions.\n     */\n    *widgetExtensions(widgetName) {\n        widgetName = widgetName.toLowerCase();\n        if (widgetName in this._extenders) {\n            for (const extension of this._extenders[widgetName]) {\n                yield extension;\n            }\n        }\n    }\n    /**\n     * Create an iterator over the file types that have been registered.\n     *\n     * @returns A new iterator of file types.\n     */\n    *fileTypes() {\n        for (const type of this._fileTypes) {\n            yield type;\n        }\n    }\n    /**\n     * Get a widget factory by name.\n     *\n     * @param widgetName - The name of the widget factory.\n     *\n     * @returns A widget factory instance.\n     */\n    getWidgetFactory(widgetName) {\n        return this._widgetFactories[widgetName.toLowerCase()];\n    }\n    /**\n     * Get a model factory by name.\n     *\n     * @param name - The name of the model factory.\n     *\n     * @returns A model factory instance.\n     */\n    getModelFactory(name) {\n        return this._modelFactories[name.toLowerCase()];\n    }\n    /**\n     * Get a file type by name.\n     */\n    getFileType(name) {\n        name = name.toLowerCase();\n        return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(this._fileTypes, fileType => {\n            return fileType.name.toLowerCase() === name;\n        });\n    }\n    /**\n     * Get a kernel preference.\n     *\n     * @param path - The file path.\n     *\n     * @param widgetName - The name of the widget factory.\n     *\n     * @param kernel - An optional existing kernel model.\n     *\n     * @returns A kernel preference.\n     */\n    getKernelPreference(path, widgetName, kernel) {\n        widgetName = widgetName.toLowerCase();\n        const widgetFactory = this._widgetFactories[widgetName];\n        if (!widgetFactory) {\n            return void 0;\n        }\n        const modelFactory = this.getModelFactory(widgetFactory.modelName || 'text');\n        if (!modelFactory) {\n            return void 0;\n        }\n        const language = modelFactory.preferredLanguage(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.basename(path));\n        const name = kernel && kernel.name;\n        const id = kernel && kernel.id;\n        return {\n            id,\n            name,\n            language,\n            shouldStart: widgetFactory.preferKernel,\n            canStart: widgetFactory.canStartKernel,\n            shutdownOnDispose: widgetFactory.shutdownOnClose,\n            autoStartDefault: widgetFactory.autoStartDefault\n        };\n    }\n    /**\n     * Get the best file type given a contents model.\n     *\n     * @param model - The contents model of interest.\n     *\n     * @returns The best matching file type.\n     */\n    getFileTypeForModel(model) {\n        let ft = null;\n        if (model.name || model.path) {\n            const name = model.name || _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.basename(model.path);\n            const fts = this.getFileTypesForPath(name);\n            if (fts.length > 0) {\n                ft = fts[0];\n            }\n        }\n        switch (model.type) {\n            case 'directory':\n                if (ft !== null && ft.contentType === 'directory') {\n                    return ft;\n                }\n                return ((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(this._fileTypes, ft => ft.contentType === 'directory') ||\n                    DocumentRegistry.getDefaultDirectoryFileType(this.translator));\n            case 'notebook':\n                if (ft !== null && ft.contentType === 'notebook') {\n                    return ft;\n                }\n                return ((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(this._fileTypes, ft => ft.contentType === 'notebook') ||\n                    DocumentRegistry.getDefaultNotebookFileType(this.translator));\n            default:\n                // Find the best matching extension.\n                if (ft !== null) {\n                    return ft;\n                }\n                return (this.getFileType('text') ||\n                    DocumentRegistry.getDefaultTextFileType(this.translator));\n        }\n    }\n    /**\n     * Get the file types that match a file name.\n     *\n     * @param path - The path of the file.\n     *\n     * @returns An ordered list of matching file types.\n     */\n    getFileTypesForPath(path) {\n        const fts = [];\n        const name = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.basename(path);\n        // Look for a pattern match first.\n        let ft = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(this._fileTypes, ft => {\n            return !!(ft.pattern && name.match(ft.pattern) !== null);\n        });\n        if (ft) {\n            fts.push(ft);\n        }\n        // Then look by extension name, starting with the longest\n        let ext = Private.extname(name);\n        while (ext.length > 1) {\n            const ftSubset = this._fileTypes.filter(ft => \n            // In Private.extname, the extension is transformed to lower case\n            ft.extensions.map(extension => extension.toLowerCase()).includes(ext));\n            fts.push(...ftSubset);\n            ext = '.' + ext.split('.').slice(2).join('.');\n        }\n        return fts;\n    }\n}\n/**\n * The namespace for the `DocumentRegistry` class statics.\n */\n(function (DocumentRegistry) {\n    /**\n     * The defaults used for a file type.\n     *\n     * @param translator - The application language translator.\n     *\n     * @returns The default file type.\n     */\n    function getFileTypeDefaults(translator) {\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        const trans = translator === null || translator === void 0 ? void 0 : translator.load('jupyterlab');\n        return {\n            name: 'default',\n            displayName: trans.__('default'),\n            extensions: [],\n            mimeTypes: [],\n            contentType: 'file',\n            fileFormat: 'text'\n        };\n    }\n    DocumentRegistry.getFileTypeDefaults = getFileTypeDefaults;\n    /**\n     * The default text file type used by the document registry.\n     *\n     * @param translator - The application language translator.\n     *\n     * @returns The default text file type.\n     */\n    function getDefaultTextFileType(translator) {\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        const trans = translator === null || translator === void 0 ? void 0 : translator.load('jupyterlab');\n        const fileTypeDefaults = getFileTypeDefaults(translator);\n        return {\n            ...fileTypeDefaults,\n            name: 'text',\n            displayName: trans.__('Text'),\n            mimeTypes: ['text/plain'],\n            extensions: ['.txt'],\n            icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.fileIcon\n        };\n    }\n    DocumentRegistry.getDefaultTextFileType = getDefaultTextFileType;\n    /**\n     * The default notebook file type used by the document registry.\n     *\n     * @param translator - The application language translator.\n     *\n     * @returns The default notebook file type.\n     */\n    function getDefaultNotebookFileType(translator) {\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        const trans = translator === null || translator === void 0 ? void 0 : translator.load('jupyterlab');\n        return {\n            ...getFileTypeDefaults(translator),\n            name: 'notebook',\n            displayName: trans.__('Notebook'),\n            mimeTypes: ['application/x-ipynb+json'],\n            extensions: ['.ipynb'],\n            contentType: 'notebook',\n            fileFormat: 'json',\n            icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.notebookIcon\n        };\n    }\n    DocumentRegistry.getDefaultNotebookFileType = getDefaultNotebookFileType;\n    /**\n     * The default directory file type used by the document registry.\n     *\n     * @param translator - The application language translator.\n     *\n     * @returns The default directory file type.\n     */\n    function getDefaultDirectoryFileType(translator) {\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        const trans = translator === null || translator === void 0 ? void 0 : translator.load('jupyterlab');\n        return {\n            ...getFileTypeDefaults(translator),\n            name: 'directory',\n            displayName: trans.__('Directory'),\n            extensions: [],\n            mimeTypes: ['text/directory'],\n            contentType: 'directory',\n            icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.folderIcon\n        };\n    }\n    DocumentRegistry.getDefaultDirectoryFileType = getDefaultDirectoryFileType;\n    /**\n     * The default file types used by the document registry.\n     *\n     * @param translator - The application language translator.\n     *\n     * @returns The default directory file types.\n     */\n    function getDefaultFileTypes(translator) {\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        const trans = translator === null || translator === void 0 ? void 0 : translator.load('jupyterlab');\n        return [\n            getDefaultTextFileType(translator),\n            getDefaultNotebookFileType(translator),\n            getDefaultDirectoryFileType(translator),\n            {\n                name: 'markdown',\n                displayName: trans.__('Markdown File'),\n                extensions: ['.md'],\n                mimeTypes: ['text/markdown'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.markdownIcon\n            },\n            {\n                name: 'PDF',\n                displayName: trans.__('PDF File'),\n                extensions: ['.pdf'],\n                mimeTypes: ['application/pdf'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.pdfIcon\n            },\n            {\n                name: 'python',\n                displayName: trans.__('Python File'),\n                extensions: ['.py'],\n                mimeTypes: ['text/x-python'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.pythonIcon\n            },\n            {\n                name: 'json',\n                displayName: trans.__('JSON File'),\n                extensions: ['.json'],\n                mimeTypes: ['application/json'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.jsonIcon\n            },\n            {\n                name: 'jsonl',\n                displayName: trans.__('JSONLines File'),\n                extensions: ['.jsonl', '.ndjson'],\n                mimeTypes: [\n                    'text/jsonl',\n                    'application/jsonl',\n                    'application/json-lines'\n                ],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.jsonIcon\n            },\n            {\n                name: 'julia',\n                displayName: trans.__('Julia File'),\n                extensions: ['.jl'],\n                mimeTypes: ['text/x-julia'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.juliaIcon\n            },\n            {\n                name: 'csv',\n                displayName: trans.__('CSV File'),\n                extensions: ['.csv'],\n                mimeTypes: ['text/csv'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.spreadsheetIcon\n            },\n            {\n                name: 'tsv',\n                displayName: trans.__('TSV File'),\n                extensions: ['.tsv'],\n                mimeTypes: ['text/csv'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.spreadsheetIcon\n            },\n            {\n                name: 'r',\n                displayName: trans.__('R File'),\n                mimeTypes: ['text/x-rsrc'],\n                extensions: ['.R'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.rKernelIcon\n            },\n            {\n                name: 'yaml',\n                displayName: trans.__('YAML File'),\n                mimeTypes: ['text/x-yaml', 'text/yaml'],\n                extensions: ['.yaml', '.yml'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.yamlIcon\n            },\n            {\n                name: 'svg',\n                displayName: trans.__('Image'),\n                mimeTypes: ['image/svg+xml'],\n                extensions: ['.svg'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.imageIcon,\n                fileFormat: 'base64'\n            },\n            {\n                name: 'tiff',\n                displayName: trans.__('Image'),\n                mimeTypes: ['image/tiff'],\n                extensions: ['.tif', '.tiff'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.imageIcon,\n                fileFormat: 'base64'\n            },\n            {\n                name: 'jpeg',\n                displayName: trans.__('Image'),\n                mimeTypes: ['image/jpeg'],\n                extensions: ['.jpg', '.jpeg'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.imageIcon,\n                fileFormat: 'base64'\n            },\n            {\n                name: 'gif',\n                displayName: trans.__('Image'),\n                mimeTypes: ['image/gif'],\n                extensions: ['.gif'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.imageIcon,\n                fileFormat: 'base64'\n            },\n            {\n                name: 'png',\n                displayName: trans.__('Image'),\n                mimeTypes: ['image/png'],\n                extensions: ['.png'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.imageIcon,\n                fileFormat: 'base64'\n            },\n            {\n                name: 'bmp',\n                displayName: trans.__('Image'),\n                mimeTypes: ['image/bmp'],\n                extensions: ['.bmp'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.imageIcon,\n                fileFormat: 'base64'\n            },\n            {\n                name: 'webp',\n                displayName: trans.__('Image'),\n                mimeTypes: ['image/webp'],\n                extensions: ['.webp'],\n                icon: _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__.imageIcon,\n                fileFormat: 'base64'\n            }\n        ];\n    }\n    DocumentRegistry.getDefaultFileTypes = getDefaultFileTypes;\n})(DocumentRegistry || (DocumentRegistry = {}));\n/**\n * A private namespace for DocumentRegistry data.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Get the extension name of a path.\n     *\n     * @param path - string.\n     *\n     * #### Notes\n     * Dotted filenames (e.g. `\".table.json\"` are allowed).\n     */\n    function extname(path) {\n        const parts = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__.PathExt.basename(path).split('.');\n        parts.shift();\n        const ext = '.' + parts.join('.');\n        return ext.toLowerCase();\n    }\n    Private.extname = extname;\n    /**\n     * A no-op function.\n     */\n    function noOp() {\n        /* no-op */\n    }\n    Private.noOp = noOp;\n})(Private || (Private = {}));\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docregistry/lib/registry.js?");

/***/ })

}]);