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0B,CACxBtO,MAAO,CACLC,IAAI,UAACkE,OAAOoK,+BAAR,QAAmC,WAAa,uBAGxDN,IAAa,EACbK,EAAAA,OAA0BlN,MAAMK,IAM9ByL,GAAazL,OAiBf,MAAM+M,EAAc5G,EAAM6G,OAAS,eAAiB,gBAEpD,OAAO,UAAC,GAAD,eAAc7G,MAAO4G,GAAiBL","sources":["webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","webpack://grafana/../../opt/drone/yarncache/state-local-npm-1.0.7-9005e49ea6-d1afcf1429.zip/node_modules/state-local/lib/es/state-local.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/config/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/validators/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/utils/curry.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/utils/compose.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-loader-virtual-3ea47d31f8/3/opt/drone/yarncache/@monaco-editor-loader-npm-1.2.0-dfa48eef64-b483d8d748.zip/node_modules/@monaco-editor/loader/lib/es/loader/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/_virtual/_rollupPluginBabelHelpers.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/Loading/Loading.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/MonacoContainer/styles.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/MonacoContainer/MonacoContainer.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/MonacoContainer/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/hooks/useMount/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/hooks/useUpdate/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/utils/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/DiffEditor/DiffEditor.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/hooks/useMonaco/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/hooks/usePrevious/index.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/Editor/Editor.js","webpack://grafana/./.yarn/__virtual__/@monaco-editor-react-virtual-97b49dd0c6/3/opt/drone/yarncache/@monaco-editor-react-npm-4.3.1-c128c62d31-477349e640.zip/node_modules/@monaco-editor/react/lib/es/Editor/index.js","webpack://grafana/./packages/grafana-ui/src/components/Monaco/theme.ts","webpack://grafana/./packages/grafana-ui/src/components/Monaco/ReactMonacoEditor.tsx"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nexport { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _slicedToArray as slicedToArray, _unsupportedIterableToArray as unsupportedIterableToArray };\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n}\n\nfunction curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len3 = arguments.length, nextArgs = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n nextArgs[_key3] = arguments[_key3];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nfunction isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nfunction isEmpty(obj) {\n return !Object.keys(obj).length;\n}\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nfunction hasOwnProperty(object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nfunction validateChanges(initial, changes) {\n if (!isObject(changes)) errorHandler('changeType');\n if (Object.keys(changes).some(function (field) {\n return !hasOwnProperty(initial, field);\n })) errorHandler('changeField');\n return changes;\n}\n\nfunction validateSelector(selector) {\n if (!isFunction(selector)) errorHandler('selectorType');\n}\n\nfunction validateHandler(handler) {\n if (!(isFunction(handler) || isObject(handler))) errorHandler('handlerType');\n if (isObject(handler) && Object.values(handler).some(function (_handler) {\n return !isFunction(_handler);\n })) errorHandler('handlersType');\n}\n\nfunction validateInitial(initial) {\n if (!initial) errorHandler('initialIsRequired');\n if (!isObject(initial)) errorHandler('initialType');\n if (isEmpty(initial)) errorHandler('initialContent');\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n initialIsRequired: 'initial state is required',\n initialType: 'initial state should be an object',\n initialContent: 'initial state shouldn\\'t be an empty object',\n handlerType: 'handler should be an object or a function',\n handlersType: 'all handlers should be a functions',\n selectorType: 'selector should be a function',\n changeType: 'provided value of changes should be an object',\n changeField: 'it seams you want to change a field in the state which is not specified in the \"initial\" state',\n \"default\": 'an unknown error accured in `state-local` package'\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n changes: validateChanges,\n selector: validateSelector,\n handler: validateHandler,\n initial: validateInitial\n};\n\nfunction create(initial) {\n var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n validators.initial(initial);\n validators.handler(handler);\n var state = {\n current: initial\n };\n var didUpdate = curry(didStateUpdate)(state, handler);\n var update = curry(updateState)(state);\n var validate = curry(validators.changes)(initial);\n var getChanges = curry(extractChanges)(state);\n\n function getState() {\n var selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {\n return state;\n };\n validators.selector(selector);\n return selector(state.current);\n }\n\n function setState(causedChanges) {\n compose(didUpdate, update, validate, getChanges)(causedChanges);\n }\n\n return [getState, setState];\n}\n\nfunction extractChanges(state, causedChanges) {\n return isFunction(causedChanges) ? causedChanges(state.current) : causedChanges;\n}\n\nfunction updateState(state, changes) {\n state.current = _objectSpread2(_objectSpread2({}, state.current), changes);\n return changes;\n}\n\nfunction didStateUpdate(state, handler, changes) {\n isFunction(handler) ? handler(state.current) : Object.keys(changes).forEach(function (field) {\n var _handler$field;\n\n return (_handler$field = handler[field]) === null || _handler$field === void 0 ? void 0 : _handler$field.call(handler, state.current[field]);\n });\n return changes;\n}\n\nvar index = {\n create: create\n};\n\nexport default index;\n","var config = {\n paths: {\n vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.28.1/min/vs'\n }\n};\n\nexport default config;\n","function isObject(value) {\n return {}.toString.call(value).includes('Object');\n}\n\nexport default isObject;\n","import curry from '../utils/curry.js';\nimport isObject from '../utils/isObject.js';\n\n/**\n * validates the configuration object and informs about deprecation\n * @param {Object} config - the configuration object \n * @return {Object} config - the validated configuration object\n */\n\nfunction validateConfig(config) {\n if (!config) errorHandler('configIsRequired');\n if (!isObject(config)) errorHandler('configType');\n\n if (config.urls) {\n informAboutDeprecation();\n return {\n paths: {\n vs: config.urls.monacoBase\n }\n };\n }\n\n return config;\n}\n/**\n * logs deprecation message\n */\n\n\nfunction informAboutDeprecation() {\n console.warn(errorMessages.deprecation);\n}\n\nfunction throwError(errorMessages, type) {\n throw new Error(errorMessages[type] || errorMessages[\"default\"]);\n}\n\nvar errorMessages = {\n configIsRequired: 'the configuration object is required',\n configType: 'the configuration object should be an object',\n \"default\": 'an unknown error accured in `@monaco-editor/loader` package',\n deprecation: \"Deprecation warning!\\n You are using deprecated way of configuration.\\n\\n Instead of using\\n monaco.config({ urls: { monacoBase: '...' } })\\n use\\n monaco.config({ paths: { vs: '...' } })\\n\\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\\n \"\n};\nvar errorHandler = curry(throwError)(errorMessages);\nvar validators = {\n config: validateConfig\n};\n\nexport default validators;\nexport { errorHandler, errorMessages };\n","function curry(fn) {\n return function curried() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args.length >= fn.length ? fn.apply(this, args) : function () {\n for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n nextArgs[_key2] = arguments[_key2];\n }\n\n return curried.apply(_this, [].concat(args, nextArgs));\n };\n };\n}\n\nexport default curry;\n","var compose = function compose() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n\n return function (x) {\n return fns.reduceRight(function (y, f) {\n return f(y);\n }, x);\n };\n};\n\nexport default compose;\n","import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';\n\nfunction merge(target, source) {\n Object.keys(source).forEach(function (key) {\n if (source[key] instanceof Object) {\n if (target[key]) {\n Object.assign(source[key], merge(target[key], source[key]));\n }\n }\n });\n return _objectSpread2(_objectSpread2({}, target), source);\n}\n\nexport default merge;\n","// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325\nvar CANCELATION_MESSAGE = {\n type: 'cancelation',\n msg: 'operation is manually canceled'\n};\n\nfunction makeCancelable(promise) {\n var hasCanceled_ = false;\n var wrappedPromise = new Promise(function (resolve, reject) {\n promise.then(function (val) {\n return hasCanceled_ ? reject(CANCELATION_MESSAGE) : resolve(val);\n });\n promise[\"catch\"](reject);\n });\n return wrappedPromise.cancel = function () {\n return hasCanceled_ = true;\n }, wrappedPromise;\n}\n\nexport default makeCancelable;\nexport { CANCELATION_MESSAGE };\n","import { slicedToArray as _slicedToArray } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport state from 'state-local';\nimport config$1 from '../config/index.js';\nimport validators from '../validators/index.js';\nimport compose from '../utils/compose.js';\nimport merge from '../utils/deepMerge.js';\nimport makeCancelable from '../utils/makeCancelable.js';\n\n/** the local state of the module */\n\nvar _state$create = state.create({\n config: config$1,\n isInitialized: false,\n resolve: null,\n reject: null,\n monaco: null\n}),\n _state$create2 = _slicedToArray(_state$create, 2),\n getState = _state$create2[0],\n setState = _state$create2[1];\n/**\n * set the loader configuration\n * @param {Object} config - the configuration object\n */\n\n\nfunction config(config) {\n setState(function (state) {\n return {\n config: merge(state.config, validators.config(config))\n };\n });\n}\n/**\n * handles the initialization of the monaco-editor\n * @return {Promise} - returns an instance of monaco (with a cancelable promise)\n */\n\n\nfunction init() {\n var state = getState(function (_ref) {\n var isInitialized = _ref.isInitialized;\n return {\n isInitialized: isInitialized\n };\n });\n\n if (!state.isInitialized) {\n if (window.monaco && window.monaco.editor) {\n storeMonacoInstance(window.monaco);\n return makeCancelable(Promise.resolve(window.monaco));\n }\n\n compose(injectScripts, getMonacoLoaderScript)(configureLoader);\n setState({\n isInitialized: true\n });\n }\n\n return makeCancelable(wrapperPromise);\n}\n/**\n * injects provided scripts into the document.body\n * @param {Object} script - an HTML script element\n * @return {Object} - the injected HTML script element\n */\n\n\nfunction injectScripts(script) {\n return document.body.appendChild(script);\n}\n/**\n * creates an HTML script element with/without provided src\n * @param {string} [src] - the source path of the script\n * @return {Object} - the created HTML script element\n */\n\n\nfunction createScript(src) {\n var script = document.createElement('script');\n return src && (script.src = src), script;\n}\n/**\n * creates an HTML script element with the monaco loader src\n * @return {Object} - the created HTML script element\n */\n\n\nfunction getMonacoLoaderScript(configureLoader) {\n var state = getState(function (_ref2) {\n var config = _ref2.config,\n reject = _ref2.reject;\n return {\n config: config,\n reject: reject\n };\n });\n var loaderScript = createScript(\"\".concat(state.config.paths.vs, \"/loader.js\"));\n\n loaderScript.onload = function () {\n return configureLoader();\n };\n\n loaderScript.onerror = state.reject;\n return loaderScript;\n}\n/**\n * configures the monaco loader\n */\n\n\nfunction configureLoader() {\n var state = getState(function (_ref3) {\n var config = _ref3.config,\n resolve = _ref3.resolve,\n reject = _ref3.reject;\n return {\n config: config,\n resolve: resolve,\n reject: reject\n };\n });\n var require = window.require;\n\n require.config(state.config);\n\n require(['vs/editor/editor.main'], function (monaco) {\n storeMonacoInstance(monaco);\n state.resolve(monaco);\n }, function (error) {\n state.reject(error);\n });\n}\n/**\n * store monaco instance in local state\n */\n\n\nfunction storeMonacoInstance(monaco) {\n if (!getState().monaco) {\n setState({\n monaco: monaco\n });\n }\n}\n/**\n * internal helper function\n * extracts stored monaco instance\n * @return {Object|null} - the monaco instance\n */\n\n\nfunction __getMonacoInstance() {\n return getState(function (_ref4) {\n var monaco = _ref4.monaco;\n return monaco;\n });\n}\n\nvar wrapperPromise = new Promise(function (resolve, reject) {\n return setState({\n resolve: resolve,\n reject: reject\n });\n});\nvar loader = {\n config: config,\n init: init,\n __getMonacoInstance: __getMonacoInstance\n};\n\nexport default loader;\n","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nexport { _extends as extends };\n","import React from 'react';\n\nconst loadingStyles = {\n display: 'flex',\n height: '100%',\n width: '100%',\n justifyContent: 'center',\n alignItems: 'center'\n};\n\nfunction Loading({\n content\n}) {\n return /*#__PURE__*/React.createElement(\"div\", {\n style: loadingStyles\n }, content);\n}\n\nexport default Loading;\n","const styles = {\n wrapper: {\n display: 'flex',\n position: 'relative',\n textAlign: 'initial'\n },\n fullWidth: {\n width: '100%'\n },\n hide: {\n display: 'none'\n }\n};\n\nexport default styles;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';\nimport Loading from '../Loading/Loading.js';\nimport styles from './styles.js';\n\n// one of the reasons why we use a separate prop for passing ref instead of using forwardref\n\nfunction MonacoContainer({\n width,\n height,\n isEditorReady,\n loading,\n _ref,\n className,\n wrapperProps\n}) {\n return /*#__PURE__*/React.createElement(\"section\", _extends({\n style: { ...styles.wrapper,\n width,\n height\n }\n }, wrapperProps), !isEditorReady && /*#__PURE__*/React.createElement(Loading, {\n content: loading\n }), /*#__PURE__*/React.createElement(\"div\", {\n ref: _ref,\n style: { ...styles.fullWidth,\n ...(!isEditorReady && styles.hide)\n },\n className: className\n }));\n}\n\nMonacoContainer.propTypes = {\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n loading: PropTypes.oneOfType([PropTypes.element, PropTypes.string]).isRequired,\n isEditorReady: PropTypes.bool.isRequired,\n className: PropTypes.string,\n wrapperProps: PropTypes.object\n};\n\nexport default MonacoContainer;\n","import { memo } from 'react';\nimport MonacoContainer$1 from './MonacoContainer.js';\n\nvar MonacoContainer = /*#__PURE__*/memo(MonacoContainer$1);\n\nexport default MonacoContainer;\n","import { useEffect } from 'react';\n\nfunction useMount(effect) {\n useEffect(effect, []);\n}\n\nexport default useMount;\n","import { useRef, useEffect } from 'react';\n\nfunction useUpdate(effect, deps, applyChanges = true) {\n const isInitialMount = useRef(true);\n useEffect(isInitialMount.current || !applyChanges ? () => {\n isInitialMount.current = false;\n } : effect, deps);\n}\n\nexport default useUpdate;\n","function noop() {}\n\nfunction getOrCreateModel(monaco, value, language, path) {\n return getModel(monaco, path) || createModel(monaco, value, language, path);\n}\n\nfunction getModel(monaco, path) {\n return monaco.editor.getModel(createModelUri(monaco, path));\n}\n\nfunction createModel(monaco, value, language, path) {\n return monaco.editor.createModel(value, language, path && createModelUri(monaco, path));\n}\n\nfunction createModelUri(monaco, path) {\n return monaco.Uri.parse(path);\n}\n\nfunction isUndefined(input) {\n return input === undefined;\n}\n\nexport { getOrCreateModel, isUndefined, noop };\n","import loader from '@monaco-editor/loader';\nimport React, { useState, useRef, useCallback, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport MonacoContainer from '../MonacoContainer/index.js';\nimport useMount from '../hooks/useMount/index.js';\nimport useUpdate from '../hooks/useUpdate/index.js';\nimport { getOrCreateModel, noop } from '../utils/index.js';\n\nfunction DiffEditor({\n original,\n modified,\n language,\n originalLanguage,\n modifiedLanguage,\n\n /* === */\n originalModelPath,\n modifiedModelPath,\n keepCurrentOriginalModel,\n keepCurrentModifiedModel,\n theme,\n loading,\n options,\n\n /* === */\n height,\n width,\n className,\n wrapperProps,\n\n /* === */\n beforeMount,\n onMount\n}) {\n const [isEditorReady, setIsEditorReady] = useState(false);\n const [isMonacoMounting, setIsMonacoMounting] = useState(true);\n const editorRef = useRef(null);\n const monacoRef = useRef(null);\n const containerRef = useRef(null);\n const onMountRef = useRef(onMount);\n const beforeMountRef = useRef(beforeMount);\n useMount(() => {\n const cancelable = loader.init();\n cancelable.then(monaco => (monacoRef.current = monaco) && setIsMonacoMounting(false)).catch(error => (error === null || error === void 0 ? void 0 : error.type) !== 'cancelation' && console.error('Monaco initialization: error:', error));\n return () => editorRef.current ? disposeEditor() : cancelable.cancel();\n });\n useUpdate(() => {\n const modifiedEditor = editorRef.current.getModifiedEditor();\n\n if (modifiedEditor.getOption(monacoRef.current.editor.EditorOption.readOnly)) {\n modifiedEditor.setValue(modified);\n } else {\n if (modified !== modifiedEditor.getValue()) {\n modifiedEditor.executeEdits('', [{\n range: modifiedEditor.getModel().getFullModelRange(),\n text: modified,\n forceMoveMarkers: true\n }]);\n modifiedEditor.pushUndoStop();\n }\n }\n }, [modified], isEditorReady);\n useUpdate(() => {\n editorRef.current.getModel().original.setValue(original);\n }, [original], isEditorReady);\n useUpdate(() => {\n const {\n original,\n modified\n } = editorRef.current.getModel();\n monacoRef.current.editor.setModelLanguage(original, originalLanguage || language);\n monacoRef.current.editor.setModelLanguage(modified, modifiedLanguage || language);\n }, [language, originalLanguage, modifiedLanguage], isEditorReady);\n useUpdate(() => {\n monacoRef.current.editor.setTheme(theme);\n }, [theme], isEditorReady);\n useUpdate(() => {\n editorRef.current.updateOptions(options);\n }, [options], isEditorReady);\n const setModels = useCallback(() => {\n beforeMountRef.current(monacoRef.current);\n const originalModel = getOrCreateModel(monacoRef.current, original, originalLanguage || language, originalModelPath);\n const modifiedModel = getOrCreateModel(monacoRef.current, modified, modifiedLanguage || language, modifiedModelPath);\n editorRef.current.setModel({\n original: originalModel,\n modified: modifiedModel\n });\n }, [language, modified, modifiedLanguage, original, originalLanguage, originalModelPath, modifiedModelPath]);\n const createEditor = useCallback(() => {\n editorRef.current = monacoRef.current.editor.createDiffEditor(containerRef.current, {\n automaticLayout: true,\n ...options\n });\n setModels();\n monacoRef.current.editor.setTheme(theme);\n setIsEditorReady(true);\n }, [options, theme, setModels]);\n useEffect(() => {\n if (isEditorReady) {\n onMountRef.current(editorRef.current, monacoRef.current);\n }\n }, [isEditorReady]);\n useEffect(() => {\n !isMonacoMounting && !isEditorReady && createEditor();\n }, [isMonacoMounting, isEditorReady, createEditor]);\n\n function disposeEditor() {\n const models = editorRef.current.getModel();\n\n if (!keepCurrentOriginalModel) {\n var _models$original;\n\n (_models$original = models.original) === null || _models$original === void 0 ? void 0 : _models$original.dispose();\n }\n\n if (!keepCurrentModifiedModel) {\n var _models$modified;\n\n (_models$modified = models.modified) === null || _models$modified === void 0 ? void 0 : _models$modified.dispose();\n }\n\n editorRef.current.dispose();\n }\n\n return /*#__PURE__*/React.createElement(MonacoContainer, {\n width: width,\n height: height,\n isEditorReady: isEditorReady,\n loading: loading,\n _ref: containerRef,\n className: className,\n wrapperProps: wrapperProps\n });\n}\n\nDiffEditor.propTypes = {\n original: PropTypes.string,\n modified: PropTypes.string,\n language: PropTypes.string,\n originalLanguage: PropTypes.string,\n modifiedLanguage: PropTypes.string,\n\n /* === */\n originalModelPath: PropTypes.string,\n modifiedModelPath: PropTypes.string,\n keepCurrentOriginalModel: PropTypes.bool,\n keepCurrentModifiedModel: PropTypes.bool,\n theme: PropTypes.string,\n loading: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n options: PropTypes.object,\n\n /* === */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string,\n wrapperProps: PropTypes.object,\n\n /* === */\n beforeMount: PropTypes.func,\n onMount: PropTypes.func\n};\nDiffEditor.defaultProps = {\n theme: 'light',\n loading: 'Loading...',\n options: {},\n keepCurrentOriginalModel: false,\n keepCurrentModifiedModel: false,\n\n /* === */\n width: '100%',\n height: '100%',\n wrapperProps: {},\n\n /* === */\n beforeMount: noop,\n onMount: noop\n};\n\nexport default DiffEditor;\n","import loader from '@monaco-editor/loader';\nimport { useState } from 'react';\nimport useMount from '../useMount/index.js';\n\nfunction useMonaco() {\n const [monaco, setMonaco] = useState(loader.__getMonacoInstance());\n useMount(() => {\n let cancelable;\n\n if (!monaco) {\n cancelable = loader.init();\n cancelable.then(monaco => {\n setMonaco(monaco);\n });\n }\n\n return () => {\n var _cancelable;\n\n return (_cancelable = cancelable) === null || _cancelable === void 0 ? void 0 : _cancelable.cancel();\n };\n });\n return monaco;\n}\n\nexport default useMonaco;\n","import { useRef, useEffect } from 'react';\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nexport default usePrevious;\n","import loader from '@monaco-editor/loader';\nimport React, { useState, useRef, useCallback, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport MonacoContainer from '../MonacoContainer/index.js';\nimport useMount from '../hooks/useMount/index.js';\nimport useUpdate from '../hooks/useUpdate/index.js';\nimport { getOrCreateModel, noop, isUndefined } from '../utils/index.js';\nimport usePrevious from '../hooks/usePrevious/index.js';\n\nconst viewStates = new Map();\n\nfunction Editor({\n defaultValue,\n defaultLanguage,\n defaultPath,\n value,\n language,\n path,\n\n /* === */\n theme,\n line,\n loading,\n options,\n overrideServices,\n saveViewState,\n keepCurrentModel,\n\n /* === */\n width,\n height,\n className,\n wrapperProps,\n\n /* === */\n beforeMount,\n onMount,\n onChange,\n onValidate\n}) {\n const [isEditorReady, setIsEditorReady] = useState(false);\n const [isMonacoMounting, setIsMonacoMounting] = useState(true);\n const monacoRef = useRef(null);\n const editorRef = useRef(null);\n const containerRef = useRef(null);\n const onMountRef = useRef(onMount);\n const beforeMountRef = useRef(beforeMount);\n const subscriptionRef = useRef(null);\n const valueRef = useRef(value);\n const previousPath = usePrevious(path);\n useMount(() => {\n const cancelable = loader.init();\n cancelable.then(monaco => (monacoRef.current = monaco) && setIsMonacoMounting(false)).catch(error => (error === null || error === void 0 ? void 0 : error.type) !== 'cancelation' && console.error('Monaco initialization: error:', error));\n return () => editorRef.current ? disposeEditor() : cancelable.cancel();\n });\n useUpdate(() => {\n const model = getOrCreateModel(monacoRef.current, defaultValue || value, defaultLanguage || language, path);\n\n if (model !== editorRef.current.getModel()) {\n saveViewState && viewStates.set(previousPath, editorRef.current.saveViewState());\n editorRef.current.setModel(model);\n saveViewState && editorRef.current.restoreViewState(viewStates.get(path));\n }\n }, [path], isEditorReady);\n useUpdate(() => {\n editorRef.current.updateOptions(options);\n }, [options], isEditorReady);\n useUpdate(() => {\n if (editorRef.current.getOption(monacoRef.current.editor.EditorOption.readOnly)) {\n editorRef.current.setValue(value);\n } else {\n if (value !== editorRef.current.getValue()) {\n editorRef.current.executeEdits('', [{\n range: editorRef.current.getModel().getFullModelRange(),\n text: value,\n forceMoveMarkers: true\n }]);\n editorRef.current.pushUndoStop();\n }\n }\n }, [value], isEditorReady);\n useUpdate(() => {\n monacoRef.current.editor.setModelLanguage(editorRef.current.getModel(), language);\n }, [language], isEditorReady);\n useUpdate(() => {\n // reason for undefined check: https://github.com/suren-atoyan/monaco-react/pull/188\n if (!isUndefined(line)) {\n editorRef.current.revealLine(line);\n }\n }, [line], isEditorReady);\n useUpdate(() => {\n monacoRef.current.editor.setTheme(theme);\n }, [theme], isEditorReady);\n const createEditor = useCallback(() => {\n beforeMountRef.current(monacoRef.current);\n const autoCreatedModelPath = path || defaultPath;\n const defaultModel = getOrCreateModel(monacoRef.current, value || defaultValue, defaultLanguage || language, autoCreatedModelPath);\n editorRef.current = monacoRef.current.editor.create(containerRef.current, {\n model: defaultModel,\n automaticLayout: true,\n ...options\n }, overrideServices);\n saveViewState && editorRef.current.restoreViewState(viewStates.get(autoCreatedModelPath));\n monacoRef.current.editor.setTheme(theme);\n setIsEditorReady(true);\n }, [defaultValue, defaultLanguage, defaultPath, value, language, path, options, overrideServices, saveViewState, theme]);\n useEffect(() => {\n if (isEditorReady) {\n onMountRef.current(editorRef.current, monacoRef.current);\n }\n }, [isEditorReady]);\n useEffect(() => {\n !isMonacoMounting && !isEditorReady && createEditor();\n }, [isMonacoMounting, isEditorReady, createEditor]); // subscription\n // to avoid unnecessary updates (attach - dispose listener) in subscription\n\n valueRef.current = value;\n useEffect(() => {\n if (isEditorReady && onChange) {\n var _subscriptionRef$curr, _editorRef$current;\n\n (_subscriptionRef$curr = subscriptionRef.current) === null || _subscriptionRef$curr === void 0 ? void 0 : _subscriptionRef$curr.dispose();\n subscriptionRef.current = (_editorRef$current = editorRef.current) === null || _editorRef$current === void 0 ? void 0 : _editorRef$current.onDidChangeModelContent(event => {\n const editorValue = editorRef.current.getValue();\n\n if (valueRef.current !== editorValue) {\n onChange(editorValue, event);\n }\n });\n }\n }, [isEditorReady, onChange]); // onValidate\n\n useEffect(() => {\n if (isEditorReady) {\n const changeMarkersListener = monacoRef.current.editor.onDidChangeMarkers(uris => {\n var _editorRef$current$ge;\n\n const editorUri = (_editorRef$current$ge = editorRef.current.getModel()) === null || _editorRef$current$ge === void 0 ? void 0 : _editorRef$current$ge.uri;\n\n if (editorUri) {\n const currentEditorHasMarkerChanges = uris.find(uri => uri.path === editorUri.path);\n\n if (currentEditorHasMarkerChanges) {\n const markers = monacoRef.current.editor.getModelMarkers({\n resource: editorUri\n });\n onValidate === null || onValidate === void 0 ? void 0 : onValidate(markers);\n }\n }\n });\n return () => {\n changeMarkersListener === null || changeMarkersListener === void 0 ? void 0 : changeMarkersListener.dispose();\n };\n }\n }, [isEditorReady, onValidate]);\n\n function disposeEditor() {\n var _subscriptionRef$curr2;\n\n (_subscriptionRef$curr2 = subscriptionRef.current) === null || _subscriptionRef$curr2 === void 0 ? void 0 : _subscriptionRef$curr2.dispose();\n\n if (keepCurrentModel) {\n saveViewState && viewStates.set(path, editorRef.current.saveViewState());\n } else {\n var _editorRef$current$ge2;\n\n (_editorRef$current$ge2 = editorRef.current.getModel()) === null || _editorRef$current$ge2 === void 0 ? void 0 : _editorRef$current$ge2.dispose();\n }\n\n editorRef.current.dispose();\n }\n\n return /*#__PURE__*/React.createElement(MonacoContainer, {\n width: width,\n height: height,\n isEditorReady: isEditorReady,\n loading: loading,\n _ref: containerRef,\n className: className,\n wrapperProps: wrapperProps\n });\n}\n\nEditor.propTypes = {\n defaultValue: PropTypes.string,\n defaultPath: PropTypes.string,\n defaultLanguage: PropTypes.string,\n value: PropTypes.string,\n language: PropTypes.string,\n path: PropTypes.string,\n\n /* === */\n theme: PropTypes.string,\n line: PropTypes.number,\n loading: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n options: PropTypes.object,\n overrideServices: PropTypes.object,\n saveViewState: PropTypes.bool,\n keepCurrentModel: PropTypes.bool,\n\n /* === */\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string,\n wrapperProps: PropTypes.object,\n\n /* === */\n beforeMount: PropTypes.func,\n onMount: PropTypes.func,\n onChange: PropTypes.func,\n onValidate: PropTypes.func\n};\nEditor.defaultProps = {\n theme: 'light',\n loading: 'Loading...',\n options: {},\n overrideServices: {},\n saveViewState: true,\n keepCurrentModel: false,\n\n /* === */\n width: '100%',\n height: '100%',\n wrapperProps: {},\n\n /* === */\n beforeMount: noop,\n onMount: noop,\n onValidate: noop\n};\n\nexport default Editor;\n","import { memo } from 'react';\nimport Editor from './Editor.js';\n\nvar index = /*#__PURE__*/memo(Editor);\n\nexport default index;\n","import { GrafanaTheme2 } from '@grafana/data';\n\nimport { Monaco, monacoTypes } from './types';\n\nfunction getColors(theme?: GrafanaTheme2): monacoTypes.editor.IColors {\n if (theme === undefined) {\n return {};\n } else {\n return {\n 'editor.background': theme.components.input.background,\n 'minimap.background': theme.colors.background.secondary,\n };\n }\n}\n\n// we support calling this without a theme, it will make sure the themes\n// are registered in monaco, even if the colors are not perfect.\nexport default function defineThemes(monaco: Monaco, theme?: GrafanaTheme2) {\n // color tokens are defined here https://github.com/microsoft/vscode/blob/main/src/vs/platform/theme/common/colorRegistry.ts#L174\n const colors = getColors(theme);\n monaco.editor.defineTheme('grafana-dark', {\n base: 'vs-dark',\n inherit: true,\n colors: colors,\n // fallback syntax highlighting for languages that microsoft doesn't handle (ex cloudwatch's metric math)\n rules: [\n { token: 'predefined', foreground: theme?.visualization.getColorByName('purple') },\n { token: 'operator', foreground: theme?.visualization.getColorByName('orange') },\n { token: 'tag', foreground: theme?.visualization.getColorByName('green') },\n ],\n });\n\n monaco.editor.defineTheme('grafana-light', {\n base: 'vs',\n inherit: true,\n colors: colors,\n // fallback syntax highlighting for languages that microsoft doesn't handle (ex cloudwatch's metric math)\n rules: [\n { token: 'predefined', foreground: theme?.visualization.getColorByName('purple') },\n { token: 'operator', foreground: theme?.visualization.getColorByName('orange') },\n { token: 'tag', foreground: theme?.visualization.getColorByName('green') },\n ],\n });\n}\n","import MonacoEditor, { loader as monacoEditorLoader, useMonaco } from '@monaco-editor/react';\nimport React, { useEffect } from 'react';\n\nimport { useTheme2 } from '../../themes';\n\nimport defineThemes from './theme';\nimport type { ReactMonacoEditorProps } from './types';\n\nlet initalized = false;\nfunction initMonaco() {\n if (initalized) {\n return;\n }\n\n monacoEditorLoader.config({\n paths: {\n vs: (window.__grafana_public_path__ ?? 'public/') + 'lib/monaco/min/vs',\n },\n });\n initalized = true;\n monacoEditorLoader.init().then((monaco) => {\n // this call makes sure the themes exist.\n // they will not have the correct colors,\n // but we need them to exist since the beginning,\n // because if we start a monaco instance with\n // a theme that does not exist, it will not work well.\n defineThemes(monaco);\n });\n}\n\nexport const ReactMonacoEditor = (props: ReactMonacoEditorProps) => {\n const theme = useTheme2();\n const monaco = useMonaco();\n\n useEffect(() => {\n // monaco can be null at the beginning, because it is loaded in asynchronously\n if (monaco !== null) {\n defineThemes(monaco, theme);\n }\n }, [monaco, theme]);\n\n initMonaco();\n\n const monacoTheme = theme.isDark ? 'grafana-dark' : 'grafana-light';\n\n return <MonacoEditor theme={monacoTheme} {...props} />;\n};\n"],"names":["_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","push","apply","_objectSpread2","target","i","arguments","length","source","forEach","getOwnPropertyDescriptors","defineProperties","_arrayLikeToArray","arr","len","arr2","Array","compose","_len","fns","_key","x","reduceRight","y","f","curry","fn","curried","_this","this","_len2","args","_key2","_len3","nextArgs","_key3","concat","isObject","toString","call","includes","isFunction","errorHandler","errorMessages","type","Error","initialIsRequired","initialType","initialContent","handlerType","handlersType","selectorType","changeType","changeField","validators","changes","initial","some","field","property","prototype","hasOwnProperty","selector","handler","values","_handler","extractChanges","state","causedChanges","current","updateState","didStateUpdate","_handler$field","index","create","undefined","didUpdate","update","validate","getChanges","getState","setState","paths","vs","configIsRequired","configType","deprecation","config","urls","console","warn","monacoBase","merge","assign","CANCELATION_MESSAGE","msg","promise","hasCanceled_","wrappedPromise","Promise","resolve","reject","then","val","cancel","_state$create","isInitialized","monaco","_state$create2","isArray","_arrayWithHoles","Symbol","iterator","_arr","_n","_d","_e","_s","_i","next","done","err","_iterableToArrayLimit","o","minLen","n","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","injectScripts","script","document","body","appendChild","getMonacoLoaderScript","configureLoader","src","_ref2","loaderScript","createElement","onload","onerror","_ref3","require","window","storeMonacoInstance","error","wrapperPromise","loader","init","_ref","editor","__getMonacoInstance","_ref4","_extends","loadingStyles","display","height","width","justifyContent","alignItems","content","style","wrapper","position","textAlign","fullWidth","hide","MonacoContainer","isEditorReady","loading","className","wrapperProps","ref","propTypes","isRequired","memo","effect","useEffect","deps","applyChanges","isInitialMount","useRef","noop","getOrCreateModel","language","path","getModel","createModelUri","createModel","Uri","parse","DiffEditor","original","modified","originalLanguage","modifiedLanguage","originalModelPath","modifiedModelPath","keepCurrentOriginalModel","keepCurrentModifiedModel","theme","options","beforeMount","onMount","setIsEditorReady","useState","isMonacoMounting","setIsMonacoMounting","editorRef","monacoRef","containerRef","onMountRef","beforeMountRef","cancelable","catch","models","_models$original","_models$modified","dispose","disposeEditor","modifiedEditor","getModifiedEditor","getOption","EditorOption","readOnly","setValue","getValue","executeEdits","range","getFullModelRange","text","forceMoveMarkers","pushUndoStop","setModelLanguage","setTheme","updateOptions","setModels","useCallback","originalModel","modifiedModel","setModel","createEditor","createDiffEditor","automaticLayout","defaultProps","setMonaco","_cancelable","viewStates","Map","Editor","defaultValue","defaultLanguage","defaultPath","line","overrideServices","saveViewState","keepCurrentModel","onChange","onValidate","subscriptionRef","valueRef","previousPath","_subscriptionRef$curr2","_editorRef$current$ge2","set","model","restoreViewState","get","revealLine","autoCreatedModelPath","defaultModel","_subscriptionRef$curr","_editorRef$current","onDidChangeModelContent","event","editorValue","changeMarkersListener","onDidChangeMarkers","uris","_editorRef$current$ge","editorUri","uri","find","markers","getModelMarkers","resource","defineThemes","colors","components","input","background","secondary","getColors","defineTheme","base","inherit","rules","token","foreground","visualization","getColorByName","initalized","ReactMonacoEditor","props","useTheme2","useMonaco","monacoEditorLoader","__grafana_public_path__","monacoTheme","isDark"],"sourceRoot":""}