"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const chunkABZYJK2D = require("./dist-chunks-mermaid.core-chunk-ABZYJK2D.cjs");
const chunkAGHRB4JF = require("./dist-chunks-mermaid.core-chunk-AGHRB4JF.cjs");
require("../d3-transition/src-selection-index.cjs");
require("../d3-zoom/src-transform.cjs");
const select = require("../d3-selection/src-select.cjs");
var selectSvgElement = /* @__PURE__ */ chunkAGHRB4JF.__name((id) => {
  const { securityLevel } = chunkABZYJK2D.getConfig2();
  let root = select.default("body");
  if (securityLevel === "sandbox") {
    const sandboxElement = select.default(`#i${id}`);
    const doc = sandboxElement.node()?.contentDocument ?? document;
    root = select.default(doc.body);
  }
  const svg = root.select(`#${id}`);
  return svg;
}, "selectSvgElement");
exports.selectSvgElement = selectSvgElement;
//# sourceMappingURL=dist-chunks-mermaid.core-chunk-EXTU4WIE.cjs.map
