import { _ as h, aa as s, l as c } from "./index-DeBlJN4f.js";
var u = /* @__PURE__ */ h((i, t, o, e) => {
  i.attr("class", o);
  const { width: a, height: n, x: d, y: g } = w(i, t);
  s(i, n, a, e);
  const r = x(d, g, a, n, t);
  i.attr("viewBox", r), c.debug(`viewBox configured: ${r} with padding: ${t}`);
}, "setupViewPortForSVG"), w = /* @__PURE__ */ h((i, t) => {
  var o;
  const e = ((o = i.node()) == null ? void 0 : o.getBBox()) || { width: 0, height: 0, x: 0, y: 0 };
  return {
    width: e.width + t * 2,
    height: e.height + t * 2,
    x: e.x,
    y: e.y
  };
}, "calculateDimensionsWithPadding"), x = /* @__PURE__ */ h((i, t, o, e, a) => `${i - a} ${t - a} ${o} ${e}`, "createViewBox");
export {
  u as d
};
