@purpurds/tooltip 5.13.0 → 5.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- Start time: Mon Aug 26 2024 11:59:33 GMT+0000 (Coordinated Universal Time)
2
- Invoking "/usr/bin/tar -x -m -f /opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/common/temp/build-cache/ci_build/@purpurds/tooltip/68cfada0d6c1c4ff3a69473255472deba1c638b8"
1
+ Start time: Wed Sep 04 2024 07:54:18 GMT+0000 (Coordinated Universal Time)
2
+ Invoking "/usr/bin/tar -x -m -f /opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/common/temp/build-cache/ci_build/@purpurds/tooltip/29cf122e03974d233e35539e6e2979d98226a157"
3
3
 
4
4
  ======= BEGIN PROCESS INPUT ======
5
5
 
@@ -11,10 +11,10 @@ rendering chunks...
11
11
 
12
12
  [vite:dts] Start generate declaration files...
13
13
  computing gzip size...
14
- dist/styles.css 1.78 kB gzip: 0.49 kB
15
- dist/tooltip.cjs.js 54.73 kB │ gzip: 18.86 kB │ map: 717.66 kB
16
- [vite:dts] Declaration files built in 4463ms.
14
+ [vite:dts] Declaration files built in 4320ms.
17
15
 
16
+ dist/styles.css 1.78 kB │ gzip: 0.49 kB
17
+ dist/tooltip.cjs.js 54.73 kB │ gzip: 18.86 kB │ map: 723.24 kB
18
18
  dist/styles.css 1.78 kB │ gzip: 0.49 kB
19
- dist/tooltip.es.js 78.32 kB │ gzip: 22.45 kB │ map: 726.71 kB
20
- ✓ built in 6.82s
19
+ dist/tooltip.es.js 78.32 kB │ gzip: 22.45 kB │ map: 732.29 kB
20
+ ✓ built in 7.22s
@@ -1,3 +1,3 @@
1
1
  {
2
- "nonCachedDurationMs": 10279.829866
2
+ "nonCachedDurationMs": 10333.345640999996
3
3
  }
@@ -2,10 +2,10 @@ Invoking: vitest run --passWithNoTests
2
2
 
3
3
  RUN v1.5.3 /opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/components/tooltip
4
4
 
5
- ✓ src/tooltip.test.tsx (9 tests) 731ms
5
+ ✓ src/tooltip.test.tsx (9 tests) 745ms
6
6
 
7
7
  Test Files 1 passed (1)
8
8
  Tests 9 passed (9)
9
- Start at 11:59:55
10
- Duration 2.61s (transform 726ms, setup 0ms, collect 1.09s, tests 731ms, environment 370ms, prepare 99ms)
9
+ Start at 07:54:42
10
+ Duration 2.68s (transform 719ms, setup 0ms, collect 1.10s, tests 745ms, environment 370ms, prepare 83ms)
11
11
 
@@ -1,3 +1,3 @@
1
1
  {
2
- "nonCachedDurationMs": 3948.223804
2
+ "nonCachedDurationMs": 4048.0629480000002
3
3
  }
package/dist/LICENSE.txt CHANGED
@@ -1,26 +1,26 @@
1
1
  Name: @purpurds/button
2
- Version: 5.12.0
2
+ Version: 5.13.0
3
3
  License: AGPL-3.0-only
4
4
  Private: false
5
5
 
6
6
  ---
7
7
 
8
8
  Name: @purpurds/icon
9
- Version: 5.12.0
9
+ Version: 5.13.0
10
10
  License: AGPL-3.0-only
11
11
  Private: false
12
12
 
13
13
  ---
14
14
 
15
15
  Name: @purpurds/paragraph
16
- Version: 5.12.0
16
+ Version: 5.13.0
17
17
  License: AGPL-3.0-only
18
18
  Private: false
19
19
 
20
20
  ---
21
21
 
22
22
  Name: @purpurds/tokens
23
- Version: 5.12.0
23
+ Version: 5.13.0
24
24
  License: AGPL-3.0-only
25
25
  Private: false
26
26
 
@@ -14,9 +14,9 @@
14
14
  Copyright (c) 2018 Jed Watson.
15
15
  Licensed under the MIT License (MIT), see
16
16
  http://jedwatson.github.io/classnames
17
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o(a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(yt);var In=yt.exports;const jn=kn(In),de={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},$t={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},pe="purpur-paragraph",wt=({["data-testid"]:e,children:t,className:n,disabled:o,enableHyphenation:i=!1,negative:r=!1,variant:s=$t.PARAGRAPH100,...a})=>{const c=jn([n,de[pe],de[`${pe}--${s}`],{[de[`${pe}--hyphens`]]:i,[de[`${pe}--disabled`]]:o,[de[`${pe}--negative`]]:r}]);return N.jsx("p",{...a,className:c,"data-testid":e,children:t})};wt.displayName="Paragraph";const Fn="400ms";function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},R.apply(this,arguments)}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Hn(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _t(...e){return t=>e.forEach(n=>Hn(n,t))}function ie(...e){return l.useCallback(_t(...e),e)}function Et(e,t=[]){let n=[];function o(r,s){const a=l.createContext(s),c=n.length;n=[...n,s];function u(d){const{scope:h,children:p,...m}=d,g=(h==null?void 0:h[e][c])||a,v=l.useMemo(()=>m,Object.values(m));return l.createElement(g.Provider,{value:v},p)}function f(d,h){const p=(h==null?void 0:h[e][c])||a,m=l.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${r}\``)}return u.displayName=r+"Provider",[u,f]}const i=()=>{const r=n.map(s=>l.createContext(s));return function(a){const c=(a==null?void 0:a[e])||r;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[o,Bn(i,...t)]}function Bn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=o.reduce((a,{useScope:c,scopeName:u})=>{const d=c(r)[`__scope${u}`];return{...a,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Pt=l.forwardRef((e,t)=>{const{children:n,...o}=e,i=l.Children.toArray(n),r=i.find(zn);if(r){const s=r.props.children,a=i.map(c=>c===r?l.Children.count(s)>1?l.Children.only(null):l.isValidElement(s)?s.props.children:null:c);return l.createElement(ke,R({},o,{ref:t}),l.isValidElement(s)?l.cloneElement(s,void 0,a):null)}return l.createElement(ke,R({},o,{ref:t}),n)});Pt.displayName="Slot";const ke=l.forwardRef((e,t)=>{const{children:n,...o}=e;return l.isValidElement(n)?l.cloneElement(n,{...Wn(o,n.props),ref:t?_t(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});ke.displayName="SlotClone";const Ot=({children:e})=>l.createElement(l.Fragment,null,e);function zn(e){return l.isValidElement(e)&&e.type===Ot}function Wn(e,t){const n={...t};for(const o in t){const i=e[o],r=t[o];/^on[A-Z]/.test(o)?i&&r?n[o]=(...a)=>{r(...a),i(...a)}:i&&(n[o]=i):o==="style"?n[o]={...i,...r}:o==="className"&&(n[o]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}const Un=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Q=Un.reduce((e,t)=>{const n=l.forwardRef((o,i)=>{const{asChild:r,...s}=o,a=r?Pt:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(a,R({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Vn(e,t){e&&Re.flushSync(()=>e.dispatchEvent(t))}function se(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Gn(e,t=globalThis==null?void 0:globalThis.document){const n=se(e);l.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const Ie="dismissableLayer.update",Xn="dismissableLayer.pointerDownOutside",Yn="dismissableLayer.focusOutside";let nt;const qn=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kn=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,f=l.useContext(qn),[d,h]=l.useState(null),p=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=l.useState({}),g=ie(t,E=>h(E)),v=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),$=d?v.indexOf(d):-1,w=f.layersWithOutsidePointerEventsDisabled.size>0,y=$>=b,_=Zn(E=>{const T=E.target,L=[...f.branches].some(C=>C.contains(T));!y||L||(r==null||r(E),a==null||a(E),E.defaultPrevented||c==null||c())},p),O=Jn(E=>{const T=E.target;[...f.branches].some(C=>C.contains(T))||(s==null||s(E),a==null||a(E),E.defaultPrevented||c==null||c())},p);return Gn(E=>{$===f.layers.size-1&&(i==null||i(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},p),l.useEffect(()=>{if(d)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(nt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),rt(),()=>{o&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nt)}},[d,p,o,f]),l.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),rt())},[d,f]),l.useEffect(()=>{const E=()=>m({});return document.addEventListener(Ie,E),()=>document.removeEventListener(Ie,E)},[]),l.createElement(Q.div,R({},u,{ref:g,style:{pointerEvents:w?y?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,O.onFocusCapture),onBlurCapture:B(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,_.onPointerDownCapture)}))});function Zn(e,t=globalThis==null?void 0:globalThis.document){const n=se(e),o=l.useRef(!1),i=l.useRef(()=>{});return l.useEffect(()=>{const r=a=>{if(a.target&&!o.current){let u=function(){At(Xn,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Jn(e,t=globalThis==null?void 0:globalThis.document){const n=se(e),o=l.useRef(!1);return l.useEffect(()=>{const i=r=>{r.target&&!o.current&&At(Yn,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function rt(){const e=new CustomEvent(Ie);document.dispatchEvent(e)}function At(e,t,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?Vn(i,r):i.dispatchEvent(r)}const re=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Qn=D.useId||(()=>{});let er=0;function tr(e){const[t,n]=D.useState(Qn());return re(()=>{n(o=>o??String(er++))},[e]),t?`radix-${t}`:""}const nr=["top","right","bottom","left"],Y=Math.min,k=Math.max,Oe=Math.round,_e=Math.floor,q=e=>({x:e,y:e}),rr={left:"right",right:"left",bottom:"top",top:"bottom"},or={start:"end",end:"start"};function je(e,t,n){return k(e,Y(t,n))}function z(e,t){return typeof e=="function"?e(t):e}function W(e){return e.split("-")[0]}function ae(e){return e.split("-")[1]}function Be(e){return e==="x"?"y":"x"}function ze(e){return e==="y"?"height":"width"}function ce(e){return["top","bottom"].includes(W(e))?"y":"x"}function We(e){return Be(ce(e))}function ir(e,t,n){n===void 0&&(n=!1);const o=ae(e),i=We(e),r=ze(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Ae(s)),[s,Ae(s)]}function sr(e){const t=Ae(e);return[Fe(e),t,Fe(t)]}function Fe(e){return e.replace(/start|end/g,t=>or[t])}function ar(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:s;default:return[]}}function cr(e,t,n,o){const i=ae(e);let r=ar(W(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(Fe)))),r}function Ae(e){return e.replace(/left|right|bottom|top/g,t=>rr[t])}function lr(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ct(e){return typeof e!="number"?lr(e):{top:e,right:e,bottom:e,left:e}}function Ce(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ot(e,t,n){let{reference:o,floating:i}=e;const r=ce(t),s=We(t),a=ze(s),c=W(t),u=r==="y",f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(c){case"top":p={x:f,y:o.y-i.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-i.width,y:d};break;default:p={x:o.x,y:o.y}}switch(ae(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const ur=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=ot(u,o,c),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:v,fn:x}=a[g],{x:b,y:$,data:w,reset:y}=await x({x:f,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});if(f=b??f,d=$??d,p={...p,[v]:{...p[v],...w}},y&&m<=50){m++,typeof y=="object"&&(y.placement&&(h=y.placement),y.rects&&(u=y.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:f,y:d}=ot(u,h,c)),g=-1;continue}}return{x:f,y:d,placement:h,strategy:i,middlewareData:p}};async function he(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=z(t,e),m=Ct(p),v=a[h?d==="floating"?"reference":"floating":d],x=Ce(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),b=d==="floating"?{...s.floating,x:o,y:i}:s.reference,$=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),w=await(r.isElement==null?void 0:r.isElement($))?await(r.getScale==null?void 0:r.getScale($))||{x:1,y:1}:{x:1,y:1},y=Ce(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:$,strategy:c}):b);return{top:(x.top-y.top+m.top)/w.y,bottom:(y.bottom-x.bottom+m.bottom)/w.y,left:(x.left-y.left+m.left)/w.x,right:(y.right-x.right+m.right)/w.x}}const it=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a}=t,{element:c,padding:u=0}=z(e,t)||{};if(c==null)return{};const f=Ct(u),d={x:n,y:o},h=We(i),p=ze(h),m=await s.getDimensions(c),g=h==="y",v=g?"top":"left",x=g?"bottom":"right",b=g?"clientHeight":"clientWidth",$=r.reference[p]+r.reference[h]-d[h]-r.floating[p],w=d[h]-r.reference[h],y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let _=y?y[b]:0;(!_||!await(s.isElement==null?void 0:s.isElement(y)))&&(_=a.floating[b]||r.floating[p]);const O=$/2-w/2,E=_/2-m[p]/2-1,T=Y(f[v],E),L=Y(f[x],E),C=T,M=_-m[p]-L,S=_/2-m[p]/2+O,A=je(C,S,M),P=ae(i)!=null&&S!=A&&r.reference[p]/2-(S<C?T:L)-m[p]/2<0?S<C?C-S:M-S:0;return{[h]:d[h]-P,data:{[h]:A,centerOffset:S-A+P}}}}),fr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:i,rects:r,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=z(e,t),v=W(o),x=W(s)===s,b=await(a.isRTL==null?void 0:a.isRTL(c.floating)),$=d||(x||!m?[Ae(s)]:sr(s));!d&&p!=="none"&&$.push(...cr(s,m,p,b));const w=[s,...$],y=await he(t,g),_=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&_.push(y[v]),f){const C=ir(o,r,b);_.push(y[C[0]],y[C[1]])}if(O=[...O,{placement:o,overflows:_}],!_.every(C=>C<=0)){var E,T;const C=(((E=i.flip)==null?void 0:E.index)||0)+1,M=w[C];if(M)return{data:{index:C,overflows:O},reset:{placement:M}};let S=(T=O.filter(A=>A.overflows[0]<=0).sort((A,j)=>A.overflows[1]-j.overflows[1])[0])==null?void 0:T.placement;if(!S)switch(h){case"bestFit":{var L;const A=(L=O.map(j=>[j.placement,j.overflows.filter(P=>P>0).reduce((P,G)=>P+G,0)]).sort((j,P)=>j[1]-P[1])[0])==null?void 0:L[0];A&&(S=A);break}case"initialPlacement":S=s;break}if(o!==S)return{reset:{placement:S}}}return{}}}};function st(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function at(e){return nr.some(t=>e[t]>=0)}const dr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=z(e,t);switch(o){case"referenceHidden":{const r=await he(t,{...i,elementContext:"reference"}),s=st(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:at(s)}}}case"escaped":{const r=await he(t,{...i,altBoundary:!0}),s=st(r,n.floating);return{data:{escapedOffsets:s,escaped:at(s)}}}default:return{}}}}};async function pr(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),a=ae(n),c=ce(n)==="y",u=["left","top"].includes(s)?-1:1,f=r&&c?-1:1,d=z(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*f,y:h*u}:{x:h*u,y:p*f}}const hr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,i=await pr(t,e);return{x:n+i.x,y:o+i.y,data:i}}}},mr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...c}=z(e,t),u={x:n,y:o},f=await he(t,c),d=ce(W(i)),h=Be(d);let p=u[h],m=u[d];if(r){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=p+f[v],$=p-f[x];p=je(b,p,$)}if(s){const v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=m+f[v],$=m-f[x];m=je(b,m,$)}const g=a.fn({...t,[h]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}},gr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=z(e,t),f={x:n,y:o},d=ce(i),h=Be(d);let p=f[h],m=f[d];const g=z(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const $=h==="y"?"height":"width",w=r.reference[h]-r.floating[$]+v.mainAxis,y=r.reference[h]+r.reference[$]-v.mainAxis;p<w?p=w:p>y&&(p=y)}if(u){var x,b;const $=h==="y"?"width":"height",w=["top","left"].includes(W(i)),y=r.reference[d]-r.floating[$]+(w&&((x=s.offset)==null?void 0:x[d])||0)+(w?0:v.crossAxis),_=r.reference[d]+r.reference[$]+(w?0:((b=s.offset)==null?void 0:b[d])||0)-(w?v.crossAxis:0);m<y?m=y:m>_&&(m=_)}return{[h]:p,[d]:m}}}},vr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:r}=t,{apply:s=()=>{},...a}=z(e,t),c=await he(t,a),u=W(n),f=ae(n),d=ce(n)==="y",{width:h,height:p}=o.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=f===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=u,m=f==="end"?"top":"bottom");const v=p-c[m],x=h-c[g],b=!t.middlewareData.shift;let $=v,w=x;if(d){const _=h-c.left-c.right;w=f||b?Y(x,_):_}else{const _=p-c.top-c.bottom;$=f||b?Y(v,_):_}if(b&&!f){const _=k(c.left,0),O=k(c.right,0),E=k(c.top,0),T=k(c.bottom,0);d?w=h-2*(_!==0||O!==0?_+O:k(c.left,c.right)):$=p-2*(E!==0||T!==0?E+T:k(c.top,c.bottom))}await s({...t,availableWidth:w,availableHeight:$});const y=await i.getDimensions(r.floating);return h!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function K(e){return Tt(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){var t;return(t=(Tt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tt(e){return e instanceof Node||e instanceof I(e).Node}function U(e){return e instanceof Element||e instanceof I(e).Element}function H(e){return e instanceof HTMLElement||e instanceof I(e).HTMLElement}function ct(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}function ve(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=F(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function xr(e){return["table","td","th"].includes(K(e))}function Ue(e){const t=Ve(),n=F(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function br(e){let t=oe(e);for(;H(t)&&!Se(t);){if(Ue(t))return t;t=oe(t)}return null}function Ve(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Se(e){return["html","body","#document"].includes(K(e))}function F(e){return I(e).getComputedStyle(e)}function De(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function oe(e){if(K(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ct(e)&&e.host||V(e);return ct(t)?t.host:t}function Rt(e){const t=oe(e);return Se(t)?e.ownerDocument?e.ownerDocument.body:e.body:H(t)&&ve(t)?t:Rt(t)}function me(e,t){var n;t===void 0&&(t=[]);const o=Rt(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),r=I(o);return i?t.concat(r,r.visualViewport||[],ve(o)?o:[],r.frameElement?me(r.frameElement):[]):t.concat(o,me(o))}function St(e){const t=F(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=H(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,a=Oe(n)!==r||Oe(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function Ge(e){return U(e)?e:e.contextElement}function ne(e){const t=Ge(e);if(!H(t))return q(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=St(t);let s=(r?Oe(n.width):n.width)/o,a=(r?Oe(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const yr=q(0);function Dt(e){const t=I(e);return!Ve()||!t.visualViewport?yr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $r(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==I(e)?!1:t}function J(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Ge(e);let s=q(1);t&&(o?U(o)&&(s=ne(o)):s=ne(e));const a=$r(r,n,o)?Dt(r):q(0);let c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,f=i.width/s.x,d=i.height/s.y;if(r){const h=I(r),p=o&&U(o)?I(o):o;let m=h.frameElement;for(;m&&o&&p!==h;){const g=ne(m),v=m.getBoundingClientRect(),x=F(m),b=v.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,$=v.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,u*=g.y,f*=g.x,d*=g.y,c+=b,u+=$,m=I(m).frameElement}}return Ce({width:f,height:d,x:c,y:u})}function wr(e){let{rect:t,offsetParent:n,strategy:o}=e;const i=H(n),r=V(n);if(n===r)return t;let s={scrollLeft:0,scrollTop:0},a=q(1);const c=q(0);if((i||!i&&o!=="fixed")&&((K(n)!=="body"||ve(r))&&(s=De(n)),H(n))){const u=J(n);a=ne(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function _r(e){return Array.from(e.getClientRects())}function Nt(e){return J(V(e)).left+De(e).scrollLeft}function Er(e){const t=V(e),n=De(e),o=e.ownerDocument.body,i=k(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=k(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Nt(e);const a=-n.scrollTop;return F(o).direction==="rtl"&&(s+=k(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}function Pr(e,t){const n=I(e),o=V(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,c=0;if(i){r=i.width,s=i.height;const u=Ve();(!u||u&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:a,y:c}}function Or(e,t){const n=J(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=H(e)?ne(e):q(1),s=e.clientWidth*r.x,a=e.clientHeight*r.y,c=i*r.x,u=o*r.y;return{width:s,height:a,x:c,y:u}}function lt(e,t,n){let o;if(t==="viewport")o=Pr(e,n);else if(t==="document")o=Er(V(e));else if(U(t))o=Or(t,n);else{const i=Dt(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return Ce(o)}function Lt(e,t){const n=oe(e);return n===t||!U(n)||Se(n)?!1:F(n).position==="fixed"||Lt(n,t)}function Ar(e,t){const n=t.get(e);if(n)return n;let o=me(e).filter(a=>U(a)&&K(a)!=="body"),i=null;const r=F(e).position==="fixed";let s=r?oe(e):e;for(;U(s)&&!Se(s);){const a=F(s),c=Ue(s);!c&&a.position==="fixed"&&(i=null),(r?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ve(s)&&!c&&Lt(e,s))?o=o.filter(f=>f!==s):i=a,s=oe(s)}return t.set(e,o),o}function Cr(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?Ar(t,this._c):[].concat(n),o],a=s[0],c=s.reduce((u,f)=>{const d=lt(t,f,i);return u.top=k(d.top,u.top),u.right=Y(d.right,u.right),u.bottom=Y(d.bottom,u.bottom),u.left=k(d.left,u.left),u},lt(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Tr(e){return St(e)}function Rr(e,t,n){const o=H(t),i=V(t),r=n==="fixed",s=J(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const c=q(0);if(o||!o&&!r)if((K(t)!=="body"||ve(i))&&(a=De(t)),o){const u=J(t,!0,r,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else i&&(c.x=Nt(i));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function ut(e,t){return!H(e)||F(e).position==="fixed"?null:t?t(e):e.offsetParent}function Mt(e,t){const n=I(e);if(!H(e))return n;let o=ut(e,t);for(;o&&xr(o)&&F(o).position==="static";)o=ut(o,t);return o&&(K(o)==="html"||K(o)==="body"&&F(o).position==="static"&&!Ue(o))?n:o||br(e)||n}const Sr=async function(e){let{reference:t,floating:n,strategy:o}=e;const i=this.getOffsetParent||Mt,r=this.getDimensions;return{reference:Rr(t,await i(n),o),floating:{x:0,y:0,...await r(n)}}};function Dr(e){return F(e).direction==="rtl"}const Nr={convertOffsetParentRelativeRectToViewportRelativeRect:wr,getDocumentElement:V,getClippingRect:Cr,getOffsetParent:Mt,getElementRects:Sr,getClientRects:_r,getDimensions:Tr,getScale:ne,isElement:U,isRTL:Dr};function Lr(e,t){let n=null,o;const i=V(e);function r(){clearTimeout(o),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),r();const{left:u,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=_e(f),m=_e(i.clientWidth-(u+d)),g=_e(i.clientHeight-(f+h)),v=_e(u),b={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:k(0,Y(1,c))||1};let $=!0;function w(y){const _=y[0].intersectionRatio;if(_!==c){if(!$)return s();_?s(!1,_):o=setTimeout(()=>{s(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(w,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(e)}return s(!0),r}function Mr(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Ge(e),f=i||r?[...u?me(u):[],...me(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),r&&x.addEventListener("resize",n)});const d=u&&a?Lr(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let m,g=c?J(e):null;c&&v();function v(){const x=J(e);g&&(x.x!==g.x||x.y!==g.y||x.width!==g.width||x.height!==g.height)&&n(),g=x,m=requestAnimationFrame(v)}return n(),()=>{f.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const kr=(e,t,n)=>{const o=new Map,i={platform:Nr,...n},r={...i.platform,_c:o};return ur(e,t,{...i,platform:r})},Ir=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?it({element:o.current,padding:i}).fn(n):{}:o?it({element:o,padding:i}).fn(n):{}}}};var Pe=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Te(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!Te(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&e.$$typeof)&&!Te(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function kt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ft(e,t){const n=kt(e);return Math.round(t*n)/n}function dt(e){const t=D.useRef(e);return Pe(()=>{t.current=e}),t}function jr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,d]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=D.useState(o);Te(h,o)||p(o);const[m,g]=D.useState(null),[v,x]=D.useState(null),b=D.useCallback(P=>{P!=_.current&&(_.current=P,g(P))},[g]),$=D.useCallback(P=>{P!==O.current&&(O.current=P,x(P))},[x]),w=r||m,y=s||v,_=D.useRef(null),O=D.useRef(null),E=D.useRef(f),T=dt(c),L=dt(i),C=D.useCallback(()=>{if(!_.current||!O.current)return;const P={placement:t,strategy:n,middleware:h};L.current&&(P.platform=L.current),kr(_.current,O.current,P).then(G=>{const X={...G,isPositioned:!0};M.current&&!Te(E.current,X)&&(E.current=X,ln.flushSync(()=>{d(X)}))})},[h,t,n,L]);Pe(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[u]);const M=D.useRef(!1);Pe(()=>(M.current=!0,()=>{M.current=!1}),[]),Pe(()=>{if(w&&(_.current=w),y&&(O.current=y),w&&y){if(T.current)return T.current(w,y,C);C()}},[w,y,C,T]);const S=D.useMemo(()=>({reference:_,floating:O,setReference:b,setFloating:$}),[b,$]),A=D.useMemo(()=>({reference:w,floating:y}),[w,y]),j=D.useMemo(()=>{const P={position:n,left:0,top:0};if(!A.floating)return P;const G=ft(A.floating,f.x),X=ft(A.floating,f.y);return a?{...P,transform:"translate("+G+"px, "+X+"px)",...kt(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:X}},[n,a,A.floating,f.x,f.y]);return D.useMemo(()=>({...f,update:C,refs:S,elements:A,floatingStyles:j}),[f,C,S,A,j])}const Fr=l.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...r}=e;return l.createElement(Q.svg,R({},r,{ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Hr=Fr;function Br(e){const[t,n]=l.useState(void 0);return re(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if("borderBoxSize"in r){const c=r.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const It="Popper",[jt,Ft]=Et(It),[zr,Ht]=jt(It),Wr=e=>{const{__scopePopper:t,children:n}=e,[o,i]=l.useState(null);return l.createElement(zr,{scope:t,anchor:o,onAnchorChange:i},n)},Ur="PopperAnchor",Vr=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,r=Ht(Ur,n),s=l.useRef(null),a=ie(t,s);return l.useEffect(()=>{r.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:l.createElement(Q.div,R({},i,{ref:a}))}),Bt="PopperContent",[Gr,Xr]=jt(Bt),Yr=l.forwardRef((e,t)=>{var n,o,i,r,s,a,c,u;const{__scopePopper:f,side:d="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:v=!0,collisionBoundary:x=[],collisionPadding:b=0,sticky:$="partial",hideWhenDetached:w=!1,updatePositionStrategy:y="optimized",onPlaced:_,...O}=e,E=Ht(Bt,f),[T,L]=l.useState(null),C=ie(t,le=>L(le)),[M,S]=l.useState(null),A=Br(M),j=(n=A==null?void 0:A.width)!==null&&n!==void 0?n:0,P=(o=A==null?void 0:A.height)!==null&&o!==void 0?o:0,G=d+(p!=="center"?"-"+p:""),X=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},Ke=Array.isArray(x)?x:[x],qt=Ke.length>0,be={padding:X,boundary:Ke.filter(Jr),altBoundary:qt},{refs:Kt,floatingStyles:Ze,placement:Zt,isPositioned:ye,middlewareData:ee}=jr({strategy:"fixed",placement:G,whileElementsMounted:(...le)=>Mr(...le,{animationFrame:y==="always"}),elements:{reference:E.anchor},middleware:[hr({mainAxis:h+P,alignmentAxis:m}),v&&mr({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?gr():void 0,...be}),v&&fr({...be}),vr({...be,apply:({elements:le,rects:Qe,availableWidth:on,availableHeight:sn})=>{const{width:an,height:cn}=Qe.reference,we=le.floating.style;we.setProperty("--radix-popper-available-width",`${on}px`),we.setProperty("--radix-popper-available-height",`${sn}px`),we.setProperty("--radix-popper-anchor-width",`${an}px`),we.setProperty("--radix-popper-anchor-height",`${cn}px`)}}),M&&Ir({element:M,padding:g}),Qr({arrowWidth:j,arrowHeight:P}),w&&dr({strategy:"referenceHidden",...be})]}),[Je,Jt]=zt(Zt),$e=se(_);re(()=>{ye&&($e==null||$e())},[ye,$e]);const Qt=(i=ee.arrow)===null||i===void 0?void 0:i.x,en=(r=ee.arrow)===null||r===void 0?void 0:r.y,tn=((s=ee.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[nn,rn]=l.useState();return re(()=>{T&&rn(window.getComputedStyle(T).zIndex)},[T]),l.createElement("div",{ref:Kt.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ze,transform:ye?Ze.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:nn,"--radix-popper-transform-origin":[(a=ee.transformOrigin)===null||a===void 0?void 0:a.x,(c=ee.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Gr,{scope:f,placedSide:Je,onArrowChange:S,arrowX:Qt,arrowY:en,shouldHideArrow:tn},l.createElement(Q.div,R({"data-side":Je,"data-align":Jt},O,{ref:C,style:{...O.style,animation:ye?void 0:"none",opacity:(u=ee.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),qr="PopperArrow",Kr={top:"bottom",right:"left",bottom:"top",left:"right"},Zr=l.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,r=Xr(qr,o),s=Kr[r.placedSide];return l.createElement("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0}},l.createElement(Hr,R({},i,{ref:n,style:{...i.style,display:"block"}})))});function Jr(e){return e!==null}const Qr=e=>({name:"transformOrigin",options:e,fn(t){var n,o,i,r,s;const{placement:a,rects:c,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[m,g]=zt(a),v={start:"0%",center:"50%",end:"100%"}[g],x=((o=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&o!==void 0?o:0)+h/2,b=((r=(s=u.arrow)===null||s===void 0?void 0:s.y)!==null&&r!==void 0?r:0)+p/2;let $="",w="";return m==="bottom"?($=d?v:`${x}px`,w=`${-p}px`):m==="top"?($=d?v:`${x}px`,w=`${c.floating.height+p}px`):m==="right"?($=`${-p}px`,w=d?v:`${b}px`):m==="left"&&($=`${c.floating.width+p}px`,w=d?v:`${b}px`),{data:{x:$,y:w}}}});function zt(e){const[t,n="center"]=e.split("-");return[t,n]}const eo=Wr,to=Vr,no=Yr,ro=Zr,oo=l.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return o?Re.createPortal(l.createElement(Q.div,R({},i,{ref:t})),o):null});function io(e,t){return l.useReducer((n,o)=>{const i=t[n][o];return i??n},e)}const Xe=e=>{const{present:t,children:n}=e,o=so(t),i=typeof n=="function"?n({present:o.isPresent}):l.Children.only(n),r=ie(o.ref,i.ref);return typeof n=="function"||o.isPresent?l.cloneElement(i,{ref:r}):null};Xe.displayName="Presence";function so(e){const[t,n]=l.useState(),o=l.useRef({}),i=l.useRef(e),r=l.useRef("none"),s=e?"mounted":"unmounted",[a,c]=io(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Ee(o.current);r.current=a==="mounted"?u:"none"},[a]),re(()=>{const u=o.current,f=i.current;if(f!==e){const h=r.current,p=Ee(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),re(()=>{if(t){const u=d=>{const p=Ee(o.current).includes(d.animationName);d.target===t&&p&&Re.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(r.current=Ee(o.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function Ee(e){return(e==null?void 0:e.animationName)||"none"}function ao({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,i]=co({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:o,a=se(n),c=l.useCallback(u=>{if(r){const d=typeof u=="function"?u(e):u;d!==e&&a(d)}else i(u)},[r,e,i,a]);return[s,c]}function co({defaultProp:e,onChange:t}){const n=l.useState(e),[o]=n,i=l.useRef(o),r=se(t);return l.useEffect(()=>{i.current!==o&&(r(o),i.current=o)},[o,i,r]),n}const lo=l.forwardRef((e,t)=>l.createElement(Q.span,R({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),uo=lo,[Ne,Yo]=Et("Tooltip",[Ft]),Le=Ft(),fo="TooltipProvider",po=700,He="tooltip.open",[ho,Ye]=Ne(fo),mo=e=>{const{__scopeTooltip:t,delayDuration:n=po,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:r}=e,[s,a]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),l.createElement(ho,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(f=>{c.current=f},[]),disableHoverableContent:i},r)},qe="Tooltip",[go,xe]=Ne(qe),vo=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i=!1,onOpenChange:r,disableHoverableContent:s,delayDuration:a}=e,c=Ye(qe,e.__scopeTooltip),u=Le(t),[f,d]=l.useState(null),h=tr(),p=l.useRef(0),m=s??c.disableHoverableContent,g=a??c.delayDuration,v=l.useRef(!1),[x=!1,b]=ao({prop:o,defaultProp:i,onChange:O=>{O?(c.onOpen(),document.dispatchEvent(new CustomEvent(He))):c.onClose(),r==null||r(O)}}),$=l.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),w=l.useCallback(()=>{window.clearTimeout(p.current),v.current=!1,b(!0)},[b]),y=l.useCallback(()=>{window.clearTimeout(p.current),b(!1)},[b]),_=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0)},g)},[g,b]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(eo,u,l.createElement(go,{scope:t,contentId:h,open:x,stateAttribute:$,trigger:f,onTriggerChange:d,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?_():w()},[c.isOpenDelayed,_,w]),onTriggerLeave:l.useCallback(()=>{m?y():window.clearTimeout(p.current)},[y,m]),onOpen:w,onClose:y,disableHoverableContent:m},n))},pt="TooltipTrigger",xo=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=xe(pt,n),r=Ye(pt,n),s=Le(n),a=l.useRef(null),c=ie(t,a,i.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),d=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),l.createElement(to,R({asChild:!0},s),l.createElement(Q.button,R({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},o,{ref:c,onPointerMove:B(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!r.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:B(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:B(e.onBlur,i.onClose),onClick:B(e.onClick,i.onClose)})))}),Wt="TooltipPortal",[bo,yo]=Ne(Wt,{forceMount:void 0}),$o=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,r=xe(Wt,t);return l.createElement(bo,{scope:t,forceMount:n},l.createElement(Xe,{present:n||r.open},l.createElement(oo,{asChild:!0,container:i},o)))},ge="TooltipContent",wo=l.forwardRef((e,t)=>{const n=yo(ge,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...r}=e,s=xe(ge,e.__scopeTooltip);return l.createElement(Xe,{present:o||s.open},s.disableHoverableContent?l.createElement(Ut,R({side:i},r,{ref:t})):l.createElement(_o,R({side:i},r,{ref:t})))}),_o=l.forwardRef((e,t)=>{const n=xe(ge,e.__scopeTooltip),o=Ye(ge,e.__scopeTooltip),i=l.useRef(null),r=ie(t,i),[s,a]=l.useState(null),{trigger:c,onClose:u}=n,f=i.current,{onPointerInTransitChange:d}=o,h=l.useCallback(()=>{a(null),d(!1)},[d]),p=l.useCallback((m,g)=>{const v=m.currentTarget,x={x:m.clientX,y:m.clientY},b=Co(x,v.getBoundingClientRect()),$=To(x,b),w=Ro(g.getBoundingClientRect()),y=Do([...$,...w]);a(y),d(!0)},[d]);return l.useEffect(()=>()=>h(),[h]),l.useEffect(()=>{if(c&&f){const m=v=>p(v,f),g=v=>p(v,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),l.useEffect(()=>{if(s){const m=g=>{const v=g.target,x={x:g.clientX,y:g.clientY},b=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),$=!So(x,s);b?h():$&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,s,u,h]),l.createElement(Ut,R({},e,{ref:r}))}),[Eo,Po]=Ne(qe,{isInside:!1}),Ut=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:r,onPointerDownOutside:s,...a}=e,c=xe(ge,n),u=Le(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(He,f),()=>document.removeEventListener(He,f)),[f]),l.useEffect(()=>{if(c.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),l.createElement(Kn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f},l.createElement(no,R({"data-state":c.stateAttribute},u,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),l.createElement(Ot,null,o),l.createElement(Eo,{scope:n,isInside:!0},l.createElement(uo,{id:c.contentId,role:"tooltip"},i||o))))}),Oo="TooltipArrow",Ao=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Le(n);return Po(Oo,n).isInside?null:l.createElement(ro,R({},i,o,{ref:t}))});function Co(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function To(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Ro(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function So(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,s=t.length-1;r<t.length;s=r++){const a=t[r].x,c=t[r].y,u=t[s].x,f=t[s].y;c>o!=f>o&&n<(u-a)*(o-c)/(f-c)+a&&(i=!i)}return i}function Do(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),No(t)}function No(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const r=t[t.length-1],s=t[t.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const Lo=mo,Mo=vo,ko=xo,Io=$o,jo=wo,Fo=Ao;function Ho(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt={exports:{}};/*!
17
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o(a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(yt);var In=yt.exports;const jn=kn(In),de={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},$t={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},pe="purpur-paragraph",wt=({["data-testid"]:e,children:t,className:n,disabled:o,enableHyphenation:i=!1,negative:r=!1,variant:s=$t.PARAGRAPH100,...a})=>{const c=jn([n,de[pe],de[`${pe}--${s}`],{[de[`${pe}--hyphens`]]:i,[de[`${pe}--disabled`]]:o,[de[`${pe}--negative`]]:r}]);return N.jsx("p",{...a,className:c,"data-testid":e,children:t})};wt.displayName="Paragraph";const Fn="400ms";function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},R.apply(this,arguments)}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Hn(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function _t(...e){return t=>e.forEach(n=>Hn(n,t))}function ie(...e){return l.useCallback(_t(...e),e)}function Et(e,t=[]){let n=[];function o(r,s){const a=l.createContext(s),c=n.length;n=[...n,s];function u(d){const{scope:h,children:p,...m}=d,g=(h==null?void 0:h[e][c])||a,v=l.useMemo(()=>m,Object.values(m));return l.createElement(g.Provider,{value:v},p)}function f(d,h){const p=(h==null?void 0:h[e][c])||a,m=l.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${r}\``)}return u.displayName=r+"Provider",[u,f]}const i=()=>{const r=n.map(s=>l.createContext(s));return function(a){const c=(a==null?void 0:a[e])||r;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[o,Bn(i,...t)]}function Bn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=o.reduce((a,{useScope:c,scopeName:u})=>{const d=c(r)[`__scope${u}`];return{...a,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Pt=l.forwardRef((e,t)=>{const{children:n,...o}=e,i=l.Children.toArray(n),r=i.find(zn);if(r){const s=r.props.children,a=i.map(c=>c===r?l.Children.count(s)>1?l.Children.only(null):l.isValidElement(s)?s.props.children:null:c);return l.createElement(ke,R({},o,{ref:t}),l.isValidElement(s)?l.cloneElement(s,void 0,a):null)}return l.createElement(ke,R({},o,{ref:t}),n)});Pt.displayName="Slot";const ke=l.forwardRef((e,t)=>{const{children:n,...o}=e;return l.isValidElement(n)?l.cloneElement(n,{...Wn(o,n.props),ref:t?_t(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});ke.displayName="SlotClone";const Ot=({children:e})=>l.createElement(l.Fragment,null,e);function zn(e){return l.isValidElement(e)&&e.type===Ot}function Wn(e,t){const n={...t};for(const o in t){const i=e[o],r=t[o];/^on[A-Z]/.test(o)?i&&r?n[o]=(...a)=>{r(...a),i(...a)}:i&&(n[o]=i):o==="style"?n[o]={...i,...r}:o==="className"&&(n[o]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}const Un=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Q=Un.reduce((e,t)=>{const n=l.forwardRef((o,i)=>{const{asChild:r,...s}=o,a=r?Pt:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(a,R({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Vn(e,t){e&&Re.flushSync(()=>e.dispatchEvent(t))}function se(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Xn(e,t=globalThis==null?void 0:globalThis.document){const n=se(e);l.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const Ie="dismissableLayer.update",Yn="dismissableLayer.pointerDownOutside",Gn="dismissableLayer.focusOutside";let nt;const qn=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kn=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,f=l.useContext(qn),[d,h]=l.useState(null),p=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=l.useState({}),g=ie(t,E=>h(E)),v=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),$=d?v.indexOf(d):-1,w=f.layersWithOutsidePointerEventsDisabled.size>0,y=$>=b,_=Zn(E=>{const T=E.target,L=[...f.branches].some(C=>C.contains(T));!y||L||(r==null||r(E),a==null||a(E),E.defaultPrevented||c==null||c())},p),O=Jn(E=>{const T=E.target;[...f.branches].some(C=>C.contains(T))||(s==null||s(E),a==null||a(E),E.defaultPrevented||c==null||c())},p);return Xn(E=>{$===f.layers.size-1&&(i==null||i(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},p),l.useEffect(()=>{if(d)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(nt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),rt(),()=>{o&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nt)}},[d,p,o,f]),l.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),rt())},[d,f]),l.useEffect(()=>{const E=()=>m({});return document.addEventListener(Ie,E),()=>document.removeEventListener(Ie,E)},[]),l.createElement(Q.div,R({},u,{ref:g,style:{pointerEvents:w?y?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,O.onFocusCapture),onBlurCapture:B(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,_.onPointerDownCapture)}))});function Zn(e,t=globalThis==null?void 0:globalThis.document){const n=se(e),o=l.useRef(!1),i=l.useRef(()=>{});return l.useEffect(()=>{const r=a=>{if(a.target&&!o.current){let u=function(){At(Yn,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Jn(e,t=globalThis==null?void 0:globalThis.document){const n=se(e),o=l.useRef(!1);return l.useEffect(()=>{const i=r=>{r.target&&!o.current&&At(Gn,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function rt(){const e=new CustomEvent(Ie);document.dispatchEvent(e)}function At(e,t,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?Vn(i,r):i.dispatchEvent(r)}const re=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Qn=D.useId||(()=>{});let er=0;function tr(e){const[t,n]=D.useState(Qn());return re(()=>{n(o=>o??String(er++))},[e]),t?`radix-${t}`:""}const nr=["top","right","bottom","left"],G=Math.min,k=Math.max,Oe=Math.round,_e=Math.floor,q=e=>({x:e,y:e}),rr={left:"right",right:"left",bottom:"top",top:"bottom"},or={start:"end",end:"start"};function je(e,t,n){return k(e,G(t,n))}function z(e,t){return typeof e=="function"?e(t):e}function W(e){return e.split("-")[0]}function ae(e){return e.split("-")[1]}function Be(e){return e==="x"?"y":"x"}function ze(e){return e==="y"?"height":"width"}function ce(e){return["top","bottom"].includes(W(e))?"y":"x"}function We(e){return Be(ce(e))}function ir(e,t,n){n===void 0&&(n=!1);const o=ae(e),i=We(e),r=ze(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Ae(s)),[s,Ae(s)]}function sr(e){const t=Ae(e);return[Fe(e),t,Fe(t)]}function Fe(e){return e.replace(/start|end/g,t=>or[t])}function ar(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:s;default:return[]}}function cr(e,t,n,o){const i=ae(e);let r=ar(W(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(Fe)))),r}function Ae(e){return e.replace(/left|right|bottom|top/g,t=>rr[t])}function lr(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ct(e){return typeof e!="number"?lr(e):{top:e,right:e,bottom:e,left:e}}function Ce(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ot(e,t,n){let{reference:o,floating:i}=e;const r=ce(t),s=We(t),a=ze(s),c=W(t),u=r==="y",f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(c){case"top":p={x:f,y:o.y-i.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-i.width,y:d};break;default:p={x:o.x,y:o.y}}switch(ae(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const ur=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=ot(u,o,c),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:v,fn:x}=a[g],{x:b,y:$,data:w,reset:y}=await x({x:f,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});if(f=b??f,d=$??d,p={...p,[v]:{...p[v],...w}},y&&m<=50){m++,typeof y=="object"&&(y.placement&&(h=y.placement),y.rects&&(u=y.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:f,y:d}=ot(u,h,c)),g=-1;continue}}return{x:f,y:d,placement:h,strategy:i,middlewareData:p}};async function he(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=z(t,e),m=Ct(p),v=a[h?d==="floating"?"reference":"floating":d],x=Ce(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),b=d==="floating"?{...s.floating,x:o,y:i}:s.reference,$=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),w=await(r.isElement==null?void 0:r.isElement($))?await(r.getScale==null?void 0:r.getScale($))||{x:1,y:1}:{x:1,y:1},y=Ce(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b,offsetParent:$,strategy:c}):b);return{top:(x.top-y.top+m.top)/w.y,bottom:(y.bottom-x.bottom+m.bottom)/w.y,left:(x.left-y.left+m.left)/w.x,right:(y.right-x.right+m.right)/w.x}}const it=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a}=t,{element:c,padding:u=0}=z(e,t)||{};if(c==null)return{};const f=Ct(u),d={x:n,y:o},h=We(i),p=ze(h),m=await s.getDimensions(c),g=h==="y",v=g?"top":"left",x=g?"bottom":"right",b=g?"clientHeight":"clientWidth",$=r.reference[p]+r.reference[h]-d[h]-r.floating[p],w=d[h]-r.reference[h],y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let _=y?y[b]:0;(!_||!await(s.isElement==null?void 0:s.isElement(y)))&&(_=a.floating[b]||r.floating[p]);const O=$/2-w/2,E=_/2-m[p]/2-1,T=G(f[v],E),L=G(f[x],E),C=T,M=_-m[p]-L,S=_/2-m[p]/2+O,A=je(C,S,M),P=ae(i)!=null&&S!=A&&r.reference[p]/2-(S<C?T:L)-m[p]/2<0?S<C?C-S:M-S:0;return{[h]:d[h]-P,data:{[h]:A,centerOffset:S-A+P}}}}),fr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:i,rects:r,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=z(e,t),v=W(o),x=W(s)===s,b=await(a.isRTL==null?void 0:a.isRTL(c.floating)),$=d||(x||!m?[Ae(s)]:sr(s));!d&&p!=="none"&&$.push(...cr(s,m,p,b));const w=[s,...$],y=await he(t,g),_=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&_.push(y[v]),f){const C=ir(o,r,b);_.push(y[C[0]],y[C[1]])}if(O=[...O,{placement:o,overflows:_}],!_.every(C=>C<=0)){var E,T;const C=(((E=i.flip)==null?void 0:E.index)||0)+1,M=w[C];if(M)return{data:{index:C,overflows:O},reset:{placement:M}};let S=(T=O.filter(A=>A.overflows[0]<=0).sort((A,j)=>A.overflows[1]-j.overflows[1])[0])==null?void 0:T.placement;if(!S)switch(h){case"bestFit":{var L;const A=(L=O.map(j=>[j.placement,j.overflows.filter(P=>P>0).reduce((P,X)=>P+X,0)]).sort((j,P)=>j[1]-P[1])[0])==null?void 0:L[0];A&&(S=A);break}case"initialPlacement":S=s;break}if(o!==S)return{reset:{placement:S}}}return{}}}};function st(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function at(e){return nr.some(t=>e[t]>=0)}const dr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=z(e,t);switch(o){case"referenceHidden":{const r=await he(t,{...i,elementContext:"reference"}),s=st(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:at(s)}}}case"escaped":{const r=await he(t,{...i,altBoundary:!0}),s=st(r,n.floating);return{data:{escapedOffsets:s,escaped:at(s)}}}default:return{}}}}};async function pr(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),a=ae(n),c=ce(n)==="y",u=["left","top"].includes(s)?-1:1,f=r&&c?-1:1,d=z(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*f,y:h*u}:{x:h*u,y:p*f}}const hr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,i=await pr(t,e);return{x:n+i.x,y:o+i.y,data:i}}}},mr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...c}=z(e,t),u={x:n,y:o},f=await he(t,c),d=ce(W(i)),h=Be(d);let p=u[h],m=u[d];if(r){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=p+f[v],$=p-f[x];p=je(b,p,$)}if(s){const v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",b=m+f[v],$=m-f[x];m=je(b,m,$)}const g=a.fn({...t,[h]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}},gr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=z(e,t),f={x:n,y:o},d=ce(i),h=Be(d);let p=f[h],m=f[d];const g=z(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const $=h==="y"?"height":"width",w=r.reference[h]-r.floating[$]+v.mainAxis,y=r.reference[h]+r.reference[$]-v.mainAxis;p<w?p=w:p>y&&(p=y)}if(u){var x,b;const $=h==="y"?"width":"height",w=["top","left"].includes(W(i)),y=r.reference[d]-r.floating[$]+(w&&((x=s.offset)==null?void 0:x[d])||0)+(w?0:v.crossAxis),_=r.reference[d]+r.reference[$]+(w?0:((b=s.offset)==null?void 0:b[d])||0)-(w?v.crossAxis:0);m<y?m=y:m>_&&(m=_)}return{[h]:p,[d]:m}}}},vr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:r}=t,{apply:s=()=>{},...a}=z(e,t),c=await he(t,a),u=W(n),f=ae(n),d=ce(n)==="y",{width:h,height:p}=o.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=f===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=u,m=f==="end"?"top":"bottom");const v=p-c[m],x=h-c[g],b=!t.middlewareData.shift;let $=v,w=x;if(d){const _=h-c.left-c.right;w=f||b?G(x,_):_}else{const _=p-c.top-c.bottom;$=f||b?G(v,_):_}if(b&&!f){const _=k(c.left,0),O=k(c.right,0),E=k(c.top,0),T=k(c.bottom,0);d?w=h-2*(_!==0||O!==0?_+O:k(c.left,c.right)):$=p-2*(E!==0||T!==0?E+T:k(c.top,c.bottom))}await s({...t,availableWidth:w,availableHeight:$});const y=await i.getDimensions(r.floating);return h!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function K(e){return Tt(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){var t;return(t=(Tt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tt(e){return e instanceof Node||e instanceof I(e).Node}function U(e){return e instanceof Element||e instanceof I(e).Element}function H(e){return e instanceof HTMLElement||e instanceof I(e).HTMLElement}function ct(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}function ve(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=F(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function xr(e){return["table","td","th"].includes(K(e))}function Ue(e){const t=Ve(),n=F(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function br(e){let t=oe(e);for(;H(t)&&!Se(t);){if(Ue(t))return t;t=oe(t)}return null}function Ve(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Se(e){return["html","body","#document"].includes(K(e))}function F(e){return I(e).getComputedStyle(e)}function De(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function oe(e){if(K(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ct(e)&&e.host||V(e);return ct(t)?t.host:t}function Rt(e){const t=oe(e);return Se(t)?e.ownerDocument?e.ownerDocument.body:e.body:H(t)&&ve(t)?t:Rt(t)}function me(e,t){var n;t===void 0&&(t=[]);const o=Rt(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),r=I(o);return i?t.concat(r,r.visualViewport||[],ve(o)?o:[],r.frameElement?me(r.frameElement):[]):t.concat(o,me(o))}function St(e){const t=F(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=H(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,a=Oe(n)!==r||Oe(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function Xe(e){return U(e)?e:e.contextElement}function ne(e){const t=Xe(e);if(!H(t))return q(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=St(t);let s=(r?Oe(n.width):n.width)/o,a=(r?Oe(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const yr=q(0);function Dt(e){const t=I(e);return!Ve()||!t.visualViewport?yr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $r(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==I(e)?!1:t}function J(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Xe(e);let s=q(1);t&&(o?U(o)&&(s=ne(o)):s=ne(e));const a=$r(r,n,o)?Dt(r):q(0);let c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,f=i.width/s.x,d=i.height/s.y;if(r){const h=I(r),p=o&&U(o)?I(o):o;let m=h.frameElement;for(;m&&o&&p!==h;){const g=ne(m),v=m.getBoundingClientRect(),x=F(m),b=v.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,$=v.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,u*=g.y,f*=g.x,d*=g.y,c+=b,u+=$,m=I(m).frameElement}}return Ce({width:f,height:d,x:c,y:u})}function wr(e){let{rect:t,offsetParent:n,strategy:o}=e;const i=H(n),r=V(n);if(n===r)return t;let s={scrollLeft:0,scrollTop:0},a=q(1);const c=q(0);if((i||!i&&o!=="fixed")&&((K(n)!=="body"||ve(r))&&(s=De(n)),H(n))){const u=J(n);a=ne(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function _r(e){return Array.from(e.getClientRects())}function Nt(e){return J(V(e)).left+De(e).scrollLeft}function Er(e){const t=V(e),n=De(e),o=e.ownerDocument.body,i=k(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=k(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Nt(e);const a=-n.scrollTop;return F(o).direction==="rtl"&&(s+=k(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}function Pr(e,t){const n=I(e),o=V(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,c=0;if(i){r=i.width,s=i.height;const u=Ve();(!u||u&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:a,y:c}}function Or(e,t){const n=J(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=H(e)?ne(e):q(1),s=e.clientWidth*r.x,a=e.clientHeight*r.y,c=i*r.x,u=o*r.y;return{width:s,height:a,x:c,y:u}}function lt(e,t,n){let o;if(t==="viewport")o=Pr(e,n);else if(t==="document")o=Er(V(e));else if(U(t))o=Or(t,n);else{const i=Dt(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return Ce(o)}function Lt(e,t){const n=oe(e);return n===t||!U(n)||Se(n)?!1:F(n).position==="fixed"||Lt(n,t)}function Ar(e,t){const n=t.get(e);if(n)return n;let o=me(e).filter(a=>U(a)&&K(a)!=="body"),i=null;const r=F(e).position==="fixed";let s=r?oe(e):e;for(;U(s)&&!Se(s);){const a=F(s),c=Ue(s);!c&&a.position==="fixed"&&(i=null),(r?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ve(s)&&!c&&Lt(e,s))?o=o.filter(f=>f!==s):i=a,s=oe(s)}return t.set(e,o),o}function Cr(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?Ar(t,this._c):[].concat(n),o],a=s[0],c=s.reduce((u,f)=>{const d=lt(t,f,i);return u.top=k(d.top,u.top),u.right=G(d.right,u.right),u.bottom=G(d.bottom,u.bottom),u.left=k(d.left,u.left),u},lt(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Tr(e){return St(e)}function Rr(e,t,n){const o=H(t),i=V(t),r=n==="fixed",s=J(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const c=q(0);if(o||!o&&!r)if((K(t)!=="body"||ve(i))&&(a=De(t)),o){const u=J(t,!0,r,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else i&&(c.x=Nt(i));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function ut(e,t){return!H(e)||F(e).position==="fixed"?null:t?t(e):e.offsetParent}function Mt(e,t){const n=I(e);if(!H(e))return n;let o=ut(e,t);for(;o&&xr(o)&&F(o).position==="static";)o=ut(o,t);return o&&(K(o)==="html"||K(o)==="body"&&F(o).position==="static"&&!Ue(o))?n:o||br(e)||n}const Sr=async function(e){let{reference:t,floating:n,strategy:o}=e;const i=this.getOffsetParent||Mt,r=this.getDimensions;return{reference:Rr(t,await i(n),o),floating:{x:0,y:0,...await r(n)}}};function Dr(e){return F(e).direction==="rtl"}const Nr={convertOffsetParentRelativeRectToViewportRelativeRect:wr,getDocumentElement:V,getClippingRect:Cr,getOffsetParent:Mt,getElementRects:Sr,getClientRects:_r,getDimensions:Tr,getScale:ne,isElement:U,isRTL:Dr};function Lr(e,t){let n=null,o;const i=V(e);function r(){clearTimeout(o),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),r();const{left:u,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=_e(f),m=_e(i.clientWidth-(u+d)),g=_e(i.clientHeight-(f+h)),v=_e(u),b={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:k(0,G(1,c))||1};let $=!0;function w(y){const _=y[0].intersectionRatio;if(_!==c){if(!$)return s();_?s(!1,_):o=setTimeout(()=>{s(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(w,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(e)}return s(!0),r}function Mr(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=Xe(e),f=i||r?[...u?me(u):[],...me(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),r&&x.addEventListener("resize",n)});const d=u&&a?Lr(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(x=>{let[b]=x;b&&b.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let m,g=c?J(e):null;c&&v();function v(){const x=J(e);g&&(x.x!==g.x||x.y!==g.y||x.width!==g.width||x.height!==g.height)&&n(),g=x,m=requestAnimationFrame(v)}return n(),()=>{f.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const kr=(e,t,n)=>{const o=new Map,i={platform:Nr,...n},r={...i.platform,_c:o};return ur(e,t,{...i,platform:r})},Ir=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?it({element:o.current,padding:i}).fn(n):{}:o?it({element:o,padding:i}).fn(n):{}}}};var Pe=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Te(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!Te(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&e.$$typeof)&&!Te(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function kt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ft(e,t){const n=kt(e);return Math.round(t*n)/n}function dt(e){const t=D.useRef(e);return Pe(()=>{t.current=e}),t}function jr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,d]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=D.useState(o);Te(h,o)||p(o);const[m,g]=D.useState(null),[v,x]=D.useState(null),b=D.useCallback(P=>{P!=_.current&&(_.current=P,g(P))},[g]),$=D.useCallback(P=>{P!==O.current&&(O.current=P,x(P))},[x]),w=r||m,y=s||v,_=D.useRef(null),O=D.useRef(null),E=D.useRef(f),T=dt(c),L=dt(i),C=D.useCallback(()=>{if(!_.current||!O.current)return;const P={placement:t,strategy:n,middleware:h};L.current&&(P.platform=L.current),kr(_.current,O.current,P).then(X=>{const Y={...X,isPositioned:!0};M.current&&!Te(E.current,Y)&&(E.current=Y,ln.flushSync(()=>{d(Y)}))})},[h,t,n,L]);Pe(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[u]);const M=D.useRef(!1);Pe(()=>(M.current=!0,()=>{M.current=!1}),[]),Pe(()=>{if(w&&(_.current=w),y&&(O.current=y),w&&y){if(T.current)return T.current(w,y,C);C()}},[w,y,C,T]);const S=D.useMemo(()=>({reference:_,floating:O,setReference:b,setFloating:$}),[b,$]),A=D.useMemo(()=>({reference:w,floating:y}),[w,y]),j=D.useMemo(()=>{const P={position:n,left:0,top:0};if(!A.floating)return P;const X=ft(A.floating,f.x),Y=ft(A.floating,f.y);return a?{...P,transform:"translate("+X+"px, "+Y+"px)",...kt(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:Y}},[n,a,A.floating,f.x,f.y]);return D.useMemo(()=>({...f,update:C,refs:S,elements:A,floatingStyles:j}),[f,C,S,A,j])}const Fr=l.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...r}=e;return l.createElement(Q.svg,R({},r,{ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Hr=Fr;function Br(e){const[t,n]=l.useState(void 0);return re(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if("borderBoxSize"in r){const c=r.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const It="Popper",[jt,Ft]=Et(It),[zr,Ht]=jt(It),Wr=e=>{const{__scopePopper:t,children:n}=e,[o,i]=l.useState(null);return l.createElement(zr,{scope:t,anchor:o,onAnchorChange:i},n)},Ur="PopperAnchor",Vr=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,r=Ht(Ur,n),s=l.useRef(null),a=ie(t,s);return l.useEffect(()=>{r.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:l.createElement(Q.div,R({},i,{ref:a}))}),Bt="PopperContent",[Xr,Yr]=jt(Bt),Gr=l.forwardRef((e,t)=>{var n,o,i,r,s,a,c,u;const{__scopePopper:f,side:d="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:v=!0,collisionBoundary:x=[],collisionPadding:b=0,sticky:$="partial",hideWhenDetached:w=!1,updatePositionStrategy:y="optimized",onPlaced:_,...O}=e,E=Ht(Bt,f),[T,L]=l.useState(null),C=ie(t,le=>L(le)),[M,S]=l.useState(null),A=Br(M),j=(n=A==null?void 0:A.width)!==null&&n!==void 0?n:0,P=(o=A==null?void 0:A.height)!==null&&o!==void 0?o:0,X=d+(p!=="center"?"-"+p:""),Y=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},Ke=Array.isArray(x)?x:[x],qt=Ke.length>0,be={padding:Y,boundary:Ke.filter(Jr),altBoundary:qt},{refs:Kt,floatingStyles:Ze,placement:Zt,isPositioned:ye,middlewareData:ee}=jr({strategy:"fixed",placement:X,whileElementsMounted:(...le)=>Mr(...le,{animationFrame:y==="always"}),elements:{reference:E.anchor},middleware:[hr({mainAxis:h+P,alignmentAxis:m}),v&&mr({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?gr():void 0,...be}),v&&fr({...be}),vr({...be,apply:({elements:le,rects:Qe,availableWidth:on,availableHeight:sn})=>{const{width:an,height:cn}=Qe.reference,we=le.floating.style;we.setProperty("--radix-popper-available-width",`${on}px`),we.setProperty("--radix-popper-available-height",`${sn}px`),we.setProperty("--radix-popper-anchor-width",`${an}px`),we.setProperty("--radix-popper-anchor-height",`${cn}px`)}}),M&&Ir({element:M,padding:g}),Qr({arrowWidth:j,arrowHeight:P}),w&&dr({strategy:"referenceHidden",...be})]}),[Je,Jt]=zt(Zt),$e=se(_);re(()=>{ye&&($e==null||$e())},[ye,$e]);const Qt=(i=ee.arrow)===null||i===void 0?void 0:i.x,en=(r=ee.arrow)===null||r===void 0?void 0:r.y,tn=((s=ee.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[nn,rn]=l.useState();return re(()=>{T&&rn(window.getComputedStyle(T).zIndex)},[T]),l.createElement("div",{ref:Kt.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ze,transform:ye?Ze.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:nn,"--radix-popper-transform-origin":[(a=ee.transformOrigin)===null||a===void 0?void 0:a.x,(c=ee.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Xr,{scope:f,placedSide:Je,onArrowChange:S,arrowX:Qt,arrowY:en,shouldHideArrow:tn},l.createElement(Q.div,R({"data-side":Je,"data-align":Jt},O,{ref:C,style:{...O.style,animation:ye?void 0:"none",opacity:(u=ee.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),qr="PopperArrow",Kr={top:"bottom",right:"left",bottom:"top",left:"right"},Zr=l.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,r=Yr(qr,o),s=Kr[r.placedSide];return l.createElement("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0}},l.createElement(Hr,R({},i,{ref:n,style:{...i.style,display:"block"}})))});function Jr(e){return e!==null}const Qr=e=>({name:"transformOrigin",options:e,fn(t){var n,o,i,r,s;const{placement:a,rects:c,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,h=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[m,g]=zt(a),v={start:"0%",center:"50%",end:"100%"}[g],x=((o=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&o!==void 0?o:0)+h/2,b=((r=(s=u.arrow)===null||s===void 0?void 0:s.y)!==null&&r!==void 0?r:0)+p/2;let $="",w="";return m==="bottom"?($=d?v:`${x}px`,w=`${-p}px`):m==="top"?($=d?v:`${x}px`,w=`${c.floating.height+p}px`):m==="right"?($=`${-p}px`,w=d?v:`${b}px`):m==="left"&&($=`${c.floating.width+p}px`,w=d?v:`${b}px`),{data:{x:$,y:w}}}});function zt(e){const[t,n="center"]=e.split("-");return[t,n]}const eo=Wr,to=Vr,no=Gr,ro=Zr,oo=l.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return o?Re.createPortal(l.createElement(Q.div,R({},i,{ref:t})),o):null});function io(e,t){return l.useReducer((n,o)=>{const i=t[n][o];return i??n},e)}const Ye=e=>{const{present:t,children:n}=e,o=so(t),i=typeof n=="function"?n({present:o.isPresent}):l.Children.only(n),r=ie(o.ref,i.ref);return typeof n=="function"||o.isPresent?l.cloneElement(i,{ref:r}):null};Ye.displayName="Presence";function so(e){const[t,n]=l.useState(),o=l.useRef({}),i=l.useRef(e),r=l.useRef("none"),s=e?"mounted":"unmounted",[a,c]=io(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Ee(o.current);r.current=a==="mounted"?u:"none"},[a]),re(()=>{const u=o.current,f=i.current;if(f!==e){const h=r.current,p=Ee(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),re(()=>{if(t){const u=d=>{const p=Ee(o.current).includes(d.animationName);d.target===t&&p&&Re.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(r.current=Ee(o.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function Ee(e){return(e==null?void 0:e.animationName)||"none"}function ao({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,i]=co({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:o,a=se(n),c=l.useCallback(u=>{if(r){const d=typeof u=="function"?u(e):u;d!==e&&a(d)}else i(u)},[r,e,i,a]);return[s,c]}function co({defaultProp:e,onChange:t}){const n=l.useState(e),[o]=n,i=l.useRef(o),r=se(t);return l.useEffect(()=>{i.current!==o&&(r(o),i.current=o)},[o,i,r]),n}const lo=l.forwardRef((e,t)=>l.createElement(Q.span,R({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),uo=lo,[Ne,Go]=Et("Tooltip",[Ft]),Le=Ft(),fo="TooltipProvider",po=700,He="tooltip.open",[ho,Ge]=Ne(fo),mo=e=>{const{__scopeTooltip:t,delayDuration:n=po,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:r}=e,[s,a]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),l.createElement(ho,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(f=>{c.current=f},[]),disableHoverableContent:i},r)},qe="Tooltip",[go,xe]=Ne(qe),vo=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i=!1,onOpenChange:r,disableHoverableContent:s,delayDuration:a}=e,c=Ge(qe,e.__scopeTooltip),u=Le(t),[f,d]=l.useState(null),h=tr(),p=l.useRef(0),m=s??c.disableHoverableContent,g=a??c.delayDuration,v=l.useRef(!1),[x=!1,b]=ao({prop:o,defaultProp:i,onChange:O=>{O?(c.onOpen(),document.dispatchEvent(new CustomEvent(He))):c.onClose(),r==null||r(O)}}),$=l.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),w=l.useCallback(()=>{window.clearTimeout(p.current),v.current=!1,b(!0)},[b]),y=l.useCallback(()=>{window.clearTimeout(p.current),b(!1)},[b]),_=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0)},g)},[g,b]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(eo,u,l.createElement(go,{scope:t,contentId:h,open:x,stateAttribute:$,trigger:f,onTriggerChange:d,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?_():w()},[c.isOpenDelayed,_,w]),onTriggerLeave:l.useCallback(()=>{m?y():window.clearTimeout(p.current)},[y,m]),onOpen:w,onClose:y,disableHoverableContent:m},n))},pt="TooltipTrigger",xo=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=xe(pt,n),r=Ge(pt,n),s=Le(n),a=l.useRef(null),c=ie(t,a,i.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),d=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),l.createElement(to,R({asChild:!0},s),l.createElement(Q.button,R({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},o,{ref:c,onPointerMove:B(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!r.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:B(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:B(e.onBlur,i.onClose),onClick:B(e.onClick,i.onClose)})))}),Wt="TooltipPortal",[bo,yo]=Ne(Wt,{forceMount:void 0}),$o=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,r=xe(Wt,t);return l.createElement(bo,{scope:t,forceMount:n},l.createElement(Ye,{present:n||r.open},l.createElement(oo,{asChild:!0,container:i},o)))},ge="TooltipContent",wo=l.forwardRef((e,t)=>{const n=yo(ge,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...r}=e,s=xe(ge,e.__scopeTooltip);return l.createElement(Ye,{present:o||s.open},s.disableHoverableContent?l.createElement(Ut,R({side:i},r,{ref:t})):l.createElement(_o,R({side:i},r,{ref:t})))}),_o=l.forwardRef((e,t)=>{const n=xe(ge,e.__scopeTooltip),o=Ge(ge,e.__scopeTooltip),i=l.useRef(null),r=ie(t,i),[s,a]=l.useState(null),{trigger:c,onClose:u}=n,f=i.current,{onPointerInTransitChange:d}=o,h=l.useCallback(()=>{a(null),d(!1)},[d]),p=l.useCallback((m,g)=>{const v=m.currentTarget,x={x:m.clientX,y:m.clientY},b=Co(x,v.getBoundingClientRect()),$=To(x,b),w=Ro(g.getBoundingClientRect()),y=Do([...$,...w]);a(y),d(!0)},[d]);return l.useEffect(()=>()=>h(),[h]),l.useEffect(()=>{if(c&&f){const m=v=>p(v,f),g=v=>p(v,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),l.useEffect(()=>{if(s){const m=g=>{const v=g.target,x={x:g.clientX,y:g.clientY},b=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),$=!So(x,s);b?h():$&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,s,u,h]),l.createElement(Ut,R({},e,{ref:r}))}),[Eo,Po]=Ne(qe,{isInside:!1}),Ut=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:r,onPointerDownOutside:s,...a}=e,c=xe(ge,n),u=Le(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(He,f),()=>document.removeEventListener(He,f)),[f]),l.useEffect(()=>{if(c.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),l.createElement(Kn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f},l.createElement(no,R({"data-state":c.stateAttribute},u,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),l.createElement(Ot,null,o),l.createElement(Eo,{scope:n,isInside:!0},l.createElement(uo,{id:c.contentId,role:"tooltip"},i||o))))}),Oo="TooltipArrow",Ao=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Le(n);return Po(Oo,n).isInside?null:l.createElement(ro,R({},i,o,{ref:t}))});function Co(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function To(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Ro(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function So(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,s=t.length-1;r<t.length;s=r++){const a=t[r].x,c=t[r].y,u=t[s].x,f=t[s].y;c>o!=f>o&&n<(u-a)*(o-c)/(f-c)+a&&(i=!i)}return i}function Do(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),No(t)}function No(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const r=t[t.length-1],s=t[t.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const Lo=mo,Mo=vo,ko=xo,Io=$o,jo=wo,Fo=Ao;function Ho(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt={exports:{}};/*!
18
18
  Copyright (c) 2018 Jed Watson.
19
19
  Licensed under the MIT License (MIT), see
20
20
  http://jedwatson.github.io/classnames
21
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Vt);var Bo=Vt.exports;const zo=Ho(Bo),Wo="_slideDownAndFade_fkagk_1",Uo="_slideLeftAndFade_fkagk_1",Vo="_slideUpAndFade_fkagk_1",Go="_slideRightAndFade_fkagk_1",Xo={"purpur-tooltip":"_purpur-tooltip_fkagk_1","purpur-tooltip__content":"_purpur-tooltip__content_fkagk_4","purpur-tooltip__content--primary":"_purpur-tooltip__content--primary_fkagk_14","purpur-tooltip__content--primary-negative":"_purpur-tooltip__content--primary-negative_fkagk_17",slideDownAndFade:Wo,slideLeftAndFade:Uo,slideUpAndFade:Vo,slideRightAndFade:Go,"purpur-tooltip__arrow--primary":"_purpur-tooltip__arrow--primary_fkagk_32","purpur-tooltip__arrow--primary-negative":"_purpur-tooltip__arrow--primary-negative_fkagk_35"},Me=zo.bind(Xo),Gt={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"},Xt={START:"start",CENTER:"center",END:"end"},te="purpur-tooltip",Yt=l.forwardRef(({["data-testid"]:e,buttonSize:t="md",children:n,className:o,contentClassName:i,negative:r=!1,position:s=Gt.TOP,align:a=Xt.CENTER,triggerAriaLabel:c="",triggerElement:u,...f},d)=>{const[h,p]=l.useState(!1),m=Me([o,te,`${te}--primary${r?"-negative":""}`]),g=N.jsx(vt,{ref:d,"aria-label":c,variant:wn.TERTIARY_PURPLE,negative:r,iconOnly:!0,"data-testid":`${e}-trigger-button`,size:t,children:N.jsx(bt,{size:"md"})});return N.jsx("div",{"data-testid":e,className:m,children:N.jsx(Lo,{delayDuration:parseInt(Fn),children:N.jsxs(Mo,{open:h,onOpenChange:p,...f,children:[N.jsx(ko,{asChild:!0,onClick:v=>{v.preventDefault(),p(!0)},children:l.Children.count(u)===0?g:u}),N.jsx(Io,{children:N.jsxs(jo,{side:s,align:a,className:Me([i,`${te}__content`,`${te}__content--primary${r?"-negative":""}`]),sideOffset:-5,"data-testid":`${e}-content`,children:[typeof n=="string"?N.jsx(wt,{variant:$t.PARAGRAPH100,negative:!r,"data-testid":`${e}-paragraph`,children:n}):n,N.jsx(Fo,{className:Me([`${te}__arrow`,`${te}__arrow--primary${r?"-negative":""}`])})]})})]})})})});Yt.displayName="Tooltip";exports.TOOLTIP_ALIGN=Xt;exports.TOOLTIP_POSITION=Gt;exports.Tooltip=Yt;
21
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Vt);var Bo=Vt.exports;const zo=Ho(Bo),Wo="_slideDownAndFade_fkagk_1",Uo="_slideLeftAndFade_fkagk_1",Vo="_slideUpAndFade_fkagk_1",Xo="_slideRightAndFade_fkagk_1",Yo={"purpur-tooltip":"_purpur-tooltip_fkagk_1","purpur-tooltip__content":"_purpur-tooltip__content_fkagk_4","purpur-tooltip__content--primary":"_purpur-tooltip__content--primary_fkagk_14","purpur-tooltip__content--primary-negative":"_purpur-tooltip__content--primary-negative_fkagk_17",slideDownAndFade:Wo,slideLeftAndFade:Uo,slideUpAndFade:Vo,slideRightAndFade:Xo,"purpur-tooltip__arrow--primary":"_purpur-tooltip__arrow--primary_fkagk_32","purpur-tooltip__arrow--primary-negative":"_purpur-tooltip__arrow--primary-negative_fkagk_35"},Me=zo.bind(Yo),Xt={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"},Yt={START:"start",CENTER:"center",END:"end"},te="purpur-tooltip",Gt=l.forwardRef(({["data-testid"]:e,buttonSize:t="md",children:n,className:o,contentClassName:i,negative:r=!1,position:s=Xt.TOP,align:a=Yt.CENTER,triggerAriaLabel:c="",triggerElement:u,...f},d)=>{const[h,p]=l.useState(!1),m=Me([o,te,`${te}--primary${r?"-negative":""}`]),g=N.jsx(vt,{ref:d,"aria-label":c,variant:wn.TERTIARY_PURPLE,negative:r,iconOnly:!0,"data-testid":`${e}-trigger-button`,size:t,children:N.jsx(bt,{size:"md"})});return N.jsx("div",{"data-testid":e,className:m,children:N.jsx(Lo,{delayDuration:parseInt(Fn),children:N.jsxs(Mo,{open:h,onOpenChange:p,...f,children:[N.jsx(ko,{asChild:!0,onClick:v=>{v.preventDefault(),p(!0)},children:l.Children.count(u)===0?g:u}),N.jsx(Io,{children:N.jsxs(jo,{side:s,align:a,className:Me([i,`${te}__content`,`${te}__content--primary${r?"-negative":""}`]),sideOffset:-5,"data-testid":`${e}-content`,children:[typeof n=="string"?N.jsx(wt,{variant:$t.PARAGRAPH100,negative:!r,"data-testid":`${e}-paragraph`,children:n}):n,N.jsx(Fo,{className:Me([`${te}__arrow`,`${te}__arrow--primary${r?"-negative":""}`])})]})})]})})})});Gt.displayName="Tooltip";exports.TOOLTIP_ALIGN=Yt;exports.TOOLTIP_POSITION=Xt;exports.Tooltip=Gt;
22
22
  //# sourceMappingURL=tooltip.cjs.js.map