import { i } from "./monaco-importer.js";
import { StandaloneServices as r } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
import { IStandaloneThemeService as n } from "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
import { generateTokensCSSForColorMap as a } from "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
v5.0.0-next.128 */
async function c(e, o) {
  return await (await i()).colorize(e, o, { tabSize: 2 });
}
async function C(e, o, t) {
  !e || e.tagName !== "CODE" || (e.innerHTML = await c(o ?? "", t));
}
function S() {
  const o = r.get(n).getColorTheme();
  return a(o.tokenTheme.getColorMap());
}
function g(e) {
  return r.get(n).onDidColorThemeChange(() => e());
}
export {
  C as a,
  c,
  S as g,
  g as o
};
