/**
 * ldesign v0.4.6
 * (c) 2023 ldesign
 * @license MIT
 */

var ANCHOR_SHARP_REGEXP = /#(\S+)$/;
function getOffsetTop(target, container) {
  var _target$getBoundingCl = target.getBoundingClientRect(),
    top = _target$getBoundingCl.top;
  if (container === window) {
    return top - document.documentElement.clientTop;
  }
  return top - container.getBoundingClientRect().top;
}

export { ANCHOR_SHARP_REGEXP, getOffsetTop };
//# sourceMappingURL=utils.js.map
