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

/***/ "../node_modules/@lumino/application/dist/index.es6.js":
/*!*************************************************************!*\
  !*** ../node_modules/@lumino/application/dist/index.es6.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 */   Application: () => (/* binding */ Application)\n/* harmony export */ });\n/* harmony import */ var _lumino_commands__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lumino/commands */ \"webpack/sharing/consume/default/@lumino/commands/@lumino/commands\");\n/* harmony import */ var _lumino_commands__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_lumino_commands__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lumino/coreutils */ \"webpack/sharing/consume/default/@lumino/coreutils/@lumino/coreutils\");\n/* harmony import */ var _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/widgets */ \"webpack/sharing/consume/default/@lumino/widgets/@lumino/widgets\");\n/* harmony import */ var _lumino_widgets__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_widgets__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/*-----------------------------------------------------------------------------\n| Copyright (c) 2014-2017, PhosphorJS Contributors\n|\n| Distributed under the terms of the BSD 3-Clause License.\n|\n| The full license is in the file LICENSE, distributed with this software.\n|----------------------------------------------------------------------------*/\n/**\n * @packageDocumentation\n * @module application\n */\n/**\n * A class for creating pluggable applications.\n *\n * @typeParam T - The type of the application shell.\n *\n * #### Notes\n * The `Application` class is useful when creating large, complex\n * UI applications with the ability to be safely extended by third\n * party code via plugins.\n */\nclass Application {\n    /**\n     * Construct a new application.\n     *\n     * @param options - The options for creating the application.\n     */\n    constructor(options) {\n        var _a;\n        this._delegate = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.PromiseDelegate();\n        this._started = false;\n        this._bubblingKeydown = false;\n        this.pluginRegistry =\n            (_a = options.pluginRegistry) !== null && _a !== void 0 ? _a : new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_1__.PluginRegistry(options);\n        this.pluginRegistry.application = this;\n        // Initialize the application state.\n        this.commands = new _lumino_commands__WEBPACK_IMPORTED_MODULE_0__.CommandRegistry();\n        this.contextMenu = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.ContextMenu({\n            commands: this.commands,\n            renderer: options.contextMenuRenderer\n        });\n        this.shell = options.shell;\n    }\n    /**\n     * The list of all the deferred plugins.\n     */\n    get deferredPlugins() {\n        return this.pluginRegistry.deferredPlugins;\n    }\n    /**\n     * A promise which resolves after the application has started.\n     *\n     * #### Notes\n     * This promise will resolve after the `start()` method is called,\n     * when all the bootstrapping and shell mounting work is complete.\n     */\n    get started() {\n        return this._delegate.promise;\n    }\n    /**\n     * Activate all the deferred plugins.\n     *\n     * @returns A promise which will resolve when each plugin is activated\n     * or rejects with an error if one cannot be activated.\n     */\n    async activateDeferredPlugins() {\n        await this.pluginRegistry.activatePlugins('defer');\n    }\n    /**\n     * Activate the plugin with the given ID.\n     *\n     * @param id - The ID of the plugin of interest.\n     *\n     * @returns A promise which resolves when the plugin is activated\n     *   or rejects with an error if it cannot be activated.\n     */\n    async activatePlugin(id) {\n        return this.pluginRegistry.activatePlugin(id);\n    }\n    /**\n     * Deactivate the plugin and its downstream dependents if and only if the\n     * plugin and its dependents all support `deactivate`.\n     *\n     * @param id - The ID of the plugin of interest.\n     *\n     * @returns A list of IDs of downstream plugins deactivated with this one.\n     */\n    async deactivatePlugin(id) {\n        return this.pluginRegistry.deactivatePlugin(id);\n    }\n    /**\n     * Deregister a plugin with the application.\n     *\n     * @param id - The ID of the plugin of interest.\n     *\n     * @param force - Whether to deregister the plugin even if it is active.\n     */\n    deregisterPlugin(id, force) {\n        this.pluginRegistry.deregisterPlugin(id, force);\n    }\n    /**\n     * Get a plugin description.\n     *\n     * @param id - The ID of the plugin of interest.\n     *\n     * @returns The plugin description.\n     */\n    getPluginDescription(id) {\n        return this.pluginRegistry.getPluginDescription(id);\n    }\n    /**\n     * Test whether a plugin is registered with the application.\n     *\n     * @param id - The ID of the plugin of interest.\n     *\n     * @returns `true` if the plugin is registered, `false` otherwise.\n     */\n    hasPlugin(id) {\n        return this.pluginRegistry.hasPlugin(id);\n    }\n    /**\n     * Test whether a plugin is activated with the application.\n     *\n     * @param id - The ID of the plugin of interest.\n     *\n     * @returns `true` if the plugin is activated, `false` otherwise.\n     */\n    isPluginActivated(id) {\n        return this.pluginRegistry.isPluginActivated(id);\n    }\n    /**\n     * List the IDs of the plugins registered with the application.\n     *\n     * @returns A new array of the registered plugin IDs.\n     */\n    listPlugins() {\n        return this.pluginRegistry.listPlugins();\n    }\n    /**\n     * Register a plugin with the application.\n     *\n     * @param plugin - The plugin to register.\n     *\n     * #### Notes\n     * An error will be thrown if a plugin with the same ID is already\n     * registered, or if the plugin has a circular dependency.\n     *\n     * If the plugin provides a service which has already been provided\n     * by another plugin, the new service will override the old service.\n     */\n    registerPlugin(plugin) {\n        this.pluginRegistry.registerPlugin(plugin);\n    }\n    /**\n     * Register multiple plugins with the application.\n     *\n     * @param plugins - The plugins to register.\n     *\n     * #### Notes\n     * This calls `registerPlugin()` for each of the given plugins.\n     */\n    registerPlugins(plugins) {\n        this.pluginRegistry.registerPlugins(plugins);\n    }\n    /**\n     * Resolve an optional service of a given type.\n     *\n     * @param token - The token for the service type of interest.\n     *\n     * @returns A promise which resolves to an instance of the requested\n     *   service, or `null` if it cannot be resolved.\n     *\n     * #### Notes\n     * Services are singletons. The same instance will be returned each\n     * time a given service token is resolved.\n     *\n     * If the plugin which provides the service has not been activated,\n     * resolving the service will automatically activate the plugin.\n     *\n     * User code will not typically call this method directly. Instead,\n     * the optional services for the user's plugins will be resolved\n     * automatically when the plugin is activated.\n     */\n    async resolveOptionalService(token) {\n        return this.pluginRegistry.resolveOptionalService(token);\n    }\n    /**\n     * Resolve a required service of a given type.\n     *\n     * @param token - The token for the service type of interest.\n     *\n     * @returns A promise which resolves to an instance of the requested\n     *   service, or rejects with an error if it cannot be resolved.\n     *\n     * #### Notes\n     * Services are singletons. The same instance will be returned each\n     * time a given service token is resolved.\n     *\n     * If the plugin which provides the service has not been activated,\n     * resolving the service will automatically activate the plugin.\n     *\n     * User code will not typically call this method directly. Instead,\n     * the required services for the user's plugins will be resolved\n     * automatically when the plugin is activated.\n     */\n    async resolveRequiredService(token) {\n        return this.pluginRegistry.resolveRequiredService(token);\n    }\n    /**\n     * Start the application.\n     *\n     * @param options - The options for starting the application.\n     *\n     * @returns A promise which resolves when all bootstrapping work\n     *   is complete and the shell is mounted to the DOM.\n     *\n     * #### Notes\n     * This should be called once by the application creator after all\n     * initial plugins have been registered.\n     *\n     * If a plugin fails to the load, the error will be logged and the\n     * other valid plugins will continue to be loaded.\n     *\n     * Bootstrapping the application consists of the following steps:\n     * 1. Activate the startup plugins\n     * 2. Wait for those plugins to activate\n     * 3. Attach the shell widget to the DOM\n     * 4. Add the application event listeners\n     */\n    async start(options = {}) {\n        var _a, _b;\n        // Return immediately if the application is already started.\n        if (this._started) {\n            return this._delegate.promise;\n        }\n        // Mark the application as started;\n        this._started = true;\n        this._bubblingKeydown = (_a = options.bubblingKeydown) !== null && _a !== void 0 ? _a : false;\n        // Parse the host ID for attaching the shell.\n        const hostID = (_b = options.hostID) !== null && _b !== void 0 ? _b : '';\n        // Wait for the plugins to activate, then finalize startup.\n        await this.pluginRegistry.activatePlugins('startUp', options);\n        this.attachShell(hostID);\n        this.addEventListeners();\n        this._delegate.resolve();\n    }\n    /**\n     * Handle the DOM events for the application.\n     *\n     * @param event - The DOM event sent to the application.\n     *\n     * #### Notes\n     * This method implements the DOM `EventListener` interface and is\n     * called in response to events registered for the application. It\n     * should not be called directly by user code.\n     */\n    handleEvent(event) {\n        switch (event.type) {\n            case 'resize':\n                this.evtResize(event);\n                break;\n            case 'keydown':\n                this.evtKeydown(event);\n                break;\n            case 'keyup':\n                this.evtKeyup(event);\n                break;\n            case 'contextmenu':\n                this.evtContextMenu(event);\n                break;\n        }\n    }\n    /**\n     * Attach the application shell to the DOM.\n     *\n     * @param id - The ID of the host node for the shell, or `''`.\n     *\n     * #### Notes\n     * If the ID is not provided, the document body will be the host.\n     *\n     * A subclass may reimplement this method as needed.\n     */\n    attachShell(id) {\n        _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Widget.attach(this.shell, (id && document.getElementById(id)) || document.body);\n    }\n    /**\n     * Add the application event listeners.\n     *\n     * #### Notes\n     * The default implementation of this method adds listeners for\n     * `'keydown'` and `'resize'` events.\n     *\n     * A subclass may reimplement this method as needed.\n     */\n    addEventListeners() {\n        document.addEventListener('contextmenu', this);\n        document.addEventListener('keydown', this, !this._bubblingKeydown);\n        document.addEventListener('keyup', this, !this._bubblingKeydown);\n        window.addEventListener('resize', this);\n    }\n    /**\n     * A method invoked on a document `'keydown'` event.\n     *\n     * #### Notes\n     * The default implementation of this method invokes the key down\n     * processing method of the application command registry.\n     *\n     * A subclass may reimplement this method as needed.\n     */\n    evtKeydown(event) {\n        this.commands.processKeydownEvent(event);\n    }\n    /**\n     * A method invoked on a document `'keyup'` event.\n     *\n     * #### Notes\n     * The default implementation of this method invokes the key up\n     * processing method of the application command registry.\n     *\n     * A subclass may reimplement this method as needed.\n     */\n    evtKeyup(event) {\n        this.commands.processKeyupEvent(event);\n    }\n    /**\n     * A method invoked on a document `'contextmenu'` event.\n     *\n     * #### Notes\n     * The default implementation of this method opens the application\n     * `contextMenu` at the current mouse position.\n     *\n     * If the application context menu has no matching content *or* if\n     * the shift key is pressed, the default browser context menu will\n     * be opened instead.\n     *\n     * A subclass may reimplement this method as needed.\n     */\n    evtContextMenu(event) {\n        if (event.shiftKey) {\n            return;\n        }\n        if (this.contextMenu.open(event)) {\n            event.preventDefault();\n            event.stopPropagation();\n        }\n    }\n    /**\n     * A method invoked on a window `'resize'` event.\n     *\n     * #### Notes\n     * The default implementation of this method updates the shell.\n     *\n     * A subclass may reimplement this method as needed.\n     */\n    evtResize(event) {\n        this.shell.update();\n    }\n}\n\n\n//# sourceMappingURL=index.es6.js.map\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@lumino/application/dist/index.es6.js?");

/***/ })

}]);