import { getConfig2 } from "./dist-chunks-mermaid.core-chunk-ABZYJK2D.js";
import { __name } from "./dist-chunks-mermaid.core-chunk-AGHRB4JF.js";
import "../d3-transition/src-selection-index.js";
import "../d3-zoom/src-transform.js";
import select from "../d3-selection/src-select.js";
var selectSvgElement = /* @__PURE__ */ __name((id) => {
  const { securityLevel } = getConfig2();
  let root = select("body");
  if (securityLevel === "sandbox") {
    const sandboxElement = select(`#i${id}`);
    const doc = sandboxElement.node()?.contentDocument ?? document;
    root = select(doc.body);
  }
  const svg = root.select(`#${id}`);
  return svg;
}, "selectSvgElement");
export {
  selectSvgElement
};
//# sourceMappingURL=dist-chunks-mermaid.core-chunk-EXTU4WIE.js.map
