"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([["node_modules_jupyterlab_json-extension_lib_index_js"],{

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

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   MIME_TYPE: () => (/* binding */ MIME_TYPE),\n/* harmony export */   MIME_TYPES_JSONL: () => (/* binding */ MIME_TYPES_JSONL),\n/* harmony export */   RenderedJSON: () => (/* binding */ RenderedJSON),\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   rendererFactory: () => (/* binding */ rendererFactory)\n/* harmony export */ });\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlab/apputils */ \"webpack/sharing/consume/default/@jupyterlab/apputils/@jupyterlab/apputils\");\n/* harmony import */ var _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlab/translation */ \"webpack/sharing/consume/default/@jupyterlab/translation/@jupyterlab/translation\");\n/* harmony import */ var _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _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/* 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/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom/client */ \"../node_modules/react-dom/client.js\");\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n/**\n * @packageDocumentation\n * @module json-extension\n */\n\n\n\n\n\n/**\n * The CSS class to add to the JSON Widget.\n */\nconst CSS_CLASS = 'jp-RenderedJSON';\n/**\n * The MIME type for JSON.\n */\nconst MIME_TYPE = 'application/json';\n// NOTE: not standardized yet\nconst MIME_TYPES_JSONL = [\n    'text/jsonl',\n    'application/jsonl',\n    'application/json-lines'\n];\n/**\n * A renderer for JSON data.\n */\nclass RenderedJSON extends _lumino_widgets__WEBPACK_IMPORTED_MODULE_2__.Widget {\n    /**\n     * Create a new widget for rendering JSON.\n     */\n    constructor(options) {\n        super();\n        this._rootDOM = null;\n        this.addClass(CSS_CLASS);\n        this.addClass('CodeMirror');\n        this._mimeType = options.mimeType;\n        this.translator = options.translator || _jupyterlab_translation__WEBPACK_IMPORTED_MODULE_1__.nullTranslator;\n    }\n    [_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Printing.symbol]() {\n        return () => _jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__.Printing.printWidget(this);\n    }\n    /**\n     * Render JSON into this widget's node.\n     */\n    async renderModel(model) {\n        const { Component } = await Promise.all(/*! import() */[__webpack_require__.e(\"vendors-node_modules_lezer_common_dist_index_js\"), __webpack_require__.e(\"vendors-node_modules_lezer_highlight_dist_index_js\"), __webpack_require__.e(\"vendors-node_modules_jupyterlab_json-extension_lib_component_js\"), __webpack_require__.e(\"webpack_sharing_consume_default_lumino_coreutils_lumino_coreutils\"), __webpack_require__.e(\"webpack_sharing_consume_default_jupyterlab_ui-components_jupyterlab_ui-components\"), __webpack_require__.e(\"webpack_sharing_consume_default_jupyterlab_codemirror_jupyterlab_codemirror\")]).then(__webpack_require__.bind(__webpack_require__, /*! ./component */ \"../node_modules/@jupyterlab/json-extension/lib/component.js\"));\n        let data;\n        // handle if json-lines format\n        if (MIME_TYPES_JSONL.indexOf(this._mimeType) >= 0) {\n            // convert into proper json\n            const lines = (model.data[this._mimeType] || '')\n                .trim()\n                .split(/\\n/);\n            data = JSON.parse(`[${lines.join(',')}]`);\n        }\n        else {\n            data = (model.data[this._mimeType] || {});\n        }\n        const metadata = (model.metadata[this._mimeType] || {});\n        if (this._rootDOM === null) {\n            this._rootDOM = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_4__.createRoot)(this.node);\n        }\n        return new Promise((resolve, reject) => {\n            this._rootDOM.render(react__WEBPACK_IMPORTED_MODULE_3__.createElement(Component, { data: data, metadata: metadata, translator: this.translator, forwardedRef: () => resolve() }));\n        });\n    }\n    /**\n     * Called before the widget is detached from the DOM.\n     */\n    onBeforeDetach(msg) {\n        // Unmount the component so it can tear down.\n        if (this._rootDOM) {\n            this._rootDOM.unmount();\n            this._rootDOM = null;\n        }\n    }\n}\n/**\n * A mime renderer factory for JSON data.\n */\nconst rendererFactory = {\n    safe: true,\n    mimeTypes: [MIME_TYPE, ...MIME_TYPES_JSONL],\n    createRenderer: options => new RenderedJSON(options)\n};\nconst extensions = [\n    {\n        id: '@jupyterlab/json-extension:factory',\n        description: 'Adds renderer for JSON content.',\n        rendererFactory,\n        rank: 0,\n        dataType: 'json',\n        documentWidgetFactoryOptions: {\n            name: 'JSON',\n            // TODO: how to translate label of the factory?\n            primaryFileType: 'json',\n            fileTypes: ['json', 'notebook', 'geojson'],\n            defaultFor: ['json']\n        }\n    },\n    {\n        id: '@jupyterlab/json-lines-extension:factory',\n        description: 'Adds renderer for JSONLines content.',\n        rendererFactory,\n        rank: 0,\n        dataType: 'string',\n        documentWidgetFactoryOptions: {\n            name: 'JSONLines',\n            primaryFileType: 'jsonl',\n            fileTypes: ['jsonl', 'ndjson'],\n            defaultFor: ['jsonl', 'ndjson']\n        }\n    }\n];\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (extensions);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/@jupyterlab/json-extension/lib/index.js?");

/***/ }),

/***/ "../node_modules/react-dom/client.js":
/*!*******************************************!*\
  !*** ../node_modules/react-dom/client.js ***!
  \*******************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

eval("\n\nvar m = __webpack_require__(/*! react-dom */ \"webpack/sharing/consume/default/react-dom/react-dom\");\nif (false) {} else {\n  var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n  exports.createRoot = function(c, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.createRoot(c, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n  exports.hydrateRoot = function(c, h, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.hydrateRoot(c, h, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n}\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/react-dom/client.js?");

/***/ })

}]);