PageSourceSearch

https://theclublist.net/assets/floating-ui.react-SnMdqaDc.js

js theclublist.net collected 2026-10-06 19:06:33 UTC 61,797 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5e1d9b7f-cc29-5ca8-a5da-cb0e071d20dc")}catch(e){}}();
3import{s as e,t}from"./jsx-runtime-D4ePz0Hl.js";import{t as n}from"./react-BXH-GOAS.js";import{t as r}from"./react-dom-D0cDl6Cl.js";var i=e(n(),1),a=[`top`,`right`,`bottom`,`left`],o=[`start`,`end`],s=a.reduce((e,t)=>e.concat(t,t+`-`+o[0],t+`-`+o[1]),[]),c=Math.min,l=Math.max,u=Math.round,d=Math.floor,f=e=>({x:e,y:e}),p={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function m(e,t,n){return l(e,c(t,n))}function h(e,t){return typeof e==`function`?e(t):e}function g(e){return e.split(`-`)[0]}function _(e){return e.split(`-`)[1]}function v(e){return e===`x`?`y`:`x`}function y(e){return e===`y`?`height`:`width`}function b(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function x(e){return v(b(e))}function S(e,t,n){n===void 0&&(n=!1);let r=_(e),i=x(e),a=y(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=j(o)),[o,j(o)]}function C(e){let t=j(e);return[w(e),t,w(t)]}function w(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var T=[`left`,`right`],E=[`right`,`left`],D=[`top`,`bottom`],O=[`bottom`,`top`];function k(e,t,n){switch(e){case`top`:case`bottom`:return n?t?E:T:t?T:E;case`left`:case`right`:return t?D:O;default:return[]}}function A(e,t,n,r){let i=_(e),a=k(g(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(w)))),a}function j(e){let t=g(e);return p[t]+e.slice(t.length)}function M(e){return{top:0,right:0,bottom:0,left:0,...e}}function N(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:M(e)}function P(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var F=e(r(),1),I=e(t(),1);function L(e,t,n){let{reference:r,floating:i}=e,a=b(t),o=x(t),s=y(o),c=g(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(_(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function ee(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=h(t,e),p=N(f),m=o[d?u===`floating`?`reference`:`floating`:u],g=P(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),_=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),y=await(i.isElement==null?void 0:i.isElement(v))&&await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1},b=P(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:_,offsetParent:v,strategy:s}):_);return{top:(g.top-b.top+p.top)/y.y,bottom:(b.bottom-g.bottom+p.bottom)/y.y,left:(g.left-b.left+p.left)/y.x,right:(b.right-g.right+p.right)/y.x}}var te=50,ne=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ee},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=L(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<te&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}
vendor: 4,213 bytes, line 3
3):x.rects),{x:u,y:d}=L(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},R=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=h(e,t)||{};if(u==null)return{};let f=N(d),p={x:n,y:r},g=x(i),v=y(g),b=await o.getDimensions(u),S=g===`y`,C=S?`top`:`left`,w=S?`bottom`:`right`,T=S?`clientHeight`:`clientWidth`,E=a.reference[v]+a.reference[g]-p[g]-a.floating[v],D=p[g]-a.reference[g],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u)),k=O?O[T]:0;(!k||!await(o.isElement==null?void 0:o.isElement(O)))&&(k=s.floating[T]||a.floating[v]);let A=E/2-D/2,j=k/2-b[v]/2-1,M=c(f[C],j),P=c(f[w],j),F=M,I=k-b[v]-P,L=k/2-b[v]/2+A,ee=m(F,L,I),te=!l.arrow&&_(i)!=null&&L!==ee&&a.reference[v]/2-(L<F?M:P)-b[v]/2<0,ne=te?L<F?L-F:L-I:0;return{[g]:p[g]+ne,data:{[g]:ee,centerOffset:L-ee-ne,...te&&{alignmentOffset:ne}},reset:te}}});function z(e,t,n){return(e?[...n.filter(t=>_(t)===e),...n.filter(t=>_(t)!==e)]:n.filter(e=>g(e)===e)).filter(n=>e?_(n)===e||(t?w(n)!==n:!1):!0)}var re=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:c=!1,alignment:l,allowedPlacements:u=s,autoAlignment:d=!0,...f}=h(e,t),p=l!==void 0||u===s?z(l||null,d,u):u,m=await a.detectOverflow(t,f),v=r.autoPlacement?.index||0,y=p[v];if(y==null)return{};let b=S(y,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==y)return{reset:{placement:p[0]}};let x=[m[g(y)],m[b[0]],m[b[1]]],C=[...r.autoPlacement?.overflows||[],{placement:y,overflows:x}],w=p[v+1];if(w)return{data:{index:v+1,overflows:C},reset:{placement:w}};let T=C.map(e=>{let t=_(e.placement);return[e.placement,t&&c?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),E=T.filter(e=>e[2].slice(0,_(e[0])?2:3).every(e=>e<=0))[0]?.[0]||T[0][0];return E===i?{}:{data:{index:v+1,overflows:C},reset:{placement:E}}}}},ie=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,..._}=h(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let v=g(r),y=b(o),x=g(o)===o,w=await(s.isRTL==null?void 0:s.isRTL(c.floating)),T=d||(x||!m?[j(o)]:C(o)),E=p!==`none`;!d&&E&&T.push(...A(o,m,p,w));let D=[o,...T],O=await s.detectOverflow(t,_),k=[],M=i.flip?.overflows||[];if(l&&k.push(O[v]),u){let e=S(r,a,w);k.push(O[e[0]],O[e[1]])}if(M=[...M,{placement:r,overflows:k}],!k.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=D[e];if(t&&(!(u===`alignment`&&y!==b(t))||M.every(e=>b(e.placement)===y?e.overflows[0]>0:!0)))return{data:{index:e,overflows:M},reset:{placement:t}};let n=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=M.filter(e=>{if(E){let t=b(e.placement);return t===y||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ae(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oe(e){return a.some(t=>e[t]>=0)}var se=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=h(e,t);switch(i){case`referenceHidden`:{let e=ae(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:oe(e)}}}case`escaped`:{let e=ae(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:oe(e)}}}default:return{}}}}},ce=new Set([`left`,`top`]);async function le(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=g(n),s=_(n),c=b(n)===`y`,l=ce.has(o)?-1:1,u=a&&c?-1:1,d=h(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}
3:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ue=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await le(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},de=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=h(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=b(g(i)),p=v(f),_=u[p],y=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=_+d[e],r=_-d[t];_=m(n,_,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=y+d[e],r=y-d[t];y=m(n,y,r)}let x=c.fn({...t,[p]:_,[f]:y});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:o,[f]:s}}}}}},fe=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=h(e,t),u={x:n,y:r},d=b(i),f=v(d),p=u[f],m=u[d],_=h(s,t),y=typeof _==`number`?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+y.mainAxis,n=a.reference[f]+a.reference[e]-y.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ce.has(g(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:y.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?y.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},pe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:u=()=>{},...d}=h(e,t),f=await o.detectOverflow(t,d),p=g(i),m=_(i),v=b(i)===`y`,{width:y,height:x}=a.floating,S,C;p===`top`||p===`bottom`?(S=p,C=m===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(C=p,S=m===`end`?`top`:`bottom`);let w=x-f.top-f.bottom,T=y-f.left-f.right,E=c(x-f[S],w),D=c(y-f[C],T),O=!t.middlewareData.shift,k=E,A=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=w),O&&!m){let e=l(f.left,0),t=l(f.right,0),n=l(f.top,0),r=l(f.bottom,0);v?A=y-2*(e!==0||t!==0?e+t:l(f.left,f.right)):k=x-2*(n!==0||r!==0?n+r:l(f.top,f.bottom))}await u({...t,availableWidth:A,availableHeight:k});let j=await o.getDimensions(s.floating);return y!==j.width||x!==j.height?{reset:{rects:!0}}:{}}}};function me(){return typeof window<`u`}function he(e){return ge(e)?(e.nodeName||``).toLowerCase():`#document`}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){return((ge(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ge(e){return me()?e instanceof Node||e instanceof B(e).Node:!1}function H(e){return me()?e instanceof Element||e instanceof B(e).Element:!1}function U(e){return me()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function _e(e){return!me()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}function ve(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=G(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ye(e){return/^(table|td|th)$/.test(he(e))}function be(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xe=/transform|translate|scale|rotate|perspective|filter/,Se=/paint|layout|strict|content/,Ce=e=>!!e&&e!==`none`,we;function Te(e){let t=H(e)?G(e):e;return Ce(t.transform)||Ce(t.translate)||Ce(t.scale)||Ce(t.rotate)||Ce(t.perspective)||!De()&&(Ce(t.backdropFilter)||Ce(t.filter))||xe.test(t.willChange||``)||Se.test(t.contain||``)}function Ee(e){let t=K(e);for(;U(t)&&!W(t);){if(Te(t))return t;if(be(t))return null;t=K(t)}return null}function De(){return we??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),we}function W(e){return/^(html|body|#document)$/.test(he(e))}function G(e){return B(e).getComputedStyle(e)}function Oe(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if(he(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_e(e)&&e.host||V(e);return _e(t)?t.host:t}function ke(e){let t=K(e);return W(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&ve(t)?t:ke(t)}function q(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ke(e),i=r===e.ownerDocument?.body,a=B(r);if(i){let e=Ae(a);
vendor: 6,353 bytes, line 3
3return t.concat(a,a.visualViewport||[],ve(r)?r:[],e&&n?q(e):[])}else return t.concat(r,q(r,[],n))}function Ae(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function je(e){let t=G(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=U(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=u(n)!==a||u(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Me(e){return H(e)?e:e.contextElement}function Ne(e){let t=Me(e);if(!U(t))return f(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=je(t),o=(a?u(n.width):n.width)/r,s=(a?u(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Pe=f(0);function Fe(e){let t=B(e);return!De()||!t.visualViewport?Pe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ie(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function Le(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Me(e),o=f(1);t&&(r?H(r)&&(o=Ne(r)):o=Ne(e));let s=Ie(a,n,r)?Fe(a):f(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=B(a),t=r&&H(r)?B(r):r,n=e,i=Ae(n);for(;i&&r&&t!==n;){let e=Ne(i),t=i.getBoundingClientRect(),r=G(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=B(i),i=Ae(n)}}return P({width:u,height:d,x:c,y:l})}function Re(e,t){let n=Oe(e).scrollLeft;return t?t.left+n:Le(V(e)).left+n}function ze(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Re(e,n),y:n.top+t.scrollTop}}function Be(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=V(r),s=t?be(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=f(1),u=f(0),d=U(r);if((d||!d&&!a)&&((he(r)!==`body`||ve(o))&&(c=Oe(r)),d)){let e=Le(r);l=Ne(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let p=o&&!d&&!a?ze(o,c):f(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+p.x,y:n.y*l.y-c.scrollTop*l.y+u.y+p.y}}function Ve(e){return Array.from(e.getClientRects())}function He(e){let t=V(e),n=Oe(e),r=e.ownerDocument.body,i=l(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=l(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Re(e),s=-n.scrollTop;return G(r).direction===`rtl`&&(o+=l(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ue=25;function We(e,t){let n=B(e),r=V(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=De();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Re(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ue&&(a-=o)}else l<=Ue&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ge(e,t){let n=Le(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=U(e)?Ne(e):f(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ke(e,t,n){let r;if(t===`viewport`)r=We(e,n);else if(t===`document`)r=He(V(e));else if(H(t))r=Ge(t,n);else{let n=Fe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return P(r)}function qe(e,t){let n=K(e);return n===t||!H(n)||W(n)?!1:G(n).position===`fixed`||qe(n,t)}function Je(e,t){let n=t.get(e);if(n)return n;let r=q(e,[],!1).filter(e=>H(e)&&he(e)!==`body`),i=null,a=G(e).position===`fixed`,o=a?K(e):e;for(;H(o)&&!W(o);){let t=G(o),n=Te(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||ve(o)&&!n&&qe(e,o))?r=r.filter(e=>e!==o):i=t,o=K(o)}return t.set(e,r),r}function Ye(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?be(t)?[]:Je(t,this._c):[].concat(n),r],o=Ke(t,a[0],i),s=o.top,u=o.right,d=o.bottom,f=o.left;for(let e=1;e<a.length;e++){let n=Ke(t,a[e],i);s=l(n.top,s),u=c(n.right,u),d=c(n.bottom,d),f=l(n.left,f)}return{width:u-f,height:d-s,x:f,y:s}}function Xe(e){let{width:t,height:n}=je(e);return{width:t,height:n}}function Ze(e,t,n){let r=U(t),i=V(t),a=n===`fixed`,o=Le(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=f(0);function l(){c.x=Re(i)}if(r||!r&&!a)if((he(t)!==`body`||ve(i))&&(s=Oe(t)),r){let e=Le(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ze(i,s):f(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Qe(e){return G(e).position===`static`}function $e(e,t){if(!U(e)||G(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return V(e)===n&&(n=n.ownerDocument.body),n}function et(e,t){let n=B(e);if(be(e))return n;if(!U(e)){let t=K(e);for(;t&&!W(t);){if(H(t)&&!Qe(t))return t;t=K(t)}return n}let r=$e(e,t);for(;r&&ye(r)&&Qe(r);)r=$e(r,t);return r&&W(r)&&Qe(r)&&!Te(r)?n:r||Ee(e)||n}var tt=async function(e){let t=this.getOffsetParent||et,n=this.getDimensions,r=await n(e.floating);return{reference:Ze(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nt(e){return G(e).direction===`rtl`}var rt={convertOffsetParentRelativeRectToViewportRelativeRect:Be,getDocumentElement:V,getClippingRect:Ye,getOffsetParent:et,getElementRects:tt,getClientRects:Ve,getDimensions:Xe,getScale:Ne,isElement:H,isRTL:nt};function it(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function at(e,t){let n=null,r,i=V(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),a();let f=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=f;if(s||t(),!h||!g)return;let _=d(m),v=d(i.clientWidth-(p+h)),y=d(i.clientHeight-(m+g)),b=d(p),x={rootMargin:-_+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:l(0,c(1,u))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(n!==u){if(!S)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!it(f,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(C,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return o(!0),a}function ot(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}
vendor: 4,235 bytes, line 3
3=r,l=Me(e),u=i||a?[...l?q(l):[],...t?q(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?at(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Le(e):null;c&&g();function g(){let t=Le(e);h&&!it(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var st=ue,ct=re,lt=de,ut=ie,dt=pe,ft=se,pt=R,mt=fe,ht=(e,t,n)=>{let r=new Map,i={platform:rt,...n},a={...i.platform,_c:r};return ne(e,t,{...i,platform:a})},gt=typeof document<`u`?i.useLayoutEffect:function(){};function _t(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_t(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!_t(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function vt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yt(e,t){let n=vt(e);return Math.round(t*n)/n}function bt(e){let t=i.useRef(e);return gt(()=>{t.current=e}),t}function xt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:a,elements:{reference:o,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=i.useState(r);_t(p,r)||m(r);let[h,g]=i.useState(null),[_,v]=i.useState(null),y=i.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=i.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=o||h,S=s||_,C=i.useRef(null),w=i.useRef(null),T=i.useRef(d),E=l!=null,D=bt(l),O=bt(a),k=bt(u),A=i.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),ht(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!_t(T.current,t)&&(T.current=t,F.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);gt(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let j=i.useRef(!1);gt(()=>(j.current=!0,()=>{j.current=!1}),[]),gt(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=i.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=i.useMemo(()=>({reference:x,floating:S}),[x,S]),P=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=yt(N.floating,d.x),r=yt(N.floating,d.y);return c?{...e,transform:`translate(`+t+`px, `+r+`px)`,...vt(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,c,N.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:A,refs:M,elements:N,floatingStyles:P}),[d,A,M,N,P])}var St=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:pt({element:r.current,padding:i}).fn(n):r?pt({element:r,padding:i}).fn(n):{}}}},Ct=(e,t)=>{let n=st(e);return{name:n.name,fn:n.fn,options:[e,t]}},wt=(e,t)=>{let n=lt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tt=(e,t)=>({fn:mt(e).fn,options:[e,t]}),Et=(e,t)=>{let n=ut(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dt=(e,t)=>{let n=dt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ot=(e,t)=>{let n=ct(e);return{name:n.name,fn:n.fn,options:[e,t]}},kt=(e,t)=>{let n=ft(e);return{name:n.name,fn:n.fn,options:[e,t]}},At=(e,t)=>{let n=St(e);return{name:n.name,fn:n.fn,options:[e,t]}},jt=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not
3(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`].join(`,`),Mt=typeof Element>`u`,Nt=Mt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Pt=!Mt&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},Ft=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Ft(e.parentNode))},It=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Lt=function(e,t,n){if(Ft(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(jt));return t&&Nt.call(e,jt)&&r.unshift(e),r=r.filter(n),r},Rt=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Ft(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=Rt(o.length?o:a.children,!0,n);
3n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Nt.call(a,jt)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Ft(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=Rt(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},zt=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Bt=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||It(e))&&!zt(e)?0:e.tabIndex},Vt=function(e,t){var n=Bt(e);return n<0&&t&&!zt(e)?0:n},Ht=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ut=function(e){return e.tagName===`INPUT`},Wt=function(e){return Ut(e)&&e.type===`hidden`},Gt=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Kt=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},qt=function(e){if(!e.name)return!0;var t=e.form||Pt(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Kt(r,e.form);return!i||i===e},Jt=function(e){return Ut(e)&&e.type===`radio`},Yt=function(e){return Jt(e)&&!qt(e)},Xt=function(e){var t=e&&Pt(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=Pt(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},Zt=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Qt=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=Nt.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Nt.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=Pt(e);if(o&&!o.shadowRoot&&r(o)===!0)return Zt(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(Xt(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return Zt(e);return!1},$t=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Nt.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},en=function(e,t){return!(t.disabled||Wt(t)||Qt(t,e)||Gt(t)||$t(t))},tn=function(e,t){return!(Yt(t)||Bt(t)<0||!en(e,t))},nn=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},rn=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=Vt(a,i),s=i?rn(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(Ht).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},an=function(e,t){return t||={},rn(t.getShadowRoot?Rt([e],t.includeContainer,{filter:tn.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:nn}):Lt(e,t.includeContainer,tn.bind(null,t)))},on=function(e,t){return t||={},t.getShadowRoot?Rt([e],t.includeContainer,{filter:en.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Lt(e,t.includeContainer,en.bind(null,t))},sn=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Nt.call(e,jt)===!1?!1:tn(t,e)};function cn(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ln(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function un(){return/apple/i.test(navigator.vendor)}function dn(){let e=/android/i;return e.test(cn())||e.test(ln())}function fn(){return cn().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function pn(){return ln().includes(`jsdom/`)}var mn=`data-floating-ui-focusable`,hn=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function J(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;
3if(n&&_e(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Y(e){return`composedPath`in e?e.composedPath()[0]:e.target}function _n(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function vn(e){return e.matches(`html,body`)}function X(e){return e?.ownerDocument||document}function yn(e){return U(e)&&e.matches(hn)}function bn(e){return e?e.getAttribute(`role`)===`combobox`&&yn(e):!1}function xn(e){if(!e||pn())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Sn(e){return e?e.hasAttribute(mn)?e:e.querySelector(`[data-floating-ui-focusable]`)||e:null}function Cn(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Cn(e,t.id,n)])}function wn(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Tn(e){e.preventDefault(),e.stopPropagation()}function En(e){return`nativeEvent`in e}function Dn(e){return e.mozInputSource===0&&e.isTrusted?!0:dn()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function On(e){return pn()?!1:!dn()&&e.width===0&&e.height===0||dn()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function kn(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Z=typeof document<`u`?i.useLayoutEffect:function(){},An={...i};function jn(e){let t=i.useRef(e);return Z(()=>{t.current=e}),t}var Mn=An.useInsertionEffect||(e=>e());function Q(e){let t=i.useRef(()=>{});return Mn(()=>{t.current=e}),i.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var Nn=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function Pn(e,t){let n=an(e,Nn()),r=n.length;if(r===0)return;let i=gn(X(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Fn(e){return Pn(X(e).body,1)||e}function In(e){return Pn(X(e).body,-1)||e}function Ln(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!J(n,r)}function Rn(e){an(e,Nn()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function zn(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var Bn=`data-floating-ui-focusable`,Vn=`active`,Hn=`selected`,Un=`ArrowLeft`,Wn=`ArrowRight`,Gn=`ArrowUp`,Kn=`ArrowDown`,qn=[Un,Wn],Jn=[Gn,Kn];[...qn,...Jn];var Yn={...i},Xn=!1,Zn=0,Qn=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ Zn++;function $n(){let[e,t]=i.useState(()=>Xn?Qn():void 0);return Z(()=>{e??t(Qn())},[]),i.useEffect(()=>{Xn=!0},[]),e}var er=Yn.useId||$n,tr=i.forwardRef(function(e,t){let{context:{placement:n,elements:{floating:r},middlewareData:{arrow:a,shift:o}},width:s=14,height:c=7,tipRadius:l=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:m,...h}={},...g}=e,_=er(),[v,y]=i.useState(!1);if(Z(()=>{r&&G(r).direction===`rtl`&&y(!0)},[r]),!r)return null;let[b,x]=n.split(`-`),S=b===`top`||b===`bottom`,C=d;(S&&o!=null&&o.x||!S&&o!=null&&o.y)&&(C=null);let w=u*2,T=w/2,E=s/2*(l/-8+1),D=c/2*l/4,O=!!p,k=C&&x===`end`?`bottom`:`top`,A=C&&x===`end`?`right`:`left`;C&&v&&(A=x===`end`?`left`:`right`);let j=a?.x==null?``:C||a.x,M=a?.y==null?``:C||a.y,N=p||`M0,0`+(` H`+s)+(` L`+(s-E)+`,`+(c-D))+(` Q`+s/2+`,`+c+` `+E+`,`+(c-D))+` Z`,P={top:O?`rotate(180deg)`:``,left:O?`rotate(90deg)`:`rotate(-90deg)`,bottom:O?``:`rotate(180deg)`,right:O?`rotate(-90deg)`:`rotate(90deg)`}[b];return(0,I.jsxs)(`svg`,{...g,"aria-hidden":!0,ref:t,width:O?s:s+w,height:s,viewBox:`0 0 `+s+` `+(c>s?c:s),style:{position:`absolute`,pointerEvents:`none`,[A]:j,[k]:M,[b]:S||O?`100%`:`calc(100% - `+w/2+`px)`,transform:[P,m].filter(e=>!!e).join(` `),...h},children:[w>0&&(0,I.jsx)(`path`,{clipPath:`url(#`+_+`)`,fill:`none`,stroke:f,strokeWidth:w+ +!p,d:N}),(0,I.jsx)(`path`,{stroke:w&&!p?g.fill:`none`,d:N}),(0,I.jsx)(`clipPath`,{id:_,children:(0,I.jsx)(`rect`,{x:-T,y:T*(O?-1:1),width:s+w,height:s})})]})});function nr(){let e=new Map;return{emit(t,n){var r;
3(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var rr=i.createContext(null),ir=i.createContext(null),ar=()=>i.useContext(rr)?.id||null,or=()=>i.useContext(ir);function sr(e){return`data-floating-ui-`+e}function $(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var cr=sr(`safe-polygon`);function lr(e,t,n){if(n&&!kn(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function ur(e){return typeof e==`function`?e():e}function dr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:a,events:o,elements:s}=e,{enabled:c=!0,delay:l=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=t,m=or(),h=ar(),g=jn(u),_=jn(l),v=jn(n),y=jn(f),b=i.useRef(),x=i.useRef(-1),S=i.useRef(),C=i.useRef(-1),w=i.useRef(!0),T=i.useRef(!1),E=i.useRef(()=>{}),D=i.useRef(!1),O=Q(()=>{let e=a.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});i.useEffect(()=>{if(!c)return;function e(e){let{open:t}=e;t||($(x),$(C),w.current=!0,D.current=!1)}return o.on(`openchange`,e),()=>{o.off(`openchange`,e)}},[c,o]),i.useEffect(()=>{if(!c||!g.current||!n)return;function e(e){O()&&r(!1,e,`hover`)}let t=X(s.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[s.floating,n,r,c,g,O]);let k=i.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=lr(_.current,`close`,b.current);i&&!S.current?($(x),x.current=window.setTimeout(()=>r(!1,e,n),i)):t&&($(x),r(!1,e,n))},[_,r]),A=Q(()=>{E.current(),S.current=void 0}),j=Q(()=>{if(T.current){let e=X(s.floating).body;e.style.pointerEvents=``,e.removeAttribute(cr),T.current=!1}}),M=Q(()=>a.current.openEvent?[`click`,`mousedown`].includes(a.current.openEvent.type):!1);i.useEffect(()=>{if(!c)return;function e(e){if($(x),w.current=!1,d&&!kn(b.current)||ur(y.current)>0&&!lr(_.current,`open`))return;let t=lr(_.current,`open`,b.current);t?x.current=window.setTimeout(()=>{v.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(M()){j();return}E.current();let t=X(s.floating);if($(C),D.current=!1,g.current&&a.current.floatingContext){n||$(x),S.current=g.current({...a.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let r=S.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)};return}(b.current!==`touch`||!J(s.floating,e.relatedTarget))&&k(e)}function i(e){M()||a.current.floatingContext&&(g.current==null||g.current({...a.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function o(){$(x)}function l(e){M()||k(e,!1)}if(H(s.domReference)){let r=s.domReference,a=s.floating;return n&&r.addEventListener(`mouseleave`,i),p&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),a&&(a.addEventListener(`mouseleave`,i),a.addEventListener(`mouseenter`,o),a.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,i),p&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),a&&(a.removeEventListener(`mouseleave`,i),a.removeEventListener(`mouseenter`,o),a.removeEventListener(`mouseleave`,l))}}},[s,c,e,d,p,k,A,j,r,n,v,m,_,g,a,M,y]),Z(()=>{var e;if(c&&n&&(e=g.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=s.floating;if(H(s.domReference)&&e){var t;let n=X(s.floating).body;n.setAttribute(cr,``);let r=s.domReference,i=m==null||(t=m.nodesRef.current.find(e=>e.id===h))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[c,n,h,s,m,g,O]),Z(()=>{n||(b.current=void 0,D.current=!1,A(),j())},[n,A,j]),i.useEffect(()=>()=>{A(),$(x),$(C),j()},[c,s.domReference,A,j]);let N=i.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!w.current&&!v.current&&r(!0,t,`hover`)}d&&!kn(b.current)||n||ur(y.current)===0||D.current&&e.movementX**2+e.movementY**2<2||($(C),b.current===`touch`?i():(D.current=!0,C.current=window.setTimeout(i,ur(y.current))))}}},[d,r,n,v,y]);return i.useMemo(()=>c?{reference:N}:{},[c,N])}var fr=0;function pr(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(fr);let a=()=>e?.focus({preventScroll:n});i?a():fr=requestAnimationFrame(a)}function mr(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;
3if(n&&_e(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function hr(e){return`composedPath`in e?e.composedPath()[0]:e.target}function gr(e){return e?.ownerDocument||document}var _r={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function vr(e){return e===`inert`?_r.inert:e===`aria-hidden`?_r[`aria-hidden`]:_r.none}var yr=new WeakSet,br={},xr=0,Sr=()=>typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype;function Cr(e){return e?_e(e)?e.host:Cr(e.parentNode):null}var wr=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Cr(t);return e.contains(n)?n:null}).filter(e=>e!=null);function Tr(e,t,n,r){let i=`data-floating-ui-inert`,a=r?`inert`:n?`aria-hidden`:null,o=wr(t,e),s=new Set,c=new Set(o),l=[];br[i]||(br[i]=new WeakMap);let u=br[i];o.forEach(d),f(t),s.clear();function d(e){!e||s.has(e)||(s.add(e),e.parentNode&&d(e.parentNode))}function f(e){!e||c.has(e)||[].forEach.call(e.children,e=>{if(he(e)!==`script`)if(s.has(e))f(e);else{let t=a?e.getAttribute(a):null,n=t!==null&&t!==`false`,r=vr(a),o=(r.get(e)||0)+1,s=(u.get(e)||0)+1;r.set(e,o),u.set(e,s),l.push(e),o===1&&n&&yr.add(e),s===1&&e.setAttribute(i,``),!n&&a&&e.setAttribute(a,a===`inert`?``:`true`)}})}return xr++,()=>{l.forEach(e=>{let t=vr(a),n=(t.get(e)||0)-1,r=(u.get(e)||0)-1;t.set(e,n),u.set(e,r),n||(!yr.has(e)&&a&&e.removeAttribute(a),yr.delete(e)),r||e.removeAttribute(i)}),xr--,xr||(_r.inert=new WeakMap,_r[`aria-hidden`]=new WeakMap,_r.none=new WeakMap,yr=new WeakSet,br={})}}function Er(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=gr(e[0]).body;return Tr(e.concat(Array.from(r.querySelectorAll(`[aria-live],[role="status"],output`))),r,t,n)}var Dr={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},Or=i.forwardRef(function(e,t){let[n,r]=i.useState();Z(()=>{un()&&r(`button`)},[]);let a={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[sr(`focus-guard`)]:``,style:Dr};return(0,I.jsx)(`span`,{...e,...a})}),kr={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ar=i.createContext(null),jr=sr(`portal`);function Mr(e){e===void 0&&(e={});let{id:t,root:n}=e,r=er(),a=Pr(),[o,s]=i.useState(null),c=i.useRef(null);return Z(()=>()=>{o?.remove(),queueMicrotask(()=>{c.current=null})},[o]),Z(()=>{if(!r||c.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(jr,``),e.appendChild(n),c.current=n,s(n)},[t,r]),Z(()=>
3{if(n===null||!r||c.current)return;let e=n||a?.portalNode;e&&!ge(e)&&(e=e.current),e||=document.body;let i=null;t&&(i=document.createElement(`div`),i.id=t,e.appendChild(i));let o=document.createElement(`div`);o.id=r,o.setAttribute(jr,``),e=i||e,e.appendChild(o),c.current=o,s(o)},[t,n,r,a]),o}function Nr(e){let{children:t,id:n,root:r,preserveTabOrder:a=!0}=e,o=Mr({id:n,root:r}),[s,c]=i.useState(null),l=i.useRef(null),u=i.useRef(null),d=i.useRef(null),f=i.useRef(null),p=s?.modal,m=s?.open,h=!!s&&!s.modal&&s.open&&a&&!!(r||o);return i.useEffect(()=>{if(!o||!a||p)return;function e(e){o&&Ln(e)&&(e.type===`focusin`?zn:Rn)(o)}return o.addEventListener(`focusin`,e,!0),o.addEventListener(`focusout`,e,!0),()=>{o.removeEventListener(`focusin`,e,!0),o.removeEventListener(`focusout`,e,!0)}},[o,a,p]),i.useEffect(()=>{o&&(m||zn(o))},[m,o]),(0,I.jsxs)(Ar.Provider,{value:i.useMemo(()=>({preserveTabOrder:a,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:f,portalNode:o,setFocusManagerState:c}),[a,o]),children:[h&&o&&(0,I.jsx)(Or,{"data-type":`outside`,ref:l,onFocus:e=>{if(Ln(e,o)){var t;(t=d.current)==null||t.focus()}else In(s?s.domReference:null)?.focus()}}),h&&o&&(0,I.jsx)(`span`,{"aria-owns":o.id,style:kr}),o&&F.createPortal(t,o),h&&o&&(0,I.jsx)(Or,{"data-type":`outside`,ref:u,onFocus:e=>{if(Ln(e,o)){var t;(t=f.current)==null||t.focus()}else Fn(s?s.domReference:null)?.focus(),s!=null&&s.closeOnFocusOut&&s?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var Pr=()=>i.useContext(Ar);function Fr(e){return i.useMemo(()=>t=>{e.forEach(e=>{e&&(e.current=t)})},e)}var Ir=20,Lr=[];function Rr(){Lr=Lr.filter(e=>e.deref()?.isConnected)}function zr(e){Rr(),e&&he(e)!==`body`&&(Lr.push(new WeakRef(e)),Lr.length>Ir&&(Lr=Lr.slice(-20)))}function Br(){return Rr(),Lr[Lr.length-1]?.deref()}function Vr(e){let t=Nn();return sn(e,t)?e:an(e,t)[0]||e}function Hr(e,t){var n;if(!t.current.includes(`floating`)&&!((n=e.getAttribute(`role`))!=null&&n.includes(`dialog`)))return;let r=Nn(),i=on(e,r).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return sn(e,r)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),a=e.getAttribute(`tabindex`);t.current.includes(`floating`)||i.length===0?a!==`0`&&e.setAttribute(`tabindex`,`0`):(a!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}var Ur=i.forwardRef(function(e,t){return(0,I.jsx)(`button`,{...e,type:`button`,ref:t,tabIndex:-1,style:Dr})});function Wr(e){let{context:t,children:n,disabled:r=!1,order:a=[`content`],guards:o=!0,initialFocus:s=0,returnFocus:c=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:f=!0,outsideElementsInert:p=!1,getInsideElements:m=()=>[]}=e,{open:h,onOpenChange:g,events:_,dataRef:v,elements:{domReference:y,floating:b}}=t,x=Q(()=>v.current.floatingContext?.nodeId),S=Q(m),C=typeof s==`number`&&s<0,w=bn(y)&&C,T=Sr(),E=T?o:!0,D=!E||T&&p,O=jn(a),k=jn(s),A=jn(c),j=or(),M=Pr(),N=i.useRef(null),P=i.useRef(null),F=i.useRef(!1),L=i.useRef(!1),ee=i.useRef(-1),te=i.useRef(-1),ne=M!=null,R=Sn(b),z=Q(function(e){return e===void 0&&(e=R),e?an(e,Nn()):[]}),re=Q(e=>{let t=z(e);return O.current.map(e=>y&&e===`reference`?y:R&&e===`floating`?R:t).filter(Boolean).flat()});i.useEffect(()=>{if(r||!u)return;function e(e){if(e.key===`Tab`){J(R,gn(X(R)))&&z().length===0&&!w&&Tn(e);let t=re(),n=Y(e);O.current[0]===`reference`&&n===y&&(Tn(e),e.shiftKey?pr(t[t.length-1]):pr(t[1])),O.current[1]===`floating`&&n===R&&e.shiftKey&&(Tn(e),pr(t[0]))}}let t=X(R);return t.addEventListener(`keydown`,e),()=>{t.removeEventListener(`keydown`,e)}},[r,y,R,u,O,w,z,re]),i.useEffect(()=>{if(r||!b)return;function e(e){let t=Y(e),n=z().indexOf(t);n!==-1&&(ee.current=n)}return b.addEventListener(`focusin`,e),()=>{b.removeEventListener(`focusin`,e)}},[r,b,z]),i.useEffect(()=>{if(r||!f)return;function e(){L.current=!0,setTimeout(()=>{L.current=!1})}function t(e){let t=e.relatedTarget,n=e.currentTarget,r=Y(e);queueMicrotask(()=>{let i=x(),a=!(J(y,t)||J(b,t)||J(t,b)||J(M?.portalNode,t)||t!=null&&t.hasAttribute(sr(`focu
3s-guard`))||j&&(Cn(j.nodesRef.current,i).find(e=>J(e.context?.elements.floating,t)||J(e.context?.elements.domReference,t))||wn(j.nodesRef.current,i).find(e=>[e.context?.elements.floating,Sn(e.context?.elements.floating)].includes(t)||e.context?.elements.domReference===t)));if(n===y&&R&&Hr(R,O),l&&n!==y&&!(r!=null&&r.isConnected)&&gn(X(R))===X(R).body){U(R)&&R.focus();let e=ee.current,t=z(),n=t[e]||t[t.length-1]||R;U(n)&&n.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!u)&&t&&a&&!L.current&&t!==Br()&&(F.current=!0,g(!1,e,`focus-out`))})}let n=!!(!j&&M);function i(){$(te),v.current.insideReactTree=!0,te.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(b&&U(y))return y.addEventListener(`focusout`,t),y.addEventListener(`pointerdown`,e),b.addEventListener(`focusout`,t),n&&b.addEventListener(`focusout`,i,!0),()=>{y.removeEventListener(`focusout`,t),y.removeEventListener(`pointerdown`,e),b.removeEventListener(`focusout`,t),n&&b.removeEventListener(`focusout`,i,!0)}},[r,y,b,R,u,j,M,g,f,l,z,w,x,O,v]);let ie=i.useRef(null),ae=i.useRef(null),oe=Fr([ie,M?.beforeInsideRef]),se=Fr([ae,M?.afterInsideRef]);i.useEffect(()=>{var e,t;if(r||!b)return;let n=Array.from((M==null||(e=M.portalNode)==null?void 0:e.querySelectorAll(`[`+sr(`portal`)+`]`))||[]),i=[b,(t=(j?wn(j.nodesRef.current,x()):[]).find(e=>bn(e.context?.elements.domReference||null)))==null||(t=t.context)==null?void 0:t.elements.domReference,...n,...S(),N.current,P.current,ie.current,ae.current,M?.beforeOutsideRef.current,M?.afterOutsideRef.current,O.current.includes(`reference`)||w?y:null].filter(e=>e!=null),a=u||w?Er(i,!D,D):Er(i);return()=>{a()}},[r,y,b,u,O,M,w,E,D,j,x,S]),Z(()=>{if(r||!U(R))return;let e=gn(X(R));queueMicrotask(()=>{let t=re(R),n=k.current,r=(typeof n==`number`?t[n]:n.current)||R,i=J(R,e);!C&&!i&&h&&pr(r,{preventScroll:r===R})})},[r,h,R,C,re,k]),Z(()=>{if(r||!R)return;let e=X(R);zr(gn(e));function t(e){let{reason:t,event:n,nested:r}=e;if([`hover`,`safe-polygon`].includes(t)&&n.type===`mouseleave`&&(F.current=!0),t===`outside-press`)if(r)F.current=!1;else if(Dn(n)||On(n))F.current=!1;else{let e=!1;document.createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?F.current=!1:F.current=!0}}_.on(`openchange`,t);let n=e.createElement(`span`);n.setAttribute(`tabindex`,`-1`),n.setAttribute(`aria-hidden`,`true`),Object.assign(n.style,Dr),ne&&y&&y.insertAdjacentElement(`afterend`,n);function i(){if(typeof A.current==`boolean`){let e=y||Br();return e&&e.isConnected?e:n}return A.current.current||n}return()=>{_.off(`openchange`,t);let r=gn(e),a=J(b,r)||j&&Cn(j.nodesRef.current,x(),!1).some(e=>J(e.context?.elements.floating,r)),o=i();queueMicrotask(()=>{let t=Vr(o);A.current&&!F.current&&U(t)&&(!(t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),n.remove()})}},[r,b,R,A,v,_,j,ne,y,x]),i.useEffect(()=>(queueMicrotask(()=>{F.current=!1}),()=>{queueMicrotask(Rr)}),[r]),Z(()=>
3{if(!r&&M)return M.setFocusManagerState({modal:u,closeOnFocusOut:f,open:h,onOpenChange:g,domReference:y}),()=>{M.setFocusManagerState(null)}},[r,M,u,h,g,f,y]),Z(()=>{r||R&&Hr(R,O)},[r,R,O]);function ce(e){return r||!d||!u?null:(0,I.jsx)(Ur,{ref:e===`start`?N:P,onClick:e=>g(!1,e.nativeEvent),children:typeof d==`string`?d:`Dismiss`})}let le=!r&&E&&(u?!w:!0)&&(ne||u);return(0,I.jsxs)(I.Fragment,{children:[le&&(0,I.jsx)(Or,{"data-type":`inside`,ref:oe,onFocus:e=>{if(u){let e=re();pr(a[0]===`reference`?e[0]:e[e.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(F.current=!1,Ln(e,M.portalNode))Fn(y)?.focus();else{var t;(t=M.beforeOutsideRef.current)==null||t.focus()}}}),!w&&ce(`start`),n,ce(`end`),le&&(0,I.jsx)(Or,{"data-type":`inside`,ref:se,onFocus:e=>{if(u)pr(re()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(f&&(F.current=!0),Ln(e,M.portalNode))In(y)?.focus();else{var t;(t=M.afterOutsideRef.current)==null||t.focus()}}})]})}function Gr(e){return U(e.target)&&e.target.tagName===`BUTTON`}function Kr(e){return U(e.target)&&e.target.tagName===`A`}function qr(e){return yn(e)}function Jr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:a,elements:{domReference:o}}=e,{enabled:s=!0,event:c=`click`,toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=t,p=i.useRef(),m=i.useRef(!1),h=i.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){let t=p.current;e.button===0&&c!==`click`&&(kn(t,!0)&&u||(n&&l&&(!(a.current.openEvent&&f)||a.current.openEvent.type===`mousedown`)?r(!1,e.nativeEvent,`click`):(e.preventDefault(),r(!0,e.nativeEvent,`click`))))},onClick(e){let t=p.current;if(c===`mousedown`&&p.current){p.current=void 0;return}kn(t,!0)&&u||(n&&l&&(!(a.current.openEvent&&f)||a.current.openEvent.type===`click`)?r(!1,e.nativeEvent,`click`):r(!0,e.nativeEvent,`click`))},onKeyDown(e){p.current=void 0,!(e.defaultPrevented||!d||Gr(e))&&(e.key===` `&&!qr(o)&&(e.preventDefault(),m.current=!0),!Kr(e)&&e.key===`Enter`&&r(!(n&&l),e.nativeEvent,`click`))},onKeyUp(e){e.defaultPrevented||!d||Gr(e)||qr(o)||e.key===` `&&m.current&&(m.current=!1,r(!(n&&l),e.nativeEvent,`click`))}}),[a,o,c,u,d,r,n,f,l]);return i.useMemo(()=>s?{reference:h}:{},[s,h])}var Yr={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Xr={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Zr=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Qr(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:a,dataRef:o}=e,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u=`pointerdown`,referencePress:d=!1,referencePressEvent:f=`pointerdown`,ancestorScroll:p=!1,bubbles:m,capture:h}=t,g=or(),_=Q(typeof l==`function`?l:()=>!1),v=typeof l==`function`?_:l,y=i.useRef(!1),{escapeKey:b,outsidePress:x}=Zr(m),{escapeKey:S,outsidePress:C}=Zr(h),w=i.useRef(!1),T=Q(e=>{if(!n||!s||!c||e.key!==`Escape`||w.current)return;let t=o.current.floatingContext?.nodeId,i=g?Cn(g.nodesRef.current,t):[];if(!b&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,En(e)?e.nativeEvent:e,`escape-key`)}),E=Q(e=>{var t;let n=()=>{var t;T(e),(t=Y(e))==null||t.removeEventListener(`keydown`,n)};(t=Y(e))==null||t.addEventListener(`keydown`,n)}),D=Q(e=>{let t=o.current.insideReactTree;o.current.insideReactTree=!1;let n=y.current;if(y.current=!1,u===`click`&&n||t||typeof v==`function`&&!v(e))return;let i=Y(e),s=`[`+sr(`inert`)+`]`,c=X(a.floating).querySelectorAll(s),l=H(i)?i:null;for(;l&&!W(l);){let e=K(l);if(W(e)||!H(e))break;l=e}if(c.length&&H(i)&&!vn(i)&&!J(i,a.floating)&&Array.from(c).every(e=>!J(l,e)))return;if(U(i)&&A){let t=W(i),n=G(i),r=/auto|scroll/,a=t||r.test(n.overflowX),o=t||r.test(n.overflowY),s=a&&i.clientWidth>0&&i.scrollWidth>i.clientWidth,c=o&&i.clientHeight>0&&i.scrollHeight>i.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=i.offsetWidth-i.clientWidth:e.offsetX>i.clientWidth),d=s&&e.offsetY>i.clientHeight;if(u||d)return}let d=o.current.floatingContext?.nodeId,f=g&&Cn(g.nodesRef.current,d).some(t=>_n(e,t.context?.elements.floating));if(_n(e,a.floating)||_n(e,a.domReference)||f)return;let p=g?Cn(g.nodesRef.current,d):[];if(p.length>0){let e=!0;
3if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),O=Q(e=>{var t;let n=()=>{var t;D(e),(t=Y(e))==null||t.removeEventListener(u,n)};(t=Y(e))==null||t.addEventListener(u,n)});i.useEffect(()=>{if(!n||!s)return;o.current.__escapeKeyBubbles=b,o.current.__outsidePressBubbles=x;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function i(){window.clearTimeout(e),w.current=!0}function l(){e=window.setTimeout(()=>{w.current=!1},De()?5:0)}let d=X(a.floating);c&&(d.addEventListener(`keydown`,S?E:T,S),d.addEventListener(`compositionstart`,i),d.addEventListener(`compositionend`,l)),v&&d.addEventListener(u,C?O:D,C);let f=[];return p&&(H(a.domReference)&&(f=q(a.domReference)),H(a.floating)&&(f=f.concat(q(a.floating))),!H(a.reference)&&a.reference&&a.reference.contextElement&&(f=f.concat(q(a.reference.contextElement)))),f=f.filter(e=>e!==d.defaultView?.visualViewport),f.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{c&&(d.removeEventListener(`keydown`,S?E:T,S),d.removeEventListener(`compositionstart`,i),d.removeEventListener(`compositionend`,l)),v&&d.removeEventListener(u,C?O:D,C),f.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[o,a,c,v,u,n,r,p,s,b,x,T,S,E,D,C,O]),i.useEffect(()=>{o.current.insideReactTree=!1},[o,v,u]);let k=i.useMemo(()=>({onKeyDown:T,...d&&{[Yr[f]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...f!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[T,r,d,f]),A=i.useMemo(()=>{function e(e){e.button===0&&(y.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Xr[u]]:()=>{o.current.insideReactTree=!0}}},[T,u,o]);return i.useMemo(()=>s?{reference:k,floating:A}:{},[s,k,A])}function $r(e){let{open:t=!1,onOpenChange:n,elements:r}=e,a=er(),o=i.useRef({}),[s]=i.useState(()=>nr()),c=ar()!=null,[l,u]=i.useState(r.reference),d=Q((e,t,r)=>{o.current.openEvent=e?t:void 0,s.emit(`openchange`,{open:e,event:t,reason:r,nested:c}),n?.(e,t,r)}),f=i.useMemo(()=>({setPositionReference:u}),[]),p=i.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return i.useMemo(()=>({dataRef:o,open:t,onOpenChange:d,elements:p,events:s,floatingId:a,refs:f}),[t,d,p,s,a,f])}function ei(e){e===void 0&&(e={});let{nodeId:t}=e,n=$r({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,a=r.elements,[o,s]=i.useState(null),[c,l]=i.useState(null),u=a?.domReference||o,d=i.useRef(null),f=or();Z(()=>{u&&(d.current=u)},[u]);let p=xt({...e,elements:{...a,...c&&{reference:c}}}),m=i.useCallback(e=>{let t=H(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),p.refs.setReference(t)},[p.refs]),h=i.useCallback(e=>{(H(e)||e===null)&&(d.current=e,s(e)),(H(p.refs.reference.current)||p.refs.reference.current===null||e!==null&&!H(e))&&p.refs.setReference(e)},[p.refs]),g=i.useMemo(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:d}),[p.refs,h,m]),_=i.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),v=i.useMemo(()=>({...p,...r,refs:g,elements:_,nodeId:t}),[p,g,_,t,r]);return Z(()=>{r.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),i.useMemo(()=>({...p,context:v,refs:g,elements:_}),[p,g,_,v])}function ti(){return fn()&&un()}function ni(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:a,dataRef:o,elements:s}=e,{enabled:c=!0,visibleOnly:l=!0}=t,u=i.useRef(!1),d=i.useRef(-1),f=i.useRef(!0);i.useEffect(()=>{if(!c)return;let e=B(s.domReference);function t(){!n&&U(s.domReference)&&s.domReference===gn(X(s.domReference))&&(u.current=!0)}function r(){f.current=!0}function i(){f.current=!1}return e.addEventListener(`blur`,t),ti()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),ti()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[s.domReference,n,c]),i.useEffect(()=>{if(!c)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(u.current=!0)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,c]),i.useEffect(()=>()=>{$(d)},[]);let p=i.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;let t=Y(e.nativeEvent);if(l&&H(t)){if(ti()&&!e.relatedTarget){if(!f.current&&!yn(t))return}else if(!xn(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){u.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=H(t)&&t.hasAttribute(sr(`focu
3s-guard`))&&t.getAttribute(`data-type`)===`outside`;d.current=window.setTimeout(()=>{let e=gn(s.domReference?s.domReference.ownerDocument:document);!t&&e===s.domReference||J(o.current.floatingContext?.refs.floating.current,e)||J(s.domReference,e)||i||r(!1,n,`focus`)})}}),[o,s.domReference,r,l]);return i.useMemo(()=>c?{reference:p}:{},[c,p])}function ri(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Vn]:t,[Hn]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Bn]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Vn,Hn].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function ii(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),a=i.useCallback(t=>ri(t,e,`reference`),t),o=i.useCallback(t=>ri(t,e,`floating`),n),s=i.useCallback(t=>ri(t,e,`item`),r);return i.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s}),[a,o,s])}function ai(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...ai(e,t.id,n)])}function oi(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function si(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ci(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){$(i),u()}if($(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=hr(e),v=e.type===`mouseleave`,y=mr(c.floating,_),b=mr(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=si(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&H(e.relatedTarget)&&mr(c.floating,e.relatedTarget)||f&&ai(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]];break}function P(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!oi([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}oi([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}export{wt as _,Jr as a,ot as b,ni as c,At as d,Ot as f,Ct as g,Tt as h,ci as i,dr as l,kt as m,Wr as n,Qr as o,Et as p,Nr as r,ei as s,tr as t,ii as u,Dt as v,xt as y};
4//# sourceMappingURL=floating-ui.react-SnMdqaDc.js.map
5//# debugId=5e1d9b7f-cc29-5ca8-a5da-cb0e071d20dc

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.