'use strict';

var chunkABZYJK2D = require('./chunk-ABZYJK2D.js');
var chunkAGHRB4JF = require('./chunk-AGHRB4JF.js');
require('../../../../../../d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js');
require('../../../../../../d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js');
var select = require('../../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/select.js');

var selectSvgElement = /* @__PURE__ */ chunkAGHRB4JF.__name((id) => {
  const { securityLevel } = chunkABZYJK2D.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");

exports.selectSvgElement = selectSvgElement;
