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

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"renameDialog\": () => (/* binding */ renameDialog),\n/* harmony export */   \"renameFile\": () => (/* binding */ renameFile),\n/* harmony export */   \"shouldOverwrite\": () => (/* binding */ shouldOverwrite),\n/* harmony export */   \"isValidFileName\": () => (/* binding */ isValidFileName)\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_translation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_3__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n/**\n * The class name added to file dialogs.\n */\nconst FILE_DIALOG_CLASS = 'jp-FileDialog';\n/**\n * The class name added for the new name label in the rename dialog\n */\nconst RENAME_NEW_NAME_TITLE_CLASS = 'jp-new-name-title';\n/**\n * Rename a file with a dialog.\n */\nfunction renameDialog(manager, oldPath, translator) {\n    translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n    const trans = translator.load('jupyterlab');\n    return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showDialog)({\n        title: trans.__('Rename File'),\n        body: new RenameHandler(oldPath),\n        focusNodeSelector: 'input',\n        buttons: [\n            _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.cancelButton({ label: trans.__('Cancel') }),\n            _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.okButton({ label: trans.__('Rename') })\n        ]\n    }).then(result => {\n        if (!result.value) {\n            return null;\n        }\n        if (!isValidFileName(result.value)) {\n            void (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showErrorMessage)(trans.__('Rename Error'), Error(trans.__('\"%1\" is not a valid name for a file. Names must have nonzero length, and cannot include \"/\", \"\\\\\", or \":\"', result.value)));\n            return null;\n        }\n        const basePath = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.dirname(oldPath);\n        const newPath = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.join(basePath, result.value);\n        return renameFile(manager, oldPath, newPath);\n    });\n}\n/**\n * Rename a file, asking for confirmation if it is overwriting another.\n */\nfunction renameFile(manager, oldPath, newPath) {\n    return manager.rename(oldPath, newPath).catch(error => {\n        if (error.message.indexOf('409') === -1) {\n            throw error;\n        }\n        return shouldOverwrite(newPath).then(value => {\n            if (value) {\n                return manager.overwrite(oldPath, newPath);\n            }\n            return Promise.reject('File not renamed');\n        });\n    });\n}\n/**\n * Ask the user whether to overwrite a file.\n */\nfunction shouldOverwrite(path, translator) {\n    translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n    const trans = translator.load('jupyterlab');\n    const options = {\n        title: trans.__('Overwrite file?'),\n        body: trans.__('\"%1\" already exists, overwrite?', path),\n        buttons: [\n            _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.cancelButton({ label: trans.__('Cancel') }),\n            _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.warnButton({ label: trans.__('Overwrite') })\n        ]\n    };\n    return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showDialog)(options).then(result => {\n        return Promise.resolve(result.button.accept);\n    });\n}\n/**\n * Test whether a name is a valid file name\n *\n * Disallows \"/\", \"\\\", and \":\" in file names, as well as names with zero length.\n */\nfunction isValidFileName(name) {\n    const validNameExp = /[\\/\\\\:]/;\n    return name.length > 0 && !validNameExp.test(name);\n}\n/**\n * A widget used to rename a file.\n */\nclass RenameHandler extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget {\n    /**\n     * Construct a new \"rename\" dialog.\n     */\n    constructor(oldPath) {\n        super({ node: Private.createRenameNode(oldPath) });\n        this.addClass(FILE_DIALOG_CLASS);\n        const ext = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.extname(oldPath);\n        const value = (this.inputNode.value = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(oldPath));\n        this.inputNode.setSelectionRange(0, value.length - ext.length);\n    }\n    /**\n     * Get the input text node.\n     */\n    get inputNode() {\n        return this.node.getElementsByTagName('input')[0];\n    }\n    /**\n     * Get the value of the widget.\n     */\n    getValue() {\n        return this.inputNode.value;\n    }\n}\n/**\n * A namespace for private data.\n */\nvar Private;\n(function (Private) {\n    /**\n     * Create the node for a rename handler.\n     */\n    function createRenameNode(oldPath, translator) {\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n        const trans = translator.load('jupyterlab');\n        const body = document.createElement('div');\n        const existingLabel = document.createElement('label');\n        existingLabel.textContent = trans.__('File Path');\n        const existingPath = document.createElement('span');\n        existingPath.textContent = oldPath;\n        const nameTitle = document.createElement('label');\n        nameTitle.textContent = trans.__('New Name');\n        nameTitle.className = RENAME_NEW_NAME_TITLE_CLASS;\n        const name = document.createElement('input');\n        body.appendChild(existingLabel);\n        body.appendChild(existingPath);\n        body.appendChild(nameTitle);\n        body.appendChild(name);\n        return body;\n    }\n    Private.createRenameNode = createRenameNode;\n})(Private || (Private = {}));\n//# sourceMappingURL=dialogs.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docmanager/lib/dialogs.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"isValidFileName\": () => (/* reexport safe */ _dialogs__WEBPACK_IMPORTED_MODULE_0__.isValidFileName),\n/* harmony export */   \"renameDialog\": () => (/* reexport safe */ _dialogs__WEBPACK_IMPORTED_MODULE_0__.renameDialog),\n/* harmony export */   \"renameFile\": () => (/* reexport safe */ _dialogs__WEBPACK_IMPORTED_MODULE_0__.renameFile),\n/* harmony export */   \"shouldOverwrite\": () => (/* reexport safe */ _dialogs__WEBPACK_IMPORTED_MODULE_0__.shouldOverwrite),\n/* harmony export */   \"DocumentManager\": () => (/* reexport safe */ _manager__WEBPACK_IMPORTED_MODULE_1__.DocumentManager),\n/* harmony export */   \"PathStatus\": () => (/* reexport safe */ _pathstatus__WEBPACK_IMPORTED_MODULE_2__.PathStatus),\n/* harmony export */   \"SaveHandler\": () => (/* reexport safe */ _savehandler__WEBPACK_IMPORTED_MODULE_3__.SaveHandler),\n/* harmony export */   \"SavingStatus\": () => (/* reexport safe */ _savingstatus__WEBPACK_IMPORTED_MODULE_4__.SavingStatus),\n/* harmony export */   \"IDocumentManager\": () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_5__.IDocumentManager),\n/* harmony export */   \"DocumentWidgetManager\": () => (/* reexport safe */ _widgetmanager__WEBPACK_IMPORTED_MODULE_6__.DocumentWidgetManager)\n/* harmony export */ });\n/* harmony import */ var _dialogs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dialogs */ \"../node_modules/@jupyterlab/docmanager/lib/dialogs.js\");\n/* harmony import */ var _manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./manager */ \"../node_modules/@jupyterlab/docmanager/lib/manager.js\");\n/* harmony import */ var _pathstatus__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pathstatus */ \"../node_modules/@jupyterlab/docmanager/lib/pathstatus.js\");\n/* harmony import */ var _savehandler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./savehandler */ \"../node_modules/@jupyterlab/docmanager/lib/savehandler.js\");\n/* harmony import */ var _savingstatus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./savingstatus */ \"../node_modules/@jupyterlab/docmanager/lib/savingstatus.js\");\n/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./tokens */ \"../node_modules/@jupyterlab/docmanager/lib/tokens.js\");\n/* harmony import */ var _widgetmanager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./widgetmanager */ \"../node_modules/@jupyterlab/docmanager/lib/widgetmanager.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module docmanager\n */\n\n\n\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docmanager/lib/index.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"DocumentManager\": () => (/* binding */ DocumentManager)\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_docregistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/docregistry */ \"webpack/sharing/consume/default/@jupyterlab/docregistry/@jupyterlab/docregistry\");\n/* harmony import */ var _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_docregistry__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_algorithm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @lumino/algorithm */ \"webpack/sharing/consume/default/@lumino/algorithm/@lumino/algorithm\");\n/* harmony import */ var _lumino_algorithm__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_lumino_algorithm__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_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @lumino/properties */ \"webpack/sharing/consume/default/@lumino/properties/@lumino/properties\");\n/* harmony import */ var _lumino_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_lumino_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _savehandler__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./savehandler */ \"../node_modules/@jupyterlab/docmanager/lib/savehandler.js\");\n/* harmony import */ var _widgetmanager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./widgetmanager */ \"../node_modules/@jupyterlab/docmanager/lib/widgetmanager.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/**\n * The document manager.\n *\n * #### Notes\n * The document manager is used to register model and widget creators,\n * and the file browser uses the document manager to create widgets. The\n * document manager maintains a context for each path and model type that is\n * open, and a list of widgets for each context. The document manager is in\n * control of the proper closing and disposal of the widgets and contexts.\n */\nclass DocumentManager {\n    /**\n     * Construct a new document manager.\n     */\n    constructor(options) {\n        this._activateRequested = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n        this._contexts = [];\n        this._isDisposed = false;\n        this._autosave = true;\n        this._autosaveInterval = 120;\n        this.translator = options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_3__.nullTranslator;\n        this.registry = options.registry;\n        this.services = options.manager;\n        this._collaborative = !!options.collaborative;\n        this._dialogs = options.sessionDialogs || _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.sessionContextDialogs;\n        this._docProviderFactory = options.docProviderFactory;\n        this._opener = options.opener;\n        this._when = options.when || options.manager.ready;\n        const widgetManager = new _widgetmanager__WEBPACK_IMPORTED_MODULE_8__.DocumentWidgetManager({\n            registry: this.registry,\n            translator: this.translator\n        });\n        widgetManager.activateRequested.connect(this._onActivateRequested, this);\n        this._widgetManager = widgetManager;\n        this._setBusy = options.setBusy;\n    }\n    /**\n     * A signal emitted when one of the documents is activated.\n     */\n    get activateRequested() {\n        return this._activateRequested;\n    }\n    /**\n     * Whether to autosave documents.\n     */\n    get autosave() {\n        return this._autosave;\n    }\n    set autosave(value) {\n        this._autosave = value;\n        // For each existing context, start/stop the autosave handler as needed.\n        this._contexts.forEach(context => {\n            const handler = Private.saveHandlerProperty.get(context);\n            if (!handler) {\n                return;\n            }\n            if (value === true && !handler.isActive) {\n                handler.start();\n            }\n            else if (value === false && handler.isActive) {\n                handler.stop();\n            }\n        });\n    }\n    /**\n     * Determines the time interval for autosave in seconds.\n     */\n    get autosaveInterval() {\n        return this._autosaveInterval;\n    }\n    set autosaveInterval(value) {\n        this._autosaveInterval = value;\n        // For each existing context, set the save interval as needed.\n        this._contexts.forEach(context => {\n            const handler = Private.saveHandlerProperty.get(context);\n            if (!handler) {\n                return;\n            }\n            handler.saveInterval = value || 120;\n        });\n    }\n    /**\n     * Get whether the document manager has been disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources held by the document manager.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        // Clear any listeners for our signals.\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal.clearData(this);\n        // Close all the widgets for our contexts and dispose the widget manager.\n        this._contexts.forEach(context => {\n            return this._widgetManager.closeWidgets(context);\n        });\n        this._widgetManager.dispose();\n        // Clear the context list.\n        this._contexts.length = 0;\n    }\n    /**\n     * Clone a widget.\n     *\n     * @param widget - The source widget.\n     *\n     * @returns A new widget or `undefined`.\n     *\n     * #### Notes\n     *  Uses the same widget factory and context as the source, or returns\n     *  `undefined` if the source widget is not managed by this manager.\n     */\n    cloneWidget(widget) {\n        return this._widgetManager.cloneWidget(widget);\n    }\n    /**\n     * Close all of the open documents.\n     *\n     * @returns A promise resolving when the widgets are closed.\n     */\n    closeAll() {\n        return Promise.all(this._contexts.map(context => this._widgetManager.closeWidgets(context))).then(() => undefined);\n    }\n    /**\n     * Close the widgets associated with a given path.\n     *\n     * @param path - The target path.\n     *\n     * @returns A promise resolving when the widgets are closed.\n     */\n    closeFile(path) {\n        const close = this._contextsForPath(path).map(c => this._widgetManager.closeWidgets(c));\n        return Promise.all(close).then(x => undefined);\n    }\n    /**\n     * Get the document context for a widget.\n     *\n     * @param widget - The widget of interest.\n     *\n     * @returns The context associated with the widget, or `undefined` if no such\n     * context exists.\n     */\n    contextForWidget(widget) {\n        return this._widgetManager.contextForWidget(widget);\n    }\n    /**\n     * Copy a file.\n     *\n     * @param fromFile - The full path of the original file.\n     *\n     * @param toDir - The full path to the target directory.\n     *\n     * @returns A promise which resolves to the contents of the file.\n     */\n    copy(fromFile, toDir) {\n        return this.services.contents.copy(fromFile, toDir);\n    }\n    /**\n     * Create a new file and return the widget used to view it.\n     *\n     * @param path - The file path to create.\n     *\n     * @param widgetName - The name of the widget factory to use. 'default' will use the default widget.\n     *\n     * @param kernel - An optional kernel name/id to override the default.\n     *\n     * @returns The created widget, or `undefined`.\n     *\n     * #### Notes\n     * This function will return `undefined` if a valid widget factory\n     * cannot be found.\n     */\n    createNew(path, widgetName = 'default', kernel) {\n        return this._createOrOpenDocument('create', path, widgetName, kernel);\n    }\n    /**\n     * Delete a file.\n     *\n     * @param path - The full path to the file to be deleted.\n     *\n     * @returns A promise which resolves when the file is deleted.\n     *\n     * #### Notes\n     * If there is a running session associated with the file and no other\n     * sessions are using the kernel, the session will be shut down.\n     */\n    deleteFile(path) {\n        return this.services.sessions\n            .stopIfNeeded(path)\n            .then(() => {\n            return this.services.contents.delete(path);\n        })\n            .then(() => {\n            this._contextsForPath(path).forEach(context => this._widgetManager.deleteWidgets(context));\n            return Promise.resolve(void 0);\n        });\n    }\n    /**\n     * See if a widget already exists for the given path and widget name.\n     *\n     * @param path - The file path to use.\n     *\n     * @param widgetName - The name of the widget factory to use. 'default' will use the default widget.\n     *\n     * @returns The found widget, or `undefined`.\n     *\n     * #### Notes\n     * This can be used to find an existing widget instead of opening\n     * a new widget.\n     */\n    findWidget(path, widgetName = 'default') {\n        const newPath = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.normalize(path);\n        let widgetNames = [widgetName];\n        if (widgetName === 'default') {\n            const factory = this.registry.defaultWidgetFactory(newPath);\n            if (!factory) {\n                return undefined;\n            }\n            widgetNames = [factory.name];\n        }\n        else if (widgetName === null) {\n            widgetNames = this.registry\n                .preferredWidgetFactories(newPath)\n                .map(f => f.name);\n        }\n        for (const context of this._contextsForPath(newPath)) {\n            for (const widgetName of widgetNames) {\n                if (widgetName !== null) {\n                    const widget = this._widgetManager.findWidget(context, widgetName);\n                    if (widget) {\n                        return widget;\n                    }\n                }\n            }\n        }\n        return undefined;\n    }\n    /**\n     * Create a new untitled file.\n     *\n     * @param options - The file content creation options.\n     */\n    newUntitled(options) {\n        if (options.type === 'file') {\n            options.ext = options.ext || '.txt';\n        }\n        return this.services.contents.newUntitled(options);\n    }\n    /**\n     * Open a file and return the widget used to view it.\n     *\n     * @param path - The file path to open.\n     *\n     * @param widgetName - The name of the widget factory to use. 'default' will use the default widget.\n     *\n     * @param kernel - An optional kernel name/id to override the default.\n     *\n     * @returns The created widget, or `undefined`.\n     *\n     * #### Notes\n     * This function will return `undefined` if a valid widget factory\n     * cannot be found.\n     */\n    open(path, widgetName = 'default', kernel, options) {\n        return this._createOrOpenDocument('open', path, widgetName, kernel, options);\n    }\n    /**\n     * Open a file and return the widget used to view it.\n     * Reveals an already existing editor.\n     *\n     * @param path - The file path to open.\n     *\n     * @param widgetName - The name of the widget factory to use. 'default' will use the default widget.\n     *\n     * @param kernel - An optional kernel name/id to override the default.\n     *\n     * @returns The created widget, or `undefined`.\n     *\n     * #### Notes\n     * This function will return `undefined` if a valid widget factory\n     * cannot be found.\n     */\n    openOrReveal(path, widgetName = 'default', kernel, options) {\n        const widget = this.findWidget(path, widgetName);\n        if (widget) {\n            this._opener.open(widget, options || {});\n            return widget;\n        }\n        return this.open(path, widgetName, kernel, options || {});\n    }\n    /**\n     * Overwrite a file.\n     *\n     * @param oldPath - The full path to the original file.\n     *\n     * @param newPath - The full path to the new file.\n     *\n     * @returns A promise containing the new file contents model.\n     */\n    overwrite(oldPath, newPath) {\n        // Cleanly overwrite the file by moving it, making sure the original does\n        // not exist, and then renaming to the new path.\n        const tempPath = `${newPath}.${_lumino_coreutils__WEBPACK_IMPORTED_MODULE_5__.UUID.uuid4()}`;\n        const cb = () => this.rename(tempPath, newPath);\n        return this.rename(oldPath, tempPath)\n            .then(() => {\n            return this.deleteFile(newPath);\n        })\n            .then(cb, cb);\n    }\n    /**\n     * Rename a file or directory.\n     *\n     * @param oldPath - The full path to the original file.\n     *\n     * @param newPath - The full path to the new file.\n     *\n     * @returns A promise containing the new file contents model.  The promise\n     * will reject if the newPath already exists.  Use [[overwrite]] to overwrite\n     * a file.\n     */\n    rename(oldPath, newPath) {\n        return this.services.contents.rename(oldPath, newPath);\n    }\n    /**\n     * Find a context for a given path and factory name.\n     */\n    _findContext(path, factoryName) {\n        const normalizedPath = this.services.contents.normalize(path);\n        return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_4__.find)(this._contexts, context => {\n            return (context.path === normalizedPath && context.factoryName === factoryName);\n        });\n    }\n    /**\n     * Get the contexts for a given path.\n     *\n     * #### Notes\n     * There may be more than one context for a given path if the path is open\n     * with multiple model factories (for example, a notebook can be open with a\n     * notebook model factory and a text model factory).\n     */\n    _contextsForPath(path) {\n        const normalizedPath = this.services.contents.normalize(path);\n        return this._contexts.filter(context => context.path === normalizedPath);\n    }\n    /**\n     * Create a context from a path and a model factory.\n     */\n    _createContext(path, factory, kernelPreference) {\n        // TODO: Make it impossible to open two different contexts for the same\n        // path. Or at least prompt the closing of all widgets associated with the\n        // old context before opening the new context. This will make things much\n        // more consistent for the users, at the cost of some confusion about what\n        // models are and why sometimes they cannot open the same file in different\n        // widgets that have different models.\n        // Allow options to be passed when adding a sibling.\n        const adopter = (widget, options) => {\n            this._widgetManager.adoptWidget(context, widget);\n            this._opener.open(widget, options);\n        };\n        const modelDBFactory = this.services.contents.getModelDBFactory(path) || undefined;\n        const context = new _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_2__.Context({\n            opener: adopter,\n            manager: this.services,\n            factory,\n            path,\n            kernelPreference,\n            modelDBFactory,\n            setBusy: this._setBusy,\n            sessionDialogs: this._dialogs,\n            collaborative: this._collaborative,\n            docProviderFactory: this._docProviderFactory\n        });\n        const handler = new _savehandler__WEBPACK_IMPORTED_MODULE_9__.SaveHandler({\n            context,\n            saveInterval: this.autosaveInterval\n        });\n        Private.saveHandlerProperty.set(context, handler);\n        void context.ready.then(() => {\n            if (this.autosave) {\n                handler.start();\n            }\n        });\n        context.disposed.connect(this._onContextDisposed, this);\n        this._contexts.push(context);\n        return context;\n    }\n    /**\n     * Handle a context disposal.\n     */\n    _onContextDisposed(context) {\n        _lumino_algorithm__WEBPACK_IMPORTED_MODULE_4__.ArrayExt.removeFirstOf(this._contexts, context);\n    }\n    /**\n     * Get the widget factory for a given widget name.\n     */\n    _widgetFactoryFor(path, widgetName) {\n        const { registry } = this;\n        if (widgetName === 'default') {\n            const factory = registry.defaultWidgetFactory(path);\n            if (!factory) {\n                return undefined;\n            }\n            widgetName = factory.name;\n        }\n        return registry.getWidgetFactory(widgetName);\n    }\n    /**\n     * Creates a new document, or loads one from disk, depending on the `which` argument.\n     * If `which==='create'`, then it creates a new document. If `which==='open'`,\n     * then it loads the document from disk.\n     *\n     * The two cases differ in how the document context is handled, but the creation\n     * of the widget and launching of the kernel are identical.\n     */\n    _createOrOpenDocument(which, path, widgetName = 'default', kernel, options) {\n        const widgetFactory = this._widgetFactoryFor(path, widgetName);\n        if (!widgetFactory) {\n            return undefined;\n        }\n        const modelName = widgetFactory.modelName || 'text';\n        const factory = this.registry.getModelFactory(modelName);\n        if (!factory) {\n            return undefined;\n        }\n        // Handle the kernel preference.\n        const preference = this.registry.getKernelPreference(path, widgetFactory.name, kernel);\n        let context;\n        let ready = Promise.resolve(undefined);\n        // Handle the load-from-disk case\n        if (which === 'open') {\n            // Use an existing context if available.\n            context = this._findContext(path, factory.name) || null;\n            if (!context) {\n                context = this._createContext(path, factory, preference);\n                // Populate the model, either from disk or a\n                // model backend.\n                ready = this._when.then(() => context.initialize(false));\n            }\n        }\n        else if (which === 'create') {\n            context = this._createContext(path, factory, preference);\n            // Immediately save the contents to disk.\n            ready = this._when.then(() => context.initialize(true));\n        }\n        else {\n            throw new Error(`Invalid argument 'which': ${which}`);\n        }\n        const widget = this._widgetManager.createWidget(widgetFactory, context);\n        this._opener.open(widget, options || {});\n        // If the initial opening of the context fails, dispose of the widget.\n        ready.catch(err => {\n            widget.close();\n        });\n        return widget;\n    }\n    /**\n     * Handle an activateRequested signal from the widget manager.\n     */\n    _onActivateRequested(sender, args) {\n        this._activateRequested.emit(args);\n    }\n}\n/**\n * A namespace for private data.\n */\nvar Private;\n(function (Private) {\n    /**\n     * An attached property for a context save handler.\n     */\n    Private.saveHandlerProperty = new _lumino_properties__WEBPACK_IMPORTED_MODULE_6__.AttachedProperty({\n        name: 'saveHandler',\n        create: () => undefined\n    });\n})(Private || (Private = {}));\n//# sourceMappingURL=manager.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docmanager/lib/manager.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"PathStatus\": () => (/* binding */ PathStatus)\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_statusbar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/statusbar */ \"webpack/sharing/consume/default/@jupyterlab/statusbar/@jupyterlab/statusbar\");\n/* harmony import */ var _jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n/**\n * A pure component for rendering a file path (or activity name).\n *\n * @param props - the props for the component.\n *\n * @returns a tsx component for a file path.\n */\nfunction PathStatusComponent(props) {\n    return react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_2__.TextItem, { source: props.name, title: props.fullPath });\n}\n/**\n * A status bar item for the current file path (or activity name).\n */\nclass PathStatus extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.VDomRenderer {\n    /**\n     * Construct a new PathStatus status item.\n     */\n    constructor(opts) {\n        super(new PathStatus.Model(opts.docManager));\n        this.node.title = this.model.path;\n    }\n    /**\n     * Render the status item.\n     */\n    render() {\n        return (react__WEBPACK_IMPORTED_MODULE_3___default().createElement(PathStatusComponent, { fullPath: this.model.path, name: this.model.name }));\n    }\n}\n/**\n * A namespace for PathStatus statics.\n */\n(function (PathStatus) {\n    /**\n     * A VDomModel for rendering the PathStatus status item.\n     */\n    class Model extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.VDomModel {\n        /**\n         * Construct a new model.\n         *\n         * @param docManager: the application document manager. Used to check\n         *   whether the current widget is a document.\n         */\n        constructor(docManager) {\n            super();\n            /**\n             * React to a title change for the current widget.\n             */\n            this._onTitleChange = (title) => {\n                const oldState = this._getAllState();\n                this._name = title.label;\n                this._triggerChange(oldState, this._getAllState());\n            };\n            /**\n             * React to a path change for the current document.\n             */\n            this._onPathChange = (_documentModel, newPath) => {\n                const oldState = this._getAllState();\n                this._path = newPath;\n                this._name = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(newPath);\n                this._triggerChange(oldState, this._getAllState());\n            };\n            this._path = '';\n            this._name = '';\n            this._widget = null;\n            this._docManager = docManager;\n        }\n        /**\n         * The current path for the application.\n         */\n        get path() {\n            return this._path;\n        }\n        /**\n         * The name of the current activity.\n         */\n        get name() {\n            return this._name;\n        }\n        /**\n         * The current widget for the application.\n         */\n        get widget() {\n            return this._widget;\n        }\n        set widget(widget) {\n            const oldWidget = this._widget;\n            if (oldWidget !== null) {\n                const oldContext = this._docManager.contextForWidget(oldWidget);\n                if (oldContext) {\n                    oldContext.pathChanged.disconnect(this._onPathChange);\n                }\n                else {\n                    oldWidget.title.changed.disconnect(this._onTitleChange);\n                }\n            }\n            const oldState = this._getAllState();\n            this._widget = widget;\n            if (this._widget === null) {\n                this._path = '';\n                this._name = '';\n            }\n            else {\n                const widgetContext = this._docManager.contextForWidget(this._widget);\n                if (widgetContext) {\n                    this._path = widgetContext.path;\n                    this._name = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.PathExt.basename(widgetContext.path);\n                    widgetContext.pathChanged.connect(this._onPathChange);\n                }\n                else {\n                    this._path = '';\n                    this._name = this._widget.title.label;\n                    this._widget.title.changed.connect(this._onTitleChange);\n                }\n            }\n            this._triggerChange(oldState, this._getAllState());\n        }\n        /**\n         * Get the current state of the model.\n         */\n        _getAllState() {\n            return [this._path, this._name];\n        }\n        /**\n         * Trigger a state change to rerender.\n         */\n        _triggerChange(oldState, newState) {\n            if (oldState[0] !== newState[0] || oldState[1] !== newState[1]) {\n                this.stateChanged.emit(void 0);\n            }\n        }\n    }\n    PathStatus.Model = Model;\n})(PathStatus || (PathStatus = {}));\n//# sourceMappingURL=pathstatus.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docmanager/lib/pathstatus.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"SaveHandler\": () => (/* binding */ SaveHandler)\n/* harmony export */ });\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_0__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n/**\n * A class that manages the auto saving of a document.\n *\n * #### Notes\n * Implements https://github.com/ipython/ipython/wiki/IPEP-15:-Autosaving-the-IPython-Notebook.\n */\nclass SaveHandler {\n    /**\n     * Construct a new save handler.\n     */\n    constructor(options) {\n        this._autosaveTimer = -1;\n        this._minInterval = -1;\n        this._interval = -1;\n        this._isActive = false;\n        this._inDialog = false;\n        this._isDisposed = false;\n        this._multiplier = 10;\n        this._context = options.context;\n        const interval = options.saveInterval || 120;\n        this._minInterval = interval * 1000;\n        this._interval = this._minInterval;\n        // Restart the timer when the contents model is updated.\n        this._context.fileChanged.connect(this._setTimer, this);\n        this._context.disposed.connect(this.dispose, this);\n    }\n    /**\n     * The save interval used by the timer (in seconds).\n     */\n    get saveInterval() {\n        return this._interval / 1000;\n    }\n    set saveInterval(value) {\n        this._minInterval = this._interval = value * 1000;\n        if (this._isActive) {\n            this._setTimer();\n        }\n    }\n    /**\n     * Get whether the handler is active.\n     */\n    get isActive() {\n        return this._isActive;\n    }\n    /**\n     * Get whether the save handler is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources used by the save handler.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        clearTimeout(this._autosaveTimer);\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_0__.Signal.clearData(this);\n    }\n    /**\n     * Start the autosaver.\n     */\n    start() {\n        this._isActive = true;\n        this._setTimer();\n    }\n    /**\n     * Stop the autosaver.\n     */\n    stop() {\n        this._isActive = false;\n        clearTimeout(this._autosaveTimer);\n    }\n    /**\n     * Set the timer.\n     */\n    _setTimer() {\n        clearTimeout(this._autosaveTimer);\n        if (!this._isActive) {\n            return;\n        }\n        this._autosaveTimer = window.setTimeout(() => {\n            this._save();\n        }, this._interval);\n    }\n    /**\n     * Handle an autosave timeout.\n     */\n    _save() {\n        const context = this._context;\n        // Trigger the next update.\n        this._setTimer();\n        if (!context) {\n            return;\n        }\n        // Bail if the model is not dirty or the file is not writable, or the dialog\n        // is already showing.\n        const writable = context.contentsModel && context.contentsModel.writable;\n        if (!writable || !context.model.dirty || this._inDialog) {\n            return;\n        }\n        const start = new Date().getTime();\n        context\n            .save()\n            .then(() => {\n            if (this.isDisposed) {\n                return;\n            }\n            const duration = new Date().getTime() - start;\n            // New save interval: higher of 10x save duration or min interval.\n            this._interval = Math.max(this._multiplier * duration, this._minInterval);\n            // Restart the update to pick up the new interval.\n            this._setTimer();\n        })\n            .catch(err => {\n            // If the user canceled the save, do nothing.\n            // FIXME-TRANS: Is this affected by localization?\n            if (err.message === 'Cancel') {\n                return;\n            }\n            // Otherwise, log the error.\n            console.error('Error in Auto-Save', err.message);\n        });\n    }\n}\n//# sourceMappingURL=savehandler.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docmanager/lib/savehandler.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"SavingStatus\": () => (/* binding */ SavingStatus)\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_statusbar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/statusbar */ \"webpack/sharing/consume/default/@jupyterlab/statusbar/@jupyterlab/statusbar\");\n/* harmony import */ var _jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n\n\n/**\n * A pure functional component for a Saving status item.\n *\n * @param props - the props for the component.\n *\n * @returns a tsx component for rendering the saving state.\n */\nfunction SavingStatusComponent(props) {\n    const translator = props.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n    const trans = translator.load('jupyterlab');\n    return react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_jupyterlab_statusbar__WEBPACK_IMPORTED_MODULE_1__.TextItem, { source: trans.__('Saving %1', props.fileStatus) });\n}\n/**\n * The amount of time (in ms) to retain the saving completed message\n * before hiding the status item.\n */\nconst SAVING_COMPLETE_MESSAGE_MILLIS = 2000;\n/**\n * A VDomRenderer for a saving status item.\n */\nclass SavingStatus extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.VDomRenderer {\n    /**\n     * Create a new SavingStatus item.\n     */\n    constructor(opts) {\n        super(new SavingStatus.Model(opts.docManager));\n        this.translator = opts.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n    }\n    /**\n     * Render the SavingStatus item.\n     */\n    render() {\n        if (this.model === null || this.model.status === null) {\n            return null;\n        }\n        else {\n            return (react__WEBPACK_IMPORTED_MODULE_3___default().createElement(SavingStatusComponent, { fileStatus: this.model.status, translator: this.translator }));\n        }\n    }\n}\n/**\n * A namespace for SavingStatus statics.\n */\n(function (SavingStatus) {\n    /**\n     * A VDomModel for the SavingStatus item.\n     */\n    class Model extends _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.VDomModel {\n        /**\n         * Create a new SavingStatus model.\n         */\n        constructor(docManager) {\n            super();\n            /**\n             * React to a saving status change from the current document widget.\n             */\n            this._onStatusChange = (_documentModel, newStatus) => {\n                this._status = newStatus;\n                if (this._status === 'completed') {\n                    setTimeout(() => {\n                        this._status = null;\n                        this.stateChanged.emit(void 0);\n                    }, SAVING_COMPLETE_MESSAGE_MILLIS);\n                    this.stateChanged.emit(void 0);\n                }\n                else {\n                    this.stateChanged.emit(void 0);\n                }\n            };\n            this._status = null;\n            this._widget = null;\n            this._status = null;\n            this.widget = null;\n            this._docManager = docManager;\n        }\n        /**\n         * The current status of the model.\n         */\n        get status() {\n            return this._status;\n        }\n        /**\n         * The current widget for the model. Any widget can be assigned,\n         * but it only has any effect if the widget is an IDocument widget\n         * known to the application document manager.\n         */\n        get widget() {\n            return this._widget;\n        }\n        set widget(widget) {\n            const oldWidget = this._widget;\n            if (oldWidget !== null) {\n                const oldContext = this._docManager.contextForWidget(oldWidget);\n                if (oldContext) {\n                    oldContext.saveState.disconnect(this._onStatusChange);\n                }\n            }\n            this._widget = widget;\n            if (this._widget === null) {\n                this._status = null;\n            }\n            else {\n                const widgetContext = this._docManager.contextForWidget(this._widget);\n                if (widgetContext) {\n                    widgetContext.saveState.connect(this._onStatusChange);\n                }\n            }\n        }\n    }\n    SavingStatus.Model = Model;\n})(SavingStatus || (SavingStatus = {}));\n//# sourceMappingURL=savingstatus.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docmanager/lib/savingstatus.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"IDocumentManager\": () => (/* binding */ IDocumentManager)\n/* harmony export */ });\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n/* tslint:disable */\n/**\n * The document registry token.\n */\nconst IDocumentManager = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/docmanager:IDocumentManager');\n//# sourceMappingURL=tokens.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docmanager/lib/tokens.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"DocumentWidgetManager\": () => (/* binding */ DocumentWidgetManager)\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_translation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _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_messaging__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @lumino/messaging */ \"webpack/sharing/consume/default/@lumino/messaging/@lumino/messaging\");\n/* harmony import */ var _lumino_messaging__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_lumino_messaging__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _lumino_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @lumino/properties */ \"webpack/sharing/consume/default/@lumino/properties/@lumino/properties\");\n/* harmony import */ var _lumino_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_lumino_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__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 * The class name added to document widgets.\n */\nconst DOCUMENT_CLASS = 'jp-Document';\n/**\n * A class that maintains the lifecycle of file-backed widgets.\n */\nclass DocumentWidgetManager {\n    /**\n     * Construct a new document widget manager.\n     */\n    constructor(options) {\n        this._activateRequested = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal(this);\n        this._isDisposed = false;\n        this._registry = options.registry;\n        this.translator = options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n    }\n    /**\n     * A signal emitted when one of the documents is activated.\n     */\n    get activateRequested() {\n        return this._activateRequested;\n    }\n    /**\n     * Test whether the document widget manager is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose of the resources used by the widget manager.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_7__.Signal.disconnectReceiver(this);\n    }\n    /**\n     * Create a widget for a document and handle its lifecycle.\n     *\n     * @param factory - The widget factory.\n     *\n     * @param context - The document context object.\n     *\n     * @returns A widget created by the factory.\n     *\n     * @throws If the factory is not registered.\n     */\n    createWidget(factory, context) {\n        const widget = factory.createNew(context);\n        this._initializeWidget(widget, factory, context);\n        return widget;\n    }\n    /**\n     * When a new widget is created, we need to hook it up\n     * with some signals, update the widget extensions (for\n     * this kind of widget) in the docregistry, among\n     * other things.\n     */\n    _initializeWidget(widget, factory, context) {\n        Private.factoryProperty.set(widget, factory);\n        // Handle widget extensions.\n        const disposables = new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableSet();\n        (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.each)(this._registry.widgetExtensions(factory.name), extender => {\n            const disposable = extender.createNew(widget, context);\n            if (disposable) {\n                disposables.add(disposable);\n            }\n        });\n        Private.disposablesProperty.set(widget, disposables);\n        widget.disposed.connect(this._onWidgetDisposed, this);\n        this.adoptWidget(context, widget);\n        context.fileChanged.connect(this._onFileChanged, this);\n        context.pathChanged.connect(this._onPathChanged, this);\n        void context.ready.then(() => {\n            void this.setCaption(widget);\n        });\n    }\n    /**\n     * Install the message hook for the widget and add to list\n     * of known widgets.\n     *\n     * @param context - The document context object.\n     *\n     * @param widget - The widget to adopt.\n     */\n    adoptWidget(context, widget) {\n        const widgets = Private.widgetsProperty.get(context);\n        widgets.push(widget);\n        _lumino_messaging__WEBPACK_IMPORTED_MODULE_5__.MessageLoop.installMessageHook(widget, this);\n        widget.addClass(DOCUMENT_CLASS);\n        widget.title.closable = true;\n        widget.disposed.connect(this._widgetDisposed, this);\n        Private.contextProperty.set(widget, context);\n    }\n    /**\n     * See if a widget already exists for the given context and widget name.\n     *\n     * @param context - The document context object.\n     *\n     * @returns The found widget, or `undefined`.\n     *\n     * #### Notes\n     * This can be used to use an existing widget instead of opening\n     * a new widget.\n     */\n    findWidget(context, widgetName) {\n        const widgets = Private.widgetsProperty.get(context);\n        if (!widgets) {\n            return undefined;\n        }\n        return (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.find)(widgets, widget => {\n            const factory = Private.factoryProperty.get(widget);\n            if (!factory) {\n                return false;\n            }\n            return factory.name === widgetName;\n        });\n    }\n    /**\n     * Get the document context for a widget.\n     *\n     * @param widget - The widget of interest.\n     *\n     * @returns The context associated with the widget, or `undefined`.\n     */\n    contextForWidget(widget) {\n        return Private.contextProperty.get(widget);\n    }\n    /**\n     * Clone a widget.\n     *\n     * @param widget - The source widget.\n     *\n     * @returns A new widget or `undefined`.\n     *\n     * #### Notes\n     *  Uses the same widget factory and context as the source, or throws\n     *  if the source widget is not managed by this manager.\n     */\n    cloneWidget(widget) {\n        const context = Private.contextProperty.get(widget);\n        if (!context) {\n            return undefined;\n        }\n        const factory = Private.factoryProperty.get(widget);\n        if (!factory) {\n            return undefined;\n        }\n        const newWidget = factory.createNew(context, widget);\n        this._initializeWidget(newWidget, factory, context);\n        return newWidget;\n    }\n    /**\n     * Close the widgets associated with a given context.\n     *\n     * @param context - The document context object.\n     */\n    closeWidgets(context) {\n        const widgets = Private.widgetsProperty.get(context);\n        return Promise.all((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.toArray)((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.map)(widgets, widget => this.onClose(widget)))).then(() => undefined);\n    }\n    /**\n     * Dispose of the widgets associated with a given context\n     * regardless of the widget's dirty state.\n     *\n     * @param context - The document context object.\n     */\n    deleteWidgets(context) {\n        const widgets = Private.widgetsProperty.get(context);\n        return Promise.all((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.toArray)((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.map)(widgets, widget => this.onDelete(widget)))).then(() => undefined);\n    }\n    /**\n     * Filter a message sent to a message handler.\n     *\n     * @param handler - The target handler of the message.\n     *\n     * @param msg - The message dispatched to the handler.\n     *\n     * @returns `false` if the message should be filtered, of `true`\n     *   if the message should be dispatched to the handler as normal.\n     */\n    messageHook(handler, msg) {\n        switch (msg.type) {\n            case 'close-request':\n                void this.onClose(handler);\n                return false;\n            case 'activate-request': {\n                const context = this.contextForWidget(handler);\n                if (context) {\n                    this._activateRequested.emit(context.path);\n                }\n                break;\n            }\n            default:\n                break;\n        }\n        return true;\n    }\n    /**\n     * Set the caption for widget title.\n     *\n     * @param widget - The target widget.\n     */\n    async setCaption(widget) {\n        const trans = this.translator.load('jupyterlab');\n        const context = Private.contextProperty.get(widget);\n        if (!context) {\n            return;\n        }\n        const model = context.contentsModel;\n        if (!model) {\n            widget.title.caption = '';\n            return;\n        }\n        return context\n            .listCheckpoints()\n            .then((checkpoints) => {\n            if (widget.isDisposed) {\n                return;\n            }\n            const last = checkpoints[checkpoints.length - 1];\n            const checkpoint = last ? _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.Time.format(last.last_modified) : 'None';\n            let caption = trans.__('Name: %1\\nPath: %2\\n', model.name, model.path);\n            if (context.model.readOnly) {\n                caption += trans.__('Read-only');\n            }\n            else {\n                caption +=\n                    trans.__('Last Saved: %1\\n', _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__.Time.format(model.last_modified)) +\n                        trans.__('Last Checkpoint: %1', checkpoint);\n            }\n            widget.title.caption = caption;\n        });\n    }\n    /**\n     * Handle `'close-request'` messages.\n     *\n     * @param widget - The target widget.\n     *\n     * @returns A promise that resolves with whether the widget was closed.\n     */\n    async onClose(widget) {\n        var _a;\n        // Handle dirty state.\n        const [shouldClose, ignoreSave] = await this._maybeClose(widget, this.translator);\n        if (widget.isDisposed) {\n            return true;\n        }\n        if (shouldClose) {\n            if (!ignoreSave) {\n                const context = Private.contextProperty.get(widget);\n                if (!context) {\n                    return true;\n                }\n                if ((_a = context.contentsModel) === null || _a === void 0 ? void 0 : _a.writable) {\n                    await context.save();\n                }\n                else {\n                    await context.saveAs();\n                }\n            }\n            if (widget.isDisposed) {\n                return true;\n            }\n            widget.dispose();\n        }\n        return shouldClose;\n    }\n    /**\n     * Dispose of widget regardless of widget's dirty state.\n     *\n     * @param widget - The target widget.\n     */\n    onDelete(widget) {\n        widget.dispose();\n        return Promise.resolve(void 0);\n    }\n    /**\n     * Ask the user whether to close an unsaved file.\n     */\n    _maybeClose(widget, translator) {\n        var _a;\n        translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_2__.nullTranslator;\n        const trans = translator.load('jupyterlab');\n        // Bail if the model is not dirty or other widgets are using the model.)\n        const context = Private.contextProperty.get(widget);\n        if (!context) {\n            return Promise.resolve([true, true]);\n        }\n        let widgets = Private.widgetsProperty.get(context);\n        if (!widgets) {\n            return Promise.resolve([true, true]);\n        }\n        // Filter by whether the factories are read only.\n        widgets = (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.toArray)((0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.filter)(widgets, widget => {\n            const factory = Private.factoryProperty.get(widget);\n            if (!factory) {\n                return false;\n            }\n            return factory.readOnly === false;\n        }));\n        const factory = Private.factoryProperty.get(widget);\n        if (!factory) {\n            return Promise.resolve([true, true]);\n        }\n        const model = context.model;\n        if (!model.dirty || widgets.length > 1 || factory.readOnly) {\n            return Promise.resolve([true, true]);\n        }\n        const fileName = widget.title.label;\n        const saveLabel = ((_a = context.contentsModel) === null || _a === void 0 ? void 0 : _a.writable) ? trans.__('Save')\n            : trans.__('Save as');\n        return (0,_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.showDialog)({\n            title: trans.__('Save your work'),\n            body: trans.__('Save changes in \"%1\" before closing?', fileName),\n            buttons: [\n                _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.cancelButton({ label: trans.__('Cancel') }),\n                _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.warnButton({ label: trans.__('Discard') }),\n                _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Dialog.okButton({ label: saveLabel })\n            ]\n        }).then(result => {\n            return [result.button.accept, result.button.displayType === 'warn'];\n        });\n    }\n    /**\n     * Handle the disposal of a widget.\n     */\n    _widgetDisposed(widget) {\n        const context = Private.contextProperty.get(widget);\n        if (!context) {\n            return;\n        }\n        const widgets = Private.widgetsProperty.get(context);\n        if (!widgets) {\n            return;\n        }\n        // Remove the widget.\n        _lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.ArrayExt.removeFirstOf(widgets, widget);\n        // Dispose of the context if this is the last widget using it.\n        if (!widgets.length) {\n            context.dispose();\n        }\n    }\n    /**\n     * Handle the disposal of a widget.\n     */\n    _onWidgetDisposed(widget) {\n        const disposables = Private.disposablesProperty.get(widget);\n        disposables.dispose();\n    }\n    /**\n     * Handle a file changed signal for a context.\n     */\n    _onFileChanged(context) {\n        const widgets = Private.widgetsProperty.get(context);\n        (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.each)(widgets, widget => {\n            void this.setCaption(widget);\n        });\n    }\n    /**\n     * Handle a path changed signal for a context.\n     */\n    _onPathChanged(context) {\n        const widgets = Private.widgetsProperty.get(context);\n        (0,_lumino_algorithm__WEBPACK_IMPORTED_MODULE_3__.each)(widgets, widget => {\n            void this.setCaption(widget);\n        });\n    }\n}\n/**\n * A private namespace for DocumentManager data.\n */\nvar Private;\n(function (Private) {\n    /**\n     * A private attached property for a widget context.\n     */\n    Private.contextProperty = new _lumino_properties__WEBPACK_IMPORTED_MODULE_6__.AttachedProperty({\n        name: 'context',\n        create: () => undefined\n    });\n    /**\n     * A private attached property for a widget factory.\n     */\n    Private.factoryProperty = new _lumino_properties__WEBPACK_IMPORTED_MODULE_6__.AttachedProperty({\n        name: 'factory',\n        create: () => undefined\n    });\n    /**\n     * A private attached property for the widgets associated with a context.\n     */\n    Private.widgetsProperty = new _lumino_properties__WEBPACK_IMPORTED_MODULE_6__.AttachedProperty({\n        name: 'widgets',\n        create: () => []\n    });\n    /**\n     * A private attached property for a widget's disposables.\n     */\n    Private.disposablesProperty = new _lumino_properties__WEBPACK_IMPORTED_MODULE_6__.AttachedProperty({\n        name: 'disposables',\n        create: () => new _lumino_disposable__WEBPACK_IMPORTED_MODULE_4__.DisposableSet()\n    });\n})(Private || (Private = {}));\n//# sourceMappingURL=widgetmanager.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/docmanager/lib/widgetmanager.js?");

/***/ })

}]);