From 6ac09b7b5c7c6fdaa7d57f5e85bfc6c71d31217e Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 28 May 2024 19:00:35 +0200 Subject: [PATCH] Update UI --- src/main/resources/webview/dashboard/index.js | 14 +-- .../resources/webview/documentation/index.js | 22 ++-- .../webview/installationwizard/index.js | 111 ++++++++++-------- src/main/resources/webview/main/index.js | 16 +-- .../resources/webview/navigation/index.js | 12 +- .../resources/webview/recentactivity/index.js | 6 +- .../webview/troubleshooting/index.js | 24 +++- 7 files changed, 119 insertions(+), 86 deletions(-) diff --git a/src/main/resources/webview/dashboard/index.js b/src/main/resources/webview/dashboard/index.js index 6a22cf4ff..570e2b156 100644 --- a/src/main/resources/webview/dashboard/index.js +++ b/src/main/resources/webview/dashboard/index.js @@ -1,5 +1,5 @@ /*! For license information please see index.js.LICENSE.txt */ -(()=>{var e,t,n={85114:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FloatingArrow:()=>ut,FloatingDelayGroup:()=>Tt,FloatingFocusManager:()=>Xt,FloatingList:()=>nn,FloatingNode:()=>mt,FloatingOverlay:()=>an,FloatingPortal:()=>Yt,FloatingTree:()=>yt,arrow:()=>we,autoPlacement:()=>P,autoUpdate:()=>me,computePosition:()=>ye,detectOverflow:()=>O,flip:()=>I,getOverflowAncestors:()=>ne,hide:()=>A,inline:()=>j,inner:()=>Wn,limitShift:()=>F,offset:()=>M,platform:()=>ge,safePolygon:()=>Kn,shift:()=>D,size:()=>z,useClick:()=>un,useClientPoint:()=>pn,useDelayGroup:()=>kt,useDelayGroupContext:()=>xt,useDismiss:()=>yn,useFloating:()=>vn,useFloatingNodeId:()=>gt,useFloatingParentNodeId:()=>pt,useFloatingPortalNode:()=>Qt,useFloatingTree:()=>ht,useFocus:()=>bn,useHover:()=>Et,useId:()=>st,useInnerOffset:()=>Gn,useInteractions:()=>wn,useListItem:()=>rn,useListNavigation:()=>jn,useMergeRefs:()=>Mn,useRole:()=>Dn,useTransitionStatus:()=>Bn,useTransitionStyles:()=>Un,useTypeahead:()=>$n});const r=["top","right","bottom","left"],o=["start","end"],i=r.reduce(((e,t)=>e.concat(t,t+"-"+o[0],t+"-"+o[1])),[]),a=Math.min,l=Math.max,s=Math.round,u=Math.floor,c=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function p(e,t,n){return l(e,a(t,n))}function h(e,t){return"function"==typeof e?e(t):e}function g(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function y(e){return"x"===e?"y":"x"}function v(e){return"y"===e?"height":"width"}function b(e){return["top","bottom"].includes(g(e))?"y":"x"}function S(e){return y(b(e))}function w(e,t,n){void 0===n&&(n=!1);const r=m(e),o=S(e),i=v(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=_(a)),[a,_(a)]}function E(e){return e.replace(/start|end/g,(e=>f[e]))}function _(e){return e.replace(/left|right|bottom|top/g,(e=>d[e]))}function x(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function T(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function k(e,t,n){let{reference:r,floating:o}=e;const i=b(t),a=S(t),l=v(a),s=g(t),u="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(m(t)){case"start":p[a]-=f*(n&&u?-1:1);break;case"end":p[a]+=f*(n&&u?-1:1)}return p}async function O(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=h(t,e),g=x(p),m=l[f?"floating"===d?"reference":"floating":d],y=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:s})),v="floating"===d?{...a.floating,x:r,y:o}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),S=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:s}):v);return{top:(y.top-w.top+g.top)/S.y,bottom:(w.bottom-y.bottom+g.bottom)/S.y,left:(y.left-w.left+g.left)/S.x,right:(w.right-y.right+g.right)/S.x}}const C=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:s}=t,{element:u,padding:c=0}=h(e,t)||{};if(null==u)return{};const d=x(c),f={x:n,y:r},g=S(o),y=v(g),b=await l.getDimensions(u),w="y"===g,E=w?"top":"left",_=w?"bottom":"right",T=w?"clientHeight":"clientWidth",k=i.reference[y]+i.reference[g]-f[g]-i.floating[y],O=f[g]-i.reference[g],C=await(null==l.getOffsetParent?void 0:l.getOffsetParent(u));let P=C?C[T]:0;P&&await(null==l.isElement?void 0:l.isElement(C))||(P=s.floating[T]||i.floating[y]);const I=k/2-O/2,R=P/2-b[y]/2-1,N=a(d[E],R),A=a(d[_],R),L=N,j=P-b[y]-A,M=P/2-b[y]/2+I,D=p(L,M,j),F=null!=m(o)&&M!=D&&i.reference[y]/2-(Mm(t)===e)),...n.filter((t=>m(t)!==e))]:n.filter((e=>g(e)===e))).filter((n=>!e||m(n)===e||!!t&&E(n)!==n))}(f||null,y,p):p,S=await O(t,v),_=(null==(n=l.autoPlacement)?void 0:n.index)||0,x=b[_];if(null==x)return{};const T=w(x,a,await(null==u.isRTL?void 0:u.isRTL(c.floating)));if(s!==x)return{reset:{placement:b[0]}};const k=[S[g(x)],S[T[0]],S[T[1]]],C=[...(null==(r=l.autoPlacement)?void 0:r.overflows)||[],{placement:x,overflows:k}],P=b[_+1];if(P)return{data:{index:_+1,overflows:C},reset:{placement:P}};const I=C.map((e=>{const t=m(e.placement);return[e.placement,t&&d?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),R=(null==(o=I.filter((e=>e[2].slice(0,m(e[0])?2:3).every((e=>e<=0))))[0])?void 0:o[0])||I[0][0];return R!==s?{data:{index:_+1,overflows:C},reset:{placement:R}}:{}}}},I=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:s}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...v}=h(e,t),b=g(r),S=g(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(s.floating)),T=d||(S||!y?[_(a)]:function(e){const t=_(e);return[E(e),t,E(t)]}(a));d||"none"===p||T.push(...function(e,t,n,r){const o=m(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(g(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(E)))),i}(a,y,p,x));const k=[a,...T],C=await O(t,v),P=[];let I=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&P.push(C[b]),c){const e=w(r,i,x);P.push(C[e[0]],C[e[1]])}if(I=[...I,{placement:r,overflows:P}],!P.every((e=>e<=0))){var R,N;const e=((null==(R=o.flip)?void 0:R.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(N=I.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:N.placement;if(!n)switch(f){case"bestFit":{var A;const e=null==(A=I.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:A[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function R(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function N(e){return r.some((t=>e[t]>=0))}const A=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=h(e,t);switch(r){case"referenceHidden":{const e=R(await O(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:N(e)}}}case"escaped":{const e=R(await O(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:N(e)}}}default:return{}}}}};function L(e){const t=a(...e.map((e=>e.left))),n=a(...e.map((e=>e.top)));return{x:t,y:n,width:l(...e.map((e=>e.right)))-t,height:l(...e.map((e=>e.bottom)))-n}}const j=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:u=2,x:c,y:d}=h(e,t),f=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[]),p=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let r=null;for(let e=0;er.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map((e=>T(L(e))))}(f),m=T(L(f)),y=x(u),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=c&&null!=d)return p.find((e=>c>e.left-y.left&&ce.top-y.top&&d=2){if("y"===b(n)){const e=p[0],t=p[p.length-1],r="top"===g(n),o=e.top,i=t.bottom,a=r?e.left:t.left,l=r?e.right:t.right;return{top:o,bottom:i,left:a,right:l,width:l-a,height:i-o,x:a,y:o}}const e="left"===g(n),t=l(...p.map((e=>e.right))),r=a(...p.map((e=>e.left))),o=p.filter((n=>e?n.left===r:n.right===t)),i=o[0].top,s=o[o.length-1].bottom;return{top:i,bottom:s,left:r,right:t,width:t-r,height:s-i,x:r,y:i}}return m}},floating:r.floating,strategy:s});return o.reference.x!==v.reference.x||o.reference.y!==v.reference.y||o.reference.width!==v.reference.width||o.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},M=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=g(n),l=m(n),s="y"===b(n),u=["left","top"].includes(a)?-1:1,c=i&&s?-1:1,d=h(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof y&&(p="end"===l?-1*y:y),s?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},D=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=h(e,t),u={x:n,y:r},c=await O(t,s),d=b(g(o)),f=y(d);let m=u[f],v=u[d];if(i){const e="y"===f?"bottom":"right";m=p(m+c["y"===f?"top":"left"],m,m-c[e])}if(a){const e="y"===d?"bottom":"right";v=p(v+c["y"===d?"top":"left"],v,v-c[e])}const S=l.fn({...t,[f]:m,[d]:v});return{...S,data:{x:S.x-n,y:S.y-r}}}}},F=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:u=!0}=h(e,t),c={x:n,y:r},d=b(o),f=y(d);let p=c[f],m=c[d];const v=h(l,t),S="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+S.mainAxis,n=i.reference[f]+i.reference[e]-S.mainAxis;pn&&(p=n)}if(u){var w,E;const e="y"===f?"width":"height",t=["top","left"].includes(g(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(w=a.offset)?void 0:w[d])||0)+(t?0:S.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(E=a.offset)?void 0:E[d])||0)-(t?S.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},z=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=(()=>{}),...u}=h(e,t),c=await O(t,u),d=g(n),f=m(n),p="y"===b(n),{width:y,height:v}=r.floating;let S,w;"top"===d||"bottom"===d?(S=d,w=f===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(w=d,S="end"===f?"top":"bottom");const E=v-c[S],_=y-c[w],x=!t.middlewareData.shift;let T=E,k=_;if(p){const e=y-c.left-c.right;k=f||x?a(_,e):e}else{const e=v-c.top-c.bottom;T=f||x?a(E,e):e}if(x&&!f){const e=l(c.left,0),t=l(c.right,0),n=l(c.top,0),r=l(c.bottom,0);p?k=y-2*(0!==e||0!==t?e+t:l(c.left,c.right)):T=v-2*(0!==n||0!==r?n+r:l(c.top,c.bottom))}await s({...t,availableWidth:k,availableHeight:T});const C=await o.getDimensions(i.floating);return y!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}};function B(e){return H(e)?(e.nodeName||"").toLowerCase():"#document"}function U(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function $(e){var t;return null==(t=(H(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function H(e){return e instanceof Node||e instanceof U(e).Node}function W(e){return e instanceof Element||e instanceof U(e).Element}function G(e){return e instanceof HTMLElement||e instanceof U(e).HTMLElement}function V(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof U(e).ShadowRoot)}function K(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function q(e){return["table","td","th"].includes(B(e))}function Q(e){const t=Y(),n=J(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Z(e){return["html","body","#document"].includes(B(e))}function J(e){return U(e).getComputedStyle(e)}function X(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ee(e){if("html"===B(e))return e;const t=e.assignedSlot||e.parentNode||V(e)&&e.host||$(e);return V(t)?t.host:t}function te(e){const t=ee(e);return Z(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&K(t)?t:te(t)}function ne(e,t){var n;void 0===t&&(t=[]);const r=te(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=U(r);return o?t.concat(i,i.visualViewport||[],K(r)?r:[]):t.concat(r,ne(r))}function re(e){const t=J(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=G(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=s(n)!==i||s(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function oe(e){return W(e)?e:e.contextElement}function ie(e){const t=oe(e);if(!G(t))return c(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=re(t);let a=(i?s(n.width):n.width)/r,l=(i?s(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const ae=c(0);function le(e){const t=U(e);return Y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ae}function se(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=oe(e);let a=c(1);t&&(r?W(r)&&(a=ie(r)):a=ie(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==U(e))&&t}(i,n,r)?le(i):c(0);let s=(o.left+l.x)/a.x,u=(o.top+l.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const e=U(i),t=r&&W(r)?U(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=ie(n),t=n.getBoundingClientRect(),r=J(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,u*=e.y,d*=e.x,f*=e.y,s+=o,u+=i,n=U(n).frameElement}}return T({width:d,height:f,x:s,y:u})}function ue(e){return se($(e)).left+X(e).scrollLeft}function ce(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=U(e),r=$(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=Y();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=$(e),n=X(e),r=e.ownerDocument.body,o=l(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=l(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ue(e);const s=-n.scrollTop;return"rtl"===J(r).direction&&(a+=l(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}($(e));else if(W(t))r=function(e,t){const n=se(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=G(e)?ie(e):c(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=le(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return T(r)}function de(e,t){const n=ee(e);return!(n===t||!W(n)||Z(n))&&("fixed"===J(n).position||de(n,t))}function fe(e,t,n){const r=G(t),o=$(t),i="fixed"===n,a=se(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=c(0);if(r||!r&&!i)if(("body"!==B(t)||K(o))&&(l=X(t)),r){const e=se(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=ue(o));return{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function pe(e,t){return G(e)&&"fixed"!==J(e).position?t?t(e):e.offsetParent:null}function he(e,t){const n=U(e);if(!G(e))return n;let r=pe(e,t);for(;r&&q(r)&&"static"===J(r).position;)r=pe(r,t);return r&&("html"===B(r)||"body"===B(r)&&"static"===J(r).position&&!Q(r))?n:r||function(e){let t=ee(e);for(;G(t)&&!Z(t);){if(Q(t))return t;t=ee(t)}return null}(e)||n}const ge={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=G(n),i=$(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},l=c(1);const s=c(0);if((o||!o&&"fixed"!==r)&&(("body"!==B(n)||K(i))&&(a=X(n)),G(n))){const e=se(n);l=ie(n),s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-a.scrollLeft*l.x+s.x,y:t.y*l.y-a.scrollTop*l.y+s.y}},getDocumentElement:$,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=ne(e).filter((e=>W(e)&&"body"!==B(e))),o=null;const i="fixed"===J(e).position;let a=i?ee(e):e;for(;W(a)&&!Z(a);){const t=J(a),n=Q(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||K(a)&&!n&&de(e,a))?r=r.filter((e=>e!==a)):o=t,a=ee(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],u=i.reduce(((e,n)=>{const r=ce(t,n,o);return e.top=l(r.top,e.top),e.right=a(r.right,e.right),e.bottom=a(r.bottom,e.bottom),e.left=l(r.left,e.left),e}),ce(t,s,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:he,getElementRects:async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||he,i=this.getDimensions;return{reference:fe(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return re(e)},getScale:ie,isElement:W,isRTL:function(e){return"rtl"===J(e).direction}};function me(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,f=oe(e),p=o||i?[...f?ne(f):[],...ne(t)]:[];p.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const h=f&&c?function(e,t){let n,r=null;const o=$(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function s(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),i();const{left:f,top:p,width:h,height:g}=e.getBoundingClientRect();if(c||t(),!h||!g)return;const m={rootMargin:-u(p)+"px "+-u(o.clientWidth-(f+h))+"px "+-u(o.clientHeight-(p+g))+"px "+-u(f)+"px",threshold:l(0,a(1,d))||1};let y=!0;function v(e){const t=e[0].intersectionRatio;if(t!==d){if(!y)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),100)}y=!1}try{r=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}(!0),i}(f,n):null;let g,m=-1,y=null;s&&(y=new ResizeObserver((e=>{let[r]=e;r&&r.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{y&&y.observe(t)}))),n()})),f&&!d&&y.observe(f),y.observe(t));let v=d?se(e):null;return d&&function t(){const r=se(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n(),v=r,g=requestAnimationFrame(t)}(),n(),()=>{p.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),h&&h(),y&&y.disconnect(),y=null,d&&cancelAnimationFrame(g)}}const ye=(e,t,n)=>{const r=new Map,o={platform:ge,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=k(u,r,s),f=r,p={},h=0;for(let n=0;n({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?C({element:n.current,padding:r}).fn(t):{}:n?C({element:n,padding:r}).fn(t):{};var o}});var Ee="undefined"!=typeof document?ve.useLayoutEffect:ve.useEffect;function _e(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!_e(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||_e(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function xe(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Te(e,t){const n=xe(e);return Math.round(t*n)/n}function ke(e){const t=ve.useRef(e);return Ee((()=>{t.current=e})),t}function Oe(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(r=n.shadowRoot)?void 0:r.activeElement);){var n,r;t=t.shadowRoot.activeElement}return t}function Ce(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&V(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Pe(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Ie(){const 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 Re(e){if(0===e.mozInputSource&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Pe())||t.test(Ie()))&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType}function Ne(e){return 0===e.width&&0===e.height||1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"!==e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail}function Ae(){return/apple/i.test(navigator.vendor)}function Le(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function je(e){return(null==e?void 0:e.ownerDocument)||document}function Me(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function De(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Fe="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ze(e){return G(e)&&e.matches(Fe)}function Be(e){e.preventDefault(),e.stopPropagation()}var Ue=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),$e="undefined"==typeof Element,He=$e?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,We=!$e&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Ge=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Ve=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ge(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),s=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,s):o.push({scopeParent:a,candidates:s})}else{He.call(a,Ue)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var u=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),c=!Ge(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(u&&c){var d=e(!0===u?a.children:u.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},Ke=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},qe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Ke(e)?0:e.tabIndex},Qe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ye=function(e){return"INPUT"===e.tagName},Ze=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Je=function(e,t){return!(t.disabled||Ge(t)||function(e){return Ye(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=He.call(e,"details>summary:first-of-type")?e.parentElement:e;if(He.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Ze(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,l=We(e);if(a&&!a.shadowRoot&&!0===r(a))return Ze(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,r,o,i=e&&We(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&a;){var s,u,c;l=!(null===(u=a=null===(s=i=We(a))||void 0===s?void 0:s.host)||void 0===u||null===(c=u.ownerDocument)||void 0===c||!c.contains(a))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n=0)},tt=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var n=qe(e);return n<0&&t&&!Ke(e)?0:n}(a,i),s=i?e(t.candidates):a;0===l?i?n.push.apply(n,s):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:s})})),r.sort(Qe).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},nt=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Ve([e],t.includeContainer,{filter:Xe.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:et}):function(e,t,n){if(Ge(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ue));return t&&He.call(e,Ue)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Xe.bind(null,t)),tt(n)};function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+at++,st=be["useId".toString()]||function(){const[e,t]=ve.useState((()=>it?lt():void 0));return ot((()=>{null==e&&t(lt())}),[]),ve.useEffect((()=>{it||(it=!0)}),[]),e},ut=ve.forwardRef((function(e,t){let{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:s=0,staticOffset:u,stroke:c,d,style:{transform:f,...p}={},...h}=e;const g=st();if(!r)return null;s*=2;const m=s/2,y=i/2*(l/-8+1),v=a/2*l/4,[b,S]=n.split("-"),w=ge.isRTL(r),E=!!d,_="top"===b||"bottom"===b,x=u&&"end"===S?"bottom":"top";let T=u&&"end"===S?"right":"left";u&&w&&(T="end"===S?"left":"right");const k=null!=(null==o?void 0:o.x)?u||o.x:"",O=null!=(null==o?void 0:o.y)?u||o.y:"",C=d||"M0,0 H"+i+" L"+(i-y)+","+(a-v)+" Q"+i/2+","+a+" "+y+","+(a-v)+" Z",P={top:E?"rotate(180deg)":"",left:E?"rotate(90deg)":"rotate(-90deg)",bottom:E?"":"rotate(180deg)",right:E?"rotate(-90deg)":"rotate(90deg)"}[b];return ve.createElement("svg",rt({},h,{"aria-hidden":!0,ref:t,width:E?i:i+s,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[T]:k,[x]:O,[b]:_||E?"100%":"calc(100% - "+s/2+"px)",transform:""+P+(null!=f?f:""),...p}}),s>0&&ve.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:c,strokeWidth:s+(d?0:1),d:C}),ve.createElement("path",{stroke:s&&!d?h.fill:"none",d:C}),ve.createElement("clipPath",{id:g},ve.createElement("rect",{x:-m,y:m*(E?-1:1),width:i+s,height:i})))}));function ct(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}const dt=ve.createContext(null),ft=ve.createContext(null),pt=()=>{var e;return(null==(e=ve.useContext(dt))?void 0:e.id)||null},ht=()=>ve.useContext(ft);function gt(e){const t=st(),n=ht(),r=pt(),o=e||r;return ot((()=>{const e={id:t,parentId:o};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}}),[n,t,o]),t}function mt(e){let{children:t,id:n}=e;const r=pt();return ve.createElement(dt.Provider,{value:ve.useMemo((()=>({id:n,parentId:r})),[n,r])},t)}function yt(e){let{children:t}=e;const n=ve.useRef([]),r=ve.useCallback((e=>{n.current=[...n.current,e]}),[]),o=ve.useCallback((e=>{n.current=n.current.filter((t=>t!==e))}),[]),i=ve.useState((()=>ct()))[0];return ve.createElement(ft.Provider,{value:ve.useMemo((()=>({nodesRef:n,addNode:r,removeNode:o,events:i})),[n,r,o,i])},t)}function vt(e){return"data-floating-ui-"+e}function bt(e){const t=(0,ve.useRef)(e);return ot((()=>{t.current=e})),t}const St=vt("safe-polygon");function wt(e,t,n){return n&&!Le(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function Et(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:{domReference:a,floating:l},refs:s}=e,{enabled:u=!0,delay:c=0,handleClose:d=null,mouseOnly:f=!1,restMs:p=0,move:h=!0}=t,g=ht(),m=pt(),y=bt(d),v=bt(c),b=ve.useRef(),S=ve.useRef(),w=ve.useRef(),E=ve.useRef(),_=ve.useRef(!0),x=ve.useRef(!1),T=ve.useRef((()=>{})),k=ve.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);ve.useEffect((()=>{if(u)return i.on("dismiss",e),()=>{i.off("dismiss",e)};function e(){clearTimeout(S.current),clearTimeout(E.current),_.current=!0}}),[u,i]),ve.useEffect((()=>{if(!u||!y.current||!n)return;function e(e){k()&&r(!1,e)}const t=je(l).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[l,n,r,u,y,o,k]);const O=ve.useCallback((function(e,t){void 0===t&&(t=!0);const n=wt(v.current,"close",b.current);n&&!w.current?(clearTimeout(S.current),S.current=setTimeout((()=>r(!1,e)),n)):t&&(clearTimeout(S.current),r(!1,e))}),[v,r]),C=ve.useCallback((()=>{T.current(),w.current=void 0}),[]),P=ve.useCallback((()=>{if(x.current){const e=je(s.floating.current).body;e.style.pointerEvents="",e.removeAttribute(St),x.current=!1}}),[s]);return ve.useEffect((()=>{if(u&&W(a)){const e=a;return n&&e.addEventListener("mouseleave",c),null==l||l.addEventListener("mouseleave",c),h&&e.addEventListener("mousemove",i,{once:!0}),e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",s),()=>{n&&e.removeEventListener("mouseleave",c),null==l||l.removeEventListener("mouseleave",c),h&&e.removeEventListener("mousemove",i),e.removeEventListener("mouseenter",i),e.removeEventListener("mouseleave",s)}}function t(){return!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)}function i(e){if(clearTimeout(S.current),_.current=!1,f&&!Le(b.current)||p>0&&0===wt(v.current,"open"))return;const t=wt(v.current,"open",b.current);t?S.current=setTimeout((()=>{r(!0,e)}),t):r(!0,e)}function s(r){if(t())return;T.current();const o=je(l);if(clearTimeout(E.current),y.current){n||clearTimeout(S.current),w.current=y.current({...e,tree:g,x:r.clientX,y:r.clientY,onClose(){P(),C(),O(r)}});const t=w.current;return o.addEventListener("mousemove",t),void(T.current=()=>{o.removeEventListener("mousemove",t)})}("touch"!==b.current||!Ce(l,r.relatedTarget))&&O(r)}function c(n){t()||null==y.current||y.current({...e,tree:g,x:n.clientX,y:n.clientY,onClose(){P(),C(),O(n)}})(n)}}),[a,l,u,e,f,p,h,O,C,P,r,n,g,v,y,o]),ot((()=>{var e;if(u&&n&&null!=(e=y.current)&&e.__options.blockPointerEvents&&k()){const e=je(l).body;if(e.setAttribute(St,""),e.style.pointerEvents="none",x.current=!0,W(a)&&l){var t,r;const e=a,n=null==g||null==(t=g.nodesRef.current.find((e=>e.id===m)))||null==(r=t.context)?void 0:r.elements.floating;return n&&(n.style.pointerEvents=""),e.style.pointerEvents="auto",l.style.pointerEvents="auto",()=>{e.style.pointerEvents="",l.style.pointerEvents=""}}}}),[u,n,m,l,a,g,y,o,k]),ot((()=>{n||(b.current=void 0,C(),P())}),[n,C,P]),ve.useEffect((()=>()=>{C(),clearTimeout(S.current),clearTimeout(E.current),P()}),[u,a,C,P]),ve.useMemo((()=>{if(!u)return{};function e(e){b.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(e){n||0===p||(clearTimeout(E.current),E.current=setTimeout((()=>{_.current||r(!0,e.nativeEvent)}),p))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(e){i.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),O(e.nativeEvent,!1)}}}}),[i,u,p,n,r,O])}const _t=ve.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),xt=()=>ve.useContext(_t),Tt=e=>{let{children:t,delay:n,timeoutMs:r=0}=e;const[o,i]=ve.useReducer(((e,t)=>({...e,...t})),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),a=ve.useRef(null),l=ve.useCallback((e=>{i({currentId:e})}),[]);return ot((()=>{o.currentId?null===a.current?a.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),a.current=null)}),[o.currentId]),ve.createElement(_t.Provider,{value:ve.useMemo((()=>({...o,setState:i,setCurrentId:l})),[o,i,l])},t)},kt=(e,t)=>{let{open:n,onOpenChange:r}=e,{id:o}=t;const{currentId:i,setCurrentId:a,initialDelay:l,setState:s,timeoutMs:u}=xt();ot((()=>{i&&(s({delay:{open:1,close:wt(l,"close")}}),i!==o&&r(!1))}),[o,r,s,i,l]),ot((()=>{function e(){r(!1),s({delay:l,currentId:null})}if(!n&&i===o){if(u){const t=window.setTimeout(e,u);return()=>{clearTimeout(t)}}e()}}),[n,s,i,o,r,l,u]),ot((()=>{n&&a(o)}),[n,a,o])};let Ot=0;function Ct(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ot);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Ot=requestAnimationFrame(i)}function Pt(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let It=new WeakMap,Rt=new WeakSet,Nt={},At=0;const Lt=()=>"undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,jt=e=>e&&(e.host||jt(e.parentNode)),Mt=(e,t)=>t.map((t=>{if(e.contains(t))return t;const n=jt(t);return e.contains(n)?n:null})).filter((e=>null!=e));function Dt(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=je(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=Mt(t,e),l=new Set,s=new Set(a),u=[];Nt[o]||(Nt[o]=new WeakMap);const c=Nt[o];return a.forEach((function e(t){t&&!l.has(t)&&(l.add(t),t.parentNode&&e(t.parentNode))})),function e(t){t&&!s.has(t)&&Array.prototype.forEach.call(t.children,(t=>{if(l.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(It.get(t)||0)+1,a=(c.get(t)||0)+1;It.set(t,r),c.set(t,a),u.push(t),1===r&&n&&Rt.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),l.clear(),At++,()=>{u.forEach((e=>{const t=(It.get(e)||0)-1,n=(c.get(e)||0)-1;It.set(e,t),c.set(e,n),t||(!Rt.has(e)&&i&&e.removeAttribute(i),Rt.delete(e)),n||e.removeAttribute(o)})),At--,At||(It=new WeakMap,It=new WeakMap,Rt=new WeakSet,Nt={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ft=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function zt(e,t){const n=nt(e,Ft());"prev"===t&&n.reverse();const r=n.indexOf(Oe(je(e)));return n.slice(r+1)[0]}function Bt(){return zt(document.body,"next")}function Ut(){return zt(document.body,"prev")}function $t(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ce(n,r)}function Ht(e){nt(e,Ft()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Wt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Gt={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};function Vt(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Kt=ve.forwardRef((function(e,t){const[n,r]=ve.useState();ot((()=>(Ae()&&r("button"),document.addEventListener("keydown",Vt),()=>{document.removeEventListener("keydown",Vt)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[vt("focus-guard")]:"",style:Gt};return ve.createElement("span",rt({},e,o))})),qt=ve.createContext(null);function Qt(e){let{id:t,root:n}=void 0===e?{}:e;const[r,o]=ve.useState(null),i=st(),a=Zt(),l=ve.useMemo((()=>({id:t,root:n,portalContext:a,uniqueId:i})),[t,n,a,i]),s=ve.useRef();return ot((()=>()=>{null==r||r.remove()}),[r,l]),ot((()=>{if(s.current===l)return;s.current=l;const{id:e,root:t,portalContext:n,uniqueId:r}=l,i=e?document.getElementById(e):null,a=vt("portal");if(i){const e=document.createElement("div");e.id=r,e.setAttribute(a,""),i.appendChild(e),o(e)}else{let i=t||(null==n?void 0:n.portalNode);i&&!W(i)&&(i=i.current),i=i||document.body;let l=null;e&&(l=document.createElement("div"),l.id=e,i.appendChild(l));const s=document.createElement("div");s.id=r,s.setAttribute(a,""),i=l||i,i.appendChild(s),o(s)}}),[l]),r}function Yt(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=Qt({id:n,root:r}),[a,l]=ve.useState(null),s=ve.useRef(null),u=ve.useRef(null),c=ve.useRef(null),d=ve.useRef(null),f=!!a&&!a.modal&&a.open&&o&&!(!r&&!i);return ve.useEffect((()=>{if(i&&o&&(null==a||!a.modal))return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&$t(e)&&("focusin"===e.type?Wt:Ht)(i)}}),[i,o,null==a?void 0:a.modal]),ve.createElement(qt.Provider,{value:ve.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:s,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:i,setFocusManagerState:l})),[o,i])},f&&i&&ve.createElement(Kt,{"data-type":"outside",ref:s,onFocus:e=>{if($t(e,i)){var t;null==(t=c.current)||t.focus()}else{const e=Ut()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),f&&i&&ve.createElement("span",{"aria-owns":i.id,style:Gt}),i&&(0,Se.createPortal)(t,i),f&&i&&ve.createElement(Kt,{"data-type":"outside",ref:u,onFocus:e=>{if($t(e,i)){var t;null==(t=d.current)||t.focus()}else{const t=Bt()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent))}}}))}const Zt=()=>ve.useContext(qt),Jt=ve.forwardRef((function(e,t){return ve.createElement("button",rt({},e,{type:"button",ref:t,tabIndex:-1,style:Gt}))}));function Xt(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:l=!0,modal:s=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:c=!0}=e,{open:d,refs:f,nodeId:p,onOpenChange:h,events:g,dataRef:m,elements:{domReference:y,floating:v}}=t,b=!Lt()||i,S=bt(o),w=bt(a),E=bt(l),_=ht(),x=Zt(),T="number"==typeof a&&a<0,k=ve.useRef(null),O=ve.useRef(null),C=ve.useRef(!1),P=ve.useRef(null),I=ve.useRef(!1),R=null!=x,N=y&&"combobox"===y.getAttribute("role")&&ze(y),A=ve.useCallback((function(e){return void 0===e&&(e=v),e?nt(e,Ft()):[]}),[v]),L=ve.useCallback((e=>{const t=A(e);return S.current.map((e=>y&&"reference"===e?y:v&&"floating"===e?v:t)).filter(Boolean).flat()}),[y,v,S,A]);function j(e){return!r&&u&&s?ve.createElement(Jt,{ref:"start"===e?k:O,onClick:e=>h(!1,e.nativeEvent)},"string"==typeof u?u:"Dismiss"):null}ve.useEffect((()=>{if(r||!s)return;function e(e){if("Tab"===e.key){Ce(v,Oe(je(v)))&&0===A().length&&!N&&Be(e);const t=L(),n=De(e);"reference"===S.current[0]&&n===y&&(Be(e),e.shiftKey?Ct(t[t.length-1]):Ct(t[1])),"floating"===S.current[1]&&n===v&&e.shiftKey&&(Be(e),Ct(t[0]))}}const t=je(v);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,y,v,s,S,f,N,A,L]),ve.useEffect((()=>{if(!r&&c)return v&&G(y)?(y.addEventListener("focusout",t),y.addEventListener("pointerdown",e),!s&&v.addEventListener("focusout",t),()=>{y.removeEventListener("focusout",t),y.removeEventListener("pointerdown",e),!s&&v.removeEventListener("focusout",t)}):void 0;function e(){I.current=!0,setTimeout((()=>{I.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(Ce(y,t)||Ce(v,t)||Ce(t,v)||Ce(null==x?void 0:x.portalNode,t)||null!=t&&t.hasAttribute(vt("focus-guard"))||_&&(Pt(_.nodesRef.current,p).find((e=>{var n,r;return Ce(null==(n=e.context)?void 0:n.elements.floating,t)||Ce(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(_.nodesRef.current,p).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));t&&n&&!I.current&&t!==P.current&&(C.current=!0,h(!1,e))}))}}),[r,y,v,s,p,_,x,h,c]),ve.useEffect((()=>{var e;if(r)return;const t=Array.from((null==x||null==(e=x.portalNode)?void 0:e.querySelectorAll("["+vt("portal")+"]"))||[]);if(v){const e=[v,...t,k.current,O.current,S.current.includes("reference")||N?y:null].filter((e=>null!=e)),n=s?Dt(e,b,!b):Dt(e);return()=>{n()}}}),[r,y,v,s,S,x,N,b]),ot((()=>{if(r||!v)return;const e=Oe(je(v));queueMicrotask((()=>{const t=L(v),n=w.current,r=("number"==typeof n?t[n]:n.current)||v,o=Ce(v,e);T||o||!d||Ct(r,{preventScroll:r===v})}))}),[r,d,v,T,L,w]),ot((()=>{if(r||!v)return;let e=!1;const t=je(v),n=Oe(t),o=m.current;function i(t){if("escapeKey"===t.type&&f.domReference.current&&(P.current=f.domReference.current),["referencePress","escapeKey"].includes(t.type))return;const n=t.data.returnFocus;"object"==typeof n?(C.current=!1,e=n.preventScroll):C.current=!n}return P.current=n,g.on("dismiss",i),()=>{g.off("dismiss",i);const n=Oe(t);(Ce(v,n)||_&&Pt(_.nodesRef.current,p).some((e=>{var t;return Ce(null==(t=e.context)?void 0:t.elements.floating,n)}))||o.openEvent&&["click","mousedown"].includes(o.openEvent.type))&&f.domReference.current&&(P.current=f.domReference.current),E.current&&G(P.current)&&!C.current&&Ct(P.current,{cancelPrevious:!1,preventScroll:e})}}),[r,v,E,m,f,g,_,p]),ot((()=>{if(!r&&x)return x.setFocusManagerState({modal:s,closeOnFocusOut:c,open:d,onOpenChange:h,refs:f}),()=>{x.setFocusManagerState(null)}}),[r,x,s,d,h,f,c]),ot((()=>{if(!r&&v&&"function"==typeof MutationObserver){const e=()=>{const e=v.getAttribute("tabindex");S.current.includes("floating")||Oe(je(v))!==f.domReference.current&&0===A().length?"0"!==e&&v.setAttribute("tabindex","0"):"-1"!==e&&v.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}}),[r,v,f,S,A]);const M=!r&&b&&!N&&(R||s);return ve.createElement(ve.Fragment,null,M&&ve.createElement(Kt,{"data-type":"inside",ref:null==x?void 0:x.beforeInsideRef,onFocus:e=>{if(s){const e=L();Ct("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=x&&x.preserveTabOrder&&x.portalNode)if(C.current=!1,$t(e,x.portalNode)){const e=Bt()||y;null==e||e.focus()}else{var t;null==(t=x.beforeOutsideRef.current)||t.focus()}}}),!N&&j("start"),n,j("end"),M&&ve.createElement(Kt,{"data-type":"inside",ref:null==x?void 0:x.afterInsideRef,onFocus:e=>{if(s)Ct(L()[0]);else if(null!=x&&x.preserveTabOrder&&x.portalNode)if(c&&(C.current=!0),$t(e,x.portalNode)){const e=Ut()||y;null==e||e.focus()}else{var t;null==(t=x.afterOutsideRef.current)||t.focus()}}}))}function en(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const tn=ve.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function nn(e){let{children:t,elementsRef:n,labelsRef:r}=e;const[o,i]=ve.useState((()=>new Map)),a=ve.useCallback((e=>{i((t=>new Map(t).set(e,null)))}),[]),l=ve.useCallback((e=>{i((t=>{const n=new Map(t);return n.delete(e),n}))}),[]);return ot((()=>{const e=new Map(o);Array.from(e.keys()).sort(en).forEach(((t,n)=>{e.set(t,n)})),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}(o,e)||i(e)}),[o]),ve.createElement(tn.Provider,{value:ve.useMemo((()=>({register:a,unregister:l,map:o,elementsRef:n,labelsRef:r})),[a,l,o,n,r])},t)}function rn(e){let{label:t}=void 0===e?{}:e;const[n,r]=ve.useState(null),o=ve.useRef(null),{register:i,unregister:a,map:l,elementsRef:s,labelsRef:u}=ve.useContext(tn),c=ve.useCallback((e=>{if(o.current=e,null!==n&&(s.current[n]=e,u)){var r;const o=void 0!==t;u.current[n]=o?t:null!=(r=null==e?void 0:e.textContent)?r:null}}),[n,s,u,t]);return ot((()=>{const e=o.current;if(e)return i(e),()=>{a(e)}}),[i,a]),ot((()=>{const e=o.current?l.get(o.current):null;null!=e&&r(e)}),[l]),ve.useMemo((()=>({ref:c,index:null==n?-1:n})),[n,c])}const on=vt("scroll-lock"),an=ve.forwardRef((function(e,t){let{lockScroll:n=!1,...r}=e;return ot((()=>{var e,t;if(!n)return;if(document.body.hasAttribute(on))return;document.body.setAttribute(on,"");const r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth;if(!/iP(hone|ad|od)|iOS/.test(Pe()))return Object.assign(document.body.style,{overflow:"hidden",[r]:o+"px"}),()=>{document.body.removeAttribute(on),Object.assign(document.body.style,{overflow:"",[r]:""})};const i=(null==(e=window.visualViewport)?void 0:e.offsetLeft)||0,a=(null==(t=window.visualViewport)?void 0:t.offsetTop)||0,l=window.pageXOffset,s=window.pageYOffset;return Object.assign(document.body.style,{position:"fixed",overflow:"hidden",top:-(s-Math.floor(a))+"px",left:-(l-Math.floor(i))+"px",right:"0",[r]:o+"px"}),()=>{Object.assign(document.body.style,{position:"",overflow:"",top:"",left:"",right:"",[r]:""}),document.body.removeAttribute(on),window.scrollTo(l,s)}}),[n]),ve.createElement("div",rt({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function ln(e){return G(e.target)&&"BUTTON"===e.target.tagName}function sn(e){return ze(e)}function un(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:l="click",toggle:s=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0}=t,d=ve.useRef(),f=ve.useRef(!1);return ve.useMemo((()=>a?{reference:{onPointerDown(e){d.current=e.pointerType},onMouseDown(e){0===e.button&&(Le(d.current,!0)&&u||"click"!==l&&(!n||!s||o.current.openEvent&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent)):r(!1,e.nativeEvent)))},onClick(e){"mousedown"===l&&d.current?d.current=void 0:Le(d.current,!0)&&u||(!n||!s||o.current.openEvent&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent):r(!1,e.nativeEvent))},onKeyDown(e){d.current=void 0,e.defaultPrevented||!c||ln(e)||(" "!==e.key||sn(i)||(e.preventDefault(),f.current=!0),"Enter"===e.key&&r(!n||!s,e.nativeEvent))},onKeyUp(e){e.defaultPrevented||!c||ln(e)||sn(i)||" "===e.key&&f.current&&(f.current=!1,r(!n||!s,e.nativeEvent))}}}:{}),[a,o,l,u,c,i,s,n,r])}const cn=be["useInsertionEffect".toString()]||(e=>e());function dn(e){const t=ve.useRef((()=>{}));return cn((()=>{t.current=e})),ve.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r{c.current||o.current.openEvent&&!fn(o.current.openEvent)||r.setPositionReference(function(e,t){let n=null,r=null,o=!1;return{contextElement:e.current||void 0,getBoundingClientRect(){var i,a;const l=(null==(i=e.current)?void 0:i.getBoundingClientRect())||{width:0,height:0,x:0,y:0},s="x"===t.axis||"both"===t.axis,u="y"===t.axis||"both"===t.axis,c=["mouseenter","mousemove"].includes((null==(a=t.dataRef.current.openEvent)?void 0:a.type)||"")&&"touch"!==t.pointerType;let d=l.width,f=l.height,p=l.x,h=l.y;return null==n&&t.x&&s&&(n=l.x-t.x),null==r&&t.y&&u&&(r=l.y-t.y),p-=n||0,h-=r||0,d=0,f=0,!o||c?(d="y"===t.axis?l.width:0,f="x"===t.axis?l.height:0,p=s&&null!=t.x?t.x:p,h=u&&null!=t.y?t.y:h):o&&!c&&(f="x"===t.axis?l.height:f,d="y"===t.axis?l.width:d),o=!0,{width:d,height:f,x:p,y:h,top:h,right:p+d,bottom:h+f,left:p}}}}(r.domReference,{x:e,y:t,axis:l,dataRef:o,pointerType:f}))})),y=dn((e=>{null==s&&null==u&&(n?d.current||g([]):m(e.clientX,e.clientY))})),v=Le(f)?i:n,b=ve.useCallback((()=>{if(!v||!a||null!=s||null!=u)return;const e=U(r.floating.current);function t(n){const o=De(n);Ce(r.floating.current,o)?(e.removeEventListener("mousemove",t),d.current=null):m(n.clientX,n.clientY)}if(!o.current.openEvent||fn(o.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),d.current=null};return d.current=n,n}r.setPositionReference(r.domReference.current)}),[o,a,v,r,m,s,u]);return ve.useEffect((()=>b()),[b,h]),ve.useEffect((()=>{a&&!i&&(c.current=!1)}),[a,i]),ve.useEffect((()=>{!a&&n&&(c.current=!0)}),[a,n]),ot((()=>{!a||null==s&&null==u||(c.current=!1,m(s,u))}),[a,s,u,m]),ve.useMemo((()=>{if(!a)return{};function e(e){let{pointerType:t}=e;p(t)}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove:y,onMouseEnter:y}}}),[a,y])}const hn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},gn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},mn=e=>{var t,n;return{escapeKeyBubbles:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePressBubbles:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function yn(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:l,floating:s},dataRef:u}=e,{enabled:c=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:g="pointerdown",ancestorScroll:m=!1,bubbles:y}=t,v=ht(),b=null!=pt(),S=dn("function"==typeof f?f:()=>!1),w="function"==typeof f?S:f,E=ve.useRef(!1),{escapeKeyBubbles:_,outsidePressBubbles:x}=mn(y),T=dn((e=>{if(!n||!c||!d||"Escape"!==e.key)return;const t=v?Pt(v.nodesRef.current,i):[];if(!_&&(e.stopPropagation(),t.length>0)){let e=!0;if(t.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e)})),k=dn((e=>{const t=E.current;if(E.current=!1,t)return;if("function"==typeof w&&!w(e))return;const n=De(e),a="["+vt("inert")+"]",u=je(s).querySelectorAll(a);let c=W(n)?n:null;for(;c&&!Z(c);){const e=ee(c);if(e===je(s).body||!W(e))break;c=e}if(u.length&&W(n)&&!n.matches("html,body")&&!Ce(n,s)&&Array.from(u).every((e=>!Ce(c,e))))return;if(G(n)&&s){const t=n.clientWidth>0&&n.scrollWidth>n.clientWidth,r=n.clientHeight>0&&n.scrollHeight>n.clientHeight;let o=r&&e.offsetX>n.clientWidth;if(r&&"rtl"===J(n).direction&&(o=e.offsetX<=n.offsetWidth-n.clientWidth),o||t&&e.offsetY>n.clientHeight)return}const d=v&&Pt(v.nodesRef.current,i).some((t=>{var n;return Me(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Me(e,s)||Me(e,l)||d)return;const f=v?Pt(v.nodesRef.current,i):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:Re(e)||Ne(e)}}),r(!1,e)}));return ve.useEffect((()=>{if(!n||!c)return;function e(e){r(!1,e)}u.current.__escapeKeyBubbles=_,u.current.__outsidePressBubbles=x;const t=je(s);d&&t.addEventListener("keydown",T),w&&t.addEventListener(p,k);let o=[];return m&&(W(l)&&(o=ne(l)),W(s)&&(o=o.concat(ne(s))),!W(a)&&a&&a.contextElement&&(o=o.concat(ne(a.contextElement)))),o=o.filter((e=>{var n;return e!==(null==(n=t.defaultView)?void 0:n.visualViewport)})),o.forEach((t=>{t.addEventListener("scroll",e,{passive:!0})})),()=>{d&&t.removeEventListener("keydown",T),w&&t.removeEventListener(p,k),o.forEach((t=>{t.removeEventListener("scroll",e)}))}}),[u,s,l,a,d,w,p,n,r,m,c,_,x,T,k]),ve.useEffect((()=>{E.current=!1}),[w,p]),ve.useMemo((()=>c?{reference:{onKeyDown:T,[hn[g]]:e=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,e.nativeEvent))}},floating:{onKeyDown:T,[gn[p]]:()=>{E.current=!0}}}:{}),[c,o,h,p,g,r,T])}function vn(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e,[i,a]=ve.useState(null),l=(null==(t=e.elements)?void 0:t.reference)||i,s=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:u}=e,[c,d]=ve.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=ve.useState(r);_e(f,r)||p(r);const[h,g]=ve.useState(null),[m,y]=ve.useState(null),v=ve.useCallback((e=>{e!=E.current&&(E.current=e,g(e))}),[g]),b=ve.useCallback((e=>{e!==_.current&&(_.current=e,y(e))}),[y]),S=i||h,w=a||m,E=ve.useRef(null),_=ve.useRef(null),x=ve.useRef(c),T=ke(s),k=ke(o),O=ve.useCallback((()=>{if(!E.current||!_.current)return;const e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),ye(E.current,_.current,e).then((e=>{const t={...e,isPositioned:!0};C.current&&!_e(x.current,t)&&(x.current=t,Se.flushSync((()=>{d(t)})))}))}),[f,t,n,k]);Ee((()=>{!1===u&&x.current.isPositioned&&(x.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const C=ve.useRef(!1);Ee((()=>(C.current=!0,()=>{C.current=!1})),[]),Ee((()=>{if(S&&(E.current=S),w&&(_.current=w),S&&w){if(T.current)return T.current(S,w,O);O()}}),[S,w,O,T]);const P=ve.useMemo((()=>({reference:E,floating:_,setReference:v,setFloating:b})),[v,b]),I=ve.useMemo((()=>({reference:S,floating:w})),[S,w]),R=ve.useMemo((()=>{const e={position:n,left:0,top:0};if(!I.floating)return e;const t=Te(I.floating,c.x),r=Te(I.floating,c.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...xe(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,I.floating,c.x,c.y]);return ve.useMemo((()=>({...c,update:O,refs:P,elements:I,floatingStyles:R})),[c,O,P,I,R])}(e),u=ht(),c=dn(((e,t)=>{e&&(f.current.openEvent=t),null==r||r(e,t)})),d=ve.useRef(null),f=ve.useRef({}),p=ve.useState((()=>ct()))[0],h=st(),g=ve.useCallback((e=>{const t=W(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),m=ve.useCallback((e=>{(W(e)||null===e)&&(d.current=e,a(e)),(W(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!W(e))&&s.refs.setReference(e)}),[s.refs]),y=ve.useMemo((()=>({...s.refs,setReference:m,setPositionReference:g,domReference:d})),[s.refs,m,g]),v=ve.useMemo((()=>({...s.elements,domReference:l})),[s.elements,l]),b=ve.useMemo((()=>({...s,refs:y,elements:v,dataRef:f,nodeId:o,floatingId:h,events:p,open:n,onOpenChange:c})),[s,o,h,p,n,c,y,v]);return ot((()=>{const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===o));e&&(e.context=b)})),ve.useMemo((()=>({...s,context:b,refs:y,elements:v})),[s,y,v,b])}function bn(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,refs:a,elements:{floating:l,domReference:s}}=e,{enabled:u=!0,keyboardOnly:c=!0}=t,d=ve.useRef(""),f=ve.useRef(!1),p=ve.useRef();return ve.useEffect((()=>{if(!u)return;const e=je(l).defaultView||window;function t(){!n&&G(s)&&s===Oe(je(s))&&(f.current=!0)}return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}}),[l,s,n,u]),ve.useEffect((()=>{if(u)return i.on("dismiss",e),()=>{i.off("dismiss",e)};function e(e){"referencePress"!==e.type&&"escapeKey"!==e.type||(f.current=!0)}}),[i,u]),ve.useEffect((()=>()=>{clearTimeout(p.current)}),[]),ve.useMemo((()=>u?{reference:{onPointerDown(e){let{pointerType:t}=e;d.current=t,f.current=!(!t||!c)},onMouseLeave(){f.current=!1},onFocus(e){var t;f.current||"focus"===e.type&&"mousedown"===(null==(t=o.current.openEvent)?void 0:t.type)&&Me(o.current.openEvent,s)||r(!0,e.nativeEvent)},onBlur(e){f.current=!1;const t=e.relatedTarget,n=W(t)&&t.hasAttribute(vt("focus-guard"))&&"outside"===t.getAttribute("data-type");p.current=setTimeout((()=>{Ce(a.floating.current,t)||Ce(s,t)||n||r(!1,e.nativeEvent)}))}}}:{}),[u,c,s,a,o,r])}function Sn(e,t,n){const r=new Map;return{..."floating"===n&&{tabIndex:-1},...e,...t.map((e=>e?e[n]:null)).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,o]=t;var i;0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof o&&(null==(i=r.get(n))||i.push(o),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;ie(...o))).find((e=>void 0!==e))})):e[n]=o})),e):e),{})}}function wn(e){void 0===e&&(e=[]);const t=e,n=ve.useCallback((t=>Sn(t,e,"reference")),t),r=ve.useCallback((t=>Sn(t,e,"floating")),t),o=ve.useCallback((t=>Sn(t,e,"item")),e.map((e=>null==e?void 0:e.item)));return ve.useMemo((()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o})),[n,r,o])}let En=!1;const _n="ArrowUp",xn="ArrowDown",Tn="ArrowLeft",kn="ArrowRight";function On(e,t,n){return Math.floor(e/t)!==n}function Cn(e,t){return t<0||t>=e.current.length}function Pn(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let l=n;do{var s,u;l+=r?-i:i}while(l>=0&&l<=a.length-1&&(o?o.includes(l):null==a[l]||(null==(s=a[l])?void 0:s.hasAttribute("disabled"))||"true"===(null==(u=a[l])?void 0:u.getAttribute("aria-disabled"))));return l}function In(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Rn(e,t){return In(t,e===_n||e===xn,e===Tn||e===kn)}function Nn(e,t,n){return In(t,e===xn,n?e===Tn:e===kn)||"Enter"===e||" "==e||""===e}function An(e,t){return Pn(e,{disabledIndices:t})}function Ln(e,t){return Pn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function jn(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:l,activeIndex:s,onNavigate:u=(()=>{}),enabled:c=!0,selectedIndex:d=null,allowEscape:f=!1,loop:p=!1,nested:h=!1,rtl:g=!1,virtual:m=!1,focusItemOnOpen:y="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:S,orientation:w="vertical",cols:E=1,scrollItemIntoView:_=!0}=t,x=pt(),T=ht(),k=dn(u),O=ve.useRef(y),C=ve.useRef(null!=d?d:-1),P=ve.useRef(null),I=ve.useRef(!0),R=ve.useRef(k),N=ve.useRef(!!a),A=ve.useRef(!1),L=ve.useRef(!1),j=bt(S),M=bt(n),D=bt(_),[F,z]=ve.useState(),B=dn((function(e,t,n){void 0===n&&(n=!1);const r=e.current[t.current];r&&(m?z(r.id):Ct(r,{preventScroll:!0,sync:!(!Pe().toLowerCase().startsWith("mac")||navigator.maxTouchPoints||!Ae())&&(En||A.current)}),requestAnimationFrame((()=>{const e=D.current;e&&r&&(n||!I.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof e?{block:"nearest",inline:"nearest"}:e))})))}));ot((()=>{document.createElement("div").focus({get preventScroll(){return En=!0,!1}})}),[]),ot((()=>{c&&(n&&a?O.current&&null!=d&&(L.current=!0,k(d)):N.current&&(C.current=-1,R.current(null)))}),[c,n,a,d,k]),ot((()=>{if(c&&n&&a)if(null==s){if(A.current=!1,null!=d)return;if(N.current&&(C.current=-1,B(l,C)),!N.current&&O.current&&(null!=P.current||!0===O.current&&null==P.current)){let e=0;const t=()=>{null==l.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(C.current=null==P.current||Nn(P.current,w,g)||h?An(l,j.current):Ln(l,j.current),P.current=null,k(C.current))};t()}}else Cn(l,s)||(C.current=s,B(l,C,L.current),L.current=!1)}),[c,n,a,s,d,h,l,w,g,k,B,j]),ot((()=>{if(c&&N.current&&!a&&T){var e,t;const n=T.nodesRef.current,r=null==(e=n.find((e=>e.id===x)))||null==(t=e.context)?void 0:t.elements.floating,o=Oe(je(a)),i=n.some((e=>e.context&&Ce(e.context.elements.floating,o)));r&&!i&&r.focus({preventScroll:!0})}}),[c,a,T,x]),ot((()=>{R.current=k,N.current=!!a})),ot((()=>{n||(P.current=null)}),[n]);const U=null!=s,$=ve.useMemo((()=>{function e(e){if(!n)return;const t=l.current.indexOf(e);-1!==t&&k(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...v&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;I.current&&"touch"!==t&&(C.current=-1,B(l,C),k(null),m||Ct(o.floating.current,{preventScroll:!0}))}}}}),[n,o,B,v,l,k,m]);return ve.useMemo((()=>{if(!c)return{};const e=j.current;function t(t){if(I.current=!1,A.current=!0,!M.current&&t.currentTarget===o.floating.current)return;if(h&&function(e,t,n){return In(t,n?e===kn:e===Tn,e===_n)}(t.key,w,g))return Be(t),r(!1,t.nativeEvent),void(G(i)&&i.focus());const a=C.current,s=An(l,e),u=Ln(l,e);if("Home"===t.key&&(Be(t),C.current=s,k(C.current)),"End"===t.key&&(Be(t),C.current=u,k(C.current)),E>1){const n=C.current;if(t.key===_n){if(Be(t),-1===n)C.current=u;else if(C.current=Pn(l,{startingIndex:n,amount:E,decrement:!0,disabledIndices:e}),p&&(n-Ee?r:r-E}Cn(l,C.current)&&(C.current=n),k(C.current)}if(t.key===xn&&(Be(t),-1===n?C.current=s:(C.current=Pn(l,{startingIndex:n,amount:E,disabledIndices:e}),p&&n+E>u&&(C.current=Pn(l,{startingIndex:n%E-E,amount:E,disabledIndices:e}))),Cn(l,C.current)&&(C.current=n),k(C.current)),"both"===w){const r=Math.floor(n/E);t.key===kn&&(Be(t),n%E!=E-1?(C.current=Pn(l,{startingIndex:n,disabledIndices:e}),p&&On(C.current,E,r)&&(C.current=Pn(l,{startingIndex:n-n%E-1,disabledIndices:e}))):p&&(C.current=Pn(l,{startingIndex:n-n%E-1,disabledIndices:e})),On(C.current,E,r)&&(C.current=n)),t.key===Tn&&(Be(t),n%E!=0?(C.current=Pn(l,{startingIndex:n,disabledIndices:e,decrement:!0}),p&&On(C.current,E,r)&&(C.current=Pn(l,{startingIndex:n+(E-n%E),decrement:!0,disabledIndices:e}))):p&&(C.current=Pn(l,{startingIndex:n+(E-n%E),decrement:!0,disabledIndices:e})),On(C.current,E,r)&&(C.current=n));const o=Math.floor(u/E)===r;return Cn(l,C.current)&&(C.current=p&&o?t.key===Tn?u:Pn(l,{startingIndex:n-n%E-1,disabledIndices:e}):n),void k(C.current)}}if(Rn(t.key,w)){if(Be(t),n&&!m&&Oe(t.currentTarget.ownerDocument)===t.currentTarget)return C.current=Nn(t.key,w,g)?s:u,void k(C.current);Nn(t.key,w,g)?C.current=p?a>=u?f&&a!==l.current.length?-1:s:Pn(l,{startingIndex:a,disabledIndices:e}):Math.min(u,Pn(l,{startingIndex:a,disabledIndices:e})):C.current=p?a<=s?f&&-1!==a?l.current.length:u:Pn(l,{startingIndex:a,decrement:!0,disabledIndices:e}):Math.max(s,Pn(l,{startingIndex:a,decrement:!0,disabledIndices:e})),Cn(l,C.current)?k(null):k(C.current)}}function a(e){"auto"===y&&Re(e.nativeEvent)&&(O.current=!0)}const s=m&&n&&U&&{"aria-activedescendant":F};return{reference:{...s,onKeyDown(o){I.current=!1;const i=0===o.key.indexOf("Arrow");if(m&&n)return t(o);if(!n&&!b&&i)return;const a=i||"Enter"===o.key||""===o.key.trim(),s=Rn(o.key,w),u=function(e,t,n){return In(t,n?e===Tn:e===kn,e===xn)}(o.key,w,g);a&&(P.current=h&&s?null:o.key),h?u&&(Be(o),n?(C.current=An(l,e),k(C.current)):r(!0,o.nativeEvent)):s&&(null!=d&&(C.current=d),Be(o),!n&&b?r(!0,o.nativeEvent):t(o),n&&k(C.current))},onFocus(){n&&k(null)},onPointerDown:function(e){O.current=y,"auto"===y&&Ne(e.nativeEvent)&&(O.current=!0)},onMouseDown:a,onClick:a},floating:{"aria-orientation":"both"===w?void 0:w,...s,onKeyDown:t,onPointerMove(){I.current=!0}},item:$}}),[i,o,F,j,M,l,c,w,g,m,n,U,h,d,b,f,E,p,y,k,r,$])}function Mn(e){return ve.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e)}function Dn(e,t){void 0===t&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=st();return ve.useMemo((()=>{const e={id:r,role:i};return o?"tooltip"===i?{reference:{"aria-describedby":n?r:void 0},floating:e}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===i?"dialog":i,"aria-controls":n?r:void 0,..."listbox"===i&&{role:"combobox"},..."menu"===i&&{id:a}},floating:{...e,..."menu"===i&&{"aria-labelledby":a}}}:{}}),[o,i,n,r,a])}const Fn=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function zn(e,t){return"function"==typeof e?e(t):e}function Bn(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[a,l]=ve.useState(!1),[s,u]=ve.useState("unmounted"),c=function(e,t){const[n,r]=ve.useState(e);return e&&!n&&r(!0),ve.useEffect((()=>{if(!e){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,i);return ot((()=>{a&&!c&&u("unmounted")}),[a,c]),ot((()=>{if(r){if(n){u("initial");const e=requestAnimationFrame((()=>{u("open")}));return()=>{cancelAnimationFrame(e)}}l(!0),u("close")}}),[n,r]),{isMounted:c,status:s}}function Un(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,l=e.placement,s=l.split("-")[0],u=ve.useMemo((()=>({side:s,placement:l})),[s,l]),c="number"==typeof a,d=(c?a:a.open)||0,f=(c?a:a.close)||0,[p,h]=ve.useState((()=>({...zn(i,u),...zn(n,u)}))),{isMounted:g,status:m}=Bn(e,{duration:a}),y=bt(n),v=bt(r),b=bt(o),S=bt(i);return ot((()=>{const e=zn(y.current,u),t=zn(b.current,u),n=zn(S.current,u),r=zn(v.current,u)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===m&&h((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===m&&h({transitionProperty:Object.keys(r).map(Fn).join(","),transitionDuration:d+"ms",...n,...r}),"close"===m){const r=t||e;h({transitionProperty:Object.keys(r).map(Fn).join(","),transitionDuration:f+"ms",...n,...r})}}),[f,b,y,v,S,d,m,u]),{isMounted:g,styles:p}}function $n(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:l,onTypingChange:s,enabled:u=!0,findMatch:c=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,h=ve.useRef(),g=ve.useRef(""),m=ve.useRef(null!=(n=null!=p?p:a)?n:-1),y=ve.useRef(null),v=dn(l),b=dn(s),S=bt(c),w=bt(f);return ot((()=>{r&&(clearTimeout(h.current),y.current=null,g.current="")}),[r]),ot((()=>{var e;r&&""===g.current&&(m.current=null!=(e=null!=p?p:a)?e:-1)}),[r,p,a]),ve.useMemo((()=>{if(!u)return{};function e(e){e?o.current.typing||(o.current.typing=e,b(e)):o.current.typing&&(o.current.typing=e,b(e))}function t(e,t,n){const r=S.current?S.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}function n(n){const o=i.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(o,o,g.current)?e(!1):" "===n.key&&Be(n)),null==o||w.current.includes(n.key)||1!==n.key.length||n.ctrlKey||n.metaKey||n.altKey)return;r&&" "!==n.key&&(Be(n),e(!0)),o.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&g.current===n.key&&(g.current="",m.current=y.current),g.current+=n.key,clearTimeout(h.current),h.current=setTimeout((()=>{g.current="",m.current=y.current,e(!1)}),d);const a=m.current,l=t(o,[...o.slice((a||0)+1),...o.slice(0,(a||0)+1)],g.current);-1!==l?(v(l),y.current=l):" "!==n.key&&(g.current="",e(!1))}return{reference:{onKeyDown:n},floating:{onKeyDown:n,onKeyUp(t){" "===t.key&&e(!1)}}}}),[u,r,o,i,d,w,S,v,b])}function Hn(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Wn=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:a=0,minItemsVisible:l=4,referenceOverflowThreshold:s=0,scrollRef:u,...c}=e,{rects:d,elements:{floating:f}}=t,p=n.current[a];if(!p)return{};const h={...t,...await M(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-i).fn(t)},g=(null==u?void 0:u.current)||f,m=await O(Hn(h,g.scrollHeight),c),y=await O(h,{...c,elementContext:"reference"}),v=Math.max(0,m.top),b=h.y+v,S=Math.max(0,g.scrollHeight-v-Math.max(0,m.bottom));return g.style.maxHeight=S+"px",g.scrollTop=v,o&&(g.offsetHeight=-s||y.bottom>=-s?(0,Se.flushSync)((()=>o(!0))):(0,Se.flushSync)((()=>o(!1)))),r&&(r.current=await O(Hn({...h,y:b},g.offsetHeight),c)),{y:b}}});function Gn(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:a,onChange:l}=t,s=dn(l),u=ve.useRef(!1),c=ve.useRef(null),d=ve.useRef(null);return ve.useEffect((()=>{if(!o)return;function e(e){if(e.ctrlKey||!t||null==i.current)return;const n=e.deltaY,r=i.current.top>=-.5,o=i.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,l=n<0?-1:1,u=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!o&&n<0?(e.preventDefault(),(0,Se.flushSync)((()=>{s((e=>e+Math[u](n,a*l)))}))):/firefox/i.test(Ie())&&(t.scrollTop+=n))}const t=(null==a?void 0:a.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{c.current=t.scrollTop,null!=i.current&&(d.current={...i.current})})),()=>{c.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[o,n,r.floating,i,a,s]),ve.useMemo((()=>o?{floating:{onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const e=(null==a?void 0:a.current)||r.floating;if(i.current&&e&&u.current){if(null!==c.current){const t=e.scrollTop-c.current;(i.current.bottom<-.5&&t<-1||i.current.top<-.5&&t>1)&&(0,Se.flushSync)((()=>s((e=>e+t))))}requestAnimationFrame((()=>{c.current=e.scrollTop}))}}}}:{}),[o,i,r.floating,a,s])}function Vn(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e=r!=u>=r&&n<=(s-i)*(r-l)/(u-l)+i&&(o=!o)}return o}function Kn(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,l=null,s=performance.now();const u=e=>{let{x:n,y:u,placement:c,elements:d,onClose:f,nodeId:p,tree:h}=e;return function(e){function g(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==c||null==n||null==u)return;const{clientX:m,clientY:y}=e,v=[m,y],b=De(e),S="mouseleave"===e.type,w=Ce(d.floating,b),E=Ce(d.domReference,b),_=d.domReference.getBoundingClientRect(),x=d.floating.getBoundingClientRect(),T=c.split("-")[0],k=n>x.right-x.width/2,O=u>x.bottom-x.height/2,C=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(v,_),P=x.width>_.width,I=x.height>_.height,R=(P?_:x).left,N=(P?_:x).right,A=(I?_:x).top,L=(I?_:x).bottom;if(w&&(i=!0,!S))return;if(E&&(i=!1),E&&!S)return void(i=!0);if(S&&W(e.relatedTarget)&&Ce(d.floating,e.relatedTarget))return;if(h&&Pt(h.nodesRef.current,p).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===T&&u>=_.bottom-1||"bottom"===T&&u<=_.top+1||"left"===T&&n>=_.right-1||"right"===T&&n<=_.left+1)return g();let j=[];switch(T){case"top":j=[[R,_.top+1],[R,x.bottom-1],[N,x.bottom-1],[N,_.top+1]];break;case"bottom":j=[[R,x.top+1],[R,_.bottom-1],[N,_.bottom-1],[N,x.top+1]];break;case"left":j=[[x.right-1,L],[x.right-1,A],[_.left+1,A],[_.left+1,L]];break;case"right":j=[[_.right-1,L],[_.right-1,A],[x.left+1,A],[x.left+1,L]]}if(!Vn([m,y],j)){if(i&&!C)return g();if(!S&&r){const t=function(e,t){const n=performance.now(),r=n-s;if(null===a||null===l||0===r)return a=e,l=t,s=n,null;const o=e-a,i=t-l,u=Math.sqrt(o*o+i*i);return a=e,l=t,s=n,u/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return g()}Vn([m,y],function(e){let[n,r]=e;switch(T){case"top":return[[P?n+t/2:k?n+4*t:n-4*t,r+t+1],[P?n-t/2:k?n+4*t:n-4*t,r+t+1],[x.left,k||P?x.bottom-t:x.top],[x.right,k?P?x.bottom-t:x.top:x.bottom-t]];case"bottom":return[[P?n+t/2:k?n+4*t:n-4*t,r-t],[P?n-t/2:k?n+4*t:n-4*t,r-t],[x.left,k||P?x.top+t:x.bottom],[x.right,k?P?x.top+t:x.bottom:x.top+t]];case"left":{const e=[n+t+1,I?r+t/2:O?r+4*t:r-4*t],o=[n+t+1,I?r-t/2:O?r+4*t:r-4*t];return[[O||I?x.right-t:x.left,x.top],[O?I?x.right-t:x.left:x.right-t,x.bottom],e,o]}case"right":return[[n-t,I?r+t/2:O?r+4*t:r-4*t],[n-t,I?r-t/2:O?r+4*t:r-4*t],[O||I?x.left+t:x.right,x.top],[O?I?x.left+t:x.right:x.left+t,x.bottom]]}}([n,u]))?!i&&r&&(o=window.setTimeout(g,40)):g()}}};return u.__options={blockPointerEvents:n},u}},20640:(e,t,n)=>{"use strict";var r=n(11742),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,l,s,u,c=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),l=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(u),l.selectNodeContents(u),s.addRange(l),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(l):s.removeAllRanges()),u&&document.body.removeChild(u),a()}return c}},27418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s{"use strict";var r=n(50414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},45697:(e,t,n)=>{e.exports=n(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},64448:(e,t,n)=>{"use strict";var r=n(67294),o=n(63840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n