import t from"./getWindow.js";import e from"./getNodeName.js";import r from"./getComputedStyle.js";import{isHTMLElement as o,isShadowRoot as i}from"./instanceOf.js";import n from"./isTableElement.js";import f from"./getParentNode.js";import s from"../utils/userAgent.js";function m(t){return o(t)&&"fixed"!==r(t).position?t.offsetParent:null}function a(a){for(var l=t(a),p=m(a);p&&n(p)&&"static"===r(p).position;)p=m(p);return p&&("html"===e(p)||"body"===e(p)&&"static"===r(p).position)?l:p||function(t){var n=/firefox/i.test(s());if(/Trident/i.test(s())&&o(t)&&"fixed"===r(t).position)return null;var m=f(t);for(i(m)&&(m=m.host);o(m)&&["html","body"].indexOf(e(m))<0;){var a=r(m);if("none"!==a.transform||"none"!==a.perspective||"paint"===a.contain||-1!==["transform","perspective"].indexOf(a.willChange)||n&&"filter"===a.willChange||n&&a.filter&&"none"!==a.filter)return m;m=m.parentNode}return null}(a)||l}export{a as default};
//# sourceMappingURL=getOffsetParent.js.map
