import { getConfig2 } from './chunk-ABZYJK2D.mjs';
import { __name } from './chunk-AGHRB4JF.mjs';
import '../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.mjs';
import '../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.mjs';
import select from '../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.mjs';

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 };
