import t from"./getBoundingClientRect.js";import o from"./getNodeScroll.js";import e from"./getNodeName.js";import{isHTMLElement as r}from"./instanceOf.js";import i from"./getWindowScrollBarX.js";import l from"./getDocumentElement.js";import f from"./isScrollParent.js";import{round as m}from"../utils/math.js";function n(n,s,c){void 0===c&&(c=!1);var p=r(s),d=r(s)&&function(t){var o=t.getBoundingClientRect(),e=m(o.width)/t.offsetWidth||1,r=m(o.height)/t.offsetHeight||1;return 1!==e||1!==r}(s),g=l(s),h=t(n,d,c),a={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(p||!p&&!c)&&(("body"!==e(s)||f(g))&&(a=o(s)),r(s)?((u=t(s,!0)).x+=s.clientLeft,u.y+=s.clientTop):g&&(u.x=i(g))),{x:h.left+a.scrollLeft-u.x,y:h.top+a.scrollTop-u.y,width:h.width,height:h.height}}export{n as default};
//# sourceMappingURL=getCompositeRect.js.map
