var de = Object.defineProperty;
var Ie = (t, e, n) => e in t ? de(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var x = (t, e, n) => (Ie(t, typeof e != "symbol" ? e + "" : e, n), n);
import { jsxs as T, jsx as S, Fragment as ue } from "react/jsx-runtime";
import k, { useEffect as J, createContext as U, useState as V, useRef as $, useContext as q, memo as Ce } from "react";
import { loader as me, useMonaco as fe, Editor as Ae } from "@monaco-editor/react";
import { lspSubject as pe, LspActions as j, hasAttributesString as Q, FileFolderType as be } from "@ws-ui/shared";
import { MonacoLanguageClient as he } from "monaco-languageclient";
import { mergeServices as ve, initServices as Se } from "monaco-languageclient/vscode/services";
import ye, { initUserConfiguration as Ne } from "@codingame/monaco-vscode-configuration-service-override";
import we from "@codingame/monaco-vscode-languages-service-override";
import Re from "@codingame/monaco-vscode-textmate-service-override";
import "@codingame/monaco-vscode-theme-defaults-default-extension";
import xe from "@codingame/monaco-vscode-editor-service-override";
import We from "@codingame/monaco-vscode-theme-service-override";
import * as o from "monaco-editor";
import { Selection as Le, KeyMod as G, KeyCode as O, editor as ee, Uri as Fe } from "monaco-editor";
import { Logger as Ze } from "monaco-languageclient/tools";
import { ErrorAction as je, CloseAction as Xe } from "vscode-languageclient";
import { WebSocketMessageReader as Ke, WebSocketMessageWriter as ke, toSocket as Ee } from "vscode-ws-jsonrpc";
import { DocumentDiagnosticRequest as Be, WillSaveTextDocumentNotification as Ge, TextDocumentSaveReason as Oe, DidSaveTextDocumentNotification as Te, WillCreateFilesRequest as Je, WillRenameFilesRequest as De, WillDeleteFilesRequest as Ve, DidCreateFilesNotification as Ye, DidRenameFilesNotification as Me, DidDeleteFilesNotification as Pe } from "vscode-languageserver-protocol";
import { StandaloneServices as He, ICodeEditorService as $e } from "vscode/services";
import { KeybindingsRegistry as P } from "vscode/monaco";
import "@codingame/monaco-vscode-standalone-languages";
import "@codingame/monaco-vscode-standalone-html-language-features";
import "@codingame/monaco-vscode-standalone-css-language-features";
import "@codingame/monaco-vscode-standalone-json-language-features";
import "@codingame/monaco-vscode-standalone-typescript-language-features";
import "@codingame/monaco-vscode-css-default-extension";
import "@codingame/monaco-vscode-json-default-extension";
import "@codingame/monaco-vscode-html-default-extension";
import "@codingame/monaco-vscode-javascript-default-extension";
import { registerExtension as ze } from "vscode/extensions";
const _e = () => ye(), Ue = () => xe(
  () => Promise.resolve(void 0)
), qe = () => {
  const t = We(), e = t.themeService.ctor.prototype;
  return e.defineTheme = () => {
  }, t;
}, Qe = `{
  "workbench.colorTheme": "Default Dark+",
  "workbench.iconTheme": "vs-seti",
  "editor.autoClosingBrackets": "languageDefined",
  "editor.autoClosingQuotes": "languageDefined",
  "editor.scrollBeyondLastLine": true,
  "editor.mouseWheelZoom": true,
  "editor.wordBasedSuggestions": false,
  "editor.acceptSuggestionOnEnter": "on",
  "editor.foldingHighlight": false,
  "editor.bracketPairColorization.enabled": false,
  "editor.fontSize": 12,
  "files.autoSave": "off",
  "editor.experimental.asyncTokenization": true,
  "editor.semanticHighlighting.enabled": true,
  "workbench.colorCustomizations": {
    "editor.background": "#313131"
  },
  "editor.semanticTokenColorCustomizations": {
    "[Default Light+]": {
      "enabled": true,
      "rules": {
        "*:4d": {
          "foreground": "#000000",
          "bold": false,
          "italic": false,
          "underline": false,
          "strikethrough": false
        },
        "method:4d": { "foreground": "#000088", "bold": true, "italic": true },
        "method.defaultLibrary:4d": {
          "foreground": "#068c00",
          "italic": false
        },
        "method.plugin:4d": { "foreground": "#000000" },
        "property:4d": { "foreground": "#a0806b" },
        "function:4d": { "foreground": "#5f8e5e", "italic": true },
        "parameter:4d": { "foreground": "#000b76", "bold": true },
        "variable.interprocess:4d": { "foreground": "#ff0088" },
        "variable.process:4d": { "foreground": "#0000ff" },
        "variable.local:4d": { "foreground": "#0031ff" },
        "keyword:4d": { "foreground": "#034d00", "bold": true },
        "table:4d": { "foreground": "#532300" },
        "field:4d": { "foreground": "#323232" },
        "comment:4d": { "foreground": "#535353" },
        "type:4d": { "foreground": "#068c00", "bold": true },
        "constant:4d": { "foreground": "#4d004d", "underline": true },
        "string:4d": { "foreground": "#000000" },
        "error:4d": { "foreground": "#ff0000", "bold": true, "italic": true }
      }
    },
    "[Default Dark+]": {
      "enabled": true,
      "rules": {
        "*:4d": {
          "foreground": "#FFFFFF",
          "bold": false,
          "italic": false,
          "underline": false,
          "strikethrough": false
        },
        "method:4d": { "foreground": "#1B79F3", "bold": true, "italic": true },
        "method.defaultLibrary:4d": {
          "foreground": "#59BB00",
          "italic": false
        },
        "method.plugin:4d": { "foreground": "#BFBFBF" },
        "property:4d": { "foreground": "#A0806B" },
        "function:4d": { "foreground": "#4EC36E", "italic": true },
        "parameter:4d": { "foreground": "#0C70FF", "bold": true },
        "variable.interprocess:4d": { "foreground": "#FF0088" },
        "variable.process:4d": { "foreground": "#53B0EB" },
        "variable.local:4d": { "foreground": "#18B3F1" },
        "keyword:4d": { "foreground": "#D0D0D0", "bold": true },
        "table:4d": { "foreground": "#CF5600" },
        "field:4d": { "foreground": "#9C6765" },
        "comment:4d": { "foreground": "#8F8F8F" },
        "type:4d": { "foreground": "#068C00", "bold": true },
        "constant:4d": { "foreground": "#FA647F", "underline": true },
        "string:4d": { "foreground": "#FFFFFF" },
        "error:4d": { "foreground": "#ff0000", "bold": true, "italic": true }
      }
    }
  }
}
`, en = () => Ne(Qe), nn = async (t) => {
  var r;
  const e = t.serviceConfig ?? {};
  e.debugLogging = ((r = t.logger) == null ? void 0 : r.isEnabled()) === !0 && (e.debugLogging === !0 || t.logger.isDebugEnabled() === !0), await en(), e.userServices = e.userServices ?? {};
  const n = e.userServices.configurationService ?? void 0, i = e.workspaceConfig ?? void 0;
  if (n === void 0) {
    if (i)
      throw new Error(
        "You provided a workspaceConfig without using the configurationServiceOverride"
      );
    const a = {
      // @see https://github.com/CodinGame/monaco-vscode-api#monaco-standalone-services
      ..._e(),
      ...qe(),
      ...Re(),
      ...we(),
      ...Ue()
    };
    ve(a, e.userServices);
  }
  return i || (e.workspaceConfig = {
    workspaceProvider: {
      trusted: !0,
      workspace: {
        workspaceUri: o.Uri.file("/workspace")
      },
      async open() {
        return !1;
      }
    }
  }), e;
};
class tn extends Ke {
  constructor(n, i) {
    super(n);
    x(this, "onMessage");
    this.onMessage = i;
  }
  readMessage(n) {
    this.onMessage && this.onMessage();
    const [, i] = n.split(`\r
\r
`);
    if (this.state === "initial")
      this.events.splice(0, 0, { message: i });
    else if (this.state === "listening") {
      const r = JSON.parse(i);
      this.callback(r);
    }
  }
}
class on extends ke {
  constructor(n, i) {
    super(n);
    x(this, "onSend");
    this.onSend = i;
  }
  async write(n) {
    try {
      const i = JSON.stringify(n);
      this.socket.send(i), this.onSend && this.onSend();
    } catch (i) {
      this.errorCount++, this.fireError(i, n, this.errorCount);
    }
  }
}
function F(t, e = !0) {
  const n = `/PACKAGE/Project/Sources/${t}`;
  return e ? `file://${n}` : n;
}
function ne(t, e = 0) {
  setTimeout(t, e);
}
function rn(t, e) {
  const n = new Le(
    e.startLineNumber,
    e.startColumn,
    e.endLineNumber || e.startLineNumber,
    e.endColumn || e.startColumn
  );
  ne(() => {
    t.setSelection(n), t.revealRangeInCenter(n), t.focus();
  });
}
function sn(t, e, n = 0) {
  n > 0 && (e = n + e), ne(() => {
    t.setPosition({ lineNumber: e, column: 1 }), t.revealLineInCenter(e), t.focus();
  });
}
function rt(t, e, n) {
  const r = t.getModel();
  if (r && e) {
    const a = r.getLineCount();
    for (let g = 1; g <= a; g++) {
      const C = r.getLineContent(g);
      if (new RegExp(`(?:Function|function) ${n}`).test(C))
        return g;
    }
  }
  return 0;
}
const ln = {
  provideCompletionItems: async (t, e) => {
    const n = t.getWordUntilPosition(e);
    return {
      suggestions: [
        {
          label: "var",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "While",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "While(${1:expression})",
            "	${2:body}",
            "End while"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "Case of",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "Case of",
            "	:(${1:boolean_expression})",
            "		${2:body}",
            "End case"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "Else",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["Else", "	"].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "If",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["If (${1:expression})", "	${5:body}", "End if"].join(
            `
`
          ),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "For",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "For(${1:counter};${2:start};${3:end}${4:;increment})",
            "	${5:body}",
            "End for"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "Function",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "Function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
            "	${5:body}"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        }
      ]
    };
  }
}, an = {
  provideCompletionItems: async (t, e) => {
    const n = t.getWordUntilPosition(e);
    return {
      suggestions: [
        {
          label: "var",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["var ${1:var_name} : ${2:var_type}"].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "while",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["while(${1:expression})", "	${2:body}", "end"].join(
            `
`
          ),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "switch",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "switch",
            "	:(${1:boolean_expression})",
            "		${2:body}",
            "end"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "else",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["else", "	"].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "if",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: ["if (${1:expression})", "	${5:body}", "end"].join(
            `
`
          ),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "for",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "for(${1:counter},${2:start},${3:end}${4:,increment})",
            "	${5:body}",
            "end"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        },
        {
          label: "function",
          kind: o.languages.CompletionItemKind.Snippet,
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "function ${1:function_name}(${2:params}) -> ${3:var_name} : ${4:var_type}",
            "	${5:body}"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        }
      ]
    };
  }
}, gn = [
  // zoom in
  {
    keybinding: G.CtrlCmd | O.NumpadAdd,
    command: "editor.action.fontZoomIn"
  },
  {
    keybinding: G.CtrlCmd | O.Equal,
    command: "editor.action.fontZoomIn"
  },
  // zoom out
  {
    keybinding: G.CtrlCmd | O.NumpadSubtract,
    command: "editor.action.fontZoomOut"
  },
  {
    keybinding: G.CtrlCmd | O.Minus,
    command: "editor.action.fontZoomOut"
  },
  // zoom reset
  {
    keybinding: G.CtrlCmd | O.Numpad0,
    command: "editor.action.fontZoomReset"
  },
  {
    keybinding: G.CtrlCmd | O.Digit0,
    command: "editor.action.fontZoomReset"
  }
], cn = ({ defaultZoom: t }) => (J(() => {
  t !== void 0 && ee.EditorZoom.setZoomLevel(t);
}, []), null);
({}).VITE_DISABLE_MONACO_LOADER || me.config({
  monaco: o
  // paths: {
  //   vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.41.0/min/vs",
  // },
});
const te = U(void 0), st = ({
  children: t,
  url: e,
  qodly: n,
  defaultZoom: i,
  openHandler: r,
  language: a = "4d",
  defaultInited: g = !1
}) => {
  const C = fe(), [m, h] = V(g), [Z, y] = V(null), f = $(), b = $(0);
  J(() => {
    e && C && v();
  }, [e, C]);
  const v = async () => {
    if (!C)
      return;
    const c = new Ze({
      enabled: process.env.NODE_ENV === "development",
      debugEnabled: process.env.NODE_ENV === "development"
    }), d = await nn({
      logger: c
    });
    await Se({
      caller: "Qodly Code Editor",
      logger: c,
      serviceConfig: d
    }), r && He.get($e).registerCodeEditorOpenHandler(r), C.languages.registerCompletionItemProvider(
      a,
      n ? an : ln
    );
    const I = P.getDefaultKeybindings.bind(P);
    P.getDefaultKeybindings = () => I().filter(
      (B) => ![
        "workbench.action.files.saveAs",
        "workbench.action.files.save"
      ].includes(B.command)
    ), ee.addKeybindingRules(gn), p();
  }, p = () => {
    y(null);
    let c;
    try {
      c = new WebSocket(localStorage.LSP_SERVER || e);
    } catch {
      y(new Event("INVALID_URL"));
      return;
    }
    c.onopen = N, c.onclose = A, c.onerror = u, b.current = 0;
  }, N = async function() {
    const c = Ee(this), d = new tn(c), I = new on(c), R = new he({
      name: "4D Language Client",
      clientOptions: {
        workspaceFolder: {
          uri: Fe.parse("file:///PACKAGE")
        },
        // use a language id as a document selector
        documentSelector: [{ scheme: "file", language: a }],
        // disable the default error handler
        errorHandler: {
          error: () => ({ action: je.Continue }),
          closed: () => ({ action: Xe.DoNotRestart })
        }
      },
      // create a language client connection from the JSON RPC connection on demand
      connectionProvider: {
        get: () => Promise.resolve({
          reader: d,
          writer: I
        })
      }
    });
    f.current = R;
    const B = R.sendRequest.bind(R);
    f.current.sendRequest = function(M, H, ce) {
      return typeof M == "object" && M.method === "textDocument/diagnostic" && /file:\/\/\/PACKAGE\/Project\/Sources\/Methods\/__Debugger_.*/.test(
        H.textDocument.uri
      ) ? Promise.resolve() : B(M, H, ce);
    }, d.onClose(() => {
      R.stop(), b.current < 3 ? setTimeout(() => {
        b.current++, p();
      }, 1e3) : y(new Event("WEBSOCKET_CLOSED"));
    }), R.needsStart() && await R.start(), h(!0);
  }, A = () => {
  }, u = (c) => {
    y(c);
  };
  J(() => {
    const c = pe.subscribe(({ action: d, payload: I }) => {
      switch (d) {
        case j.WILL_SAVE:
          l(I.filePath);
          break;
        case j.DID_SAVE:
          w(I.filePath, I.content);
          break;
        case j.WILL_CREATE:
          W(I.filePath);
          break;
        case j.DID_CREATE:
          le(I.filePath);
          break;
        case j.WILL_RENAME:
          E(I.oldPath, I.newPath);
          break;
        case j.DID_RENAME:
          ae(I.oldPath, I.newPath);
          break;
        case j.WILL_DELETE:
          L(I.filePath);
          break;
        case j.DID_DELETE:
          ge(I.filePath);
          break;
        case j.DIAGNOSTIC_REFRESH:
          s(I.filePath);
          break;
      }
    });
    return () => c.unsubscribe();
  }, []);
  const K = (c) => {
    var d, I;
    return (I = (d = f.current) == null ? void 0 : d._features) == null ? void 0 : I.find(
      (R) => {
        var B;
        return ((B = R._registrationType) == null ? void 0 : B.method) === c;
      }
    );
  }, s = (c) => {
    if (f.current) {
      const d = K(Be.method);
      if (d)
        for (const [I, R] of d._registrations)
          R.provider && R.provider.onDidChangeDiagnosticsEmitter.fire();
    }
  }, l = (c, d = Oe.Manual) => {
    var I;
    (I = f.current) == null || I.sendNotification(Ge.type, {
      textDocument: {
        uri: F(c)
      },
      reason: d
    });
  }, w = (c, d) => {
    var I;
    (I = f.current) == null || I.sendNotification(Te.type, {
      textDocument: {
        uri: F(c)
      },
      text: d
    });
  }, W = (c) => {
    var d;
    (d = f.current) == null || d.sendRequest(Je.type, {
      files: [
        {
          uri: F(c)
        }
      ]
    });
  }, E = (c, d) => {
    var I;
    (I = f.current) == null || I.sendRequest(De.type, {
      files: [
        {
          oldUri: F(c),
          newUri: F(d)
        }
      ]
    });
  }, L = (c) => {
    var d;
    (d = f.current) == null || d.sendRequest(Ve.type, {
      files: [
        {
          uri: F(c)
        }
      ]
    });
  }, le = (c) => {
    var d;
    (d = f.current) == null || d.sendNotification(Ye.type, {
      files: [
        {
          uri: F(c)
        }
      ]
    });
  }, ae = (c, d) => {
    var I;
    (I = f.current) == null || I.sendNotification(Me.type, {
      files: [
        {
          oldUri: F(c),
          newUri: F(d)
        }
      ]
    });
  }, ge = (c) => {
    var d;
    (d = f.current) == null || d.sendNotification(Pe.type, {
      files: [
        {
          uri: F(c)
        }
      ]
    });
  };
  return /* @__PURE__ */ T(
    te.Provider,
    {
      value: {
        inited: m || !!Z,
        clientRef: f,
        lastError: Z,
        reload: p
      },
      children: [
        t,
        /* @__PURE__ */ S(cn, { defaultZoom: i })
      ]
    }
  );
};
function lt() {
  const t = q(te);
  if (t === void 0)
    throw new Error("useLSP must be used within an LSPContext");
  return t;
}
const ie = U(
  void 0
), at = Ce(({ children: t }) => {
  const [e, n] = V(null);
  return /* @__PURE__ */ S(
    ie.Provider,
    {
      value: {
        editor: e,
        setEditor: n
      },
      children: t
    }
  );
});
function dn() {
  const t = q(ie), e = V(null);
  if (t === void 0) {
    const [n, i] = e;
    return {
      editor: n,
      setEditor: i
    };
  }
  return t;
}
var oe = {
  color: void 0,
  size: void 0,
  className: void 0,
  style: void 0,
  attr: void 0
}, z = k.createContext && k.createContext(oe), X = globalThis && globalThis.__assign || function() {
  return X = Object.assign || function(t) {
    for (var e, n = 1, i = arguments.length; n < i; n++) {
      e = arguments[n];
      for (var r in e)
        Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
    }
    return t;
  }, X.apply(this, arguments);
}, In = globalThis && globalThis.__rest || function(t, e) {
  var n = {};
  for (var i in t)
    Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
    for (var r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
      e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
  return n;
};
function re(t) {
  return t && t.map(function(e, n) {
    return k.createElement(e.tag, X({
      key: n
    }, e.attr), re(e.child));
  });
}
function se(t) {
  return function(e) {
    return k.createElement(un, X({
      attr: X({}, t.attr)
    }, e), re(t.child));
  };
}
function un(t) {
  var e = function(n) {
    var i = t.attr, r = t.size, a = t.title, g = In(t, ["attr", "size", "title"]), C = r || n.size || "1em", m;
    return n.className && (m = n.className), t.className && (m = (m ? m + " " : "") + t.className), k.createElement("svg", X({
      stroke: "currentColor",
      fill: "currentColor",
      strokeWidth: "0"
    }, n.attr, i, g, {
      className: m,
      style: X(X({
        color: t.color || n.color
      }, n.style), t.style),
      height: C,
      width: C,
      xmlns: "http://www.w3.org/2000/svg"
    }), a && k.createElement("title", null, a), t.children);
  };
  return z !== void 0 ? k.createElement(z.Consumer, null, function(n) {
    return e(n);
  }) : e(oe);
}
function Cn(t) {
  return se({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z" } }] })(t);
}
function mn(t) {
  return se({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M449.07 399.08L278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0080 446.25h340.89a32 32 0 0028.18-47.17zm-198.6-1.83a20 20 0 1120-20 20 20 0 01-20 20zm21.72-201.15l-5.74 122a16 16 0 01-32 0l-5.74-121.95a21.73 21.73 0 0121.5-22.69h.21a21.74 21.74 0 0121.73 22.7z" } }] })(t);
}
const fn = ({ lspProps: { lastError: t, reload: e } }) => {
  const [n, i] = V(!1), r = () => {
    e();
  }, a = () => {
    i(!1);
  };
  return J(() => {
    i(!!t);
  }, [t]), n ? /* @__PURE__ */ T("div", { className: "flex items-center border-b border-fd-gray-darker bg-grey-800 px-2 py-1.5 text-xs text-grey-50", children: [
    /* @__PURE__ */ T("span", { className: "flex flex-1 justify-center gap-1", children: [
      /* @__PURE__ */ S(mn, { className: "h-4 w-4 text-yellow-600" }),
      /* @__PURE__ */ T("span", { children: [
        "LSP not loaded.",
        " ",
        /* @__PURE__ */ S(
          "button",
          {
            className: "text-primary-dark underline",
            onClick: r,
            children: "Reload?"
          }
        )
      ] })
    ] }),
    /* @__PURE__ */ S("button", { className: "focus:outline-none", children: /* @__PURE__ */ S(
      Cn,
      {
        className: "h-4 w-4 text-white",
        onClick: a
      }
    ) })
  ] }) : null;
}, An = {
  provideCompletionItems: (t, e) => {
    const n = t.getWordUntilPosition(e);
    return {
      suggestions: [
        {
          label: "device:xs",
          kind: o.languages.CompletionItemKind.Snippet,
          documentation: "Media query for phone device",
          range: new o.Range(
            e.lineNumber,
            n.startColumn,
            e.lineNumber,
            n.endColumn
          ),
          insertText: [
            "@media screen and (max-width: ${1:365px}) {",
            "  self {",
            "    ${2:background-color}:${3:red};",
            "  }",
            "}"
          ].join(`
`),
          insertTextRules: o.languages.CompletionItemInsertTextRule.InsertAsSnippet
        }
      ]
    };
  }
}, pn = "#/definitions/Condition", bn = {
  Base: {
    type: "object",
    properties: {
      id: {
        type: "string"
      },
      name: {
        type: "string"
      }
    },
    required: [
      "id"
    ]
  },
  Condition: {
    oneOf: [
      {
        $ref: "#/definitions/Datasource"
      },
      {
        $ref: "#/definitions/Privilege"
      },
      {
        $ref: "#/definitions/Combination"
      },
      {
        $ref: "#/definitions/CurrentState"
      },
      {
        $ref: "#/definitions/ParentState"
      },
      {
        $ref: "#/definitions/Reference"
      }
    ]
  },
  Datasource: {
    allOf: [
      {
        $ref: "#/definitions/Base"
      }
    ],
    properties: {
      type: {
        const: "datasource"
      },
      path: {
        type: "string"
      },
      value: {
        type: [
          "number",
          "string",
          "boolean",
          "object",
          "array",
          "null"
        ]
      },
      valueType: {
        enum: [
          "datasource",
          "hardCoded"
        ]
      },
      dataType: {
        enum: [
          "string",
          "number",
          "date",
          "boolean",
          "array",
          "object"
        ]
      },
      op: {
        enum: [
          "eq",
          "neq",
          "regex",
          "in",
          "nin",
          "gt",
          "gte",
          "lt",
          "lte"
        ]
      }
    },
    required: [
      "name",
      "type",
      "path",
      "value",
      "op"
    ]
  },
  Privilege: {
    allOf: [
      {
        $ref: "#/definitions/Base"
      }
    ],
    properties: {
      type: {
        const: "privilege"
      },
      value: {
        type: "string"
      },
      valueType: {
        enum: [
          "datasource",
          "hardCoded"
        ]
      },
      op: {
        enum: [
          "eq",
          "neq",
          "regex"
        ]
      }
    },
    required: [
      "name",
      "type",
      "value",
      "op"
    ]
  },
  Combination: {
    allOf: [
      {
        $ref: "#/definitions/Base"
      }
    ],
    properties: {
      type: {
        const: "combination"
      },
      op: {
        enum: [
          "and",
          "or"
        ]
      },
      conditions: {
        type: "array",
        items: {
          $ref: "#/definitions/Condition"
        }
      }
    },
    required: [
      "type",
      "conditions",
      "op"
    ]
  },
  CurrentState: {
    allOf: [
      {
        $ref: "#/definitions/Base"
      }
    ],
    properties: {
      type: {
        const: "currentState"
      },
      value: {
        type: "string"
      },
      valueType: {
        enum: [
          "datasource",
          "hardCoded"
        ]
      },
      dataType: {
        enum: [
          "string",
          "number",
          "date",
          "boolean",
          "array",
          "object"
        ]
      },
      op: {
        enum: [
          "eq",
          "neq",
          "regex"
        ]
      }
    },
    required: [
      "name",
      "type",
      "value",
      "op"
    ]
  },
  ParentState: {
    allOf: [
      {
        $ref: "#/definitions/Base"
      }
    ],
    properties: {
      type: {
        const: "parentState"
      },
      value: {
        type: "string"
      },
      valueType: {
        enum: [
          "datasource",
          "hardCoded"
        ]
      },
      dataType: {
        enum: [
          "string",
          "number",
          "date",
          "boolean",
          "array",
          "object"
        ]
      },
      op: {
        enum: [
          "eq",
          "neq",
          "regex"
        ]
      }
    },
    required: [
      "name",
      "type",
      "value",
      "op"
    ]
  },
  Reference: {
    allOf: [
      {
        $ref: "#/definitions/Base"
      }
    ],
    properties: {
      type: {
        const: "reference"
      },
      ref: {
        type: "string"
      }
    },
    required: [
      "type",
      "ref"
    ]
  }
}, hn = {
  $ref: pn,
  definitions: bn
};
function vn(t, e) {
  const n = document.createElement("style");
  n.dataset.id = e, n.textContent = t, document.head.append(n);
}
function Sn(t) {
  return Array.from(document.styleSheets).find(
    (e) => e.ownerNode.getAttribute("data-id") === t
  );
}
function yn(t, e) {
  const n = [];
  let i = [];
  const r = [], a = (s, l, w, W) => {
    n.push({
      startLineNumber: s,
      endLineNumber: w,
      startColumn: l,
      endColumn: W
    }), h(), m();
  }, g = (s) => {
    r.indexOf(s) < 0 && r.push(s);
  }, C = (s) => {
    const l = r.indexOf(s);
    l < 0 || r.splice(l, 1);
  }, m = () => {
    for (const s of r)
      try {
        s(i);
      } catch (l) {
        console.error(l);
      }
  }, h = () => {
    const s = t.getModel();
    s && (i = wn(
      n.map((l) => [
        s.getOffsetAt({
          lineNumber: l.startLineNumber,
          column: l.startColumn
        }),
        s.getOffsetAt({
          lineNumber: l.endLineNumber,
          column: l.endColumn
        })
      ]),
      /*mergeJoins*/
      !0
    ), i.length > 0 && (i[0][0] <= 0 && (i[0][0] = Number.NEGATIVE_INFINITY), i[i.length - 1][1] >= s.getValueLength() && (i[i.length - 1][1] = Number.POSITIVE_INFINITY)));
  }, Z = (s) => {
    const l = {
      isDeletion: !1,
      isAddition: !1,
      isReplacement: !1
    };
    return s.text === "" ? l.isDeletion = !0 : s.range.startLineNumber === s.range.endLineNumber && s.range.startColumn === s.range.endColumn ? l.isAddition = !0 : l.isReplacement = !0, l;
  }, y = t.onDidChangeModel((s) => {
    h(), u();
  }), f = t.onDidChangeModelContent((s) => {
    if (!s.isUndoing)
      for (const l of s.changes) {
        const w = Z(l);
        if (w.isReplacement || w.isDeletion || w.isAddition) {
          const W = n.some(
            (L) => l.range.startLineNumber >= L.startLineNumber && l.range.endLineNumber <= L.endLineNumber && l.range.startColumn >= L.startColumn && l.range.endColumn <= L.endColumn
          ), E = !W && e && l.range.startLineNumber === 1 && l.range.startColumn === 1 && !Q(l.text);
          if (W || E) {
            const L = t.getModel();
            if (L) {
              L.undo();
              return;
            }
          }
        }
      }
  }), b = () => {
    y.dispose(), f.dispose();
  };
  let v = [], p = `
    .idoc-readonly-mark {
      cursor: not-allowed;
      z-index: 1;
    }
  `;
  if (p) {
    const s = "monaco-read-only";
    Sn(s) || vn(p, s), p = null;
  }
  const N = () => {
    g(u), u();
  }, A = () => {
    C(u), v = t.deltaDecorations(v, []);
  }, u = () => {
    const s = t.getModel();
    s && (v = t.deltaDecorations(
      v,
      i.map(K(s))
    ));
  }, K = (s) => (l) => {
    const w = s.getPositionAt(l[0]), W = s.getPositionAt(l[1]);
    return {
      range: new o.Range(
        w.lineNumber,
        w.column,
        W.lineNumber,
        W.column
      ),
      options: {
        className: "idoc-readonly-mark"
      }
    };
  };
  return {
    get buffer() {
      return i;
    },
    exclude: a,
    attach: g,
    detach: C,
    dispose: b,
    show: N,
    hide: A
  };
}
function Nn(t, e, n) {
  let i = !1;
  const r = (A) => A[1] < A[0] ? (i = !0, [[A[1], A[0]]]) : [[...A]], a = (A) => i ? A.map((u) => u[1] > u[0] ? C(u) : u).reverse() : A;
  let g;
  const C = (A) => (g = A[1], A[1] = A[0], A[0] = g, A), m = r(t);
  let h, Z, y, f, b, v, p, N;
  y = m[0];
  for (Z of e)
    for (p = Z[0], N = Z[1], f = 0; f < m.length; f++) {
      if (y = m[f], b = y[0], v = y[1], b < p)
        v < p ? h = [y] : v <= N ? h = [[b, p - 1]] : h = [
          [b, p - 1],
          [N + 1, v]
        ];
      else if (b <= N)
        if (p === Number.NEGATIVE_INFINITY) {
          const A = N + 1;
          h = n === 0 ? [] : [[A, v > A ? v : A]];
        } else
          N === Number.POSITIVE_INFINITY ? h = n === 0 ? [] : [[p - 1, p - 1]] : v <= N ? h = n < 0 ? [[p - 1, p - 1]] : n > 0 ? [[N + 1, N + 1]] : [] : h = [[N + 1, v]];
      else
        h = [y];
      if (m.splice(f, 1, ...h), m.length === 1 && m[0][1] < p)
        return a(m);
    }
  return a(m);
}
function wn(t, e) {
  if (t.length < 2)
    return t;
  const n = [];
  let i = null, r, a;
  t = t.map(
    (g) => (g[1] < g[0] && (r = g[1], g[1] = g[0], g[1] = r), g)
  ).sort((g, C) => g[0] - C[0]), n.push(t[0]);
  for (let g = 1; g < t.length; g++)
    i = n[n.length - 1], a = t[g], i[1] === a[0] && !e ? n.push(a) : i[1] === a[0] - 1 && e ? (i[1] = a[1], n.splice(n.length - 1, 1, i)) : i[1] < a[0] ? n.push(a) : i[1] < a[1] && (i[1] = a[1], n.splice(n.length - 1, 1, i));
  return n;
}
function D(t, e) {
  return e.bind(t);
}
class Rn {
  constructor(e, n) {
    x(this, "editor");
    x(this, "intervals");
    x(this, "disposables", []);
    /**
     * Flag for `excludeIntervals`
     */
    x(this, "prefer", 1);
    x(this, "lastPrefer", 1);
    /**
     * Linked to ICodeEditor.onDidChangeCursorPosition event.
     */
    x(this, "onCursor", D(
      this,
      function(e) {
        if (e.source === "api")
          return;
        const n = this.getApprovedSelections();
        n.length !== 0 && this.editor.setSelections(n);
      }
    ));
    x(this, "onRectangleSelectionStart", D(this, function({ event: e }) {
      e.middleButton && (this.lastPrefer = this.prefer, this.prefer = 0, window.addEventListener("pointerup", this.onRectangleSelectionStop));
    }));
    x(this, "onRectangleSelectionStop", D(this, function() {
      this.prefer = this.lastPrefer, window.removeEventListener("pointerup", this.onRectangleSelectionStop);
    }));
    /**
     * Linked to ICodeEditor.onKeyDown event.
     */
    x(this, "onKey", D(this, function(e) {
      const n = e.keyCode, i = o.KeyCode;
      if (e.altKey || i.F1 <= n && n <= i.F19 || e.ctrlKey && n !== i.Backspace)
        return;
      if (n === i.UpArrow || n === i.LeftArrow || n === i.Home || n === i.PageUp) {
        this.prefer = -1;
        return;
      }
      if (n === i.DownArrow || n === i.RightArrow || n === i.End || n === i.PageDown) {
        this.prefer = 1;
        return;
      }
      const r = this.getSelections(), a = this.intervals.buffer;
      let g;
      if (n === i.Delete)
        g = (C) => C[0] === C[1] && a.find((m) => C[1] + 1 === m[0]) != null;
      else if (n === i.Backspace)
        g = (C) => C[0] === C[1] && a.find((m) => m[1] + 1 === C[0]) != null;
      else
        return;
      r.findIndex(g) !== -1 && (e.stopPropagation(), e.preventDefault());
    }));
    x(this, "getOffsetAt", D(this, function(e) {
      let n;
      for (let i = 0; i < this.intervals.buffer.length; i++)
        if (n = this.intervals.buffer[i], e <= n[1])
          return n[0] - e < e - n[1] ? n[0] : n[1];
    }));
    var i;
    this.editor = e, this.intervals = yn(e, n), (i = this.editor.getModel()) == null || i.setEOL(o.editor.EndOfLineSequence.LF);
  }
  enable() {
    this.disposables.push(
      this.editor.onDidChangeCursorPosition(this.onCursor),
      this.editor.onKeyDown(this.onKey),
      this.editor.onMouseDown(this.onRectangleSelectionStart)
    ), this.intervals.show();
  }
  dispose() {
    for (const e of this.disposables)
      e.dispose();
    this.disposables.splice(0);
  }
  exclude(e, n, i, r) {
    arguments.length === 1 ? this.intervals.exclude(e, 0, e, Number.MAX_SAFE_INTEGER) : this.intervals.exclude(e, n, i, r);
  }
  getApprovedSelections() {
    const e = this.editor.getModel();
    return this.getSelections().map(
      (i) => Nn(
        i,
        this.intervals.buffer,
        this.prefer
      )
    ).flat().map((i) => {
      const r = e.getPositionAt(i[0]), a = e.getPositionAt(i[1]);
      return new o.Selection(
        r.lineNumber,
        r.column,
        a.lineNumber,
        a.column
      );
    });
  }
  getSelections() {
    const e = this.editor.getModel();
    return (this.editor.getSelections() || []).map((n) => [
      e.getOffsetAt({
        lineNumber: n.selectionStartLineNumber,
        column: n.selectionStartColumn
      }),
      e.getOffsetAt({
        lineNumber: n.positionLineNumber,
        column: n.positionColumn
      })
    ]);
  }
}
const xn = new RegExp("^[	s]+(exposed|Function)", "i"), _ = () => /* @__PURE__ */ S("div", { className: "absolute inset-0 animate-pulse", children: /* @__PURE__ */ S("div", { className: "w-full space-y-4 px-4 py-1", children: /* @__PURE__ */ T("div", { className: "space-y-2", children: [
  /* @__PURE__ */ S("div", { className: "h-3 w-3/4 rounded bg-grey-200" }),
  /* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" }),
  /* @__PURE__ */ S("div", { className: "h-3 w-5/6 rounded bg-grey-200" }),
  /* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" }),
  /* @__PURE__ */ S("div", { className: "h-3 rounded bg-grey-200" })
] }) }) }), gt = ({
  path: t,
  initialValue: e,
  theme: n = "fd-dark",
  type: i,
  language: r,
  onChange: a,
  options: g = {},
  extra: C = {},
  showAlerts: m = !1,
  lspProps: h,
  ...Z
}) => {
  const { initialLineInfo: y, initialSelectionInfo: f } = C, { editor: b, setEditor: v } = dn(), { inited: p } = h;
  function N(u) {
    r === "css" && u.languages.registerCompletionItemProvider("css", An), r === "json" && u.languages.json && u.languages.json.jsonDefaults.setDiagnosticsOptions({
      validate: !0,
      schemas: [
        {
          uri: "condition-schema.json",
          fileMatch: ["*.condition.json"],
          schema: hn
        }
      ]
    });
  }
  function A(u, K) {
    v(u);
    const s = u.getModel();
    if (s && (s.updateOptions({ insertSpaces: !1 }), u.onKeyUp(() => {
      var w;
      const l = (w = u.getPosition()) == null ? void 0 : w.lineNumber;
      if (l) {
        const W = s.getLineFirstNonWhitespaceColumn(l), E = s.getLineLength(l), L = s.getLineContent(l);
        xn.test(L) && u.executeEdits("edit-handler", [
          {
            range: new K.Range(
              l,
              0,
              l,
              E
            ),
            text: L.substr(
              W - 1,
              E - W
            )
          }
        ]);
      }
    })), i === be.METHOD && Q(e)) {
      const l = new Rn(u, !0);
      l.exclude(1, 1, 1, Number.POSITIVE_INFINITY), l.enable();
    }
  }
  return J(() => {
    if (!b)
      return;
    const { line: u, offset: K } = y || {};
    u && sn(b, u, K);
  }, [y, b]), J(() => {
    if (!b)
      return;
    const { selection: u } = f || {};
    u && rn(b, u);
  }, [f, b]), p ? /* @__PURE__ */ T(ue, { children: [
    m ? /* @__PURE__ */ S(fn, { lspProps: h }) : null,
    /* @__PURE__ */ S(
      Ae,
      {
        options: {
          readOnly: !0,
          fontSize: 12,
          "semanticHighlighting.enabled": !0,
          padding: { top: 10 },
          ...g
        },
        path: F(t),
        value: e,
        theme: "fd-dark",
        onChange: (u) => a && a(u || ""),
        language: r,
        beforeMount: N,
        onMount: A,
        loading: /* @__PURE__ */ S(_, {}),
        ...Z
      }
    )
  ] }) : /* @__PURE__ */ S(_, {});
}, Wn = {
  name: "4d",
  displayName: "%displayName%",
  description: "%description%",
  version: "1.0.0",
  publisher: "vscode",
  engines: { vscode: "0.10.x" },
  categories: ["Programming Languages"],
  contributes: {
    languages: [
      {
        id: "4d",
        aliases: ["4D", "4d"],
        extensions: [".4dm", ".4qs"],
        configuration: "./language-configuration.json"
      }
    ],
    grammars: [
      {
        language: "4d",
        scopeName: "source.4dm",
        path: "./syntaxes/4d.tmLanguage.json"
      }
    ]
  }
}, { registerFileUrl: Y, whenReady: ct } = ze(Wn, void 0, {
  system: !0
});
Y(
  "./syntaxes/4d.tmLanguage.json",
  new URL("data:application/json;base64,ewogICJuYW1lIjogIjREIiwKICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICJwYXR0ZXJucyI6IFsKICAgIHsKICAgICAgImluY2x1ZGUiOiAiI3N0YXRlbWVudHMiCiAgICB9CiAgXSwKICAicmVwb3NpdG9yeSI6IHsKICAgICJzdGF0ZW1lbnRzIjogewogICAgICAicGF0dGVybnMiOiBbCiAgICAgICAgewogICAgICAgICAgImluY2x1ZGUiOiAiI2NvbW1lbnQiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbW1lbnQiOiB7CiAgICAgICJwYXR0ZXJucyI6IFsKICAgICAgICB7CiAgICAgICAgICAibmFtZSI6ICJjb21tZW50LmJsb2NrLjRkIiwKICAgICAgICAgICJiZWdpbiI6ICIoL1xcKikoPzpcXHMqKChAKWludGVybmFsKSg/PVxcc3woXFwqLykpKT8iLAogICAgICAgICAgImJlZ2luQ2FwdHVyZXMiOiB7CiAgICAgICAgICAgICIxIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlZmluaXRpb24uY29tbWVudC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAic3RvcmFnZS50eXBlLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgICIzIjogewogICAgICAgICAgICAgICJuYW1lIjogInB1bmN0dWF0aW9uLmRlY29yYXRvci5pbnRlcm5hbGRlY2xhcmF0aW9uLjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImVuZCI6ICJcXCovIiwKICAgICAgICAgICJlbmRDYXB0dXJlcyI6IHsKICAgICAgICAgICAgIjAiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAiYmVnaW4iOiAiKF5bIFxcdF0rKT8oKC8vKSg/OlxccyooKEApaW50ZXJuYWwpKD89XFxzfCQpKT8pIiwKICAgICAgICAgICJiZWdpbkNhcHR1cmVzIjogewogICAgICAgICAgICAiMSI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJwdW5jdHVhdGlvbi53aGl0ZXNwYWNlLmNvbW1lbnQubGVhZGluZy40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjIiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAiY29tbWVudC5saW5lLmRvdWJsZS1zbGFzaC40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjMiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVmaW5pdGlvbi5jb21tZW50LjRkIgogICAgICAgICAgICB9LAogICAgICAgICAgICAiNCI6IHsKICAgICAgICAgICAgICAibmFtZSI6ICJzdG9yYWdlLnR5cGUuaW50ZXJuYWxkZWNsYXJhdGlvbi40ZCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgIjUiOiB7CiAgICAgICAgICAgICAgIm5hbWUiOiAicHVuY3R1YXRpb24uZGVjb3JhdG9yLmludGVybmFsZGVjbGFyYXRpb24uNGQiCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAiZW5kIjogIig/PSQpIiwKICAgICAgICAgICJjb250ZW50TmFtZSI6ICJjb21tZW50LmxpbmUuZG91YmxlLXNsYXNoLjRkIgogICAgICAgIH0KICAgICAgXQogICAgfQogIH0KfQo=", self.location).toString(),
  { mimeType: "application/json", size: 1592 }
);
Y(
  "./language-configuration.json",
  new URL("data:application/json;base64,ewogICJjb21tZW50cyI6IHsKICAgICJsaW5lQ29tbWVudCI6ICIvLyIsCiAgICAiYmxvY2tDb21tZW50IjogWyIvKioiLCAiKiovIl0KICB9LAogIC8vIHN5bWJvbHMgdXNlZCBhcyBicmFja2V0cwogICJicmFja2V0cyI6IFsKICAgIFsieyIsICJ9Il0sCiAgICBbIigiLCAiKSJdLAogICAgWyJbIiwgIl0iXQogIF0sCiAgLy8gc3ltYm9scyB0aGF0IGFyZSBhdXRvIGNsb3NlZCB3aGVuIHR5cGluZwogIC8vIHN5bWJvbHMgdGhhdCB0aGF0IGNhbiBiZSB1c2VkIHRvIHN1cnJvdW5kIGEgc2VsZWN0aW9uCiAgInN1cnJvdW5kaW5nUGFpcnMiOiBbCiAgICBbInsiLCAifSJdLAogICAgWyJbIiwgIl0iXSwKICAgIFsiKCIsICIpIl0sCiAgICBbIlwiIiwgIlwiIl0sCiAgICBbIiciLCAiJyJdCiAgXSwKICAiYXV0b0Nsb3NpbmdQYWlycyI6IFsKICAgIHsKICAgICAgIm9wZW4iOiAiKCIsCiAgICAgICJjbG9zZSI6ICIpIgogICAgfSwKICAgIHsgIm9wZW4iOiAieyIsICJjbG9zZSI6ICJ9IiB9LAogICAgeyAib3BlbiI6ICJbIiwgImNsb3NlIjogIl0iIH0sCiAgICB7ICJvcGVuIjogIiciLCAiY2xvc2UiOiAiJyIsICJub3RJbiI6IFsic3RyaW5nIiwgImNvbW1lbnQiXSB9LAogICAgeyAib3BlbiI6ICJcIiIsICJjbG9zZSI6ICJcIiIsICJub3RJbiI6IFsic3RyaW5nIl0gfSwKICAgIHsgIm9wZW4iOiAiYCIsICJjbG9zZSI6ICJgIiwgIm5vdEluIjogWyJzdHJpbmciLCAiY29tbWVudCJdIH0sCiAgICB7ICJvcGVuIjogIi8qKiIsICJjbG9zZSI6ICIgKiovIiwgIm5vdEluIjogWyJzdHJpbmciXSB9CiAgXSwKICAiYXV0b0Nsb3NlQmVmb3JlIjogIjs6Liw9fV0pPmAgXG5cdCIsCiAgIndvcmRQYXR0ZXJuIjogIigtP1xcZCpcXC5cXGRcXHcqKXwoW15cXGBcXH5cXCFcXEBcXCNcXCVcXF5cXCZcXCpcXChcXClcXC1cXD1cXCtcXFtcXHtcXF1cXH1cXFxcXFx8XFw7XFw6XFwnXFxcIlxcLFxcLlxcPFxcPlxcL1xcP1xcclxcblxcdFxcZlxcdiBdKyl8KD88PVthLXpBLVpdKSA/KD89W2EtekEtWl0pIiwKICAiaW5kZW50YXRpb25SdWxlcyI6IHsKICAgICJpbmNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGNsYXNzIGNvbnN0cnVjdG9yKSl8KF4oPyFbXlxcc10pKlxccyooZXhwb3NlZHxsb2NhbHxcXHMqKXsxfVxccypmdW5jdGlvbnsxfVxccypcXHcpfCheKD8hW15cXHNdKSpcXHMqKElmfEVsc2V8Rm9yfEZvciBlYWNofFdoaWxlfEJlZ2luIFNRTHxDYXNlIG9mfFVzZXxSZXBlYXR8OiAqXFwoLiopKS4qJCIsCiAgICAgICJmbGFncyI6ICJpIgogICAgfSwKICAgICJkZWNyZWFzZUluZGVudFBhdHRlcm4iOiB7CiAgICAgICJwYXR0ZXJuIjogIiheKD8hW15cXHNdKSpcXHMqKGV4cG9zZWR8bG9jYWx8XFxzKil7MX1cXHMqZnVuY3Rpb257MX1cXHMqXFx3KXwoRW5kIElmfEVuZCBGb3J8RWxzZXxFbmQgZm9yIGVhY2h8RW5kIFdoaWxlfEVuZCBTUUx8RW5kIGNhc2V8RW5kIHVzZXxVbnRpbHw6ICpcXCguKikuKiQiLAogICAgICAiZmxhZ3MiOiAiaSIKICAgIH0KICB9LAogICJvbkVudGVyUnVsZXMiOiBbCiAgICB7CiAgICAgICJiZWZvcmVUZXh0IjogewogICAgICAgICJwYXR0ZXJuIjogIl5leHBvc2VkIiwKICAgICAgICAiZmxhZ3MiOiAiaSIKICAgICAgfSwKICAgICAgImFjdGlvbiI6IHsgImluZGVudCI6ICJpbmRlbnQiLCAiaW5kZW50QWN0aW9uIjogMSB9CiAgICB9CiAgXQp9Cg==", self.location).toString(),
  { mimeType: "application/json", size: 1723 }
);
Y(
  "package.json",
  new URL("data:application/json;base64,ewogICAgIm5hbWUiOiAiNGQiLAogICAgImRpc3BsYXlOYW1lIjogIiVkaXNwbGF5TmFtZSUiLAogICAgImRlc2NyaXB0aW9uIjogIiVkZXNjcmlwdGlvbiUiLAogICAgInZlcnNpb24iOiAiMS4wLjAiLAogICAgInB1Ymxpc2hlciI6ICJ2c2NvZGUiLAogICAgImxpY2Vuc2UiOiAiTUlUIiwKICAgICJlbmdpbmVzIjogewogICAgICAgICJ2c2NvZGUiOiAiMC4xMC54IgogICAgfSwKICAgICJzY3JpcHRzIjogewogICAgICAgICJ1cGRhdGUtZ3JhbW1hciI6ICJub2RlIC4uL25vZGVfbW9kdWxlcy92c2NvZGUtZ3JhbW1hci11cGRhdGVyL2JpbiBtaWNyb3NvZnQvdnNjb2RlLTRkIGdyYW1tYXJzLzRkLmNzb24gLi9zeW50YXhlcy80ZC50bUxhbmd1YWdlLmpzb24iCiAgICB9LAogICAgImNhdGVnb3JpZXMiOiBbCiAgICAgICAgIlByb2dyYW1taW5nIExhbmd1YWdlcyIKICAgIF0sCiAgICAiY29udHJpYnV0ZXMiOiB7CiAgICAgICAgImxhbmd1YWdlcyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICJpZCI6ICI0ZCIsCiAgICAgICAgICAgICAgImFsaWFzZXMiOiBbIjREIiwgIjRkIl0sCiAgICAgICAgICAgICAgImV4dGVuc2lvbnMiOiBbIi40ZG0iLCAiLjRxcyJdLAogICAgICAgICAgICAgICJjb25maWd1cmF0aW9uIjogIi4vbGFuZ3VhZ2UtY29uZmlndXJhdGlvbi5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdLAogICAgICAgICAgImdyYW1tYXJzIjogWwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgImxhbmd1YWdlIjogIjRkIiwKICAgICAgICAgICAgICAic2NvcGVOYW1lIjogInNvdXJjZS40ZG0iLAogICAgICAgICAgICAgICJwYXRoIjogIi4vc3ludGF4ZXMvNGQudG1MYW5ndWFnZS5qc29uIgogICAgICAgICAgICB9CiAgICAgICAgICBdCiAgICB9LAogICAgInJlcG9zaXRvcnkiOiB7CiAgICAgICAgInR5cGUiOiAiZ2l0IiwKICAgICAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9taWNyb3NvZnQvdnNjb2RlLmdpdCIKICAgIH0KfQ==", self.location).toString(),
  { mimeType: "application/json", size: 1006 }
);
Y(
  "package.nls.json",
  new URL("data:application/json;base64,ewogICJkaXNwbGF5TmFtZSI6ICI0RCBMYW5ndWFnZSBCYXNpY3MiLAogICJkZXNjcmlwdGlvbiI6ICJQcm92aWRlcyBzeW50YXggaGlnaGxpZ2h0aW5nIGFuZCBicmFja2V0IG1hdGNoaW5nIGZvciA0RE0gYW5kIDRRUyBmaWxlcy4iCn0K", self.location).toString(),
  { mimeType: "application/json", size: 135 }
);
export {
  fn as Alerts,
  gt as CodeEditor,
  at as CodeEditorProvider,
  st as LSPProvider,
  ne as _await,
  nn as configureServices,
  F as getFileSystemPath,
  rt as getFunctionOffset,
  en as initMonacoUserConfiguration,
  sn as jumpToLine,
  rn as jumpToSelection,
  dn as useCodeEditor,
  lt as useLSP
};
//# sourceMappingURL=index.es.js.map
