import { convertBoundingBoxToBox, transformBoxPoints } from "./dist-es-projection-geometry-conversion.js";
import { translateAxis } from "./dist-es-projection-geometry-delta-apply.js";
function measureViewportBox(instance, transformPoint) {
  return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));
}
function measurePageBox(element, rootProjectionNode, transformPagePoint) {
  const viewportBox = measureViewportBox(element, transformPagePoint);
  const { scroll } = rootProjectionNode;
  if (scroll) {
    translateAxis(viewportBox.x, scroll.offset.x);
    translateAxis(viewportBox.y, scroll.offset.y);
  }
  return viewportBox;
}
export {
  measurePageBox,
  measureViewportBox
};
//# sourceMappingURL=dist-es-projection-utils-measure.js.map
