"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index_esm = require("../../../min-dash/dist/index.esm.js");
function g(i, d) {
  d = !!d, index_esm.isArray(i) || (i = [i]);
  var n, r, t, a;
  return index_esm.forEach(i, function(h) {
    var f = h;
    h.waypoints && !d && (f = g(h.waypoints, true));
    var o = f.x, u = f.y, x = f.height || 0, y = f.width || 0;
    (o < n || n === void 0) && (n = o), (u < r || r === void 0) && (r = u), (o + y > t || t === void 0) && (t = o + y), (u + x > a || a === void 0) && (a = u + x);
  }), {
    x: n,
    y: r,
    height: a - r,
    width: t - n
  };
}
function e(i) {
  return "waypoints" in i ? "connection" : "x" in i ? "shape" : "root";
}
function v(i) {
  return !!(i && i.isFrame);
}
exports.getBBox = g;
exports.getType = e;
exports.isFrameElement = v;
