@purpurds/tooltip 5.35.0 → 6.0.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.
- package/.rush/temp/ci_build/@purpurds/tooltip/{b8bd0996614c70a30755446466fcf4d05234344b.untar.log → b4fa9b328552aec963a19ff2d1289ca6779821c6.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +5 -5
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +4 -4
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/dist/LICENSE.txt +4 -4
- package/dist/tooltip.cjs.js +3 -3
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.es.js +185 -191
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +6 -6
- package/src/tooltip.stories.tsx +1 -1
- package/src/tooltip.tsx +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Start time:
|
|
2
|
-
Invoking "/usr/bin/tar -x -m -f /opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/common/temp/build-cache/ci_build/@purpurds/tooltip/
|
|
1
|
+
Start time: Wed Feb 26 2025 15:56:50 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/b4fa9b328552aec963a19ff2d1289ca6779821c6"
|
|
3
3
|
|
|
4
4
|
======= BEGIN PROCESS INPUT ======
|
|
5
5
|
|
|
@@ -6,15 +6,15 @@ Rush Multi-Project Build Tool 5.110.1 - Node.js 20.12.2 (LTS)
|
|
|
6
6
|
|
|
7
7
|
vite v5.4.8 building for production...
|
|
8
8
|
transforming...
|
|
9
|
-
✓
|
|
9
|
+
✓ 42 modules transformed.
|
|
10
10
|
rendering chunks...
|
|
11
11
|
|
|
12
12
|
[vite:dts] Start generate declaration files...
|
|
13
13
|
computing gzip size...
|
|
14
14
|
dist/styles.css 1.78 kB │ gzip: 0.49 kB
|
|
15
|
-
dist/tooltip.cjs.js 56.71 kB │ gzip: 19.
|
|
16
|
-
[vite:dts] Declaration files built in
|
|
15
|
+
dist/tooltip.cjs.js 56.71 kB │ gzip: 19.51 kB │ map: 306.28 kB
|
|
16
|
+
[vite:dts] Declaration files built in 4097ms.
|
|
17
17
|
|
|
18
18
|
dist/styles.css 1.78 kB │ gzip: 0.49 kB
|
|
19
|
-
dist/tooltip.es.js 81.
|
|
20
|
-
✓ built in
|
|
19
|
+
dist/tooltip.es.js 81.70 kB │ gzip: 23.49 kB │ map: 315.56 kB
|
|
20
|
+
✓ built in 7.41s
|
|
@@ -2,11 +2,11 @@ Invoking: vitest run --passWithNoTests
|
|
|
2
2
|
|
|
3
3
|
RUN v2.1.8 /opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/components/tooltip
|
|
4
4
|
|
|
5
|
-
✓ src/tooltip.test.tsx (9 tests)
|
|
6
|
-
✓ Tooltip > should open on hover
|
|
5
|
+
✓ src/tooltip.test.tsx (9 tests) 806ms
|
|
6
|
+
✓ Tooltip > should open on hover 571ms
|
|
7
7
|
|
|
8
8
|
Test Files 1 passed (1)
|
|
9
9
|
Tests 9 passed (9)
|
|
10
|
-
Start at
|
|
11
|
-
Duration
|
|
10
|
+
Start at 15:57:23
|
|
11
|
+
Duration 2.67s (transform 594ms, setup 0ms, collect 1.05s, tests 806ms, environment 462ms, prepare 87ms)
|
|
12
12
|
|
package/dist/LICENSE.txt
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
Name: @purpurds/button
|
|
2
|
-
Version: 5.
|
|
2
|
+
Version: 5.35.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.
|
|
9
|
+
Version: 5.35.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.
|
|
16
|
+
Version: 5.35.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.
|
|
23
|
+
Version: 5.35.0
|
|
24
24
|
License: AGPL-3.0-only
|
|
25
25
|
Private: false
|
|
26
26
|
|
package/dist/tooltip.cjs.js
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r.call(this,a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return this&&this[o]||o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(this,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,this&&this[a]||a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Et);var Ln=Et.exports;const Nn=Dn(Ln),Mn={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},kn=
|
|
13
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r.call(this,a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return this&&this[o]||o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(this,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,this&&this[a]||a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Et);var Ln=Et.exports;const Nn=Dn(Ln),Mn={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},kn=Nn.bind(Mn),ct="purpur-icon",In="md",jn=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),Fn=({content:e="",title:t}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],r=t?`<title>${t}</title>`:"";return`<svg ${jn(n)}>${r}${e}</svg>`},Hn=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Ot=({["data-testid"]:e,svg:t,allyTitle:n,className:r,size:i=In,...o})=>{const s=Fn({content:Hn(t.svg),title:n}),a=kn(r,ct,`${ct}--${i}`);return N.jsx("span",{"aria-label":n,className:a,"data-testid":e,dangerouslySetInnerHTML:{__html:s},...o})};Ot.displayName="Icon";const Bn={name:"info",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',keywords:["info"],category:"status"},Pt=e=>N.jsx(Ot,{...e,svg:Bn});Pt.displayName="IconInfo";function zn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var At={exports:{}};/*!
|
|
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 o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(At);var Wn=At.exports;const qn=zn(Wn),me={"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"},Ct={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"},ge="purpur-paragraph",Rt=({["data-testid"]:e,children:t,className:n,disabled:r,enableHyphenation:i=!1,negative:o=!1,variant:s=Ct.PARAGRAPH100,...a})=>{const c=qn([n,me[ge],me[`${ge}--${s}`],{[me[`${ge}--hyphens`]]:i,[me[`${ge}--disabled`]]:r,[me[`${ge}--negative`]]:o}]);return N.jsx("p",{...a,className:c,"data-testid":e,children:t})};Rt.displayName="Paragraph";const Vn="400ms";function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(null,arguments)}function G(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 Un(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tt(...e){return t=>e.forEach(n=>Un(n,t))}function ce(...e){return l.useCallback(Tt(...e),e)}function St(e,t=[]){let n=[];function r(o,s){const a=l.createContext(s),c=n.length;n=[...n,s];function u(d){const{scope:h,children:p,...m}=d,y=(h==null?void 0:h[e][c])||a,g=l.useMemo(()=>m,Object.values(m));return l.createElement(y.Provider,{value:g},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 \`${o}\``)}return u.displayName=o+"Provider",[u,f]}const i=()=>{const o=n.map(s=>l.createContext(s));return function(a){const c=(a==null?void 0:a[e])||o;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Yn(i,...t)]}function Yn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const d=c(o)[`__scope${u}`];return{...a,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Dt=l.forwardRef((e,t)=>{const{children:n,...r}=e,i=l.Children.toArray(n),o=i.find(Gn);if(o){const s=o.props.children,a=i.map(c=>c===o?l.Children.count(s)>1?l.Children.only(null):l.isValidElement(s)?s.props.children:null:c);return l.createElement(ze,S({},r,{ref:t}),l.isValidElement(s)?l.cloneElement(s,void 0,a):null)}return l.createElement(ze,S({},r,{ref:t}),n)});Dt.displayName="Slot";const ze=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...Xn(r,n.props),ref:t?Tt(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});ze.displayName="SlotClone";const Lt=({children:e})=>l.createElement(l.Fragment,null,e);function Gn(e){return l.isValidElement(e)&&e.type===Lt}function Xn(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Kn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ne=Kn.reduce((e,t)=>{const n=l.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Dt:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(a,S({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zn(e,t){e&&Le.flushSync(()=>e.dispatchEvent(t))}function le(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Jn(e,t=globalThis==null?void 0:globalThis.document){const n=le(e);l.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const We="dismissableLayer.update",Qn="dismissableLayer.pointerDownOutside",er="dismissableLayer.focusOutside";let lt;const tr=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nr=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,f=l.useContext(tr),[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({}),y=ce(t,_=>h(_)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(b),w=d?g.indexOf(d):-1,v=f.layersWithOutsidePointerEventsDisabled.size>0,$=w>=x,O=rr(_=>{const C=_.target,R=[...f.branches].some(D=>D.contains(C));!$||R||(o==null||o(_),a==null||a(_),_.defaultPrevented||c==null||c())},p),E=or(_=>{const C=_.target;[...f.branches].some(D=>D.contains(C))||(s==null||s(_),a==null||a(_),_.defaultPrevented||c==null||c())},p);return Jn(_=>{w===f.layers.size-1&&(i==null||i(_),!_.defaultPrevented&&c&&(_.preventDefault(),c()))},p),l.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(lt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),ut(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=lt)}},[d,p,r,f]),l.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),ut())},[d,f]),l.useEffect(()=>{const _=()=>m({});return document.addEventListener(We,_),()=>document.removeEventListener(We,_)},[]),l.createElement(ne.div,S({},u,{ref:y,style:{pointerEvents:v?$?"auto":"none":void 0,...e.style},onFocusCapture:G(e.onFocusCapture,E.onFocusCapture),onBlurCapture:G(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,O.onPointerDownCapture)}))});function rr(e,t=globalThis==null?void 0:globalThis.document){const n=le(e),r=l.useRef(!1),i=l.useRef(()=>{});return l.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){Nt(Qn,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);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function or(e,t=globalThis==null?void 0:globalThis.document){const n=le(e),r=l.useRef(!1);return l.useEffect(()=>{const i=o=>{o.target&&!r.current&&Nt(er,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ut(){const e=new CustomEvent(We);document.dispatchEvent(e)}function Nt(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Zn(i,o):i.dispatchEvent(o)}const se=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},ir=L.useId||(()=>{});let sr=0;function ar(e){const[t,n]=L.useState(ir());return se(()=>{n(r=>r??String(sr++))},[e]),t?`radix-${t}`:""}const cr=["top","right","bottom","left"],Z=Math.min,F=Math.max,Re=Math.round,Pe=Math.floor,V=e=>({x:e,y:e}),lr={left:"right",right:"left",bottom:"top",top:"bottom"},ur={start:"end",end:"start"};function qe(e,t,n){return F(e,Z(t,n))}function X(e,t){return typeof e=="function"?e(t):e}function K(e){return e.split("-")[0]}function ue(e){return e.split("-")[1]}function Ge(e){return e==="x"?"y":"x"}function Xe(e){return e==="y"?"height":"width"}function J(e){return["top","bottom"].includes(K(e))?"y":"x"}function Ke(e){return Ge(J(e))}function fr(e,t,n){n===void 0&&(n=!1);const r=ue(e),i=Ke(e),o=Xe(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Te(s)),[s,Te(s)]}function dr(e){const t=Te(e);return[Ve(e),t,Ve(t)]}function Ve(e){return e.replace(/start|end/g,t=>ur[t])}function pr(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function hr(e,t,n,r){const i=ue(e);let o=pr(K(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(Ve)))),o}function Te(e){return e.replace(/left|right|bottom|top/g,t=>lr[t])}function mr(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mt(e){return typeof e!="number"?mr(e):{top:e,right:e,bottom:e,left:e}}function Se(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ft(e,t,n){let{reference:r,floating:i}=e;const o=J(t),s=Ke(t),a=Xe(s),c=K(t),u=o==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(c){case"top":p={x:f,y:r.y-i.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ue(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const gr=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.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}=ft(u,r,c),h=r,p={},m=0;for(let y=0;y<a.length;y++){const{name:g,fn:b}=a[y],{x,y:w,data:v,reset:$}=await b({x:f,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});f=x??f,d=w??d,p={...p,[g]:{...p[g],...v}},$&&m<=50&&(m++,typeof $=="object"&&($.placement&&(h=$.placement),$.rects&&(u=$.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):$.rects),{x:f,y:d}=ft(u,h,c)),y=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:p}};async function ye(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=X(t,e),m=Mt(p),g=a[h?d==="floating"?"reference":"floating":d],b=Se(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),x=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),v=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},$=Se(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:c}):x);return{top:(b.top-$.top+m.top)/v.y,bottom:($.bottom-b.bottom+m.bottom)/v.y,left:(b.left-$.left+m.left)/v.x,right:($.right-b.right+m.right)/v.x}}const yr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=X(e,t)||{};if(u==null)return{};const d=Mt(f),h={x:n,y:r},p=Ke(i),m=Xe(p),y=await s.getDimensions(u),g=p==="y",b=g?"top":"left",x=g?"bottom":"right",w=g?"clientHeight":"clientWidth",v=o.reference[m]+o.reference[p]-h[p]-o.floating[m],$=h[p]-o.reference[p],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=O?O[w]:0;(!E||!await(s.isElement==null?void 0:s.isElement(O)))&&(E=a.floating[w]||o.floating[m]);const _=v/2-$/2,C=E/2-y[m]/2-1,R=Z(d[b],C),D=Z(d[x],C),M=R,k=E-y[m]-D,P=E/2-y[m]/2+_,B=qe(M,P,k),T=!c.arrow&&ue(i)!=null&&P!==B&&o.reference[m]/2-(P<M?R:D)-y[m]/2<0,j=T?P<M?P-M:P-k:0;return{[p]:h[p]+j,data:{[p]:B,centerOffset:P-B-j,...T&&{alignmentOffset:j}},reset:T}}}),br=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...g}=X(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=K(i),x=J(a),w=K(a)===a,v=await(c.isRTL==null?void 0:c.isRTL(u.floating)),$=h||(w||!y?[Te(a)]:dr(a)),O=m!=="none";!h&&O&&$.push(...hr(a,y,m,v));const E=[a,...$],_=await ye(t,g),C=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&C.push(_[b]),d){const P=fr(i,s,v);C.push(_[P[0]],_[P[1]])}if(R=[...R,{placement:i,overflows:C}],!C.every(P=>P<=0)){var D,M;const P=(((D=o.flip)==null?void 0:D.index)||0)+1,B=E[P];if(B)return{data:{index:P,overflows:R},reset:{placement:B}};let T=(M=R.filter(j=>j.overflows[0]<=0).sort((j,A)=>j.overflows[1]-A.overflows[1])[0])==null?void 0:M.placement;if(!T)switch(p){case"bestFit":{var k;const j=(k=R.filter(A=>{if(O){const I=J(A.placement);return I===x||I==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(I=>I>0).reduce((I,q)=>I+q,0)]).sort((A,I)=>A[1]-I[1])[0])==null?void 0:k[0];j&&(T=j);break}case"initialPlacement":T=a;break}if(i!==T)return{reset:{placement:T}}}return{}}}};function dt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pt(e){return cr.some(t=>e[t]>=0)}const xr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=X(e,t);switch(r){case"referenceHidden":{const o=await ye(t,{...i,elementContext:"reference"}),s=dt(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pt(s)}}}case"escaped":{const o=await ye(t,{...i,altBoundary:!0}),s=dt(o,n.floating);return{data:{escapedOffsets:s,escaped:pt(s)}}}default:return{}}}}};async function wr(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=K(n),a=ue(n),c=J(n)==="y",u=["left","top"].includes(s)?-1:1,f=o&&c?-1:1,d=X(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};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 vr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,c=await wr(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},$r=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:b,y:x}=g;return{x:b,y:x}}},...c}=X(e,t),u={x:n,y:r},f=await ye(t,c),d=J(K(i)),h=Ge(d);let p=u[h],m=u[d];if(o){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=p+f[g],w=p-f[b];p=qe(x,p,w)}if(s){const g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",x=m+f[g],w=m-f[b];m=qe(x,m,w)}const y=a.fn({...t,[h]:p,[d]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:o,[d]:s}}}}}},_r=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=X(e,t),f={x:n,y:r},d=J(i),h=Ge(d);let p=f[h],m=f[d];const y=X(a,t),g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=h==="y"?"height":"width",v=o.reference[h]-o.floating[w]+g.mainAxis,$=o.reference[h]+o.reference[w]-g.mainAxis;p<v?p=v:p>$&&(p=$)}if(u){var b,x;const w=h==="y"?"width":"height",v=["top","left"].includes(K(i)),$=o.reference[d]-o.floating[w]+(v&&((b=s.offset)==null?void 0:b[d])||0)+(v?0:g.crossAxis),O=o.reference[d]+o.reference[w]+(v?0:((x=s.offset)==null?void 0:x[d])||0)-(v?g.crossAxis:0);m<$?m=$:m>O&&(m=O)}return{[h]:p,[d]:m}}}},Er=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:c=()=>{},...u}=X(e,t),f=await ye(t,u),d=K(i),h=ue(i),p=J(i)==="y",{width:m,height:y}=o.floating;let g,b;d==="top"||d==="bottom"?(g=d,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,g=h==="end"?"top":"bottom");const x=y-f.top-f.bottom,w=m-f.left-f.right,v=Z(y-f[g],x),$=Z(m-f[b],w),O=!t.middlewareData.shift;let E=v,_=$;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),O&&!h){const R=F(f.left,0),D=F(f.right,0),M=F(f.top,0),k=F(f.bottom,0);p?_=m-2*(R!==0||D!==0?R+D:F(f.left,f.right)):E=y-2*(M!==0||k!==0?M+k:F(f.top,f.bottom))}await c({...t,availableWidth:_,availableHeight:E});const C=await s.getDimensions(a.floating);return m!==C.width||y!==C.height?{reset:{rects:!0}}:{}}}};function Ne(){return typeof window<"u"}function fe(e){return kt(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Y(e){var t;return(t=(kt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kt(e){return Ne()?e instanceof Node||e instanceof H(e).Node:!1}function z(e){return Ne()?e instanceof Element||e instanceof H(e).Element:!1}function U(e){return Ne()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function ht(e){return!Ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function we(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Or(e){return["table","td","th"].includes(fe(e))}function Me(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ze(e){const t=Je(),n=z(e)?W(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Pr(e){let t=Q(e);for(;U(t)&&!ae(t);){if(Ze(t))return t;if(Me(t))return null;t=Q(t)}return null}function Je(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ae(e){return["html","body","#document"].includes(fe(e))}function W(e){return H(e).getComputedStyle(e)}function ke(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Q(e){if(fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||Y(e);return ht(t)?t.host:t}function It(e){const t=Q(e);return ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&we(t)?t:It(t)}function be(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=It(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=H(i);if(o){const a=Ue(s);return t.concat(s,s.visualViewport||[],we(i)?i:[],a&&n?be(a):[])}return t.concat(i,be(i,[],n))}function Ue(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jt(e){const t=W(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=U(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Re(n)!==o||Re(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Qe(e){return z(e)?e:e.contextElement}function ie(e){const t=Qe(e);if(!U(t))return V(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=jt(t);let s=(o?Re(n.width):n.width)/r,a=(o?Re(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Ar=V(0);function Ft(e){const t=H(e);return!Je()||!t.visualViewport?Ar:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==H(e)?!1:t}function te(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Qe(e);let s=V(1);t&&(r?z(r)&&(s=ie(r)):s=ie(e));const a=Cr(o,n,r)?Ft(o):V(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(o){const h=H(o),p=r&&z(r)?H(r):r;let m=h,y=Ue(m);for(;y&&r&&p!==m;){const g=ie(y),b=y.getBoundingClientRect(),x=W(y),w=b.left+(y.clientLeft+parseFloat(x.paddingLeft))*g.x,v=b.top+(y.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,u*=g.y,f*=g.x,d*=g.y,c+=w,u+=v,m=H(y),y=Ue(m)}}return Se({width:f,height:d,x:c,y:u})}function et(e,t){const n=ke(e).scrollLeft;return t?t.left+n:te(Y(e)).left+n}function Ht(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:et(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function Rr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=Y(r),a=t?Me(t.floating):!1;if(r===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=V(1);const f=V(0),d=U(r);if((d||!d&&!o)&&((fe(r)!=="body"||we(s))&&(c=ke(r)),U(r))){const p=te(r);u=ie(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=s&&!d&&!o?Ht(s,c,!0):V(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-c.scrollTop*u.y+f.y+h.y}}function Tr(e){return Array.from(e.getClientRects())}function Sr(e){const t=Y(e),n=ke(e),r=e.ownerDocument.body,i=F(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=F(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+et(e);const a=-n.scrollTop;return W(r).direction==="rtl"&&(s+=F(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function Dr(e,t){const n=H(e),r=Y(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const u=Je();(!u||u&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}function Lr(e,t){const n=te(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=U(e)?ie(e):V(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,u=r*o.y;return{width:s,height:a,x:c,y:u}}function mt(e,t,n){let r;if(t==="viewport")r=Dr(e,n);else if(t==="document")r=Sr(Y(e));else if(z(t))r=Lr(t,n);else{const i=Ft(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Se(r)}function Bt(e,t){const n=Q(e);return n===t||!z(n)||ae(n)?!1:W(n).position==="fixed"||Bt(n,t)}function Nr(e,t){const n=t.get(e);if(n)return n;let r=be(e,[],!1).filter(a=>z(a)&&fe(a)!=="body"),i=null;const o=W(e).position==="fixed";let s=o?Q(e):e;for(;z(s)&&!ae(s);){const a=W(s),c=Ze(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||we(s)&&!c&&Bt(e,s))?r=r.filter(f=>f!==s):i=a,s=Q(s)}return t.set(e,r),r}function Mr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Me(t)?[]:Nr(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,f)=>{const d=mt(t,f,i);return u.top=F(d.top,u.top),u.right=Z(d.right,u.right),u.bottom=Z(d.bottom,u.bottom),u.left=F(d.left,u.left),u},mt(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kr(e){const{width:t,height:n}=jt(e);return{width:t,height:n}}function Ir(e,t,n){const r=U(t),i=Y(t),o=n==="fixed",s=te(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=V(0);if(r||!r&&!o)if((fe(t)!=="body"||we(i))&&(a=ke(t)),r){const h=te(t,!0,o,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&(c.x=et(i));const u=i&&!r&&!o?Ht(i,a):V(0),f=s.left+a.scrollLeft-c.x-u.x,d=s.top+a.scrollTop-c.y-u.y;return{x:f,y:d,width:s.width,height:s.height}}function Fe(e){return W(e).position==="static"}function gt(e,t){if(!U(e)||W(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Y(e)===n&&(n=n.ownerDocument.body),n}function zt(e,t){const n=H(e);if(Me(e))return n;if(!U(e)){let i=Q(e);for(;i&&!ae(i);){if(z(i)&&!Fe(i))return i;i=Q(i)}return n}let r=gt(e,t);for(;r&&Or(r)&&Fe(r);)r=gt(r,t);return r&&ae(r)&&Fe(r)&&!Ze(r)?n:r||Pr(e)||n}const jr=async function(e){const t=this.getOffsetParent||zt,n=this.getDimensions,r=await n(e.floating);return{reference:Ir(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fr(e){return W(e).direction==="rtl"}const Hr={convertOffsetParentRelativeRectToViewportRelativeRect:Rr,getDocumentElement:Y,getClippingRect:Mr,getOffsetParent:zt,getElementRects:jr,getClientRects:Tr,getDimensions:kr,getScale:ie,isElement:z,isRTL:Fr};function Wt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Br(e,t){let n=null,r;const i=Y(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:f,top:d,width:h,height:p}=u;if(a||t(),!h||!p)return;const m=Pe(d),y=Pe(i.clientWidth-(f+h)),g=Pe(i.clientHeight-(d+p)),b=Pe(f),w={rootMargin:-m+"px "+-y+"px "+-g+"px "+-b+"px",threshold:F(0,Z(1,c))||1};let v=!0;function $(O){const E=O[0].intersectionRatio;if(E!==c){if(!v)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Wt(u,e.getBoundingClientRect())&&s(),v=!1}try{n=new IntersectionObserver($,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver($,w)}n.observe(e)}return s(!0),o}function zr(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Qe(e),f=i||o?[...u?be(u):[],...be(t)]:[];f.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&a?Br(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let m,y=c?te(e):null;c&&g();function g(){const b=te(e);y&&!Wt(y,b)&&n(),y=b,m=requestAnimationFrame(g)}return n(),()=>{var b;f.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d==null||d(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Wr=vr,qr=$r,Vr=br,Ur=Er,Yr=xr,yt=yr,Gr=_r,Xr=(e,t,n)=>{const r=new Map,i={platform:Hr,...n},o={...i.platform,_c:r};return gr(e,t,{...i,platform:o})};var Ce=typeof document<"u"?l.useLayoutEffect:l.useEffect;function De(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!De(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!De(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bt(e,t){const n=qt(e);return Math.round(t*n)/n}function He(e){const t=L.useRef(e);return Ce(()=>{t.current=e}),t}function Kr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,d]=L.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=L.useState(r);De(h,r)||p(r);const[m,y]=L.useState(null),[g,b]=L.useState(null),x=L.useCallback(A=>{A!==O.current&&(O.current=A,y(A))},[]),w=L.useCallback(A=>{A!==E.current&&(E.current=A,b(A))},[]),v=o||m,$=s||g,O=L.useRef(null),E=L.useRef(null),_=L.useRef(f),C=c!=null,R=He(c),D=He(i),M=He(u),k=L.useCallback(()=>{if(!O.current||!E.current)return;const A={placement:t,strategy:n,middleware:h};D.current&&(A.platform=D.current),Xr(O.current,E.current,A).then(I=>{const q={...I,isPositioned:M.current!==!1};P.current&&!De(_.current,q)&&(_.current=q,gn.flushSync(()=>{d(q)}))})},[h,t,n,D,M]);Ce(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);const P=L.useRef(!1);Ce(()=>(P.current=!0,()=>{P.current=!1}),[]),Ce(()=>{if(v&&(O.current=v),$&&(E.current=$),v&&$){if(R.current)return R.current(v,$,k);k()}},[v,$,k,R,C]);const B=L.useMemo(()=>({reference:O,floating:E,setReference:x,setFloating:w}),[x,w]),T=L.useMemo(()=>({reference:v,floating:$}),[v,$]),j=L.useMemo(()=>{const A={position:n,left:0,top:0};if(!T.floating)return A;const I=bt(T.floating,f.x),q=bt(T.floating,f.y);return a?{...A,transform:"translate("+I+"px, "+q+"px)",...qt(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:q}},[n,a,T.floating,f.x,f.y]);return L.useMemo(()=>({...f,update:k,refs:B,elements:T,floatingStyles:j}),[f,k,B,T,j])}const Zr=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?yt({element:r.current,padding:i}).fn(n):{}:r?yt({element:r,padding:i}).fn(n):{}}}},Jr=(e,t)=>({...Wr(e),options:[e,t]}),Qr=(e,t)=>({...qr(e),options:[e,t]}),eo=(e,t)=>({...Gr(e),options:[e,t]}),to=(e,t)=>({...Vr(e),options:[e,t]}),no=(e,t)=>({...Ur(e),options:[e,t]}),ro=(e,t)=>({...Yr(e),options:[e,t]}),oo=(e,t)=>({...Zr(e),options:[e,t]}),io=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return l.createElement(ne.svg,S({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),so=io;function ao(e){const[t,n]=l.useState(void 0);return se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.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 r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Vt="Popper",[Ut,Yt]=St(Vt),[co,Gt]=Ut(Vt),lo=e=>{const{__scopePopper:t,children:n}=e,[r,i]=l.useState(null);return l.createElement(co,{scope:t,anchor:r,onAnchorChange:i},n)},uo="PopperAnchor",fo=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Gt(uo,n),s=l.useRef(null),a=ce(t,s);return l.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:l.createElement(ne.div,S({},i,{ref:a}))}),Xt="PopperContent",[po,ho]=Ut(Xt),mo=l.forwardRef((e,t)=>{var n,r,i,o,s,a,c,u;const{__scopePopper:f,side:d="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:y=0,avoidCollisions:g=!0,collisionBoundary:b=[],collisionPadding:x=0,sticky:w="partial",hideWhenDetached:v=!1,updatePositionStrategy:$="optimized",onPlaced:O,...E}=e,_=Gt(Xt,f),[C,R]=l.useState(null),D=ce(t,de=>R(de)),[M,k]=l.useState(null),P=ao(M),B=(n=P==null?void 0:P.width)!==null&&n!==void 0?n:0,T=(r=P==null?void 0:P.height)!==null&&r!==void 0?r:0,j=d+(p!=="center"?"-"+p:""),A=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},I=Array.isArray(b)?b:[b],q=I.length>0,$e={padding:A,boundary:I.filter(xo),altBoundary:q},{refs:rn,floatingStyles:ot,placement:on,isPositioned:_e,middlewareData:re}=Kr({strategy:"fixed",placement:j,whileElementsMounted:(...de)=>zr(...de,{animationFrame:$==="always"}),elements:{reference:_.anchor},middleware:[Jr({mainAxis:h+T,alignmentAxis:m}),g&&Qr({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?eo():void 0,...$e}),g&&to({...$e}),no({...$e,apply:({elements:de,rects:st,availableWidth:dn,availableHeight:pn})=>{const{width:hn,height:mn}=st.reference,Oe=de.floating.style;Oe.setProperty("--radix-popper-available-width",`${dn}px`),Oe.setProperty("--radix-popper-available-height",`${pn}px`),Oe.setProperty("--radix-popper-anchor-width",`${hn}px`),Oe.setProperty("--radix-popper-anchor-height",`${mn}px`)}}),M&&oo({element:M,padding:y}),wo({arrowWidth:B,arrowHeight:T}),v&&ro({strategy:"referenceHidden",...$e})]}),[it,sn]=Kt(on),Ee=le(O);se(()=>{_e&&(Ee==null||Ee())},[_e,Ee]);const an=(i=re.arrow)===null||i===void 0?void 0:i.x,cn=(o=re.arrow)===null||o===void 0?void 0:o.y,ln=((s=re.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[un,fn]=l.useState();return se(()=>{C&&fn(window.getComputedStyle(C).zIndex)},[C]),l.createElement("div",{ref:rn.setFloating,"data-radix-popper-content-wrapper":"",style:{...ot,transform:_e?ot.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:un,"--radix-popper-transform-origin":[(a=re.transformOrigin)===null||a===void 0?void 0:a.x,(c=re.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(po,{scope:f,placedSide:it,onArrowChange:k,arrowX:an,arrowY:cn,shouldHideArrow:ln},l.createElement(ne.div,S({"data-side":it,"data-align":sn},E,{ref:D,style:{...E.style,animation:_e?void 0:"none",opacity:(u=re.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),go="PopperArrow",yo={top:"bottom",right:"left",bottom:"top",left:"right"},bo=l.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=ho(go,r),s=yo[o.placedSide];return l.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},l.createElement(so,S({},i,{ref:n,style:{...i.style,display:"block"}})))});function xo(e){return e!==null}const wo=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,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,y]=Kt(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+h/2,x=((o=(s=u.arrow)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)+p/2;let w="",v="";return m==="bottom"?(w=d?g:`${b}px`,v=`${-p}px`):m==="top"?(w=d?g:`${b}px`,v=`${c.floating.height+p}px`):m==="right"?(w=`${-p}px`,v=d?g:`${x}px`):m==="left"&&(w=`${c.floating.width+p}px`,v=d?g:`${x}px`),{data:{x:w,y:v}}}});function Kt(e){const[t,n="center"]=e.split("-");return[t,n]}const vo=lo,$o=fo,_o=mo,Eo=bo,Oo=l.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?Le.createPortal(l.createElement(ne.div,S({},i,{ref:t})),r):null});function Po(e,t){return l.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const tt=e=>{const{present:t,children:n}=e,r=Ao(t),i=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),o=ce(r.ref,i.ref);return typeof n=="function"||r.isPresent?l.cloneElement(i,{ref:o}):null};tt.displayName="Presence";function Ao(e){const[t,n]=l.useState(),r=l.useRef({}),i=l.useRef(e),o=l.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Po(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Ae(r.current);o.current=a==="mounted"?u:"none"},[a]),se(()=>{const u=r.current,f=i.current;if(f!==e){const h=o.current,p=Ae(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]),se(()=>{if(t){const u=d=>{const p=Ae(r.current).includes(d.animationName);d.target===t&&p&&Le.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(o.current=Ae(r.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&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ae(e){return(e==null?void 0:e.animationName)||"none"}function Co({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Ro({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=le(n),c=l.useCallback(u=>{if(o){const d=typeof u=="function"?u(e):u;d!==e&&a(d)}else i(u)},[o,e,i,a]);return[s,c]}function Ro({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,i=l.useRef(r),o=le(t);return l.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const To=l.forwardRef((e,t)=>l.createElement(ne.span,S({},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}}))),So=To,[Ie,hi]=St("Tooltip",[Yt]),je=Yt(),Do="TooltipProvider",Lo=700,Ye="tooltip.open",[No,nt]=Ie(Do),Mo=e=>{const{__scopeTooltip:t,delayDuration:n=Lo,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=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(No,{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),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(f=>{c.current=f},[]),disableHoverableContent:i},o)},rt="Tooltip",[ko,ve]=Ie(rt),Io=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,c=nt(rt,e.__scopeTooltip),u=je(t),[f,d]=l.useState(null),h=ar(),p=l.useRef(0),m=s??c.disableHoverableContent,y=a??c.delayDuration,g=l.useRef(!1),[b=!1,x]=Co({prop:r,defaultProp:i,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ye))):c.onClose(),o==null||o(E)}}),w=l.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),v=l.useCallback(()=>{window.clearTimeout(p.current),g.current=!1,x(!0)},[x]),$=l.useCallback(()=>{window.clearTimeout(p.current),x(!1)},[x]),O=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,x(!0)},y)},[y,x]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(vo,u,l.createElement(ko,{scope:t,contentId:h,open:b,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?O():v()},[c.isOpenDelayed,O,v]),onTriggerLeave:l.useCallback(()=>{m?$():window.clearTimeout(p.current)},[$,m]),onOpen:v,onClose:$,disableHoverableContent:m},n))},xt="TooltipTrigger",jo=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ve(xt,n),o=nt(xt,n),s=je(n),a=l.useRef(null),c=ce(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($o,S({asChild:!0},s),l.createElement(ne.button,S({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:c,onPointerMove:G(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:G(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:G(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:G(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:G(e.onBlur,i.onClose),onClick:G(e.onClick,i.onClose)})))}),Zt="TooltipPortal",[Fo,Ho]=Ie(Zt,{forceMount:void 0}),Bo=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=ve(Zt,t);return l.createElement(Fo,{scope:t,forceMount:n},l.createElement(tt,{present:n||o.open},l.createElement(Oo,{asChild:!0,container:i},r)))},xe="TooltipContent",zo=l.forwardRef((e,t)=>{const n=Ho(xe,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=ve(xe,e.__scopeTooltip);return l.createElement(tt,{present:r||s.open},s.disableHoverableContent?l.createElement(Jt,S({side:i},o,{ref:t})):l.createElement(Wo,S({side:i},o,{ref:t})))}),Wo=l.forwardRef((e,t)=>{const n=ve(xe,e.__scopeTooltip),r=nt(xe,e.__scopeTooltip),i=l.useRef(null),o=ce(t,i),[s,a]=l.useState(null),{trigger:c,onClose:u}=n,f=i.current,{onPointerInTransitChange:d}=r,h=l.useCallback(()=>{a(null),d(!1)},[d]),p=l.useCallback((m,y)=>{const g=m.currentTarget,b={x:m.clientX,y:m.clientY},x=Go(b,g.getBoundingClientRect()),w=Xo(b,x),v=Ko(y.getBoundingClientRect()),$=Jo([...w,...v]);a($),d(!0)},[d]);return l.useEffect(()=>()=>h(),[h]),l.useEffect(()=>{if(c&&f){const m=g=>p(g,f),y=g=>p(g,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",y)}}},[c,f,p,h]),l.useEffect(()=>{if(s){const m=y=>{const g=y.target,b={x:y.clientX,y:y.clientY},x=(c==null?void 0:c.contains(g))||(f==null?void 0:f.contains(g)),w=!Zo(b,s);x?h():w&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,s,u,h]),l.createElement(Jt,S({},e,{ref:o}))}),[qo,Vo]=Ie(rt,{isInside:!1}),Jt=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,c=ve(xe,n),u=je(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Ye,f),()=>document.removeEventListener(Ye,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(nr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f},l.createElement(_o,S({"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(Lt,null,r),l.createElement(qo,{scope:n,isInside:!0},l.createElement(So,{id:c.contentId,role:"tooltip"},i||r))))}),Uo="TooltipArrow",Yo=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=je(n);return Vo(Uo,n).isInside?null:l.createElement(Eo,S({},i,r,{ref:t}))});function Go(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Xo(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Ko(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Zo(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o].x,c=t[o].y,u=t[s].x,f=t[s].y;c>r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function Jo(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Qo(t)}function Qo(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.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 ei=Mo,ti=Io,ni=jo,ri=Bo,oi=zo,ii=Yo;function si(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qt={exports:{}};/*!
|
|
17
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(At);var Wn=At.exports;const qn=zn(Wn),me={"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"},Ct={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"},ge="purpur-paragraph",Rt=({["data-testid"]:e,children:t,className:n,disabled:r,enableHyphenation:i=!1,negative:o=!1,variant:s=Ct.PARAGRAPH100,...a})=>{const c=qn([n,me[ge],me[`${ge}--${s}`],{[me[`${ge}--hyphens`]]:i,[me[`${ge}--disabled`]]:r,[me[`${ge}--negative`]]:o}]);return N.jsx("p",{...a,className:c,"data-testid":e,children:t})};Rt.displayName="Paragraph";const Vn="400ms";function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(null,arguments)}function Y(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 Un(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tt(...e){return t=>e.forEach(n=>Un(n,t))}function ce(...e){return l.useCallback(Tt(...e),e)}function St(e,t=[]){let n=[];function r(o,s){const a=l.createContext(s),c=n.length;n=[...n,s];function u(d){const{scope:h,children:p,...m}=d,y=(h==null?void 0:h[e][c])||a,g=l.useMemo(()=>m,Object.values(m));return l.createElement(y.Provider,{value:g},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 \`${o}\``)}return u.displayName=o+"Provider",[u,f]}const i=()=>{const o=n.map(s=>l.createContext(s));return function(a){const c=(a==null?void 0:a[e])||o;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Gn(i,...t)]}function Gn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const d=c(o)[`__scope${u}`];return{...a,...d}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Dt=l.forwardRef((e,t)=>{const{children:n,...r}=e,i=l.Children.toArray(n),o=i.find(Yn);if(o){const s=o.props.children,a=i.map(c=>c===o?l.Children.count(s)>1?l.Children.only(null):l.isValidElement(s)?s.props.children:null:c);return l.createElement(ze,S({},r,{ref:t}),l.isValidElement(s)?l.cloneElement(s,void 0,a):null)}return l.createElement(ze,S({},r,{ref:t}),n)});Dt.displayName="Slot";const ze=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...Xn(r,n.props),ref:t?Tt(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});ze.displayName="SlotClone";const Lt=({children:e})=>l.createElement(l.Fragment,null,e);function Yn(e){return l.isValidElement(e)&&e.type===Lt}function Xn(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Kn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ne=Kn.reduce((e,t)=>{const n=l.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Dt:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(a,S({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Zn(e,t){e&&Le.flushSync(()=>e.dispatchEvent(t))}function le(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Jn(e,t=globalThis==null?void 0:globalThis.document){const n=le(e);l.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const We="dismissableLayer.update",Qn="dismissableLayer.pointerDownOutside",er="dismissableLayer.focusOutside";let lt;const tr=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nr=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,f=l.useContext(tr),[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({}),y=ce(t,_=>h(_)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(b),w=d?g.indexOf(d):-1,v=f.layersWithOutsidePointerEventsDisabled.size>0,$=w>=x,O=rr(_=>{const C=_.target,R=[...f.branches].some(D=>D.contains(C));!$||R||(o==null||o(_),a==null||a(_),_.defaultPrevented||c==null||c())},p),E=or(_=>{const C=_.target;[...f.branches].some(D=>D.contains(C))||(s==null||s(_),a==null||a(_),_.defaultPrevented||c==null||c())},p);return Jn(_=>{w===f.layers.size-1&&(i==null||i(_),!_.defaultPrevented&&c&&(_.preventDefault(),c()))},p),l.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(lt=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),ut(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=lt)}},[d,p,r,f]),l.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),ut())},[d,f]),l.useEffect(()=>{const _=()=>m({});return document.addEventListener(We,_),()=>document.removeEventListener(We,_)},[]),l.createElement(ne.div,S({},u,{ref:y,style:{pointerEvents:v?$?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,O.onPointerDownCapture)}))});function rr(e,t=globalThis==null?void 0:globalThis.document){const n=le(e),r=l.useRef(!1),i=l.useRef(()=>{});return l.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){Nt(Qn,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);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function or(e,t=globalThis==null?void 0:globalThis.document){const n=le(e),r=l.useRef(!1);return l.useEffect(()=>{const i=o=>{o.target&&!r.current&&Nt(er,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ut(){const e=new CustomEvent(We);document.dispatchEvent(e)}function Nt(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Zn(i,o):i.dispatchEvent(o)}const se=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},ir=L.useId||(()=>{});let sr=0;function ar(e){const[t,n]=L.useState(ir());return se(()=>{n(r=>r??String(sr++))},[e]),t?`radix-${t}`:""}const cr=["top","right","bottom","left"],Z=Math.min,F=Math.max,Re=Math.round,Pe=Math.floor,V=e=>({x:e,y:e}),lr={left:"right",right:"left",bottom:"top",top:"bottom"},ur={start:"end",end:"start"};function qe(e,t,n){return F(e,Z(t,n))}function X(e,t){return typeof e=="function"?e(t):e}function K(e){return e.split("-")[0]}function ue(e){return e.split("-")[1]}function Ye(e){return e==="x"?"y":"x"}function Xe(e){return e==="y"?"height":"width"}function J(e){return["top","bottom"].includes(K(e))?"y":"x"}function Ke(e){return Ye(J(e))}function fr(e,t,n){n===void 0&&(n=!1);const r=ue(e),i=Ke(e),o=Xe(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Te(s)),[s,Te(s)]}function dr(e){const t=Te(e);return[Ve(e),t,Ve(t)]}function Ve(e){return e.replace(/start|end/g,t=>ur[t])}function pr(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function hr(e,t,n,r){const i=ue(e);let o=pr(K(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(Ve)))),o}function Te(e){return e.replace(/left|right|bottom|top/g,t=>lr[t])}function mr(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mt(e){return typeof e!="number"?mr(e):{top:e,right:e,bottom:e,left:e}}function Se(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ft(e,t,n){let{reference:r,floating:i}=e;const o=J(t),s=Ke(t),a=Xe(s),c=K(t),u=o==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(c){case"top":p={x:f,y:r.y-i.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ue(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const gr=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.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}=ft(u,r,c),h=r,p={},m=0;for(let y=0;y<a.length;y++){const{name:g,fn:b}=a[y],{x,y:w,data:v,reset:$}=await b({x:f,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});f=x??f,d=w??d,p={...p,[g]:{...p[g],...v}},$&&m<=50&&(m++,typeof $=="object"&&($.placement&&(h=$.placement),$.rects&&(u=$.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):$.rects),{x:f,y:d}=ft(u,h,c)),y=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:p}};async function ye(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=X(t,e),m=Mt(p),g=a[h?d==="floating"?"reference":"floating":d],b=Se(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),x=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),v=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},$=Se(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:c}):x);return{top:(b.top-$.top+m.top)/v.y,bottom:($.bottom-b.bottom+m.bottom)/v.y,left:(b.left-$.left+m.left)/v.x,right:($.right-b.right+m.right)/v.x}}const yr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=X(e,t)||{};if(u==null)return{};const d=Mt(f),h={x:n,y:r},p=Ke(i),m=Xe(p),y=await s.getDimensions(u),g=p==="y",b=g?"top":"left",x=g?"bottom":"right",w=g?"clientHeight":"clientWidth",v=o.reference[m]+o.reference[p]-h[p]-o.floating[m],$=h[p]-o.reference[p],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=O?O[w]:0;(!E||!await(s.isElement==null?void 0:s.isElement(O)))&&(E=a.floating[w]||o.floating[m]);const _=v/2-$/2,C=E/2-y[m]/2-1,R=Z(d[b],C),D=Z(d[x],C),M=R,k=E-y[m]-D,P=E/2-y[m]/2+_,B=qe(M,P,k),T=!c.arrow&&ue(i)!=null&&P!==B&&o.reference[m]/2-(P<M?R:D)-y[m]/2<0,j=T?P<M?P-M:P-k:0;return{[p]:h[p]+j,data:{[p]:B,centerOffset:P-B-j,...T&&{alignmentOffset:j}},reset:T}}}),br=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...g}=X(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=K(i),x=J(a),w=K(a)===a,v=await(c.isRTL==null?void 0:c.isRTL(u.floating)),$=h||(w||!y?[Te(a)]:dr(a)),O=m!=="none";!h&&O&&$.push(...hr(a,y,m,v));const E=[a,...$],_=await ye(t,g),C=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&C.push(_[b]),d){const P=fr(i,s,v);C.push(_[P[0]],_[P[1]])}if(R=[...R,{placement:i,overflows:C}],!C.every(P=>P<=0)){var D,M;const P=(((D=o.flip)==null?void 0:D.index)||0)+1,B=E[P];if(B)return{data:{index:P,overflows:R},reset:{placement:B}};let T=(M=R.filter(j=>j.overflows[0]<=0).sort((j,A)=>j.overflows[1]-A.overflows[1])[0])==null?void 0:M.placement;if(!T)switch(p){case"bestFit":{var k;const j=(k=R.filter(A=>{if(O){const I=J(A.placement);return I===x||I==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(I=>I>0).reduce((I,q)=>I+q,0)]).sort((A,I)=>A[1]-I[1])[0])==null?void 0:k[0];j&&(T=j);break}case"initialPlacement":T=a;break}if(i!==T)return{reset:{placement:T}}}return{}}}};function dt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pt(e){return cr.some(t=>e[t]>=0)}const xr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=X(e,t);switch(r){case"referenceHidden":{const o=await ye(t,{...i,elementContext:"reference"}),s=dt(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pt(s)}}}case"escaped":{const o=await ye(t,{...i,altBoundary:!0}),s=dt(o,n.floating);return{data:{escapedOffsets:s,escaped:pt(s)}}}default:return{}}}}};async function wr(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=K(n),a=ue(n),c=J(n)==="y",u=["left","top"].includes(s)?-1:1,f=o&&c?-1:1,d=X(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};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 vr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,c=await wr(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},$r=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:b,y:x}=g;return{x:b,y:x}}},...c}=X(e,t),u={x:n,y:r},f=await ye(t,c),d=J(K(i)),h=Ye(d);let p=u[h],m=u[d];if(o){const g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=p+f[g],w=p-f[b];p=qe(x,p,w)}if(s){const g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",x=m+f[g],w=m-f[b];m=qe(x,m,w)}const y=a.fn({...t,[h]:p,[d]:m});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:o,[d]:s}}}}}},_r=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=X(e,t),f={x:n,y:r},d=J(i),h=Ye(d);let p=f[h],m=f[d];const y=X(a,t),g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=h==="y"?"height":"width",v=o.reference[h]-o.floating[w]+g.mainAxis,$=o.reference[h]+o.reference[w]-g.mainAxis;p<v?p=v:p>$&&(p=$)}if(u){var b,x;const w=h==="y"?"width":"height",v=["top","left"].includes(K(i)),$=o.reference[d]-o.floating[w]+(v&&((b=s.offset)==null?void 0:b[d])||0)+(v?0:g.crossAxis),O=o.reference[d]+o.reference[w]+(v?0:((x=s.offset)==null?void 0:x[d])||0)-(v?g.crossAxis:0);m<$?m=$:m>O&&(m=O)}return{[h]:p,[d]:m}}}},Er=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:c=()=>{},...u}=X(e,t),f=await ye(t,u),d=K(i),h=ue(i),p=J(i)==="y",{width:m,height:y}=o.floating;let g,b;d==="top"||d==="bottom"?(g=d,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,g=h==="end"?"top":"bottom");const x=y-f.top-f.bottom,w=m-f.left-f.right,v=Z(y-f[g],x),$=Z(m-f[b],w),O=!t.middlewareData.shift;let E=v,_=$;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),O&&!h){const R=F(f.left,0),D=F(f.right,0),M=F(f.top,0),k=F(f.bottom,0);p?_=m-2*(R!==0||D!==0?R+D:F(f.left,f.right)):E=y-2*(M!==0||k!==0?M+k:F(f.top,f.bottom))}await c({...t,availableWidth:_,availableHeight:E});const C=await s.getDimensions(a.floating);return m!==C.width||y!==C.height?{reset:{rects:!0}}:{}}}};function Ne(){return typeof window<"u"}function fe(e){return kt(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function G(e){var t;return(t=(kt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kt(e){return Ne()?e instanceof Node||e instanceof H(e).Node:!1}function z(e){return Ne()?e instanceof Element||e instanceof H(e).Element:!1}function U(e){return Ne()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function ht(e){return!Ne()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function we(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Or(e){return["table","td","th"].includes(fe(e))}function Me(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ze(e){const t=Je(),n=z(e)?W(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Pr(e){let t=Q(e);for(;U(t)&&!ae(t);){if(Ze(t))return t;if(Me(t))return null;t=Q(t)}return null}function Je(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ae(e){return["html","body","#document"].includes(fe(e))}function W(e){return H(e).getComputedStyle(e)}function ke(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Q(e){if(fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||G(e);return ht(t)?t.host:t}function It(e){const t=Q(e);return ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&we(t)?t:It(t)}function be(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=It(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=H(i);if(o){const a=Ue(s);return t.concat(s,s.visualViewport||[],we(i)?i:[],a&&n?be(a):[])}return t.concat(i,be(i,[],n))}function Ue(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jt(e){const t=W(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=U(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Re(n)!==o||Re(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Qe(e){return z(e)?e:e.contextElement}function ie(e){const t=Qe(e);if(!U(t))return V(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=jt(t);let s=(o?Re(n.width):n.width)/r,a=(o?Re(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Ar=V(0);function Ft(e){const t=H(e);return!Je()||!t.visualViewport?Ar:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==H(e)?!1:t}function te(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Qe(e);let s=V(1);t&&(r?z(r)&&(s=ie(r)):s=ie(e));const a=Cr(o,n,r)?Ft(o):V(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(o){const h=H(o),p=r&&z(r)?H(r):r;let m=h,y=Ue(m);for(;y&&r&&p!==m;){const g=ie(y),b=y.getBoundingClientRect(),x=W(y),w=b.left+(y.clientLeft+parseFloat(x.paddingLeft))*g.x,v=b.top+(y.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,u*=g.y,f*=g.x,d*=g.y,c+=w,u+=v,m=H(y),y=Ue(m)}}return Se({width:f,height:d,x:c,y:u})}function et(e,t){const n=ke(e).scrollLeft;return t?t.left+n:te(G(e)).left+n}function Ht(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:et(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function Rr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=G(r),a=t?Me(t.floating):!1;if(r===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},u=V(1);const f=V(0),d=U(r);if((d||!d&&!o)&&((fe(r)!=="body"||we(s))&&(c=ke(r)),U(r))){const p=te(r);u=ie(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=s&&!d&&!o?Ht(s,c,!0):V(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-c.scrollTop*u.y+f.y+h.y}}function Tr(e){return Array.from(e.getClientRects())}function Sr(e){const t=G(e),n=ke(e),r=e.ownerDocument.body,i=F(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=F(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+et(e);const a=-n.scrollTop;return W(r).direction==="rtl"&&(s+=F(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function Dr(e,t){const n=H(e),r=G(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const u=Je();(!u||u&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}function Lr(e,t){const n=te(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=U(e)?ie(e):V(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,c=i*o.x,u=r*o.y;return{width:s,height:a,x:c,y:u}}function mt(e,t,n){let r;if(t==="viewport")r=Dr(e,n);else if(t==="document")r=Sr(G(e));else if(z(t))r=Lr(t,n);else{const i=Ft(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Se(r)}function Bt(e,t){const n=Q(e);return n===t||!z(n)||ae(n)?!1:W(n).position==="fixed"||Bt(n,t)}function Nr(e,t){const n=t.get(e);if(n)return n;let r=be(e,[],!1).filter(a=>z(a)&&fe(a)!=="body"),i=null;const o=W(e).position==="fixed";let s=o?Q(e):e;for(;z(s)&&!ae(s);){const a=W(s),c=Ze(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||we(s)&&!c&&Bt(e,s))?r=r.filter(f=>f!==s):i=a,s=Q(s)}return t.set(e,r),r}function Mr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Me(t)?[]:Nr(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,f)=>{const d=mt(t,f,i);return u.top=F(d.top,u.top),u.right=Z(d.right,u.right),u.bottom=Z(d.bottom,u.bottom),u.left=F(d.left,u.left),u},mt(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function kr(e){const{width:t,height:n}=jt(e);return{width:t,height:n}}function Ir(e,t,n){const r=U(t),i=G(t),o=n==="fixed",s=te(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const c=V(0);if(r||!r&&!o)if((fe(t)!=="body"||we(i))&&(a=ke(t)),r){const h=te(t,!0,o,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&(c.x=et(i));const u=i&&!r&&!o?Ht(i,a):V(0),f=s.left+a.scrollLeft-c.x-u.x,d=s.top+a.scrollTop-c.y-u.y;return{x:f,y:d,width:s.width,height:s.height}}function Fe(e){return W(e).position==="static"}function gt(e,t){if(!U(e)||W(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return G(e)===n&&(n=n.ownerDocument.body),n}function zt(e,t){const n=H(e);if(Me(e))return n;if(!U(e)){let i=Q(e);for(;i&&!ae(i);){if(z(i)&&!Fe(i))return i;i=Q(i)}return n}let r=gt(e,t);for(;r&&Or(r)&&Fe(r);)r=gt(r,t);return r&&ae(r)&&Fe(r)&&!Ze(r)?n:r||Pr(e)||n}const jr=async function(e){const t=this.getOffsetParent||zt,n=this.getDimensions,r=await n(e.floating);return{reference:Ir(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fr(e){return W(e).direction==="rtl"}const Hr={convertOffsetParentRelativeRectToViewportRelativeRect:Rr,getDocumentElement:G,getClippingRect:Mr,getOffsetParent:zt,getElementRects:jr,getClientRects:Tr,getDimensions:kr,getScale:ie,isElement:z,isRTL:Fr};function Wt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Br(e,t){let n=null,r;const i=G(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:f,top:d,width:h,height:p}=u;if(a||t(),!h||!p)return;const m=Pe(d),y=Pe(i.clientWidth-(f+h)),g=Pe(i.clientHeight-(d+p)),b=Pe(f),w={rootMargin:-m+"px "+-y+"px "+-g+"px "+-b+"px",threshold:F(0,Z(1,c))||1};let v=!0;function $(O){const E=O[0].intersectionRatio;if(E!==c){if(!v)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!Wt(u,e.getBoundingClientRect())&&s(),v=!1}try{n=new IntersectionObserver($,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver($,w)}n.observe(e)}return s(!0),o}function zr(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Qe(e),f=i||o?[...u?be(u):[],...be(t)]:[];f.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&a?Br(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let m,y=c?te(e):null;c&&g();function g(){const b=te(e);y&&!Wt(y,b)&&n(),y=b,m=requestAnimationFrame(g)}return n(),()=>{var b;f.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),d==null||d(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Wr=vr,qr=$r,Vr=br,Ur=Er,Gr=xr,yt=yr,Yr=_r,Xr=(e,t,n)=>{const r=new Map,i={platform:Hr,...n},o={...i.platform,_c:r};return gr(e,t,{...i,platform:o})};var Ce=typeof document<"u"?l.useLayoutEffect:l.useEffect;function De(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!De(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!De(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bt(e,t){const n=qt(e);return Math.round(t*n)/n}function He(e){const t=L.useRef(e);return Ce(()=>{t.current=e}),t}function Kr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,d]=L.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=L.useState(r);De(h,r)||p(r);const[m,y]=L.useState(null),[g,b]=L.useState(null),x=L.useCallback(A=>{A!==O.current&&(O.current=A,y(A))},[]),w=L.useCallback(A=>{A!==E.current&&(E.current=A,b(A))},[]),v=o||m,$=s||g,O=L.useRef(null),E=L.useRef(null),_=L.useRef(f),C=c!=null,R=He(c),D=He(i),M=He(u),k=L.useCallback(()=>{if(!O.current||!E.current)return;const A={placement:t,strategy:n,middleware:h};D.current&&(A.platform=D.current),Xr(O.current,E.current,A).then(I=>{const q={...I,isPositioned:M.current!==!1};P.current&&!De(_.current,q)&&(_.current=q,gn.flushSync(()=>{d(q)}))})},[h,t,n,D,M]);Ce(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);const P=L.useRef(!1);Ce(()=>(P.current=!0,()=>{P.current=!1}),[]),Ce(()=>{if(v&&(O.current=v),$&&(E.current=$),v&&$){if(R.current)return R.current(v,$,k);k()}},[v,$,k,R,C]);const B=L.useMemo(()=>({reference:O,floating:E,setReference:x,setFloating:w}),[x,w]),T=L.useMemo(()=>({reference:v,floating:$}),[v,$]),j=L.useMemo(()=>{const A={position:n,left:0,top:0};if(!T.floating)return A;const I=bt(T.floating,f.x),q=bt(T.floating,f.y);return a?{...A,transform:"translate("+I+"px, "+q+"px)",...qt(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:q}},[n,a,T.floating,f.x,f.y]);return L.useMemo(()=>({...f,update:k,refs:B,elements:T,floatingStyles:j}),[f,k,B,T,j])}const Zr=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?yt({element:r.current,padding:i}).fn(n):{}:r?yt({element:r,padding:i}).fn(n):{}}}},Jr=(e,t)=>({...Wr(e),options:[e,t]}),Qr=(e,t)=>({...qr(e),options:[e,t]}),eo=(e,t)=>({...Yr(e),options:[e,t]}),to=(e,t)=>({...Vr(e),options:[e,t]}),no=(e,t)=>({...Ur(e),options:[e,t]}),ro=(e,t)=>({...Gr(e),options:[e,t]}),oo=(e,t)=>({...Zr(e),options:[e,t]}),io=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return l.createElement(ne.svg,S({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),so=io;function ao(e){const[t,n]=l.useState(void 0);return se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.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 r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Vt="Popper",[Ut,Gt]=St(Vt),[co,Yt]=Ut(Vt),lo=e=>{const{__scopePopper:t,children:n}=e,[r,i]=l.useState(null);return l.createElement(co,{scope:t,anchor:r,onAnchorChange:i},n)},uo="PopperAnchor",fo=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Yt(uo,n),s=l.useRef(null),a=ce(t,s);return l.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:l.createElement(ne.div,S({},i,{ref:a}))}),Xt="PopperContent",[po,ho]=Ut(Xt),mo=l.forwardRef((e,t)=>{var n,r,i,o,s,a,c,u;const{__scopePopper:f,side:d="bottom",sideOffset:h=0,align:p="center",alignOffset:m=0,arrowPadding:y=0,avoidCollisions:g=!0,collisionBoundary:b=[],collisionPadding:x=0,sticky:w="partial",hideWhenDetached:v=!1,updatePositionStrategy:$="optimized",onPlaced:O,...E}=e,_=Yt(Xt,f),[C,R]=l.useState(null),D=ce(t,de=>R(de)),[M,k]=l.useState(null),P=ao(M),B=(n=P==null?void 0:P.width)!==null&&n!==void 0?n:0,T=(r=P==null?void 0:P.height)!==null&&r!==void 0?r:0,j=d+(p!=="center"?"-"+p:""),A=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},I=Array.isArray(b)?b:[b],q=I.length>0,$e={padding:A,boundary:I.filter(xo),altBoundary:q},{refs:rn,floatingStyles:ot,placement:on,isPositioned:_e,middlewareData:re}=Kr({strategy:"fixed",placement:j,whileElementsMounted:(...de)=>zr(...de,{animationFrame:$==="always"}),elements:{reference:_.anchor},middleware:[Jr({mainAxis:h+T,alignmentAxis:m}),g&&Qr({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?eo():void 0,...$e}),g&&to({...$e}),no({...$e,apply:({elements:de,rects:st,availableWidth:dn,availableHeight:pn})=>{const{width:hn,height:mn}=st.reference,Oe=de.floating.style;Oe.setProperty("--radix-popper-available-width",`${dn}px`),Oe.setProperty("--radix-popper-available-height",`${pn}px`),Oe.setProperty("--radix-popper-anchor-width",`${hn}px`),Oe.setProperty("--radix-popper-anchor-height",`${mn}px`)}}),M&&oo({element:M,padding:y}),wo({arrowWidth:B,arrowHeight:T}),v&&ro({strategy:"referenceHidden",...$e})]}),[it,sn]=Kt(on),Ee=le(O);se(()=>{_e&&(Ee==null||Ee())},[_e,Ee]);const an=(i=re.arrow)===null||i===void 0?void 0:i.x,cn=(o=re.arrow)===null||o===void 0?void 0:o.y,ln=((s=re.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[un,fn]=l.useState();return se(()=>{C&&fn(window.getComputedStyle(C).zIndex)},[C]),l.createElement("div",{ref:rn.setFloating,"data-radix-popper-content-wrapper":"",style:{...ot,transform:_e?ot.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:un,"--radix-popper-transform-origin":[(a=re.transformOrigin)===null||a===void 0?void 0:a.x,(c=re.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(po,{scope:f,placedSide:it,onArrowChange:k,arrowX:an,arrowY:cn,shouldHideArrow:ln},l.createElement(ne.div,S({"data-side":it,"data-align":sn},E,{ref:D,style:{...E.style,animation:_e?void 0:"none",opacity:(u=re.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),go="PopperArrow",yo={top:"bottom",right:"left",bottom:"top",left:"right"},bo=l.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=ho(go,r),s=yo[o.placedSide];return l.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},l.createElement(so,S({},i,{ref:n,style:{...i.style,display:"block"}})))});function xo(e){return e!==null}const wo=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,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,y]=Kt(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+h/2,x=((o=(s=u.arrow)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)+p/2;let w="",v="";return m==="bottom"?(w=d?g:`${b}px`,v=`${-p}px`):m==="top"?(w=d?g:`${b}px`,v=`${c.floating.height+p}px`):m==="right"?(w=`${-p}px`,v=d?g:`${x}px`):m==="left"&&(w=`${c.floating.width+p}px`,v=d?g:`${x}px`),{data:{x:w,y:v}}}});function Kt(e){const[t,n="center"]=e.split("-");return[t,n]}const vo=lo,$o=fo,_o=mo,Eo=bo,Oo=l.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?Le.createPortal(l.createElement(ne.div,S({},i,{ref:t})),r):null});function Po(e,t){return l.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const tt=e=>{const{present:t,children:n}=e,r=Ao(t),i=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),o=ce(r.ref,i.ref);return typeof n=="function"||r.isPresent?l.cloneElement(i,{ref:o}):null};tt.displayName="Presence";function Ao(e){const[t,n]=l.useState(),r=l.useRef({}),i=l.useRef(e),o=l.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Po(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Ae(r.current);o.current=a==="mounted"?u:"none"},[a]),se(()=>{const u=r.current,f=i.current;if(f!==e){const h=o.current,p=Ae(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]),se(()=>{if(t){const u=d=>{const p=Ae(r.current).includes(d.animationName);d.target===t&&p&&Le.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(o.current=Ae(r.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&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ae(e){return(e==null?void 0:e.animationName)||"none"}function Co({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Ro({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=le(n),c=l.useCallback(u=>{if(o){const d=typeof u=="function"?u(e):u;d!==e&&a(d)}else i(u)},[o,e,i,a]);return[s,c]}function Ro({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,i=l.useRef(r),o=le(t);return l.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const To=l.forwardRef((e,t)=>l.createElement(ne.span,S({},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}}))),So=To,[Ie,hi]=St("Tooltip",[Gt]),je=Gt(),Do="TooltipProvider",Lo=700,Ge="tooltip.open",[No,nt]=Ie(Do),Mo=e=>{const{__scopeTooltip:t,delayDuration:n=Lo,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=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(No,{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),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(f=>{c.current=f},[]),disableHoverableContent:i},o)},rt="Tooltip",[ko,ve]=Ie(rt),Io=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,c=nt(rt,e.__scopeTooltip),u=je(t),[f,d]=l.useState(null),h=ar(),p=l.useRef(0),m=s??c.disableHoverableContent,y=a??c.delayDuration,g=l.useRef(!1),[b=!1,x]=Co({prop:r,defaultProp:i,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ge))):c.onClose(),o==null||o(E)}}),w=l.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),v=l.useCallback(()=>{window.clearTimeout(p.current),g.current=!1,x(!0)},[x]),$=l.useCallback(()=>{window.clearTimeout(p.current),x(!1)},[x]),O=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,x(!0)},y)},[y,x]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(vo,u,l.createElement(ko,{scope:t,contentId:h,open:b,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?O():v()},[c.isOpenDelayed,O,v]),onTriggerLeave:l.useCallback(()=>{m?$():window.clearTimeout(p.current)},[$,m]),onOpen:v,onClose:$,disableHoverableContent:m},n))},xt="TooltipTrigger",jo=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=ve(xt,n),o=nt(xt,n),s=je(n),a=l.useRef(null),c=ce(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($o,S({asChild:!0},s),l.createElement(ne.button,S({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:c,onPointerMove:Y(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Y(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:Y(e.onBlur,i.onClose),onClick:Y(e.onClick,i.onClose)})))}),Zt="TooltipPortal",[Fo,Ho]=Ie(Zt,{forceMount:void 0}),Bo=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=ve(Zt,t);return l.createElement(Fo,{scope:t,forceMount:n},l.createElement(tt,{present:n||o.open},l.createElement(Oo,{asChild:!0,container:i},r)))},xe="TooltipContent",zo=l.forwardRef((e,t)=>{const n=Ho(xe,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=ve(xe,e.__scopeTooltip);return l.createElement(tt,{present:r||s.open},s.disableHoverableContent?l.createElement(Jt,S({side:i},o,{ref:t})):l.createElement(Wo,S({side:i},o,{ref:t})))}),Wo=l.forwardRef((e,t)=>{const n=ve(xe,e.__scopeTooltip),r=nt(xe,e.__scopeTooltip),i=l.useRef(null),o=ce(t,i),[s,a]=l.useState(null),{trigger:c,onClose:u}=n,f=i.current,{onPointerInTransitChange:d}=r,h=l.useCallback(()=>{a(null),d(!1)},[d]),p=l.useCallback((m,y)=>{const g=m.currentTarget,b={x:m.clientX,y:m.clientY},x=Yo(b,g.getBoundingClientRect()),w=Xo(b,x),v=Ko(y.getBoundingClientRect()),$=Jo([...w,...v]);a($),d(!0)},[d]);return l.useEffect(()=>()=>h(),[h]),l.useEffect(()=>{if(c&&f){const m=g=>p(g,f),y=g=>p(g,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",y)}}},[c,f,p,h]),l.useEffect(()=>{if(s){const m=y=>{const g=y.target,b={x:y.clientX,y:y.clientY},x=(c==null?void 0:c.contains(g))||(f==null?void 0:f.contains(g)),w=!Zo(b,s);x?h():w&&(h(),u())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,s,u,h]),l.createElement(Jt,S({},e,{ref:o}))}),[qo,Vo]=Ie(rt,{isInside:!1}),Jt=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,c=ve(xe,n),u=je(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Ge,f),()=>document.removeEventListener(Ge,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(nr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f},l.createElement(_o,S({"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(Lt,null,r),l.createElement(qo,{scope:n,isInside:!0},l.createElement(So,{id:c.contentId,role:"tooltip"},i||r))))}),Uo="TooltipArrow",Go=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=je(n);return Vo(Uo,n).isInside?null:l.createElement(Eo,S({},i,r,{ref:t}))});function Yo(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Xo(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Ko(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Zo(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o].x,c=t[o].y,u=t[s].x,f=t[s].y;c>r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function Jo(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Qo(t)}function Qo(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.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 ei=Mo,ti=Io,ni=jo,ri=Bo,oi=zo,ii=Go;function si(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qt={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 o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r.call(this,a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return this&&this[o]||o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(this,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,this&&this[a]||a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Qt);var ai=Qt.exports;const ci=si(ai),li="_slideDownAndFade_fkagk_1",ui="_slideLeftAndFade_fkagk_1",fi="_slideUpAndFade_fkagk_1",di="_slideRightAndFade_fkagk_1",pi={"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:li,slideLeftAndFade:ui,slideUpAndFade:fi,slideRightAndFade:di,"purpur-tooltip__arrow--primary":"_purpur-tooltip__arrow--primary_fkagk_32","purpur-tooltip__arrow--primary-negative":"_purpur-tooltip__arrow--primary-negative_fkagk_35"},Be=ci.bind(pi),en={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"},tn={START:"start",CENTER:"center",END:"end"},oe="purpur-tooltip",nn=l.forwardRef(({["data-testid"]:e,buttonSize:t="md",children:n,className:r,contentClassName:i,negative:o=!1,position:s=en.TOP,align:a=tn.CENTER,triggerAriaLabel:c="",triggerElement:u,...f},d)=>{const[h,p]=l.useState(!1),m=Be([r,oe,`${oe}--primary${o?"-negative":""}`]),y=N.jsx(_t,{ref:d,"aria-label":c,variant:Rn.TERTIARY_PURPLE,negative:o,iconOnly:!0,"data-testid":`${e}-trigger-button`,size:t,children:N.jsx(
|
|
21
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r.call(this,a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return this&&this[o]||o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(this,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,this&&this[a]||a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Qt);var ai=Qt.exports;const ci=si(ai),li="_slideDownAndFade_fkagk_1",ui="_slideLeftAndFade_fkagk_1",fi="_slideUpAndFade_fkagk_1",di="_slideRightAndFade_fkagk_1",pi={"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:li,slideLeftAndFade:ui,slideUpAndFade:fi,slideRightAndFade:di,"purpur-tooltip__arrow--primary":"_purpur-tooltip__arrow--primary_fkagk_32","purpur-tooltip__arrow--primary-negative":"_purpur-tooltip__arrow--primary-negative_fkagk_35"},Be=ci.bind(pi),en={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"},tn={START:"start",CENTER:"center",END:"end"},oe="purpur-tooltip",nn=l.forwardRef(({["data-testid"]:e,buttonSize:t="md",children:n,className:r,contentClassName:i,negative:o=!1,position:s=en.TOP,align:a=tn.CENTER,triggerAriaLabel:c="",triggerElement:u,...f},d)=>{const[h,p]=l.useState(!1),m=Be([r,oe,`${oe}--primary${o?"-negative":""}`]),y=N.jsx(_t,{ref:d,"aria-label":c,variant:Rn.TERTIARY_PURPLE,negative:o,iconOnly:!0,"data-testid":`${e}-trigger-button`,size:t,children:N.jsx(Pt,{size:"md"})});return N.jsx("div",{"data-testid":e,className:m,children:N.jsx(ei,{delayDuration:parseInt(Vn),children:N.jsxs(ti,{open:h,onOpenChange:p,...f,children:[N.jsx(ni,{asChild:!0,onClick:g=>{g.preventDefault(),p(!0)},children:l.Children.count(u)===0?y:u}),N.jsx(ri,{children:N.jsxs(oi,{side:s,align:a,className:Be([i,`${oe}__content`,`${oe}__content--primary${o?"-negative":""}`]),sideOffset:-5,"data-testid":`${e}-content`,children:[typeof n=="string"?N.jsx(Rt,{variant:Ct.PARAGRAPH100,negative:!o,"data-testid":`${e}-paragraph`,children:n}):n,N.jsx(ii,{className:Be([`${oe}__arrow`,`${oe}__arrow--primary${o?"-negative":""}`])})]})})]})})})});nn.displayName="Tooltip";exports.TOOLTIP_ALIGN=tn;exports.TOOLTIP_POSITION=en;exports.Tooltip=nn;
|
|
22
22
|
//# sourceMappingURL=tooltip.cjs.js.map
|