import{r as gt}from"./index.e-PyN7Ce.js";function $(){return typeof window<"u"}function V(t){return st(t)?(t.nodeName||"").toLowerCase():"#document"}function b(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function T(t){var e;return(e=(st(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function st(t){return $()?t instanceof Node||t instanceof b(t).Node:!1}function C(t){return $()?t instanceof Element||t instanceof b(t).Element:!1}function E(t){return $()?t instanceof HTMLElement||t instanceof b(t).HTMLElement:!1}function tt(t){return!$()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof b(t).ShadowRoot}const pt=new Set(["inline","contents"]);function W(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=A(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!pt.has(i)}const wt=new Set(["table","td","th"]);function xt(t){return wt.has(V(t))}const yt=[":popover-open",":modal"];function z(t){return yt.some(e=>{try{return t.matches(e)}catch{return!1}})}const vt=["transform","translate","scale","rotate","perspective"],bt=["transform","translate","scale","rotate","perspective","filter"],Rt=["paint","layout","strict","content"];function U(t){const e=K(),o=C(t)?A(t):t;return vt.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||bt.some(n=>(o.willChange||"").includes(n))||Rt.some(n=>(o.contain||"").includes(n))}function Ct(t){let e=L(t);for(;E(e)&&!N(e);){if(U(e))return e;if(z(e))return null;e=L(e)}return null}function K(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const At=new Set(["html","body","#document"]);function N(t){return At.has(V(t))}function A(t){return b(t).getComputedStyle(t)}function I(t){return C(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function L(t){if(V(t)==="html")return t;const e=t.assignedSlot||t.parentNode||tt(t)&&t.host||T(t);return tt(e)?e.host:e}function rt(t){const e=L(t);return N(e)?t.ownerDocument?t.ownerDocument.body:t.body:E(e)&&W(e)?e:rt(e)}function B(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=rt(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),s=b(i);if(r){const c=X(s);return e.concat(s,s.visualViewport||[],W(i)?i:[],c&&o?B(c):[])}return e.concat(i,B(i,[],o))}function X(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const H=Math.min,S=Math.max,P=Math.round,k=Math.floor,O=t=>({x:t,y:t});function et(t,e,o){return S(t,H(e,o))}function G(t,e){return typeof t=="function"?t(e):t}function j(t){return t.split("-")[0]}function ct(t){return t.split("-")[1]}function lt(t){return t==="x"?"y":"x"}function Ot(t){return t==="y"?"height":"width"}const Et=new Set(["top","bottom"]);function q(t){return Et.has(j(t))?"y":"x"}function Tt(t){return lt(q(t))}function Lt(t){return{top:0,right:0,bottom:0,left:0,...t}}function St(t){return typeof t!="number"?Lt(t):{top:t,right:t,bottom:t,left:t}}function _(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}var Zt=gt();function nt(t,e,o){let{reference:n,floating:i}=t;const r=q(e),s=Tt(e),c=Ot(s),l=j(e),f=r==="y",d=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,h=n[c]/2-i[c]/2;let a;switch(l){case"top":a={x:d,y:n.y-i.height};break;case"bottom":a={x:d,y:n.y+n.height};break;case"right":a={x:n.x+n.width,y:u};break;case"left":a={x:n.x-i.width,y:u};break;default:a={x:n.x,y:n.y}}switch(ct(e)){case"start":a[s]-=h*(o&&f?-1:1);break;case"end":a[s]+=h*(o&&f?-1:1);break}return a}const Dt=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:s}=o,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=nt(f,n,l),h=n,a={},g=0;for(let p=0;p{let{x:m,y:x}=w;return{x:m,y:x}}},...l}=G(t,e),f={x:o,y:n},d=await Ft(e,l),u=q(j(i)),h=lt(u);let a=f[h],g=f[u];if(r){const w=h==="y"?"top":"left",m=h==="y"?"bottom":"right",x=a+d[w],y=a-d[m];a=et(x,a,y)}if(s){const w=u==="y"?"top":"left",m=u==="y"?"bottom":"right",x=g+d[w],y=g-d[m];g=et(x,g,y)}const p=c.fn({...e,[h]:a,[u]:g});return{...p,data:{x:p.x-o,y:p.y-n,enabled:{[h]:r,[u]:s}}}}}};function ft(t){const e=A(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=E(t),r=i?t.offsetWidth:o,s=i?t.offsetHeight:n,c=P(o)!==r||P(n)!==s;return c&&(o=r,n=s),{width:o,height:n,$:c}}function J(t){return C(t)?t:t.contextElement}function F(t){const e=J(t);if(!E(e))return O(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:r}=ft(e);let s=(r?P(o.width):o.width)/n,c=(r?P(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Mt=O(0);function at(t){const e=b(t);return!K()||!e.visualViewport?Mt:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function kt(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==b(t)?!1:e}function D(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),r=J(t);let s=O(1);e&&(n?C(n)&&(s=F(n)):s=F(t));const c=kt(r,o,n)?at(r):O(0);let l=(i.left+c.x)/s.x,f=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){const h=b(r),a=n&&C(n)?b(n):n;let g=h,p=X(g);for(;p&&n&&a!==g;){const w=F(p),m=p.getBoundingClientRect(),x=A(p),y=m.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,R=m.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,f*=w.y,d*=w.x,u*=w.y,l+=y,f+=R,g=b(p),p=X(g)}}return _({width:d,height:u,x:l,y:f})}function Q(t,e){const o=I(t).scrollLeft;return e?e.left+o:D(T(t)).left+o}function ut(t,e,o){o===void 0&&(o=!1);const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-(o?0:Q(t,n)),r=n.top+e.scrollTop;return{x:i,y:r}}function Ht(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const r=i==="fixed",s=T(n),c=e?z(e.floating):!1;if(n===s||c&&r)return o;let l={scrollLeft:0,scrollTop:0},f=O(1);const d=O(0),u=E(n);if((u||!u&&!r)&&((V(n)!=="body"||W(s))&&(l=I(n)),E(n))){const a=D(n);f=F(n),d.x=a.x+n.clientLeft,d.y=a.y+n.clientTop}const h=s&&!u&&!r?ut(s,l,!0):O(0);return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-l.scrollLeft*f.x+d.x+h.x,y:o.y*f.y-l.scrollTop*f.y+d.y+h.y}}function Pt(t){return Array.from(t.getClientRects())}function _t(t){const e=T(t),o=I(t),n=t.ownerDocument.body,i=S(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=S(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+Q(t);const c=-o.scrollTop;return A(n).direction==="rtl"&&(s+=S(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:c}}function $t(t,e){const o=b(t),n=T(t),i=o.visualViewport;let r=n.clientWidth,s=n.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;const f=K();(!f||f&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:c,y:l}}const zt=new Set(["absolute","fixed"]);function It(t,e){const o=D(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,r=E(t)?F(t):O(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,f=n*r.y;return{width:s,height:c,x:l,y:f}}function ot(t,e,o){let n;if(e==="viewport")n=$t(t,o);else if(e==="document")n=_t(T(t));else if(C(e))n=It(e,o);else{const i=at(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return _(n)}function dt(t,e){const o=L(t);return o===e||!C(o)||N(o)?!1:A(o).position==="fixed"||dt(o,e)}function jt(t,e){const o=e.get(t);if(o)return o;let n=B(t,[],!1).filter(c=>C(c)&&V(c)!=="body"),i=null;const r=A(t).position==="fixed";let s=r?L(t):t;for(;C(s)&&!N(s);){const c=A(s),l=U(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&zt.has(i.position)||W(s)&&!l&&dt(t,s))?n=n.filter(d=>d!==s):i=c,s=L(s)}return e.set(t,n),n}function qt(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const s=[...o==="clippingAncestors"?z(e)?[]:jt(e,this._c):[].concat(o),n],c=s[0],l=s.reduce((f,d)=>{const u=ot(e,d,i);return f.top=S(u.top,f.top),f.right=H(u.right,f.right),f.bottom=H(u.bottom,f.bottom),f.left=S(u.left,f.left),f},ot(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Yt(t){const{width:e,height:o}=ft(t);return{width:e,height:o}}function Xt(t,e,o){const n=E(e),i=T(e),r=o==="fixed",s=D(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=O(0);function f(){l.x=Q(i)}if(n||!n&&!r)if((V(e)!=="body"||W(i))&&(c=I(e)),n){const a=D(e,!0,r,e);l.x=a.x+e.clientLeft,l.y=a.y+e.clientTop}else i&&f();r&&!n&&i&&f();const d=i&&!n&&!r?ut(i,c):O(0),u=s.left+c.scrollLeft-l.x-d.x,h=s.top+c.scrollTop-l.y-d.y;return{x:u,y:h,width:s.width,height:s.height}}function Y(t){return A(t).position==="static"}function it(t,e){if(!E(t)||A(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return T(t)===o&&(o=o.ownerDocument.body),o}function ht(t,e){const o=b(t);if(z(t))return o;if(!E(t)){let i=L(t);for(;i&&!N(i);){if(C(i)&&!Y(i))return i;i=L(i)}return o}let n=it(t,e);for(;n&&xt(n)&&Y(n);)n=it(n,e);return n&&N(n)&&Y(n)&&!U(n)?o:n||Ct(t)||o}const Ut=async function(t){const e=this.getOffsetParent||ht,o=this.getDimensions,n=await o(t.floating);return{reference:Xt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Kt(t){return A(t).direction==="rtl"}const Gt={convertOffsetParentRelativeRectToViewportRelativeRect:Ht,getDocumentElement:T,getClippingRect:qt,getOffsetParent:ht,getElementRects:Ut,getClientRects:Pt,getDimensions:Yt,getScale:F,isElement:C,isRTL:Kt};function mt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Jt(t,e){let o=null,n;const i=T(t);function r(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();const f=t.getBoundingClientRect(),{left:d,top:u,width:h,height:a}=f;if(c||e(),!h||!a)return;const g=k(u),p=k(i.clientWidth-(d+h)),w=k(i.clientHeight-(u+a)),m=k(d),y={rootMargin:-g+"px "+-p+"px "+-w+"px "+-m+"px",threshold:S(0,H(1,l))||1};let R=!0;function v(Z){const M=Z[0].intersectionRatio;if(M!==l){if(!R)return s();M?s(!1,M):n=setTimeout(()=>{s(!1,1e-7)},1e3)}M===1&&!mt(f,t.getBoundingClientRect())&&s(),R=!1}try{o=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{o=new IntersectionObserver(v,y)}o.observe(t)}return s(!0),r}function te(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,f=J(t),d=i||r?[...f?B(f):[],...B(e)]:[];d.forEach(m=>{i&&m.addEventListener("scroll",o,{passive:!0}),r&&m.addEventListener("resize",o)});const u=f&&c?Jt(f,o):null;let h=-1,a=null;s&&(a=new ResizeObserver(m=>{let[x]=m;x&&x.target===f&&a&&(a.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=a)==null||y.observe(e)})),o()}),f&&!l&&a.observe(f),a.observe(e));let g,p=l?D(t):null;l&&w();function w(){const m=D(t);p&&!mt(p,m)&&o(),p=m,g=requestAnimationFrame(w)}return o(),()=>{var m;d.forEach(x=>{i&&x.removeEventListener("scroll",o),r&&x.removeEventListener("resize",o)}),u?.(),(m=a)==null||m.disconnect(),a=null,l&&cancelAnimationFrame(g)}}const ee=Bt,ne=Wt,oe=(t,e,o)=>{const n=new Map,i={platform:Gt,...o},r={...i.platform,_c:n};return Dt(t,e,{...i,platform:r})};export{te as a,tt as b,oe as c,C as d,K as e,N as f,B as g,L as h,E as i,A as j,ee as o,Zt as r,ne as s};