import { memo as e, useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
import a from "prop-types";
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
import { MoonIcon as l, SunIcon as u } from "@primer/octicons-react";
import d from "lodash/identity.js";
import { createSelector as f } from "reselect";
import * as p from "monaco-editor";
import { List as m, fromJS as h } from "immutable";
import g from "lodash/noop.js";
import { registerMarkerDataProvider as _ } from "monaco-marker-data-provider";
import { ILogService as v, initialize as y } from "@codingame/monaco-vscode-api";
import "vscode/localExtensionHost";
import { IQuickInputService as b, IStorageService as x, StandaloneServices as S } from "@codingame/monaco-vscode-api/services";
import { ConsoleLogger as C, LogLevel as w } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log";
//#region src/plugins/editor-monaco/themes/se-vs-dark.js
var T = {
	base: "vs-dark",
	inherit: !0,
	rules: [
		{
			token: "swagger-host",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "swagger-base-path",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "swagger-schemes",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "swagger-consumes",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "swagger-produces",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "swagger-security",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "swagger-tags",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "definitions",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "parameterDefinitions",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "responseDefinitions",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "securityDefinitions",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "externalDocumentation",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "operation-consumes",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "operation-produces",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "openapi",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "info",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "jsonSchemaDialect",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "servers",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "paths",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "webhooks",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "components",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "security",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "tags",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "externalDocumentation",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "spec-version",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "defaultContentType",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "channels",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "operations",
			foreground: "#d0d0e3",
			fontStyle: "bold"
		},
		{
			token: "components-messages",
			foreground: "#C678DD",
			fontStyle: "bold"
		},
		{
			token: "components-messageTraits",
			foreground: "#C678DD",
			fontStyle: "bold"
		},
		{
			token: "messages",
			foreground: "#C678DD",
			fontStyle: "italic"
		},
		{
			token: "message",
			foreground: "#C678DD"
		},
		{
			token: "messageTraits",
			foreground: "#C678DD",
			fontStyle: "italic"
		},
		{
			token: "messageExample",
			foreground: "#C678DD"
		},
		{
			token: "components-operations",
			foreground: "#66afce",
			fontStyle: "bold"
		},
		{
			token: "components-operationTraits",
			foreground: "#66afce",
			fontStyle: "bold"
		},
		{
			token: "operation",
			foreground: "#66afce",
			fontStyle: "bold"
		},
		{
			token: "operationTraits",
			foreground: "#66afce",
			fontStyle: "italic"
		},
		{
			token: "operationBindings",
			foreground: "#66afce"
		},
		{
			token: "channelBindings",
			foreground: "#66afce"
		},
		{
			token: "messageBindings",
			foreground: "#66afce"
		},
		{
			token: "serverBindings",
			foreground: "#66afce"
		},
		{
			token: "operation.httpMethod-GET",
			foreground: "#0099ff",
			fontStyle: "bold"
		},
		{
			token: "operation.httpMethod-POST",
			foreground: "#00cc99",
			fontStyle: "bold"
		},
		{
			token: "parameters",
			foreground: "#C678DD",
			fontStyle: "italic"
		},
		{
			token: "parameter",
			foreground: "#C678DD",
			fontStyle: "italic"
		},
		{
			token: "components-parameters",
			foreground: "#C678DD",
			fontStyle: "bold"
		},
		{
			token: "reference-element",
			foreground: "#ff5500",
			fontStyle: "bold"
		},
		{
			token: "reference-value",
			foreground: "#ffddcc",
			fontStyle: "italic"
		},
		{
			token: "components-schemas",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "schema",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "multiFormatSchema",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "pathItem",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "channelItem",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "channel",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-channels",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "requestBody",
			foreground: "#ceca84",
			fontStyle: "italic"
		},
		{
			token: "responses",
			foreground: "#ceca84",
			fontStyle: "italic"
		},
		{
			token: "components-responses",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-request-bodies",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "content",
			foreground: "#ceca84"
		},
		{
			token: "mediaType",
			foreground: "#ceca84"
		},
		{
			token: "response",
			foreground: "#ceca84"
		},
		{
			token: "server",
			foreground: "#ceca84"
		},
		{
			token: "components-examples",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-headers",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-links",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-security-schemes",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-callbacks",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-pathItems",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-path-items",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-replies",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-reply-addresses",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "operationReply",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "operationReplyAddress",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-tags",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "components-external-documentation",
			foreground: "#ceca84",
			fontStyle: "bold"
		},
		{
			token: "value",
			foreground: "#98C379"
		},
		{
			token: "value.string",
			foreground: "#98C379"
		},
		{
			token: "value.number",
			foreground: "#98C379"
		},
		{
			token: "key.string",
			foreground: "#e8b9bb"
		},
		{
			token: "key.number",
			foreground: "#e8b9bb"
		},
		{
			token: "api-version",
			foreground: "#1de2fa"
		},
		{
			token: "server-url",
			foreground: "#1de2fa"
		},
		{
			token: "callback",
			foreground: "#1de2fa"
		},
		{
			token: "contact",
			foreground: "#1de2fa"
		},
		{
			token: "discriminator",
			foreground: "#1de2fa"
		},
		{
			token: "example",
			foreground: "#1de2fa"
		},
		{
			token: "examples",
			foreground: "#1de2fa"
		},
		{
			token: "header",
			foreground: "#1de2fa"
		},
		{
			token: "license",
			foreground: "#1de2fa"
		},
		{
			token: "oAuthFlow",
			foreground: "#1de2fa"
		},
		{
			token: "oAuthFlows",
			foreground: "#1de2fa"
		},
		{
			token: "operation-example",
			foreground: "#1de2fa"
		},
		{
			token: "operation-callbacks",
			foreground: "#1de2fa"
		},
		{
			token: "securityScheme",
			foreground: "#1de2fa"
		},
		{
			token: "securityRequirement",
			foreground: "#1de2fa"
		},
		{
			token: "server-variables",
			foreground: "#1de2fa"
		},
		{
			token: "messageTrait",
			foreground: "#1de2fa"
		},
		{
			token: "operationTrait",
			foreground: "#1de2fa"
		},
		{
			token: "channel-binding",
			foreground: "#1de2fa"
		},
		{
			token: "message-binding",
			foreground: "#1de2fa"
		},
		{
			token: "operation-binding",
			foreground: "#1de2fa"
		},
		{
			token: "server-binding",
			foreground: "#1de2fa"
		},
		{
			token: "version",
			foreground: "#1de2fa"
		},
		{
			token: "title",
			foreground: "#1de2fa"
		},
		{
			token: "specVersion",
			foreground: "#1de2fa"
		},
		{
			token: "asyncApiVersion",
			foreground: "#1de2fa"
		},
		{
			token: "openapi-reference",
			foreground: "#ff9966"
		},
		{
			token: "reference",
			foreground: "#ff9966"
		},
		{
			token: "asyncapi-reference",
			foreground: "#ff9966"
		},
		{
			token: "json-reference",
			foreground: "#ff9966"
		},
		{
			token: "plain.value",
			foreground: "#EAEBEB"
		},
		{
			token: "plain.value.string",
			foreground: "#A6E0FE"
		},
		{
			token: "plain.value.number",
			foreground: "#B18AFF"
		},
		{
			token: "plain.value.boolean",
			foreground: "#47AA4A"
		},
		{
			token: "plain.keyword",
			foreground: "#CB973C"
		}
	],
	colors: {
		"editor.background": "#282c34",
		"editor.foreground": "#abb2bf",
		"editorLineNumber.foreground": "#636D83",
		"editorLineNumber.activeForeground": "#ABB2BF",
		"editorHoverWidget.background": "#282c34",
		"editorHoverWidget.border": "#636D83",
		"minimap.background": "#282c34"
	}
}, E = {
	base: "vs",
	inherit: !0,
	rules: [
		{
			token: "swagger-host",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "swagger-base-path",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "swagger-schemes",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "swagger-consumes",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "swagger-produces",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "swagger-security",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "swagger-tags",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "definitions",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "parameterDefinitions",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "responseDefinitions",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "securityDefinitions",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "externalDocumentation",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "operation-consumes",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "operation-produces",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "openapi",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "info",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "jsonSchemaDialect",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "servers",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "paths",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "webhooks",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "components",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "security",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "tags",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "externalDocumentation",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "spec-version",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "defaultContentType",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "channels",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "operations",
			foreground: "#000033",
			fontStyle: "bold"
		},
		{
			token: "components-messages",
			foreground: "#993399",
			fontStyle: "bold"
		},
		{
			token: "components-messageTraits",
			foreground: "#993399",
			fontStyle: "bold"
		},
		{
			token: "messages",
			foreground: "#993399",
			fontStyle: "italic"
		},
		{
			token: "message",
			foreground: "#993399"
		},
		{
			token: "messageTraits",
			foreground: "#993399",
			fontStyle: "italic"
		},
		{
			token: "messageExample",
			foreground: "#993399"
		},
		{
			token: "components-operations",
			foreground: "#66afce",
			fontStyle: "bold"
		},
		{
			token: "components-operationTraits",
			foreground: "#66afce",
			fontStyle: "bold"
		},
		{
			token: "operation",
			foreground: "#66afce",
			fontStyle: "bold"
		},
		{
			token: "operationTraits",
			foreground: "#66afce",
			fontStyle: "italic"
		},
		{
			token: "operationBindings",
			foreground: "#66afce"
		},
		{
			token: "channelBindings",
			foreground: "#66afce"
		},
		{
			token: "messageBindings",
			foreground: "#66afce"
		},
		{
			token: "serverBindings",
			foreground: "#66afce"
		},
		{
			token: "operation.httpMethod-GET",
			foreground: "#006699",
			fontStyle: "bold"
		},
		{
			token: "operation.httpMethod-POST",
			foreground: "#339966",
			fontStyle: "bold"
		},
		{
			token: "parameters",
			foreground: "#993399",
			fontStyle: "italic"
		},
		{
			token: "parameter",
			foreground: "#993399",
			fontStyle: "italic"
		},
		{
			token: "components-parameters",
			foreground: "#993399",
			fontStyle: "bold"
		},
		{
			token: "reference-element",
			foreground: "#cc3300",
			fontStyle: "bold"
		},
		{
			token: "reference-value",
			foreground: "#ff5500",
			fontStyle: "italic"
		},
		{
			token: "components-schemas",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "schema",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "multiFormatSchema",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "pathItem",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "channelItem",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "channel",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-channels",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "requestBody",
			foreground: "#666633",
			fontStyle: "italic"
		},
		{
			token: "responses",
			foreground: "#666633",
			fontStyle: "italic"
		},
		{
			token: "components-responses",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-request-bodies",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "content",
			foreground: "#666633"
		},
		{
			token: "mediaType",
			foreground: "#666633"
		},
		{
			token: "response",
			foreground: "#666633"
		},
		{
			token: "server",
			foreground: "#666633"
		},
		{
			token: "components-examples",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-headers",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-links",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-security-schemes",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-callbacks",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-pathItems",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-path-items",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-replies",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-reply-addresses",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "operationReply",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "operationReplyAddress",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-tags",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "components-external-documentation",
			foreground: "#666633",
			fontStyle: "bold"
		},
		{
			token: "value",
			foreground: "#339933"
		},
		{
			token: "value.string",
			foreground: "#339933"
		},
		{
			token: "value.number",
			foreground: "#339933"
		},
		{
			token: "key.string",
			foreground: "#cc6600"
		},
		{
			token: "key.number",
			foreground: "#cc6600"
		},
		{
			token: "api-version",
			foreground: "#0099cc"
		},
		{
			token: "server-url",
			foreground: "#0099cc"
		},
		{
			token: "callback",
			foreground: "#0099cc"
		},
		{
			token: "contact",
			foreground: "#0099cc"
		},
		{
			token: "discriminator",
			foreground: "#0099cc"
		},
		{
			token: "example",
			foreground: "#0099cc"
		},
		{
			token: "examples",
			foreground: "#0099cc"
		},
		{
			token: "header",
			foreground: "#0099cc"
		},
		{
			token: "license",
			foreground: "#0099cc"
		},
		{
			token: "oAuthFlow",
			foreground: "#0099cc"
		},
		{
			token: "oAuthFlows",
			foreground: "#0099cc"
		},
		{
			token: "operation-example",
			foreground: "#0099cc"
		},
		{
			token: "operation-callbacks",
			foreground: "#0099cc"
		},
		{
			token: "securityScheme",
			foreground: "#0099cc"
		},
		{
			token: "securityRequirement",
			foreground: "#0099cc"
		},
		{
			token: "server-variables",
			foreground: "#0099cc"
		},
		{
			token: "messageTrait",
			foreground: "#0099cc"
		},
		{
			token: "operationTrait",
			foreground: "#0099cc"
		},
		{
			token: "channel-binding",
			foreground: "#0099cc"
		},
		{
			token: "message-binding",
			foreground: "#0099cc"
		},
		{
			token: "operation-binding",
			foreground: "#0099cc"
		},
		{
			token: "server-binding",
			foreground: "#0099cc"
		},
		{
			token: "version",
			foreground: "#0099cc"
		},
		{
			token: "title",
			foreground: "#0099cc"
		},
		{
			token: "specVersion",
			foreground: "#0099cc"
		},
		{
			token: "asyncApiVersion",
			foreground: "#0099cc"
		},
		{
			token: "openapi-reference",
			foreground: "#ff9966"
		},
		{
			token: "reference",
			foreground: "#ff9966"
		},
		{
			token: "asyncapi-reference",
			foreground: "#ff9966"
		},
		{
			token: "json-reference",
			foreground: "#ff9966"
		},
		{
			token: "plain.value",
			foreground: "#434B4F"
		},
		{
			token: "plain.value.string",
			foreground: "#0077C4"
		},
		{
			token: "plain.value.number",
			foreground: "#803EC2"
		},
		{
			token: "plain.value.boolean",
			foreground: "#177E1B"
		},
		{
			token: "plain.keyword",
			foreground: "#9A6200"
		}
	],
	colors: {
		"editor.background": "#F9F9F9",
		"editor.foreground": "#383a42",
		"editorLineNumber.foreground": "#9D9D9F",
		"editorLineNumber.activeForeground": "#383A42",
		"editorHoverWidget.background": "#F9F9F9",
		"editorHoverWidget.border": "#9D9D9F",
		"minimap.background": "#F9F9F9"
	}
}, D = (e) => {
	n(e, []);
}, O = (e, t, i = !0) => {
	let a = r(!0);
	n(a.current || !i ? () => {
		a.current = !1;
	} : e, t);
}, ee = ({ eventName: e, editorRef: t }) => {
	n(() => {
		let n = {}, r = {}, i = !1, a = ({ detail: e }) => {
			r = e;
		};
		function o() {
			i || ((n.width !== r.width || n.height !== r.height) && (t.current.layout(), n = r), globalThis.requestAnimationFrame(o));
		}
		return globalThis.requestAnimationFrame(o), globalThis.addEventListener(e, a), () => {
			i = !0, globalThis.removeEventListener(e, a);
		};
	}, [e, t]);
}, k = ({ value: e, theme: a, language: o, isReadOnly: c = !1, bracketPairColorizationEnabled: l = !1, onMount: u = g, onWillUnmount: d = g, onChange: f = g, onEditorMarkersDidChange: m = g }) => {
	let h = r(null), _ = r(null), v = r(null), y = r(e), b = r(!1), [x, S] = i(!1), C = t(() => {
		h.current && (b.current ||= (_.current = p.editor.create(h.current, {
			value: e,
			language: o,
			"semanticHighlighting.enabled": !0,
			theme: a,
			glyphMargin: !0,
			lightbulb: { enabled: !0 },
			lineNumbers: "on",
			autoIndent: "full",
			formatOnPaste: !0,
			formatOnType: !0,
			wordWrap: "on",
			minimap: { enabled: !0 },
			domReadOnly: c,
			readOnly: c,
			wordBasedSuggestions: !1,
			quickSuggestions: !0,
			quickSuggestionsDelay: 300,
			fixedOverflowWidgets: !0,
			"bracketPairColorization.enabled": l,
			suggest: { snippetsPreventQuickSuggestions: !1 },
			renderWhitespace: !0,
			matchOnWordStartOnly: !1
		}), _.current.getModel().updateOptions({ tabSize: 2 }), S(!0), !0));
	}, [
		e,
		o,
		a,
		c,
		l
	]), w = t(() => {
		d(_.current, p), v.current?.dispose(), _.current.getModel()?.dispose(), _.current.dispose();
	}, [d]);
	return D(() => () => {
		_.current && w();
	}), D(() => {
		p.editor.defineTheme("se-vs-dark", T), p.editor.defineTheme("se-vs-light", E);
	}), O(() => {
		p.editor.setModelLanguage(_.current.getModel(), o);
	}, [o], x), O(() => {
		if (y.current = e, _.current.getOption(p.editor.EditorOption.readOnly)) _.current.setValue(e);
		else if (e !== _.current.getValue()) {
			let t = _.current.getModel(), n = t.getLanguageId();
			t.dispose(), _.current.setModel(p.editor.createModel(e, n));
		}
	}, [e], x), O(() => {
		_.current.updateOptions({
			domReadOnly: c,
			readOnly: c
		});
	}, [c], x), O(() => {
		p.editor.setTheme(a);
	}, [a], x), n(() => {
		if (!x) return;
		let e = p.editor.onDidChangeMarkers((e) => {
			let { uri: t } = _.current.getModel();
			e.find((e) => String(e) === String(t)) && m(p.editor.getModelMarkers({ resource: t }));
		});
		return () => {
			e.dispose();
		};
	}, [x, m]), n(() => {
		x && (v.current?.dispose(), v.current = _.current?.onDidChangeModelContent((e) => {
			let t = _.current.getValue();
			y.current !== t && (y.current = t, f(t, e));
		}));
	}, [x, f]), n(() => {
		x && _.current.layout();
	}, [x]), n(() => {
		x && u(_.current);
	}, [x, u]), n(() => {
		x || C();
	}, [x, C]), ee({
		eventName: "editorcontainerresize",
		editorRef: _
	}), /* @__PURE__ */ s("div", {
		ref: h,
		className: "swagger-editor__editor-monaco"
	});
};
k.propTypes = {
	value: a.string.isRequired,
	language: a.string.isRequired,
	theme: a.string.isRequired,
	isReadOnly: a.bool,
	bracketPairColorizationEnabled: a.bool,
	onMount: a.func,
	onWillUnmount: a.func,
	onChange: a.func,
	onEditorMarkersDidChange: a.func
};
//#endregion
//#region src/plugins/editor-monaco/components/MonacoEditor/MonacoEditorContainer.jsx
var A = ({ editorActions: e, editorSelectors: n, isReadOnly: r = !1, bracketPairColorizationEnabled: i = !1, EditorContentOrigin: a }) => {
	let o = n.selectTheme(), c = n.selectContent(), l = n.selectLanguage(), u = t((t) => {
		t.focus(), e.editorSetup(t, "monaco");
	}, [e]), d = t((t) => {
		e.editorTearDown(t, "monaco");
	}, [e]);
	return /* @__PURE__ */ s(k, {
		language: l,
		theme: o,
		value: c,
		isReadOnly: r,
		bracketPairColorizationEnabled: i,
		onChange: t((t) => {
			e.setContentDebounced(t, a.Editor);
		}, [e, a]),
		onMount: u,
		onWillUnmount: d,
		onEditorMarkersDidChange: t((t) => {
			e.setMarkers(t);
		}, [e])
	});
};
A.propTypes = {
	isReadOnly: a.bool,
	bracketPairColorizationEnabled: a.bool,
	editorActions: a.shape({
		editorSetup: a.func.isRequired,
		editorTearDown: a.func.isRequired,
		setContentDebounced: a.func.isRequired,
		setMarkers: a.func.isRequired
	}).isRequired,
	editorSelectors: a.shape({
		selectLanguage: a.func.isRequired,
		selectContent: a.func.isRequired,
		selectTheme: a.func.isRequired
	}).isRequired,
	EditorContentOrigin: a.shape({ Editor: a.string.isRequired }).isRequired
};
//#endregion
//#region src/plugins/editor-monaco/components/ValidationPane/ValidationPane.jsx
var j = ({ editorSelectors: e, editorActions: n, getComponent: r, alwaysDisplayHeading: i = !1, onValidationClick: a = () => {} }) => {
	let o = e.selectMarkers(), c = r("ValidationTable"), l = i || o.length > 0, u = t((e, t) => {
		let r = {
			lineNumber: t.startLineNumber,
			column: t.startColumn
		};
		a(t), n.setPosition(r);
	}, [a, n]);
	return /* @__PURE__ */ s("div", {
		className: "swagger-editor__validation-pane",
		children: l && /* @__PURE__ */ s(c, {
			data: o,
			onRowClick: u
		})
	});
};
j.propTypes = {
	alwaysDisplayHeading: a.bool,
	editorActions: a.shape({ setPosition: a.func.isRequired }).isRequired,
	editorSelectors: a.shape({ selectMarkers: a.func.isRequired }).isRequired,
	getComponent: a.func.isRequired,
	onValidationClick: a.func
};
//#endregion
//#region src/plugins/editor-monaco/components/ValidationTable/SeverityIcon.jsx
var M = e(({ severity: e }) => /* @__PURE__ */ c(o, { children: [
	e === 8 && /* @__PURE__ */ s("img", {
		src: "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20xml:space='preserve'%3e%3cdefs%3e%3c/defs%3e%3cg%20style='stroke:%20none;%20stroke-width:%200;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20none;%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='translate(1.4065934065934016%201.4065934065934016)%20scale(2.81%202.81)'%20%3e%3cpath%20d='M%2045%2090%20C%2020.187%2090%200%2069.813%200%2045%20C%200%2020.187%2020.187%200%2045%200%20c%2024.813%200%2045%2020.187%2045%2045%20C%2090%2069.813%2069.813%2090%2045%2090%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(232,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2045%2060.473%20c%20-2.493%200%20-4.515%20-2.022%20-4.515%20-4.515%20v%20-36.44%20c%200%20-2.493%202.022%20-4.515%204.515%20-4.515%20s%204.515%202.022%204.515%204.515%20v%2036.44%20C%2049.515%2058.451%2047.493%2060.473%2045%2060.473%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(255,255,255);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2045%2075.003%20c%20-1.186%200%20-2.348%20-0.486%20-3.195%20-1.333%20c%20-0.203%20-0.203%20-0.395%20-0.44%20-0.564%20-0.677%20c%20-0.158%20-0.248%20-0.294%20-0.508%20-0.406%20-0.79%20c%20-0.113%20-0.271%20-0.203%20-0.553%20-0.26%20-0.836%20c%20-0.056%20-0.293%20-0.09%20-0.586%20-0.09%20-0.88%20c%200%20-1.197%200.485%20-2.359%201.321%20-3.195%20c%200.214%20-0.215%200.44%20-0.407%200.688%20-0.564%20c%200.249%20-0.17%200.508%20-0.305%200.779%20-0.418%20c%200.271%20-0.112%200.553%20-0.203%200.847%20-0.26%20c%200.576%20-0.112%201.186%20-0.112%201.761%200%20c%200.294%200.057%200.576%200.148%200.847%200.26%20c%200.27%200.112%200.53%200.248%200.778%200.418%20c%200.248%200.158%200.474%200.349%200.689%200.564%20c%200.834%200.836%201.321%201.997%201.321%203.195%20c%200%201.185%20-0.486%202.348%20-1.321%203.182%20c%20-0.215%200.215%20-0.441%200.407%20-0.689%200.564%20c%20-0.248%200.159%20-0.508%200.305%20-0.778%200.418%20c%20-0.271%200.114%20-0.553%200.204%20-0.847%200.26%20C%2045.587%2074.969%2045.293%2075.003%2045%2075.003%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(255,255,255);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3c/g%3e%3c/svg%3e",
		title: "Error",
		alt: "Error",
		width: "13",
		height: "13"
	}),
	e === 4 && /* @__PURE__ */ s("img", {
		src: "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20xml:space='preserve'%3e%3cdefs%3e%3c/defs%3e%3cg%20style='stroke:%20none;%20stroke-width:%200;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20none;%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='translate(1.4065934065934016%201.4065934065934016)%20scale(2.81%202.81)'%20%3e%3cpath%20d='M%2045%2088.11%20h%2040.852%20c%203.114%200%205.114%20-3.307%203.669%20-6.065%20L%2048.669%204.109%20c%20-1.551%20-2.959%20-5.786%20-2.959%20-7.337%200%20L%200.479%2082.046%20c%20-1.446%202.758%200.555%206.065%203.669%206.065%20H%2045%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(255,157,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2045%2064.091%20L%2045%2064.091%20c%20-1.554%200%20-2.832%20-1.223%20-2.9%20-2.776%20l%20-2.677%20-25.83%20c%20-0.243%20-3.245%202.323%20-6.011%205.577%20-6.011%20h%200%20c%203.254%200%205.821%202.767%205.577%206.011%20L%2047.9%2061.315%20C%2047.832%2062.867%2046.554%2064.091%2045%2064.091%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(255,255,255);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='44.995999999999995'%20cy='74.02600000000001'%20r='4.626'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(255,255,255);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'/%3e%3c/g%3e%3c/svg%3e",
		title: "Warning",
		alt: "Warning",
		width: "13",
		height: "13"
	}),
	e === 2 && /* @__PURE__ */ s("img", {
		src: "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20xml:space='preserve'%3e%3cdefs%3e%3c/defs%3e%3cg%20style='stroke:%20none;%20stroke-width:%200;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20none;%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='translate(1.4065934065934016%201.4065934065934016)%20scale(2.81%202.81)'%20%3e%3cpath%20d='M%2045%200%20C%2020.187%200%200%2020.187%200%2045%20c%200%2024.813%2020.187%2045%2045%2045%20c%2024.813%200%2045%20-20.187%2045%20-45%20C%2090%2020.187%2069.813%200%2045%200%20z%20M%2052.706%2067.583%20l%20-0.521%202.194%20c%20-0.227%200.958%20-0.938%201.736%20-1.878%202.028%20c%20-3.267%201.016%20-6.733%201.262%20-10.125%200.711%20c%20-2.291%20-0.373%20-3.846%20-2.532%20-3.474%20-4.823%20l%203.067%20-18.855%20c%200.363%20-2.232%20-0.817%20-4.315%20-2.697%20-5.247%20c%20-1.175%20-0.582%20-1.805%20-1.885%20-1.502%20-3.161%20l%200.521%20-2.194%20c%200.227%20-0.958%200.938%20-1.736%201.878%20-2.029%20c%203.267%20-1.016%206.733%20-1.262%2010.125%20-0.711%20c%202.291%200.373%203.846%202.532%203.474%204.823%20l%20-3.067%2018.855%20c%20-0.363%202.232%200.817%204.315%202.697%205.247%20C%2052.379%2065.004%2053.008%2066.307%2052.706%2067.583%20z%20M%2047.55%2031.096%20c%20-3.838%200%20-6.95%20-3.112%20-6.95%20-6.95%20s%203.112%20-6.95%206.95%20-6.95%20s%206.95%203.112%206.95%206.95%20S%2051.388%2031.096%2047.55%2031.096%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(62,96,181);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3c/g%3e%3c/svg%3e",
		title: "Info",
		alt: "Info",
		width: "13",
		height: "13"
	}),
	e === 1 && /* @__PURE__ */ s("img", {
		src: "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20xml:space='preserve'%3e%3cdefs%3e%3c/defs%3e%3cg%20style='stroke:%20none;%20stroke-width:%200;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20none;%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='translate(1.4065934065934016%201.4065934065934016)%20scale(2.81%202.81)'%20%3e%3cpath%20d='M%2052.885%2075.154%20h%20-15.77%20c%20-1.864%200%20-3.381%20-1.517%20-3.381%20-3.381%20v%20-7.578%20c%200%20-4.308%20-2.004%20-8.363%20-5.499%20-11.129%20c%20-7.019%20-5.555%20-10.832%20-14.215%20-10.2%20-23.166%20c%200.947%20-13.42%2011.79%20-24.176%2025.222%20-25.02%20C%2050.809%204.4%2058.006%206.988%2063.504%2012.15%20c%205.421%205.092%208.53%2012.275%208.53%2019.71%20c%200%208.405%20-3.813%2016.189%20-10.459%2021.355%20c%20-3.324%202.583%20-5.31%206.688%20-5.31%2010.979%20v%207.58%20C%2056.266%2073.638%2054.749%2075.154%2052.885%2075.154%20z%20M%2045.018%206.826%20c%20-0.543%200%20-1.087%200.017%20-1.636%200.051%20C%2030.946%207.658%2020.907%2017.616%2020.03%2030.041%20c%20-0.585%208.292%202.946%2016.313%209.446%2021.457%20c%203.977%203.147%206.258%207.775%206.258%2012.697%20v%207.578%20c%200%200.762%200.62%201.381%201.381%201.381%20h%2015.77%20c%200.762%200%201.381%20-0.619%201.381%20-1.381%20v%20-7.58%20c%200%20-4.903%202.273%20-9.599%206.083%20-12.559%20c%206.155%20-4.783%209.686%20-11.992%209.686%20-19.775%20c%200%20-6.985%20-2.806%20-13.468%20-7.899%20-18.252%20C%2057.442%209.202%2051.416%206.826%2045.018%206.826%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2048.409%2085.174%20h%20-6.818%20c%20-2.929%200%20-5.311%20-2.382%20-5.311%20-5.311%20v%20-5.709%20c%200%20-0.553%200.448%20-1%201%20-1%20H%2052.72%20c%200.553%200%201%200.447%201%201%20v%205.709%20C%2053.72%2082.792%2051.338%2085.174%2048.409%2085.174%20z%20M%2038.28%2075.154%20v%204.709%20c%200%201.825%201.485%203.311%203.311%203.311%20h%206.818%20c%201.825%200%203.311%20-1.485%203.311%20-3.311%20v%20-4.709%20H%2038.28%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2089%2032.334%20H%2078.418%20c%20-0.553%200%20-1%20-0.448%20-1%20-1%20s%200.447%20-1%201%20-1%20H%2089%20c%200.553%200%201%200.448%201%201%20S%2089.553%2032.334%2089%2032.334%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2011.583%2032.334%20H%201%20c%20-0.552%200%20-1%20-0.448%20-1%20-1%20s%200.448%20-1%201%20-1%20h%2010.583%20c%200.552%200%201%200.448%201%201%20S%2012.135%2032.334%2011.583%2032.334%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2074.229%2016.133%20c%20-0.352%200%20-0.693%20-0.186%20-0.876%20-0.515%20c%20-0.268%20-0.483%20-0.093%20-1.092%200.391%20-1.359%20l%209.256%20-5.13%20c%200.482%20-0.268%201.092%20-0.093%201.359%200.39%20s%200.093%201.092%20-0.391%201.359%20l%20-9.256%205.13%20C%2074.559%2016.093%2074.393%2016.133%2074.229%2016.133%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%206.518%2053.666%20c%20-0.352%200%20-0.693%20-0.186%20-0.875%20-0.516%20c%20-0.268%20-0.482%20-0.093%20-1.091%200.39%20-1.359%20l%209.255%20-5.131%20c%200.483%20-0.267%201.091%20-0.093%201.359%200.391%20c%200.268%200.482%200.093%201.091%20-0.39%201.359%20l%20-9.255%205.131%20C%206.848%2053.626%206.682%2053.666%206.518%2053.666%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2015.771%2016.133%20c%20-0.164%200%20-0.33%20-0.04%20-0.484%20-0.125%20l%20-9.255%20-5.13%20C%205.549%2010.609%205.374%2010%205.642%209.518%20C%205.91%209.035%206.518%208.86%207.001%209.128%20l%209.255%205.13%20c%200.483%200.268%200.658%200.876%200.39%201.359%20C%2016.464%2015.947%2016.123%2016.133%2015.771%2016.133%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2083.482%2053.666%20c%20-0.164%200%20-0.33%20-0.04%20-0.483%20-0.125%20l%20-9.256%20-5.131%20c%20-0.483%20-0.269%20-0.658%20-0.877%20-0.391%20-1.359%20c%200.268%20-0.484%200.878%20-0.658%201.359%20-0.391%20l%209.256%205.131%20c%200.483%200.269%200.658%200.877%200.391%201.359%20C%2084.176%2053.48%2083.834%2053.666%2083.482%2053.666%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2045%2041.979%20c%20-2.429%200%20-4.406%20-1.977%20-4.406%20-4.406%20V%2018.275%20c%200%20-2.429%201.977%20-4.406%204.406%20-4.406%20c%202.429%200%204.405%201.977%204.405%204.406%20v%2019.298%20C%2049.405%2040.003%2047.429%2041.979%2045%2041.979%20z%20M%2045%2015.87%20c%20-1.327%200%20-2.406%201.079%20-2.406%202.406%20v%2019.298%20c%200%201.327%201.079%202.406%202.406%202.406%20c%201.326%200%202.405%20-1.079%202.405%20-2.406%20V%2018.275%20C%2047.405%2016.949%2046.326%2015.87%2045%2015.87%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3cpath%20d='M%2045%2054.13%20c%20-2.429%200%20-4.406%20-1.977%20-4.406%20-4.405%20V%2049.23%20c%200%20-2.43%201.977%20-4.406%204.406%20-4.406%20c%202.429%200%204.405%201.976%204.405%204.406%20v%200.494%20C%2049.405%2052.153%2047.429%2054.13%2045%2054.13%20z%20M%2045%2046.825%20c%20-1.327%200%20-2.406%201.079%20-2.406%202.405%20v%200.494%20c%200%201.326%201.079%202.405%202.406%202.405%20c%201.326%200%202.405%20-1.079%202.405%20-2.405%20V%2049.23%20C%2047.405%2047.904%2046.326%2046.825%2045%2046.825%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3c/g%3e%3c/svg%3e",
		title: "Hint",
		alt: "Hint",
		width: "13",
		height: "13"
	})
] }));
M.propTypes = { severity: a.oneOf([
	8,
	4,
	2,
	1
]).isRequired };
//#endregion
//#region src/plugins/editor-monaco/components/ValidationTable/ValidationTable.jsx
var N = ({ data: e, onRowClick: t }) => /* @__PURE__ */ c("table", {
	role: "table",
	className: "swagger-editor__validation-table",
	children: [/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ c("tr", { children: [
		/* @__PURE__ */ s("th", {
			role: "columnheader",
			children: "Severity"
		}),
		/* @__PURE__ */ s("th", {
			role: "columnheader",
			children: "Line"
		}),
		/* @__PURE__ */ s("th", {
			role: "columnheader",
			children: "Code"
		}),
		/* @__PURE__ */ s("th", {
			role: "columnheader",
			children: "Message"
		})
	] }) }), /* @__PURE__ */ s("tbody", { children: e.map((e, n) => /* @__PURE__ */ c("tr", {
		role: "row button",
		onClick: (n) => t(n, e),
		children: [
			/* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(M, { severity: e.severity }) }),
			/* @__PURE__ */ s("td", { children: e.startLineNumber }),
			/* @__PURE__ */ s("td", { children: e.code }),
			/* @__PURE__ */ s("td", { children: e.message })
		]
	}, n)) })]
});
N.propTypes = {
	data: a.oneOfType([a.array]).isRequired,
	onRowClick: a.func.isRequired
};
//#endregion
//#region src/plugins/editor-monaco/components/ThemeSelectionIcon.jsx
var P = ({ editorSelectors: e, editorActions: t }) => {
	let n = e.selectTheme(), r = (e) => () => {
		t.setTheme(e);
	};
	return n === "se-vs-dark" ? /* @__PURE__ */ s("div", {
		className: "swagger-editor__generic-padding-thin-top-bottom",
		children: /* @__PURE__ */ s("button", {
			type: "button",
			className: "swagger-editor__editor-pane-bar-control",
			onClick: r("se-vs-light"),
			children: /* @__PURE__ */ s(u, {
				size: "small",
				"aria-label": "Light theme"
			})
		})
	}) : /* @__PURE__ */ s("div", {
		className: "swagger-editor__generic-padding-thin-top-bottom",
		children: /* @__PURE__ */ s("button", {
			type: "button",
			className: "swagger-editor__editor-pane-bar-control",
			onClick: r("se-vs-dark"),
			children: /* @__PURE__ */ s(l, {
				size: "small",
				"aria-label": "Dark theme"
			})
		})
	});
};
P.propTypes = {
	editorActions: a.shape({ setTheme: a.func.isRequired }).isRequired,
	editorSelectors: a.shape({ selectTheme: a.func.isRequired }).isRequired
};
//#endregion
//#region src/plugins/editor-monaco/extensions/editor-textarea/wrap-components/EditorPaneBarTopWrapper.jsx
var te = (e, t) => {
	let n = t.getComponent("ThemeSelection", !0), r = ({ renderControls: t = d, ...r }) => /* @__PURE__ */ s(e, {
		...r,
		renderControls: (e) => t(/* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(n, {}), e] }))
	});
	return r.propTypes = { renderControls: a.func }, r;
}, F = (e, t) => {
	let n = t.getComponent("ValidationPane", !0), r = ({ renderChildren: t = d, ...r }) => /* @__PURE__ */ s(e, {
		...r,
		renderChildren: () => t(/* @__PURE__ */ s(n, {}))
	});
	return r.propTypes = { renderChildren: a.func }, r;
}, I = (e) => (t, n) => n === "monaco" ? (globalThis.editor = t, globalThis[n] = t, e({ id: t.getId() }, n)) : e(t, n), ne = (e) => (t, n) => n === "monaco" ? (delete globalThis.editor, delete globalThis[n], e({ id: t.getId() }, n)) : e(t, n), L = "editor_append_markers", re = (e = []) => ({
	type: L,
	payload: e
}), R = "editor_clear_markers", ie = (e = "apilint") => ({
	type: R,
	payload: e
}), z = "editor_set_language", B = (e) => ({
	payload: e,
	type: z
}), V = "editor_set_markers", H = (e = []) => ({
	type: V,
	payload: e
}), U = "editor_set_position_started", W = "editor_set_position_success", G = "editor_set_position_failure", K = ({ lineNumber: e, column: t, options: n, requestId: r }) => ({
	type: U,
	payload: {
		lineNumber: e,
		column: t
	},
	meta: {
		options: n,
		requestId: r
	}
}), q = ({ lineNumber: e, column: t, options: n, requestId: r }) => ({
	type: W,
	payload: {
		lineNumber: e,
		column: t
	},
	meta: {
		options: n,
		requestId: r
	}
}), J = ({ lineNumber: e, column: t, options: n, error: r, requestId: i }) => ({
	type: G,
	error: !0,
	payload: r,
	meta: {
		lineNumber: e,
		column: t,
		options: n,
		requestId: i
	}
}), Y = ({ lineNumber: e = 0, column: t = 0 } = {}, n = { scroll: !0 }) => (r) => {
	let { editorActions: i, editorSelectors: a, fn: o } = r, s = o.generateRequestId();
	i.setPositionStarted({
		lineNumber: e,
		column: t,
		options: n,
		requestId: s
	});
	try {
		let r = a.selectEditor();
		return n.scroll && r.revealPositionNearTop({
			lineNumber: e,
			column: t
		}), r.setPosition({
			lineNumber: e,
			column: t
		}), r.focus(), i.setPositionSuccess({
			lineNumber: e,
			column: t,
			options: n,
			requestId: s
		});
	} catch (r) {
		return i.setPositionFailure({
			error: r,
			lineNumber: e,
			column: t,
			options: n,
			requestId: s
		});
	}
}, X = "editor_set_theme", ae = (e = "my-vs-dark") => ({
	payload: e,
	type: X
}), Z = "EDITOR_SET_MODEL_VERSION_ID", oe = (e, { alternativeVersionId: t }) => ({
	type: Z,
	payload: e,
	meta: { alternativeVersionId: t }
}), se = {
	[X]: (e, t) => e.set("theme", t.payload),
	[V]: (e, t) => e.set("markers", h(t.payload)),
	[L]: (e, t) => {
		let n = e.get("markers", m());
		return e.set("markers", n.concat(h(t.payload)));
	},
	[R]: (e, t) => {
		let { payload: n } = t, r = e.get("markers", m()).filterNot((e) => e.get("source") === n);
		return e.set("markers", r);
	},
	[z]: (e, t) => e.set("language", t.payload),
	[Z]: (e, t) => e.merge({
		versionId: t.payload,
		alternativeVersionId: t.meta.alternativeVersionId
	}),
	editor_setup: (e, t) => t.meta.includes("monaco") ? e.set("id", t.payload.id) : e,
	editor_tear_down: (e, t) => !t.meta.includes("monaco") || e.get("id") !== t.payload.id ? e : e.delete("id")
}, ce = (e) => e.get("theme", "se-vs-dark"), le = f((e) => e.get("markers", m()), (e) => e.toJS()), ue = (e) => e.get("language", "plaintext"), de = () => (e) => {
	let t = e.editorSelectors.selectId();
	return p.editor.getEditors().find((e) => e.getId() === t);
}, fe = () => (e) => {
	let { width: t } = e.editorSelectors.selectEditor().getLayoutInfo();
	return t;
}, pe = (e) => e.get("versionId", null), me = (e) => e.get("alternativeVersionId", null), Q = _.bind(globalThis, p), he = (() => {
	let e = {};
	return e.promise = new Promise((t, n) => {
		e.resolve = t, e.reject = n;
	}), e;
})(), ge = class {
	constructor() {
		let e = new URL("../../editor.worker.js", "" + import.meta.url), t = e.protocol === "file:" ? new URL("./editor.worker.js", globalThis.MonacoEnvironment?.baseUrl ?? location.origin) : e;
		return new Worker(t, { type: "module" });
	}
}, _e = class {
	constructor() {
		let e = new URL("../../apidom.worker.js", "" + import.meta.url), t = e.protocol === "file:" ? new URL("./apidom.worker.js", globalThis.MonacoEnvironment?.baseUrl ?? location.origin) : e;
		return new Worker(t, { type: "module" });
	}
}, $ = {
	id: "editor.action.quickOutline",
	label: "Go to Symbol...",
	precondition: "editorHasDocumentSymbolProvider",
	contextMenuGroupId: "navigation",
	contextMenuOrder: 3,
	keybindings: [p.KeyMod.CtrlCmd | p.KeyMod.Shift | p.KeyCode.KeyO],
	async run() {
		S.get(b).quickAccess.show("@", { itemActivation: 0 });
	}
}, ve = ({ system: e }) => {
	let { monacoInitializationDeferred: t, editorActions: n } = e, r = [];
	t().promise.then(() => {
		S.get(x).store("expandSuggestionDocs", !0, 0, 0);
	}), r.push(p.editor.onDidCreateEditor((e) => {
		r.push(p.editor.onDidCreateModel(() => {
			e.getAction($.id) || r.push(e.addAction($));
		}));
	})), r.push(p.editor.onDidCreateModel((e) => {
		let t = () => {
			let t = e.getVersionId(), r = e.getAlternativeVersionId();
			n.setModelVersionId(t, { alternativeVersionId: r });
		};
		t(), r.push(e.onDidChangeContent(() => {
			t();
		}));
	})), r.push(p.editor.onDidCreateEditor((e) => {
		r.push(e.onDidDispose(() => {
			r.forEach((e) => e.dispose()), r.length = 0;
		}));
	}));
}, ye = class extends C {
	constructor() {
		super(w.Warning);
	}
};
//#endregion
//#region src/plugins/editor-monaco/after-load.js
function be(e) {
	let t = {
		UNINITIALIZED: "UNINITIALIZED",
		IN_PROGRESS: "IN_PROGRESS",
		INITIALIZED: "INITIALIZED"
	};
	globalThis.MonacoEnvironment = {
		initPhase: t.UNINITIALIZED,
		getWorker(e, t) {
			return t === "apidom" ? new _e() : new ge();
		},
		...globalThis.MonacoEnvironment
	}, globalThis.MonacoEnvironment.initPhase === t.UNINITIALIZED && (globalThis.MonacoEnvironment.initPhase = t.IN_PROGRESS, (async () => {
		try {
			await y({ [v.toString()]: new ye() }), e.monacoInitializationDeferred().resolve();
		} catch (t) {
			e.monacoInitializationDeferred().reject(t);
		} finally {
			globalThis.MonacoEnvironment.initPhase = t.INITIALIZED;
		}
	})(), ve({ system: e }));
}
//#endregion
//#region src/plugins/editor-monaco/index.js
var xe = () => ({
	afterLoad: be,
	rootInjects: {
		monaco: p,
		monacoInitializationDeferred: () => he,
		monacoThemes: {
			"se-vs-dark": T,
			"se-vs-light": E
		}
	},
	components: {
		Editor: A,
		MonacoEditor: A,
		ValidationPane: j,
		ValidationTable: N,
		ThemeSelection: P
	},
	wrapComponents: {
		EditorPaneBarTop: te,
		EditorPaneBarBottom: F
	},
	statePlugins: { editor: {
		actions: {
			setTheme: ae,
			setMarkers: H,
			appendMarkers: re,
			clearMarkers: ie,
			setLanguage: B,
			setModelVersionId: oe,
			setPosition: Y,
			setPositionStarted: K,
			setPositionSuccess: q,
			setPositionFailure: J
		},
		wrapActions: {
			editorSetup: I,
			editorTearDown: ne
		},
		reducers: se,
		selectors: {
			selectTheme: ce,
			selectMarkers: le,
			selectLanguage: ue,
			selectEditor: de,
			selectEditorWidth: fe,
			selectModelVersionId: pe,
			selectModelAlternativeVersionId: me
		}
	} },
	fn: { registerMarkerDataProvider: Q }
});
//#endregion
export { xe as default };

//# sourceMappingURL=index.js.map