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

/***/ "../node_modules/@jupyterlab/logconsole/lib/index.js":
/*!***********************************************************!*\
  !*** ../node_modules/@jupyterlab/logconsole/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 */   \"LogOutputModel\": () => (/* reexport safe */ _logger__WEBPACK_IMPORTED_MODULE_0__.LogOutputModel),\n/* harmony export */   \"Logger\": () => (/* reexport safe */ _logger__WEBPACK_IMPORTED_MODULE_0__.Logger),\n/* harmony export */   \"LoggerOutputAreaModel\": () => (/* reexport safe */ _logger__WEBPACK_IMPORTED_MODULE_0__.LoggerOutputAreaModel),\n/* harmony export */   \"LoggerRegistry\": () => (/* reexport safe */ _registry__WEBPACK_IMPORTED_MODULE_1__.LoggerRegistry),\n/* harmony export */   \"ILoggerRegistry\": () => (/* reexport safe */ _tokens__WEBPACK_IMPORTED_MODULE_2__.ILoggerRegistry),\n/* harmony export */   \"LogConsolePanel\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_3__.LogConsolePanel),\n/* harmony export */   \"ScrollingWidget\": () => (/* reexport safe */ _widget__WEBPACK_IMPORTED_MODULE_3__.ScrollingWidget)\n/* harmony export */ });\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./logger */ \"../node_modules/@jupyterlab/logconsole/lib/logger.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./registry */ \"../node_modules/@jupyterlab/logconsole/lib/registry.js\");\n/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tokens */ \"../node_modules/@jupyterlab/logconsole/lib/tokens.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget */ \"../node_modules/@jupyterlab/logconsole/lib/widget.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module logconsole\n */\n\n\n\n\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/logconsole/lib/index.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/logconsole/lib/logger.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/logconsole/lib/logger.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 */   \"LogOutputModel\": () => (/* binding */ LogOutputModel),\n/* harmony export */   \"LoggerOutputAreaModel\": () => (/* binding */ LoggerOutputAreaModel),\n/* harmony export */   \"Logger\": () => (/* binding */ Logger)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/outputarea */ \"webpack/sharing/consume/default/@jupyterlab/outputarea/@jupyterlab/outputarea\");\n/* harmony import */ var _jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/rendermime */ \"webpack/sharing/consume/default/@jupyterlab/rendermime/@jupyterlab/rendermime\");\n/* harmony import */ var _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_2__);\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\n\n\n\n/**\n * Log Output Model with timestamp which provides\n * item information for Output Area Model.\n */\nclass LogOutputModel extends _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__.OutputModel {\n    /**\n     * Construct a LogOutputModel.\n     *\n     * @param options - The model initialization options.\n     */\n    constructor(options) {\n        super(options);\n        this.timestamp = new Date(options.value.timestamp);\n        this.level = options.value.level;\n    }\n}\n/**\n * Implementation of `IContentFactory` for Output Area Model\n * which creates LogOutputModel instances.\n */\nclass LogConsoleModelContentFactory extends _jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0__.OutputAreaModel.ContentFactory {\n    /**\n     * Create a rendermime output model from notebook output.\n     */\n    createOutputModel(options) {\n        return new LogOutputModel(options);\n    }\n}\n/**\n * Output Area Model implementation which is able to\n * limit number of outputs stored.\n */\nclass LoggerOutputAreaModel extends _jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0__.OutputAreaModel {\n    constructor(_a) {\n        var { maxLength } = _a, options = __rest(_a, [\"maxLength\"]);\n        super(options);\n        this.maxLength = maxLength;\n    }\n    /**\n     * Add an output, which may be combined with previous output.\n     *\n     * @returns The total number of outputs.\n     *\n     * #### Notes\n     * The output bundle is copied. Contiguous stream outputs of the same `name`\n     * are combined. The oldest outputs are possibly removed to ensure the total\n     * number of outputs is at most `.maxLength`.\n     */\n    add(output) {\n        super.add(output);\n        this._applyMaxLength();\n        return this.length;\n    }\n    /**\n     * Whether an output should combine with the previous output.\n     *\n     * We combine if the two outputs are in the same second, which is the\n     * resolution for our time display.\n     */\n    shouldCombine(options) {\n        const { value, lastModel } = options;\n        const oldSeconds = Math.trunc(lastModel.timestamp.getTime() / 1000);\n        const newSeconds = Math.trunc(value.timestamp / 1000);\n        return oldSeconds === newSeconds;\n    }\n    /**\n     * Get an item at the specified index.\n     */\n    get(index) {\n        return super.get(index);\n    }\n    /**\n     * Maximum number of outputs to store in the model.\n     */\n    get maxLength() {\n        return this._maxLength;\n    }\n    set maxLength(value) {\n        this._maxLength = value;\n        this._applyMaxLength();\n    }\n    /**\n     * Manually apply length limit.\n     */\n    _applyMaxLength() {\n        if (this.list.length > this._maxLength) {\n            this.list.removeRange(0, this.list.length - this._maxLength);\n        }\n    }\n}\n/**\n * A concrete implementation of ILogger.\n */\nclass Logger {\n    /**\n     * Construct a Logger.\n     *\n     * @param source - The name of the log source.\n     */\n    constructor(options) {\n        this._isDisposed = false;\n        this._contentChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal(this);\n        this._stateChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal(this);\n        this._rendermime = null;\n        this._version = 0;\n        this._level = 'warning';\n        this.source = options.source;\n        this.outputAreaModel = new LoggerOutputAreaModel({\n            contentFactory: new LogConsoleModelContentFactory(),\n            maxLength: options.maxLength\n        });\n    }\n    /**\n     * The maximum number of outputs stored.\n     *\n     * #### Notes\n     * Oldest entries will be trimmed to ensure the length is at most\n     * `.maxLength`.\n     */\n    get maxLength() {\n        return this.outputAreaModel.maxLength;\n    }\n    set maxLength(value) {\n        this.outputAreaModel.maxLength = value;\n    }\n    /**\n     * The level of outputs logged\n     */\n    get level() {\n        return this._level;\n    }\n    set level(newValue) {\n        const oldValue = this._level;\n        if (oldValue === newValue) {\n            return;\n        }\n        this._level = newValue;\n        this._log({\n            output: {\n                output_type: 'display_data',\n                data: {\n                    'text/plain': `Log level set to ${newValue}`\n                }\n            },\n            level: 'metadata'\n        });\n        this._stateChanged.emit({ name: 'level', oldValue, newValue });\n    }\n    /**\n     * Number of outputs logged.\n     */\n    get length() {\n        return this.outputAreaModel.length;\n    }\n    /**\n     * A signal emitted when the list of log messages changes.\n     */\n    get contentChanged() {\n        return this._contentChanged;\n    }\n    /**\n     * A signal emitted when the log state changes.\n     */\n    get stateChanged() {\n        return this._stateChanged;\n    }\n    /**\n     * Rendermime to use when rendering outputs logged.\n     */\n    get rendermime() {\n        return this._rendermime;\n    }\n    set rendermime(value) {\n        if (value !== this._rendermime) {\n            const oldValue = this._rendermime;\n            const newValue = (this._rendermime = value);\n            this._stateChanged.emit({ name: 'rendermime', oldValue, newValue });\n        }\n    }\n    /**\n     * The number of messages that have ever been stored.\n     */\n    get version() {\n        return this._version;\n    }\n    /**\n     * Log an output to logger.\n     *\n     * @param log - The output to be logged.\n     */\n    log(log) {\n        // Filter by our current log level\n        if (Private.LogLevel[log.level] <\n            Private.LogLevel[this._level]) {\n            return;\n        }\n        let output = null;\n        switch (log.type) {\n            case 'text':\n                output = {\n                    output_type: 'display_data',\n                    data: {\n                        'text/plain': log.data\n                    }\n                };\n                break;\n            case 'html':\n                output = {\n                    output_type: 'display_data',\n                    data: {\n                        'text/html': log.data\n                    }\n                };\n                break;\n            case 'output':\n                output = log.data;\n                break;\n            default:\n                break;\n        }\n        if (output) {\n            this._log({\n                output,\n                level: log.level\n            });\n        }\n    }\n    /**\n     * Clear all outputs logged.\n     */\n    clear() {\n        this.outputAreaModel.clear(false);\n        this._contentChanged.emit('clear');\n    }\n    /**\n     * Add a checkpoint to the log.\n     */\n    checkpoint() {\n        this._log({\n            output: {\n                output_type: 'display_data',\n                data: {\n                    'text/html': '<hr/>'\n                }\n            },\n            level: 'metadata'\n        });\n    }\n    /**\n     * Whether the logger is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose the logger.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        this.clear();\n        this._rendermime = null;\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal.clearData(this);\n    }\n    _log(options) {\n        // First, make sure our version reflects the new message so things\n        // triggering from the signals below have the correct version.\n        this._version++;\n        // Next, trigger any displays of the message\n        this.outputAreaModel.add(Object.assign(Object.assign({}, options.output), { timestamp: Date.now(), level: options.level }));\n        // Finally, tell people that the message was appended (and possibly\n        // already displayed).\n        this._contentChanged.emit('append');\n    }\n}\nvar Private;\n(function (Private) {\n    let LogLevel;\n    (function (LogLevel) {\n        LogLevel[LogLevel[\"debug\"] = 0] = \"debug\";\n        LogLevel[LogLevel[\"info\"] = 1] = \"info\";\n        LogLevel[LogLevel[\"warning\"] = 2] = \"warning\";\n        LogLevel[LogLevel[\"error\"] = 3] = \"error\";\n        LogLevel[LogLevel[\"critical\"] = 4] = \"critical\";\n        LogLevel[LogLevel[\"metadata\"] = 5] = \"metadata\";\n    })(LogLevel = Private.LogLevel || (Private.LogLevel = {}));\n})(Private || (Private = {}));\n//# sourceMappingURL=logger.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/logconsole/lib/logger.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/logconsole/lib/registry.js":
/*!**************************************************************!*\
  !*** ../node_modules/@jupyterlab/logconsole/lib/registry.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 */   \"LoggerRegistry\": () => (/* binding */ LoggerRegistry)\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/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ \"../node_modules/@jupyterlab/logconsole/lib/logger.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n\n/**\n * A concrete implementation of ILoggerRegistry.\n */\nclass LoggerRegistry {\n    /**\n     * Construct a LoggerRegistry.\n     *\n     * @param defaultRendermime - Default rendermime to render outputs\n     * with when logger is not supplied with one.\n     */\n    constructor(options) {\n        this._loggers = new Map();\n        this._registryChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_0__.Signal(this);\n        this._isDisposed = false;\n        this._defaultRendermime = options.defaultRendermime;\n        this._maxLength = options.maxLength;\n    }\n    /**\n     * Get the logger for the specified source.\n     *\n     * @param source - The name of the log source.\n     *\n     * @returns The logger for the specified source.\n     */\n    getLogger(source) {\n        const loggers = this._loggers;\n        let logger = loggers.get(source);\n        if (logger) {\n            return logger;\n        }\n        logger = new _logger__WEBPACK_IMPORTED_MODULE_1__.Logger({ source, maxLength: this.maxLength });\n        logger.rendermime = this._defaultRendermime;\n        loggers.set(source, logger);\n        this._registryChanged.emit('append');\n        return logger;\n    }\n    /**\n     * Get all loggers registered.\n     *\n     * @returns The array containing all registered loggers.\n     */\n    getLoggers() {\n        return Array.from(this._loggers.values());\n    }\n    /**\n     * A signal emitted when the logger registry changes.\n     */\n    get registryChanged() {\n        return this._registryChanged;\n    }\n    /**\n     * The max length for loggers.\n     */\n    get maxLength() {\n        return this._maxLength;\n    }\n    set maxLength(value) {\n        this._maxLength = value;\n        this._loggers.forEach(logger => {\n            logger.maxLength = value;\n        });\n    }\n    /**\n     * Whether the register is disposed.\n     */\n    get isDisposed() {\n        return this._isDisposed;\n    }\n    /**\n     * Dispose the registry and all loggers.\n     */\n    dispose() {\n        if (this.isDisposed) {\n            return;\n        }\n        this._isDisposed = true;\n        this._loggers.forEach(x => x.dispose());\n        _lumino_signaling__WEBPACK_IMPORTED_MODULE_0__.Signal.clearData(this);\n    }\n}\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/logconsole/lib/registry.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/logconsole/lib/tokens.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/logconsole/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 */   \"ILoggerRegistry\": () => (/* binding */ ILoggerRegistry)\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 Logger Registry token.\n */\nconst ILoggerRegistry = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_0__.Token('@jupyterlab/logconsole:ILoggerRegistry');\n//# sourceMappingURL=tokens.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/logconsole/lib/tokens.js?");

/***/ }),

/***/ "../node_modules/@jupyterlab/logconsole/lib/widget.js":
/*!************************************************************!*\
  !*** ../node_modules/@jupyterlab/logconsole/lib/widget.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 */   \"ScrollingWidget\": () => (/* binding */ ScrollingWidget),\n/* harmony export */   \"LogConsolePanel\": () => (/* binding */ LogConsolePanel)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/outputarea */ \"webpack/sharing/consume/default/@jupyterlab/outputarea/@jupyterlab/outputarea\");\n/* harmony import */ var _jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_outputarea__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 _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @lumino/signaling */ \"webpack/sharing/consume/default/@lumino/signaling/@lumino/signaling\");\n/* harmony import */ var _lumino_signaling__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_lumino_signaling__WEBPACK_IMPORTED_MODULE_2__);\n/* 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.\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\n\n\n\n\nfunction toTitleCase(value) {\n    return value.length === 0 ? value : value[0].toUpperCase() + value.slice(1);\n}\n/**\n * Log console output prompt implementation\n */\nclass LogConsoleOutputPrompt extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget {\n    constructor() {\n        super();\n        this._timestampNode = document.createElement('div');\n        this.node.append(this._timestampNode);\n    }\n    /**\n     * Date & time when output is logged.\n     */\n    set timestamp(value) {\n        this._timestamp = value;\n        this._timestampNode.innerHTML = this._timestamp.toLocaleTimeString();\n        this.update();\n    }\n    /**\n     * Log level\n     */\n    set level(value) {\n        this._level = value;\n        this.node.dataset.logLevel = value;\n        this.update();\n    }\n    update() {\n        if (this._level !== undefined && this._timestamp !== undefined) {\n            this.node.title = `${this._timestamp.toLocaleString()}; ${toTitleCase(this._level)} level`;\n        }\n    }\n}\n/**\n * Output Area implementation displaying log outputs\n * with prompts showing log timestamps.\n */\nclass LogConsoleOutputArea extends _jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0__.OutputArea {\n    /**\n     * Create an output item with a prompt and actual output\n     */\n    createOutputItem(model) {\n        const panel = super.createOutputItem(model);\n        if (panel === null) {\n            // Could not render model\n            return null;\n        }\n        // first widget in panel is prompt of type LoggerOutputPrompt\n        const prompt = panel.widgets[0];\n        prompt.timestamp = model.timestamp;\n        prompt.level = model.level;\n        return panel;\n    }\n    /**\n     * Handle an input request from a kernel by doing nothing.\n     */\n    onInputRequest(msg, future) {\n        return;\n    }\n}\n/**\n * Implementation of `IContentFactory` for Output Area\n * which creates custom output prompts.\n */\nclass LogConsoleContentFactory extends _jupyterlab_outputarea__WEBPACK_IMPORTED_MODULE_0__.OutputArea.ContentFactory {\n    /**\n     * Create the output prompt for the widget.\n     */\n    createOutputPrompt() {\n        return new LogConsoleOutputPrompt();\n    }\n}\n/**\n * Implements a panel which supports pinning the position to the end if it is\n * scrolled to the end.\n *\n * #### Notes\n * This is useful for log viewing components or chat components that append\n * elements at the end. We would like to automatically scroll when the user\n * has scrolled to the bottom, but not change the scrolling when the user has\n * changed the scroll position.\n */\nclass ScrollingWidget extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget {\n    constructor(_a) {\n        var { content } = _a, options = __rest(_a, [\"content\"]);\n        super(options);\n        this._observer = null;\n        this.addClass('jp-Scrolling');\n        const layout = (this.layout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.PanelLayout());\n        layout.addWidget(content);\n        this._content = content;\n        this._sentinel = document.createElement('div');\n        this.node.appendChild(this._sentinel);\n    }\n    /**\n     * The content widget.\n     */\n    get content() {\n        return this._content;\n    }\n    onAfterAttach(msg) {\n        super.onAfterAttach(msg);\n        // defer so content gets a chance to attach first\n        requestAnimationFrame(() => {\n            this._sentinel.scrollIntoView();\n            this._scrollHeight = this.node.scrollHeight;\n        });\n        // Set up intersection observer for the sentinel\n        if (typeof IntersectionObserver !== 'undefined') {\n            this._observer = new IntersectionObserver(args => {\n                this._handleScroll(args);\n            }, { root: this.node, threshold: 1 });\n            this._observer.observe(this._sentinel);\n        }\n    }\n    onBeforeDetach(msg) {\n        if (this._observer) {\n            this._observer.disconnect();\n        }\n    }\n    onAfterShow(msg) {\n        if (this._tracking) {\n            this._sentinel.scrollIntoView();\n        }\n    }\n    _handleScroll([entry]) {\n        if (entry.isIntersecting) {\n            this._tracking = true;\n        }\n        else if (this.isVisible) {\n            const currentHeight = this.node.scrollHeight;\n            if (currentHeight === this._scrollHeight) {\n                // Likely the user scrolled manually\n                this._tracking = false;\n            }\n            else {\n                // We assume we scrolled because our size changed, so scroll to the end.\n                this._sentinel.scrollIntoView();\n                this._scrollHeight = currentHeight;\n                this._tracking = true;\n            }\n        }\n    }\n}\n/**\n * A StackedPanel implementation that creates Output Areas\n * for each log source and activates as source is switched.\n */\nclass LogConsolePanel extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.StackedPanel {\n    /**\n     * Construct a LogConsolePanel instance.\n     *\n     * @param loggerRegistry - The logger registry that provides\n     * logs to be displayed.\n     */\n    constructor(loggerRegistry, translator) {\n        super();\n        this._outputAreas = new Map();\n        this._source = null;\n        this._sourceChanged = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal(this);\n        this._sourceDisplayed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__.Signal(this);\n        this._loggersWatched = new Set();\n        this.translator = translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n        this._trans = this.translator.load('jupyterlab');\n        this._loggerRegistry = loggerRegistry;\n        this.addClass('jp-LogConsolePanel');\n        loggerRegistry.registryChanged.connect((sender, args) => {\n            this._bindLoggerSignals();\n        }, this);\n        this._bindLoggerSignals();\n        this._placeholder = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_3__.Widget();\n        this._placeholder.addClass('jp-LogConsoleListPlaceholder');\n        this.addWidget(this._placeholder);\n    }\n    /**\n     * The logger registry providing the logs.\n     */\n    get loggerRegistry() {\n        return this._loggerRegistry;\n    }\n    /**\n     * The current logger.\n     */\n    get logger() {\n        if (this.source === null) {\n            return null;\n        }\n        return this.loggerRegistry.getLogger(this.source);\n    }\n    /**\n     * The log source displayed\n     */\n    get source() {\n        return this._source;\n    }\n    set source(name) {\n        if (name === this._source) {\n            return;\n        }\n        const oldValue = this._source;\n        const newValue = (this._source = name);\n        this._showOutputFromSource(newValue);\n        this._handlePlaceholder();\n        this._sourceChanged.emit({ oldValue, newValue, name: 'source' });\n    }\n    /**\n     * The source version displayed.\n     */\n    get sourceVersion() {\n        const source = this.source;\n        return source !== null\n            ? this._loggerRegistry.getLogger(source).version\n            : null;\n    }\n    /**\n     * Signal for source changes\n     */\n    get sourceChanged() {\n        return this._sourceChanged;\n    }\n    /**\n     * Signal for source changes\n     */\n    get sourceDisplayed() {\n        return this._sourceDisplayed;\n    }\n    onAfterAttach(msg) {\n        super.onAfterAttach(msg);\n        this._updateOutputAreas();\n        this._showOutputFromSource(this._source);\n        this._handlePlaceholder();\n    }\n    onAfterShow(msg) {\n        super.onAfterShow(msg);\n        if (this.source !== null) {\n            this._sourceDisplayed.emit({\n                source: this.source,\n                version: this.sourceVersion\n            });\n        }\n    }\n    _bindLoggerSignals() {\n        const loggers = this._loggerRegistry.getLoggers();\n        for (const logger of loggers) {\n            if (this._loggersWatched.has(logger.source)) {\n                continue;\n            }\n            logger.contentChanged.connect((sender, args) => {\n                this._updateOutputAreas();\n                this._handlePlaceholder();\n            }, this);\n            logger.stateChanged.connect((sender, change) => {\n                if (change.name !== 'rendermime') {\n                    return;\n                }\n                const viewId = `source:${sender.source}`;\n                const outputArea = this._outputAreas.get(viewId);\n                if (outputArea) {\n                    if (change.newValue) {\n                        // cast away readonly\n                        outputArea.rendermime = change.newValue;\n                    }\n                    else {\n                        outputArea.dispose();\n                    }\n                }\n            }, this);\n            this._loggersWatched.add(logger.source);\n        }\n    }\n    _showOutputFromSource(source) {\n        // If the source is null, pick a unique name so all output areas hide.\n        const viewId = source === null ? 'null source' : `source:${source}`;\n        this._outputAreas.forEach((outputArea, name) => {\n            var _a, _b;\n            // Show/hide the output area parents, the scrolling windows.\n            if (outputArea.id === viewId) {\n                (_a = outputArea.parent) === null || _a === void 0 ? void 0 : _a.show();\n                if (outputArea.isVisible) {\n                    this._sourceDisplayed.emit({\n                        source: this.source,\n                        version: this.sourceVersion\n                    });\n                }\n            }\n            else {\n                (_b = outputArea.parent) === null || _b === void 0 ? void 0 : _b.hide();\n            }\n        });\n        const title = source === null\n            ? this._trans.__('Log Console')\n            : this._trans.__('Log: %1', source);\n        this.title.label = title;\n        this.title.caption = title;\n    }\n    _handlePlaceholder() {\n        if (this.source === null) {\n            this._placeholder.node.textContent = this._trans.__('No source selected.');\n            this._placeholder.show();\n        }\n        else if (this._loggerRegistry.getLogger(this.source).length === 0) {\n            this._placeholder.node.textContent = this._trans.__('No log messages.');\n            this._placeholder.show();\n        }\n        else {\n            this._placeholder.hide();\n            this._placeholder.node.textContent = '';\n        }\n    }\n    _updateOutputAreas() {\n        const loggerIds = new Set();\n        const loggers = this._loggerRegistry.getLoggers();\n        for (const logger of loggers) {\n            const source = logger.source;\n            const viewId = `source:${source}`;\n            loggerIds.add(viewId);\n            // add view for logger if not exist\n            if (!this._outputAreas.has(viewId)) {\n                const outputArea = new LogConsoleOutputArea({\n                    rendermime: logger.rendermime,\n                    contentFactory: new LogConsoleContentFactory(),\n                    model: logger.outputAreaModel\n                });\n                outputArea.id = viewId;\n                // Attach the output area so it is visible, so the accounting\n                // functions below record the outputs actually displayed.\n                const w = new ScrollingWidget({\n                    content: outputArea\n                });\n                this.addWidget(w);\n                this._outputAreas.set(viewId, outputArea);\n                // This is where the source object is associated with the output area.\n                // We capture the source from this environment in the closure.\n                const outputUpdate = (sender) => {\n                    // If the current log console panel source is the source associated\n                    // with this output area, and the output area is visible, then emit\n                    // the logConsolePanel source displayed signal.\n                    if (this.source === source && sender.isVisible) {\n                        // We assume that the output area has been updated to the current\n                        // version of the source.\n                        this._sourceDisplayed.emit({\n                            source: this.source,\n                            version: this.sourceVersion\n                        });\n                    }\n                };\n                // Notify messages were displayed any time the output area is updated\n                // and update for any outputs rendered on construction.\n                outputArea.outputLengthChanged.connect(outputUpdate, this);\n                // Since the output area was attached above, we can rely on its\n                // visibility to account for the messages displayed.\n                outputUpdate(outputArea);\n            }\n        }\n        // remove output areas that do not have corresponding loggers anymore\n        const viewIds = this._outputAreas.keys();\n        for (const viewId of viewIds) {\n            if (!loggerIds.has(viewId)) {\n                const outputArea = this._outputAreas.get(viewId);\n                outputArea === null || outputArea === void 0 ? void 0 : outputArea.dispose();\n                this._outputAreas.delete(viewId);\n            }\n        }\n    }\n}\n//# sourceMappingURL=widget.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/logconsole/lib/widget.js?");

/***/ })

}]);