function n(){return"undefined"!=typeof window}function t(n){return r(n)?(n.nodeName||"").toLowerCase():"#document"}function e(n){var t;return(null==n||null==(t=n.ownerDocument)?void 0:t.defaultView)||window}function o(n){var t;return null==(t=(r(n)?n.ownerDocument:n.document)||window.document)?void 0:t.documentElement}function r(t){return!!n()&&(t instanceof Node||t instanceof e(t).Node)}function c(t){return!!n()&&(t instanceof Element||t instanceof e(t).Element)}function u(t){return!!n()&&(t instanceof HTMLElement||t instanceof e(t).HTMLElement)}function i(t){return!(!n()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof e(t).ShadowRoot)}function l(n){const{overflow:t,overflowX:e,overflowY:o,display:r}=w(n);return/auto|scroll|overlay|hidden|clip/.test(t+o+e)&&!["inline","contents"].includes(r)}function f(n){return["table","td","th"].includes(t(n))}function s(n){return[":popover-open",":modal"].some((t=>{try{return n.matches(t)}catch(n){return!1}}))}function a(n){const t=p(),e=c(n)?w(n):n;return["transform","translate","scale","rotate","perspective"].some((n=>!!e[n]&&"none"!==e[n]))||!!e.containerType&&"normal"!==e.containerType||!t&&!!e.backdropFilter&&"none"!==e.backdropFilter||!t&&!!e.filter&&"none"!==e.filter||["transform","translate","scale","rotate","perspective","filter"].some((n=>(e.willChange||"").includes(n)))||["paint","layout","strict","content"].some((n=>(e.contain||"").includes(n)))}function d(n){let t=y(n);for(;u(t)&&!m(t);){if(a(t))return t;if(s(t))return null;t=y(t)}return null}function p(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function m(n){return["html","body","#document"].includes(t(n))}function w(n){return e(n).getComputedStyle(n)}function v(n){return c(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function y(n){if("html"===t(n))return n;const e=n.assignedSlot||n.parentNode||i(n)&&n.host||o(n);return i(e)?e.host:e}function h(n){const t=y(n);return m(t)?n.ownerDocument?n.ownerDocument.body:n.body:u(t)&&l(t)?t:h(t)}function S(n,t,o){var r;void 0===t&&(t=[]),void 0===o&&(o=!0);const c=h(n),u=c===(null==(r=n.ownerDocument)?void 0:r.body),i=e(c);if(u){const n=b(i);return t.concat(i,i.visualViewport||[],l(c)?c:[],n&&o?S(n):[])}return t.concat(c,S(c,[],o))}function b(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}export{w as getComputedStyle,d as getContainingBlock,o as getDocumentElement,b as getFrameElement,h as getNearestOverflowAncestor,t as getNodeName,v as getNodeScroll,S as getOverflowAncestors,y as getParentNode,e as getWindow,a as isContainingBlock,c as isElement,u as isHTMLElement,m as isLastTraversableNode,r as isNode,l as isOverflowElement,i as isShadowRoot,f as isTableElement,s as isTopLayer,p as isWebKit};
//# sourceMappingURL=floating-ui.utils.dom.js.map
