@radui/ui 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +2 -0
  2. package/dist/components/Accordion.d.ts +19 -33
  3. package/dist/components/Accordion.js +1 -1
  4. package/dist/components/AlertDialog.d.ts +7 -3
  5. package/dist/components/AlertDialog.js +1 -1
  6. package/dist/components/AspectRatio.d.ts +2 -2
  7. package/dist/components/AspectRatio.js +1 -1
  8. package/dist/components/Avatar.js +1 -1
  9. package/dist/components/AvatarGroup.js +1 -1
  10. package/dist/components/{AvatarPrimitiveFallback-KiY3slgV.js → AvatarPrimitiveFallback-B1u295x6.js} +1 -1
  11. package/dist/components/Badge.js +1 -1
  12. package/dist/components/BlockQuote.js +1 -1
  13. package/dist/components/Breadcrumb.d.ts +70 -0
  14. package/dist/components/Breadcrumb.js +1 -0
  15. package/dist/components/Button.js +1 -1
  16. package/dist/components/Callout.js +1 -1
  17. package/dist/components/Card.js +1 -1
  18. package/dist/components/Checkbox.js +1 -1
  19. package/dist/components/CheckboxCards.js +1 -1
  20. package/dist/components/CheckboxGroup.js +1 -1
  21. package/dist/components/{CheckboxGroupPrimitive-DgfnzMT9.js → CheckboxGroupPrimitive-BWGRST9p.js} +1 -1
  22. package/dist/components/Code.js +1 -1
  23. package/dist/components/Collapsible.js +1 -1
  24. package/dist/components/Combobox.d.ts +3 -1
  25. package/dist/components/Combobox.js +1 -1
  26. package/dist/components/ComboboxPrimitive-C2sksm48.js +1 -0
  27. package/dist/components/Command.d.ts +113 -0
  28. package/dist/components/Command.js +1 -0
  29. package/dist/components/ContextMenu.d.ts +14 -10
  30. package/dist/components/ContextMenu.js +1 -1
  31. package/dist/components/DataList.d.ts +7 -2
  32. package/dist/components/DataList.js +1 -1
  33. package/dist/components/Dialog.d.ts +6 -3
  34. package/dist/components/Dialog.js +1 -1
  35. package/dist/components/Disclosure.d.ts +2 -0
  36. package/dist/components/Disclosure.js +1 -1
  37. package/dist/components/Drawer.d.ts +231 -0
  38. package/dist/components/Drawer.js +1 -0
  39. package/dist/components/DropdownMenu.d.ts +10 -6
  40. package/dist/components/DropdownMenu.js +1 -1
  41. package/dist/components/Em.js +1 -1
  42. package/dist/components/Fieldset.d.ts +43 -0
  43. package/dist/components/Fieldset.js +1 -0
  44. package/dist/components/Heading.js +1 -1
  45. package/dist/components/HoverCard.d.ts +10 -2
  46. package/dist/components/HoverCard.js +1 -1
  47. package/dist/components/Kbd.js +1 -1
  48. package/dist/components/Link.js +1 -1
  49. package/dist/components/LiveRegion.d.ts +73 -0
  50. package/dist/components/LiveRegion.js +1 -0
  51. package/dist/components/MenuPrimitive-COEgTo6S.js +1 -0
  52. package/dist/components/Menubar.d.ts +10 -6
  53. package/dist/components/Menubar.js +1 -1
  54. package/dist/components/Minimap.js +1 -1
  55. package/dist/components/NavigationMenu.d.ts +3 -0
  56. package/dist/components/NavigationMenu.js +1 -1
  57. package/dist/components/NumberField.d.ts +2 -0
  58. package/dist/components/NumberField.js +1 -1
  59. package/dist/components/Popover.d.ts +68 -0
  60. package/dist/components/Popover.js +1 -0
  61. package/dist/components/Progress.js +1 -1
  62. package/dist/components/Quote.d.ts +2 -0
  63. package/dist/components/Quote.js +1 -1
  64. package/dist/components/Radio.js +1 -1
  65. package/dist/components/RadioCards.js +1 -1
  66. package/dist/components/RadioGroup.js +1 -1
  67. package/dist/components/{RadioGroupPrimitive-tlWBfWJ8.js → RadioGroupPrimitive-BWUU-0Qh.js} +1 -1
  68. package/dist/components/ScrollArea.d.ts +15 -3
  69. package/dist/components/ScrollArea.js +1 -1
  70. package/dist/components/Select.d.ts +3 -1
  71. package/dist/components/Select.js +1 -1
  72. package/dist/components/Separator.js +1 -1
  73. package/dist/components/Skeleton.js +1 -1
  74. package/dist/components/Slider.js +1 -1
  75. package/dist/components/Spinner.js +1 -1
  76. package/dist/components/Splitter.js +1 -1
  77. package/dist/components/Steps.js +1 -1
  78. package/dist/components/Strong.js +1 -1
  79. package/dist/components/Switch.js +1 -1
  80. package/dist/components/TabNav.js +1 -1
  81. package/dist/components/Table.d.ts +65 -19
  82. package/dist/components/Table.js +1 -1
  83. package/dist/components/Tabs.d.ts +2 -0
  84. package/dist/components/Tabs.js +1 -1
  85. package/dist/components/Text.js +1 -1
  86. package/dist/components/TextArea.js +1 -1
  87. package/dist/components/TextField.d.ts +41 -0
  88. package/dist/components/TextField.js +1 -0
  89. package/dist/components/Theme.d.ts +2 -0
  90. package/dist/components/Theme.js +1 -1
  91. package/dist/components/Toast.d.ts +322 -0
  92. package/dist/components/Toast.js +1 -0
  93. package/dist/components/Toggle.js +1 -1
  94. package/dist/components/ToggleGroup.js +1 -1
  95. package/dist/components/Toolbar.js +1 -1
  96. package/dist/components/Tooltip.d.ts +3 -0
  97. package/dist/components/Tooltip.js +1 -1
  98. package/dist/components/Tree.d.ts +1 -0
  99. package/dist/components/Tree.js +1 -1
  100. package/dist/components/VisuallyHidden.js +1 -1
  101. package/dist/components/documentOverlayOpen-coyGmcyL.js +1 -0
  102. package/dist/components/floating-ui.react-Byzse64h.js +5 -0
  103. package/dist/components/index-C09ZQH_q.js +1 -0
  104. package/dist/components/index-CD_nZA9X.js +1 -0
  105. package/dist/components/{index-BOy86lYu.js → index-CfC8-kd8.js} +1 -1
  106. package/dist/components/index-Db-tduwt.js +1 -0
  107. package/dist/components/index-UODM4mVT.js +1 -0
  108. package/dist/components/index-XF8itt-H.js +1 -0
  109. package/dist/components/index-YhJvxumL.js +1 -0
  110. package/dist/components/index-eAZUMNef.js +1 -0
  111. package/dist/components/index-m8Mhi26u.js +1 -0
  112. package/dist/components/keyboard-BKF7hXqL.js +1 -0
  113. package/dist/components/mergeProps-0RucjqeH.js +1 -0
  114. package/dist/components/useComponentClass-QwNivz0h.js +1 -0
  115. package/dist/themes/baremetal.css +1 -0
  116. package/dist/themes/default.css +1 -1
  117. package/dist/themes/tailwind-presets/default.css +396 -0
  118. package/package.json +76 -23
  119. package/dist/components/ComboboxPrimitive-D5wWLl2_.js +0 -1
  120. package/dist/components/MenuPrimitive-BvxwQFGM.js +0 -1
  121. package/dist/components/floating-ui.react-gB901AP2.js +0 -5
  122. package/dist/components/index-3dZuI04X.js +0 -1
  123. package/dist/components/index-6If6D2Zi.js +0 -1
  124. package/dist/components/index-98jQ1vTr.js +0 -1
  125. package/dist/components/index-BQ2Hbb_x.js +0 -1
  126. package/dist/components/index-BZVbVgqN.js +0 -1
  127. package/dist/components/index-BoRAvltW.js +0 -1
  128. package/dist/components/index-DTYJVF-V.js +0 -1
  129. package/dist/components/index-TYaYKM2M.js +0 -1
  130. package/dist/themes/tailwind-presets/default.js +0 -1
@@ -1 +1 @@
1
- 'use client';import e,{createContext as o,useContext as i}from"react";import{jsx as a}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{c as r}from"./index-6If6D2Zi.js";import{u as s}from"./index-wRElCyvx.js";import{R as l}from"./index-TYaYKM2M.js";import{T as d}from"./index-BZVbVgqN.js";import"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-CXzybYmm.js";const n=o({type:"single",activeToggles:[],setActiveToggles:()=>{},rootClass:"",disabled:!1,orientation:"horizontal"}),c="ToggleGroup",m=e.forwardRef((({type:e="single",className:o="",loop:i=!0,orientation:d="horizontal",customRootClass:m="",value:p,defaultValue:g=[],onValueChange:u,color:f="",disabled:h=!1,dir:v="ltr",rovingFocus:T=!0,asChild:j=!1,children:x,...y},C)=>{const R=r(m,c),[b,N]=s(p,g,u),G={activeToggles:b,setActiveToggles:N,type:e,rootClass:R,disabled:h,orientation:d},w={};return f&&(w["data-rad-ui-accent-color"]=f),h&&(w["data-disabled"]=""),w["data-orientation"]=d,a(n.Provider,T?{value:G,children:a(l.Root,{loop:i,orientation:d,dir:v,children:a(l.Group,{...w,...y,children:a("div",{ref:C,className:t(R,o),children:x})})})}:{value:G,children:a("div",{ref:C,className:t(R,o),...w,dir:v,...y,children:x})})}));m.displayName=c;const p=e.forwardRef((({children:e,className:o="",value:t=null,disabled:r=!1,asChild:s=!1,iconOnly:c=!1,...m},p)=>{const{type:g,activeToggles:u,setActiveToggles:f,rootClass:h,disabled:v}=i(n),T=u?.includes(t),j=r||v,x={},y={};return T?(x["aria-pressed"]="true",y["data-state"]="on"):(x["aria-pressed"]="false",y["data-state"]="off"),j&&(y["data-disabled"]=""),a(l.Item,{children:a(d,{ref:p,onClick:()=>{if(j)return;let e=u||[];if("single"===g)return T?void f([]):void f([t]);"multiple"===g&&(e=T?e.filter((e=>e!==t)):[...e,t]),f(e)},className:`${h}-item ${o}`,disabled:j,asChild:s,...c?{"data-icon-only":""}:{},...x,...y,...m,children:e})})}));p.displayName="ToggleItem";const g=e.forwardRef(((e,o)=>(console.warn("Direct usage of ToggleGroup is not supported. Please use ToggleGroup.Root, ToggleGroup.Item, etc. instead."),null)));g.displayName="ToggleGroup",g.Root=m,g.Item=p;export{g as default};
1
+ 'use client';import e,{createContext as o,useContext as s}from"react";import{jsx as t}from"react/jsx-runtime";import{c as r}from"./clsx-BaVHROc5.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{u as i}from"./index-wRElCyvx.js";import{R as l}from"./index-m8Mhi26u.js";import{T as d}from"./index-C09ZQH_q.js";import"./ThemeContext-Sm-iNANd.js";import"./index-XF8itt-H.js";import"./mergeProps-0RucjqeH.js";import"./index-CfC8-kd8.js";import"./keyboard-BKF7hXqL.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-CXzybYmm.js";const n=o({type:"single",activeToggles:[],setActiveToggles:()=>{},rootClass:"",disabled:!1,orientation:"horizontal"}),c="ToggleGroup",m=e.forwardRef((({type:e="single",className:o="",loop:s=!0,orientation:d="horizontal",customRootClass:m="",value:p,defaultValue:g=[],onValueChange:u,color:f="",disabled:h=!1,dir:v="ltr",rovingFocus:j=!0,asChild:T=!1,children:C,...b},x)=>{const y=a(m,c),[R,N]=i(p,g,u),G={activeToggles:R,setActiveToggles:N,type:e,rootClass:y,disabled:h,orientation:d},w={};return f&&(w["data-color"]=f),h&&(w["data-disabled"]=""),w["data-orientation"]=d,t(n.Provider,j?{value:G,children:t(l.Root,{loop:s,orientation:d,dir:v,children:t(l.Group,{...w,...b,children:t("div",{ref:x,className:r(y,o),children:C})})})}:{value:G,children:t("div",{ref:x,className:r(y,o),...w,dir:v,...b,children:C})})}));m.displayName=c;const p=e.forwardRef((({children:e,className:o="",value:a=null,disabled:i=!1,asChild:c=!1,iconOnly:m=!1,...p},g)=>{const{type:u,activeToggles:f,setActiveToggles:h,rootClass:v,disabled:j}=s(n),T=f?.includes(a),C=i||j,b={},x={};return T?(b["aria-pressed"]="true",x["data-state"]="on"):(b["aria-pressed"]="false",x["data-state"]="off"),C&&(x["data-disabled"]=""),t(l.Item,{children:t(d,{ref:g,onClick:()=>{if(C)return;let e=f||[];if("single"===u)return T?void h([]):void h([a]);"multiple"===u&&(e=T?e.filter((e=>e!==a)):[...e,a]),h(e)},className:r(v&&`${v}-item`,o),disabled:C,asChild:c,...m?{"data-icon-only":""}:{},...b,...x,...p,children:e})})}));p.displayName="ToggleItem";const g=e.forwardRef(((e,o)=>(console.warn("Direct usage of ToggleGroup is not supported. Please use ToggleGroup.Root, ToggleGroup.Item, etc. instead."),null)));g.displayName="ToggleGroup",g.Root=m,g.Item=p;export{g as default};
@@ -1 +1 @@
1
- 'use client';import o,{createContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{c as a}from"./index-6If6D2Zi.js";import{P as s}from"./index-98jQ1vTr.js";import{R as l}from"./index-TYaYKM2M.js";import{B as i}from"./index-BOy86lYu.js";import n from"./Separator.js";import d from"./Link.js";import{u}from"./index-wRElCyvx.js";import{T as m}from"./index-BZVbVgqN.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-3dZuI04X.js";import"./index-CXzybYmm.js";const c=e(null),p="Toolbar",f=o.forwardRef((({orientation:e="horizontal",loop:i=!1,dir:n="ltr",className:d="",customRootClass:u="",asChild:m=!1,children:f,...h},b)=>{const T=a(u,p),g=o.useMemo((()=>({rootClass:T,orientation:e,dir:n})),[T,e,n]),w={"data-orientation":e};return r(c.Provider,{value:g,children:r(l.Root,{orientation:e,loop:i,dir:n,children:r(l.Group,{children:r(s.div,{asChild:m,ref:b,role:"toolbar","aria-orientation":"vertical"===e?"vertical":void 0,dir:n,className:t(T,d),...w,...h,children:f})})})})}));f.displayName=p;const h=o.forwardRef((({className:e="",asChild:a=!1,type:s="button",...n},d)=>{const u=o.useContext(c);if(!u)throw new Error("Toolbar.Button must be used within Toolbar.Root");const{rootClass:m}=u;return r(l.Item,{children:r(i,{ref:d,className:t(`${m}-button`,e),asChild:a,type:a?void 0:s,...n})})}));h.displayName="ToolbarButton";const b=o.forwardRef((({className:e="",orientation:a,...s},l)=>{const i=o.useContext(c);if(!i)throw new Error("Toolbar.Separator must be used within Toolbar.Root");const{rootClass:d,orientation:u}=i;return r(n,{ref:l,...s,decorative:!0,orientation:a??("horizontal"===u?"vertical":"horizontal"),className:t(`${d}-separator`,e)})}));b.displayName="ToolbarSeparator";const T=o.forwardRef((({className:e="",asChild:a=!1,href:s="#",...i},n)=>{const u=o.useContext(c);if(!u)throw new Error("Toolbar.Link must be used within Toolbar.Root");const{rootClass:m}=u;return r(l.Item,{role:"link",children:r(d,{ref:n,asChild:a,href:s,className:t(`${m}-link`,e),...i})})}));T.displayName="ToolbarLink";const g=e(null),w=o.forwardRef((({type:e="single",value:a,defaultValue:s=[],onValueChange:l,disabled:i=!1,className:n="",children:d,...m},p)=>{const f=o.useContext(c);if(!f)throw new Error("Toolbar.ToggleGroup must be used within Toolbar.Root");const[h,b]=u(a,s,l),T=o.useMemo((()=>Array.isArray(h)?h:h?[h]:[]),[h]),w=o.useMemo((()=>({type:e,value:T,setValue:b,rootClass:f.rootClass,disabled:i})),[e,T,b,f.rootClass,i]);return r(g.Provider,{value:w,children:r("div",{ref:p,...m,role:"group",className:t(`${f.rootClass}-toggle-group`,n),children:d})})}));w.displayName="ToolbarToggleGroup";const C=o.forwardRef((({value:e,disabled:a=!1,className:s="",...i},n)=>{const d=o.useContext(g);if(!d)throw new Error("Toolbar.ToggleItem must be used within Toolbar.ToggleGroup");const u=d.value.includes(e),c=a||d.disabled;return r(l.Item,{children:r(m,{ref:n,pressed:u,disabled:c,onPressedChange:o=>{c||("single"!==d.type?o?d.setValue([...d.value,e]):d.setValue(d.value.filter((o=>o!==e))):d.setValue(o?[e]:[]))},className:t(`${d.rootClass}-toggle-item`,s),...i})})}));C.displayName="ToolbarToggleItem";const N=o.forwardRef(((o,e)=>("production"!==process.env.NODE_ENV&&console.warn("Direct usage of Toolbar is not supported. Please use Toolbar.Root, Toolbar.Button, etc. instead."),null)));N.displayName="Toolbar",N.Root=f,N.Button=h,N.Separator=b,N.Link=T,N.ToggleGroup=w,N.ToggleItem=C;export{N as default};
1
+ 'use client';import o,{createContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{P as s}from"./index-XF8itt-H.js";import{R as l}from"./index-m8Mhi26u.js";import{B as i}from"./index-CfC8-kd8.js";import n from"./Separator.js";import d from"./Link.js";import{u as m}from"./index-wRElCyvx.js";import{T as u}from"./index-C09ZQH_q.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-0RucjqeH.js";import"./keyboard-BKF7hXqL.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-eAZUMNef.js";import"./index-CXzybYmm.js";const c=e(null),p="Toolbar",f=o.forwardRef((({orientation:e="horizontal",loop:i=!1,dir:n="ltr",className:d="",customRootClass:m="",asChild:u=!1,children:f,...b},h)=>{const T=a(m,p),C=o.useMemo((()=>({rootClass:T,orientation:e,dir:n})),[T,e,n]),g={"data-orientation":e};return r(c.Provider,{value:C,children:r(l.Root,{orientation:e,loop:i,dir:n,children:r(l.Group,{children:r(s.div,{asChild:u,ref:h,role:"toolbar","aria-orientation":"vertical"===e?"vertical":void 0,dir:n,className:t(T,d),...g,...b,children:f})})})})}));f.displayName=p;const b=o.forwardRef((({className:e="",asChild:a=!1,type:s="button",...n},d)=>{const m=o.useContext(c);if(!m)throw new Error("Toolbar.Button must be used within Toolbar.Root");const{rootClass:u}=m;return r(l.Item,{children:r(i,{ref:d,className:t(u&&`${u}-button`,e),asChild:a,type:a?void 0:s,...n})})}));b.displayName="ToolbarButton";const h=o.forwardRef((({className:e="",orientation:a,...s},l)=>{const i=o.useContext(c);if(!i)throw new Error("Toolbar.Separator must be used within Toolbar.Root");const{rootClass:d,orientation:m}=i;return r(n,{ref:l,...s,decorative:!0,orientation:a??("horizontal"===m?"vertical":"horizontal"),className:t(d&&`${d}-separator`,e)})}));h.displayName="ToolbarSeparator";const T=o.forwardRef((({className:e="",asChild:a=!1,href:s="#",...i},n)=>{const m=o.useContext(c);if(!m)throw new Error("Toolbar.Link must be used within Toolbar.Root");const{rootClass:u}=m;return r(l.Item,{role:"link",children:r(d,{ref:n,asChild:a,href:s,className:t(u&&`${u}-link`,e),...i})})}));T.displayName="ToolbarLink";const C=e(null),g=o.forwardRef((({type:e="single",value:a,defaultValue:s=[],onValueChange:l,disabled:i=!1,className:n="",children:d,...u},p)=>{const f=o.useContext(c);if(!f)throw new Error("Toolbar.ToggleGroup must be used within Toolbar.Root");const[b,h]=m(a,s,l),T=o.useMemo((()=>Array.isArray(b)?b:b?[b]:[]),[b]),g=o.useMemo((()=>({type:e,value:T,setValue:h,rootClass:f.rootClass,disabled:i})),[e,T,h,f.rootClass,i]);return r(C.Provider,{value:g,children:r("div",{ref:p,...u,role:"group",className:t(f.rootClass&&`${f.rootClass}-toggle-group`,n),children:d})})}));g.displayName="ToolbarToggleGroup";const w=o.forwardRef((({value:e,disabled:a=!1,className:s="",...i},n)=>{const d=o.useContext(C);if(!d)throw new Error("Toolbar.ToggleItem must be used within Toolbar.ToggleGroup");const m=d.value.includes(e),c=a||d.disabled;return r(l.Item,{children:r(u,{ref:n,pressed:m,disabled:c,onPressedChange:o=>{c||("single"!==d.type?o?d.setValue([...d.value,e]):d.setValue(d.value.filter((o=>o!==e))):d.setValue(o?[e]:[]))},className:t(d.rootClass&&`${d.rootClass}-toggle-item`,s),...i})})}));w.displayName="ToolbarToggleItem";const N=o.forwardRef(((o,e)=>("production"!==process.env.NODE_ENV&&console.warn("Direct usage of Toolbar is not supported. Please use Toolbar.Root, Toolbar.Button, etc. instead."),null)));N.displayName="Toolbar",N.Root=f,N.Button=b,N.Separator=h,N.Link=T,N.ToggleGroup=g,N.ToggleItem=w;export{N as default};
@@ -6,6 +6,8 @@ type Placement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' |
6
6
  interface TooltipRootProps extends React.ComponentPropsWithoutRef<'div'> {
7
7
  children: React.ReactNode;
8
8
  placement?: Placement;
9
+ collisionBoundary?: Element | null | Array<Element | null>;
10
+ collisionPadding?: number;
9
11
  }
10
12
  declare const TooltipRoot: React.ForwardRefExoticComponent<TooltipRootProps & React.RefAttributes<HTMLDivElement>>;
11
13
 
@@ -26,6 +28,7 @@ declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<{
26
28
 
27
29
  type TooltipContentProps = React.ComponentPropsWithoutRef<typeof Primitive.div> & {
28
30
  showArrow?: boolean;
31
+ container?: HTMLElement | null;
29
32
  children: React.ReactNode;
30
33
  };
31
34
  declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- 'use client';import e,{createContext as t,useRef as o,useState as r,useContext as n}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{a as s,m as l,o as c,f as d,e as p,g as f,k as m,i as u,l as g,j as h,u as w,G as T,v as R}from"./floating-ui.react-gB901AP2.js";import{B as x}from"./index-BOy86lYu.js";import{c as y}from"./clsx-BaVHROc5.js";import{P as v}from"./index-98jQ1vTr.js";import{T as j}from"./ThemeContext-Sm-iNANd.js";import"react-dom";const C=t(null),N=e.forwardRef((({children:e,placement:t="top",...n},i)=>{const w=o(null),[T,R]=r(!1),x=s({placement:t,strategy:"fixed",onOpenChange:R,middleware:[l({element:w,padding:4}),c(5),d({crossAxis:!0,fallbackAxisSideDirection:"start",padding:5}),p({padding:5})]}),y=x.context,v=f(y,{move:!1}),j=m(y,{}),N=u(y),O=g(y,{role:"tooltip"}),P=h([v,j,N,O]);return a(C.Provider,{value:{isOpen:T,setIsOpen:R,data:x,interactions:P,context:y,arrowRef:w},children:a("div",{ref:i,...n,children:e})})}));N.displayName="Tooltip";const O=e.forwardRef((({children:e,asChild:t,...o},r)=>{const i=n(C);if(!i)throw new Error("TooltipTrigger must be used within a TooltipRoot component");const{isOpen:s,interactions:l,context:c}=i,{getReferenceProps:d}=l,p=e.ref,f=w([c.refs.setReference,r,p]);return a(x,{asChild:t,ref:f,"data-state":s?"open":"closed",...d(o),children:e})}));O.displayName="TooltipTrigger";const P=e.forwardRef((({children:e,showArrow:t=!0,...o},r)=>{const s=n(C),l=n(j);if(!s)throw new Error("TooltipContent must be used within a TooltipRoot component");const{isOpen:c,data:d,interactions:p,context:f}=s,m=s.arrowRef,u=w([f.refs.setFloating,r]);if(!c)return null;const{getFloatingProps:g}=p,h=l?.portalRootRef.current||document.querySelector("[data-rad-ui-portal-root]")||l?.containerRef.current||document.querySelector("#rad-ui-theme-container")||void 0;return a(T,{root:h,children:a(v.div,{className:"rad-ui-tooltip-floating-element",ref:u,"data-state":c?"open":"closed",style:{...d.floatingStyles},...g(o),children:i("div",{className:"rad-ui-tooltip-content-inner",children:[t&&a(R,{className:y("rad-ui-arrow"),ref:m,context:f}),e]})})})}));P.displayName="TooltipContent";const b=e.forwardRef(((e,t)=>(console.warn("Direct usage of Tooltip is not supported. Please use Tooltip.Root, Tooltip.Trigger, etc. instead."),null)));b.displayName="Tooltip",b.Root=N,b.Trigger=O,b.Content=P;export{b as default};
1
+ 'use client';import o,{createContext as t,useRef as e,useState as r,useContext as n}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{D as s,B as l,n as d,o as c,f as p,e as f,g as m,k as u,i as g,m as h,j as w,u as T,H as R,v as x}from"./floating-ui.react-Byzse64h.js";import{B as y}from"./index-CfC8-kd8.js";import{g as j}from"./mergeProps-0RucjqeH.js";import{c as v}from"./clsx-BaVHROc5.js";import{P as C}from"./index-XF8itt-H.js";import{T as N}from"./ThemeContext-Sm-iNANd.js";import"react-dom";const P=t(null),A=o.forwardRef((({children:o,placement:t="top",collisionBoundary:n=null,collisionPadding:i=5,...T},R)=>{const x=e(null),[y,j]=r(!1),v=(Array.isArray(n)?n:[n]).filter((o=>null!=o)),C={padding:i,boundary:v,altBoundary:v.length>0},N=s({placement:t,strategy:"fixed",onOpenChange:j,middleware:[d({element:x,padding:4}),c(5),p({crossAxis:!0,fallbackAxisSideDirection:"start",...C}),f(C)],whileElementsMounted:l}),A=N.context,O=m(A,{move:!1}),b=u(A,{}),B=g(A),D=h(A,{role:"tooltip"}),E=w([O,b,B,D]);return a(P.Provider,{value:{isOpen:y,setIsOpen:j,data:N,interactions:E,context:A,arrowRef:x},children:a("div",{ref:R,"data-slot":"tooltip-root",...T,children:o})})}));A.displayName="Tooltip";const O=o.forwardRef((({children:o,asChild:t,...e},r)=>{const i=n(P);if(!i)throw new Error("TooltipTrigger must be used within a TooltipRoot component");const{isOpen:s,interactions:l,context:d}=i,{getReferenceProps:c}=l,p=j(o),f=T([d.refs.setReference,r,p]);return a(y,{asChild:t,ref:f,"data-slot":"tooltip-trigger","data-state":s?"open":"closed",...c(e),children:o})}));O.displayName="TooltipTrigger";const b=o.forwardRef((({children:o,showArrow:t=!0,container:e,...r},s)=>{const l=n(P),d=n(N);if(!l)throw new Error("TooltipContent must be used within a TooltipRoot component");const{isOpen:c,data:p,interactions:f,context:m}=l,u=l.arrowRef,g=T([m.refs.setFloating,s]);if(!c)return null;const{getFloatingProps:h}=f,w=e??d?.portalRootRef.current??d?.containerRef.current??void 0;return a(R,{root:w,children:a(C.div,{className:"rad-ui-tooltip-floating-element",ref:g,"data-slot":"tooltip-content","data-state":c?"open":"closed",style:{...p.floatingStyles},...h(r),children:i("div",{className:"rad-ui-tooltip-content-inner",children:[t&&a(x,{className:v("rad-ui-arrow"),ref:u,context:m,"data-slot":"tooltip-arrow"}),o]})})})}));b.displayName="TooltipContent";const B=o.forwardRef(((o,t)=>(console.warn("Direct usage of Tooltip is not supported. Please use Tooltip.Root, Tooltip.Trigger, etc. instead."),null)));B.displayName="Tooltip",B.Root=A,B.Trigger=O,B.Content=b;export{B as default};
@@ -6,6 +6,7 @@ type TreeRootProps = {
6
6
  customRootClass?: string;
7
7
  'aria-label'?: string;
8
8
  'aria-labelledby'?: string;
9
+ loop?: boolean;
9
10
  } & ComponentPropsWithoutRef<typeof Primitive.div>;
10
11
  declare const TreeRoot: React.ForwardRefExoticComponent<TreeRootProps & React.RefAttributes<HTMLElement>>;
11
12
 
@@ -1 +1 @@
1
- 'use client';import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{createContext as n,forwardRef as l,useRef as a,useImperativeHandle as o,useCallback as s,useId as i,useState as d,useContext as c,useEffect as m}from"react";import{R as u}from"./index-TYaYKM2M.js";import{P as f}from"./index-98jQ1vTr.js";import{c as p}from"./index-6If6D2Zi.js";import{c as h}from"./clsx-BaVHROc5.js";import{B as g}from"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";const R=n({rootClass:"",treeRef:{current:null},itemRefs:new Map,registerItemRef:()=>{},unregisterItemRef:()=>{}}),v="Tree",I=l((({children:r,className:t="",customRootClass:n="","aria-label":l,"aria-labelledby":i,...d},c)=>{const m=a(null);o(c,(()=>m.current));const g=p(n,v),I=a(new Map),b=s(((e,r)=>{I.current.set(e,r)}),[]),w=s((e=>{I.current.delete(e)}),[]),y={rootClass:g,treeRef:m,itemRefs:I.current,registerItemRef:b,unregisterItemRef:w};return e(R.Provider,{value:y,children:e(u.Root,{orientation:"vertical",mode:"tree",children:e(u.Group,{children:e(f.div,{className:h(g,t),ref:m,role:"tree","aria-label":l,"aria-labelledby":i,...d,children:r})})})})}));I.displayName=v;const b=l((({children:n,item:l,level:s=0,className:f="",parentId:p=null,isSelected:v=!1,onToggleSelect:I,getIsSelected:w,onChildRefReady:y,...x},N)=>{const C=i(),j=a(null);o(N,(()=>j.current));const T=Boolean(l?.items?.length),[k,S]=d((()=>Boolean(l?.expanded))),{rootClass:D,itemRefs:L,registerItemRef:B,unregisterItemRef:P}=c(R),$=a(null);m((()=>(B(C,j),()=>{P(C)})),[C,B,P]),m((()=>{y&&j.current&&y(j)}),[y]);const K=e=>{$.current=e.current};return r(t,{children:[e(u.Item,{handleRightKeyDown:()=>{T&&(k?$.current?.focus():S(!0))},handleLeftKeyDown:()=>{if(k)return void S(!1);if(!p)return;const e=L.get(p);e?.current&&e.current.focus(),S(!1)},role:"treeitem",children:r(g,{ref:j,className:h(`${D}-item`,f),onClick:()=>{I&&I(C,l),T&&S((e=>!e))},onKeyDownCapture:e=>{"Enter"===e.key&&(I&&I(C,l),e.preventDefault(),e.stopPropagation())},type:"button","data-selected":v,"aria-selected":v,"aria-expanded":T?k:void 0,"data-toggled":k,"data-has-children":T,"data-id":C,"data-parent-id":p,"data-level":s,...x,children:[e("span",{className:`${D}-item-chevron`,"aria-hidden":!0,children:T?e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",children:e("path",{d:"M4.5 2.5L7.5 6L4.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),e("span",{className:`${D}-item-label`,children:n})]})}),k&&l.items&&e("div",{className:`${D}-branch`,role:"group",children:l.items.map(((r,t)=>{const n=s+1,l=!!w&&w(r);return e(b,{parentId:C,level:n,item:r,isSelected:l,onToggleSelect:I,getIsSelected:w,onChildRefReady:0===t?K:void 0,children:r.label},r.label)}))})]})}));b.displayName="TreeItem";const w=l((({children:r,...t},n)=>(console.warn("Direct usage of Tree is not supported. Please use Tree.Root and Tree.Item instead."),e("div",{ref:n,...t,children:r}))));w.displayName="Tree",w.Root=I,w.Item=b;export{w as default};
1
+ 'use client';import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{createContext as o,forwardRef as n,useRef as a,useImperativeHandle as l,useCallback as s,useId as i,useState as d,useContext as c,useEffect as m}from"react";import{R as u}from"./index-m8Mhi26u.js";import{P as p}from"./index-XF8itt-H.js";import{u as f}from"./useComponentClass-QwNivz0h.js";import{c as h}from"./clsx-BaVHROc5.js";import{B as g}from"./index-CfC8-kd8.js";import{K as R}from"./keyboard-BKF7hXqL.js";import"./mergeRefs-B8eZ_q-T.js";import"./mergeProps-0RucjqeH.js";import"./ThemeContext-Sm-iNANd.js";const v=o({rootClass:"",treeRef:{current:null},itemRefs:new Map,registerItemRef:()=>{},unregisterItemRef:()=>{}}),b="Tree",I=n((({children:r,className:t="",customRootClass:o="","aria-label":n,"aria-labelledby":i,loop:d=!0,...c},m)=>{const g=a(null);l(m,(()=>g.current));const R=f(o,b),I=a(new Map),y=s(((e,r)=>{I.current.set(e,r)}),[]),w=s((e=>{I.current.delete(e)}),[]),C={rootClass:R,treeRef:g,itemRefs:I.current,registerItemRef:y,unregisterItemRef:w};return e(v.Provider,{value:C,children:e(u.Root,{orientation:"vertical",mode:"tree",loop:d,children:e(u.Group,{children:e(p.div,{className:h(R,t),ref:g,role:"tree","aria-label":n,"aria-labelledby":i,...c,children:r})})})})}));I.displayName=b;const y=n((({children:o,item:n,level:s=0,className:p="",parentId:f=null,isSelected:b=!1,onToggleSelect:I,getIsSelected:w,onChildRefReady:C,...j},x)=>{const N=i(),T=a(null);l(x,(()=>T.current));const k=Boolean(n?.items?.length),[S,D]=d((()=>Boolean(n?.expanded))),{rootClass:L,itemRefs:P,registerItemRef:B,unregisterItemRef:K}=c(v),$=a(null);m((()=>(B(N,T),()=>{K(N)})),[N,B,K]),m((()=>{C&&T.current&&C(T)}),[C]);const M=e=>{$.current=e.current};return r(t,{children:[e(u.Item,{handleRightKeyDown:()=>{k&&(S?$.current?.focus():D(!0))},handleLeftKeyDown:()=>{if(S)return void D(!1);if(!f)return;const e=P.get(f);e?.current&&e.current.focus(),D(!1)},role:"treeitem",children:r(g,{ref:T,className:h(L&&`${L}-item`,p),onClick:()=>{I&&I(N,n),k&&D((e=>!e))},onKeyDownCapture:e=>{e.key===R.ENTER&&(I&&I(N,n),e.preventDefault(),e.stopPropagation())},type:"button","data-selected":b,"aria-selected":b,"aria-expanded":k?S:void 0,"data-toggled":S,"data-has-children":k,"data-id":N,"data-parent-id":f,"data-level":s,...j,children:[e("span",{className:L?`${L}-item-chevron`:void 0,"aria-hidden":!0,children:k?e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",children:e("path",{d:"M4.5 2.5L7.5 6L4.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),e("span",{className:L?`${L}-item-label`:void 0,children:o})]})}),S&&n.items&&e("div",{className:L?`${L}-branch`:void 0,role:"group",children:n.items.map(((r,t)=>{const o=s+1,n=!!w&&w(r);return e(y,{parentId:N,level:o,item:r,isSelected:n,onToggleSelect:I,getIsSelected:w,onChildRefReady:0===t?M:void 0,children:r.label},r.label)}))})]})}));y.displayName="TreeItem";const w=n((({children:r,...t},o)=>(console.warn("Direct usage of Tree is not supported. Please use Tree.Root and Tree.Item instead."),e("div",{ref:o,...t,children:r}))));w.displayName="Tree",w.Root=I,w.Item=y;export{w as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import{forwardRef as t}from"react";import{P as r}from"./index-98jQ1vTr.js";import{c as s}from"./index-6If6D2Zi.js";import{c as i}from"./clsx-BaVHROc5.js";const o="VisuallyHidden",a={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",pointerEvents:"none",userSelect:"none"},n=t((({children:t,customRootClass:n,className:c,style:l={},...p},m)=>{const d=s(n,o);return e(r.div,{ref:m,className:i(d,c),style:{...a,...l},...p,children:t})}));n.displayName=o;export{n as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{forwardRef as s}from"react";import{P as t}from"./index-XF8itt-H.js";import{u as o}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import"./mergeProps-0RucjqeH.js";import"./ThemeContext-Sm-iNANd.js";const i="VisuallyHidden",a={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",pointerEvents:"none",userSelect:"none"},n=s((({children:s,customRootClass:n,className:m,style:p={},...l},c)=>{const d=o(n,i);return e(t.div,{ref:c,className:r(d,m),style:{...a,...p},...l,children:s})}));n.displayName=i;export{n as default};
@@ -0,0 +1 @@
1
+ 'use client';const e="data-rad-ui-overlay-open";let t=0;const n=new Set;function o(){n.forEach((e=>e()))}function u(){if("undefined"==typeof document)return;const n=document.documentElement;t>0?n.setAttribute(e,""):n.removeAttribute(e)}function d(){return"undefined"!=typeof document&&(t>0||document.documentElement.hasAttribute(e)||"undefined"!=typeof document&&"hidden"===document.body.style.overflow)}function r(){t+=1,u(),o();let e=!1;return()=>{e||(e=!0,t=Math.max(0,t-1),u(),o())}}function c(e){return n.add(e),()=>{n.delete(e)}}export{e as D,d as i,r,c as s};
@@ -0,0 +1,5 @@
1
+ 'use client';import*as e from"react";import{useLayoutEffect as t}from"react";import{jsx as n,jsxs as r,Fragment as o}from"react/jsx-runtime";import*as i from"react-dom";function u(){return"undefined"!=typeof window}function l(e){return a(e)?(e.nodeName||"").toLowerCase():"#document"}function c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(a(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function a(e){return!!u()&&(e instanceof Node||e instanceof c(e).Node)}function f(e){return!!u()&&(e instanceof Element||e instanceof c(e).Element)}function d(e){return!!u()&&(e instanceof HTMLElement||e instanceof c(e).HTMLElement)}function m(e){return!(!u()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof c(e).ShadowRoot)}const p=new Set(["inline","contents"]);function v(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=S(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!p.has(o)}const g=new Set(["table","td","th"]);function h(e){return g.has(l(e))}const y=[":popover-open",":modal"];function w(e){return y.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const b=["transform","translate","scale","rotate","perspective"],x=["transform","translate","scale","rotate","perspective","filter"],R=["paint","layout","strict","content"];function E(e){const t=k(),n=f(e)?S(e):e;return b.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||x.some((e=>(n.willChange||"").includes(e)))||R.some((e=>(n.contain||"").includes(e)))}function k(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const I=new Set(["html","body","#document"]);function C(e){return I.has(l(e))}function S(e){return c(e).getComputedStyle(e)}function A(e){return f(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function L(e){if("html"===l(e))return e;const t=e.assignedSlot||e.parentNode||m(e)&&e.host||s(e);return m(t)?t.host:t}function M(e){const t=L(e);return C(t)?e.ownerDocument?e.ownerDocument.body:e.body:d(t)&&v(t)?t:M(t)}function T(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=M(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),u=c(o);if(i){const e=O(u);return t.concat(u,u.visualViewport||[],v(o)?o:[],e&&n?T(e):[])}return t.concat(o,T(o,[],n))}function O(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const D=["top","right","bottom","left"],P=Math.min,N=Math.max,F=Math.round,W=Math.floor,B=e=>({x:e,y:e}),_={left:"right",right:"left",bottom:"top",top:"bottom"},H={start:"end",end:"start"};function K(e,t,n){return N(e,P(t,n))}function V(e,t){return"function"==typeof e?e(t):e}function q(e){return e.split("-")[0]}function z(e){return e.split("-")[1]}function j(e){return"x"===e?"y":"x"}function U(e){return"y"===e?"height":"width"}const X=new Set(["top","bottom"]);function Y(e){return X.has(q(e))?"y":"x"}function $(e){return j(Y(e))}function G(e){return e.replace(/start|end/g,(e=>H[e]))}const Q=["left","right"],Z=["right","left"],J=["top","bottom"],ee=["bottom","top"];function te(e,t,n,r){const o=z(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Z:Q:t?Q:Z;case"left":case"right":return t?J:ee;default:return[]}}(q(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(G)))),i}function ne(e){return e.replace(/left|right|bottom|top/g,(e=>_[e]))}function re(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function oe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
2
+ /*!
3
+ * tabbable 6.2.0
4
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
+ */var ie=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),ue="undefined"==typeof Element,le=ue?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ce=!ue&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},se=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},ae=function(e,t,n){if(se(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ie));return t&&le.call(e,ie)&&r.unshift(e),r=r.filter(n)},fe=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var u=i.shift();if(!se(u,!1))if("SLOT"===u.tagName){var l=u.assignedElements(),c=e(l.length?l:u.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:u,candidates:c})}else{le.call(u,ie)&&r.filter(u)&&(n||!t.includes(u))&&o.push(u);var s=u.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(u),a=!se(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(u));if(s&&a){var f=e(!0===s?u.children:s.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:u,candidates:f})}else i.unshift.apply(i,u.children)}}return o},de=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},me=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!de(e)?0:e.tabIndex},pe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ve=function(e){return"INPUT"===e.tagName},ge=function(e){return function(e){return ve(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||ce(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},he=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},ye=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=le.call(e,"details>summary:first-of-type")?e.parentElement:e;if(le.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return he(e)}else{if("function"==typeof r){for(var i=e;e;){var u=e.parentElement,l=ce(e);if(u&&!u.shadowRoot&&!0===r(u))return he(e);e=e.assignedSlot?e.assignedSlot:u||l===e.ownerDocument?u:l.host}e=i}if(function(e){var t,n,r,o,i=e&&ce(e),u=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=u)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(u)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&u;){var c,s,a;l=!(null===(s=u=null===(c=i=ce(u))||void 0===c?void 0:c.host)||void 0===s||null===(a=s.ownerDocument)||void 0===a||!a.contains(u))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},we=function(e,t){return!(t.disabled||se(t)||function(e){return ve(e)&&"hidden"===e.type}(t)||ye(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!le.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},be=function(e,t){return!(ge(t)||me(t)<0||!we(e,t))},xe=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Re=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,u=i?t.scopeParent:t,l=function(e,t){var n=me(e);return n<0&&t&&!de(e)?0:n}(u,i),c=i?e(t.candidates):u;0===l?i?n.push.apply(n,c):n.push(u):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:c})})),r.sort(pe).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Ee=function(e,t){var n;return n=(t=t||{}).getShadowRoot?fe([e],t.includeContainer,{filter:be.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:xe}):ae(e,t.includeContainer,be.bind(null,t)),Re(n)},ke=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==le.call(e,ie)&&be(t,e)};function Ie(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Ce(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function Se(){return/apple/i.test(navigator.vendor)}function Ae(){const e=/android/i;return e.test(Ie())||e.test(Ce())}function Le(){return Ce().includes("jsdom/")}const Me="data-floating-ui-focusable",Te="ArrowLeft",Oe="ArrowRight";function De(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Pe(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&m(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ne(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fe(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function We(e){return(null==e?void 0:e.ownerDocument)||document}function Be(e){return d(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function _e(e){return!!e&&("combobox"===e.getAttribute("role")&&Be(e))}function He(e){return e?e.hasAttribute(Me)?e:e.querySelector("["+Me+"]")||e:null}function Ke(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Ke(e,t.id,n)]))}function Ve(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function qe(e){e.preventDefault(),e.stopPropagation()}function ze(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Ae()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function je(e){return!Le()&&(!Ae()&&0===e.width&&0===e.height||Ae()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Ue(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var Xe="undefined"!=typeof document?t:function(){};function Ye(t){const n=e.useRef(t);return Xe((()=>{n.current=t})),n}const $e={...e}.useInsertionEffect||(e=>e());function Ge(t){const n=e.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return $e((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}function Qe(e,t,n){return Math.floor(e/t)!==n}function Ze(e,t){return t<0||t>=e.current.length}function Je(e,t){return tt(e,{disabledIndices:t})}function et(e,t){return tt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t,u=n;do{u+=r?-i:i}while(u>=0&&u<=e.current.length-1&&ut(e,u,o));return u}function nt(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:u,disabledIndices:l,minIndex:c,maxIndex:s,prevIndex:a,stopEvent:f=!1}=t,d=a;if("ArrowUp"===n.key){if(f&&qe(n),-1===a)d=s;else if(d=tt(e,{startingIndex:d,amount:u,decrement:!0,disabledIndices:l}),o&&(a-u<c||d<0)){const e=a%u,t=s%u,n=s-(t-e);d=t===e?s:t>e?n:n-u}Ze(e,d)&&(d=a)}if("ArrowDown"===n.key&&(f&&qe(n),-1===a?d=c:(d=tt(e,{startingIndex:a,amount:u,disabledIndices:l}),o&&a+u>s&&(d=tt(e,{startingIndex:a%u-u,amount:u,disabledIndices:l}))),Ze(e,d)&&(d=a)),"both"===r){const t=W(a/u);n.key===(i?Te:Oe)&&(f&&qe(n),a%u!=u-1?(d=tt(e,{startingIndex:a,disabledIndices:l}),o&&Qe(d,u,t)&&(d=tt(e,{startingIndex:a-a%u-1,disabledIndices:l}))):o&&(d=tt(e,{startingIndex:a-a%u-1,disabledIndices:l})),Qe(d,u,t)&&(d=a)),n.key===(i?Oe:Te)&&(f&&qe(n),a%u!=0?(d=tt(e,{startingIndex:a,decrement:!0,disabledIndices:l}),o&&Qe(d,u,t)&&(d=tt(e,{startingIndex:a+(u-a%u),decrement:!0,disabledIndices:l}))):o&&(d=tt(e,{startingIndex:a+(u-a%u),decrement:!0,disabledIndices:l})),Qe(d,u,t)&&(d=a));const r=W(s/u)===t;Ze(e,d)&&(d=o&&r?n.key===(i?Oe:Te)?s:tt(e,{startingIndex:a-a%u-1,disabledIndices:l}):a)}return d}function rt(e,t,n){const r=[];let o=0;return e.forEach(((e,i)=>{let{width:u,height:l}=e;if(u>t&&"production"!==process.env.NODE_ENV)throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const e=[];for(let n=0;n<u;n++)for(let r=0;r<l;r++)e.push(o+n+r*t);o%t+u<=t&&e.every((e=>null==r[e]))?(e.forEach((e=>{r[e]=i})),c=!0):o++}})),[...r]}function ot(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),u=t[e];switch(o){case"tl":return i;case"tr":return u?i+u.width-1:i;case"bl":return u?i+(u.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function it(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}function ut(e,t,n){if("function"==typeof n)return n(t);if(n)return n.includes(t);const r=e.current[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}const lt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ct(e,t){const n=Ee(e,lt()),r=n.length;if(0===r)return;const o=De(We(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function st(e){return ct(We(e).body,1)||e}function at(e){return ct(We(e).body,-1)||e}function ft(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Pe(n,r)}function dt(e){Ee(e,lt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function mt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}function pt(e,t,n){let{reference:r,floating:o}=e;const i=Y(t),u=$(t),l=U(u),c=q(t),s="y"===i,a=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let m;switch(c){case"top":m={x:a,y:r.y-o.height};break;case"bottom":m={x:a,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(z(t)){case"start":m[u]-=d*(n&&s?-1:1);break;case"end":m[u]+=d*(n&&s?-1:1)}return m}async function vt(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:u,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:d=!1,padding:m=0}=V(t,e),p=re(m),v=l[d?"floating"===f?"reference":"floating":f],g=oe(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:a,strategy:c})),h="floating"===f?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=oe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:y,strategy:c}):h);return{top:(g.top-b.top+p.top)/w.y,bottom:(b.bottom-g.bottom+p.bottom)/w.y,left:(g.left-b.left+p.left)/w.x,right:(b.right-g.right+p.right)/w.x}}function gt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ht(e){return D.some((t=>e[t]>=0))}const yt=new Set(["left","top"]);function wt(e){const t=S(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=d(e),i=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=F(n)!==i||F(r)!==u;return l&&(n=i,r=u),{width:n,height:r,$:l}}function bt(e){return f(e)?e:e.contextElement}function xt(e){const t=bt(e);if(!d(t))return B(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wt(t);let u=(i?F(n.width):n.width)/r,l=(i?F(n.height):n.height)/o;return u&&Number.isFinite(u)||(u=1),l&&Number.isFinite(l)||(l=1),{x:u,y:l}}const Rt=B(0);function Et(e){const t=c(e);return k()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Rt}function kt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=bt(e);let u=B(1);t&&(r?f(r)&&(u=xt(r)):u=xt(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==c(e))&&t}(i,n,r)?Et(i):B(0);let s=(o.left+l.x)/u.x,a=(o.top+l.y)/u.y,d=o.width/u.x,m=o.height/u.y;if(i){const e=c(i),t=r&&f(r)?c(r):r;let n=e,o=O(n);for(;o&&r&&t!==n;){const e=xt(o),t=o.getBoundingClientRect(),r=S(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,u=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,a*=e.y,d*=e.x,m*=e.y,s+=i,a+=u,n=c(o),o=O(n)}}return oe({width:d,height:m,x:s,y:a})}function It(e,t){const n=A(e).scrollLeft;return t?t.left+n:kt(s(e)).left+n}function Ct(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-It(e,n),y:n.top+t.scrollTop}}const St=new Set(["absolute","fixed"]);function At(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=c(e),r=s(e),o=n.visualViewport;let i=r.clientWidth,u=r.clientHeight,l=0,a=0;if(o){i=o.width,u=o.height;const e=k();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,a=o.offsetTop)}const f=It(r);if(f<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,u=Math.abs(r.clientWidth-t.clientWidth-o);u<=25&&(i-=u)}else f<=25&&(i+=f);return{width:i,height:u,x:l,y:a}}(e,n);else if("document"===t)r=function(e){const t=s(e),n=A(e),r=e.ownerDocument.body,o=N(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=N(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+It(e);const l=-n.scrollTop;return"rtl"===S(r).direction&&(u+=N(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:u,y:l}}(s(e));else if(f(t))r=function(e,t){const n=kt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=d(e)?xt(e):B(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Et(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return oe(r)}function Lt(e,t){const n=L(e);return!(n===t||!f(n)||C(n))&&("fixed"===S(n).position||Lt(n,t))}function Mt(e,t,n){const r=d(t),o=s(t),i="fixed"===n,u=kt(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const a=B(0);function f(){a.x=It(o)}if(r||!r&&!i)if(("body"!==l(t)||v(o))&&(c=A(t)),r){const e=kt(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&f();i&&!r&&o&&f();const m=!o||r||i?B(0):Ct(o,c);return{x:u.left+c.scrollLeft-a.x-m.x,y:u.top+c.scrollTop-a.y-m.y,width:u.width,height:u.height}}function Tt(e){return"static"===S(e).position}function Ot(e,t){if(!d(e)||"fixed"===S(e).position)return null;if(t)return t(e);let n=e.offsetParent;return s(e)===n&&(n=n.ownerDocument.body),n}function Dt(e,t){const n=c(e);if(w(e))return n;if(!d(e)){let t=L(e);for(;t&&!C(t);){if(f(t)&&!Tt(t))return t;t=L(t)}return n}let r=Ot(e,t);for(;r&&h(r)&&Tt(r);)r=Ot(r,t);return r&&C(r)&&Tt(r)&&!E(r)?n:r||function(e){let t=L(e);for(;d(t)&&!C(t);){if(E(t))return t;if(w(t))return null;t=L(t)}return null}(e)||n}const Pt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,u=s(r),c=!!t&&w(t.floating);if(r===u||c&&i)return n;let a={scrollLeft:0,scrollTop:0},f=B(1);const m=B(0),p=d(r);if((p||!p&&!i)&&(("body"!==l(r)||v(u))&&(a=A(r)),d(r))){const e=kt(r);f=xt(r),m.x=e.x+r.clientLeft,m.y=e.y+r.clientTop}const g=!u||p||i?B(0):Ct(u,a);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+m.x+g.x,y:n.y*f.y-a.scrollTop*f.y+m.y+g.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?w(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=T(e,[],!1).filter((e=>f(e)&&"body"!==l(e))),o=null;const i="fixed"===S(e).position;let u=i?L(e):e;for(;f(u)&&!C(u);){const t=S(u),n=E(u);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&St.has(o.position)||v(u)&&!n&&Lt(e,u))?r=r.filter((e=>e!==u)):o=t,u=L(u)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=i[0],c=i.reduce(((e,n)=>{const r=At(t,n,o);return e.top=N(r.top,e.top),e.right=P(r.right,e.right),e.bottom=P(r.bottom,e.bottom),e.left=N(r.left,e.left),e}),At(t,u,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:Dt,getElementRects:async function(e){const t=this.getOffsetParent||Dt,n=this.getDimensions,r=await n(e.floating);return{reference:Mt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=wt(e);return{width:t,height:n}},getScale:xt,isElement:f,isRTL:function(e){return"rtl"===S(e).direction}};function Nt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ft(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,a=bt(e),f=o||i?[...a?T(a):[],...T(t)]:[];f.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=a&&l?function(e,t){let n,r=null;const o=s(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function u(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),i();const s=e.getBoundingClientRect(),{left:a,top:f,width:d,height:m}=s;if(l||t(),!d||!m)return;const p={rootMargin:-W(f)+"px "+-W(o.clientWidth-(a+d))+"px "+-W(o.clientHeight-(f+m))+"px "+-W(a)+"px",threshold:N(0,P(1,c))||1};let v=!0;function g(t){const r=t[0].intersectionRatio;if(r!==c){if(!v)return u();r?u(!1,r):n=setTimeout((()=>{u(!1,1e-7)}),1e3)}1!==r||Nt(s,e.getBoundingClientRect())||u(),v=!1}try{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),i}(a,n):null;let m,p=-1,v=null;u&&(v=new ResizeObserver((e=>{let[r]=e;r&&r.target===a&&v&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=v)||e.observe(t)}))),n()})),a&&!c&&v.observe(a),v.observe(t));let g=c?kt(e):null;return c&&function t(){const r=kt(e);g&&!Nt(g,r)&&n();g=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=v)||e.disconnect(),v=null,c&&cancelAnimationFrame(m)}}const Wt=vt,Bt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:u,middlewareData:l}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),u=q(n),l=z(n),c="y"===Y(n),s=yt.has(u)?-1:1,a=i&&c?-1:1,f=V(t,e);let{mainAxis:d,crossAxis:m,alignmentAxis:p}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof p&&(m="end"===l?-1*p:p),c?{x:m*a,y:d*s}:{x:d*s,y:m*a}}(t,e);return u===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:u}}}}},_t=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:u=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=V(e,t),s={x:n,y:r},a=await vt(t,c),f=Y(q(o)),d=j(f);let m=s[d],p=s[f];if(i){const e="y"===d?"bottom":"right";m=K(m+a["y"===d?"top":"left"],m,m-a[e])}if(u){const e="y"===f?"bottom":"right";p=K(p+a["y"===f?"top":"left"],p,p-a[e])}const v=l.fn({...t,[d]:m,[f]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[d]:i,[f]:u}}}}}},Ht=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:u,initialPlacement:l,platform:c,elements:s}=t,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...g}=V(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const h=q(o),y=Y(l),w=q(l)===l,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),x=d||(w||!v?[ne(l)]:function(e){const t=ne(e);return[G(e),t,G(t)]}(l)),R="none"!==p;!d&&R&&x.push(...te(l,v,p,b));const E=[l,...x],k=await vt(t,g),I=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(a&&I.push(k[h]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=z(e),o=$(e),i=U(o);let u="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(u=ne(u)),[u,ne(u)]}(o,u,b);I.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:o,overflows:I}],!I.every((e=>e<=0))){var S,A;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=E[e];if(t){if(!("alignment"===f&&y!==Y(t))||C.every((e=>Y(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:C},reset:{placement:t}}}let n=null==(A=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(m){case"bestFit":{var L;const e=null==(L=C.filter((e=>{if(R){const t=Y(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:L[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Kt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:u,elements:l}=t,{apply:c=()=>{},...s}=V(e,t),a=await vt(t,s),f=q(o),d=z(o),m="y"===Y(o),{width:p,height:v}=i.floating;let g,h;"top"===f||"bottom"===f?(g=f,h=d===(await(null==u.isRTL?void 0:u.isRTL(l.floating))?"start":"end")?"left":"right"):(h=f,g="end"===d?"top":"bottom");const y=v-a.top-a.bottom,w=p-a.left-a.right,b=P(v-a[g],y),x=P(p-a[h],w),R=!t.middlewareData.shift;let E=b,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),R&&!d){const e=N(a.left,0),t=N(a.right,0),n=N(a.top,0),r=N(a.bottom,0);m?k=p-2*(0!==e||0!==t?e+t:N(a.left,a.right)):E=v-2*(0!==n||0!==r?n+r:N(a.top,a.bottom))}await c({...t,availableWidth:k,availableHeight:E});const I=await u.getDimensions(l.floating);return p!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}},Vt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=V(e,t);switch(r){case"referenceHidden":{const e=gt(await vt(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ht(e)}}}case"escaped":{const e=gt(await vt(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ht(e)}}}default:return{}}}}},qt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:u,elements:l,middlewareData:c}=t,{element:s,padding:a=0}=V(e,t)||{};if(null==s)return{};const f=re(a),d={x:n,y:r},m=$(o),p=U(m),v=await u.getDimensions(s),g="y"===m,h=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[m]-d[m]-i.floating[p],x=d[m]-i.reference[m],R=await(null==u.getOffsetParent?void 0:u.getOffsetParent(s));let E=R?R[w]:0;E&&await(null==u.isElement?void 0:u.isElement(R))||(E=l.floating[w]||i.floating[p]);const k=b/2-x/2,I=E/2-v[p]/2-1,C=P(f[h],I),S=P(f[y],I),A=C,L=E-v[p]-S,M=E/2-v[p]/2+k,T=K(A,M,L),O=!c.arrow&&null!=z(o)&&M!==T&&i.reference[p]/2-(M<A?C:S)-v[p]/2<0,D=O?M<A?M-A:M-L:0;return{[m]:d[m]+D,data:{[m]:T,centerOffset:M-T-D,...O&&{alignmentOffset:D}},reset:O}}}),zt=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:u}=t,{offset:l=0,mainAxis:c=!0,crossAxis:s=!0}=V(e,t),a={x:n,y:r},f=Y(o),d=j(f);let m=a[d],p=a[f];const v=V(l,t),g="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;m<t?m=t:m>n&&(m=n)}if(s){var h,y;const e="y"===d?"width":"height",t=yt.has(q(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(h=u.offset)?void 0:h[f])||0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(y=u.offset)?void 0:y[f])||0)-(t?g.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[d]:m,[f]:p}}}},jt=(e,t,n)=>{const r=new Map,o={platform:Pt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:u}=n,l=i.filter(Boolean),c=await(null==u.isRTL?void 0:u.isRTL(t));let s=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:a,y:f}=pt(s,r,c),d=r,m={},p=0;for(let n=0;n<l.length;n++){const{name:i,fn:v}=l[n],{x:g,y:h,data:y,reset:w}=await v({x:a,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:s,platform:u,elements:{reference:e,floating:t}});a=null!=g?g:a,f=null!=h?h:f,m={...m,[i]:{...m[i],...y}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await u.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:a,y:f}=pt(s,d,c))),n=-1)}return{x:a,y:f,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var Ut="undefined"!=typeof document?t:function(){};function Xt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Xt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Xt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Yt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $t(e,t){const n=Yt(e);return Math.round(t*n)/n}function Gt(t){const n=e.useRef(t);return Ut((()=>{n.current=t})),n}const Qt=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?qt({element:n.current,padding:r}).fn(t):{}:n?qt({element:n,padding:r}).fn(t):{};var o}}),Zt=(e,t)=>({...Bt(e),options:[e,t]}),Jt=(e,t)=>({..._t(e),options:[e,t]}),en=(e,t)=>({...zt(e),options:[e,t]}),tn=(e,t)=>({...Ht(e),options:[e,t]}),nn=(e,t)=>({...Kt(e),options:[e,t]}),rn=(e,t)=>({...Vt(e),options:[e,t]}),on=(e,t)=>({...Qt(e),options:[e,t]});function un(t){const n=e.useRef(void 0),r=e.useCallback((e=>{const n=t.map((t=>{if(null!=t){if("function"==typeof t){const n=t,r=n(e);return"function"==typeof r?r:()=>{n(null)}}return t.current=e,()=>{t.current=null}}}));return()=>{n.forEach((e=>null==e?void 0:e()))}}),t);return e.useMemo((()=>t.every((e=>null==e))?null:e=>{n.current&&(n.current(),n.current=void 0),null!=e&&(n.current=r(e))}),t)}function ln(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const cn=e.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function sn(t){const{children:r,elementsRef:o,labelsRef:i}=t,[u,l]=e.useState((()=>new Set)),c=e.useCallback((e=>{l((t=>new Set(t).add(e)))}),[]),s=e.useCallback((e=>{l((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),a=e.useMemo((()=>{const e=new Map;return Array.from(u.keys()).sort(ln).forEach(((t,n)=>{e.set(t,n)})),e}),[u]);return n(cn.Provider,{value:e.useMemo((()=>({register:c,unregister:s,map:a,elementsRef:o,labelsRef:i})),[c,s,a,o,i]),children:r})}function an(t){void 0===t&&(t={});const{label:n}=t,{register:r,unregister:o,map:i,elementsRef:u,labelsRef:l}=e.useContext(cn),[c,s]=e.useState(null),a=e.useRef(null),f=e.useCallback((e=>{if(a.current=e,null!==c&&(u.current[c]=e,l)){var t;const r=void 0!==n;l.current[c]=r?n:null!=(t=null==e?void 0:e.textContent)?t:null}}),[c,u,l,n]);return Xe((()=>{const e=a.current;if(e)return r(e),()=>{o(e)}}),[r,o]),Xe((()=>{const e=a.current?i.get(a.current):null;null!=e&&s(e)}),[i]),e.useMemo((()=>({ref:f,index:null==c?-1:c})),[c,f])}const fn="data-floating-ui-focusable",dn="active",mn="selected",pn="ArrowLeft",vn="ArrowRight",gn="ArrowUp",hn="ArrowDown";function yn(t,r){return"function"==typeof t?t(r):t?e.cloneElement(t,r):n("div",{...r})}const wn=e.createContext({activeIndex:0,onNavigate:()=>{}}),bn=[pn,vn],xn=[gn,hn],Rn=[...bn,...xn],En=e.forwardRef((function(t,r){const{render:o,orientation:i="both",loop:u=!0,rtl:l=!1,cols:c=1,disabledIndices:s,activeIndex:a,onNavigate:f,itemSizes:d,dense:m=!1,...p}=t,[v,g]=e.useState(0),h=null!=a?a:v,y=Ge(null!=f?f:g),w=e.useRef([]),b=o&&"function"!=typeof o?o.props:{},x=e.useMemo((()=>({activeIndex:h,onNavigate:y})),[h,y]),R=c>1;const E={...p,...b,ref:r,"aria-orientation":"both"===i?void 0:i,onKeyDown(e){null==p.onKeyDown||p.onKeyDown(e),null==b.onKeyDown||b.onKeyDown(e),function(e){if(!Rn.includes(e.key))return;let t=h;const n=Je(w,s),r=et(w,s),o=l?pn:vn,a=l?vn:pn;if(R){const a=d||Array.from({length:w.current.length},(()=>({width:1,height:1}))),f=rt(a,c,m),p=f.findIndex((e=>null!=e&&!ut(w,e,s))),v=f.reduce(((e,t,n)=>null==t||ut(w,t,s)?e:n),-1),g=f[nt({current:f.map((e=>e?w.current[e]:null))},{event:e,orientation:i,loop:u,rtl:l,cols:c,disabledIndices:it([...("function"!=typeof s?s:null)||w.current.map(((e,t)=>ut(w,t,s)?t:void 0)),void 0],f),minIndex:p,maxIndex:v,prevIndex:ot(h>r?n:h,a,f,c,e.key===hn?"bl":e.key===o?"tr":"tl")})];null!=g&&(t=g)}const f={horizontal:[o],vertical:[hn],both:[o,hn]}[i],p={horizontal:[a],vertical:[gn],both:[a,gn]}[i],v=R?Rn:{horizontal:bn,vertical:xn,both:Rn}[i];var g;t===h&&[...f,...p].includes(e.key)&&(t=u&&t===r&&f.includes(e.key)?n:u&&t===n&&p.includes(e.key)?r:tt(w,{startingIndex:t,decrement:p.includes(e.key),disabledIndices:s})),t===h||Ze(w,t)||(e.stopPropagation(),v.includes(e.key)&&e.preventDefault(),y(t),null==(g=w.current[t])||g.focus())}(e)}};return n(wn.Provider,{value:x,children:n(sn,{elementsRef:w,children:yn(o,E)})})})),kn=e.forwardRef((function(t,n){const{render:r,...o}=t,i=r&&"function"!=typeof r?r.props:{},{activeIndex:u,onNavigate:l}=e.useContext(wn),{ref:c,index:s}=an(),a=un([c,n,i.ref]),f=u===s;return yn(r,{...o,...i,ref:a,tabIndex:f?0:-1,"data-active":f?"":void 0,onFocus(e){null==o.onFocus||o.onFocus(e),null==i.onFocus||i.onFocus(e),l(s)}})})),In={...e};let Cn=!1,Sn=0;const An=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Sn++;const Ln=In.useId||function(){const[t,n]=e.useState((()=>Cn?An():void 0));return Xe((()=>{null==t&&n(An())}),[]),e.useEffect((()=>{Cn=!0}),[]),t};let Mn;function Tn(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Mn)&&e.has(o)||(null==(i=Mn)||i.add(o),console.warn(o))}"production"!==process.env.NODE_ENV&&(Mn=new Set);const On=e.forwardRef((function(t,o){const{context:{placement:i,elements:{floating:u},middlewareData:{arrow:l,shift:c}},width:s=14,height:a=7,tipRadius:f=0,strokeWidth:d=0,staticOffset:m,stroke:p,d:v,style:{transform:g,...h}={},...y}=t;"production"!==process.env.NODE_ENV&&(o||Tn("The `ref` prop is required for `FloatingArrow`."));const w=Ln(),[b,x]=e.useState(!1);if(Xe((()=>{if(!u)return;"rtl"===S(u).direction&&x(!0)}),[u]),!u)return null;const[R,E]=i.split("-"),k="top"===R||"bottom"===R;let I=m;(k&&null!=c&&c.x||!k&&null!=c&&c.y)&&(I=null);const C=2*d,A=C/2,L=s/2*(f/-8+1),M=a/2*f/4,T=!!v,O=I&&"end"===E?"bottom":"top";let D=I&&"end"===E?"right":"left";I&&b&&(D="end"===E?"left":"right");const P=null!=(null==l?void 0:l.x)?I||l.x:"",N=null!=(null==l?void 0:l.y)?I||l.y:"",F=v||"M0,0 H"+s+" L"+(s-L)+","+(a-M)+" Q"+s/2+","+a+" "+L+","+(a-M)+" Z",W={top:T?"rotate(180deg)":"",left:T?"rotate(90deg)":"rotate(-90deg)",bottom:T?"":"rotate(180deg)",right:T?"rotate(-90deg)":"rotate(90deg)"}[R];return r("svg",{...y,"aria-hidden":!0,ref:o,width:T?s:s+C,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[D]:P,[O]:N,[R]:k||T?"100%":"calc(100% - "+C/2+"px)",transform:[W,g].filter((e=>!!e)).join(" "),...h},children:[C>0&&n("path",{clipPath:"url(#"+w+")",fill:"none",stroke:p,strokeWidth:C+(v?0:1),d:F}),n("path",{stroke:C&&!v?y.fill:"none",d:F}),n("clipPath",{id:w,children:n("rect",{x:-A,y:A*(T?-1:1),width:s+C,height:s})})]})}));function Dn(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}const Pn=e.createContext(null),Nn=e.createContext(null),Fn=()=>{var t;return(null==(t=e.useContext(Pn))?void 0:t.id)||null},Wn=()=>e.useContext(Nn);function Bn(e){const t=Ln(),n=Wn(),r=Fn(),o=e||r;return Xe((()=>{if(!t)return;const e={id:t,parentId:o};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}}),[n,t,o]),t}function _n(t){const{children:r,id:o}=t,i=Fn();return n(Pn.Provider,{value:e.useMemo((()=>({id:o,parentId:i})),[o,i]),children:r})}function Hn(t){const{children:r}=t,o=e.useRef([]),i=e.useCallback((e=>{o.current=[...o.current,e]}),[]),u=e.useCallback((e=>{o.current=o.current.filter((t=>t!==e))}),[]),[l]=e.useState((()=>Dn()));return n(Nn.Provider,{value:e.useMemo((()=>({nodesRef:o,addNode:i,removeNode:u,events:l})),[i,u,l]),children:r})}function Kn(e){return"data-floating-ui-"+e}function Vn(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const qn=Kn("safe-polygon");function zn(e,t,n){if(n&&!Ue(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function jn(e){return"function"==typeof e?e():e}function Un(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,events:u,elements:l}=t,{enabled:c=!0,delay:s=0,handleClose:a=null,mouseOnly:d=!1,restMs:m=0,move:p=!0}=n,v=Wn(),g=Fn(),h=Ye(a),y=Ye(s),w=Ye(r),b=Ye(m),x=e.useRef(),R=e.useRef(-1),E=e.useRef(),k=e.useRef(-1),I=e.useRef(!0),C=e.useRef(!1),S=e.useRef((()=>{})),A=e.useRef(!1),L=Ge((()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}));e.useEffect((()=>{if(c)return u.on("openchange",e),()=>{u.off("openchange",e)};function e(e){let{open:t}=e;t||(Vn(R),Vn(k),I.current=!0,A.current=!1)}}),[c,u]),e.useEffect((()=>{if(!c)return;if(!h.current)return;if(!r)return;function e(e){L()&&o(!1,e,"hover")}const t=We(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[l.floating,r,o,c,h,L]);const M=e.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=zn(y.current,"close",x.current);r&&!E.current?(Vn(R),R.current=window.setTimeout((()=>o(!1,e,n)),r)):t&&(Vn(R),o(!1,e,n))}),[y,o]),T=Ge((()=>{S.current(),E.current=void 0})),O=Ge((()=>{if(C.current){const e=We(l.floating).body;e.style.pointerEvents="",e.removeAttribute(qn),C.current=!1}})),D=Ge((()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)));e.useEffect((()=>{if(c&&f(l.domReference)){const o=l.domReference,i=l.floating;return r&&o.addEventListener("mouseleave",n),p&&o.addEventListener("mousemove",e,{once:!0}),o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),i&&(i.addEventListener("mouseleave",n),i.addEventListener("mouseenter",u),i.addEventListener("mouseleave",s)),()=>{r&&o.removeEventListener("mouseleave",n),p&&o.removeEventListener("mousemove",e),o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),i&&(i.removeEventListener("mouseleave",n),i.removeEventListener("mouseenter",u),i.removeEventListener("mouseleave",s))}}function e(e){if(Vn(R),I.current=!1,d&&!Ue(x.current)||jn(b.current)>0&&!zn(y.current,"open"))return;const t=zn(y.current,"open",x.current);t?R.current=window.setTimeout((()=>{w.current||o(!0,e,"hover")}),t):r||o(!0,e,"hover")}function t(e){if(D())return void O();S.current();const t=We(l.floating);if(Vn(k),A.current=!1,h.current&&i.current.floatingContext){r||Vn(R),E.current=h.current({...i.current.floatingContext,tree:v,x:e.clientX,y:e.clientY,onClose(){O(),T(),D()||M(e,!0,"safe-polygon")}});const n=E.current;return t.addEventListener("mousemove",n),void(S.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==x.current||!Pe(l.floating,e.relatedTarget))&&M(e)}function n(e){D()||i.current.floatingContext&&(null==h.current||h.current({...i.current.floatingContext,tree:v,x:e.clientX,y:e.clientY,onClose(){O(),T(),D()||M(e)}})(e))}function u(){Vn(R)}function s(e){D()||M(e,!1)}}),[l,c,t,d,p,M,T,O,o,r,w,v,y,h,i,D,b]),Xe((()=>{var e;if(c&&r&&null!=(e=h.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&L()){C.current=!0;const e=l.floating;if(f(l.domReference)&&e){var t;const n=We(l.floating).body;n.setAttribute(qn,"");const r=l.domReference,o=null==v||null==(t=v.nodesRef.current.find((e=>e.id===g)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[c,r,g,l,v,h,L]),Xe((()=>{r||(x.current=void 0,A.current=!1,T(),O())}),[r,T,O]),e.useEffect((()=>()=>{T(),Vn(R),Vn(k),O()}),[c,l.domReference,T,O]);const P=e.useMemo((()=>{function e(e){x.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){I.current||w.current||o(!0,t,"hover")}d&&!Ue(x.current)||r||0===jn(b.current)||A.current&&e.movementX**2+e.movementY**2<2||(Vn(k),"touch"===x.current?n():(A.current=!0,k.current=window.setTimeout(n,jn(b.current))))}}}),[d,o,r,w,b]);return e.useMemo((()=>c?{reference:P}:{}),[c,P])}let Xn=0;function Yn(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Xn);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Xn=requestAnimationFrame(i)}function $n(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&m(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}const Gn={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Qn(e){return"inert"===e?Gn.inert:"aria-hidden"===e?Gn["aria-hidden"]:Gn.none}let Zn=new WeakSet,Jn={},er=0;const tr=e=>e&&(e.host||tr(e.parentNode));function nr(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,u=(c=t,e.map((e=>{if(c.contains(e))return e;const t=tr(e);return c.contains(t)?t:null})).filter((e=>null!=e)));var c;const s=new Set,a=new Set(u),f=[];Jn[o]||(Jn[o]=new WeakMap);const d=Jn[o];return u.forEach((function e(t){if(!t||s.has(t))return;s.add(t),t.parentNode&&e(t.parentNode)})),function e(t){if(!t||a.has(t))return;[].forEach.call(t.children,(t=>{if("script"!==l(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=Qn(i),u=(r.get(t)||0)+1,l=(d.get(t)||0)+1;r.set(t,u),d.set(t,l),f.push(t),1===u&&n&&Zn.add(t),1===l&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"inert"===i?"":"true")}}))}(t),s.clear(),er++,()=>{f.forEach((e=>{const t=Qn(i),n=(t.get(e)||0)-1,r=(d.get(e)||0)-1;t.set(e,n),d.set(e,r),n||(!Zn.has(e)&&i&&e.removeAttribute(i),Zn.delete(e)),r||e.removeAttribute(o)})),er--,er||(Gn.inert=new WeakMap,Gn["aria-hidden"]=new WeakMap,Gn.none=new WeakMap,Zn=new WeakSet,Jn={})}}function rr(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=(o=e[0],(null==o?void 0:o.ownerDocument)||document).body;var o;return nr(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const or={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},ir=e.forwardRef((function(t,r){const[o,i]=e.useState();Xe((()=>{Se()&&i("button")}),[]);const u={ref:r,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Kn("focus-guard")]:"",style:or};return n("span",{...t,...u})})),ur=e.createContext(null),lr=Kn("portal");function cr(t){const{children:o,id:u,root:l,preserveTabOrder:c=!0}=t,s=function(t){void 0===t&&(t={});const{id:n,root:r}=t,o=Ln(),i=sr(),[u,l]=e.useState(null),c=e.useRef(null);return Xe((()=>()=>{null==u||u.remove(),queueMicrotask((()=>{c.current=null}))}),[u]),Xe((()=>{if(!o)return;if(c.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=o,t.setAttribute(lr,""),e.appendChild(t),c.current=t,l(t)}),[n,o]),Xe((()=>{if(null===r)return;if(!o)return;if(c.current)return;let e=r||(null==i?void 0:i.portalNode);e&&!a(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const u=document.createElement("div");u.id=o,u.setAttribute(lr,""),e=t||e,e.appendChild(u),c.current=u,l(u)}),[n,r,o,i]),u}({id:u,root:l}),[f,d]=e.useState(null),m=e.useRef(null),p=e.useRef(null),v=e.useRef(null),g=e.useRef(null),h=null==f?void 0:f.modal,y=null==f?void 0:f.open,w=!!f&&!f.modal&&f.open&&c&&!(!l&&!s);return e.useEffect((()=>{if(s&&c&&!h)return s.addEventListener("focusin",e,!0),s.addEventListener("focusout",e,!0),()=>{s.removeEventListener("focusin",e,!0),s.removeEventListener("focusout",e,!0)};function e(e){if(s&&ft(e)){("focusin"===e.type?mt:dt)(s)}}}),[s,c,h]),e.useEffect((()=>{s&&(y||mt(s))}),[y,s]),r(ur.Provider,{value:e.useMemo((()=>({preserveTabOrder:c,beforeOutsideRef:m,afterOutsideRef:p,beforeInsideRef:v,afterInsideRef:g,portalNode:s,setFocusManagerState:d})),[c,s]),children:[w&&s&&n(ir,{"data-type":"outside",ref:m,onFocus:e=>{if(ft(e,s)){var t;null==(t=v.current)||t.focus()}else{const e=at(f?f.domReference:null);null==e||e.focus()}}}),w&&s&&n("span",{"aria-owns":s.id,style:or}),s&&i.createPortal(o,s),w&&s&&n(ir,{"data-type":"outside",ref:p,onFocus:e=>{if(ft(e,s)){var t;null==(t=g.current)||t.focus()}else{const t=st(f?f.domReference:null);null==t||t.focus(),(null==f?void 0:f.closeOnFocusOut)&&(null==f||f.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}const sr=()=>e.useContext(ur);function ar(t){return e.useMemo((()=>e=>{t.forEach((t=>{t&&(t.current=e)}))}),t)}let fr=[];function dr(){fr=fr.filter((e=>e.isConnected))}function mr(){return dr(),fr[fr.length-1]}function pr(e,t){var n;if(!(t.current.includes("floating")||null!=(n=e.getAttribute("role"))&&n.includes("dialog")))return;const r=lt(),o=function(e,t){return(t=t||{}).getShadowRoot?fe([e],t.includeContainer,{filter:we.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):ae(e,t.includeContainer,we.bind(null,t))}(e,r),i=o.filter((e=>{const t=e.getAttribute("data-tabindex")||"";return ke(e,r)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")})),u=e.getAttribute("tabindex");t.current.includes("floating")||0===i.length?"0"!==u&&e.setAttribute("tabindex","0"):("-1"!==u||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const vr=e.forwardRef((function(e,t){return n("button",{...e,type:"button",ref:t,tabIndex:-1,style:or})}));function gr(t){const{context:i,children:u,disabled:c=!1,order:s=["content"],guards:a=!0,initialFocus:f=0,returnFocus:m=!0,restoreFocus:p=!1,modal:v=!0,visuallyHiddenDismiss:g=!1,closeOnFocusOut:h=!0,outsideElementsInert:y=!1,getInsideElements:w=()=>[]}=t,{open:b,onOpenChange:x,events:R,dataRef:E,elements:{domReference:k,floating:I}}=i,C=Ge((()=>{var e;return null==(e=E.current.floatingContext)?void 0:e.nodeId})),S=Ge(w),A="number"==typeof f&&f<0,L=_e(k)&&A,M="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,T=!M||a,O=!T||M&&y,D=Ye(s),P=Ye(f),N=Ye(m),F=Wn(),W=sr(),B=e.useRef(null),_=e.useRef(null),H=e.useRef(!1),K=e.useRef(!1),V=e.useRef(-1),q=e.useRef(-1),z=null!=W,j=He(I),U=Ge((function(e){return void 0===e&&(e=j),e?Ee(e,lt()):[]})),X=Ge((e=>{const t=U(e);return D.current.map((e=>k&&"reference"===e?k:j&&"floating"===e?j:t)).filter(Boolean).flat()}));e.useEffect((()=>{if(c)return;if(!v)return;function e(e){if("Tab"===e.key){Pe(j,De(We(j)))&&0===U().length&&!L&&qe(e);const t=X(),n=Ne(e);"reference"===D.current[0]&&n===k&&(qe(e),e.shiftKey?Yn(t[t.length-1]):Yn(t[1])),"floating"===D.current[1]&&n===j&&e.shiftKey&&(qe(e),Yn(t[0]))}}const t=We(j);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[c,k,j,v,D,L,U,X]),e.useEffect((()=>{if(!c&&I)return I.addEventListener("focusin",e),()=>{I.removeEventListener("focusin",e)};function e(e){const t=Ne(e),n=U().indexOf(t);-1!==n&&(V.current=n)}}),[c,I,U]),e.useEffect((()=>{if(c)return;if(!h)return;function e(){K.current=!0,setTimeout((()=>{K.current=!1}))}function t(e){const t=e.relatedTarget,n=e.currentTarget,r=Ne(e);queueMicrotask((()=>{const o=C(),i=!(Pe(k,t)||Pe(I,t)||Pe(t,I)||Pe(null==W?void 0:W.portalNode,t)||null!=t&&t.hasAttribute(Kn("focus-guard"))||F&&(Ke(F.nodesRef.current,o).find((e=>{var n,r;return Pe(null==(n=e.context)?void 0:n.elements.floating,t)||Pe(null==(r=e.context)?void 0:r.elements.domReference,t)}))||Ve(F.nodesRef.current,o).find((e=>{var n,r,o;return[null==(n=e.context)?void 0:n.elements.floating,He(null==(r=e.context)?void 0:r.elements.floating)].includes(t)||(null==(o=e.context)?void 0:o.elements.domReference)===t}))));if(n===k&&j&&pr(j,D),p&&n!==k&&(null==r||!r.isConnected)&&De(We(j))===We(j).body){d(j)&&j.focus();const e=V.current,t=U(),n=t[e]||t[t.length-1]||j;d(n)&&n.focus()}E.current.insideReactTree?E.current.insideReactTree=!1:!L&&v||!t||!i||K.current||t===mr()||(H.current=!0,x(!1,e,"focus-out"))}))}const n=Boolean(!F&&W);function r(){Vn(q),E.current.insideReactTree=!0,q.current=window.setTimeout((()=>{E.current.insideReactTree=!1}))}return I&&d(k)?(k.addEventListener("focusout",t),k.addEventListener("pointerdown",e),I.addEventListener("focusout",t),n&&I.addEventListener("focusout",r,!0),()=>{k.removeEventListener("focusout",t),k.removeEventListener("pointerdown",e),I.removeEventListener("focusout",t),n&&I.removeEventListener("focusout",r,!0)}):void 0}),[c,k,I,j,v,F,W,x,h,p,U,L,C,D,E]);const Y=e.useRef(null),$=e.useRef(null),G=ar([Y,null==W?void 0:W.beforeInsideRef]),Q=ar([$,null==W?void 0:W.afterInsideRef]);function Z(e){return!c&&g&&v?n(vr,{ref:"start"===e?B:_,onClick:e=>x(!1,e.nativeEvent),children:"string"==typeof g?g:"Dismiss"}):null}e.useEffect((()=>{var e,t;if(c)return;if(!I)return;const n=Array.from((null==W||null==(e=W.portalNode)?void 0:e.querySelectorAll("["+Kn("portal")+"]"))||[]),r=null==(t=(F?Ve(F.nodesRef.current,C()):[]).find((e=>{var t;return _e((null==(t=e.context)?void 0:t.elements.domReference)||null)})))||null==(t=t.context)?void 0:t.elements.domReference,o=[I,r,...n,...S(),B.current,_.current,Y.current,$.current,null==W?void 0:W.beforeOutsideRef.current,null==W?void 0:W.afterOutsideRef.current,D.current.includes("reference")||L?k:null].filter((e=>null!=e)),i=v||L?rr(o,!O,O):rr(o);return()=>{i()}}),[c,k,I,v,D,W,L,T,O,F,C,S]),Xe((()=>{if(c||!d(j))return;const e=De(We(j));queueMicrotask((()=>{const t=X(j),n=P.current,r=("number"==typeof n?t[n]:n.current)||j,o=Pe(j,e);A||o||!b||Yn(r,{preventScroll:r===j})}))}),[c,b,j,A,X,P]),Xe((()=>{if(c||!j)return;const e=We(j),t=De(e);var n;function r(e){let{reason:t,event:n,nested:r}=e;if(["hover","safe-polygon"].includes(t)&&"mouseleave"===n.type&&(H.current=!0),"outside-press"===t)if(r)H.current=!1;else if(ze(n)||je(n))H.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),H.current=!e}}n=t,dr(),n&&"body"!==l(n)&&(fr.push(n),fr.length>20&&(fr=fr.slice(-20))),R.on("openchange",r);const o=e.createElement("span");return o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),Object.assign(o.style,or),z&&k&&k.insertAdjacentElement("afterend",o),()=>{R.off("openchange",r);const t=De(e),n=Pe(I,t)||F&&Ke(F.nodesRef.current,C(),!1).some((e=>{var n;return Pe(null==(n=e.context)?void 0:n.elements.floating,t)})),i=function(){if("boolean"==typeof N.current){const e=k||mr();return e&&e.isConnected?e:o}return N.current.current||o}();queueMicrotask((()=>{const r=function(e){const t=lt();return ke(e,t)?e:Ee(e,t)[0]||e}(i);N.current&&!H.current&&d(r)&&(r===t||t===e.body||n)&&r.focus({preventScroll:!0}),o.remove()}))}}),[c,I,j,N,E,R,F,z,k,C]),e.useEffect((()=>(queueMicrotask((()=>{H.current=!1})),()=>{queueMicrotask(dr)})),[c]),Xe((()=>{if(!c&&W)return W.setFocusManagerState({modal:v,closeOnFocusOut:h,open:b,onOpenChange:x,domReference:k}),()=>{W.setFocusManagerState(null)}}),[c,W,v,b,x,h,k]),Xe((()=>{c||j&&pr(j,D)}),[c,j,D]);const J=!c&&T&&(!v||!L)&&(z||v);return r(o,{children:[J&&n(ir,{"data-type":"inside",ref:G,onFocus:e=>{if(v){const e=X();Yn("reference"===s[0]?e[0]:e[e.length-1])}else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(H.current=!1,ft(e,W.portalNode)){const e=st(k);null==e||e.focus()}else{var t;null==(t=W.beforeOutsideRef.current)||t.focus()}}}),!L&&Z("start"),u,Z("end"),J&&n(ir,{"data-type":"inside",ref:Q,onFocus:e=>{if(v)Yn(X()[0]);else if(null!=W&&W.preserveTabOrder&&W.portalNode)if(h&&(H.current=!0),ft(e,W.portalNode)){const e=at(k);null==e||e.focus()}else{var t;null==(t=W.afterOutsideRef.current)||t.focus()}}})]})}let hr=0;const yr="--floating-ui-scrollbar-width";let wr=()=>{};const br=e.forwardRef((function(e,t){const{lockScroll:r=!1,...o}=e;return Xe((()=>{if(r)return hr++,1===hr&&(wr=function(){const e=Ie(),t=/iP(hone|ad|od)|iOS/.test(e)||"MacIntel"===e&&navigator.maxTouchPoints>1,n=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,i=n.left?parseFloat(n.left):window.scrollX,u=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(yr,o+"px"),o&&(n[r]=o+"px"),t){var l,c;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,t=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(u-Math.floor(t))+"px",left:-(i-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[r]:""}),n.removeProperty(yr),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(i,u))}}()),()=>{hr--,0===hr&&wr()}}),[r]),n("div",{ref:t,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})}));function xr(e){return d(e.target)&&"BUTTON"===e.target.tagName}function Rr(e){return Be(e)}function Er(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,dataRef:i,elements:{domReference:u}}=t,{enabled:l=!0,event:c="click",toggle:s=!0,ignoreMouse:a=!1,keyboardHandlers:f=!0,stickIfOpen:m=!0}=n,p=e.useRef(),v=e.useRef(!1),g=e.useMemo((()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==c&&(Ue(t,!0)&&a||(!r||!s||i.current.openEvent&&m&&"mousedown"!==i.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===c&&p.current?p.current=void 0:Ue(t,!0)&&a||(!r||!s||i.current.openEvent&&m&&"click"!==i.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!f||xr(e)||(" "!==e.key||Rr(u)||(e.preventDefault(),v.current=!0),function(e){return d(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&o(!r||!s,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!f||xr(e)||Rr(u)||" "===e.key&&v.current&&(v.current=!1,o(!r||!s,e.nativeEvent,"click"))}})),[i,u,c,a,f,o,r,m,s]);return e.useMemo((()=>l?{reference:g}:{}),[l,g])}const kr={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ir={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Cr=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Sr(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,elements:i,dataRef:u}=t,{enabled:l=!0,escapeKey:c=!0,outsidePress:s=!0,outsidePressEvent:a="pointerdown",referencePress:m=!1,referencePressEvent:p="pointerdown",ancestorScroll:v=!1,bubbles:g,capture:h}=n,y=Wn(),w=Ge("function"==typeof s?s:()=>!1),b="function"==typeof s?w:s,x=e.useRef(!1),{escapeKey:R,outsidePress:E}=Cr(g),{escapeKey:I,outsidePress:A}=Cr(h),M=e.useRef(!1),O=Ge((e=>{var t;if(!r||!l||!c||"Escape"!==e.key)return;if(M.current)return;const n=null==(t=u.current.floatingContext)?void 0:t.nodeId,i=y?Ke(y.nodesRef.current,n):[];if(!R&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),D=Ge((e=>{var t;const n=()=>{var t;O(e),null==(t=Ne(e))||t.removeEventListener("keydown",n)};null==(t=Ne(e))||t.addEventListener("keydown",n)})),P=Ge((e=>{var t;const n=u.current.insideReactTree;u.current.insideReactTree=!1;const r=x.current;if(x.current=!1,"click"===a&&r)return;if(n)return;if("function"==typeof b&&!b(e))return;const l=Ne(e),c="["+Kn("inert")+"]",s=We(i.floating).querySelectorAll(c);let m=f(l)?l:null;for(;m&&!C(m);){const e=L(m);if(C(e)||!f(e))break;m=e}if(s.length&&f(l)&&!l.matches("html,body")&&!Pe(l,i.floating)&&Array.from(s).every((e=>!Pe(m,e))))return;if(d(l)&&W){const t=C(l),n=S(l),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),u=o&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,c=i&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,s="rtl"===n.direction,a=c&&(s?e.offsetX<=l.offsetWidth-l.clientWidth:e.offsetX>l.clientWidth),f=u&&e.offsetY>l.clientHeight;if(a||f)return}const p=null==(t=u.current.floatingContext)?void 0:t.nodeId,v=y&&Ke(y.nodesRef.current,p).some((t=>{var n;return Fe(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Fe(e,i.floating)||Fe(e,i.domReference)||v)return;const g=y?Ke(y.nodesRef.current,p):[];if(g.length>0){let e=!0;if(g.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),N=Ge((e=>{var t;const n=()=>{var t;P(e),null==(t=Ne(e))||t.removeEventListener(a,n)};null==(t=Ne(e))||t.addEventListener(a,n)}));e.useEffect((()=>{if(!r||!l)return;u.current.__escapeKeyBubbles=R,u.current.__outsidePressBubbles=E;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function n(){window.clearTimeout(e),M.current=!0}function s(){e=window.setTimeout((()=>{M.current=!1}),k()?5:0)}const d=We(i.floating);c&&(d.addEventListener("keydown",I?D:O,I),d.addEventListener("compositionstart",n),d.addEventListener("compositionend",s)),b&&d.addEventListener(a,A?N:P,A);let m=[];return v&&(f(i.domReference)&&(m=T(i.domReference)),f(i.floating)&&(m=m.concat(T(i.floating))),!f(i.reference)&&i.reference&&i.reference.contextElement&&(m=m.concat(T(i.reference.contextElement)))),m=m.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),m.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{c&&(d.removeEventListener("keydown",I?D:O,I),d.removeEventListener("compositionstart",n),d.removeEventListener("compositionend",s)),b&&d.removeEventListener(a,A?N:P,A),m.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[u,i,c,b,a,r,o,v,l,R,E,O,I,D,P,A,N]),e.useEffect((()=>{u.current.insideReactTree=!1}),[u,b,a]);const F=e.useMemo((()=>({onKeyDown:O,...m&&{[kr[p]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}})),[O,o,m,p]),W=e.useMemo((()=>({onKeyDown:O,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[Ir[a]]:()=>{u.current.insideReactTree=!0}})),[O,a,u]);return e.useMemo((()=>l?{reference:F,floating:W}:{}),[l,F,W])}function Ar(t){const{open:n=!1,onOpenChange:r,elements:o}=t,i=Ln(),u=e.useRef({}),[l]=e.useState((()=>Dn())),c=null!=Fn();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!f(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Mn)&&e.has(o)||(null==(i=Mn)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,a]=e.useState(o.reference),d=Ge(((e,t,n)=>{u.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:n,nested:c}),null==r||r(e,t,n)})),m=e.useMemo((()=>({setPositionReference:a})),[]),p=e.useMemo((()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference})),[s,o.reference,o.floating]);return e.useMemo((()=>({dataRef:u,open:n,onOpenChange:d,elements:p,events:l,floatingId:i,refs:m})),[n,d,p,l,i,m])}function Lr(t){void 0===t&&(t={});const{nodeId:n}=t,r=Ar({...t,elements:{reference:null,floating:null,...t.elements}}),o=t.rootContext||r,u=o.elements,[l,c]=e.useState(null),[s,a]=e.useState(null),d=(null==u?void 0:u.domReference)||l,m=e.useRef(null),p=Wn();Xe((()=>{d&&(m.current=d)}),[d]);const v=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:u,elements:{reference:l,floating:c}={},transform:s=!0,whileElementsMounted:a,open:f}=t,[d,m]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=e.useState(o);Xt(p,o)||v(o);const[g,h]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback((e=>{e!==k.current&&(k.current=e,h(e))}),[]),x=e.useCallback((e=>{e!==I.current&&(I.current=e,w(e))}),[]),R=l||g,E=c||y,k=e.useRef(null),I=e.useRef(null),C=e.useRef(d),S=null!=a,A=Gt(a),L=Gt(u),M=Gt(f),T=e.useCallback((()=>{if(!k.current||!I.current)return;const e={placement:n,strategy:r,middleware:p};L.current&&(e.platform=L.current),jt(k.current,I.current,e).then((e=>{const t={...e,isPositioned:!1!==M.current};O.current&&!Xt(C.current,t)&&(C.current=t,i.flushSync((()=>{m(t)})))}))}),[p,n,r,L,M]);Ut((()=>{!1===f&&C.current.isPositioned&&(C.current.isPositioned=!1,m((e=>({...e,isPositioned:!1}))))}),[f]);const O=e.useRef(!1);Ut((()=>(O.current=!0,()=>{O.current=!1})),[]),Ut((()=>{if(R&&(k.current=R),E&&(I.current=E),R&&E){if(A.current)return A.current(R,E,T);T()}}),[R,E,T,A,S]);const D=e.useMemo((()=>({reference:k,floating:I,setReference:b,setFloating:x})),[b,x]),P=e.useMemo((()=>({reference:R,floating:E})),[R,E]),N=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!P.floating)return e;const t=$t(P.floating,d.x),n=$t(P.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Yt(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,P.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:T,refs:D,elements:P,floatingStyles:N})),[d,T,D,P,N])}({...t,elements:{...u,...s&&{reference:s}}}),g=e.useCallback((e=>{const t=f(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;a(t),v.refs.setReference(t)}),[v.refs]),h=e.useCallback((e=>{(f(e)||null===e)&&(m.current=e,c(e)),(f(v.refs.reference.current)||null===v.refs.reference.current||null!==e&&!f(e))&&v.refs.setReference(e)}),[v.refs]),y=e.useMemo((()=>({...v.refs,setReference:h,setPositionReference:g,domReference:m})),[v.refs,h,g]),w=e.useMemo((()=>({...v.elements,domReference:d})),[v.elements,d]),b=e.useMemo((()=>({...v,...o,refs:y,elements:w,nodeId:n})),[v,y,w,n,o]);return Xe((()=>{o.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=b)})),e.useMemo((()=>({...v,context:b,refs:y,elements:w})),[v,y,w,b])}function Mr(){return Ie().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints&&Se()}function Tr(t,n){void 0===n&&(n={});const{open:r,onOpenChange:o,events:i,dataRef:u,elements:l}=t,{enabled:s=!0,visibleOnly:a=!0}=n,m=e.useRef(!1),p=e.useRef(-1),v=e.useRef(!0);e.useEffect((()=>{if(!s)return;const e=c(l.domReference);function t(){!r&&d(l.domReference)&&l.domReference===De(We(l.domReference))&&(m.current=!0)}function n(){v.current=!0}function o(){v.current=!1}return e.addEventListener("blur",t),Mr()&&(e.addEventListener("keydown",n,!0),e.addEventListener("pointerdown",o,!0)),()=>{e.removeEventListener("blur",t),Mr()&&(e.removeEventListener("keydown",n,!0),e.removeEventListener("pointerdown",o,!0))}}),[l.domReference,r,s]),e.useEffect((()=>{if(s)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(m.current=!0)}}),[i,s]),e.useEffect((()=>()=>{Vn(p)}),[]);const g=e.useMemo((()=>({onMouseLeave(){m.current=!1},onFocus(e){if(m.current)return;const t=Ne(e.nativeEvent);if(a&&f(t))if(Mr()&&!e.relatedTarget){if(!v.current&&!Be(t))return}else if(!function(e){if(!e||Le())return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(t))return;o(!0,e.nativeEvent,"focus")},onBlur(e){m.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=f(t)&&t.hasAttribute(Kn("focus-guard"))&&"outside"===t.getAttribute("data-type");p.current=window.setTimeout((()=>{var e;const i=De(l.domReference?l.domReference.ownerDocument:document);(t||i!==l.domReference)&&(Pe(null==(e=u.current.floatingContext)?void 0:e.refs.floating.current,i)||Pe(l.domReference,i)||r||o(!1,n,"focus"))}))}})),[u,l.domReference,o,a]);return e.useMemo((()=>s?{reference:g}:{}),[s,g])}function Or(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[dn]:t,[mn]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[fn]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var u;o&&[dn,mn].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(u=r.get(n))||u.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function Dr(t){void 0===t&&(t=[]);const n=t.map((e=>null==e?void 0:e.reference)),r=t.map((e=>null==e?void 0:e.floating)),o=t.map((e=>null==e?void 0:e.item)),i=e.useCallback((e=>Or(e,t,"reference")),n),u=e.useCallback((e=>Or(e,t,"floating")),r),l=e.useCallback((e=>Or(e,t,"item")),o);return e.useMemo((()=>({getReferenceProps:i,getFloatingProps:u,getItemProps:l})),[i,u,l])}function Pr(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Nr(e,t){return Pr(t,e===gn||e===hn,e===pn||e===vn)}function Fr(e,t,n){return Pr(t,e===hn,n?e===pn:e===vn)||"Enter"===e||" "===e||""===e}function Wr(e,t,n){return Pr(t,n?e===pn:e===vn,e===hn)}function Br(e,t,n,r){return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:Pr(t,n?e===vn:e===pn,e===gn)}function _r(t,n){const{open:r,onOpenChange:o,elements:i,floatingId:u}=t,{listRef:l,activeIndex:c,onNavigate:s=()=>{},enabled:a=!0,selectedIndex:f=null,allowEscape:m=!1,loop:p=!1,nested:v=!1,rtl:g=!1,virtual:h=!1,focusItemOnOpen:y="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:b=!0,disabledIndices:x,orientation:R="vertical",parentOrientation:E,cols:k=1,scrollItemIntoView:I=!0,virtualItemRef:C,itemSizes:S,dense:A=!1}=n;"production"!==process.env.NODE_ENV&&(m&&(p||Tn("`useListNavigation` looping must be enabled to allow escaping."),h||Tn("`useListNavigation` must be virtual to allow escaping.")),"vertical"===R&&k>1&&Tn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const L=Ye(He(i.floating)),M=Fn(),T=Wn();Xe((()=>{t.dataRef.current.orientation=R}),[t,R]);const O=Ge((()=>{s(-1===N.current?null:N.current)})),D=_e(i.domReference),P=e.useRef(y),N=e.useRef(null!=f?f:-1),F=e.useRef(null),W=e.useRef(!0),B=e.useRef(O),_=e.useRef(!!i.floating),H=e.useRef(r),K=e.useRef(!1),V=e.useRef(!1),q=Ye(x),z=Ye(r),j=Ye(I),U=Ye(f),[X,Y]=e.useState(),[$,G]=e.useState(),Q=Ge((()=>{function e(e){var t;h?(null!=(t=e.id)&&t.endsWith("-fui-option")&&(e.id=u+"-"+Math.random().toString(16).slice(2,10)),Y(e.id),null==T||T.events.emit("virtualfocus",e),C&&(C.current=e)):Yn(e,{sync:K.current,preventScroll:!0})}const t=l.current[N.current],n=V.current;t&&e(t);(K.current?e=>e():requestAnimationFrame)((()=>{const r=l.current[N.current]||t;if(!r)return;t||e(r);const o=j.current;o&&J&&(n||!W.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof o?{block:"nearest",inline:"nearest"}:o))}))}));Xe((()=>{a&&(r&&i.floating?P.current&&null!=f&&(V.current=!0,N.current=f,O()):_.current&&(N.current=-1,B.current()))}),[a,r,i.floating,f,O]),Xe((()=>{if(a&&r&&i.floating)if(null==c){if(K.current=!1,null!=U.current)return;if(_.current&&(N.current=-1,Q()),(!H.current||!_.current)&&P.current&&(null!=F.current||!0===P.current&&null==F.current)){let e=0;const t=()=>{if(null==l.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e++}else N.current=null==F.current||Fr(F.current,R,g)||v?Je(l,q.current):et(l,q.current),F.current=null,O()};t()}}else Ze(l,c)||(N.current=c,Q(),V.current=!1)}),[a,r,i.floating,c,U,v,l,R,g,O,Q,q]),Xe((()=>{var e;if(!a||i.floating||!T||h||!_.current)return;const t=T.nodesRef.current,n=null==(e=t.find((e=>e.id===M)))||null==(e=e.context)?void 0:e.elements.floating,r=De(We(i.floating)),o=t.some((e=>e.context&&Pe(e.context.elements.floating,r)));n&&!o&&W.current&&n.focus({preventScroll:!0})}),[a,i.floating,T,M,h]),Xe((()=>{if(a&&T&&h&&!M)return T.events.on("virtualfocus",e),()=>{T.events.off("virtualfocus",e)};function e(e){G(e.id),C&&(C.current=e)}}),[a,T,h,M,C]),Xe((()=>{B.current=O,H.current=r,_.current=!!i.floating})),Xe((()=>{r||(F.current=null,P.current=y)}),[r,y]);const Z=null!=c,J=e.useMemo((()=>{function e(e){if(!z.current)return;const t=l.current.indexOf(e);-1!==t&&N.current!==t&&(N.current=t,O())}return{onFocus(t){let{currentTarget:n}=t;K.current=!0,e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},onMouseMove(t){let{currentTarget:n}=t;K.current=!0,V.current=!1,w&&e(n)},onPointerLeave(e){let{pointerType:t}=e;var n;W.current&&"touch"!==t&&(K.current=!0,w&&(N.current=-1,O(),h||null==(n=L.current)||n.focus({preventScroll:!0})))}}}),[z,L,w,l,O,h]),ee=e.useCallback((()=>{var e;return null!=E?E:null==T||null==(e=T.nodesRef.current.find((e=>e.id===M)))||null==(e=e.context)||null==(e=e.dataRef)?void 0:e.current.orientation}),[M,T,E]),te=Ge((e=>{if(W.current=!1,K.current=!0,229===e.which)return;if(!z.current&&e.currentTarget===L.current)return;if(v&&Br(e.key,R,g,k))return Nr(e.key,ee())||qe(e),o(!1,e.nativeEvent,"list-navigation"),void(d(i.domReference)&&(h?null==T||T.events.emit("virtualfocus",i.domReference):i.domReference.focus()));const t=N.current,n=Je(l,x),u=et(l,x);if(D||("Home"===e.key&&(qe(e),N.current=n,O()),"End"===e.key&&(qe(e),N.current=u,O())),k>1){const t=S||Array.from({length:l.current.length},(()=>({width:1,height:1}))),r=rt(t,k,A),o=r.findIndex((e=>null!=e&&!ut(l,e,x))),i=r.reduce(((e,t,n)=>null==t||ut(l,t,x)?e:n),-1),c=r[nt({current:r.map((e=>null!=e?l.current[e]:null))},{event:e,orientation:R,loop:p,rtl:g,cols:k,disabledIndices:it([...("function"!=typeof x?x:null)||l.current.map(((e,t)=>ut(l,t,x)?t:void 0)),void 0],r),minIndex:o,maxIndex:i,prevIndex:ot(N.current>u?n:N.current,t,r,k,e.key===hn?"bl":e.key===(g?pn:vn)?"tr":"tl"),stopEvent:!0})];if(null!=c&&(N.current=c,O()),"both"===R)return}if(Nr(e.key,R)){if(qe(e),r&&!h&&De(e.currentTarget.ownerDocument)===e.currentTarget)return N.current=Fr(e.key,R,g)?n:u,void O();Fr(e.key,R,g)?N.current=p?t>=u?m&&t!==l.current.length?-1:n:tt(l,{startingIndex:t,disabledIndices:x}):Math.min(u,tt(l,{startingIndex:t,disabledIndices:x})):N.current=p?t<=n?m&&-1!==t?l.current.length:u:tt(l,{startingIndex:t,decrement:!0,disabledIndices:x}):Math.max(n,tt(l,{startingIndex:t,decrement:!0,disabledIndices:x})),Ze(l,N.current)&&(N.current=-1),O()}})),ne=e.useMemo((()=>h&&r&&Z&&{"aria-activedescendant":$||X}),[h,r,Z,$,X]),re=e.useMemo((()=>({"aria-orientation":"both"===R?void 0:R,...D?{}:ne,onKeyDown:te,onPointerMove(){W.current=!0}})),[ne,te,R,D]),oe=e.useMemo((()=>{function e(e){"auto"===y&&ze(e.nativeEvent)&&(P.current=!0)}function t(e){P.current=y,"auto"===y&&je(e.nativeEvent)&&(P.current=!0)}return{...ne,onKeyDown(e){W.current=!1;const t=e.key.startsWith("Arrow"),n=["Home","End"].includes(e.key),i=t||n,u=Wr(e.key,R,g),c=Br(e.key,R,g,k),s=Wr(e.key,ee(),g),a=Nr(e.key,R),d=(v?s:a)||"Enter"===e.key||""===e.key.trim();if(h&&r){const t=null==T?void 0:T.nodesRef.current.find((e=>null==e.parentId)),r=T&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),Ke(e,o).forEach((e=>{t(e.id,i+1)}))}(t,0),e.find((e=>e.id===n))}(T.nodesRef.current,t.id):null;if(i&&r&&C){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(u||c){var m,p;const n=(null==(m=r.context)?void 0:m.elements.domReference)===e.currentTarget,o=c&&!n?null==(p=r.context)?void 0:p.elements.domReference:u?l.current.find((e=>(null==e?void 0:e.id)===X)):null;o&&(qe(e),o.dispatchEvent(t),G(void 0))}var y;if((a||n)&&r.context)if(r.context.open&&r.parentId&&e.currentTarget!==r.context.elements.domReference)return qe(e),void(null==(y=r.context.elements.domReference)||y.dispatchEvent(t))}return te(e)}if(r||b||!t){if(d){const t=Nr(e.key,ee());F.current=v&&t?null:e.key}v?s&&(qe(e),r?(N.current=Je(l,q.current),O()):o(!0,e.nativeEvent,"list-navigation")):a&&(null!=f&&(N.current=f),qe(e),!r&&b?o(!0,e.nativeEvent,"list-navigation"):te(e),r&&O())}},onFocus(){r&&!h&&(N.current=-1,O())},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}}),[X,ne,k,te,q,y,l,v,O,o,r,b,R,ee,g,f,T,h,C]);return e.useMemo((()=>a?{reference:oe,floating:re,item:J}:{}),[a,oe,re,J])}const Hr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Kr(t,n){var r,o;void 0===n&&(n={});const{open:i,elements:u,floatingId:l}=t,{enabled:c=!0,role:s="dialog"}=n,a=Ln(),f=(null==(r=u.domReference)?void 0:r.id)||a,d=e.useMemo((()=>{var e;return(null==(e=He(u.floating))?void 0:e.id)||l}),[u.floating,l]),m=null!=(o=Hr.get(s))?o:s,p=null!=Fn(),v=e.useMemo((()=>"tooltip"===m||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:i?d:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":"alertdialog"===m?"dialog":m,"aria-controls":i?d:void 0,..."listbox"===m&&{role:"combobox"},..."menu"===m&&{id:f},..."menu"===m&&p&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}}),[m,d,p,i,f,s]),g=e.useMemo((()=>{const e={id:d,...m&&{role:m}};return"tooltip"===m||"label"===s?e:{...e,..."menu"===m&&{"aria-labelledby":f}}}),[m,d,f,s]),h=e.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:d+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[d,s]);return e.useMemo((()=>c?{reference:v,floating:g,item:h}:{}),[c,v,g,h])}function Vr(t,n){var r;const{open:o,dataRef:i}=t,{listRef:u,activeIndex:l,onMatch:c,onTypingChange:s,enabled:a=!0,findMatch:f=null,resetMs:d=750,ignoreKeys:m=[],selectedIndex:p=null}=n,v=e.useRef(-1),g=e.useRef(""),h=e.useRef(null!=(r=null!=p?p:l)?r:-1),y=e.useRef(null),w=Ge(c),b=Ge(s),x=Ye(f),R=Ye(m);Xe((()=>{o&&(Vn(v),y.current=null,g.current="")}),[o]),Xe((()=>{var e;o&&""===g.current&&(h.current=null!=(e=null!=p?p:l)?e:-1)}),[o,p,l]);const E=Ge((e=>{e?i.current.typing||(i.current.typing=e,b(e)):i.current.typing&&(i.current.typing=e,b(e))})),k=Ge((e=>{function t(e,t,n){const r=x.current?x.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}const n=u.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?E(!1):" "===e.key&&qe(e)),null==n||R.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;o&&" "!==e.key&&(qe(e),E(!0));n.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&g.current===e.key&&(g.current="",h.current=y.current),g.current+=e.key,Vn(v),v.current=window.setTimeout((()=>{g.current="",h.current=y.current,E(!1)}),d);const r=h.current,i=t(n,[...n.slice((r||0)+1),...n.slice(0,(r||0)+1)],g.current);-1!==i?(w(i),y.current=i):" "!==e.key&&(g.current="",E(!1))})),I=e.useMemo((()=>({onKeyDown:k})),[k]),C=e.useMemo((()=>({onKeyDown:k,onKeyUp(e){" "===e.key&&E(!1)}})),[k,E]);return e.useMemo((()=>a?{reference:I,floating:C}:{}),[a,I,C])}function qr(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...qr(e,t.id,n)]))}function zr(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,u=i-1;e<i;u=e++){const[i,l]=t[e]||[0,0],[c,s]=t[u]||[0,0];l>=r!=s>=r&&n<=(c-i)*(r-l)/(s-l)+i&&(o=!o)}return o}function jr(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,u=null,l=null,c="undefined"!=typeof performance?performance.now():0;const s=e=>{let{x:n,y:s,placement:a,elements:d,onClose:m,nodeId:p,tree:v}=e;return function(e){function g(){Vn(o),m()}if(Vn(o),!d.domReference||!d.floating||null==a||null==n||null==s)return;const{clientX:h,clientY:y}=e,w=[h,y],b=function(e){return"composedPath"in e?e.composedPath()[0]:e.target}(e),x="mouseleave"===e.type,R=$n(d.floating,b),E=$n(d.domReference,b),k=d.domReference.getBoundingClientRect(),I=d.floating.getBoundingClientRect(),C=a.split("-")[0],S=n>I.right-I.width/2,A=s>I.bottom-I.height/2,L=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(w,k),M=I.width>k.width,T=I.height>k.height,O=(M?k:I).left,D=(M?k:I).right,P=(T?k:I).top,N=(T?k:I).bottom;if(R&&(i=!0,!x))return;if(E&&(i=!1),E&&!x)return void(i=!0);if(x&&f(e.relatedTarget)&&$n(d.floating,e.relatedTarget))return;if(v&&qr(v.nodesRef.current,p).length)return;if("top"===C&&s>=k.bottom-1||"bottom"===C&&s<=k.top+1||"left"===C&&n>=k.right-1||"right"===C&&n<=k.left+1)return g();let F=[];switch(C){case"top":F=[[O,k.top+1],[O,I.bottom-1],[D,I.bottom-1],[D,k.top+1]];break;case"bottom":F=[[O,I.top+1],[O,k.bottom-1],[D,k.bottom-1],[D,I.top+1]];break;case"left":F=[[I.right-1,N],[I.right-1,P],[k.left+1,P],[k.left+1,N]];break;case"right":F=[[k.right-1,N],[k.right-1,P],[I.left+1,P],[I.left+1,N]]}if(!zr([h,y],F)){if(i&&!L)return g();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-c;if(null===u||null===l||0===r)return u=e,l=t,c=n,null;const o=e-u,i=t-l,s=Math.sqrt(o*o+i*i);return u=e,l=t,c=n,s/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return g()}zr([h,y],function(e){let[n,r]=e;switch(C){case"top":return[[M?n+t/2:S?n+4*t:n-4*t,r+t+1],[M?n-t/2:S?n+4*t:n-4*t,r+t+1],...[[I.left,S||M?I.bottom-t:I.top],[I.right,S?M?I.bottom-t:I.top:I.bottom-t]]];case"bottom":return[[M?n+t/2:S?n+4*t:n-4*t,r-t],[M?n-t/2:S?n+4*t:n-4*t,r-t],...[[I.left,S||M?I.top+t:I.bottom],[I.right,S?M?I.top+t:I.bottom:I.top+t]]];case"left":{const e=[n+t+1,T?r+t/2:A?r+4*t:r-4*t],o=[n+t+1,T?r-t/2:A?r+4*t:r-4*t];return[...[[A||T?I.right-t:I.left,I.top],[A?T?I.right-t:I.left:I.right-t,I.bottom]],e,o]}case"right":return[[n-t,T?r+t/2:A?r+4*t:r-4*t],[n-t,T?r-t/2:A?r+4*t:r-4*t],...[[A||T?I.left+t:I.right,I.top],[A?T?I.left+t:I.right:I.left+t,I.bottom]]]}}([n,s]))?!i&&r&&(o.current=window.setTimeout(g,40)):g()}}};return s.__options={blockPointerEvents:n},s}export{_r as A,Ft as B,kn as C,Lr as D,gr as E,Hn as F,br as G,cr as H,Bn as a,Ln as b,En as c,Wt as d,Jt as e,tn as f,Un as g,rn as h,Sr as i,Dr as j,Tr as k,en as l,Kr as m,on as n,Zt as o,_n as p,Wn as q,Fn as r,nn as s,jr as t,un as u,On as v,an as w,Vr as x,Er as y,sn as z};
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{forwardRef as a,useState as r}from"react";import{B as i}from"./index-CfC8-kd8.js";import{c as s}from"./index-CXzybYmm.js";import{i as o}from"./keyboard-BKF7hXqL.js";const d=a((({children:a,label:d="",defaultPressed:t=!1,pressed:l,onPressedChange:n=()=>{},disabled:f,asChild:m=!1,...c},p)=>{const[b,u]=r(t),h=void 0!==l,j=h?l:b,y=()=>{if(f)return;const e=!j;h||u(e),n(e)},C=d?{"aria-label":d}:{};return C["aria-pressed"]=j?"true":"false",C["aria-disabled"]=f?"true":"false",e(i,{ref:p,onClick:s(c.onClick,y),onKeyDown:s(c.onKeyDown,(e=>{o(e.key)&&(e.preventDefault(),y())})),"data-state":j?"on":"off","data-disabled":f?"":void 0,disabled:f,asChild:m,...C,...c,children:a})}));d.displayName="TogglePrimitive";export{d as T};
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as e,Fragment as n}from"react/jsx-runtime";import r,{createContext as t,forwardRef as i,useContext as o,useRef as l,useState as a,useEffect as s}from"react";import{F as c}from"./index-Db-tduwt.js";import{u as d}from"./index-wRElCyvx.js";import{u}from"./index-UODM4mVT.js";import{B as f}from"./index-CfC8-kd8.js";import{P as m}from"./index-XF8itt-H.js";import{T as p}from"./ThemeContext-Sm-iNANd.js";const g=t({isOpen:!1,handleOpenChange:()=>{},handleOverlayClick:()=>{},getItemProps:(e={})=>e,getReferenceProps:(e={})=>e,getFloatingProps:(e={})=>e,refs:{setReference:()=>{},setFloating:()=>{},reference:{current:null},floating:{current:null}},floatingStyles:{position:"absolute"}}),h="DialogPrimitive",C=i((({children:n,open:r,defaultOpen:t=!1,onOpenChange:i,onClickOutside:o=()=>{},className:l,disablePointerDismissal:a=!1,...s},f)=>{const[m,p]=d(r,t,i),h=c.useFloatingNodeId();u(m);const C=e=>{p(e)},{context:P,refs:v,floatingStyles:y}=c.useFloating({open:m,nodeId:h,onOpenChange:C}),F=c.useDismiss(P,{bubbles:!1,escapeKey:!a,outsidePress:!a}),b=c.useRole(P,{role:"dialog"}),{getReferenceProps:O,getFloatingProps:k,getItemProps:N}=c.useInteractions([F,b]),R={isOpen:m,handleOpenChange:C,floaterContext:P,handleOverlayClick:()=>{a||(o(),C(!1))},getReferenceProps:O,getFloatingProps:k,getItemProps:N,refs:v,floatingStyles:y};return e(g.Provider,{value:R,children:e(c.FloatingNode,{id:h,children:e("div",{ref:f,"data-state":m?"open":"closed",...s,className:l,children:n})})})}));C.displayName=`${h}Inner`;const P=i((({disablePointerDismissal:n=!1,...r},t)=>c.useFloatingTree()?e(C,{ref:t,disablePointerDismissal:n,...r}):e(c.FloatingTree,{children:e(C,{ref:t,disablePointerDismissal:n,...r})})));P.displayName=h;const v=i((({children:n,asChild:r,onClick:t,...i},l)=>{const{handleOpenChange:a,getItemProps:s}=o(g);return e(f,{ref:l,asChild:r,...s({...i,onClick:e=>{t?.(e),a(!1)}}),children:n})}));v.displayName="DialogPrimitiveAction";const y=i((({children:n,asChild:r,onClick:t,...i},l)=>{const{handleOpenChange:a,getItemProps:s}=o(g);return e(f,{ref:l,asChild:r,...s({...i,onClick:e=>{t?.(e),a(!1)}}),children:n})}));y.displayName="DialogPrimitiveCancel";const F=i((({children:t,asChild:i=!1,forceMount:l=!1,initialFocus:a=!0,finalFocus:s=!0,trapFocus:d=!0,role:u="dialog","aria-modal":f=!0,"aria-labelledby":p,"aria-describedby":h,style:C,...P},v)=>{const{isOpen:y,getFloatingProps:F,refs:b,floaterContext:O}=o(g),k=r.useRef(null),N=b.reference?.current,R=c.useMergeRefs([b.setFloating,v]),x=y||l,D=y?"open":"closed";r.useEffect((()=>{if(y)return void(k.current=document.activeElement instanceof HTMLElement?document.activeElement:null);const e=(()=>{if(!1===s)return null;if(!0===s)return N instanceof HTMLElement?N:k.current;if("current"in s)return s.current;const e=s();return!0===e?N instanceof HTMLElement?N:k.current:e instanceof HTMLElement?e:null})();e&&requestAnimationFrame((()=>{e.focus()}))}),[s,y,N]);const M=r.useMemo((()=>{if(!1===a)return-1;if(!0===a)return 0;if("current"in a)return a;const e=a();return!1===e||void 0===e?-1:!0===e?0:e}),[a]),T=P.style,I={...P};delete I.style;const j=e(m.div,{ref:R,asChild:i,...F({...I,style:{outline:"none",...C,...T},role:u,"aria-hidden":y?void 0:"true","aria-labelledby":y?p:void 0,"aria-describedby":y?h:void 0,"data-state":D,"aria-modal":f}),children:t});return e(n,{children:x&&(y?e(c.FocusManager,{context:O,modal:d,initialFocus:M,returnFocus:!1!==s,children:j}):j)})}));F.displayName="DialogPrimitiveContent";const b=i((({children:n,asChild:r,className:t="",disabled:i=!1,...l},a)=>{const{isOpen:s,handleOpenChange:d,getReferenceProps:u,refs:m}=o(g),{onClick:p,...h}=l,C=c.useMergeRefs([m.setReference,a]);return e(f,{ref:C,asChild:r,className:t,...u({...h,disabled:i,"aria-expanded":s,"data-state":s?"open":"closed","data-disabled":i?"":void 0,onClick(e){i||(p?.(e),e.defaultPrevented||d(!0))}}),children:n})}));b.displayName="DialogPrimitiveTrigger";const O=i((({asChild:r=!1,forceMount:t=!1,children:i,onClick:l,...a},s)=>{const{isOpen:d,handleOverlayClick:u}=o(g),f=d?"open":"closed";return e(n,{children:(d||t)&&e(c.Overlay,{ref:s,lockScroll:d,onClick:e=>{l?.(e),e.defaultPrevented||u()},"data-state":f,...a,children:i})})}));O.displayName="DialogPrimitiveOverlay";const k=i((({children:n,asChild:r=!1,...t},i)=>e(m.div,{ref:i,asChild:r,...t,children:n})));k.displayName="DialogPrimitiveFooter";const N={Root:P,Action:v,Cancel:y,Footer:k,Content:F,Trigger:b,Overlay:O,Portal:({children:n,container:r,forceMount:t=!1,keepMounted:i=!1,...d})=>{const u=o(p),f=l(null),[m,g]=a(!1);return s((()=>{f.current=r||(u?.portalRootRef.current??u?.containerRef.current??document.body),g(!0)}),[r,u]),m?e(c.Portal,{root:f.current,...d,children:n}):null}};export{N as D,g as a};
@@ -1 +1 @@
1
- 'use client';import{jsx as i}from"react/jsx-runtime";import{forwardRef as t}from"react";import{P as e}from"./index-98jQ1vTr.js";const r=t((({role:t="button",type:r="button",label:a="",description:o="",disabled:d=!1,children:l,...n},s)=>(a&&(n["aria-label"]=a),o&&(n["aria-description"]=o),d&&(n["aria-disabled"]="true",o||(n["aria-description"]="Disabled Button")),i(e.button,{ref:s,role:t,type:r,disabled:d,...n,children:l}))));r.displayName="ButtonPrimitive";export{r as B};
1
+ 'use client';import{jsx as i}from"react/jsx-runtime";import{forwardRef as t}from"react";import{P as e}from"./index-XF8itt-H.js";const r=t((({role:t="button",type:r="button",label:a="",description:o="",disabled:d=!1,children:l,...n},s)=>(a&&(n["aria-label"]=a),o&&(n["aria-description"]=o),d&&(n["aria-disabled"]="true",o||(n["aria-description"]="Disabled Button")),i(e.button,{ref:s,role:t,type:r,disabled:d,...n,children:l}))));r.displayName="ButtonPrimitive";export{r as B};
@@ -0,0 +1 @@
1
+ 'use client';import{a as s,b as a,C as e,c as o,u as t,d as i,s as u,o as r,h as l,l as n,e as g,f as d,g as f,i as F,j as m,k as c,m as p,n as I,F as h,p as v,q as w,r as y,t as C,v as N,w as L,x as P,y as T,z as j,A as k,B as x,D as z,E as A,G as D,H}from"./floating-ui.react-Byzse64h.js";const M={Portal:H,Overlay:D,FocusManager:A,useFloating:z,autoUpdate:x,useListNavigation:k,FloatingList:j,useClick:T,useTypeahead:P,useListItem:L,Arrow:N,useFloatingNodeId:s,safePolygon:C,useFloatingParentNodeId:y,useFloatingTree:w,FloatingNode:v,FloatingTree:h,arrow:I,useRole:p,useFocus:c,useInteractions:m,useDismiss:F,useHover:f,flip:d,shift:g,limitShift:n,hide:l,offset:r,size:u,detectOverflow:i,useMergeRefs:t,Composite:o,CompositeItem:e,useId:a};export{M as F};
@@ -0,0 +1 @@
1
+ 'use client';import{useLayoutEffect as o}from"react";import{r as t}from"./documentOverlayOpen-coyGmcyL.js";const r=globalThis.document?o:()=>{};function e(o){r((()=>{if(o)return t()}),[o])}export{e as u};
@@ -0,0 +1 @@
1
+ 'use client';import e from"react";import{g as r,c as t,m as n}from"./mergeProps-0RucjqeH.js";const i=["div","span","button","input","a","img","p","h2","label"].reduce(((i,a)=>(i[a]=(i=>{const a=e.forwardRef(((a,l)=>{const{asChild:o=!1,children:s,...m}=a;if(o){if(e.isValidElement(s)&&s.type===e.Fragment)return console.warn(`Primitive.${i}: asChild prop does not support React.Fragment. Please provide a single element.`),e.createElement(i,{...m,ref:l},s);const a=e.Children.toArray(s);if(1!==a.length||!e.isValidElement(a[0]))return console.warn(`Primitive.${i}: asChild prop requires exactly one valid child element.`),e.createElement(i,{...m,ref:l},s);const o=a[0],c=r(o),p=t(l,c),d=n(m,o.props);return e.cloneElement(o,{...d,...p?{ref:p}:{}})}return e.createElement(i,{...m,ref:l},s)}));return a.displayName=`Primitive.${i}`,a})(a),i)),{});export{i as P};
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as t}from"react/jsx-runtime";import e,{createContext as n,useContext as r,useId as i,useState as o,useEffect as a,useRef as s,useLayoutEffect as c}from"react";import{P as d}from"./index-XF8itt-H.js";import{u as l}from"./index-wRElCyvx.js";import{c as u}from"./mergeProps-0RucjqeH.js";import{B as m}from"./index-CfC8-kd8.js";import{K as p}from"./keyboard-BKF7hXqL.js";const h=n(void 0),v=()=>{const t=r(h);if(!t)throw new Error("Collapsible compound components must be used within a CollapsiblePrimitive.Root component");return t},f=e.forwardRef((({children:e,defaultOpen:n=!1,open:r,onOpenChange:o,disabled:a=!1,transitionDuration:s,transitionTimingFunction:c="linear",...u},m)=>{const p=i(),[v,f]=l(r,n,o);return t(h.Provider,{value:{open:v,onOpenChange:t=>{a||f(t)},disabled:a,contentId:p,transitionDuration:s,transitionTimingFunction:c},children:t(d.div,{...u,ref:m,"data-state":v?"open":"closed","data-disabled":a?"":void 0,children:e})})}));f.displayName="CollapsiblePrimitiveRoot";const g=e.forwardRef((({children:n,className:r,asChild:i=!1,forceMount:l=!1,style:m,...p},h)=>{const{open:f,contentId:g,transitionDuration:y,transitionTimingFunction:C}=v(),b=function(){const[t,e]=o(!1);return a((()=>{if("undefined"==typeof window||"function"!=typeof window.matchMedia)return;const t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=t=>{e(t.matches)};return n(t),"function"==typeof t.addEventListener?(t.addEventListener("change",n),()=>t.removeEventListener("change",n)):(t.addListener(n),()=>t.removeListener(n))}),[]),t}(),w=void 0!==y?y:b?0:300,[P,F]=o(f?void 0:0),[x,T]=o(f||l),[,D]=o(0),A=s(),R=s(),E=s(null),$=s(0),j=s(0),q=s(),L=s(f||l);a((()=>{const t=requestAnimationFrame((()=>{L.current=!1}));return()=>cancelAnimationFrame(t)}),[]),c((()=>{A.current&&clearTimeout(A.current),R.current&&cancelAnimationFrame(R.current);const t=E.current;if(!t)return;q.current=q.current||{transitionDuration:t.style.transitionDuration,transitionProperty:t.style.transitionProperty,transitionTimingFunction:t.style.transitionTimingFunction},t.style.transitionDuration="0s",t.style.transitionProperty="none";const e=t.getBoundingClientRect(),n=e.height||t.scrollHeight,r=e.width||t.scrollWidth;return $.current=n,j.current=r,L.current||(t.style.transitionDuration=q.current.transitionDuration,t.style.transitionProperty=q.current.transitionProperty,t.style.transitionTimingFunction=q.current.transitionTimingFunction),0===w?(F(f?void 0:0),T(!(!f&&!l)),void(f&&D((t=>t+1)))):L.current&&f?(T(!0),void F(void 0)):(f?(T(!0),F(0),R.current=requestAnimationFrame((()=>{E.current,R.current=requestAnimationFrame((()=>{E.current&&F($.current??E.current.scrollHeight)}))})),A.current=setTimeout((()=>{F(void 0)}),w)):(F($.current??t.scrollHeight),R.current=requestAnimationFrame((()=>{E.current,R.current=requestAnimationFrame((()=>{F(0)}))})),A.current=setTimeout((()=>{l||T(!1)}),w)),()=>{A.current&&clearTimeout(A.current),R.current&&cancelAnimationFrame(R.current)})}),[f,w,l,n]);if(!(f||x||l))return null;const N={...m,overflow:"hidden",height:void 0!==P?`${P}px`:void 0,"--radix-collapsible-content-height":void 0!==$.current?`${$.current}px`:void 0,"--radix-collapsible-content-width":void 0!==j.current?`${j.current}px`:void 0,"--rad-collapsible-content-height":void 0!==$.current?`${$.current}px`:void 0,"--rad-collapsible-content-width":void 0!==j.current?`${j.current}px`:void 0,...w>0?{transition:`height ${w}ms ${C}`}:{}},k=i&&e.isValidElement(n);return t(d.div,{id:g,ref:u(h,E),"aria-hidden":!f,"data-state":f?"open":"closed",className:r,style:N,asChild:k,...p,children:n})}));g.displayName="CollapsiblePrimitiveContent";const y=e.forwardRef((({children:e,asChild:n=!1,...r},i)=>{const{open:o,onOpenChange:a,disabled:s,contentId:c}=v();return t(m,{...r,"aria-controls":c,"aria-expanded":o,"data-state":o?"open":"closed","data-disabled":s?"true":void 0,ref:i,onClick:t=>{r.onClick?.(t),s||a(!o)},onKeyDown:t=>{r.onKeyDown?.(t),t.defaultPrevented||t.key===p.ESCAPE&&o&&!s&&a(!1)},asChild:n,children:e})}));y.displayName="CollapsiblePrimitiveTrigger";const C=()=>(console.warn("Direct usage of CollapsiblePrimitive is not supported. Please use CollapsiblePrimitive.Root, CollapsiblePrimitive.Content, etc. instead."),null);C.Root=f,C.Content=g,C.Trigger=y;export{C};
@@ -0,0 +1 @@
1
+ 'use client';const a=(a,t)=>t?Object.fromEntries(Object.entries(t).filter((([a,e])=>void 0!==e&&""!==e&&!1!==e)).map((([a,t])=>[`data-${e(a)}`,!0===t?"":t]))):{},e=a=>a.replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),t=(...a)=>Object.assign({},...a.filter(Boolean)),o=a=>a?{"data-color":a}:{};export{t as a,o as b,a as c};
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import t,{createContext as r,useRef as n,useState as l,useId as a,useEffect as o,forwardRef as i,useContext as s}from"react";import{P as d}from"./index-XF8itt-H.js";import{B as u}from"./index-CfC8-kd8.js";import{K as c}from"./keyboard-BKF7hXqL.js";import{m as f}from"./mergeRefs-B8eZ_q-T.js";const b=r({orientation:"horizontal",loop:!0,dir:"ltr",disableTabIndexing:!1,mode:"default"}),m=t.forwardRef((({children:t,orientation:r="horizontal",loop:n=!0,"aria-label":l,"aria-labelledby":a,disableTabIndexing:o=!1,mode:i="default",dir:s="ltr",asChild:u=!1,...c},f)=>{const m={orientation:r,loop:n,disableTabIndexing:o,dir:s,mode:i};return e(b.Provider,{value:m,children:e(d.div,{"aria-orientation":"both"===r?void 0:r,"aria-label":l,"aria-labelledby":a,ref:f,asChild:u,...c,children:t})})}));m.displayName="RovingFocusRoot";const h=r({focusedItemId:null,setFocusedItemId:()=>{},focusItems:[],setFocusItems:()=>{},addFocusItem:()=>{},groupRef:null,itemRefs:new Map,registerItemRef:()=>{},unregisterItemRef:()=>{}}),I=i((({children:r,"aria-label":l,"aria-labelledby":i,role:d,type:m,handleRightKeyDown:I,handleLeftKeyDown:p,domId:g,...R},y)=>{const v=a(),O=g??v,D=n(null),{focusedItemId:C,setFocusedItemId:F,addFocusItem:N,focusItems:k,itemRefs:x,registerItemRef:T,unregisterItemRef:w}=s(h),{orientation:A,loop:P,disableTabIndexing:_,dir:E}=s(b),W=t.Children.toArray(r)[0],j=!0===W?.props?.disabled,L="a"===("string"==typeof W?.type?W.type.toLowerCase():"")||null!=W?.props?.href,M=d??(L?void 0:"button"),z=m??(L?void 0:"button"),G=C===O,K=_||!j&&G?0:-1;o((()=>(T(O,D),N(O),()=>{w(O)})),[O]);const U=e=>{F(e);const t=x.get(e);t?.current&&t.current.focus()},B=(e,t)=>{let r=e;for(let e=0;e<k.length;e++){if(r+=t,P)r<0&&(r=k.length-1),r>=k.length&&(r=0);else if(r<0||r>=k.length)return-1;const e=k[r],n=x.get(e);if(!n?.current)continue;if(!("true"===n.current.getAttribute("data-child-disabled")))return r}return-1},H=()=>{const e=k.indexOf(O),t=B(e,-1);-1!==t&&U(k[t])},S=()=>{const e=k.indexOf(O),t=B(e,1);-1!==t&&U(k[t])};return e(u,{asChild:!0,onFocus:e=>{j&&e.target.blur(),j||F(O)},tabIndex:K,ref:f(D,y),id:O,onKeyDown:e=>{if(!j)switch(e.key){case c.ARROW_UP:e.preventDefault(),"vertical"!==A&&"both"!==A||H();break;case c.ARROW_LEFT:e.preventDefault(),p&&p(),"horizontal"!==A&&"both"!==A||("rtl"===E?S():H());break;case c.ARROW_DOWN:e.preventDefault(),"vertical"!==A&&"both"!==A||S();break;case c.ARROW_RIGHT:e.preventDefault(),I&&I(),"horizontal"!==A&&"both"!==A||("rtl"===E?H():S());break;case c.HOME:e.preventDefault(),(()=>{if(k.length>0){const e=B(-1,1);-1!==e&&U(k[e])}})();break;case c.END:e.preventDefault(),(()=>{if(k.length>0){const e=B(k.length,-1);-1!==e&&U(k[e])}})();case c.TAB:}},"data-child-disabled":j,role:M,type:z,"aria-selected":G,"aria-disabled":j,"aria-label":l,"aria-labelledby":i,...R,children:r})}));I.displayName="RovingFocusItem";const p={Root:m,Group:({children:r,"aria-label":i,"aria-labelledby":s,...u})=>{const c=n(null),[f,b]=l([]),[m,I]=l(null),p=a(),g=n(new Map),R=t.useCallback((e=>e.find((e=>{const t=g.current.get(e);return"true"!==t?.current?.getAttribute("data-child-disabled")}))??null),[]),y=t.useCallback(((e,t)=>{g.current.set(e,t)}),[]),v=t.useCallback((e=>{g.current.delete(e),b((t=>t.filter((t=>t!==e))))}),[]),O=t.useCallback((e=>{"undefined"==typeof window?b((t=>t.includes(e)?t:[...t,e])):b((t=>{if(t.includes(e))return t;const r=Array.from(g.current.entries()).filter((([,e])=>e.current));r.sort((([,e],[,t])=>{const r=e.current,n=t.current;if(!r||!n)return 0;const l=r.compareDocumentPosition(n);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0}));const n=r.map((([e])=>e));return n.length===t.length&&n.every(((e,r)=>e===t[r]))?t:n}))}),[]);o((()=>{if(0===f.length)return void(null!==m&&I(null));const e=m?g.current.get(m):null;if(!(null!=m&&"true"!==e?.current?.getAttribute("data-child-disabled"))){const e=R(f);e!==m&&I(e)}}),[R,f,m,I]);const D={focusedItemId:m,setFocusedItemId:I,focusItems:f,setFocusItems:b,addFocusItem:O,groupRef:c,itemRefs:g.current,registerItemRef:y,unregisterItemRef:v};return e(h.Provider,{value:D,children:e(d.div,{id:p,ref:c,role:"group","aria-label":i,"aria-labelledby":s,asChild:!0,...u,children:r})})},Item:I};export{p as R};
@@ -0,0 +1 @@
1
+ 'use client';const E=Object.freeze({ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",CONTEXT_MENU:"ContextMenu",END:"End",ENTER:"Enter",ESCAPE:"Escape",F10:"F10",HOME:"Home",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SPACE:" ",TAB:"Tab"});function e(e){return e===E.ENTER||e===E.SPACE}function r(e,r=!1){return e===E.CONTEXT_MENU||r&&e===E.F10}export{E as K,r as a,e as i};
@@ -0,0 +1 @@
1
+ 'use client';import t from"react";const n=/^on[A-Z]/,e=(()=>{const n=parseInt(t.version,10);return!Number.isNaN(n)&&n>=19})(),o=(...t)=>{if(!t.every((t=>null==t)))return e?n=>{const e=t.map((()=>null));return t.forEach(((t,o)=>{if(t)if("function"==typeof t){const r=t(n);"function"==typeof r&&(e[o]=r)}else t.current=n})),()=>{t.forEach(((t,n)=>{if(t)if("function"==typeof t){const o=e[n];o?o():t(null)}else t.current=null}))}}:n=>{for(const e of t)e&&("function"==typeof e?e(n):e.current=n)}},r=n=>{if(!t.isValidElement(n))return;return(e?n.props.ref:n.ref)??void 0},f=(t,e)=>{const o={...t,...e};for(const r of Object.keys(e)){const f=t[r],c=e[r];n.test(r)&&"function"==typeof f&&"function"==typeof c?o[r]=(...t)=>{c(...t);const n=t[0];n&&!0===n.defaultPrevented||f(...t)}:"className"===r&&f&&c?o[r]=`${f} ${c}`:"style"===r&&f&&c&&(o[r]={...f,...c})}return o};export{o as c,r as g,f as m};
@@ -0,0 +1 @@
1
+ 'use client';import e from"react";import{T as t}from"./ThemeContext-Sm-iNANd.js";const o=/([a-z0-9])([A-Z])/g,r=(e="")=>e.replace(o,"$1-$2").toLowerCase(),s=(o="",s="",a="")=>{const c=e.useContext(t),n=o||c?.classNamespace||"";if(!n||!s)return"";const m=`${n}-${r(s)}`;return a?`${m}-${r(a)}`:m};export{s as u};