"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const conversion = require("./dist-es-projection-geometry-conversion.cjs");
const deltaApply = require("./dist-es-projection-geometry-delta-apply.cjs");
function measureViewportBox(instance, transformPoint) {
  return conversion.convertBoundingBoxToBox(conversion.transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
}
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
  const viewportBox = measureViewportBox(element, transformPagePoint);
  const { scroll } = rootProjectionNode;
  if (scroll) {
    deltaApply.translateAxis(viewportBox.x, scroll.offset.x);
    deltaApply.translateAxis(viewportBox.y, scroll.offset.y);
  }
  return viewportBox;
}
exports.measurePageBox = measurePageBox;
exports.measureViewportBox = measureViewportBox;
//# sourceMappingURL=dist-es-projection-utils-measure.cjs.map
