@epic-web/workshop-app 5.0.1 → 5.0.2

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.
Files changed (131) hide show
  1. package/build/client/assets/{_-D0Tgngwe.js → _-ZHCWB__B.js} +2 -2
  2. package/build/client/assets/{_-D0Tgngwe.js.map → _-ZHCWB__B.js.map} +1 -1
  3. package/build/client/assets/_exerciseNumber-BFTlBdr4.js +2 -0
  4. package/build/client/assets/_exerciseNumber-BFTlBdr4.js.map +1 -0
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-7kSd_6hH.js → _exerciseNumber_._stepNumber-_687iGFh.js} +2 -2
  6. package/build/client/assets/{_exerciseNumber_._stepNumber-7kSd_6hH.js.map → _exerciseNumber_._stepNumber-_687iGFh.js.map} +1 -1
  7. package/build/client/assets/_exerciseNumber_.finished-BEfn-nJi.js +2 -0
  8. package/build/client/assets/_exerciseNumber_.finished-BEfn-nJi.js.map +1 -0
  9. package/build/client/assets/{_layout-BwzhY4NI.js → _layout-BLJr2x2F.js} +2 -2
  10. package/build/client/assets/{_layout-BwzhY4NI.js.map → _layout-BLJr2x2F.js.map} +1 -1
  11. package/build/client/assets/_layout-BriOqd2R.js +2 -0
  12. package/build/client/assets/_layout-BriOqd2R.js.map +1 -0
  13. package/build/client/assets/{_layout-BUs3av-e.js → _layout-Cfbi6StB.js} +2 -2
  14. package/build/client/assets/{_layout-BUs3av-e.js.map → _layout-Cfbi6StB.js.map} +1 -1
  15. package/build/client/assets/_layout-frPHZWgR.js +6 -0
  16. package/build/client/assets/_layout-frPHZWgR.js.map +1 -0
  17. package/build/client/assets/{accordion-OfO-5m5D.js → accordion-DuE9VejZ.js} +2 -2
  18. package/build/client/assets/{accordion-OfO-5m5D.js.map → accordion-DuE9VejZ.js.map} +1 -1
  19. package/build/client/assets/{account-BatJhmSV.js → account-DDuV9rZX.js} +2 -2
  20. package/build/client/assets/{account-BatJhmSV.js.map → account-DDuV9rZX.js.map} +1 -1
  21. package/build/client/assets/app-wbMCZEiv.js +2 -0
  22. package/build/client/assets/{app-CJ9ElQg6.js.map → app-wbMCZEiv.js.map} +1 -1
  23. package/build/client/assets/{button-EE0aPg10.js → button-CMkJ8p0a.js} +2 -2
  24. package/build/client/assets/{button-EE0aPg10.js.map → button-CMkJ8p0a.js.map} +1 -1
  25. package/build/client/assets/{components-CME-nGId.js → components-DZ8XIeZ3.js} +2 -2
  26. package/build/client/assets/{components-CME-nGId.js.map → components-DZ8XIeZ3.js.map} +1 -1
  27. package/build/client/assets/diff-B6thd_Sf.js +2 -0
  28. package/build/client/assets/diff-B6thd_Sf.js.map +1 -0
  29. package/build/client/assets/diff-BEk79KPK.js +2 -0
  30. package/build/client/assets/{diff-Cvtc-qzL.js.map → diff-BEk79KPK.js.map} +1 -1
  31. package/build/client/assets/{discord-BRTW4Rnh.js → discord-C9bVfiZ6.js} +2 -2
  32. package/build/client/assets/{discord-BRTW4Rnh.js.map → discord-C9bVfiZ6.js.map} +1 -1
  33. package/build/client/assets/discord-DYeU0QX6.js +2 -0
  34. package/build/client/assets/discord-DYeU0QX6.js.map +1 -0
  35. package/build/client/assets/{entry.client-3M2p-8I3.js → entry.client-CW5CUf_W.js} +2 -2
  36. package/build/client/assets/{entry.client-3M2p-8I3.js.map → entry.client-CW5CUf_W.js.map} +1 -1
  37. package/build/client/assets/{epic-video-yrWoJVFy.js → epic-video-bs7WmhbC.js} +2 -2
  38. package/build/client/assets/{epic-video-yrWoJVFy.js.map → epic-video-bs7WmhbC.js.map} +1 -1
  39. package/build/client/assets/{error-boundary-COkPRBOZ.js → error-boundary-BcGxKpte.js} +2 -2
  40. package/build/client/assets/{error-boundary-COkPRBOZ.js.map → error-boundary-BcGxKpte.js.map} +1 -1
  41. package/build/client/assets/finished-C2dgX1d-.js +2 -0
  42. package/build/client/assets/finished-C2dgX1d-.js.map +1 -0
  43. package/build/client/assets/{index-BwhlO_gF.js → index-BczhSZ3e.js} +2 -2
  44. package/build/client/assets/{index-BwhlO_gF.js.map → index-BczhSZ3e.js.map} +1 -1
  45. package/build/client/assets/{index-CXyf3Reb.js → index-BjNhezSK.js} +2 -2
  46. package/build/client/assets/{index-CXyf3Reb.js.map → index-BjNhezSK.js.map} +1 -1
  47. package/build/client/assets/{index-YNIH4TH8.js → index-BvihEwfB.js} +2 -2
  48. package/build/client/assets/{index-YNIH4TH8.js.map → index-BvihEwfB.js.map} +1 -1
  49. package/build/client/assets/index-C2yr7Uiu.js +2 -0
  50. package/build/client/assets/index-C2yr7Uiu.js.map +1 -0
  51. package/build/client/assets/{index-R-sUGQfT.js → index-CuV1bRbu.js} +2 -2
  52. package/build/client/assets/{index-R-sUGQfT.js.map → index-CuV1bRbu.js.map} +1 -1
  53. package/build/client/assets/{index-Dx5GmdYq.js → index-DBrRQJxF.js} +2 -2
  54. package/build/client/assets/{index-Dx5GmdYq.js.map → index-DBrRQJxF.js.map} +1 -1
  55. package/build/client/assets/{index-1cKOJFpX.js → index-DF_XBInP.js} +2 -2
  56. package/build/client/assets/{index-1cKOJFpX.js.map → index-DF_XBInP.js.map} +1 -1
  57. package/build/client/assets/{index-B-hHvmeV.js → index-YtpQLUzj.js} +2 -2
  58. package/build/client/assets/{index-B-hHvmeV.js.map → index-YtpQLUzj.js.map} +1 -1
  59. package/build/client/assets/{loading-sXkYDMsx.js → loading-Br41_Pbf.js} +2 -2
  60. package/build/client/assets/{loading-sXkYDMsx.js.map → loading-Br41_Pbf.js.map} +1 -1
  61. package/build/client/assets/{login-Cc73KLYm.js → login-kjV7hrVt.js} +2 -2
  62. package/build/client/assets/{login-Cc73KLYm.js.map → login-kjV7hrVt.js.map} +1 -1
  63. package/build/client/assets/manifest-32ad9742.js +1 -0
  64. package/build/client/assets/{mdx-CpyquP9i.js → mdx-CRxPouxB.js} +2 -2
  65. package/build/client/assets/{mdx-CpyquP9i.js.map → mdx-CRxPouxB.js.map} +1 -1
  66. package/build/client/assets/{misc-CxCgA-_O.js → misc-BE75ioh8.js} +2 -2
  67. package/build/client/assets/{misc-CxCgA-_O.js.map → misc-BE75ioh8.js.map} +1 -1
  68. package/build/client/assets/{nav-chevrons-g-C0ilNz.js → nav-chevrons-DYiI8EMU.js} +2 -2
  69. package/build/client/assets/{nav-chevrons-g-C0ilNz.js.map → nav-chevrons-DYiI8EMU.js.map} +1 -1
  70. package/build/client/assets/{onboarding-B7TLVi2l.js → onboarding-B4Z_yevk.js} +2 -2
  71. package/build/client/assets/{onboarding-B7TLVi2l.js.map → onboarding-B4Z_yevk.js.map} +1 -1
  72. package/build/client/assets/{pe-CUZaIcdt.js → pe-CvPIToj6.js} +2 -2
  73. package/build/client/assets/{pe-CUZaIcdt.js.map → pe-CvPIToj6.js.map} +1 -1
  74. package/build/client/assets/{presence-Cr--lRCr.js → presence-Dd98AJ_5.js} +2 -2
  75. package/build/client/assets/{presence-Cr--lRCr.js.map → presence-Dd98AJ_5.js.map} +1 -1
  76. package/build/client/assets/{preview-C7dtR2VR.js → preview-DZcdG4kw.js} +2 -2
  77. package/build/client/assets/{preview-C7dtR2VR.js.map → preview-DZcdG4kw.js.map} +1 -1
  78. package/build/client/assets/{product-BAWG1Vut.js → product-mjsTrqXs.js} +2 -2
  79. package/build/client/assets/{product-BAWG1Vut.js.map → product-mjsTrqXs.js.map} +1 -1
  80. package/build/client/assets/{progress-BFm2U-l5.js → progress-Co-59mG2.js} +2 -2
  81. package/build/client/assets/{progress-BFm2U-l5.js.map → progress-Co-59mG2.js.map} +1 -1
  82. package/build/client/assets/{progress-bar-D3kudPcr.js → progress-bar-F8_2mvYp.js} +2 -2
  83. package/build/client/assets/{progress-bar-D3kudPcr.js.map → progress-bar-F8_2mvYp.js.map} +1 -1
  84. package/build/client/assets/{request-info-CEhUGODY.js → request-info-DGnmXtfj.js} +2 -2
  85. package/build/client/assets/{request-info-CEhUGODY.js.map → request-info-DGnmXtfj.js.map} +1 -1
  86. package/build/client/assets/revalidation-ws-DcvYvzyj.js +2 -0
  87. package/build/client/assets/revalidation-ws-DcvYvzyj.js.map +1 -0
  88. package/build/client/assets/root-Cl86OUog.js +11 -0
  89. package/build/client/assets/root-Cl86OUog.js.map +1 -0
  90. package/build/client/assets/{set-playground-DW0yVaNn.js → set-playground-pMKmtPtz.js} +2 -2
  91. package/build/client/assets/{set-playground-DW0yVaNn.js.map → set-playground-pMKmtPtz.js.map} +1 -1
  92. package/build/client/assets/{support-hcqGIpir.js → support-B0E_F4Zh.js} +2 -2
  93. package/build/client/assets/{support-hcqGIpir.js.map → support-B0E_F4Zh.js.map} +1 -1
  94. package/build/client/assets/test-B6zIK2V6.js +2 -0
  95. package/build/client/assets/{test-DbZkv25C.js.map → test-B6zIK2V6.js.map} +1 -1
  96. package/build/client/assets/{tests-BR7RFlr5.js → tests-BeAEgPAw.js} +2 -2
  97. package/build/client/assets/{tests-BR7RFlr5.js.map → tests-BeAEgPAw.js.map} +1 -1
  98. package/build/client/assets/{tooltip-kD4kSf1i.js → tooltip-6-WS-Xux.js} +2 -2
  99. package/build/client/assets/{tooltip-kD4kSf1i.js.map → tooltip-6-WS-Xux.js.map} +1 -1
  100. package/build/client/assets/{use-event-source-A_0lEOPX.js → use-event-source-CCGBLG92.js} +2 -2
  101. package/build/client/assets/{use-event-source-A_0lEOPX.js.map → use-event-source-CCGBLG92.js.map} +1 -1
  102. package/build/client/assets/{user-DvujSs-t.js → user-Boua6jiU.js} +2 -2
  103. package/build/client/assets/{user-DvujSs-t.js.map → user-Boua6jiU.js.map} +1 -1
  104. package/build/client/assets/{workshop-config-CL4F08kr.js → workshop-config-Ce9sSc3I.js} +2 -2
  105. package/build/client/assets/{workshop-config-CL4F08kr.js.map → workshop-config-Ce9sSc3I.js.map} +1 -1
  106. package/build/server/index.js +768 -692
  107. package/build/server/index.js.map +1 -1
  108. package/dist/server/index.js +83 -34
  109. package/package.json +4 -4
  110. package/build/client/assets/_exerciseNumber-1JworToC.js +0 -2
  111. package/build/client/assets/_exerciseNumber-1JworToC.js.map +0 -1
  112. package/build/client/assets/_exerciseNumber_.finished-B4D2ZAmj.js +0 -2
  113. package/build/client/assets/_exerciseNumber_.finished-B4D2ZAmj.js.map +0 -1
  114. package/build/client/assets/_layout-BPwIOXxN.js +0 -6
  115. package/build/client/assets/_layout-BPwIOXxN.js.map +0 -1
  116. package/build/client/assets/_layout-CKnDy_9Z.js +0 -2
  117. package/build/client/assets/_layout-CKnDy_9Z.js.map +0 -1
  118. package/build/client/assets/app-CJ9ElQg6.js +0 -2
  119. package/build/client/assets/diff-Cvtc-qzL.js +0 -2
  120. package/build/client/assets/diff-jgZ_RGra.js +0 -2
  121. package/build/client/assets/diff-jgZ_RGra.js.map +0 -1
  122. package/build/client/assets/discord-BhzUjmbI.js +0 -2
  123. package/build/client/assets/discord-BhzUjmbI.js.map +0 -1
  124. package/build/client/assets/finished-Ct6I1SZV.js +0 -2
  125. package/build/client/assets/finished-Ct6I1SZV.js.map +0 -1
  126. package/build/client/assets/index-Ccssehd9.js +0 -2
  127. package/build/client/assets/index-Ccssehd9.js.map +0 -1
  128. package/build/client/assets/manifest-f5f44d87.js +0 -1
  129. package/build/client/assets/root-9wVBEzOq.js +0 -68
  130. package/build/client/assets/root-9wVBEzOq.js.map +0 -1
  131. package/build/client/assets/test-DbZkv25C.js +0 -2
@@ -1,2 +1,2 @@
1
- import{r as u,j as P,B as tn}from"./index-1cKOJFpX.js";import{r as _e}from"./components-CME-nGId.js";import{a as nn}from"./misc-CxCgA-_O.js";function V(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function on(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function at(...e){return t=>e.forEach(n=>on(n,t))}function J(...e){return u.useCallback(at(...e),e)}function lr(e,t){const n=u.createContext(t);function o(i){const{children:s,...a}=i,c=u.useMemo(()=>a,Object.values(a));return P.jsx(n.Provider,{value:c,children:s})}function r(i){const s=u.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}function lt(e,t=[]){let n=[];function o(i,s){const a=u.createContext(s),c=n.length;n=[...n,s];function l(d){const{scope:h,children:p,...m}=d,g=(h==null?void 0:h[e][c])||a,x=u.useMemo(()=>m,Object.values(m));return P.jsx(g.Provider,{value:x,children:p})}function f(d,h){const p=(h==null?void 0:h[e][c])||a,m=u.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,f]}const r=()=>{const i=n.map(s=>u.createContext(s));return function(a){const c=(a==null?void 0:a[e])||i;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return r.scopeName=e,[o,rn(r,...t)]}function rn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const s=o.reduce((a,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...a,...d}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var ut=u.forwardRef((e,t)=>{const{children:n,...o}=e,r=u.Children.toArray(n),i=r.find(sn);if(i){const s=i.props.children,a=r.map(c=>c===i?u.Children.count(s)>1?u.Children.only(null):u.isValidElement(s)?s.props.children:null:c);return P.jsx(Te,{...o,ref:t,children:u.isValidElement(s)?u.cloneElement(s,void 0,a):null})}return P.jsx(Te,{...o,ref:t,children:n})});ut.displayName="Slot";var Te=u.forwardRef((e,t)=>{const{children:n,...o}=e;if(u.isValidElement(n)){const r=an(n);return u.cloneElement(n,{...cn(o,n.props),ref:t?at(t,r):r})}return u.Children.count(n)>1?u.Children.only(null):null});Te.displayName="SlotClone";var ft=({children:e})=>P.jsx(P.Fragment,{children:e});function sn(e){return u.isValidElement(e)&&e.type===ft}function cn(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...a)=>{i(...a),r(...a)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function an(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ln=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Q=ln.reduce((e,t)=>{const n=u.forwardRef((o,r)=>{const{asChild:i,...s}=o,a=i?ut:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(a,{...s,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function un(e,t){e&&_e.flushSync(()=>e.dispatchEvent(t))}function re(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function fn(e,t=globalThis==null?void 0:globalThis.document){const n=re(e);u.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var dn="DismissableLayer",Se="dismissableLayer.update",pn="dismissableLayer.pointerDownOutside",hn="dismissableLayer.focusOutside",Ze,dt=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pt=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...c}=e,l=u.useContext(dt),[f,d]=u.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=u.useState({}),m=J(t,E=>d(E)),g=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),y=f?g.indexOf(f):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,b=xn(E=>{const O=E.target,L=[...l.branches].some(T=>T.contains(O));!w||L||(r==null||r(E),s==null||s(E),E.defaultPrevented||a==null||a())},h),A=vn(E=>{const O=E.target;[...l.branches].some(T=>T.contains(O))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},h);return fn(E=>{y===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),u.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ze=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Je(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ze)}},[f,h,n,l]),u.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Je())},[f,l]),u.useEffect(()=>{const E=()=>p({});return document.addEventListener(Se,E),()=>document.removeEventListener(Se,E)},[]),P.jsx(Q.div,{...c,ref:m,style:{pointerEvents:C?w?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,A.onFocusCapture),onBlurCapture:V(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,b.onPointerDownCapture)})});pt.displayName=dn;var mn="DismissableLayerBranch",gn=u.forwardRef((e,t)=>{const n=u.useContext(dt),o=u.useRef(null),r=J(t,o);return u.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(Q.div,{...e,ref:r})});gn.displayName=mn;function xn(e,t=globalThis==null?void 0:globalThis.document){const n=re(e),o=u.useRef(!1),r=u.useRef(()=>{});return u.useEffect(()=>{const i=a=>{if(a.target&&!o.current){let c=function(){ht(pn,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function vn(e,t=globalThis==null?void 0:globalThis.document){const n=re(e),o=u.useRef(!1);return u.useEffect(()=>{const r=i=>{i.target&&!o.current&&ht(hn,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Je(){const e=new CustomEvent(Se);document.dispatchEvent(e)}function ht(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,i):r.dispatchEvent(i)}var te=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},yn=tn.useId||(()=>{}),wn=0;function bn(e){const[t,n]=u.useState(yn());return te(()=>{e||n(o=>o??String(wn++))},[e]),e||(t?`radix-${t}`:"")}const Cn=["top","right","bottom","left"],H=Math.min,W=Math.max,ge=Math.round,pe=Math.floor,G=e=>({x:e,y:e}),En={left:"right",right:"left",bottom:"top",top:"bottom"},Pn={start:"end",end:"start"};function De(e,t,n){return W(e,H(t,n))}function U(e,t){return typeof e=="function"?e(t):e}function Y(e){return e.split("-")[0]}function ie(e){return e.split("-")[1]}function ke(e){return e==="x"?"y":"x"}function je(e){return e==="y"?"height":"width"}function q(e){return["top","bottom"].includes(Y(e))?"y":"x"}function $e(e){return ke(q(e))}function An(e,t,n){n===void 0&&(n=!1);const o=ie(e),r=$e(e),i=je(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=xe(s)),[s,xe(s)]}function Rn(e){const t=xe(e);return[Ne(e),t,Ne(t)]}function Ne(e){return e.replace(/start|end/g,t=>Pn[t])}function On(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}function Tn(e,t,n,o){const r=ie(e);let i=On(Y(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Ne)))),i}function xe(e){return e.replace(/left|right|bottom|top/g,t=>En[t])}function Sn(e){return{top:0,right:0,bottom:0,left:0,...e}}function mt(e){return typeof e!="number"?Sn(e):{top:e,right:e,bottom:e,left:e}}function ve(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Qe(e,t,n){let{reference:o,floating:r}=e;const i=q(t),s=$e(t),a=je(s),c=Y(t),l=i==="y",f=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,h=o[a]/2-r[a]/2;let p;switch(c){case"top":p={x:f,y:o.y-r.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(ie(t)){case"start":p[s]-=h*(n&&l?-1:1);break;case"end":p[s]+=h*(n&&l?-1:1);break}return p}const Dn=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:d}=Qe(l,o,c),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:x,fn:v}=a[g],{x:y,y:C,data:w,reset:b}=await v({x:f,y:d,initialPlacement:o,placement:h,strategy:r,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});f=y??f,d=C??d,p={...p,[x]:{...p[x],...w}},b&&m<=50&&(m++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(l=b.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):b.rects),{x:f,y:d}=Qe(l,h,c)),g=-1)}return{x:f,y:d,placement:h,strategy:r,middlewareData:p}};async function ae(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=U(t,e),m=mt(p),x=a[h?d==="floating"?"reference":"floating":d],v=ve(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:f,strategy:c})),y=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),w=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},b=ve(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:C,strategy:c}):y);return{top:(v.top-b.top+m.top)/w.y,bottom:(b.bottom-v.bottom+m.bottom)/w.y,left:(v.left-b.left+m.left)/w.x,right:(b.right-v.right+m.right)/w.x}}const Nn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:f=0}=U(e,t)||{};if(l==null)return{};const d=mt(f),h={x:n,y:o},p=$e(r),m=je(p),g=await s.getDimensions(l),x=p==="y",v=x?"top":"left",y=x?"bottom":"right",C=x?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-h[p]-i.floating[m],b=h[p]-i.reference[p],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let E=A?A[C]:0;(!E||!await(s.isElement==null?void 0:s.isElement(A)))&&(E=a.floating[C]||i.floating[m]);const O=w/2-b/2,L=E/2-g[m]/2-1,T=H(d[v],L),_=H(d[y],L),k=T,j=E-g[m]-_,S=E/2-g[m]/2+O,M=De(k,S,j),$=!c.arrow&&ie(r)!=null&&S!==M&&i.reference[m]/2-(S<k?T:_)-g[m]/2<0,R=$?S<k?S-k:S-j:0;return{[p]:h[p]+R,data:{[p]:M,centerOffset:S-M-R,...$&&{alignmentOffset:R}},reset:$}}}),Ln=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...x}=U(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Y(r),y=q(a),C=Y(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(l.floating)),b=h||(C||!g?[xe(a)]:Rn(a)),A=m!=="none";!h&&A&&b.push(...Tn(a,g,m,w));const E=[a,...b],O=await ae(t,x),L=[];let T=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&L.push(O[v]),d){const S=An(r,s,w);L.push(O[S[0]],O[S[1]])}if(T=[...T,{placement:r,overflows:L}],!L.every(S=>S<=0)){var _,k;const S=(((_=i.flip)==null?void 0:_.index)||0)+1,M=E[S];if(M)return{data:{index:S,overflows:T},reset:{placement:M}};let $=(k=T.filter(R=>R.overflows[0]<=0).sort((R,D)=>R.overflows[1]-D.overflows[1])[0])==null?void 0:k.placement;if(!$)switch(p){case"bestFit":{var j;const R=(j=T.filter(D=>{if(A){const N=q(D.placement);return N===y||N==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(N=>N>0).reduce((N,Re)=>N+Re,0)]).sort((D,N)=>D[1]-N[1])[0])==null?void 0:j[0];R&&($=R);break}case"initialPlacement":$=a;break}if(r!==$)return{reset:{placement:$}}}return{}}}};function et(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tt(e){return Cn.some(t=>e[t]>=0)}const Mn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=U(e,t);switch(o){case"referenceHidden":{const i=await ae(t,{...r,elementContext:"reference"}),s=et(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:tt(s)}}}case"escaped":{const i=await ae(t,{...r,altBoundary:!0}),s=et(i,n.floating);return{data:{escapedOffsets:s,escaped:tt(s)}}}default:return{}}}}};async function _n(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Y(n),a=ie(n),c=q(n)==="y",l=["left","top"].includes(s)?-1:1,f=i&&c?-1:1,d=U(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*f,y:h*l}:{x:h*l,y:p*f}}const kn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,c=await _n(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}},jn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:v,y}=x;return{x:v,y}}},...c}=U(e,t),l={x:n,y:o},f=await ae(t,c),d=q(Y(r)),h=ke(d);let p=l[h],m=l[d];if(i){const x=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=p+f[x],C=p-f[v];p=De(y,p,C)}if(s){const x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+f[x],C=m-f[v];m=De(y,m,C)}const g=a.fn({...t,[h]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}},$n=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=U(e,t),f={x:n,y:o},d=q(r),h=ke(d);let p=f[h],m=f[d];const g=U(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const C=h==="y"?"height":"width",w=i.reference[h]-i.floating[C]+x.mainAxis,b=i.reference[h]+i.reference[C]-x.mainAxis;p<w?p=w:p>b&&(p=b)}if(l){var v,y;const C=h==="y"?"width":"height",w=["top","left"].includes(Y(r)),b=i.reference[d]-i.floating[C]+(w&&((v=s.offset)==null?void 0:v[d])||0)+(w?0:x.crossAxis),A=i.reference[d]+i.reference[C]+(w?0:((y=s.offset)==null?void 0:y[d])||0)-(w?x.crossAxis:0);m<b?m=b:m>A&&(m=A)}return{[h]:p,[d]:m}}}},Wn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:s=()=>{},...a}=U(e,t),c=await ae(t,a),l=Y(n),f=ie(n),d=q(n)==="y",{width:h,height:p}=o.floating;let m,g;l==="top"||l==="bottom"?(m=l,g=f===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(g=l,m=f==="end"?"top":"bottom");const x=p-c.top-c.bottom,v=h-c.left-c.right,y=H(p-c[m],x),C=H(h-c[g],v),w=!t.middlewareData.shift;let b=y,A=C;if(d?A=f||w?H(C,v):v:b=f||w?H(y,x):x,w&&!f){const O=W(c.left,0),L=W(c.right,0),T=W(c.top,0),_=W(c.bottom,0);d?A=h-2*(O!==0||L!==0?O+L:W(c.left,c.right)):b=p-2*(T!==0||_!==0?T+_:W(c.top,c.bottom))}await s({...t,availableWidth:A,availableHeight:b});const E=await r.getDimensions(i.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function se(e){return gt(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function X(e){var t;return(t=(gt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gt(e){return e instanceof Node||e instanceof I(e).Node}function B(e){return e instanceof Element||e instanceof I(e).Element}function z(e){return e instanceof HTMLElement||e instanceof I(e).HTMLElement}function nt(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}function ue(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=F(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function In(e){return["table","td","th"].includes(se(e))}function we(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function We(e){const t=Ie(),n=F(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Fn(e){let t=K(e);for(;z(t)&&!ne(t);){if(we(t))return null;if(We(t))return t;t=K(t)}return null}function Ie(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ne(e){return["html","body","#document"].includes(se(e))}function F(e){return I(e).getComputedStyle(e)}function be(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function K(e){if(se(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nt(e)&&e.host||X(e);return nt(t)?t.host:t}function xt(e){const t=K(e);return ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:z(t)&&ue(t)?t:xt(t)}function le(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=xt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=I(r);return i?t.concat(s,s.visualViewport||[],ue(r)?r:[],s.frameElement&&n?le(s.frameElement):[]):t.concat(r,le(r,[],n))}function vt(e){const t=F(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=z(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=ge(n)!==i||ge(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function Fe(e){return B(e)?e:e.contextElement}function ee(e){const t=Fe(e);if(!z(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=vt(t);let s=(i?ge(n.width):n.width)/o,a=(i?ge(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Hn=G(0);function yt(e){const t=I(e);return!Ie()||!t.visualViewport?Hn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==I(e)?!1:t}function Z(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Fe(e);let s=G(1);t&&(o?B(o)&&(s=ee(o)):s=ee(e));const a=Bn(i,n,o)?yt(i):G(0);let c=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,f=r.width/s.x,d=r.height/s.y;if(i){const h=I(i),p=o&&B(o)?I(o):o;let m=h,g=m.frameElement;for(;g&&o&&p!==m;){const x=ee(g),v=g.getBoundingClientRect(),y=F(g),C=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*x.x,w=v.top+(g.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,l*=x.y,f*=x.x,d*=x.y,c+=C,l+=w,m=I(g),g=m.frameElement}}return ve({width:f,height:d,x:c,y:l})}function zn(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=X(o),a=t?we(t.floating):!1;if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=G(1);const f=G(0),d=z(o);if((d||!d&&!i)&&((se(o)!=="body"||ue(s))&&(c=be(o)),z(o))){const h=Z(o);l=ee(o),f.x=h.x+o.clientLeft,f.y=h.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+f.x,y:n.y*l.y-c.scrollTop*l.y+f.y}}function Vn(e){return Array.from(e.getClientRects())}function wt(e){return Z(X(e)).left+be(e).scrollLeft}function Un(e){const t=X(e),n=be(e),o=e.ownerDocument.body,r=W(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=W(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+wt(e);const a=-n.scrollTop;return F(o).direction==="rtl"&&(s+=W(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}function Yn(e,t){const n=I(e),o=X(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const l=Ie();(!l||l&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:s,x:a,y:c}}function Xn(e,t){const n=Z(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=z(e)?ee(e):G(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=r*i.x,l=o*i.y;return{width:s,height:a,x:c,y:l}}function ot(e,t,n){let o;if(t==="viewport")o=Yn(e,n);else if(t==="document")o=Un(X(e));else if(B(t))o=Xn(t,n);else{const r=yt(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return ve(o)}function bt(e,t){const n=K(e);return n===t||!B(n)||ne(n)?!1:F(n).position==="fixed"||bt(n,t)}function Gn(e,t){const n=t.get(e);if(n)return n;let o=le(e,[],!1).filter(a=>B(a)&&se(a)!=="body"),r=null;const i=F(e).position==="fixed";let s=i?K(e):e;for(;B(s)&&!ne(s);){const a=F(s),c=We(s);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ue(s)&&!c&&bt(e,s))?o=o.filter(f=>f!==s):r=a,s=K(s)}return t.set(e,o),o}function qn(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?we(t)?[]:Gn(t,this._c):[].concat(n),o],a=s[0],c=s.reduce((l,f)=>{const d=ot(t,f,r);return l.top=W(d.top,l.top),l.right=H(d.right,l.right),l.bottom=H(d.bottom,l.bottom),l.left=W(d.left,l.left),l},ot(t,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Kn(e){const{width:t,height:n}=vt(e);return{width:t,height:n}}function Zn(e,t,n){const o=z(t),r=X(t),i=n==="fixed",s=Z(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=G(0);if(o||!o&&!i)if((se(t)!=="body"||ue(r))&&(a=be(t)),o){const d=Z(t,!0,i,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else r&&(c.x=wt(r));const l=s.left+a.scrollLeft-c.x,f=s.top+a.scrollTop-c.y;return{x:l,y:f,width:s.width,height:s.height}}function Oe(e){return F(e).position==="static"}function rt(e,t){return!z(e)||F(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ct(e,t){const n=I(e);if(we(e))return n;if(!z(e)){let r=K(e);for(;r&&!ne(r);){if(B(r)&&!Oe(r))return r;r=K(r)}return n}let o=rt(e,t);for(;o&&In(o)&&Oe(o);)o=rt(o,t);return o&&ne(o)&&Oe(o)&&!We(o)?n:o||Fn(e)||n}const Jn=async function(e){const t=this.getOffsetParent||Ct,n=this.getDimensions,o=await n(e.floating);return{reference:Zn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Qn(e){return F(e).direction==="rtl"}const eo={convertOffsetParentRelativeRectToViewportRelativeRect:zn,getDocumentElement:X,getClippingRect:qn,getOffsetParent:Ct,getElementRects:Jn,getClientRects:Vn,getDimensions:Kn,getScale:ee,isElement:B,isRTL:Qn};function to(e,t){let n=null,o;const r=X(e);function i(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=pe(f),m=pe(r.clientWidth-(l+d)),g=pe(r.clientHeight-(f+h)),x=pe(l),y={rootMargin:-p+"px "+-m+"px "+-g+"px "+-x+"px",threshold:W(0,H(1,c))||1};let C=!0;function w(b){const A=b[0].intersectionRatio;if(A!==c){if(!C)return s();A?s(!1,A):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),i}function no(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Fe(e),f=r||i?[...l?le(l):[],...le(t)]:[];f.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=l&&a?to(l,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,g=c?Z(e):null;c&&x();function x(){const v=Z(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(x)}return n(),()=>{var v;f.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const oo=kn,ro=jn,io=Ln,so=Wn,co=Mn,it=Nn,ao=$n,lo=(e,t,n)=>{const o=new Map,r={platform:eo,...n},i={...r.platform,_c:o};return Dn(e,t,{...r,platform:i})};var me=typeof document<"u"?u.useLayoutEffect:u.useEffect;function ye(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!ye(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!ye(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Et(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function st(e,t){const n=Et(e);return Math.round(t*n)/n}function ct(e){const t=u.useRef(e);return me(()=>{t.current=e}),t}function uo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[f,d]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=u.useState(o);ye(h,o)||p(o);const[m,g]=u.useState(null),[x,v]=u.useState(null),y=u.useCallback(R=>{R!==A.current&&(A.current=R,g(R))},[]),C=u.useCallback(R=>{R!==E.current&&(E.current=R,v(R))},[]),w=i||m,b=s||x,A=u.useRef(null),E=u.useRef(null),O=u.useRef(f),L=c!=null,T=ct(c),_=ct(r),k=u.useCallback(()=>{if(!A.current||!E.current)return;const R={placement:t,strategy:n,middleware:h};_.current&&(R.platform=_.current),lo(A.current,E.current,R).then(D=>{const N={...D,isPositioned:!0};j.current&&!ye(O.current,N)&&(O.current=N,_e.flushSync(()=>{d(N)}))})},[h,t,n,_]);me(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[l]);const j=u.useRef(!1);me(()=>(j.current=!0,()=>{j.current=!1}),[]),me(()=>{if(w&&(A.current=w),b&&(E.current=b),w&&b){if(T.current)return T.current(w,b,k);k()}},[w,b,k,T,L]);const S=u.useMemo(()=>({reference:A,floating:E,setReference:y,setFloating:C}),[y,C]),M=u.useMemo(()=>({reference:w,floating:b}),[w,b]),$=u.useMemo(()=>{const R={position:n,left:0,top:0};if(!M.floating)return R;const D=st(M.floating,f.x),N=st(M.floating,f.y);return a?{...R,transform:"translate("+D+"px, "+N+"px)",...Et(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:N}},[n,a,M.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:k,refs:S,elements:M,floatingStyles:$}),[f,k,S,M,$])}const fo=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?it({element:o.current,padding:r}).fn(n):{}:o?it({element:o,padding:r}).fn(n):{}}}},po=(e,t)=>({...oo(e),options:[e,t]}),ho=(e,t)=>({...ro(e),options:[e,t]}),mo=(e,t)=>({...ao(e),options:[e,t]}),go=(e,t)=>({...io(e),options:[e,t]}),xo=(e,t)=>({...so(e),options:[e,t]}),vo=(e,t)=>({...co(e),options:[e,t]}),yo=(e,t)=>({...fo(e),options:[e,t]});var wo="Arrow",Pt=u.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return P.jsx(Q.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:P.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pt.displayName=wo;var bo=Pt;function Co(e){const[t,n]=u.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var He="Popper",[At,Rt]=lt(He),[Eo,Ot]=At(He),Tt=e=>{const{__scopePopper:t,children:n}=e,[o,r]=u.useState(null);return P.jsx(Eo,{scope:t,anchor:o,onAnchorChange:r,children:n})};Tt.displayName=He;var St="PopperAnchor",Dt=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Ot(St,n),s=u.useRef(null),a=J(t,s);return u.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:P.jsx(Q.div,{...r,ref:a})});Dt.displayName=St;var Be="PopperContent",[Po,Ao]=At(Be),Nt=u.forwardRef((e,t)=>{var Ve,Ue,Ye,Xe,Ge,qe;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,x=Ot(Be,n),[v,y]=u.useState(null),C=J(t,ce=>y(ce)),[w,b]=u.useState(null),A=Co(w),E=(A==null?void 0:A.width)??0,O=(A==null?void 0:A.height)??0,L=o+(i!=="center"?"-"+i:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(l)?l:[l],k=_.length>0,j={padding:T,boundary:_.filter(Oo),altBoundary:k},{refs:S,floatingStyles:M,placement:$,isPositioned:R,middlewareData:D}=uo({strategy:"fixed",placement:L,whileElementsMounted:(...ce)=>no(...ce,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[po({mainAxis:r+O,alignmentAxis:s}),c&&ho({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?mo():void 0,...j}),c&&go({...j}),xo({...j,apply:({elements:ce,rects:Ke,availableWidth:Zt,availableHeight:Jt})=>{const{width:Qt,height:en}=Ke.reference,de=ce.floating.style;de.setProperty("--radix-popper-available-width",`${Zt}px`),de.setProperty("--radix-popper-available-height",`${Jt}px`),de.setProperty("--radix-popper-anchor-width",`${Qt}px`),de.setProperty("--radix-popper-anchor-height",`${en}px`)}}),w&&yo({element:w,padding:a}),To({arrowWidth:E,arrowHeight:O}),h&&vo({strategy:"referenceHidden",...j})]}),[N,Re]=_t($),fe=re(m);te(()=>{R&&(fe==null||fe())},[R,fe]);const Yt=(Ve=D.arrow)==null?void 0:Ve.x,Xt=(Ue=D.arrow)==null?void 0:Ue.y,Gt=((Ye=D.arrow)==null?void 0:Ye.centerOffset)!==0,[qt,Kt]=u.useState();return te(()=>{v&&Kt(window.getComputedStyle(v).zIndex)},[v]),P.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:R?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:qt,"--radix-popper-transform-origin":[(Xe=D.transformOrigin)==null?void 0:Xe.x,(Ge=D.transformOrigin)==null?void 0:Ge.y].join(" "),...((qe=D.hide)==null?void 0:qe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:P.jsx(Po,{scope:n,placedSide:N,onArrowChange:b,arrowX:Yt,arrowY:Xt,shouldHideArrow:Gt,children:P.jsx(Q.div,{"data-side":N,"data-align":Re,...g,ref:C,style:{...g.style,animation:R?void 0:"none"}})})})});Nt.displayName=Be;var Lt="PopperArrow",Ro={top:"bottom",right:"left",bottom:"top",left:"right"},Mt=u.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=Ao(Lt,o),s=Ro[i.placedSide];return P.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:P.jsx(bo,{...r,ref:n,style:{...r.style,display:"block"}})})});Mt.displayName=Lt;function Oo(e){return e!==null}var To=e=>({name:"transformOrigin",options:e,fn(t){var x,v,y;const{placement:n,rects:o,middlewareData:r}=t,s=((x=r.arrow)==null?void 0:x.centerOffset)!==0,a=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[l,f]=_t(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(((v=r.arrow)==null?void 0:v.x)??0)+a/2,p=(((y=r.arrow)==null?void 0:y.y)??0)+c/2;let m="",g="";return l==="bottom"?(m=s?d:`${h}px`,g=`${-c}px`):l==="top"?(m=s?d:`${h}px`,g=`${o.floating.height+c}px`):l==="right"?(m=`${-c}px`,g=s?d:`${p}px`):l==="left"&&(m=`${o.floating.width+c}px`,g=s?d:`${p}px`),{data:{x:m,y:g}}}});function _t(e){const[t,n="center"]=e.split("-");return[t,n]}var So=Tt,Do=Dt,No=Nt,Lo=Mt;function Mo(e,t){return u.useReducer((n,o)=>t[n][o]??n,e)}var kt=e=>{const{present:t,children:n}=e,o=_o(t),r=typeof n=="function"?n({present:o.isPresent}):u.Children.only(n),i=J(o.ref,ko(r));return typeof n=="function"||o.isPresent?u.cloneElement(r,{ref:i}):null};kt.displayName="Presence";function _o(e){const[t,n]=u.useState(),o=u.useRef({}),r=u.useRef(e),i=u.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Mo(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=he(o.current);i.current=a==="mounted"?l:"none"},[a]),te(()=>{const l=o.current,f=r.current;if(f!==e){const h=i.current,p=he(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),te(()=>{if(t){const l=d=>{const p=he(o.current).includes(d.animationName);d.target===t&&p&&_e.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=he(o.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function he(e){return(e==null?void 0:e.animationName)||"none"}function ko(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function jo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=$o({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:o,a=re(n),c=u.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&a(d)}else r(l)},[i,e,r,a]);return[s,c]}function $o({defaultProp:e,onChange:t}){const n=u.useState(e),[o]=n,r=u.useRef(o),i=re(t);return u.useEffect(()=>{r.current!==o&&(i(o),r.current=o)},[o,r,i]),n}var Wo="VisuallyHidden",jt=u.forwardRef((e,t)=>P.jsx(Q.span,{...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}}));jt.displayName=Wo;var Io=jt,[Ce,ur]=lt("Tooltip",[Rt]),Ee=Rt(),$t="TooltipProvider",Fo=700,Le="tooltip.open",[Ho,ze]=Ce($t),Wt=e=>{const{__scopeTooltip:t,delayDuration:n=Fo,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=e,[s,a]=u.useState(!0),c=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const f=l.current;return()=>window.clearTimeout(f)},[]),P.jsx(Ho,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:u.useCallback(f=>{c.current=f},[]),disableHoverableContent:r,children:i})};Wt.displayName=$t;var Pe="Tooltip",[Bo,Ae]=Ce(Pe),It=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,c=ze(Pe,e.__scopeTooltip),l=Ee(t),[f,d]=u.useState(null),h=bn(),p=u.useRef(0),m=s??c.disableHoverableContent,g=a??c.delayDuration,x=u.useRef(!1),[v=!1,y]=jo({prop:o,defaultProp:r,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Le))):c.onClose(),i==null||i(E)}}),C=u.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),w=u.useCallback(()=>{window.clearTimeout(p.current),x.current=!1,y(!0)},[y]),b=u.useCallback(()=>{window.clearTimeout(p.current),y(!1)},[y]),A=u.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,y(!0)},g)},[g,y]);return u.useEffect(()=>()=>window.clearTimeout(p.current),[]),P.jsx(So,{...l,children:P.jsx(Bo,{scope:t,contentId:h,open:v,stateAttribute:C,trigger:f,onTriggerChange:d,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayed?A():w()},[c.isOpenDelayed,A,w]),onTriggerLeave:u.useCallback(()=>{m?b():window.clearTimeout(p.current)},[b,m]),onOpen:w,onClose:b,disableHoverableContent:m,children:n})})};It.displayName=Pe;var Me="TooltipTrigger",Ft=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ae(Me,n),i=ze(Me,n),s=Ee(n),a=u.useRef(null),c=J(t,a,r.onTriggerChange),l=u.useRef(!1),f=u.useRef(!1),d=u.useCallback(()=>l.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),P.jsx(Do,{asChild:!0,...s,children:P.jsx(Q.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:c,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:V(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:V(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:V(e.onBlur,r.onClose),onClick:V(e.onClick,r.onClose)})})});Ft.displayName=Me;var zo="TooltipPortal",[fr,Vo]=Ce(zo,{forceMount:void 0}),oe="TooltipContent",Ht=u.forwardRef((e,t)=>{const n=Vo(oe,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,s=Ae(oe,e.__scopeTooltip);return P.jsx(kt,{present:o||s.open,children:s.disableHoverableContent?P.jsx(Bt,{side:r,...i,ref:t}):P.jsx(Uo,{side:r,...i,ref:t})})}),Uo=u.forwardRef((e,t)=>{const n=Ae(oe,e.__scopeTooltip),o=ze(oe,e.__scopeTooltip),r=u.useRef(null),i=J(t,r),[s,a]=u.useState(null),{trigger:c,onClose:l}=n,f=r.current,{onPointerInTransitChange:d}=o,h=u.useCallback(()=>{a(null),d(!1)},[d]),p=u.useCallback((m,g)=>{const x=m.currentTarget,v={x:m.clientX,y:m.clientY},y=qo(v,x.getBoundingClientRect()),C=Ko(v,y),w=Zo(g.getBoundingClientRect()),b=Qo([...C,...w]);a(b),d(!0)},[d]);return u.useEffect(()=>()=>h(),[h]),u.useEffect(()=>{if(c&&f){const m=x=>p(x,f),g=x=>p(x,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),u.useEffect(()=>{if(s){const m=g=>{const x=g.target,v={x:g.clientX,y:g.clientY},y=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),C=!Jo(v,s);y?h():C&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,s,l,h]),P.jsx(Bt,{...e,ref:i})}),[Yo,Xo]=Ce(Pe,{isInside:!1}),Bt=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,c=Ae(oe,n),l=Ee(n),{onClose:f}=c;return u.useEffect(()=>(document.addEventListener(Le,f),()=>document.removeEventListener(Le,f)),[f]),u.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]),P.jsx(pt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:P.jsxs(No,{"data-state":c.stateAttribute,...l,...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)"},children:[P.jsx(ft,{children:o}),P.jsx(Yo,{scope:n,isInside:!0,children:P.jsx(Io,{id:c.contentId,role:"tooltip",children:r||o})})]})})});Ht.displayName=oe;var zt="TooltipArrow",Go=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ee(n);return Xo(zt,n).isInside?null:P.jsx(Lo,{...r,...o,ref:t})});Go.displayName=zt;function qo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Ko(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Zo(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Jo(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i].x,c=t[i].y,l=t[s].x,f=t[s].y;c>o!=f>o&&n<(l-a)*(o-c)/(f-c)+a&&(r=!r)}return r}function Qo(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),er(t)}function er(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}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)}var tr=Wt,nr=It,or=Ft,Vt=Ht;const dr=tr,rr=nr,ir=or;function Ut({className:e,sideOffset:t=4,ref:n,...o}){return P.jsx(Vt,{ref:n,sideOffset:t,className:nn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}Ut.displayName=Vt.displayName;function pr({content:e,children:t}){return e?P.jsxs(rr,{children:[P.jsx(ir,{asChild:!0,children:t}),P.jsx(Ut,{children:e})]}):t}export{Do as A,No as C,pt as D,Q as P,So as R,pr as S,dr as T,jt as V,rr as a,ir as b,Ut as c,lt as d,bn as e,V as f,kt as g,J as h,te as i,Rt as j,ut as k,Lo as l,re as m,lr as n,jo as u};
2
- //# sourceMappingURL=tooltip-kD4kSf1i.js.map
1
+ import{r as u,j as P,B as tn}from"./index-DF_XBInP.js";import{r as _e}from"./components-DZ8XIeZ3.js";import{a as nn}from"./misc-BE75ioh8.js";function V(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function on(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function at(...e){return t=>e.forEach(n=>on(n,t))}function J(...e){return u.useCallback(at(...e),e)}function lr(e,t){const n=u.createContext(t);function o(i){const{children:s,...a}=i,c=u.useMemo(()=>a,Object.values(a));return P.jsx(n.Provider,{value:c,children:s})}function r(i){const s=u.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return o.displayName=e+"Provider",[o,r]}function lt(e,t=[]){let n=[];function o(i,s){const a=u.createContext(s),c=n.length;n=[...n,s];function l(d){const{scope:h,children:p,...m}=d,g=(h==null?void 0:h[e][c])||a,x=u.useMemo(()=>m,Object.values(m));return P.jsx(g.Provider,{value:x,children:p})}function f(d,h){const p=(h==null?void 0:h[e][c])||a,m=u.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,f]}const r=()=>{const i=n.map(s=>u.createContext(s));return function(a){const c=(a==null?void 0:a[e])||i;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return r.scopeName=e,[o,rn(r,...t)]}function rn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const s=o.reduce((a,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...a,...d}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var ut=u.forwardRef((e,t)=>{const{children:n,...o}=e,r=u.Children.toArray(n),i=r.find(sn);if(i){const s=i.props.children,a=r.map(c=>c===i?u.Children.count(s)>1?u.Children.only(null):u.isValidElement(s)?s.props.children:null:c);return P.jsx(Te,{...o,ref:t,children:u.isValidElement(s)?u.cloneElement(s,void 0,a):null})}return P.jsx(Te,{...o,ref:t,children:n})});ut.displayName="Slot";var Te=u.forwardRef((e,t)=>{const{children:n,...o}=e;if(u.isValidElement(n)){const r=an(n);return u.cloneElement(n,{...cn(o,n.props),ref:t?at(t,r):r})}return u.Children.count(n)>1?u.Children.only(null):null});Te.displayName="SlotClone";var ft=({children:e})=>P.jsx(P.Fragment,{children:e});function sn(e){return u.isValidElement(e)&&e.type===ft}function cn(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...a)=>{i(...a),r(...a)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function an(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ln=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Q=ln.reduce((e,t)=>{const n=u.forwardRef((o,r)=>{const{asChild:i,...s}=o,a=i?ut:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(a,{...s,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function un(e,t){e&&_e.flushSync(()=>e.dispatchEvent(t))}function re(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function fn(e,t=globalThis==null?void 0:globalThis.document){const n=re(e);u.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var dn="DismissableLayer",Se="dismissableLayer.update",pn="dismissableLayer.pointerDownOutside",hn="dismissableLayer.focusOutside",Ze,dt=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pt=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...c}=e,l=u.useContext(dt),[f,d]=u.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=u.useState({}),m=J(t,E=>d(E)),g=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),y=f?g.indexOf(f):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,b=xn(E=>{const O=E.target,L=[...l.branches].some(T=>T.contains(O));!w||L||(r==null||r(E),s==null||s(E),E.defaultPrevented||a==null||a())},h),A=vn(E=>{const O=E.target;[...l.branches].some(T=>T.contains(O))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},h);return fn(E=>{y===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),u.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ze=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Je(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ze)}},[f,h,n,l]),u.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Je())},[f,l]),u.useEffect(()=>{const E=()=>p({});return document.addEventListener(Se,E),()=>document.removeEventListener(Se,E)},[]),P.jsx(Q.div,{...c,ref:m,style:{pointerEvents:C?w?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,A.onFocusCapture),onBlurCapture:V(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,b.onPointerDownCapture)})});pt.displayName=dn;var mn="DismissableLayerBranch",gn=u.forwardRef((e,t)=>{const n=u.useContext(dt),o=u.useRef(null),r=J(t,o);return u.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(Q.div,{...e,ref:r})});gn.displayName=mn;function xn(e,t=globalThis==null?void 0:globalThis.document){const n=re(e),o=u.useRef(!1),r=u.useRef(()=>{});return u.useEffect(()=>{const i=a=>{if(a.target&&!o.current){let c=function(){ht(pn,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function vn(e,t=globalThis==null?void 0:globalThis.document){const n=re(e),o=u.useRef(!1);return u.useEffect(()=>{const r=i=>{i.target&&!o.current&&ht(hn,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Je(){const e=new CustomEvent(Se);document.dispatchEvent(e)}function ht(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,i):r.dispatchEvent(i)}var te=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},yn=tn.useId||(()=>{}),wn=0;function bn(e){const[t,n]=u.useState(yn());return te(()=>{e||n(o=>o??String(wn++))},[e]),e||(t?`radix-${t}`:"")}const Cn=["top","right","bottom","left"],H=Math.min,W=Math.max,ge=Math.round,pe=Math.floor,G=e=>({x:e,y:e}),En={left:"right",right:"left",bottom:"top",top:"bottom"},Pn={start:"end",end:"start"};function De(e,t,n){return W(e,H(t,n))}function U(e,t){return typeof e=="function"?e(t):e}function Y(e){return e.split("-")[0]}function ie(e){return e.split("-")[1]}function ke(e){return e==="x"?"y":"x"}function je(e){return e==="y"?"height":"width"}function q(e){return["top","bottom"].includes(Y(e))?"y":"x"}function $e(e){return ke(q(e))}function An(e,t,n){n===void 0&&(n=!1);const o=ie(e),r=$e(e),i=je(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=xe(s)),[s,xe(s)]}function Rn(e){const t=xe(e);return[Ne(e),t,Ne(t)]}function Ne(e){return e.replace(/start|end/g,t=>Pn[t])}function On(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}function Tn(e,t,n,o){const r=ie(e);let i=On(Y(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Ne)))),i}function xe(e){return e.replace(/left|right|bottom|top/g,t=>En[t])}function Sn(e){return{top:0,right:0,bottom:0,left:0,...e}}function mt(e){return typeof e!="number"?Sn(e):{top:e,right:e,bottom:e,left:e}}function ve(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Qe(e,t,n){let{reference:o,floating:r}=e;const i=q(t),s=$e(t),a=je(s),c=Y(t),l=i==="y",f=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,h=o[a]/2-r[a]/2;let p;switch(c){case"top":p={x:f,y:o.y-r.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(ie(t)){case"start":p[s]-=h*(n&&l?-1:1);break;case"end":p[s]+=h*(n&&l?-1:1);break}return p}const Dn=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:d}=Qe(l,o,c),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:x,fn:v}=a[g],{x:y,y:C,data:w,reset:b}=await v({x:f,y:d,initialPlacement:o,placement:h,strategy:r,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});f=y??f,d=C??d,p={...p,[x]:{...p[x],...w}},b&&m<=50&&(m++,typeof b=="object"&&(b.placement&&(h=b.placement),b.rects&&(l=b.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):b.rects),{x:f,y:d}=Qe(l,h,c)),g=-1)}return{x:f,y:d,placement:h,strategy:r,middlewareData:p}};async function ae(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=U(t,e),m=mt(p),x=a[h?d==="floating"?"reference":"floating":d],v=ve(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:f,strategy:c})),y=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),w=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},b=ve(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:C,strategy:c}):y);return{top:(v.top-b.top+m.top)/w.y,bottom:(b.bottom-v.bottom+m.bottom)/w.y,left:(v.left-b.left+m.left)/w.x,right:(b.right-v.right+m.right)/w.x}}const Nn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:f=0}=U(e,t)||{};if(l==null)return{};const d=mt(f),h={x:n,y:o},p=$e(r),m=je(p),g=await s.getDimensions(l),x=p==="y",v=x?"top":"left",y=x?"bottom":"right",C=x?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-h[p]-i.floating[m],b=h[p]-i.reference[p],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let E=A?A[C]:0;(!E||!await(s.isElement==null?void 0:s.isElement(A)))&&(E=a.floating[C]||i.floating[m]);const O=w/2-b/2,L=E/2-g[m]/2-1,T=H(d[v],L),_=H(d[y],L),k=T,j=E-g[m]-_,S=E/2-g[m]/2+O,M=De(k,S,j),$=!c.arrow&&ie(r)!=null&&S!==M&&i.reference[m]/2-(S<k?T:_)-g[m]/2<0,R=$?S<k?S-k:S-j:0;return{[p]:h[p]+R,data:{[p]:M,centerOffset:S-M-R,...$&&{alignmentOffset:R}},reset:$}}}),Ln=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...x}=U(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Y(r),y=q(a),C=Y(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(l.floating)),b=h||(C||!g?[xe(a)]:Rn(a)),A=m!=="none";!h&&A&&b.push(...Tn(a,g,m,w));const E=[a,...b],O=await ae(t,x),L=[];let T=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&L.push(O[v]),d){const S=An(r,s,w);L.push(O[S[0]],O[S[1]])}if(T=[...T,{placement:r,overflows:L}],!L.every(S=>S<=0)){var _,k;const S=(((_=i.flip)==null?void 0:_.index)||0)+1,M=E[S];if(M)return{data:{index:S,overflows:T},reset:{placement:M}};let $=(k=T.filter(R=>R.overflows[0]<=0).sort((R,D)=>R.overflows[1]-D.overflows[1])[0])==null?void 0:k.placement;if(!$)switch(p){case"bestFit":{var j;const R=(j=T.filter(D=>{if(A){const N=q(D.placement);return N===y||N==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(N=>N>0).reduce((N,Re)=>N+Re,0)]).sort((D,N)=>D[1]-N[1])[0])==null?void 0:j[0];R&&($=R);break}case"initialPlacement":$=a;break}if(r!==$)return{reset:{placement:$}}}return{}}}};function et(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tt(e){return Cn.some(t=>e[t]>=0)}const Mn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=U(e,t);switch(o){case"referenceHidden":{const i=await ae(t,{...r,elementContext:"reference"}),s=et(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:tt(s)}}}case"escaped":{const i=await ae(t,{...r,altBoundary:!0}),s=et(i,n.floating);return{data:{escapedOffsets:s,escaped:tt(s)}}}default:return{}}}}};async function _n(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Y(n),a=ie(n),c=q(n)==="y",l=["left","top"].includes(s)?-1:1,f=i&&c?-1:1,d=U(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*f,y:h*l}:{x:h*l,y:p*f}}const kn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,c=await _n(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}},jn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:x=>{let{x:v,y}=x;return{x:v,y}}},...c}=U(e,t),l={x:n,y:o},f=await ae(t,c),d=q(Y(r)),h=ke(d);let p=l[h],m=l[d];if(i){const x=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=p+f[x],C=p-f[v];p=De(y,p,C)}if(s){const x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+f[x],C=m-f[v];m=De(y,m,C)}const g=a.fn({...t,[h]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}},$n=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=U(e,t),f={x:n,y:o},d=q(r),h=ke(d);let p=f[h],m=f[d];const g=U(a,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const C=h==="y"?"height":"width",w=i.reference[h]-i.floating[C]+x.mainAxis,b=i.reference[h]+i.reference[C]-x.mainAxis;p<w?p=w:p>b&&(p=b)}if(l){var v,y;const C=h==="y"?"width":"height",w=["top","left"].includes(Y(r)),b=i.reference[d]-i.floating[C]+(w&&((v=s.offset)==null?void 0:v[d])||0)+(w?0:x.crossAxis),A=i.reference[d]+i.reference[C]+(w?0:((y=s.offset)==null?void 0:y[d])||0)-(w?x.crossAxis:0);m<b?m=b:m>A&&(m=A)}return{[h]:p,[d]:m}}}},Wn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:s=()=>{},...a}=U(e,t),c=await ae(t,a),l=Y(n),f=ie(n),d=q(n)==="y",{width:h,height:p}=o.floating;let m,g;l==="top"||l==="bottom"?(m=l,g=f===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(g=l,m=f==="end"?"top":"bottom");const x=p-c.top-c.bottom,v=h-c.left-c.right,y=H(p-c[m],x),C=H(h-c[g],v),w=!t.middlewareData.shift;let b=y,A=C;if(d?A=f||w?H(C,v):v:b=f||w?H(y,x):x,w&&!f){const O=W(c.left,0),L=W(c.right,0),T=W(c.top,0),_=W(c.bottom,0);d?A=h-2*(O!==0||L!==0?O+L:W(c.left,c.right)):b=p-2*(T!==0||_!==0?T+_:W(c.top,c.bottom))}await s({...t,availableWidth:A,availableHeight:b});const E=await r.getDimensions(i.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function se(e){return gt(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function X(e){var t;return(t=(gt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gt(e){return e instanceof Node||e instanceof I(e).Node}function B(e){return e instanceof Element||e instanceof I(e).Element}function z(e){return e instanceof HTMLElement||e instanceof I(e).HTMLElement}function nt(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}function ue(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=F(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function In(e){return["table","td","th"].includes(se(e))}function we(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function We(e){const t=Ie(),n=F(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Fn(e){let t=K(e);for(;z(t)&&!ne(t);){if(we(t))return null;if(We(t))return t;t=K(t)}return null}function Ie(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ne(e){return["html","body","#document"].includes(se(e))}function F(e){return I(e).getComputedStyle(e)}function be(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function K(e){if(se(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nt(e)&&e.host||X(e);return nt(t)?t.host:t}function xt(e){const t=K(e);return ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:z(t)&&ue(t)?t:xt(t)}function le(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=xt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=I(r);return i?t.concat(s,s.visualViewport||[],ue(r)?r:[],s.frameElement&&n?le(s.frameElement):[]):t.concat(r,le(r,[],n))}function vt(e){const t=F(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=z(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=ge(n)!==i||ge(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function Fe(e){return B(e)?e:e.contextElement}function ee(e){const t=Fe(e);if(!z(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=vt(t);let s=(i?ge(n.width):n.width)/o,a=(i?ge(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Hn=G(0);function yt(e){const t=I(e);return!Ie()||!t.visualViewport?Hn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==I(e)?!1:t}function Z(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Fe(e);let s=G(1);t&&(o?B(o)&&(s=ee(o)):s=ee(e));const a=Bn(i,n,o)?yt(i):G(0);let c=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,f=r.width/s.x,d=r.height/s.y;if(i){const h=I(i),p=o&&B(o)?I(o):o;let m=h,g=m.frameElement;for(;g&&o&&p!==m;){const x=ee(g),v=g.getBoundingClientRect(),y=F(g),C=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*x.x,w=v.top+(g.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,l*=x.y,f*=x.x,d*=x.y,c+=C,l+=w,m=I(g),g=m.frameElement}}return ve({width:f,height:d,x:c,y:l})}function zn(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=X(o),a=t?we(t.floating):!1;if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=G(1);const f=G(0),d=z(o);if((d||!d&&!i)&&((se(o)!=="body"||ue(s))&&(c=be(o)),z(o))){const h=Z(o);l=ee(o),f.x=h.x+o.clientLeft,f.y=h.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+f.x,y:n.y*l.y-c.scrollTop*l.y+f.y}}function Vn(e){return Array.from(e.getClientRects())}function wt(e){return Z(X(e)).left+be(e).scrollLeft}function Un(e){const t=X(e),n=be(e),o=e.ownerDocument.body,r=W(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=W(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+wt(e);const a=-n.scrollTop;return F(o).direction==="rtl"&&(s+=W(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}function Yn(e,t){const n=I(e),o=X(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const l=Ie();(!l||l&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:s,x:a,y:c}}function Xn(e,t){const n=Z(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=z(e)?ee(e):G(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=r*i.x,l=o*i.y;return{width:s,height:a,x:c,y:l}}function ot(e,t,n){let o;if(t==="viewport")o=Yn(e,n);else if(t==="document")o=Un(X(e));else if(B(t))o=Xn(t,n);else{const r=yt(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return ve(o)}function bt(e,t){const n=K(e);return n===t||!B(n)||ne(n)?!1:F(n).position==="fixed"||bt(n,t)}function Gn(e,t){const n=t.get(e);if(n)return n;let o=le(e,[],!1).filter(a=>B(a)&&se(a)!=="body"),r=null;const i=F(e).position==="fixed";let s=i?K(e):e;for(;B(s)&&!ne(s);){const a=F(s),c=We(s);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ue(s)&&!c&&bt(e,s))?o=o.filter(f=>f!==s):r=a,s=K(s)}return t.set(e,o),o}function qn(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?we(t)?[]:Gn(t,this._c):[].concat(n),o],a=s[0],c=s.reduce((l,f)=>{const d=ot(t,f,r);return l.top=W(d.top,l.top),l.right=H(d.right,l.right),l.bottom=H(d.bottom,l.bottom),l.left=W(d.left,l.left),l},ot(t,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Kn(e){const{width:t,height:n}=vt(e);return{width:t,height:n}}function Zn(e,t,n){const o=z(t),r=X(t),i=n==="fixed",s=Z(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=G(0);if(o||!o&&!i)if((se(t)!=="body"||ue(r))&&(a=be(t)),o){const d=Z(t,!0,i,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else r&&(c.x=wt(r));const l=s.left+a.scrollLeft-c.x,f=s.top+a.scrollTop-c.y;return{x:l,y:f,width:s.width,height:s.height}}function Oe(e){return F(e).position==="static"}function rt(e,t){return!z(e)||F(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ct(e,t){const n=I(e);if(we(e))return n;if(!z(e)){let r=K(e);for(;r&&!ne(r);){if(B(r)&&!Oe(r))return r;r=K(r)}return n}let o=rt(e,t);for(;o&&In(o)&&Oe(o);)o=rt(o,t);return o&&ne(o)&&Oe(o)&&!We(o)?n:o||Fn(e)||n}const Jn=async function(e){const t=this.getOffsetParent||Ct,n=this.getDimensions,o=await n(e.floating);return{reference:Zn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Qn(e){return F(e).direction==="rtl"}const eo={convertOffsetParentRelativeRectToViewportRelativeRect:zn,getDocumentElement:X,getClippingRect:qn,getOffsetParent:Ct,getElementRects:Jn,getClientRects:Vn,getDimensions:Kn,getScale:ee,isElement:B,isRTL:Qn};function to(e,t){let n=null,o;const r=X(e);function i(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=pe(f),m=pe(r.clientWidth-(l+d)),g=pe(r.clientHeight-(f+h)),x=pe(l),y={rootMargin:-p+"px "+-m+"px "+-g+"px "+-x+"px",threshold:W(0,H(1,c))||1};let C=!0;function w(b){const A=b[0].intersectionRatio;if(A!==c){if(!C)return s();A?s(!1,A):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),i}function no(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Fe(e),f=r||i?[...l?le(l):[],...le(t)]:[];f.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=l&&a?to(l,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,g=c?Z(e):null;c&&x();function x(){const v=Z(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(x)}return n(),()=>{var v;f.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const oo=kn,ro=jn,io=Ln,so=Wn,co=Mn,it=Nn,ao=$n,lo=(e,t,n)=>{const o=new Map,r={platform:eo,...n},i={...r.platform,_c:o};return Dn(e,t,{...r,platform:i})};var me=typeof document<"u"?u.useLayoutEffect:u.useEffect;function ye(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!ye(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!ye(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Et(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function st(e,t){const n=Et(e);return Math.round(t*n)/n}function ct(e){const t=u.useRef(e);return me(()=>{t.current=e}),t}function uo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[f,d]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=u.useState(o);ye(h,o)||p(o);const[m,g]=u.useState(null),[x,v]=u.useState(null),y=u.useCallback(R=>{R!==A.current&&(A.current=R,g(R))},[]),C=u.useCallback(R=>{R!==E.current&&(E.current=R,v(R))},[]),w=i||m,b=s||x,A=u.useRef(null),E=u.useRef(null),O=u.useRef(f),L=c!=null,T=ct(c),_=ct(r),k=u.useCallback(()=>{if(!A.current||!E.current)return;const R={placement:t,strategy:n,middleware:h};_.current&&(R.platform=_.current),lo(A.current,E.current,R).then(D=>{const N={...D,isPositioned:!0};j.current&&!ye(O.current,N)&&(O.current=N,_e.flushSync(()=>{d(N)}))})},[h,t,n,_]);me(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[l]);const j=u.useRef(!1);me(()=>(j.current=!0,()=>{j.current=!1}),[]),me(()=>{if(w&&(A.current=w),b&&(E.current=b),w&&b){if(T.current)return T.current(w,b,k);k()}},[w,b,k,T,L]);const S=u.useMemo(()=>({reference:A,floating:E,setReference:y,setFloating:C}),[y,C]),M=u.useMemo(()=>({reference:w,floating:b}),[w,b]),$=u.useMemo(()=>{const R={position:n,left:0,top:0};if(!M.floating)return R;const D=st(M.floating,f.x),N=st(M.floating,f.y);return a?{...R,transform:"translate("+D+"px, "+N+"px)",...Et(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:N}},[n,a,M.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:k,refs:S,elements:M,floatingStyles:$}),[f,k,S,M,$])}const fo=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?it({element:o.current,padding:r}).fn(n):{}:o?it({element:o,padding:r}).fn(n):{}}}},po=(e,t)=>({...oo(e),options:[e,t]}),ho=(e,t)=>({...ro(e),options:[e,t]}),mo=(e,t)=>({...ao(e),options:[e,t]}),go=(e,t)=>({...io(e),options:[e,t]}),xo=(e,t)=>({...so(e),options:[e,t]}),vo=(e,t)=>({...co(e),options:[e,t]}),yo=(e,t)=>({...fo(e),options:[e,t]});var wo="Arrow",Pt=u.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return P.jsx(Q.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:P.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pt.displayName=wo;var bo=Pt;function Co(e){const[t,n]=u.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var He="Popper",[At,Rt]=lt(He),[Eo,Ot]=At(He),Tt=e=>{const{__scopePopper:t,children:n}=e,[o,r]=u.useState(null);return P.jsx(Eo,{scope:t,anchor:o,onAnchorChange:r,children:n})};Tt.displayName=He;var St="PopperAnchor",Dt=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Ot(St,n),s=u.useRef(null),a=J(t,s);return u.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:P.jsx(Q.div,{...r,ref:a})});Dt.displayName=St;var Be="PopperContent",[Po,Ao]=At(Be),Nt=u.forwardRef((e,t)=>{var Ve,Ue,Ye,Xe,Ge,qe;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,x=Ot(Be,n),[v,y]=u.useState(null),C=J(t,ce=>y(ce)),[w,b]=u.useState(null),A=Co(w),E=(A==null?void 0:A.width)??0,O=(A==null?void 0:A.height)??0,L=o+(i!=="center"?"-"+i:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},_=Array.isArray(l)?l:[l],k=_.length>0,j={padding:T,boundary:_.filter(Oo),altBoundary:k},{refs:S,floatingStyles:M,placement:$,isPositioned:R,middlewareData:D}=uo({strategy:"fixed",placement:L,whileElementsMounted:(...ce)=>no(...ce,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[po({mainAxis:r+O,alignmentAxis:s}),c&&ho({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?mo():void 0,...j}),c&&go({...j}),xo({...j,apply:({elements:ce,rects:Ke,availableWidth:Zt,availableHeight:Jt})=>{const{width:Qt,height:en}=Ke.reference,de=ce.floating.style;de.setProperty("--radix-popper-available-width",`${Zt}px`),de.setProperty("--radix-popper-available-height",`${Jt}px`),de.setProperty("--radix-popper-anchor-width",`${Qt}px`),de.setProperty("--radix-popper-anchor-height",`${en}px`)}}),w&&yo({element:w,padding:a}),To({arrowWidth:E,arrowHeight:O}),h&&vo({strategy:"referenceHidden",...j})]}),[N,Re]=_t($),fe=re(m);te(()=>{R&&(fe==null||fe())},[R,fe]);const Yt=(Ve=D.arrow)==null?void 0:Ve.x,Xt=(Ue=D.arrow)==null?void 0:Ue.y,Gt=((Ye=D.arrow)==null?void 0:Ye.centerOffset)!==0,[qt,Kt]=u.useState();return te(()=>{v&&Kt(window.getComputedStyle(v).zIndex)},[v]),P.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:R?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:qt,"--radix-popper-transform-origin":[(Xe=D.transformOrigin)==null?void 0:Xe.x,(Ge=D.transformOrigin)==null?void 0:Ge.y].join(" "),...((qe=D.hide)==null?void 0:qe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:P.jsx(Po,{scope:n,placedSide:N,onArrowChange:b,arrowX:Yt,arrowY:Xt,shouldHideArrow:Gt,children:P.jsx(Q.div,{"data-side":N,"data-align":Re,...g,ref:C,style:{...g.style,animation:R?void 0:"none"}})})})});Nt.displayName=Be;var Lt="PopperArrow",Ro={top:"bottom",right:"left",bottom:"top",left:"right"},Mt=u.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=Ao(Lt,o),s=Ro[i.placedSide];return P.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:P.jsx(bo,{...r,ref:n,style:{...r.style,display:"block"}})})});Mt.displayName=Lt;function Oo(e){return e!==null}var To=e=>({name:"transformOrigin",options:e,fn(t){var x,v,y;const{placement:n,rects:o,middlewareData:r}=t,s=((x=r.arrow)==null?void 0:x.centerOffset)!==0,a=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[l,f]=_t(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(((v=r.arrow)==null?void 0:v.x)??0)+a/2,p=(((y=r.arrow)==null?void 0:y.y)??0)+c/2;let m="",g="";return l==="bottom"?(m=s?d:`${h}px`,g=`${-c}px`):l==="top"?(m=s?d:`${h}px`,g=`${o.floating.height+c}px`):l==="right"?(m=`${-c}px`,g=s?d:`${p}px`):l==="left"&&(m=`${o.floating.width+c}px`,g=s?d:`${p}px`),{data:{x:m,y:g}}}});function _t(e){const[t,n="center"]=e.split("-");return[t,n]}var So=Tt,Do=Dt,No=Nt,Lo=Mt;function Mo(e,t){return u.useReducer((n,o)=>t[n][o]??n,e)}var kt=e=>{const{present:t,children:n}=e,o=_o(t),r=typeof n=="function"?n({present:o.isPresent}):u.Children.only(n),i=J(o.ref,ko(r));return typeof n=="function"||o.isPresent?u.cloneElement(r,{ref:i}):null};kt.displayName="Presence";function _o(e){const[t,n]=u.useState(),o=u.useRef({}),r=u.useRef(e),i=u.useRef("none"),s=e?"mounted":"unmounted",[a,c]=Mo(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=he(o.current);i.current=a==="mounted"?l:"none"},[a]),te(()=>{const l=o.current,f=r.current;if(f!==e){const h=i.current,p=he(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),te(()=>{if(t){const l=d=>{const p=he(o.current).includes(d.animationName);d.target===t&&p&&_e.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=he(o.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function he(e){return(e==null?void 0:e.animationName)||"none"}function ko(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function jo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=$o({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:o,a=re(n),c=u.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&a(d)}else r(l)},[i,e,r,a]);return[s,c]}function $o({defaultProp:e,onChange:t}){const n=u.useState(e),[o]=n,r=u.useRef(o),i=re(t);return u.useEffect(()=>{r.current!==o&&(i(o),r.current=o)},[o,r,i]),n}var Wo="VisuallyHidden",jt=u.forwardRef((e,t)=>P.jsx(Q.span,{...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}}));jt.displayName=Wo;var Io=jt,[Ce,ur]=lt("Tooltip",[Rt]),Ee=Rt(),$t="TooltipProvider",Fo=700,Le="tooltip.open",[Ho,ze]=Ce($t),Wt=e=>{const{__scopeTooltip:t,delayDuration:n=Fo,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=e,[s,a]=u.useState(!0),c=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const f=l.current;return()=>window.clearTimeout(f)},[]),P.jsx(Ho,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:u.useCallback(f=>{c.current=f},[]),disableHoverableContent:r,children:i})};Wt.displayName=$t;var Pe="Tooltip",[Bo,Ae]=Ce(Pe),It=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,c=ze(Pe,e.__scopeTooltip),l=Ee(t),[f,d]=u.useState(null),h=bn(),p=u.useRef(0),m=s??c.disableHoverableContent,g=a??c.delayDuration,x=u.useRef(!1),[v=!1,y]=jo({prop:o,defaultProp:r,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(Le))):c.onClose(),i==null||i(E)}}),C=u.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),w=u.useCallback(()=>{window.clearTimeout(p.current),x.current=!1,y(!0)},[y]),b=u.useCallback(()=>{window.clearTimeout(p.current),y(!1)},[y]),A=u.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,y(!0)},g)},[g,y]);return u.useEffect(()=>()=>window.clearTimeout(p.current),[]),P.jsx(So,{...l,children:P.jsx(Bo,{scope:t,contentId:h,open:v,stateAttribute:C,trigger:f,onTriggerChange:d,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayed?A():w()},[c.isOpenDelayed,A,w]),onTriggerLeave:u.useCallback(()=>{m?b():window.clearTimeout(p.current)},[b,m]),onOpen:w,onClose:b,disableHoverableContent:m,children:n})})};It.displayName=Pe;var Me="TooltipTrigger",Ft=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ae(Me,n),i=ze(Me,n),s=Ee(n),a=u.useRef(null),c=J(t,a,r.onTriggerChange),l=u.useRef(!1),f=u.useRef(!1),d=u.useCallback(()=>l.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),P.jsx(Do,{asChild:!0,...s,children:P.jsx(Q.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:c,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:V(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:V(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:V(e.onBlur,r.onClose),onClick:V(e.onClick,r.onClose)})})});Ft.displayName=Me;var zo="TooltipPortal",[fr,Vo]=Ce(zo,{forceMount:void 0}),oe="TooltipContent",Ht=u.forwardRef((e,t)=>{const n=Vo(oe,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,s=Ae(oe,e.__scopeTooltip);return P.jsx(kt,{present:o||s.open,children:s.disableHoverableContent?P.jsx(Bt,{side:r,...i,ref:t}):P.jsx(Uo,{side:r,...i,ref:t})})}),Uo=u.forwardRef((e,t)=>{const n=Ae(oe,e.__scopeTooltip),o=ze(oe,e.__scopeTooltip),r=u.useRef(null),i=J(t,r),[s,a]=u.useState(null),{trigger:c,onClose:l}=n,f=r.current,{onPointerInTransitChange:d}=o,h=u.useCallback(()=>{a(null),d(!1)},[d]),p=u.useCallback((m,g)=>{const x=m.currentTarget,v={x:m.clientX,y:m.clientY},y=qo(v,x.getBoundingClientRect()),C=Ko(v,y),w=Zo(g.getBoundingClientRect()),b=Qo([...C,...w]);a(b),d(!0)},[d]);return u.useEffect(()=>()=>h(),[h]),u.useEffect(()=>{if(c&&f){const m=x=>p(x,f),g=x=>p(x,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),u.useEffect(()=>{if(s){const m=g=>{const x=g.target,v={x:g.clientX,y:g.clientY},y=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),C=!Jo(v,s);y?h():C&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,s,l,h]),P.jsx(Bt,{...e,ref:i})}),[Yo,Xo]=Ce(Pe,{isInside:!1}),Bt=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,c=Ae(oe,n),l=Ee(n),{onClose:f}=c;return u.useEffect(()=>(document.addEventListener(Le,f),()=>document.removeEventListener(Le,f)),[f]),u.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]),P.jsx(pt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:P.jsxs(No,{"data-state":c.stateAttribute,...l,...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)"},children:[P.jsx(ft,{children:o}),P.jsx(Yo,{scope:n,isInside:!0,children:P.jsx(Io,{id:c.contentId,role:"tooltip",children:r||o})})]})})});Ht.displayName=oe;var zt="TooltipArrow",Go=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ee(n);return Xo(zt,n).isInside?null:P.jsx(Lo,{...r,...o,ref:t})});Go.displayName=zt;function qo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Ko(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Zo(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Jo(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i].x,c=t[i].y,l=t[s].x,f=t[s].y;c>o!=f>o&&n<(l-a)*(o-c)/(f-c)+a&&(r=!r)}return r}function Qo(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),er(t)}function er(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}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)}var tr=Wt,nr=It,or=Ft,Vt=Ht;const dr=tr,rr=nr,ir=or;function Ut({className:e,sideOffset:t=4,ref:n,...o}){return P.jsx(Vt,{ref:n,sideOffset:t,className:nn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}Ut.displayName=Vt.displayName;function pr({content:e,children:t}){return e?P.jsxs(rr,{children:[P.jsx(ir,{asChild:!0,children:t}),P.jsx(Ut,{children:e})]}):t}export{Do as A,No as C,pt as D,Q as P,So as R,pr as S,dr as T,jt as V,rr as a,ir as b,Ut as c,lt as d,bn as e,V as f,kt as g,J as h,te as i,Rt as j,ut as k,Lo as l,re as m,lr as n,jo as u};
2
+ //# sourceMappingURL=tooltip-6-WS-Xux.js.map