🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@floating-ui/dom

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@floating-ui/dom - npm Package Compare versions

Comparing version
1.7.5
to
1.7.6
+1
-1
dist/floating-ui.dom.browser.min.mjs

@@ -1,1 +0,1 @@

import{rectToClientRect as t,arrow as e,autoPlacement as n,detectOverflow as o,flip as i,hide as r,inline as c,limitShift as l,offset as s,shift as f,size as u,computePosition as a}from"@floating-ui/core";const h=Math.min,d=Math.max,p=Math.round,g=Math.floor,m=t=>({x:t,y:t});function y(){return"undefined"!=typeof window}function w(t){return b(t)?(t.nodeName||"").toLowerCase():"#document"}function x(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function v(t){var e;return null==(e=(b(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function b(t){return!!y()&&(t instanceof Node||t instanceof x(t).Node)}function L(t){return!!y()&&(t instanceof Element||t instanceof x(t).Element)}function R(t){return!!y()&&(t instanceof HTMLElement||t instanceof x(t).HTMLElement)}function T(t){return!(!y()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof x(t).ShadowRoot)}const S=new Set(["inline","contents"]);function C(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=A(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!S.has(i)}const E=new Set(["table","td","th"]);function F(t){return E.has(w(t))}const D=[":popover-open",":modal"];function W(t){return D.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const O=["transform","translate","scale","rotate","perspective"],H=["transform","translate","scale","rotate","perspective","filter"],M=["paint","layout","strict","content"];function P(t){const e=z(),n=L(t)?A(t):t;return O.some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||H.some((t=>(n.willChange||"").includes(t)))||M.some((t=>(n.contain||"").includes(t)))}function z(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const B=new Set(["html","body","#document"]);function V(t){return B.has(w(t))}function A(t){return x(t).getComputedStyle(t)}function N(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function k(t){if("html"===w(t))return t;const e=t.assignedSlot||t.parentNode||T(t)&&t.host||v(t);return T(e)?e.host:e}function I(t){const e=k(t);return V(e)?t.ownerDocument?t.ownerDocument.body:t.body:R(e)&&C(e)?e:I(e)}function q(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=I(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),c=x(i);if(r){const t=X(c);return e.concat(c,c.visualViewport||[],C(i)?i:[],t&&n?q(t):[])}return e.concat(i,q(i,[],n))}function X(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Y(t){const e=A(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=R(t),r=i?t.offsetWidth:n,c=i?t.offsetHeight:o,l=p(n)!==r||p(o)!==c;return l&&(n=r,o=c),{width:n,height:o,$:l}}function $(t){return L(t)?t:t.contextElement}function _(t){const e=$(t);if(!R(e))return m(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Y(e);let c=(r?p(n.width):n.width)/o,l=(r?p(n.height):n.height)/i;return c&&Number.isFinite(c)||(c=1),l&&Number.isFinite(l)||(l=1),{x:c,y:l}}const j=m(0);function G(t){const e=x(t);return z()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:j}function J(e,n,o,i){void 0===n&&(n=!1),void 0===o&&(o=!1);const r=e.getBoundingClientRect(),c=$(e);let l=m(1);n&&(i?L(i)&&(l=_(i)):l=_(e));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==x(t))&&e}(c,o,i)?G(c):m(0);let f=(r.left+s.x)/l.x,u=(r.top+s.y)/l.y,a=r.width/l.x,h=r.height/l.y;if(c){const t=x(c),e=i&&L(i)?x(i):i;let n=t,o=X(n);for(;o&&i&&e!==n;){const t=_(o),e=o.getBoundingClientRect(),i=A(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,c=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;f*=t.x,u*=t.y,a*=t.x,h*=t.y,f+=r,u+=c,n=x(o),o=X(n)}}return t({width:a,height:h,x:f,y:u})}function K(t,e){const n=N(t).scrollLeft;return e?e.left+n:J(v(t)).left+n}function Q(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-K(t,n),y:n.top+e.scrollTop}}const U=new Set(["absolute","fixed"]);function Z(e,n,o){let i;if("viewport"===n)i=function(t,e){const n=x(t),o=v(t),i=n.visualViewport;let r=o.clientWidth,c=o.clientHeight,l=0,s=0;if(i){r=i.width,c=i.height;const t=z();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,s=i.offsetTop)}const f=K(o);if(f<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,c=Math.abs(o.clientWidth-e.clientWidth-i);c<=25&&(r-=c)}else f<=25&&(r+=f);return{width:r,height:c,x:l,y:s}}(e,o);else if("document"===n)i=function(t){const e=v(t),n=N(t),o=t.ownerDocument.body,i=d(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=d(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+K(t);const l=-n.scrollTop;return"rtl"===A(o).direction&&(c+=d(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:c,y:l}}(v(e));else if(L(n))i=function(t,e){const n=J(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=R(t)?_(t):m(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(n,o);else{const t=G(e);i={x:n.x-t.x,y:n.y-t.y,width:n.width,height:n.height}}return t(i)}function tt(t,e){const n=k(t);return!(n===e||!L(n)||V(n))&&("fixed"===A(n).position||tt(n,e))}function et(t,e,n){const o=R(e),i=v(e),r="fixed"===n,c=J(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const s=m(0);function f(){s.x=K(i)}if(o||!o&&!r)if(("body"!==w(e)||C(i))&&(l=N(e)),o){const t=J(e,!0,r,e);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&f();r&&!o&&i&&f();const u=!i||o||r?m(0):Q(i,l);return{x:c.left+l.scrollLeft-s.x-u.x,y:c.top+l.scrollTop-s.y-u.y,width:c.width,height:c.height}}function nt(t){return"static"===A(t).position}function ot(t,e){if(!R(t)||"fixed"===A(t).position)return null;if(e)return e(t);let n=t.offsetParent;return v(t)===n&&(n=n.ownerDocument.body),n}function it(t,e){const n=x(t);if(W(t))return n;if(!R(t)){let e=k(t);for(;e&&!V(e);){if(L(e)&&!nt(e))return e;e=k(e)}return n}let o=ot(t,e);for(;o&&F(o)&&nt(o);)o=ot(o,e);return o&&V(o)&&nt(o)&&!P(o)?n:o||function(t){let e=k(t);for(;R(e)&&!V(e);){if(P(e))return e;if(W(e))return null;e=k(e)}return null}(t)||n}const rt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,c=v(o),l=!!e&&W(e.floating);if(o===c||l&&r)return n;let s={scrollLeft:0,scrollTop:0},f=m(1);const u=m(0),a=R(o);if((a||!a&&!r)&&(("body"!==w(o)||C(c))&&(s=N(o)),R(o))){const t=J(o);f=_(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const h=!c||a||r?m(0):Q(c,s);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-s.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-s.scrollTop*f.y+u.y+h.y}},getDocumentElement:v,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?W(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=q(t,[],!1).filter((t=>L(t)&&"body"!==w(t))),i=null;const r="fixed"===A(t).position;let c=r?k(t):t;for(;L(c)&&!V(c);){const e=A(c),n=P(c);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&U.has(i.position)||C(c)&&!n&&tt(t,c))?o=o.filter((t=>t!==c)):i=e,c=k(c)}return e.set(t,o),o}(e,this._c):[].concat(n),o],c=r[0],l=r.reduce(((t,n)=>{const o=Z(e,n,i);return t.top=d(o.top,t.top),t.right=h(o.right,t.right),t.bottom=h(o.bottom,t.bottom),t.left=d(o.left,t.left),t}),Z(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:it,getElementRects:async function(t){const e=this.getOffsetParent||it,n=this.getDimensions,o=await n(t.floating);return{reference:et(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=Y(t);return{width:e,height:n}},getScale:_,isElement:L,isRTL:function(t){return"rtl"===A(t).direction}};function ct(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function lt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,f=$(t),u=i||r?[...f?q(f):[],...q(e)]:[];u.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)}));const a=f&&l?function(t,e){let n,o=null;const i=v(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function c(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),r();const f=t.getBoundingClientRect(),{left:u,top:a,width:p,height:m}=f;if(l||e(),!p||!m)return;const y={rootMargin:-g(a)+"px "+-g(i.clientWidth-(u+p))+"px "+-g(i.clientHeight-(a+m))+"px "+-g(u)+"px",threshold:d(0,h(1,s))||1};let w=!0;function x(e){const o=e[0].intersectionRatio;if(o!==s){if(!w)return c();o?c(!1,o):n=setTimeout((()=>{c(!1,1e-7)}),1e3)}1!==o||ct(f,t.getBoundingClientRect())||c(),w=!1}try{o=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch(t){o=new IntersectionObserver(x,y)}o.observe(t)}(!0),r}(f,n):null;let p,m=-1,y=null;c&&(y=new ResizeObserver((t=>{let[o]=t;o&&o.target===f&&y&&(y.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var t;null==(t=y)||t.observe(e)}))),n()})),f&&!s&&y.observe(f),y.observe(e));let w=s?J(t):null;return s&&function e(){const o=J(t);w&&!ct(w,o)&&n();w=o,p=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==a||a(),null==(t=y)||t.disconnect(),y=null,s&&cancelAnimationFrame(p)}}const st=o,ft=s,ut=n,at=f,ht=i,dt=u,pt=r,gt=e,mt=c,yt=l,wt=(t,e,n)=>{const o=new Map,i={platform:rt,...n},r={...i.platform,_c:o};return a(t,e,{...i,platform:r})};export{gt as arrow,ut as autoPlacement,lt as autoUpdate,wt as computePosition,st as detectOverflow,ht as flip,q as getOverflowAncestors,pt as hide,mt as inline,yt as limitShift,ft as offset,rt as platform,at as shift,dt as size};
import{rectToClientRect as t,arrow as e,autoPlacement as n,detectOverflow as o,flip as i,hide as r,inline as c,limitShift as l,offset as s,shift as f,size as u,computePosition as a}from"@floating-ui/core";const h=Math.min,d=Math.max,p=Math.round,g=Math.floor,m=t=>({x:t,y:t});function y(){return"undefined"!=typeof window}function w(t){return b(t)?(t.nodeName||"").toLowerCase():"#document"}function x(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function v(t){var e;return null==(e=(b(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function b(t){return!!y()&&(t instanceof Node||t instanceof x(t).Node)}function L(t){return!!y()&&(t instanceof Element||t instanceof x(t).Element)}function R(t){return!!y()&&(t instanceof HTMLElement||t instanceof x(t).HTMLElement)}function T(t){return!(!y()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof x(t).ShadowRoot)}function C(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==i&&"contents"!==i}function S(t){return/^(table|td|th)$/.test(w(t))}function E(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const F=/transform|translate|scale|rotate|perspective|filter/,D=/paint|layout|strict|content/,W=t=>!!t&&"none"!==t;let O;function H(t){const e=L(t)?z(t):t;return W(e.transform)||W(e.translate)||W(e.scale)||W(e.rotate)||W(e.perspective)||!M()&&(W(e.backdropFilter)||W(e.filter))||F.test(e.willChange||"")||D.test(e.contain||"")}function M(){return null==O&&(O="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),O}function P(t){return/^(html|body|#document)$/.test(w(t))}function z(t){return x(t).getComputedStyle(t)}function B(t){return L(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function V(t){if("html"===w(t))return t;const e=t.assignedSlot||t.parentNode||T(t)&&t.host||v(t);return T(e)?e.host:e}function A(t){const e=V(t);return P(e)?t.ownerDocument?t.ownerDocument.body:t.body:R(e)&&C(e)?e:A(e)}function N(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=A(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),c=x(i);if(r){const t=$(c);return e.concat(c,c.visualViewport||[],C(i)?i:[],t&&n?N(t):[])}return e.concat(i,N(i,[],n))}function $(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function k(t){const e=z(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=R(t),r=i?t.offsetWidth:n,c=i?t.offsetHeight:o,l=p(n)!==r||p(o)!==c;return l&&(n=r,o=c),{width:n,height:o,$:l}}function I(t){return L(t)?t:t.contextElement}function q(t){const e=I(t);if(!R(e))return m(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=k(e);let c=(r?p(n.width):n.width)/o,l=(r?p(n.height):n.height)/i;return c&&Number.isFinite(c)||(c=1),l&&Number.isFinite(l)||(l=1),{x:c,y:l}}const X=m(0);function Y(t){const e=x(t);return M()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:X}function _(e,n,o,i){void 0===n&&(n=!1),void 0===o&&(o=!1);const r=e.getBoundingClientRect(),c=I(e);let l=m(1);n&&(i?L(i)&&(l=q(i)):l=q(e));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==x(t))&&e}(c,o,i)?Y(c):m(0);let f=(r.left+s.x)/l.x,u=(r.top+s.y)/l.y,a=r.width/l.x,h=r.height/l.y;if(c){const t=x(c),e=i&&L(i)?x(i):i;let n=t,o=$(n);for(;o&&i&&e!==n;){const t=q(o),e=o.getBoundingClientRect(),i=z(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,c=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;f*=t.x,u*=t.y,a*=t.x,h*=t.y,f+=r,u+=c,n=x(o),o=$(n)}}return t({width:a,height:h,x:f,y:u})}function j(t,e){const n=B(t).scrollLeft;return e?e.left+n:_(v(t)).left+n}function G(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-j(t,n),y:n.top+e.scrollTop}}function J(e,n,o){let i;if("viewport"===n)i=function(t,e){const n=x(t),o=v(t),i=n.visualViewport;let r=o.clientWidth,c=o.clientHeight,l=0,s=0;if(i){r=i.width,c=i.height;const t=M();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,s=i.offsetTop)}const f=j(o);if(f<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,c=Math.abs(o.clientWidth-e.clientWidth-i);c<=25&&(r-=c)}else f<=25&&(r+=f);return{width:r,height:c,x:l,y:s}}(e,o);else if("document"===n)i=function(t){const e=v(t),n=B(t),o=t.ownerDocument.body,i=d(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=d(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+j(t);const l=-n.scrollTop;return"rtl"===z(o).direction&&(c+=d(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:c,y:l}}(v(e));else if(L(n))i=function(t,e){const n=_(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=R(t)?q(t):m(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(n,o);else{const t=Y(e);i={x:n.x-t.x,y:n.y-t.y,width:n.width,height:n.height}}return t(i)}function K(t,e){const n=V(t);return!(n===e||!L(n)||P(n))&&("fixed"===z(n).position||K(n,e))}function Q(t,e,n){const o=R(e),i=v(e),r="fixed"===n,c=_(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const s=m(0);function f(){s.x=j(i)}if(o||!o&&!r)if(("body"!==w(e)||C(i))&&(l=B(e)),o){const t=_(e,!0,r,e);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&f();r&&!o&&i&&f();const u=!i||o||r?m(0):G(i,l);return{x:c.left+l.scrollLeft-s.x-u.x,y:c.top+l.scrollTop-s.y-u.y,width:c.width,height:c.height}}function U(t){return"static"===z(t).position}function Z(t,e){if(!R(t)||"fixed"===z(t).position)return null;if(e)return e(t);let n=t.offsetParent;return v(t)===n&&(n=n.ownerDocument.body),n}function tt(t,e){const n=x(t);if(E(t))return n;if(!R(t)){let e=V(t);for(;e&&!P(e);){if(L(e)&&!U(e))return e;e=V(e)}return n}let o=Z(t,e);for(;o&&S(o)&&U(o);)o=Z(o,e);return o&&P(o)&&U(o)&&!H(o)?n:o||function(t){let e=V(t);for(;R(e)&&!P(e);){if(H(e))return e;if(E(e))return null;e=V(e)}return null}(t)||n}const et={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,c=v(o),l=!!e&&E(e.floating);if(o===c||l&&r)return n;let s={scrollLeft:0,scrollTop:0},f=m(1);const u=m(0),a=R(o);if((a||!a&&!r)&&(("body"!==w(o)||C(c))&&(s=B(o)),a)){const t=_(o);f=q(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const h=!c||a||r?m(0):G(c,s);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-s.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-s.scrollTop*f.y+u.y+h.y}},getDocumentElement:v,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?E(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=N(t,[],!1).filter((t=>L(t)&&"body"!==w(t))),i=null;const r="fixed"===z(t).position;let c=r?V(t):t;for(;L(c)&&!P(c);){const e=z(c),n=H(c);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&("absolute"===i.position||"fixed"===i.position)||C(c)&&!n&&K(t,c))?o=o.filter((t=>t!==c)):i=e,c=V(c)}return e.set(t,o),o}(e,this._c):[].concat(n),o],c=J(e,r[0],i);let l=c.top,s=c.right,f=c.bottom,u=c.left;for(let t=1;t<r.length;t++){const n=J(e,r[t],i);l=d(n.top,l),s=h(n.right,s),f=h(n.bottom,f),u=d(n.left,u)}return{width:s-u,height:f-l,x:u,y:l}},getOffsetParent:tt,getElementRects:async function(t){const e=this.getOffsetParent||tt,n=this.getDimensions,o=await n(t.floating);return{reference:Q(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=k(t);return{width:e,height:n}},getScale:q,isElement:L,isRTL:function(t){return"rtl"===z(t).direction}};function nt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ot(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,f=I(t),u=i||r?[...f?N(f):[],...e?N(e):[]]:[];u.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)}));const a=f&&l?function(t,e){let n,o=null;const i=v(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function c(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),r();const f=t.getBoundingClientRect(),{left:u,top:a,width:p,height:m}=f;if(l||e(),!p||!m)return;const y={rootMargin:-g(a)+"px "+-g(i.clientWidth-(u+p))+"px "+-g(i.clientHeight-(a+m))+"px "+-g(u)+"px",threshold:d(0,h(1,s))||1};let w=!0;function x(e){const o=e[0].intersectionRatio;if(o!==s){if(!w)return c();o?c(!1,o):n=setTimeout((()=>{c(!1,1e-7)}),1e3)}1!==o||nt(f,t.getBoundingClientRect())||c(),w=!1}try{o=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch(t){o=new IntersectionObserver(x,y)}o.observe(t)}(!0),r}(f,n):null;let p,m=-1,y=null;c&&(y=new ResizeObserver((t=>{let[o]=t;o&&o.target===f&&y&&e&&(y.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var t;null==(t=y)||t.observe(e)}))),n()})),f&&!s&&y.observe(f),e&&y.observe(e));let w=s?_(t):null;return s&&function e(){const o=_(t);w&&!nt(w,o)&&n();w=o,p=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)})),null==a||a(),null==(t=y)||t.disconnect(),y=null,s&&cancelAnimationFrame(p)}}const it=o,rt=s,ct=n,lt=f,st=i,ft=u,ut=r,at=e,ht=c,dt=l,pt=(t,e,n)=>{const o=new Map,i={platform:et,...n},r={...i.platform,_c:o};return a(t,e,{...i,platform:r})};export{at as arrow,ct as autoPlacement,ot as autoUpdate,pt as computePosition,it as detectOverflow,st as flip,N as getOverflowAncestors,ut as hide,ht as inline,dt as limitShift,rt as offset,et as platform,lt as shift,ft as size};

@@ -61,3 +61,2 @@ import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';

}
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
function isOverflowElement(element) {

@@ -70,23 +69,26 @@ const {

} = getComputedStyle$1(element);
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
}
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
function isTableElement(element) {
return tableElements.has(getNodeName(element));
return /^(table|td|th)$/.test(getNodeName(element));
}
const topLayerSelectors = [':popover-open', ':modal'];
function isTopLayer(element) {
return topLayerSelectors.some(selector => {
try {
return element.matches(selector);
} catch (_e) {
return false;
try {
if (element.matches(':popover-open')) {
return true;
}
});
} catch (_e) {
// no-op
}
try {
return element.matches(':modal');
} catch (_e) {
return false;
}
}
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
const containValues = ['paint', 'layout', 'strict', 'content'];
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
const containRe = /paint|layout|strict|content/;
const isNotNone = value => !!value && value !== 'none';
let isWebKitValue;
function isContainingBlock(elementOrCss) {
const webkit = isWebKit();
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;

@@ -96,3 +98,3 @@

// https://drafts.csswg.org/css-transforms-2/#individual-transforms
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
}

@@ -112,8 +114,9 @@ function getContainingBlock(element) {

function isWebKit() {
if (typeof CSS === 'undefined' || !CSS.supports) return false;
return CSS.supports('-webkit-backdrop-filter', 'none');
if (isWebKitValue == null) {
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
}
return isWebKitValue;
}
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
function isLastTraversableNode(node) {
return lastTraversableNodeNames.has(getNodeName(node));
return /^(html|body|#document)$/.test(getNodeName(node));
}

@@ -174,4 +177,5 @@ function getComputedStyle$1(element) {

return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
} else {
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
}
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
}

@@ -353,3 +357,3 @@ function getFrameElement(win) {

}
if (isHTMLElement(offsetParent)) {
if (isOffsetParentAnElement) {
const offsetRect = getBoundingClientRect(offsetParent);

@@ -442,3 +446,2 @@ scale = getScale(offsetParent);

const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
// Returns the inner client rect, subtracting scrollbars if present.

@@ -508,3 +511,3 @@ function getInnerBoundingClientRect(element, strategy) {

}
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
if (shouldDropCurrentNode) {

@@ -534,16 +537,19 @@ // Drop non-containing blocks.

const clippingAncestors = [...elementClippingAncestors, rootBoundary];
const firstClippingAncestor = clippingAncestors[0];
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
accRect.top = max(rect.top, accRect.top);
accRect.right = min(rect.right, accRect.right);
accRect.bottom = min(rect.bottom, accRect.bottom);
accRect.left = max(rect.left, accRect.left);
return accRect;
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
let top = firstRect.top;
let right = firstRect.right;
let bottom = firstRect.bottom;
let left = firstRect.left;
for (let i = 1; i < clippingAncestors.length; i++) {
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
top = max(rect.top, top);
right = min(rect.right, right);
bottom = min(rect.bottom, bottom);
left = max(rect.left, left);
}
return {
width: clippingRect.right - clippingRect.left,
height: clippingRect.bottom - clippingRect.top,
x: clippingRect.left,
y: clippingRect.top
width: right - left,
height: bottom - top,
x: left,
y: top
};

@@ -799,3 +805,3 @@ }

const referenceEl = unwrapElement(reference);
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
ancestors.forEach(ancestor => {

@@ -813,3 +819,3 @@ ancestorScroll && ancestor.addEventListener('scroll', update, {

let [firstEntry] = _ref;
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
// Prevent update loops when using the `size` middleware.

@@ -829,3 +835,5 @@ // https://github.com/floating-ui/floating-ui/issues/1740

}
resizeObserver.observe(floating);
if (floating) {
resizeObserver.observe(floating);
}
}

@@ -832,0 +840,0 @@ let frameId;

@@ -10,2 +10,3 @@ import { AlignedPlacement } from '@floating-ui/core';

import { Coords } from '@floating-ui/core';
import type { detectOverflow as detectOverflow_2 } from '@floating-ui/core';
import type { DetectOverflowOptions as DetectOverflowOptions_2 } from '@floating-ui/core';

@@ -68,3 +69,3 @@ import { Dimensions } from '@floating-ui/core';

*/
export declare function autoUpdate(reference: ReferenceElement, floating: FloatingElement, update: () => void, options?: AutoUpdateOptions): () => void;
export declare function autoUpdate(reference: ReferenceElement, floating: FloatingElement | null, update: () => void, options?: AutoUpdateOptions): () => void;

@@ -297,2 +298,3 @@ export declare interface AutoUpdateOptions {

}>;
detectOverflow?: typeof detectOverflow_2;
}

@@ -299,0 +301,0 @@

@@ -10,2 +10,3 @@ import { AlignedPlacement } from '@floating-ui/core';

import { Coords } from '@floating-ui/core';
import type { detectOverflow as detectOverflow_2 } from '@floating-ui/core';
import type { DetectOverflowOptions as DetectOverflowOptions_2 } from '@floating-ui/core';

@@ -68,3 +69,3 @@ import { Dimensions } from '@floating-ui/core';

*/
export declare function autoUpdate(reference: ReferenceElement, floating: FloatingElement, update: () => void, options?: AutoUpdateOptions): () => void;
export declare function autoUpdate(reference: ReferenceElement, floating: FloatingElement | null, update: () => void, options?: AutoUpdateOptions): () => void;

@@ -297,2 +298,3 @@ export declare interface AutoUpdateOptions {

}>;
detectOverflow?: typeof detectOverflow_2;
}

@@ -299,0 +301,0 @@

@@ -177,3 +177,3 @@ import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';

}
if (isHTMLElement(offsetParent)) {
if (isOffsetParentAnElement) {
const offsetRect = getBoundingClientRect(offsetParent);

@@ -266,3 +266,2 @@ scale = getScale(offsetParent);

const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
// Returns the inner client rect, subtracting scrollbars if present.

@@ -332,3 +331,3 @@ function getInnerBoundingClientRect(element, strategy) {

}
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
if (shouldDropCurrentNode) {

@@ -358,16 +357,19 @@ // Drop non-containing blocks.

const clippingAncestors = [...elementClippingAncestors, rootBoundary];
const firstClippingAncestor = clippingAncestors[0];
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
accRect.top = max(rect.top, accRect.top);
accRect.right = min(rect.right, accRect.right);
accRect.bottom = min(rect.bottom, accRect.bottom);
accRect.left = max(rect.left, accRect.left);
return accRect;
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
let top = firstRect.top;
let right = firstRect.right;
let bottom = firstRect.bottom;
let left = firstRect.left;
for (let i = 1; i < clippingAncestors.length; i++) {
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
top = max(rect.top, top);
right = min(rect.right, right);
bottom = min(rect.bottom, bottom);
left = max(rect.left, left);
}
return {
width: clippingRect.right - clippingRect.left,
height: clippingRect.bottom - clippingRect.top,
x: clippingRect.left,
y: clippingRect.top
width: right - left,
height: bottom - top,
x: left,
y: top
};

@@ -623,3 +625,3 @@ }

const referenceEl = unwrapElement(reference);
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
ancestors.forEach(ancestor => {

@@ -637,3 +639,3 @@ ancestorScroll && ancestor.addEventListener('scroll', update, {

let [firstEntry] = _ref;
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
// Prevent update loops when using the `size` middleware.

@@ -653,3 +655,5 @@ // https://github.com/floating-ui/floating-ui/issues/1740

}
resizeObserver.observe(floating);
if (floating) {
resizeObserver.observe(floating);
}
}

@@ -656,0 +660,0 @@ let frameId;

@@ -177,3 +177,3 @@ import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';

}
if (isHTMLElement(offsetParent)) {
if (isOffsetParentAnElement) {
const offsetRect = getBoundingClientRect(offsetParent);

@@ -266,3 +266,2 @@ scale = getScale(offsetParent);

const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
// Returns the inner client rect, subtracting scrollbars if present.

@@ -332,3 +331,3 @@ function getInnerBoundingClientRect(element, strategy) {

}
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
if (shouldDropCurrentNode) {

@@ -358,16 +357,19 @@ // Drop non-containing blocks.

const clippingAncestors = [...elementClippingAncestors, rootBoundary];
const firstClippingAncestor = clippingAncestors[0];
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
accRect.top = max(rect.top, accRect.top);
accRect.right = min(rect.right, accRect.right);
accRect.bottom = min(rect.bottom, accRect.bottom);
accRect.left = max(rect.left, accRect.left);
return accRect;
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
let top = firstRect.top;
let right = firstRect.right;
let bottom = firstRect.bottom;
let left = firstRect.left;
for (let i = 1; i < clippingAncestors.length; i++) {
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
top = max(rect.top, top);
right = min(rect.right, right);
bottom = min(rect.bottom, bottom);
left = max(rect.left, left);
}
return {
width: clippingRect.right - clippingRect.left,
height: clippingRect.bottom - clippingRect.top,
x: clippingRect.left,
y: clippingRect.top
width: right - left,
height: bottom - top,
x: left,
y: top
};

@@ -623,3 +625,3 @@ }

const referenceEl = unwrapElement(reference);
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
ancestors.forEach(ancestor => {

@@ -637,3 +639,3 @@ ancestorScroll && ancestor.addEventListener('scroll', update, {

let [firstEntry] = _ref;
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
// Prevent update loops when using the `size` middleware.

@@ -653,3 +655,5 @@ // https://github.com/floating-ui/floating-ui/issues/1740

}
resizeObserver.observe(floating);
if (floating) {
resizeObserver.observe(floating);
}
}

@@ -656,0 +660,0 @@ let frameId;

@@ -65,3 +65,2 @@ (function (global, factory) {

}
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
function isOverflowElement(element) {

@@ -74,23 +73,26 @@ const {

} = getComputedStyle$1(element);
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
}
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
function isTableElement(element) {
return tableElements.has(getNodeName(element));
return /^(table|td|th)$/.test(getNodeName(element));
}
const topLayerSelectors = [':popover-open', ':modal'];
function isTopLayer(element) {
return topLayerSelectors.some(selector => {
try {
return element.matches(selector);
} catch (_e) {
return false;
try {
if (element.matches(':popover-open')) {
return true;
}
});
} catch (_e) {
// no-op
}
try {
return element.matches(':modal');
} catch (_e) {
return false;
}
}
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
const containValues = ['paint', 'layout', 'strict', 'content'];
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
const containRe = /paint|layout|strict|content/;
const isNotNone = value => !!value && value !== 'none';
let isWebKitValue;
function isContainingBlock(elementOrCss) {
const webkit = isWebKit();
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;

@@ -100,3 +102,3 @@

// https://drafts.csswg.org/css-transforms-2/#individual-transforms
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
}

@@ -116,8 +118,9 @@ function getContainingBlock(element) {

function isWebKit() {
if (typeof CSS === 'undefined' || !CSS.supports) return false;
return CSS.supports('-webkit-backdrop-filter', 'none');
if (isWebKitValue == null) {
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
}
return isWebKitValue;
}
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
function isLastTraversableNode(node) {
return lastTraversableNodeNames.has(getNodeName(node));
return /^(html|body|#document)$/.test(getNodeName(node));
}

@@ -178,4 +181,5 @@ function getComputedStyle$1(element) {

return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
} else {
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
}
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
}

@@ -357,3 +361,3 @@ function getFrameElement(win) {

}
if (isHTMLElement(offsetParent)) {
if (isOffsetParentAnElement) {
const offsetRect = getBoundingClientRect(offsetParent);

@@ -446,3 +450,2 @@ scale = getScale(offsetParent);

const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
// Returns the inner client rect, subtracting scrollbars if present.

@@ -512,3 +515,3 @@ function getInnerBoundingClientRect(element, strategy) {

}
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
if (shouldDropCurrentNode) {

@@ -538,16 +541,19 @@ // Drop non-containing blocks.

const clippingAncestors = [...elementClippingAncestors, rootBoundary];
const firstClippingAncestor = clippingAncestors[0];
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
accRect.top = max(rect.top, accRect.top);
accRect.right = min(rect.right, accRect.right);
accRect.bottom = min(rect.bottom, accRect.bottom);
accRect.left = max(rect.left, accRect.left);
return accRect;
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
let top = firstRect.top;
let right = firstRect.right;
let bottom = firstRect.bottom;
let left = firstRect.left;
for (let i = 1; i < clippingAncestors.length; i++) {
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
top = max(rect.top, top);
right = min(rect.right, right);
bottom = min(rect.bottom, bottom);
left = max(rect.left, left);
}
return {
width: clippingRect.right - clippingRect.left,
height: clippingRect.bottom - clippingRect.top,
x: clippingRect.left,
y: clippingRect.top
width: right - left,
height: bottom - top,
x: left,
y: top
};

@@ -803,3 +809,3 @@ }

const referenceEl = unwrapElement(reference);
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
ancestors.forEach(ancestor => {

@@ -817,3 +823,3 @@ ancestorScroll && ancestor.addEventListener('scroll', update, {

let [firstEntry] = _ref;
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
// Prevent update loops when using the `size` middleware.

@@ -833,3 +839,5 @@ // https://github.com/floating-ui/floating-ui/issues/1740

}
resizeObserver.observe(floating);
if (floating) {
resizeObserver.observe(floating);
}
}

@@ -836,0 +844,0 @@ let frameId;

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@floating-ui/core")):"function"==typeof define&&define.amd?define(["exports","@floating-ui/core"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUIDOM={},t.FloatingUICore)}(this,(function(t,e){"use strict";const n=Math.min,o=Math.max,i=Math.round,r=Math.floor,c=t=>({x:t,y:t});function l(){return"undefined"!=typeof window}function s(t){return a(t)?(t.nodeName||"").toLowerCase():"#document"}function f(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function u(t){var e;return null==(e=(a(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function a(t){return!!l()&&(t instanceof Node||t instanceof f(t).Node)}function d(t){return!!l()&&(t instanceof Element||t instanceof f(t).Element)}function h(t){return!!l()&&(t instanceof HTMLElement||t instanceof f(t).HTMLElement)}function p(t){return!(!l()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof f(t).ShadowRoot)}const g=new Set(["inline","contents"]);function m(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=E(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!g.has(i)}const y=new Set(["table","td","th"]);function w(t){return y.has(s(t))}const x=[":popover-open",":modal"];function v(t){return x.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}const b=["transform","translate","scale","rotate","perspective"],T=["transform","translate","scale","rotate","perspective","filter"],L=["paint","layout","strict","content"];function R(t){const e=S(),n=d(t)?E(t):t;return b.some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||T.some((t=>(n.willChange||"").includes(t)))||L.some((t=>(n.contain||"").includes(t)))}function S(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const C=new Set(["html","body","#document"]);function F(t){return C.has(s(t))}function E(t){return f(t).getComputedStyle(t)}function O(t){return d(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function D(t){if("html"===s(t))return t;const e=t.assignedSlot||t.parentNode||p(t)&&t.host||u(t);return p(e)?e.host:e}function W(t){const e=D(t);return F(e)?t.ownerDocument?t.ownerDocument.body:t.body:h(e)&&m(e)?e:W(e)}function M(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=W(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),c=f(i);if(r){const t=H(c);return e.concat(c,c.visualViewport||[],m(i)?i:[],t&&n?M(t):[])}return e.concat(i,M(i,[],n))}function H(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function P(t){const e=E(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=h(t),c=r?t.offsetWidth:n,l=r?t.offsetHeight:o,s=i(n)!==c||i(o)!==l;return s&&(n=c,o=l),{width:n,height:o,$:s}}function z(t){return d(t)?t:t.contextElement}function A(t){const e=z(t);if(!h(e))return c(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:l}=P(e);let s=(l?i(n.width):n.width)/o,f=(l?i(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),f&&Number.isFinite(f)||(f=1),{x:s,y:f}}const B=c(0);function V(t){const e=f(t);return S()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:B}function N(t,n,o,i){void 0===n&&(n=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),l=z(t);let s=c(1);n&&(i?d(i)&&(s=A(i)):s=A(t));const u=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==f(t))&&e}(l,o,i)?V(l):c(0);let a=(r.left+u.x)/s.x,h=(r.top+u.y)/s.y,p=r.width/s.x,g=r.height/s.y;if(l){const t=f(l),e=i&&d(i)?f(i):i;let n=t,o=H(n);for(;o&&i&&e!==n;){const t=A(o),e=o.getBoundingClientRect(),i=E(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,c=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,h*=t.y,p*=t.x,g*=t.y,a+=r,h+=c,n=f(o),o=H(n)}}return e.rectToClientRect({width:p,height:g,x:a,y:h})}function I(t,e){const n=O(t).scrollLeft;return e?e.left+n:N(u(t)).left+n}function k(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-I(t,n),y:n.top+e.scrollTop}}const q=new Set(["absolute","fixed"]);function U(t,n,i){let r;if("viewport"===n)r=function(t,e){const n=f(t),o=u(t),i=n.visualViewport;let r=o.clientWidth,c=o.clientHeight,l=0,s=0;if(i){r=i.width,c=i.height;const t=S();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,s=i.offsetTop)}const a=I(o);if(a<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,c=Math.abs(o.clientWidth-e.clientWidth-i);c<=25&&(r-=c)}else a<=25&&(r+=a);return{width:r,height:c,x:l,y:s}}(t,i);else if("document"===n)r=function(t){const e=u(t),n=O(t),i=t.ownerDocument.body,r=o(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),c=o(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let l=-n.scrollLeft+I(t);const s=-n.scrollTop;return"rtl"===E(i).direction&&(l+=o(e.clientWidth,i.clientWidth)-r),{width:r,height:c,x:l,y:s}}(u(t));else if(d(n))r=function(t,e){const n=N(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=h(t)?A(t):c(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(n,i);else{const e=V(t);r={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return e.rectToClientRect(r)}function j(t,e){const n=D(t);return!(n===e||!d(n)||F(n))&&("fixed"===E(n).position||j(n,e))}function X(t,e,n){const o=h(e),i=u(e),r="fixed"===n,l=N(t,!0,r,e);let f={scrollLeft:0,scrollTop:0};const a=c(0);function d(){a.x=I(i)}if(o||!o&&!r)if(("body"!==s(e)||m(i))&&(f=O(e)),o){const t=N(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else i&&d();r&&!o&&i&&d();const p=!i||o||r?c(0):k(i,f);return{x:l.left+f.scrollLeft-a.x-p.x,y:l.top+f.scrollTop-a.y-p.y,width:l.width,height:l.height}}function Y(t){return"static"===E(t).position}function $(t,e){if(!h(t)||"fixed"===E(t).position)return null;if(e)return e(t);let n=t.offsetParent;return u(t)===n&&(n=n.ownerDocument.body),n}function _(t,e){const n=f(t);if(v(t))return n;if(!h(t)){let e=D(t);for(;e&&!F(e);){if(d(e)&&!Y(e))return e;e=D(e)}return n}let o=$(t,e);for(;o&&w(o)&&Y(o);)o=$(o,e);return o&&F(o)&&Y(o)&&!R(o)?n:o||function(t){let e=D(t);for(;h(e)&&!F(e);){if(R(e))return e;if(v(e))return null;e=D(e)}return null}(t)||n}const G={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,l=u(o),f=!!e&&v(e.floating);if(o===l||f&&r)return n;let a={scrollLeft:0,scrollTop:0},d=c(1);const p=c(0),g=h(o);if((g||!g&&!r)&&(("body"!==s(o)||m(l))&&(a=O(o)),h(o))){const t=N(o);d=A(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const y=!l||g||r?c(0):k(l,a);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-a.scrollLeft*d.x+p.x+y.x,y:n.y*d.y-a.scrollTop*d.y+p.y+y.y}},getDocumentElement:u,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:r,strategy:c}=t;const l=[..."clippingAncestors"===i?v(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=M(t,[],!1).filter((t=>d(t)&&"body"!==s(t))),i=null;const r="fixed"===E(t).position;let c=r?D(t):t;for(;d(c)&&!F(c);){const e=E(c),n=R(c);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&q.has(i.position)||m(c)&&!n&&j(t,c))?o=o.filter((t=>t!==c)):i=e,c=D(c)}return e.set(t,o),o}(e,this._c):[].concat(i),r],f=l[0],u=l.reduce(((t,i)=>{const r=U(e,i,c);return t.top=o(r.top,t.top),t.right=n(r.right,t.right),t.bottom=n(r.bottom,t.bottom),t.left=o(r.left,t.left),t}),U(e,f,c));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:_,getElementRects:async function(t){const e=this.getOffsetParent||_,n=this.getDimensions,o=await n(t.floating);return{reference:X(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=P(t);return{width:e,height:n}},getScale:A,isElement:d,isRTL:function(t){return"rtl"===E(t).direction}};function J(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const K=e.detectOverflow,Q=e.offset,Z=e.autoPlacement,tt=e.shift,et=e.flip,nt=e.size,ot=e.hide,it=e.arrow,rt=e.inline,ct=e.limitShift;t.arrow=it,t.autoPlacement=Z,t.autoUpdate=function(t,e,i,c){void 0===c&&(c={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:f="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:d=!1}=c,h=z(t),p=l||s?[...h?M(h):[],...M(e)]:[];p.forEach((t=>{l&&t.addEventListener("scroll",i,{passive:!0}),s&&t.addEventListener("resize",i)}));const g=h&&a?function(t,e){let i,c=null;const l=u(t);function s(){var t;clearTimeout(i),null==(t=c)||t.disconnect(),c=null}return function f(u,a){void 0===u&&(u=!1),void 0===a&&(a=1),s();const d=t.getBoundingClientRect(),{left:h,top:p,width:g,height:m}=d;if(u||e(),!g||!m)return;const y={rootMargin:-r(p)+"px "+-r(l.clientWidth-(h+g))+"px "+-r(l.clientHeight-(p+m))+"px "+-r(h)+"px",threshold:o(0,n(1,a))||1};let w=!0;function x(e){const n=e[0].intersectionRatio;if(n!==a){if(!w)return f();n?f(!1,n):i=setTimeout((()=>{f(!1,1e-7)}),1e3)}1!==n||J(d,t.getBoundingClientRect())||f(),w=!1}try{c=new IntersectionObserver(x,{...y,root:l.ownerDocument})}catch(t){c=new IntersectionObserver(x,y)}c.observe(t)}(!0),s}(h,i):null;let m,y=-1,w=null;f&&(w=new ResizeObserver((t=>{let[n]=t;n&&n.target===h&&w&&(w.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(e)}))),i()})),h&&!d&&w.observe(h),w.observe(e));let x=d?N(t):null;return d&&function e(){const n=N(t);x&&!J(x,n)&&i();x=n,m=requestAnimationFrame(e)}(),i(),()=>{var t;p.forEach((t=>{l&&t.removeEventListener("scroll",i),s&&t.removeEventListener("resize",i)})),null==g||g(),null==(t=w)||t.disconnect(),w=null,d&&cancelAnimationFrame(m)}},t.computePosition=(t,n,o)=>{const i=new Map,r={platform:G,...o},c={...r.platform,_c:i};return e.computePosition(t,n,{...r,platform:c})},t.detectOverflow=K,t.flip=et,t.getOverflowAncestors=M,t.hide=ot,t.inline=rt,t.limitShift=ct,t.offset=Q,t.platform=G,t.shift=tt,t.size=nt}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@floating-ui/core")):"function"==typeof define&&define.amd?define(["exports","@floating-ui/core"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUIDOM={},t.FloatingUICore)}(this,(function(t,e){"use strict";const n=Math.min,o=Math.max,i=Math.round,r=Math.floor,c=t=>({x:t,y:t});function l(){return"undefined"!=typeof window}function s(t){return a(t)?(t.nodeName||"").toLowerCase():"#document"}function f(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function u(t){var e;return null==(e=(a(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function a(t){return!!l()&&(t instanceof Node||t instanceof f(t).Node)}function d(t){return!!l()&&(t instanceof Element||t instanceof f(t).Element)}function h(t){return!!l()&&(t instanceof HTMLElement||t instanceof f(t).HTMLElement)}function p(t){return!(!l()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof f(t).ShadowRoot)}function g(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=C(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==i&&"contents"!==i}function m(t){return/^(table|td|th)$/.test(s(t))}function y(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const w=/transform|translate|scale|rotate|perspective|filter/,x=/paint|layout|strict|content/,v=t=>!!t&&"none"!==t;let b;function L(t){const e=d(t)?C(t):t;return v(e.transform)||v(e.translate)||v(e.scale)||v(e.rotate)||v(e.perspective)||!R()&&(v(e.backdropFilter)||v(e.filter))||w.test(e.willChange||"")||x.test(e.contain||"")}function R(){return null==b&&(b="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),b}function T(t){return/^(html|body|#document)$/.test(s(t))}function C(t){return f(t).getComputedStyle(t)}function S(t){return d(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function E(t){if("html"===s(t))return t;const e=t.assignedSlot||t.parentNode||p(t)&&t.host||u(t);return p(e)?e.host:e}function F(t){const e=E(t);return T(e)?t.ownerDocument?t.ownerDocument.body:t.body:h(e)&&g(e)?e:F(e)}function O(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=F(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),c=f(i);if(r){const t=D(c);return e.concat(c,c.visualViewport||[],g(i)?i:[],t&&n?O(t):[])}return e.concat(i,O(i,[],n))}function D(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function W(t){const e=C(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=h(t),c=r?t.offsetWidth:n,l=r?t.offsetHeight:o,s=i(n)!==c||i(o)!==l;return s&&(n=c,o=l),{width:n,height:o,$:s}}function M(t){return d(t)?t:t.contextElement}function H(t){const e=M(t);if(!h(e))return c(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:l}=W(e);let s=(l?i(n.width):n.width)/o,f=(l?i(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),f&&Number.isFinite(f)||(f=1),{x:s,y:f}}const P=c(0);function z(t){const e=f(t);return R()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:P}function A(t,n,o,i){void 0===n&&(n=!1),void 0===o&&(o=!1);const r=t.getBoundingClientRect(),l=M(t);let s=c(1);n&&(i?d(i)&&(s=H(i)):s=H(t));const u=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==f(t))&&e}(l,o,i)?z(l):c(0);let a=(r.left+u.x)/s.x,h=(r.top+u.y)/s.y,p=r.width/s.x,g=r.height/s.y;if(l){const t=f(l),e=i&&d(i)?f(i):i;let n=t,o=D(n);for(;o&&i&&e!==n;){const t=H(o),e=o.getBoundingClientRect(),i=C(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,c=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;a*=t.x,h*=t.y,p*=t.x,g*=t.y,a+=r,h+=c,n=f(o),o=D(n)}}return e.rectToClientRect({width:p,height:g,x:a,y:h})}function B(t,e){const n=S(t).scrollLeft;return e?e.left+n:A(u(t)).left+n}function V(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-B(t,n),y:n.top+e.scrollTop}}function N(t,n,i){let r;if("viewport"===n)r=function(t,e){const n=f(t),o=u(t),i=n.visualViewport;let r=o.clientWidth,c=o.clientHeight,l=0,s=0;if(i){r=i.width,c=i.height;const t=R();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,s=i.offsetTop)}const a=B(o);if(a<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,c=Math.abs(o.clientWidth-e.clientWidth-i);c<=25&&(r-=c)}else a<=25&&(r+=a);return{width:r,height:c,x:l,y:s}}(t,i);else if("document"===n)r=function(t){const e=u(t),n=S(t),i=t.ownerDocument.body,r=o(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),c=o(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let l=-n.scrollLeft+B(t);const s=-n.scrollTop;return"rtl"===C(i).direction&&(l+=o(e.clientWidth,i.clientWidth)-r),{width:r,height:c,x:l,y:s}}(u(t));else if(d(n))r=function(t,e){const n=A(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=h(t)?H(t):c(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(n,i);else{const e=z(t);r={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return e.rectToClientRect(r)}function I(t,e){const n=E(t);return!(n===e||!d(n)||T(n))&&("fixed"===C(n).position||I(n,e))}function $(t,e,n){const o=h(e),i=u(e),r="fixed"===n,l=A(t,!0,r,e);let f={scrollLeft:0,scrollTop:0};const a=c(0);function d(){a.x=B(i)}if(o||!o&&!r)if(("body"!==s(e)||g(i))&&(f=S(e)),o){const t=A(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else i&&d();r&&!o&&i&&d();const p=!i||o||r?c(0):V(i,f);return{x:l.left+f.scrollLeft-a.x-p.x,y:l.top+f.scrollTop-a.y-p.y,width:l.width,height:l.height}}function k(t){return"static"===C(t).position}function q(t,e){if(!h(t)||"fixed"===C(t).position)return null;if(e)return e(t);let n=t.offsetParent;return u(t)===n&&(n=n.ownerDocument.body),n}function U(t,e){const n=f(t);if(y(t))return n;if(!h(t)){let e=E(t);for(;e&&!T(e);){if(d(e)&&!k(e))return e;e=E(e)}return n}let o=q(t,e);for(;o&&m(o)&&k(o);)o=q(o,e);return o&&T(o)&&k(o)&&!L(o)?n:o||function(t){let e=E(t);for(;h(e)&&!T(e);){if(L(e))return e;if(y(e))return null;e=E(e)}return null}(t)||n}const j={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,l=u(o),f=!!e&&y(e.floating);if(o===l||f&&r)return n;let a={scrollLeft:0,scrollTop:0},d=c(1);const p=c(0),m=h(o);if((m||!m&&!r)&&(("body"!==s(o)||g(l))&&(a=S(o)),m)){const t=A(o);d=H(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const w=!l||m||r?c(0):V(l,a);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-a.scrollLeft*d.x+p.x+w.x,y:n.y*d.y-a.scrollTop*d.y+p.y+w.y}},getDocumentElement:u,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:r,strategy:c}=t;const l=[..."clippingAncestors"===i?y(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=O(t,[],!1).filter((t=>d(t)&&"body"!==s(t))),i=null;const r="fixed"===C(t).position;let c=r?E(t):t;for(;d(c)&&!T(c);){const e=C(c),n=L(c);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&("absolute"===i.position||"fixed"===i.position)||g(c)&&!n&&I(t,c))?o=o.filter((t=>t!==c)):i=e,c=E(c)}return e.set(t,o),o}(e,this._c):[].concat(i),r],f=N(e,l[0],c);let u=f.top,a=f.right,h=f.bottom,p=f.left;for(let t=1;t<l.length;t++){const i=N(e,l[t],c);u=o(i.top,u),a=n(i.right,a),h=n(i.bottom,h),p=o(i.left,p)}return{width:a-p,height:h-u,x:p,y:u}},getOffsetParent:U,getElementRects:async function(t){const e=this.getOffsetParent||U,n=this.getDimensions,o=await n(t.floating);return{reference:$(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=W(t);return{width:e,height:n}},getScale:H,isElement:d,isRTL:function(t){return"rtl"===C(t).direction}};function X(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Y=e.detectOverflow,_=e.offset,G=e.autoPlacement,J=e.shift,K=e.flip,Q=e.size,Z=e.hide,tt=e.arrow,et=e.inline,nt=e.limitShift;t.arrow=tt,t.autoPlacement=G,t.autoUpdate=function(t,e,i,c){void 0===c&&(c={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:f="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:d=!1}=c,h=M(t),p=l||s?[...h?O(h):[],...e?O(e):[]]:[];p.forEach((t=>{l&&t.addEventListener("scroll",i,{passive:!0}),s&&t.addEventListener("resize",i)}));const g=h&&a?function(t,e){let i,c=null;const l=u(t);function s(){var t;clearTimeout(i),null==(t=c)||t.disconnect(),c=null}return function f(u,a){void 0===u&&(u=!1),void 0===a&&(a=1),s();const d=t.getBoundingClientRect(),{left:h,top:p,width:g,height:m}=d;if(u||e(),!g||!m)return;const y={rootMargin:-r(p)+"px "+-r(l.clientWidth-(h+g))+"px "+-r(l.clientHeight-(p+m))+"px "+-r(h)+"px",threshold:o(0,n(1,a))||1};let w=!0;function x(e){const n=e[0].intersectionRatio;if(n!==a){if(!w)return f();n?f(!1,n):i=setTimeout((()=>{f(!1,1e-7)}),1e3)}1!==n||X(d,t.getBoundingClientRect())||f(),w=!1}try{c=new IntersectionObserver(x,{...y,root:l.ownerDocument})}catch(t){c=new IntersectionObserver(x,y)}c.observe(t)}(!0),s}(h,i):null;let m,y=-1,w=null;f&&(w=new ResizeObserver((t=>{let[n]=t;n&&n.target===h&&w&&e&&(w.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=w)||t.observe(e)}))),i()})),h&&!d&&w.observe(h),e&&w.observe(e));let x=d?A(t):null;return d&&function e(){const n=A(t);x&&!X(x,n)&&i();x=n,m=requestAnimationFrame(e)}(),i(),()=>{var t;p.forEach((t=>{l&&t.removeEventListener("scroll",i),s&&t.removeEventListener("resize",i)})),null==g||g(),null==(t=w)||t.disconnect(),w=null,d&&cancelAnimationFrame(m)}},t.computePosition=(t,n,o)=>{const i=new Map,r={platform:j,...o},c={...r.platform,_c:i};return e.computePosition(t,n,{...r,platform:c})},t.detectOverflow=Y,t.flip=K,t.getOverflowAncestors=O,t.hide=Z,t.inline=et,t.limitShift=nt,t.offset=_,t.platform=j,t.shift=J,t.size=Q}));
{
"name": "@floating-ui/dom",
"version": "1.7.5",
"version": "1.7.6",
"description": "Floating UI for the web",

@@ -46,4 +46,4 @@ "publishConfig": {

"dependencies": {
"@floating-ui/core": "^1.7.4",
"@floating-ui/utils": "^0.2.10"
"@floating-ui/core": "^1.7.5",
"@floating-ui/utils": "^0.2.11"
},

@@ -50,0 +50,0 @@ "devDependencies": {