(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,258950,343084,953760,e=>{"use strict";let t=["top","right","bottom","left"],n=t.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),r=Math.min,i=Math.max,l=Math.round,o=Math.floor,f=e=>({x:e,y:e}),a={left:"right",right:"left",bottom:"top",top:"bottom"};function u(e,t,n){return i(e,r(t,n))}function c(e,t){return"function"==typeof e?e(t):e}function s(e){return e.split("-")[0]}function h(e){return e.split("-")[1]}function d(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}function g(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function p(e){return d(g(e))}function y(e,t,n){void 0===n&&(n=!1);let r=h(e),i=p(e),l=m(i),o="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[l]>t.floating[l]&&(o=L(o)),[o,L(o)]}function w(e){let t=L(e);return[x(e),t,x(t)]}function x(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let v=["left","right"],b=["right","left"],R=["top","bottom"],A=["bottom","top"];function T(e,t,n,r){let i=h(e),l=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?b:v;return t?v:b;case"left":case"right":return t?R:A;default:return[]}}(s(e),"start"===n,r);return i&&(l=l.map(e=>e+"-"+i),t&&(l=l.concat(l.map(x)))),l}function L(e){let t=s(e);return a[t]+e.slice(t.length)}function O(e){var t,n,r,i;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(i=e.left)?i:0}:{top:e,right:e,bottom:e,left:e}}function E(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}}function P(e,t,n){let r,{reference:i,floating:l}=e,o=g(t),f=p(t),a=m(f),u=s(t),c=i.x+i.width/2-l.width/2,d=i.y+i.height/2-l.height/2,y=i[a]/2-l[a]/2;switch(u){case"top":r={x:c,y:i.y-l.height};break;case"bottom":r={x:c,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:d};break;case"left":r={x:i.x-l.width,y:d};break;default:r={x:i.x,y:i.y}}let w=h(t);return w&&(r[f]+=y*("end"===w?1:-1)*(n&&"y"===o?-1:1)),r}async function C(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:l,rects:o,elements:f,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:s="viewport",elementContext:h="floating",altBoundary:d=!1,padding:m=0}=c(t,e),g=O(m),p=f[d?"floating"===h?"reference":"floating":h],y=E(await l.getClippingRect({element:null==(n=await (null==l.isElement?void 0:l.isElement(p)))||n?p:p.contextElement||await (null==l.getDocumentElement?void 0:l.getDocumentElement(f.floating)),boundary:u,rootBoundary:s,strategy:a})),w="floating"===h?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,x=await (null==l.getOffsetParent?void 0:l.getOffsetParent(f.floating)),v=await (null==l.isElement?void 0:l.isElement(x))&&await (null==l.getScale?void 0:l.getScale(x))||{x:1,y:1},b=E(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:w,offsetParent:x,strategy:a}):w);return{top:(y.top-b.top+g.top)/v.y,bottom:(b.bottom-y.bottom+g.bottom)/v.y,left:(y.left-b.left+g.left)/v.x,right:(b.right-y.right+g.right)/v.x}}e.s(["O",0,u,"I",0,f,"h",0,c,"w",0,o,"R",0,h,"i",0,p,"N",0,y,"T",0,m,"P",0,w,"o",0,x,"J",0,d,"K",0,T,"t",0,L,"j",0,O,"m",0,s,"$",0,g,"y",0,i,"u",0,r,"Z",0,n,"_",0,E,"H",0,l,"M",0,t],343084);let D=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:l=[],platform:o}=n,f=o.detectOverflow?o:{...o,detectOverflow:C},a=await (null==o.isRTL?void 0:o.isRTL(t)),u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:s}=P(u,r,a),h=r,d=0,m={};for(let n=0;ne[t]>=0)}function H(e){let t=r(...e.map(e=>e.left)),n=r(...e.map(e=>e.top));return{x:t,y:n,width:i(...e.map(e=>e.right))-t,height:i(...e.map(e=>e.bottom))-n}}let M=new Set(["left","top"]);async function W(e,t){let{placement:n,platform:r,elements:i}=e,l=await (null==r.isRTL?void 0:r.isRTL(i.floating)),o=s(n),f=h(n),a="y"===g(n),u=M.has(o)?-1:1,d=l&&a?-1:1,m=c(t,e),{mainAxis:p,crossAxis:y,alignmentAxis:w}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return f&&"number"==typeof w&&(y="end"===f?-1*w:w),a?{x:y*d,y:p*u}:{x:p*u,y:y*d}}var B=e.i(229315);function I(e){let t=(0,B.X)(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=(0,B.E)(e),o=i?e.offsetWidth:n,f=i?e.offsetHeight:r,a=l(n)!==o||l(r)!==f;return a&&(n=o,r=f),{width:n,height:r,$:a}}function k(e){return(0,B.m)(e)?e:e.contextElement}function K(e){let t=k(e);if(!(0,B.E)(t))return f(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=I(t),a=(o?l(n.width):n.width)/r,u=(o?l(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}let V=f(0);function X(e){let t=(0,B.K)(e);return(0,B.i)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:V}function z(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let l=e.getBoundingClientRect(),o=k(e),a=f(1);t&&(r?(0,B.m)(r)&&(a=K(r)):a=K(e));let u=(void 0===(i=n)&&(i=!1),r&&i&&r===(0,B.K)(o))?X(o):f(0),c=(l.left+u.x)/a.x,s=(l.top+u.y)/a.y,h=l.width/a.x,d=l.height/a.y;if(o&&r){let e=(0,B.K)(o),t=(0,B.m)(r)?(0,B.K)(r):r,n=e,i=(0,B.w)(n);for(;i&&t!==n;){let e=K(i),t=i.getBoundingClientRect(),r=(0,B.X)(i),l=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,h*=e.x,d*=e.y,c+=l,s+=o,n=(0,B.K)(i),i=(0,B.w)(n)}}return E({width:h,height:d,x:c,y:s})}function j(e,t){let n=(0,B.Q)(e).scrollLeft;return t?t.left+n:z((0,B.I)(e)).left+n}function J(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-j(e,n),y:n.top+t.scrollTop}}function _(e,t,n){var r;let l;if("viewport"===t||"layoutViewport"===t)l=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,i=(0,B.K)(e),l=(0,B.I)(e),o=i.visualViewport,f=l.clientWidth,a=l.clientHeight,u=0,c=0;if(o){let e=!(0,B.i)()||"fixed"===t;r?e||(u=-o.offsetLeft,c=-o.offsetTop):(f=o.width,a=o.height,e&&(u=o.offsetLeft,c=o.offsetTop))}if(0>=j(l)){let e=l.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(l.clientWidth-t.clientWidth-r),o="stable both-edges"===getComputedStyle(l).scrollbarGutter?i/2:i;o<=25&&(f-=o)}return{width:f,height:a,x:u,y:c}}(e,n,t);else if("document"===t){let t,n,o,f,a,u;r=(0,B.I)(e),t=(0,B.Q)(r),n=r.ownerDocument.body,o=i(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),f=i(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+j(r),u=-t.scrollTop,"rtl"===(0,B.X)(n).direction&&(a+=i(r.clientWidth,n.clientWidth)-o),l={width:o,height:f,x:a,y:u}}else if((0,B.m)(t)){let e,r,i,o,f,a;r=(e=z(t,!0,"fixed"===n)).top+t.clientTop,i=e.left+t.clientLeft,o=K(t),f=t.clientWidth*o.x,a=t.clientHeight*o.y,l={width:f,height:a,x:i*o.x,y:r*o.y}}else{let n=X(e);l={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return E(l)}function G(e){return"static"===(0,B.X)(e).position}function Q(e,t){if(!(0,B.E)(e)||"fixed"===(0,B.X)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,B.I)(e)===n&&(n=n.ownerDocument.body),n}function Z(e,t){let n=(0,B.K)(e);if((0,B.D)(e))return n;if(!(0,B.E)(e)){let t=(0,B.J)(e);for(;t&&!(0,B.Z)(t);){if((0,B.m)(t)&&!G(t))return t;t=(0,B.J)(t)}return n}let r=Q(e,t);for(;r&&(0,B.S)(r)&&G(r);)r=Q(r,t);return r&&(0,B.Z)(r)&&G(r)&&!(0,B.e)(r)?n:r||(0,B.f)(e)||n}let $=async function(e){let t=this.getOffsetParent||Z,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=(0,B.E)(t),i=(0,B.I)(t),l="fixed"===n,o=z(e,!0,l,t),a={scrollLeft:0,scrollTop:0},u=f(0);if((r||!l)&&(("body"!==(0,B.A)(t)||(0,B.B)(i))&&(a=(0,B.Q)(t)),r)){let e=z(t,!0,l,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}!r&&i&&(u.x=j(i));let c=!i||r||l?f(0):J(i,a);return{x:o.left+a.scrollLeft-u.x-c.x,y:o.top+a.scrollTop-u.y-c.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},q={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,l="fixed"===i,o=(0,B.I)(r),a=!!t&&(0,B.D)(t.floating);if(r===o||a&&l)return n;let u={scrollLeft:0,scrollTop:0},c=f(1),s=f(0),h=(0,B.E)(r);if((h||!l)&&(("body"!==(0,B.A)(r)||(0,B.B)(o))&&(u=(0,B.Q)(r)),h)){let e=z(r);c=K(r),s.x=e.x+r.clientLeft,s.y=e.y+r.clientTop}let d=!o||h||l?f(0):J(o,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+s.x+d.x,y:n.y*c.y-u.scrollTop*c.y+s.y+d.y}},getDocumentElement:B.I,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:l,strategy:o}=e,f=[..."clippingAncestors"===n?(0,B.D)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=(0,B.G)(e,[],!1).filter(e=>(0,B.m)(e)&&"body"!==(0,B.A)(e)),i=null,l="fixed"===(0,B.X)(e).position,o=l?(0,B.J)(e):e;for(;(0,B.m)(o)&&!(0,B.Z)(o);){let e=(0,B.X)(o),t=(0,B.e)(o),n=i?i.position:l?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==o),o=(0,B.J)(o)}return t.set(e,r),r}(t,this._c):[].concat(n),l],a=_(t,f[0],o),u=a.top,c=a.right,s=a.bottom,h=a.left;for(let e=1;e{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=c(e,t),h={x:n,y:r},m=await l.detectOverflow(t,s),p=g(i),y=d(p),w=h[y],x=h[p],v=(e,t)=>u(t+m["y"===e?"top":"left"],t,t-m["y"===e?"bottom":"right"]);o&&(w=v(y,w)),f&&(x=v(p,x));let b=a.fn({...t,[y]:w,[p]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[y]:o,[p]:f}}}}}},ee=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,l,o;let{placement:f,middlewareData:a,rects:u,initialPlacement:h,platform:d,elements:m}=t,{mainAxis:p=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:A=!0,...O}=c(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};let E=s(f),P=g(h),C=s(h)===h,D=await (null==d.isRTL?void 0:d.isRTL(m.floating)),S=v||(C||!A?[L(h)]:w(h)),F="none"!==R;!v&&F&&S.push(...T(h,A,R,D));let H=[h,...S],M=await d.detectOverflow(t,O),W=[],B=(null==(r=a.flip)?void 0:r.overflows)||[];if(p&&W.push(M[E]),x){let e=y(f,u,D);W.push(M[e[0]],M[e[1]])}if(B=[...B,{placement:f,overflows:W}],!W.every(e=>e<=0)){let e=((null==(i=a.flip)?void 0:i.index)||0)+1,t=H[e];if(t&&("alignment"!==x||P===g(t)||B.every(e=>g(e.placement)!==P||e.overflows[0]>0)))return{data:{index:e,overflows:B},reset:{placement:t}};let n=null==(l=B.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:l.placement;if(!n)switch(b){case"bestFit":{let e=null==(o=B.filter(e=>{if(F){let t=g(e.placement);return t===P||"y"===t}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])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=h}if(f!==n)return{reset:{placement:n}}}return{}}}},et=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){let n,l,{placement:o,rects:f,platform:a,elements:u}=t,{apply:d=()=>{},...m}=c(e,t),p=await a.detectOverflow(t,m),y=s(o),w=h(o),x="y"===g(o),{width:v,height:b}=f.floating;"top"===y||"bottom"===y?(n=y,l=w===(await (null==a.isRTL?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(l=y,n="end"===w?"top":"bottom");let R=b-p.top-p.bottom,A=v-p.left-p.right,T=r(b-p[n],R),L=r(v-p[l],A),O=t.middlewareData.shift,E=!O,P=T,C=L;null!=O&&O.enabled.x&&(C=A),null!=O&&O.enabled.y&&(P=R),E&&!w&&(x?C=v-2*i(p.left,p.right):P=b-2*i(p.top,p.bottom)),await d({...t,availableWidth:C,availableHeight:P});let D=await a.getDimensions(u.floating);return v!==D.width||b!==D.height?{reset:{rects:!0}}:{}}}},en=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i="referenceHidden",...l}=c(e,t);switch(i){case"referenceHidden":{let e=S(await r.detectOverflow(t,{...l,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:F(e)}}}case"escaped":{let e=S(await r.detectOverflow(t,{...l,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:F(e)}}}default:return{}}}}},er=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:i,placement:l,rects:o,platform:f,elements:a,middlewareData:s}=t,{element:d,padding:g=0}=c(e,t)||{};if(null==d)return{};let y=O(g),w={x:n,y:i},x=p(l),v=m(x),b=await f.getDimensions(d),R="y"===x,A=R?"clientHeight":"clientWidth",T=o.reference[v]+o.reference[x]-w[x]-o.floating[v],L=w[x]-o.reference[x],E=await (null==f.getOffsetParent?void 0:f.getOffsetParent(d)),P=E?E[A]:0;P&&await (null==f.isElement?void 0:f.isElement(E))||(P=a.floating[A]||o.floating[v]);let C=P/2-b[v]/2-1,D=r(y[R?"top":"left"],C),S=r(y[R?"bottom":"right"],C),F=P-b[v]-S,H=P/2-b[v]/2+(T/2-L/2),M=u(D,H,F),W=!s.arrow&&null!=h(l)&&H!==M&&o.reference[v]/2-(Hn&&(b=n)}if(y){let e="y"===v?"width":"height",t=M.has(s(a)),n=u.reference[x]-u.floating[e]+(t&&(null==(i=h.offset)?void 0:i[x])||0)+(t?0:T.crossAxis),r=u.reference[x]+u.reference[e]+(t?0:(null==(l=h.offset)?void 0:l[x])||0)-(t?T.crossAxis:0);Rr&&(R=r)}return{[v]:b,[x]:R}}}},el=(e,t,n)=>{let r=new Map,i=null!=n?n:{},l={...q,...i.platform,_c:r};return D(e,t,{...i,platform:l})};e.s(["P",0,er,"p",0,function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,l,o;let{rects:f,middlewareData:a,placement:u,platform:d,elements:m}=t,{crossAxis:g=!1,alignment:p,allowedPlacements:w=n,autoAlignment:v=!0,...b}=c(e,t),R=void 0!==p||w===n?((o=p||null)?[...w.filter(e=>h(e)===o),...w.filter(e=>h(e)!==o)]:w.filter(e=>s(e)===e)).filter(e=>!o||h(e)===o||!!v&&x(e)!==e):w,A=(null==(r=a.autoPlacement)?void 0:r.index)||0,T=R[A];if(null==T)return{};if(u!==T)return{reset:{placement:R[0]}};let L=await d.detectOverflow(t,b),O=y(T,f,await (null==d.isRTL?void 0:d.isRTL(m.floating))),E=[L[s(T)],L[O[0]],L[O[1]]],P=[...(null==(i=a.autoPlacement)?void 0:i.overflows)||[],{placement:T,overflows:E}],C=R[A+1];if(C)return{data:{index:A+1,overflows:P},reset:{placement:C}};let D=P.map(e=>{let t=h(e.placement);return[e.placement,t&&g?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),S=(null==(l=D.filter(e=>e[2].slice(0,h(e[0])?2:3).every(e=>e<=0))[0])?void 0:l[0])||D[0][0];return S!==u?{data:{index:A+1,overflows:P},reset:{placement:S}}:{}}}},"n",0,function(e,t,n,l){let f;void 0===l&&(l={});let{ancestorScroll:a=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:h=!1}=l,d=k(e),m=a||u?[...d?(0,B.G)(d):[],...t?(0,B.G)(t):[]]:[];m.forEach(e=>{a&&e.addEventListener("scroll",n),u&&e.addEventListener("resize",n)});let g=d&&s?function(e,t,n){let l,f=null,a=(0,B.I)(e);function u(){var e;clearTimeout(l),null==(e=f)||e.disconnect(),f=null}function c(n,s){void 0===n&&(n=!1),void 0===s&&(s=1),u();let h=e.getBoundingClientRect(),{left:d,top:m,width:g,height:p}=h;if(n||t(),!g||!p)return;let y={rootMargin:-o(m)+"px "+-o(a.clientWidth-(d+g))+"px "+-o(a.clientHeight-(m+p))+"px "+-o(d)+"px",threshold:i(0,r(1,s))||1},w=!0;function x(t){let n=t[0].intersectionRatio;if(!N(h,e.getBoundingClientRect()))return c();if(n!==s){if(!w)return c();n?c(!1,n):l=setTimeout(()=>{c(!1,1e-7)},1e3)}w=!1}try{f=new IntersectionObserver(x,{...y,root:a.ownerDocument})}catch(e){f=new IntersectionObserver(x,y)}f.observe(e)}let s=(0,B.K)(e),h=()=>c(n);return s.addEventListener("resize",h),c(!0),()=>{s.removeEventListener("resize",h),u()}}(d,n,u):null,p=-1,y=null;c&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),d&&!h&&y.observe(d),t&&y.observe(t));let w=h?z(e):null;return h&&function t(){let r=z(e);w&&!N(w,r)&&n(),w=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;m.forEach(e=>{a&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==g||g(),null==(e=y)||e.disconnect(),y=null,h&&cancelAnimationFrame(f)}},"A",0,el,"x",0,ee,"c",0,en,"g",0,function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:l,rects:o,platform:f,strategy:a}=t,{padding:u=2,x:h,y:d}=c(e,t),m=Array.from(await (null==f.getClientRects?void 0:f.getClientRects(l.reference))||[]);if(!m.length)return{};let p=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>E(H(e)))}(m),y=E(H(m)),w=O(u),x=await f.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&(p[0].left>p[1].right||p[1].left>p[0].right)&&null!=h&&null!=d)return p.find(e=>h>e.left-w.left&&he.top-w.top&&d=2){if("y"===g(n)){let e=p[0],t=p[p.length-1],r="top"===s(n),i=e.top,l=t.bottom,o=r?e.left:t.left;return E({x:o,y:i,width:(r?e.right:t.right)-o,height:l-i})}let e="left"===s(n),t=i(...p.map(e=>e.right)),l=r(...p.map(e=>e.left)),o=p.filter(n=>e?n.left===l:n.right===t),f=o[0].top;return E({x:l,y:f,width:t-l,height:o[o.length-1].bottom-f})}return y}},floating:l.floating,strategy:a});return o.reference.x!==x.reference.x||o.reference.y!==x.reference.y||o.reference.width!==x.reference.width||o.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}},"o",0,ei,"T",0,U,"q",0,q,"e",0,Y,"r",0,et],953760);var eo=e.i(271645),ef=e.i(174080),ea="u">typeof document?eo.useLayoutEffect:function(){};function eu(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eu(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!eu(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ec(e){return"u"{t.current=e}),t}e.s(["P",0,(e,t)=>{let n={name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?er({element:n.current,padding:r}).fn(t):{}:n?er({element:n,padding:r}).fn(t):{}}};return{name:n.name,fn:n.fn,options:[e,t]}},"x",0,(e,t)=>{let n=ee(e);return{name:n.name,fn:n.fn,options:[e,t]}},"c",0,(e,t)=>{let n=en(e);return{name:n.name,fn:n.fn,options:[e,t]}},"n",0,(e,t)=>({fn:ei(e).fn,options:[e,t]}),"T",0,(e,t)=>{let n=U(e);return{name:n.name,fn:n.fn,options:[e,t]}},"e",0,(e,t)=>{let n=Y(e);return{name:n.name,fn:n.fn,options:[e,t]}},"o",0,(e,t)=>{let n=et(e);return{name:n.name,fn:n.fn,options:[e,t]}},"E",0,function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:l,floating:o}={},transform:f=!0,whileElementsMounted:a,open:u}=e,[c,s]=eo.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=eo.useState(r);eu(h,r)||d(r);let[m,g]=eo.useState(null),[p,y]=eo.useState(null),w=eo.useCallback(e=>{e!==R.current&&(R.current=e,g(e))},[]),x=eo.useCallback(e=>{e!==A.current&&(A.current=e,y(e))},[]),v=l||m,b=o||p,R=eo.useRef(null),A=eo.useRef(null),T=eo.useRef(c),L=null!=a,O=eh(a),E=eh(i),P=eh(u),C=eo.useCallback(()=>{if(!R.current||!A.current)return;let e={placement:t,strategy:n,middleware:h};E.current&&(e.platform=E.current),el(R.current,A.current,e).then(e=>{let t={...e,isPositioned:!1!==P.current};D.current&&!eu(T.current,t)&&(T.current=t,ef.flushSync(()=>{s(t)}))})},[h,t,n,E,P]);ea(()=>{!1===u&&T.current.isPositioned&&(T.current.isPositioned=!1,s(e=>({...e,isPositioned:!1})))},[u]);let D=eo.useRef(!1);ea(()=>(D.current=!0,()=>{D.current=!1}),[]),ea(()=>{if(v&&(R.current=v),b&&(A.current=b),v&&b){if(O.current)return O.current(v,b,C);C()}},[v,b,C,O,L]);let S=eo.useMemo(()=>({reference:R,floating:A,setReference:w,setFloating:x}),[w,x]),F=eo.useMemo(()=>({reference:v,floating:b}),[v,b]),H=eo.useMemo(()=>{let e={position:n,left:0,top:0};if(!F.floating)return e;let t=es(F.floating,c.x),r=es(F.floating,c.y);return f?{...e,transform:"translate("+t+"px, "+r+"px)",...ec(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,f,F.floating,c.x,c.y]);return eo.useMemo(()=>({...c,update:C,refs:S,elements:F,floatingStyles:H}),[c,C,S,F,H])}],258950)}]);