import o from "monaco-editor/esm/vs/editor/editor.worker.js?worker";
import e from "monaco-editor/esm/vs/language/json/json.worker.js?worker";
import n from "monaco-yaml/yaml.worker.js?worker";
const s = () => {
  globalThis.MonacoEnvironment ??= {
    getWorker(t, r) {
      switch (r) {
        case "json":
          return new e();
        case "yaml":
          return new n();
        default:
          return new o();
      }
    }
  };
};
export {
  s as ensureMonacoEnvironment
};
