@iress-oss/ids-components 0.0.1-dev.14 → 0.0.1-dev.15

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 (772) hide show
  1. package/dist/AutocompleteNoResults-Z4L_A4F_.js +12 -0
  2. package/dist/ComboboxHiddenInput-gJl1k-Vp.js +32 -0
  3. package/dist/FieldAppendToLabel-BwLGkQ_D.js +76 -0
  4. package/dist/InputBase-Dt3vHG19.js +56 -0
  5. package/dist/Loading.module-PM8ehb0Z.js +13 -0
  6. package/dist/LoadingSuspense-fgJdyrWn.js +5784 -0
  7. package/dist/LogoFromSrc-Dr3xwNJa.js +59 -0
  8. package/dist/MenuItem.module-xNOwGiI0.js +24 -0
  9. package/dist/Popover.module-BzjyEvrY.js +11 -0
  10. package/dist/PopoverProvider-BqnPfQtY.js +138 -0
  11. package/dist/SelectControl-IZ6Sl4ap.js +47 -0
  12. package/dist/SlideoutProvider-CQh140HM.js +200 -0
  13. package/dist/SliderTicks-8ffd5McY.js +78 -0
  14. package/dist/TabSet.module-p87tRckl.js +13 -0
  15. package/dist/Table.module-CdZFi754.js +32 -0
  16. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  17. package/dist/components/Alert/Alert.js +11 -0
  18. package/dist/components/Alert/Alert.types.js +9 -0
  19. package/dist/components/Alert/index.js +6 -0
  20. package/dist/components/Autocomplete/Autocomplete.js +44 -0
  21. package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
  22. package/dist/components/Autocomplete/components/AutocompleteInstructions.js +12 -0
  23. package/dist/components/Autocomplete/components/AutocompleteNoResults.js +5 -0
  24. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +177 -0
  25. package/dist/components/Autocomplete/index.js +6 -0
  26. package/dist/components/Badge/Badge.js +49 -0
  27. package/dist/components/Badge/Badge.types.js +15 -0
  28. package/dist/components/Badge/index.js +7 -0
  29. package/dist/components/Button/Button.js +10 -0
  30. package/dist/components/Button/Button.types.js +20 -0
  31. package/dist/components/Button/CloseButton/CloseButton.js +7 -0
  32. package/dist/components/Button/CloseButton/CloseButton.types.js +1 -0
  33. package/dist/components/Button/index.js +11 -0
  34. package/dist/components/ButtonGroup/ButtonGroup.js +72 -0
  35. package/dist/components/ButtonGroup/ButtonGroup.types.js +1 -0
  36. package/dist/components/ButtonGroup/ButtonGroupProvider.js +34 -0
  37. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +6 -0
  38. package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +6 -0
  39. package/dist/components/ButtonGroup/index.js +6 -0
  40. package/dist/components/Card/Card.js +50 -0
  41. package/dist/components/Card/Card.types.js +5 -0
  42. package/dist/components/Card/components/ButtonCard.js +38 -0
  43. package/dist/components/Card/components/LinkCard.js +37 -0
  44. package/dist/components/Card/helpers/composeIDSCard.js +27 -0
  45. package/dist/components/Card/helpers/composeIDSCardSlots.js +33 -0
  46. package/dist/components/Card/index.js +15 -0
  47. package/dist/components/Checkbox/Checkbox.js +15 -0
  48. package/dist/components/Checkbox/Checkbox.types.js +1 -0
  49. package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +19 -0
  50. package/dist/components/Checkbox/index.js +4 -0
  51. package/dist/components/CheckboxGroup/CheckboxGroup.js +100 -0
  52. package/dist/components/CheckboxGroup/CheckboxGroup.types.js +11 -0
  53. package/dist/components/CheckboxGroup/CheckboxGroupContext.js +5 -0
  54. package/dist/components/CheckboxGroup/index.js +7 -0
  55. package/dist/components/CheckboxMark/CheckboxMark.js +40 -0
  56. package/dist/components/CheckboxMark/CheckboxMark.types.js +16 -0
  57. package/dist/components/CheckboxMark/index.js +6 -0
  58. package/dist/components/Col/Col.js +33 -0
  59. package/dist/components/Col/Col.types.js +66 -0
  60. package/dist/components/Col/index.js +12 -0
  61. package/dist/components/Combobox/Combobox.js +47 -0
  62. package/dist/components/Combobox/Combobox.types.js +1 -0
  63. package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +45 -0
  64. package/dist/components/Combobox/MultiCombobox/MultiCombobox.types.js +1 -0
  65. package/dist/components/Combobox/components/ComboboxHiddenInput.js +8 -0
  66. package/dist/components/Combobox/components/ComboboxResults.js +40 -0
  67. package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +39 -0
  68. package/dist/components/Combobox/hooks/useComboboxFlags.js +15 -0
  69. package/dist/components/Combobox/hooks/useComboboxInlineCompletion.js +63 -0
  70. package/dist/components/Combobox/index.js +5 -0
  71. package/dist/components/Container/Container.js +21 -0
  72. package/dist/components/Container/Container.types.js +4 -0
  73. package/dist/components/Container/index.js +6 -0
  74. package/dist/components/Divider/Divider.js +21 -0
  75. package/dist/components/Divider/Divider.types.js +4 -0
  76. package/dist/components/Divider/index.js +6 -0
  77. package/dist/components/Expander/Expander.js +80 -0
  78. package/dist/components/Expander/Expander.types.js +6 -0
  79. package/dist/components/Expander/index.js +7 -0
  80. package/dist/components/Field/Field.js +71 -0
  81. package/dist/components/Field/Field.types.js +1 -0
  82. package/dist/components/Field/FieldGroup/FieldGroup.js +77 -0
  83. package/dist/components/Field/FieldGroup/FieldGroup.types.js +1 -0
  84. package/dist/components/Field/components/FieldAppendToLabel.js +42 -0
  85. package/dist/components/Field/components/FieldLegend.js +6 -0
  86. package/dist/components/Field/helpers/getUniqueItemsByKey.js +8 -0
  87. package/dist/components/Field/index.js +6 -0
  88. package/dist/components/Filter/Filter.js +44 -0
  89. package/dist/components/Filter/Filter.types.js +1 -0
  90. package/dist/components/Filter/components/FilterLabel.js +10 -0
  91. package/dist/components/Filter/components/FilterResetButton.js +38 -0
  92. package/dist/components/Filter/components/FilterSearch.js +38 -0
  93. package/dist/components/Filter/hooks/useFilterFlags.js +25 -0
  94. package/dist/components/Filter/index.js +4 -0
  95. package/dist/components/Form/Form.js +6 -0
  96. package/dist/components/Form/Form.types.js +4 -0
  97. package/dist/components/Form/FormContext.js +7 -0
  98. package/dist/components/Form/FormField/FormField.js +89 -0
  99. package/dist/components/Form/FormField/FormField.types.js +4 -0
  100. package/dist/components/Form/FormField/FormFieldset.js +83 -0
  101. package/dist/components/Form/FormField/helpers/getErrorTypeMessage.js +19 -0
  102. package/dist/components/Form/FormField/helpers/transformCustomRulesToValidateRule.js +34 -0
  103. package/dist/components/Form/HookForm/HookForm.js +12 -0
  104. package/dist/components/Form/components/FormValidationSummary.js +24 -0
  105. package/dist/components/Form/hooks/useNoDefaultValueInForms.js +15 -0
  106. package/dist/components/Form/index.js +13 -0
  107. package/dist/components/HeadingWithDeprecatedFallback/HeadingWithDeprecatedFallback.js +14 -0
  108. package/dist/components/Hide/Hide.js +7 -0
  109. package/dist/components/Hide/Hide.types.js +5 -0
  110. package/dist/components/Hide/helpers/composeHideClasses.js +39 -0
  111. package/dist/components/Hide/index.js +7 -0
  112. package/dist/components/Icon/Icon.js +39 -0
  113. package/dist/components/Icon/Icon.types.js +31 -0
  114. package/dist/components/Icon/index.js +15 -0
  115. package/dist/components/Inline/Inline.js +40 -0
  116. package/dist/components/Inline/Inline.types.js +4 -0
  117. package/dist/components/Inline/index.js +6 -0
  118. package/dist/components/Input/ClearButton/ClearButton.js +20 -0
  119. package/dist/components/Input/Input.js +14 -0
  120. package/dist/components/Input/Input.types.js +16 -0
  121. package/dist/components/Input/InputBase/InputBase.js +9 -0
  122. package/dist/components/Input/InputBase/InputBase.types.js +1 -0
  123. package/dist/components/Input/index.js +7 -0
  124. package/dist/components/InputCurrency/InputCurrency.js +8 -0
  125. package/dist/components/InputCurrency/InputCurrency.types.js +1 -0
  126. package/dist/components/InputCurrency/index.js +4 -0
  127. package/dist/components/Label/Label.js +6 -0
  128. package/dist/components/Label/Label.types.js +1 -0
  129. package/dist/components/Label/LabelBase/LabelBase.js +70 -0
  130. package/dist/components/Label/LabelBase/LabelBase.types.js +1 -0
  131. package/dist/components/Label/index.js +4 -0
  132. package/dist/components/Menu/Menu.js +64 -0
  133. package/dist/components/Menu/Menu.types.js +10 -0
  134. package/dist/components/Menu/MenuDivider/MenuDivider.js +38 -0
  135. package/dist/components/Menu/MenuHeading/MenuHeading.js +8 -0
  136. package/dist/components/Menu/MenuItem/MenuItem.js +11 -0
  137. package/dist/components/Menu/MenuItem/MenuItem.types.js +6 -0
  138. package/dist/components/Menu/MenuItem/hooks/useMenuItemAria.js +17 -0
  139. package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +47 -0
  140. package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +15 -0
  141. package/dist/components/Menu/MenuItem/hooks/useMenuItemInteractions.js +67 -0
  142. package/dist/components/Menu/MenuItem/hooks/useMenuItemRole.js +9 -0
  143. package/dist/components/Menu/MenuProvider.js +67 -0
  144. package/dist/components/Menu/MenuText/MenuText.js +39 -0
  145. package/dist/components/Menu/helpers/mapMenuItems.js +47 -0
  146. package/dist/components/Menu/hooks/useMenu.js +6 -0
  147. package/dist/components/Menu/hooks/useMenuAria.js +19 -0
  148. package/dist/components/Menu/hooks/useMenuComposite.js +9 -0
  149. package/dist/components/Menu/hooks/useMenuRole.js +13 -0
  150. package/dist/components/Menu/hooks/useMenuStyles.js +26 -0
  151. package/dist/components/Menu/index.js +29 -0
  152. package/dist/components/Modal/Modal.js +16 -0
  153. package/dist/components/Modal/Modal.types.js +4 -0
  154. package/dist/components/Modal/ModalProvider.js +32 -0
  155. package/dist/components/Modal/hooks/useIDSProvidedModal.js +13 -0
  156. package/dist/components/Modal/hooks/useModal.js +20 -0
  157. package/dist/components/Modal/index.js +11 -0
  158. package/dist/components/Navbar/Navbar.js +13 -0
  159. package/dist/components/Navbar/Navbar.types.js +4 -0
  160. package/dist/components/Navbar/components/HomeLinkContent.js +6 -0
  161. package/dist/components/Navbar/components/LogoFromSrc.js +6 -0
  162. package/dist/components/Navbar/components/NavbarLogo.js +8 -0
  163. package/dist/components/Navbar/index.js +6 -0
  164. package/dist/components/Panel/Panel.js +36 -0
  165. package/dist/components/Panel/Panel.types.js +12 -0
  166. package/dist/components/Panel/index.js +8 -0
  167. package/dist/components/Placeholder/Placeholder.js +42 -0
  168. package/dist/components/Placeholder/Placeholder.types.js +1 -0
  169. package/dist/components/Placeholder/index.js +4 -0
  170. package/dist/components/Popover/InputPopover/InputPopover.js +87 -0
  171. package/dist/components/Popover/InputPopover/InputPopover.types.js +1 -0
  172. package/dist/components/Popover/InputPopover/InputPopoverActivator.js +62 -0
  173. package/dist/components/Popover/InputPopover/InputPopoverProvider.js +103 -0
  174. package/dist/components/Popover/Popover.js +97 -0
  175. package/dist/components/Popover/Popover.types.js +15 -0
  176. package/dist/components/Popover/PopoverProvider.js +15 -0
  177. package/dist/components/Popover/components/NestedPopoverActivator.js +9 -0
  178. package/dist/components/Popover/components/PopoverActivator.js +87 -0
  179. package/dist/components/Popover/components/PopoverContent.js +59 -0
  180. package/dist/components/Popover/helpers/composeFloatingProps.js +37 -0
  181. package/dist/components/Popover/helpers/composePopoverWidth.js +4 -0
  182. package/dist/components/Popover/helpers/handlePopoverTabKey.js +30 -0
  183. package/dist/components/Popover/helpers/hasFocus.js +8 -0
  184. package/dist/components/Popover/helpers/waitUntilTrue.js +12 -0
  185. package/dist/components/Popover/hooks/usePopover.js +6 -0
  186. package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +36 -0
  187. package/dist/components/Popover/hooks/usePopoverAria.js +18 -0
  188. package/dist/components/Popover/hooks/usePopoverImperativeHandle.js +25 -0
  189. package/dist/components/Popover/hooks/usePopoverItem.js +18 -0
  190. package/dist/components/Popover/hooks/usePopoverNavigation.js +32 -0
  191. package/dist/components/Popover/hooks/usePopoverState.js +29 -0
  192. package/dist/components/Popover/index.js +13 -0
  193. package/dist/components/Progress/Progress.js +52 -0
  194. package/dist/components/Progress/Progress.types.js +1 -0
  195. package/dist/components/Progress/index.js +4 -0
  196. package/dist/components/Provider/Provider.js +38 -0
  197. package/dist/components/Provider/index.js +4 -0
  198. package/dist/components/Radio/Radio.js +11 -0
  199. package/dist/components/Radio/Radio.types.js +1 -0
  200. package/dist/components/Radio/helpers/mapRadioGroupOptions.js +19 -0
  201. package/dist/components/Radio/index.js +4 -0
  202. package/dist/components/RadioGroup/RadioGroup.js +86 -0
  203. package/dist/components/RadioGroup/RadioGroup.types.js +12 -0
  204. package/dist/components/RadioGroup/RadioGroupContext.js +5 -0
  205. package/dist/components/RadioGroup/index.js +7 -0
  206. package/dist/components/Readonly/Readonly.js +42 -0
  207. package/dist/components/Readonly/Readonly.types.js +1 -0
  208. package/dist/components/Readonly/index.js +4 -0
  209. package/dist/components/RichSelect/RichSelect.js +41 -0
  210. package/dist/components/RichSelect/RichSelect.types.js +1 -0
  211. package/dist/components/RichSelect/SelectBody/SelectBody.js +55 -0
  212. package/dist/components/RichSelect/SelectBody/SelectBody.types.js +1 -0
  213. package/dist/components/RichSelect/SelectCreate/SelectCreate.js +62 -0
  214. package/dist/components/RichSelect/SelectCreate/SelectCreate.types.js +1 -0
  215. package/dist/components/RichSelect/SelectHeading/SelectHeading.js +39 -0
  216. package/dist/components/RichSelect/SelectHeading/SelectHeading.types.js +1 -0
  217. package/dist/components/RichSelect/SelectLabel/SelectLabel.js +12 -0
  218. package/dist/components/RichSelect/SelectLabel/SelectLabel.types.js +1 -0
  219. package/dist/components/RichSelect/SelectMenu/SelectMenu.js +43 -0
  220. package/dist/components/RichSelect/SelectMenu/SelectMenu.types.js +1 -0
  221. package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +38 -0
  222. package/dist/components/RichSelect/SelectSearch/SelectSearch.js +38 -0
  223. package/dist/components/RichSelect/SelectSearch/SelectSearch.types.js +1 -0
  224. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +8 -0
  225. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.types.js +1 -0
  226. package/dist/components/RichSelect/SelectTags/SelectTags.js +44 -0
  227. package/dist/components/RichSelect/SelectTags/SelectTags.types.js +1 -0
  228. package/dist/components/RichSelect/components/SelectActivator.js +7 -0
  229. package/dist/components/RichSelect/components/SelectHiddenInput.js +29 -0
  230. package/dist/components/RichSelect/components/SelectOptions.js +39 -0
  231. package/dist/components/RichSelect/hooks/useRichSelectState.js +18 -0
  232. package/dist/components/RichSelect/index.js +16 -0
  233. package/dist/components/Row/Row.js +40 -0
  234. package/dist/components/Row/Row.types.js +4 -0
  235. package/dist/components/Row/index.js +6 -0
  236. package/dist/components/Select/Select.js +14 -0
  237. package/dist/components/Select/Select.types.js +1 -0
  238. package/dist/components/Select/SelectOption/SelectOption.js +9 -0
  239. package/dist/components/Select/components/SelectControl.js +9 -0
  240. package/dist/components/Select/components/SelectReadonly.js +39 -0
  241. package/dist/components/Select/helpers/mapSelectOptions.js +21 -0
  242. package/dist/components/Select/helpers/nodesToSelectOptions.js +9 -0
  243. package/dist/components/Select/index.js +9 -0
  244. package/dist/components/Skeleton/Skeleton.js +44 -0
  245. package/dist/components/Skeleton/Skeleton.types.js +6 -0
  246. package/dist/components/Skeleton/index.js +7 -0
  247. package/dist/components/SkipLink/SkipLink.js +30 -0
  248. package/dist/components/SkipLink/SkipLink.types.js +1 -0
  249. package/dist/components/SkipLink/index.js +4 -0
  250. package/dist/components/Slideout/Slideout.js +18 -0
  251. package/dist/components/Slideout/Slideout.types.js +14 -0
  252. package/dist/components/Slideout/SlideoutProvider.js +8 -0
  253. package/dist/components/Slideout/components/SlideoutInner.js +8 -0
  254. package/dist/components/Slideout/hooks/useIDSProvidedSlideout.js +13 -0
  255. package/dist/components/Slideout/hooks/useSlideout.js +20 -0
  256. package/dist/components/Slideout/index.js +16 -0
  257. package/dist/components/Slider/Slider.js +12 -0
  258. package/dist/components/Slider/Slider.types.js +1 -0
  259. package/dist/components/Slider/components/SliderTicks.js +10 -0
  260. package/dist/components/Slider/index.js +4 -0
  261. package/dist/components/Spinner/Spinner.js +6 -0
  262. package/dist/components/Spinner/Spinner.types.js +1 -0
  263. package/dist/components/Spinner/index.js +4 -0
  264. package/dist/components/Stack/Stack.js +26 -0
  265. package/dist/components/Stack/Stack.types.js +4 -0
  266. package/dist/components/Stack/index.js +6 -0
  267. package/dist/components/TabSet/Tab/Tab.js +99 -0
  268. package/dist/components/TabSet/Tab/Tab.types.js +1 -0
  269. package/dist/components/TabSet/TabSet.js +59 -0
  270. package/dist/components/TabSet/TabSet.types.js +6 -0
  271. package/dist/components/TabSet/TabSetProvider.js +50 -0
  272. package/dist/components/TabSet/components/TabSetItem.js +45 -0
  273. package/dist/components/TabSet/helpers/mapTabs.js +33 -0
  274. package/dist/components/TabSet/hooks/useTabSetItems.js +6 -0
  275. package/dist/components/TabSet/index.js +11 -0
  276. package/dist/components/Table/Table.js +17 -0
  277. package/dist/components/Table/Table.types.js +23 -0
  278. package/dist/components/Table/TableBody/TableBody.js +125 -0
  279. package/dist/components/Table/TableBody/TableBody.types.js +1 -0
  280. package/dist/components/Table/TableContext.js +11 -0
  281. package/dist/components/Table/TableFormattedValue/TableFormattedValue.js +17 -0
  282. package/dist/components/Table/TableFormattedValue/TableFormattedValue.types.js +1 -0
  283. package/dist/components/Table/TableProvider.js +34 -0
  284. package/dist/components/Table/components/TableBodyCell.js +31 -0
  285. package/dist/components/Table/components/TableEmpty.js +12 -0
  286. package/dist/components/Table/components/TableHeader.js +8 -0
  287. package/dist/components/Table/components/TableHeaderCell.js +8 -0
  288. package/dist/components/Table/components/TableRows.js +49 -0
  289. package/dist/components/Table/components/TableSortButton.js +7 -0
  290. package/dist/components/Table/helpers/composeIDSTableColumnDefs.js +42 -0
  291. package/dist/components/Table/helpers/composeIDSTableInitialSorting.js +10 -0
  292. package/dist/components/Table/helpers/findColumnByKey.js +4 -0
  293. package/dist/components/Table/helpers/getFormatFromValue.js +11 -0
  294. package/dist/components/Table/helpers/hasColumns.js +4 -0
  295. package/dist/components/Table/hooks/useIDSTableColumnSort.js +24 -0
  296. package/dist/components/Table/hooks/useIDSTableColumnStyles.js +25 -0
  297. package/dist/components/Table/hooks/useTable.js +6 -0
  298. package/dist/components/Table/index.js +15 -0
  299. package/dist/components/Tag/Tag.js +8 -0
  300. package/dist/components/Tag/Tag.types.js +1 -0
  301. package/dist/components/Tag/TagInput/TagInput.js +8 -0
  302. package/dist/components/Tag/TagInput/TagInput.types.js +1 -0
  303. package/dist/components/Tag/components/TagListInput/TagListInput.js +8 -0
  304. package/dist/components/Tag/components/TagListInput/TagListInput.types.js +1 -0
  305. package/dist/components/Tag/index.js +5 -0
  306. package/dist/components/Text/Text.js +34 -0
  307. package/dist/components/Text/Text.types.js +19 -0
  308. package/dist/components/Text/index.js +6 -0
  309. package/dist/components/Toaster/Toast/Toast.js +13 -0
  310. package/dist/components/Toaster/Toast/Toast.types.js +10 -0
  311. package/dist/components/Toaster/Toast/ToastAnimated.js +9 -0
  312. package/dist/components/Toaster/Toast/ToastIcon.js +6 -0
  313. package/dist/components/Toaster/Toaster.js +11 -0
  314. package/dist/components/Toaster/Toaster.types.js +26 -0
  315. package/dist/components/Toaster/ToasterProvider.js +7 -0
  316. package/dist/components/Toaster/hooks/useToaster.js +26 -0
  317. package/dist/components/Toaster/index.js +17 -0
  318. package/dist/components/Toggle/Toggle.js +101 -0
  319. package/dist/components/Toggle/Toggle.types.js +11 -0
  320. package/dist/components/Toggle/index.js +7 -0
  321. package/dist/components/Tooltip/Tooltip.js +77 -0
  322. package/dist/components/Tooltip/Tooltip.types.js +1 -0
  323. package/dist/components/Tooltip/index.js +4 -0
  324. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +51 -0
  325. package/dist/components/ValidationMessage/ValidationBase/ValidationBase.types.js +1 -0
  326. package/dist/components/ValidationMessage/ValidationLink/ValidationLink.js +21 -0
  327. package/dist/components/ValidationMessage/ValidationLink/ValidationLink.types.js +1 -0
  328. package/dist/components/ValidationMessage/ValidationMessage.js +8 -0
  329. package/dist/components/ValidationMessage/ValidationMessage.types.js +1 -0
  330. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +69 -0
  331. package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.types.js +1 -0
  332. package/dist/components/ValidationMessage/index.js +8 -0
  333. package/dist/constants/index.css +1 -0
  334. package/dist/constants/index.scss +2 -0
  335. package/dist/constants.js +193 -0
  336. package/dist/enums.js +22 -0
  337. package/dist/floating-ui.react-nmA48tb2.js +3463 -0
  338. package/dist/fuzzysort-eoXOpoo6.js +395 -0
  339. package/dist/helpers/dom/closestCrossShadow.js +26 -0
  340. package/dist/helpers/dom/domUtils.js +12 -0
  341. package/dist/helpers/dom/focusableElements.js +10 -0
  342. package/dist/helpers/dom/getActiveElement.js +9 -0
  343. package/dist/helpers/dom/hasShadowDom.js +4 -0
  344. package/dist/helpers/form/getFormControlValueAsString.js +4 -0
  345. package/dist/helpers/form/getFormControlValueAsStringIfDefined.js +8 -0
  346. package/dist/helpers/form/getValueAsEvent.js +7 -0
  347. package/dist/helpers/form/isValidFormInputElement.js +4 -0
  348. package/dist/helpers/formatting/capitalizeFirstLetter.js +4 -0
  349. package/dist/helpers/formatting/formatCurrency.js +22 -0
  350. package/dist/helpers/formatting/formatDate.js +23 -0
  351. package/dist/helpers/formatting/formatDateTime.js +54 -0
  352. package/dist/helpers/formatting/formatObjectKey.js +4 -0
  353. package/dist/helpers/formatting/formatPercentage.js +7 -0
  354. package/dist/helpers/formatting/stringReplacer.js +9 -0
  355. package/dist/helpers/formatting/toArray.js +4 -0
  356. package/dist/helpers/formatting/toCSSLengthValue.js +7 -0
  357. package/dist/helpers/label-value/composeLabelValueDescriptor.js +13 -0
  358. package/dist/helpers/label-value/getQueryRangeExclusive.js +14 -0
  359. package/dist/helpers/label-value/getValueFromLabelValues.js +9 -0
  360. package/dist/helpers/label-value/highlightQueryInLabel.js +9 -0
  361. package/dist/helpers/label-value/highlightQueryInLabelValue.js +8 -0
  362. package/dist/helpers/label-value/searchLabelValues.js +10 -0
  363. package/dist/helpers/responsive/getResponsiveLayoutModifiers.js +11 -0
  364. package/dist/helpers/responsive/getResponsivePaddingClasses.js +11 -0
  365. package/dist/helpers/transition/getTransitionDuration.js +10 -0
  366. package/dist/helpers/transition/timeStringToNumber.js +4 -0
  367. package/dist/helpers/utility/generateScopedName.js +9 -0
  368. package/dist/helpers/utility/idsLogger.js +10 -0
  369. package/dist/helpers/utility/propagateTestid.js +4 -0
  370. package/dist/hooks/index.js +11 -0
  371. package/dist/hooks/useAriaRelationship.js +38 -0
  372. package/dist/hooks/useBreakpoint.js +20 -0
  373. package/dist/hooks/useControlledState.js +54 -0
  374. package/dist/hooks/useIdIfNeeded.js +8 -0
  375. package/dist/hooks/useResponsiveProps.js +25 -0
  376. package/dist/index-2QXL0WYc.js +45 -0
  377. package/dist/index-CmsyHM_3.js +1703 -0
  378. package/dist/index-CtOScEKX.js +57 -0
  379. package/dist/index.esm-BnSuefUA.js +196 -0
  380. package/dist/interfaces.js +1 -0
  381. package/dist/main.js +335 -0
  382. package/dist/patterns/Loading/Loading.js +8 -0
  383. package/dist/patterns/Loading/LoadingSuspense.js +7 -0
  384. package/dist/patterns/Loading/components/ComponentLoading.js +10 -0
  385. package/dist/patterns/Loading/components/DefaultLoading.js +9 -0
  386. package/dist/patterns/Loading/components/LongLoading.js +132 -0
  387. package/dist/patterns/Loading/components/PageLoading.js +14 -0
  388. package/dist/patterns/Loading/components/StartUpLoading.js +107 -0
  389. package/dist/patterns/Loading/components/ValidateLoading.js +9 -0
  390. package/dist/patterns/Loading/hooks/useEstimatedProgressValue.js +29 -0
  391. package/dist/patterns/Loading/hooks/useShouldRenderLoading.js +24 -0
  392. package/dist/patterns/Loading/hooks/useShowIndicator.js +20 -0
  393. package/dist/patterns/Loading/hooks/useSuspenseResource.js +27 -0
  394. package/dist/patterns/Loading/index.js +5 -0
  395. package/dist/src/components/Alert/Alert.d.ts +9 -0
  396. package/dist/src/components/Alert/Alert.types.d.ts +41 -0
  397. package/dist/src/components/Alert/index.d.ts +2 -0
  398. package/dist/src/components/Autocomplete/Autocomplete.d.ts +3 -0
  399. package/dist/src/components/Autocomplete/Autocomplete.types.d.ts +144 -0
  400. package/dist/src/components/Autocomplete/components/AutocompleteInstructions.d.ts +2 -0
  401. package/dist/src/components/Autocomplete/components/AutocompleteNoResults.d.ts +2 -0
  402. package/dist/src/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +6 -0
  403. package/dist/src/components/Autocomplete/index.d.ts +3 -0
  404. package/dist/src/components/Badge/Badge.d.ts +2 -0
  405. package/dist/src/components/Badge/Badge.types.d.ts +37 -0
  406. package/dist/src/components/Badge/index.d.ts +2 -0
  407. package/dist/src/components/Button/Button.d.ts +2 -0
  408. package/dist/src/components/Button/Button.types.d.ts +106 -0
  409. package/dist/src/components/Button/CloseButton/CloseButton.d.ts +3 -0
  410. package/dist/src/components/Button/CloseButton/CloseButton.types.d.ts +8 -0
  411. package/dist/src/components/Button/index.d.ts +4 -0
  412. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +2 -0
  413. package/dist/src/components/ButtonGroup/ButtonGroup.types.d.ts +63 -0
  414. package/dist/src/components/ButtonGroup/ButtonGroupProvider.d.ts +3 -0
  415. package/dist/src/components/ButtonGroup/hooks/useButtonGroup.d.ts +1 -0
  416. package/dist/src/components/ButtonGroup/hooks/useIDSButtonGroupItem.d.ts +2 -0
  417. package/dist/src/components/ButtonGroup/index.d.ts +3 -0
  418. package/dist/src/components/Card/Card.d.ts +2 -0
  419. package/dist/src/components/Card/Card.types.d.ts +91 -0
  420. package/dist/src/components/Card/components/ButtonCard.d.ts +2 -0
  421. package/dist/src/components/Card/components/LinkCard.d.ts +2 -0
  422. package/dist/src/components/Card/helpers/composeIDSCard.d.ts +3 -0
  423. package/dist/src/components/Card/helpers/composeIDSCardSlots.d.ts +2 -0
  424. package/dist/src/components/Card/index.d.ts +6 -0
  425. package/dist/src/components/Checkbox/Checkbox.d.ts +2 -0
  426. package/dist/src/components/Checkbox/Checkbox.types.d.ts +65 -0
  427. package/dist/src/components/Checkbox/helpers/mapCheckboxGroupOptions.d.ts +5 -0
  428. package/dist/src/components/Checkbox/index.d.ts +2 -0
  429. package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +2 -0
  430. package/dist/src/components/CheckboxGroup/CheckboxGroup.types.d.ts +70 -0
  431. package/dist/src/components/CheckboxGroup/CheckboxGroupContext.d.ts +2 -0
  432. package/dist/src/components/CheckboxGroup/index.d.ts +2 -0
  433. package/dist/src/components/CheckboxMark/CheckboxMark.d.ts +2 -0
  434. package/dist/src/components/CheckboxMark/CheckboxMark.types.d.ts +11 -0
  435. package/dist/src/components/CheckboxMark/index.d.ts +2 -0
  436. package/dist/src/components/Col/Col.d.ts +2 -0
  437. package/dist/src/components/Col/Col.types.d.ts +78 -0
  438. package/dist/src/components/Col/index.d.ts +2 -0
  439. package/dist/src/components/Combobox/Combobox.d.ts +6 -0
  440. package/dist/src/components/Combobox/Combobox.types.d.ts +55 -0
  441. package/dist/src/components/Combobox/MultiCombobox/MultiCombobox.d.ts +6 -0
  442. package/dist/src/components/Combobox/MultiCombobox/MultiCombobox.types.d.ts +27 -0
  443. package/dist/src/components/Combobox/components/ComboboxHiddenInput.d.ts +2 -0
  444. package/dist/src/components/Combobox/components/ComboboxResults.d.ts +2 -0
  445. package/dist/src/components/Combobox/components/ComboboxResultsDescriptor.d.ts +2 -0
  446. package/dist/src/components/Combobox/hooks/useComboboxFlags.d.ts +5 -0
  447. package/dist/src/components/Combobox/hooks/useComboboxInlineCompletion.d.ts +2 -0
  448. package/dist/src/components/Combobox/index.d.ts +4 -0
  449. package/dist/src/components/Container/Container.d.ts +2 -0
  450. package/dist/src/components/Container/Container.types.d.ts +15 -0
  451. package/dist/src/components/Container/index.d.ts +2 -0
  452. package/dist/src/components/Divider/Divider.d.ts +2 -0
  453. package/dist/src/components/Divider/Divider.types.d.ts +17 -0
  454. package/dist/src/components/Divider/index.d.ts +2 -0
  455. package/dist/src/components/Expander/Expander.d.ts +2 -0
  456. package/dist/src/components/Expander/Expander.types.d.ts +39 -0
  457. package/dist/src/components/Expander/index.d.ts +2 -0
  458. package/dist/src/components/Field/Field.d.ts +2 -0
  459. package/dist/src/components/Field/Field.types.d.ts +34 -0
  460. package/dist/src/components/Field/FieldGroup/FieldGroup.d.ts +2 -0
  461. package/dist/src/components/Field/FieldGroup/FieldGroup.types.d.ts +15 -0
  462. package/dist/src/components/Field/components/FieldAppendToLabel.d.ts +2 -0
  463. package/dist/src/components/Field/components/FieldLegend.d.ts +2 -0
  464. package/dist/src/components/Field/helpers/getUniqueItemsByKey.d.ts +1 -0
  465. package/dist/src/components/Field/index.d.ts +4 -0
  466. package/dist/src/components/Filter/Filter.d.ts +2 -0
  467. package/dist/src/components/Filter/Filter.types.d.ts +71 -0
  468. package/dist/src/components/Filter/components/FilterLabel.d.ts +2 -0
  469. package/dist/src/components/Filter/components/FilterResetButton.d.ts +2 -0
  470. package/dist/src/components/Filter/components/FilterSearch.d.ts +3 -0
  471. package/dist/src/components/Filter/hooks/useFilterFlags.d.ts +7 -0
  472. package/dist/src/components/Filter/index.d.ts +2 -0
  473. package/dist/src/components/Form/Form.d.ts +11 -0
  474. package/dist/src/components/Form/Form.types.d.ts +188 -0
  475. package/dist/src/components/Form/FormContext.d.ts +8 -0
  476. package/dist/src/components/Form/FormField/FormField.d.ts +7 -0
  477. package/dist/src/components/Form/FormField/FormField.types.d.ts +105 -0
  478. package/dist/src/components/Form/FormField/FormFieldset.d.ts +7 -0
  479. package/dist/src/components/Form/FormField/helpers/getErrorTypeMessage.d.ts +2 -0
  480. package/dist/src/components/Form/FormField/helpers/transformCustomRulesToValidateRule.d.ts +3 -0
  481. package/dist/src/components/Form/HookForm/HookForm.d.ts +5 -0
  482. package/dist/src/components/Form/components/FormValidationSummary.d.ts +5 -0
  483. package/dist/src/components/Form/hooks/useNoDefaultValueInForms.d.ts +8 -0
  484. package/dist/src/components/Form/index.d.ts +6 -0
  485. package/dist/src/components/HeadingWithDeprecatedFallback/HeadingWithDeprecatedFallback.d.ts +10 -0
  486. package/dist/src/components/Hide/Hide.d.ts +2 -0
  487. package/dist/src/components/Hide/Hide.types.d.ts +24 -0
  488. package/dist/src/components/Hide/helpers/composeHideClasses.d.ts +4 -0
  489. package/dist/src/components/Hide/index.d.ts +2 -0
  490. package/dist/src/components/Icon/Icon.d.ts +2 -0
  491. package/dist/src/components/Icon/Icon.types.d.ts +99 -0
  492. package/dist/src/components/Icon/index.d.ts +2 -0
  493. package/dist/src/components/Inline/Inline.d.ts +2 -0
  494. package/dist/src/components/Inline/Inline.types.d.ts +41 -0
  495. package/dist/src/components/Inline/index.d.ts +2 -0
  496. package/dist/src/components/Input/ClearButton/ClearButton.d.ts +4 -0
  497. package/dist/src/components/Input/Input.d.ts +14 -0
  498. package/dist/src/components/Input/Input.types.d.ts +73 -0
  499. package/dist/src/components/Input/InputBase/InputBase.d.ts +9 -0
  500. package/dist/src/components/Input/InputBase/InputBase.types.d.ts +15 -0
  501. package/dist/src/components/Input/index.d.ts +3 -0
  502. package/dist/src/components/InputCurrency/InputCurrency.d.ts +4 -0
  503. package/dist/src/components/InputCurrency/InputCurrency.types.d.ts +23 -0
  504. package/dist/src/components/InputCurrency/index.d.ts +2 -0
  505. package/dist/src/components/Label/Label.d.ts +2 -0
  506. package/dist/src/components/Label/Label.types.d.ts +15 -0
  507. package/dist/src/components/Label/LabelBase/LabelBase.d.ts +2 -0
  508. package/dist/src/components/Label/LabelBase/LabelBase.types.d.ts +35 -0
  509. package/dist/src/components/Label/index.d.ts +2 -0
  510. package/dist/src/components/Menu/Menu.d.ts +2 -0
  511. package/dist/src/components/Menu/Menu.types.d.ts +130 -0
  512. package/dist/src/components/Menu/MenuDivider/MenuDivider.d.ts +2 -0
  513. package/dist/src/components/Menu/MenuHeading/MenuHeading.d.ts +2 -0
  514. package/dist/src/components/Menu/MenuItem/MenuItem.d.ts +2 -0
  515. package/dist/src/components/Menu/MenuItem/MenuItem.types.d.ts +122 -0
  516. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemAria.d.ts +11 -0
  517. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemButtonProps.d.ts +14 -0
  518. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemComposite.d.ts +20 -0
  519. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemInteractions.d.ts +11 -0
  520. package/dist/src/components/Menu/MenuItem/hooks/useMenuItemRole.d.ts +9 -0
  521. package/dist/src/components/Menu/MenuProvider.d.ts +3 -0
  522. package/dist/src/components/Menu/MenuText/MenuText.d.ts +2 -0
  523. package/dist/src/components/Menu/helpers/mapMenuItems.d.ts +6 -0
  524. package/dist/src/components/Menu/hooks/useMenu.d.ts +1 -0
  525. package/dist/src/components/Menu/hooks/useMenuAria.d.ts +11 -0
  526. package/dist/src/components/Menu/hooks/useMenuComposite.d.ts +18 -0
  527. package/dist/src/components/Menu/hooks/useMenuRole.d.ts +12 -0
  528. package/dist/src/components/Menu/hooks/useMenuStyles.d.ts +11 -0
  529. package/dist/src/components/Menu/index.d.ts +13 -0
  530. package/dist/src/components/Modal/Modal.d.ts +2 -0
  531. package/dist/src/components/Modal/Modal.types.d.ts +105 -0
  532. package/dist/src/components/Modal/ModalProvider.d.ts +3 -0
  533. package/dist/src/components/Modal/hooks/useIDSProvidedModal.d.ts +5 -0
  534. package/dist/src/components/Modal/hooks/useModal.d.ts +3 -0
  535. package/dist/src/components/Modal/index.d.ts +4 -0
  536. package/dist/src/components/Navbar/Navbar.d.ts +2 -0
  537. package/dist/src/components/Navbar/Navbar.types.d.ts +65 -0
  538. package/dist/src/components/Navbar/components/HomeLinkContent.d.ts +7 -0
  539. package/dist/src/components/Navbar/components/LogoFromSrc.d.ts +6 -0
  540. package/dist/src/components/Navbar/components/NavbarLogo.d.ts +8 -0
  541. package/dist/src/components/Navbar/index.d.ts +2 -0
  542. package/dist/src/components/Panel/Panel.d.ts +2 -0
  543. package/dist/src/components/Panel/Panel.types.d.ts +59 -0
  544. package/dist/src/components/Panel/index.d.ts +2 -0
  545. package/dist/src/components/Placeholder/Placeholder.d.ts +2 -0
  546. package/dist/src/components/Placeholder/Placeholder.types.d.ts +24 -0
  547. package/dist/src/components/Placeholder/index.d.ts +2 -0
  548. package/dist/src/components/Popover/InputPopover/InputPopover.d.ts +3 -0
  549. package/dist/src/components/Popover/InputPopover/InputPopover.types.d.ts +26 -0
  550. package/dist/src/components/Popover/InputPopover/InputPopoverActivator.d.ts +2 -0
  551. package/dist/src/components/Popover/InputPopover/InputPopoverProvider.d.ts +2 -0
  552. package/dist/src/components/Popover/Popover.d.ts +2 -0
  553. package/dist/src/components/Popover/Popover.types.d.ts +177 -0
  554. package/dist/src/components/Popover/PopoverProvider.d.ts +3 -0
  555. package/dist/src/components/Popover/components/NestedPopoverActivator.d.ts +5 -0
  556. package/dist/src/components/Popover/components/PopoverActivator.d.ts +2 -0
  557. package/dist/src/components/Popover/components/PopoverContent.d.ts +2 -0
  558. package/dist/src/components/Popover/helpers/composeFloatingProps.d.ts +15 -0
  559. package/dist/src/components/Popover/helpers/composePopoverWidth.d.ts +2 -0
  560. package/dist/src/components/Popover/helpers/handlePopoverTabKey.d.ts +8 -0
  561. package/dist/src/components/Popover/helpers/hasFocus.d.ts +1 -0
  562. package/dist/src/components/Popover/helpers/waitUntilTrue.d.ts +1 -0
  563. package/dist/src/components/Popover/hooks/usePopover.d.ts +1 -0
  564. package/dist/src/components/Popover/hooks/usePopoverActivatorInteractions.d.ts +15 -0
  565. package/dist/src/components/Popover/hooks/usePopoverAria.d.ts +6 -0
  566. package/dist/src/components/Popover/hooks/usePopoverImperativeHandle.d.ts +4 -0
  567. package/dist/src/components/Popover/hooks/usePopoverItem.d.ts +12 -0
  568. package/dist/src/components/Popover/hooks/usePopoverNavigation.d.ts +16 -0
  569. package/dist/src/components/Popover/hooks/usePopoverState.d.ts +10 -0
  570. package/dist/src/components/Popover/index.d.ts +5 -0
  571. package/dist/src/components/Progress/Progress.d.ts +2 -0
  572. package/dist/src/components/Progress/Progress.types.d.ts +23 -0
  573. package/dist/src/components/Progress/index.d.ts +1 -0
  574. package/dist/src/components/Provider/Provider.d.ts +20 -0
  575. package/dist/src/components/Provider/index.d.ts +1 -0
  576. package/dist/src/components/Radio/Radio.d.ts +2 -0
  577. package/dist/src/components/Radio/Radio.types.d.ts +45 -0
  578. package/dist/src/components/Radio/helpers/mapRadioGroupOptions.d.ts +5 -0
  579. package/dist/src/components/Radio/index.d.ts +2 -0
  580. package/dist/src/components/RadioGroup/RadioGroup.d.ts +2 -0
  581. package/dist/src/components/RadioGroup/RadioGroup.types.d.ts +70 -0
  582. package/dist/src/components/RadioGroup/RadioGroupContext.d.ts +2 -0
  583. package/dist/src/components/RadioGroup/index.d.ts +2 -0
  584. package/dist/src/components/Readonly/Readonly.d.ts +3 -0
  585. package/dist/src/components/Readonly/Readonly.types.d.ts +10 -0
  586. package/dist/src/components/Readonly/index.d.ts +2 -0
  587. package/dist/src/components/RichSelect/RichSelect.d.ts +2 -0
  588. package/dist/src/components/RichSelect/RichSelect.types.d.ts +181 -0
  589. package/dist/src/components/RichSelect/SelectBody/SelectBody.d.ts +2 -0
  590. package/dist/src/components/RichSelect/SelectBody/SelectBody.types.d.ts +12 -0
  591. package/dist/src/components/RichSelect/SelectCreate/SelectCreate.d.ts +2 -0
  592. package/dist/src/components/RichSelect/SelectCreate/SelectCreate.types.d.ts +29 -0
  593. package/dist/src/components/RichSelect/SelectHeading/SelectHeading.d.ts +2 -0
  594. package/dist/src/components/RichSelect/SelectHeading/SelectHeading.types.d.ts +17 -0
  595. package/dist/src/components/RichSelect/SelectLabel/SelectLabel.d.ts +2 -0
  596. package/dist/src/components/RichSelect/SelectLabel/SelectLabel.types.d.ts +3 -0
  597. package/dist/src/components/RichSelect/SelectMenu/SelectMenu.d.ts +2 -0
  598. package/dist/src/components/RichSelect/SelectMenu/SelectMenu.types.d.ts +49 -0
  599. package/dist/src/components/RichSelect/SelectMenu/SelectMenuItem.d.ts +2 -0
  600. package/dist/src/components/RichSelect/SelectSearch/SelectSearch.d.ts +2 -0
  601. package/dist/src/components/RichSelect/SelectSearch/SelectSearch.types.d.ts +2 -0
  602. package/dist/src/components/RichSelect/SelectSearchInput/SelectSearchInput.d.ts +3 -0
  603. package/dist/src/components/RichSelect/SelectSearchInput/SelectSearchInput.types.d.ts +18 -0
  604. package/dist/src/components/RichSelect/SelectTags/SelectTags.d.ts +2 -0
  605. package/dist/src/components/RichSelect/SelectTags/SelectTags.types.d.ts +27 -0
  606. package/dist/src/components/RichSelect/components/SelectActivator.d.ts +7 -0
  607. package/dist/src/components/RichSelect/components/SelectHiddenInput.d.ts +4 -0
  608. package/dist/src/components/RichSelect/components/SelectOptions.d.ts +8 -0
  609. package/dist/src/components/RichSelect/hooks/useRichSelectState.d.ts +17 -0
  610. package/dist/src/components/RichSelect/index.d.ts +19 -0
  611. package/dist/src/components/Row/Row.d.ts +2 -0
  612. package/dist/src/components/Row/Row.types.d.ts +42 -0
  613. package/dist/src/components/Row/index.d.ts +2 -0
  614. package/dist/src/components/Select/Select.d.ts +2 -0
  615. package/dist/src/components/Select/Select.types.d.ts +89 -0
  616. package/dist/src/components/Select/SelectOption/SelectOption.d.ts +2 -0
  617. package/dist/src/components/Select/components/SelectControl.d.ts +2 -0
  618. package/dist/src/components/Select/components/SelectReadonly.d.ts +2 -0
  619. package/dist/src/components/Select/helpers/mapSelectOptions.d.ts +3 -0
  620. package/dist/src/components/Select/helpers/nodesToSelectOptions.d.ts +11 -0
  621. package/dist/src/components/Select/index.d.ts +4 -0
  622. package/dist/src/components/Skeleton/Skeleton.d.ts +2 -0
  623. package/dist/src/components/Skeleton/Skeleton.types.d.ts +36 -0
  624. package/dist/src/components/Skeleton/index.d.ts +2 -0
  625. package/dist/src/components/SkipLink/SkipLink.d.ts +2 -0
  626. package/dist/src/components/SkipLink/SkipLink.types.d.ts +22 -0
  627. package/dist/src/components/SkipLink/index.d.ts +2 -0
  628. package/dist/src/components/Slideout/Slideout.d.ts +2 -0
  629. package/dist/src/components/Slideout/Slideout.types.d.ts +150 -0
  630. package/dist/src/components/Slideout/SlideoutProvider.d.ts +3 -0
  631. package/dist/src/components/Slideout/components/SlideoutInner.d.ts +2 -0
  632. package/dist/src/components/Slideout/hooks/useIDSProvidedSlideout.d.ts +5 -0
  633. package/dist/src/components/Slideout/hooks/useSlideout.d.ts +3 -0
  634. package/dist/src/components/Slideout/index.d.ts +4 -0
  635. package/dist/src/components/Slider/Slider.d.ts +2 -0
  636. package/dist/src/components/Slider/Slider.types.d.ts +94 -0
  637. package/dist/src/components/Slider/components/SliderTicks.d.ts +2 -0
  638. package/dist/src/components/Slider/index.d.ts +2 -0
  639. package/dist/src/components/Spinner/Spinner.d.ts +2 -0
  640. package/dist/src/components/Spinner/Spinner.types.d.ts +13 -0
  641. package/dist/src/components/Spinner/index.d.ts +2 -0
  642. package/dist/src/components/Stack/Stack.d.ts +2 -0
  643. package/dist/src/components/Stack/Stack.types.d.ts +22 -0
  644. package/dist/src/components/Stack/index.d.ts +2 -0
  645. package/dist/src/components/TabSet/Tab/Tab.d.ts +2 -0
  646. package/dist/src/components/TabSet/Tab/Tab.types.d.ts +21 -0
  647. package/dist/src/components/TabSet/TabSet.d.ts +2 -0
  648. package/dist/src/components/TabSet/TabSet.types.d.ts +84 -0
  649. package/dist/src/components/TabSet/TabSetProvider.d.ts +3 -0
  650. package/dist/src/components/TabSet/components/TabSetItem.d.ts +2 -0
  651. package/dist/src/components/TabSet/helpers/mapTabs.d.ts +3 -0
  652. package/dist/src/components/TabSet/hooks/useTabSetItems.d.ts +1 -0
  653. package/dist/src/components/TabSet/index.d.ts +5 -0
  654. package/dist/src/components/Table/Table.d.ts +6 -0
  655. package/dist/src/components/Table/Table.types.d.ts +199 -0
  656. package/dist/src/components/Table/TableBody/TableBody.d.ts +2 -0
  657. package/dist/src/components/Table/TableBody/TableBody.types.d.ts +29 -0
  658. package/dist/src/components/Table/TableContext.d.ts +2 -0
  659. package/dist/src/components/Table/TableFormattedValue/TableFormattedValue.d.ts +2 -0
  660. package/dist/src/components/Table/TableFormattedValue/TableFormattedValue.types.d.ts +30 -0
  661. package/dist/src/components/Table/TableProvider.d.ts +2 -0
  662. package/dist/src/components/Table/components/TableBodyCell.d.ts +2 -0
  663. package/dist/src/components/Table/components/TableEmpty.d.ts +2 -0
  664. package/dist/src/components/Table/components/TableHeader.d.ts +2 -0
  665. package/dist/src/components/Table/components/TableHeaderCell.d.ts +2 -0
  666. package/dist/src/components/Table/components/TableRows.d.ts +2 -0
  667. package/dist/src/components/Table/components/TableSortButton.d.ts +2 -0
  668. package/dist/src/components/Table/helpers/composeIDSTableColumnDefs.d.ts +2 -0
  669. package/dist/src/components/Table/helpers/composeIDSTableInitialSorting.d.ts +3 -0
  670. package/dist/src/components/Table/helpers/findColumnByKey.d.ts +2 -0
  671. package/dist/src/components/Table/helpers/getFormatFromValue.d.ts +2 -0
  672. package/dist/src/components/Table/helpers/hasColumns.d.ts +2 -0
  673. package/dist/src/components/Table/hooks/useIDSTableColumnSort.d.ts +2 -0
  674. package/dist/src/components/Table/hooks/useIDSTableColumnStyles.d.ts +2 -0
  675. package/dist/src/components/Table/hooks/useTable.d.ts +1 -0
  676. package/dist/src/components/Table/index.d.ts +6 -0
  677. package/dist/src/components/Tag/Tag.d.ts +2 -0
  678. package/dist/src/components/Tag/Tag.types.d.ts +25 -0
  679. package/dist/src/components/Tag/TagInput/TagInput.d.ts +3 -0
  680. package/dist/src/components/Tag/TagInput/TagInput.types.d.ts +21 -0
  681. package/dist/src/components/Tag/components/TagListInput/TagListInput.d.ts +3 -0
  682. package/dist/src/components/Tag/components/TagListInput/TagListInput.types.d.ts +45 -0
  683. package/dist/src/components/Tag/index.d.ts +4 -0
  684. package/dist/src/components/Text/Text.d.ts +2 -0
  685. package/dist/src/components/Text/Text.types.d.ts +45 -0
  686. package/dist/src/components/Text/index.d.ts +2 -0
  687. package/dist/src/components/Toaster/Toast/Toast.d.ts +3 -0
  688. package/dist/src/components/Toaster/Toast/Toast.types.d.ts +95 -0
  689. package/dist/src/components/Toaster/Toast/ToastAnimated.d.ts +2 -0
  690. package/dist/src/components/Toaster/Toast/ToastIcon.d.ts +6 -0
  691. package/dist/src/components/Toaster/Toaster.d.ts +2 -0
  692. package/dist/src/components/Toaster/Toaster.types.d.ts +37 -0
  693. package/dist/src/components/Toaster/ToasterProvider.d.ts +14 -0
  694. package/dist/src/components/Toaster/hooks/useToaster.d.ts +9 -0
  695. package/dist/src/components/Toaster/index.d.ts +5 -0
  696. package/dist/src/components/Toggle/Toggle.d.ts +2 -0
  697. package/dist/src/components/Toggle/Toggle.types.d.ts +45 -0
  698. package/dist/src/components/Toggle/index.d.ts +2 -0
  699. package/dist/src/components/Tooltip/Tooltip.d.ts +2 -0
  700. package/dist/src/components/Tooltip/Tooltip.types.d.ts +33 -0
  701. package/dist/src/components/Tooltip/index.d.ts +2 -0
  702. package/dist/src/components/ValidationMessage/ValidationBase/ValidationBase.d.ts +2 -0
  703. package/dist/src/components/ValidationMessage/ValidationBase/ValidationBase.types.d.ts +27 -0
  704. package/dist/src/components/ValidationMessage/ValidationLink/ValidationLink.d.ts +2 -0
  705. package/dist/src/components/ValidationMessage/ValidationLink/ValidationLink.types.d.ts +12 -0
  706. package/dist/src/components/ValidationMessage/ValidationMessage.d.ts +2 -0
  707. package/dist/src/components/ValidationMessage/ValidationMessage.types.d.ts +13 -0
  708. package/dist/src/components/ValidationMessage/ValidationSummary/ValidationSummary.d.ts +2 -0
  709. package/dist/src/components/ValidationMessage/ValidationSummary/ValidationSummary.types.d.ts +27 -0
  710. package/dist/src/components/ValidationMessage/index.d.ts +6 -0
  711. package/dist/src/constants.d.ts +123 -0
  712. package/dist/src/enums.d.ts +215 -0
  713. package/dist/src/helpers/dom/closestCrossShadow.d.ts +9 -0
  714. package/dist/src/helpers/dom/domUtils.d.ts +5 -0
  715. package/dist/src/helpers/dom/focusableElements.d.ts +1 -0
  716. package/dist/src/helpers/dom/getActiveElement.d.ts +1 -0
  717. package/dist/src/helpers/dom/hasShadowDom.d.ts +1 -0
  718. package/dist/src/helpers/form/getFormControlValueAsString.d.ts +2 -0
  719. package/dist/src/helpers/form/getFormControlValueAsStringIfDefined.d.ts +2 -0
  720. package/dist/src/helpers/form/getValueAsEvent.d.ts +15 -0
  721. package/dist/src/helpers/form/isValidFormInputElement.d.ts +1 -0
  722. package/dist/src/helpers/formatting/capitalizeFirstLetter.d.ts +1 -0
  723. package/dist/src/helpers/formatting/formatCurrency.d.ts +25 -0
  724. package/dist/src/helpers/formatting/formatDate.d.ts +5 -0
  725. package/dist/src/helpers/formatting/formatDateTime.d.ts +3 -0
  726. package/dist/src/helpers/formatting/formatObjectKey.d.ts +1 -0
  727. package/dist/src/helpers/formatting/formatPercentage.d.ts +1 -0
  728. package/dist/src/helpers/formatting/stringReplacer.d.ts +2 -0
  729. package/dist/src/helpers/formatting/toArray.d.ts +1 -0
  730. package/dist/src/helpers/formatting/toCSSLengthValue.d.ts +1 -0
  731. package/dist/src/helpers/label-value/composeLabelValueDescriptor.d.ts +9 -0
  732. package/dist/src/helpers/label-value/getQueryRangeExclusive.d.ts +8 -0
  733. package/dist/src/helpers/label-value/getValueFromLabelValues.d.ts +2 -0
  734. package/dist/src/helpers/label-value/highlightQueryInLabel.d.ts +2 -0
  735. package/dist/src/helpers/label-value/highlightQueryInLabelValue.d.ts +3 -0
  736. package/dist/src/helpers/label-value/searchLabelValues.d.ts +2 -0
  737. package/dist/src/helpers/responsive/getResponsiveLayoutModifiers.d.ts +2 -0
  738. package/dist/src/helpers/responsive/getResponsivePaddingClasses.d.ts +2 -0
  739. package/dist/src/helpers/transition/getTransitionDuration.d.ts +1 -0
  740. package/dist/src/helpers/transition/timeStringToNumber.d.ts +1 -0
  741. package/dist/src/helpers/utility/generateScopedName.d.ts +8 -0
  742. package/dist/src/helpers/utility/idsLogger.d.ts +3 -0
  743. package/dist/src/helpers/utility/propagateTestid.d.ts +1 -0
  744. package/dist/src/hooks/index.d.ts +4 -0
  745. package/dist/src/hooks/useAriaRelationship.d.ts +11 -0
  746. package/dist/src/hooks/useBreakpoint.d.ts +11 -0
  747. package/dist/src/hooks/useControlledState.d.ts +22 -0
  748. package/dist/src/hooks/useIdIfNeeded.d.ts +2 -0
  749. package/dist/src/hooks/useResponsiveProps.d.ts +19 -0
  750. package/dist/src/interfaces.d.ts +67 -0
  751. package/dist/src/main.d.ts +58 -0
  752. package/dist/src/patterns/Loading/Loading.d.ts +47 -0
  753. package/dist/src/patterns/Loading/LoadingSuspense.d.ts +73 -0
  754. package/dist/src/patterns/Loading/components/ComponentLoading.d.ts +53 -0
  755. package/dist/src/patterns/Loading/components/DefaultLoading.d.ts +27 -0
  756. package/dist/src/patterns/Loading/components/LongLoading.d.ts +60 -0
  757. package/dist/src/patterns/Loading/components/PageLoading.d.ts +41 -0
  758. package/dist/src/patterns/Loading/components/StartUpLoading.d.ts +67 -0
  759. package/dist/src/patterns/Loading/components/ValidateLoading.d.ts +38 -0
  760. package/dist/src/patterns/Loading/hooks/useEstimatedProgressValue.d.ts +11 -0
  761. package/dist/src/patterns/Loading/hooks/useShouldRenderLoading.d.ts +10 -0
  762. package/dist/src/patterns/Loading/hooks/useShowIndicator.d.ts +9 -0
  763. package/dist/src/patterns/Loading/hooks/useSuspenseResource.d.ts +17 -0
  764. package/dist/src/patterns/Loading/index.d.ts +2 -0
  765. package/dist/src/types.d.ts +21 -0
  766. package/dist/style.css +1 -0
  767. package/dist/types.js +1 -0
  768. package/dist/useIDSButtonGroupItem-NdNvcZnJ.js +30 -0
  769. package/dist/vite.config.d.ts +2 -0
  770. package/dist/vitest.config.d.ts +2 -0
  771. package/dist/vitest.setup.d.ts +0 -0
  772. package/package.json +5 -4
@@ -0,0 +1,3463 @@
1
+ import * as f from "react";
2
+ import { useLayoutEffect as $n } from "react";
3
+ import { t as At, i as Bn, f as Or } from "./index.esm-BnSuefUA.js";
4
+ import { jsx as ge, jsxs as Hn, Fragment as Ar } from "react/jsx-runtime";
5
+ import * as tn from "react-dom";
6
+ function Mt() {
7
+ return typeof window < "u";
8
+ }
9
+ function We(e) {
10
+ return zn(e) ? (e.nodeName || "").toLowerCase() : "#document";
11
+ }
12
+ function he(e) {
13
+ var t;
14
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
15
+ }
16
+ function Oe(e) {
17
+ var t;
18
+ return (t = (zn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
19
+ }
20
+ function zn(e) {
21
+ return Mt() ? e instanceof Node || e instanceof he(e).Node : !1;
22
+ }
23
+ function Y(e) {
24
+ return Mt() ? e instanceof Element || e instanceof he(e).Element : !1;
25
+ }
26
+ function re(e) {
27
+ return Mt() ? e instanceof HTMLElement || e instanceof he(e).HTMLElement : !1;
28
+ }
29
+ function Xt(e) {
30
+ return !Mt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof he(e).ShadowRoot;
31
+ }
32
+ function ut(e) {
33
+ const {
34
+ overflow: t,
35
+ overflowX: n,
36
+ overflowY: r,
37
+ display: o
38
+ } = we(e);
39
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
40
+ }
41
+ function Mr(e) {
42
+ return ["table", "td", "th"].includes(We(e));
43
+ }
44
+ function Pt(e) {
45
+ return [":popover-open", ":modal"].some((t) => {
46
+ try {
47
+ return e.matches(t);
48
+ } catch {
49
+ return !1;
50
+ }
51
+ });
52
+ }
53
+ function nn(e) {
54
+ const t = St(), n = Y(e) ? we(e) : e;
55
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
56
+ }
57
+ function Pr(e) {
58
+ let t = De(e);
59
+ for (; re(t) && !Se(t); ) {
60
+ if (nn(t))
61
+ return t;
62
+ if (Pt(t))
63
+ return null;
64
+ t = De(t);
65
+ }
66
+ return null;
67
+ }
68
+ function St() {
69
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
70
+ }
71
+ function Se(e) {
72
+ return ["html", "body", "#document"].includes(We(e));
73
+ }
74
+ function we(e) {
75
+ return he(e).getComputedStyle(e);
76
+ }
77
+ function Dt(e) {
78
+ return Y(e) ? {
79
+ scrollLeft: e.scrollLeft,
80
+ scrollTop: e.scrollTop
81
+ } : {
82
+ scrollLeft: e.scrollX,
83
+ scrollTop: e.scrollY
84
+ };
85
+ }
86
+ function De(e) {
87
+ if (We(e) === "html")
88
+ return e;
89
+ const t = (
90
+ // Step into the shadow DOM of the parent of a slotted node.
91
+ e.assignedSlot || // DOM Element detected.
92
+ e.parentNode || // ShadowRoot detected.
93
+ Xt(e) && e.host || // Fallback.
94
+ Oe(e)
95
+ );
96
+ return Xt(t) ? t.host : t;
97
+ }
98
+ function Un(e) {
99
+ const t = De(e);
100
+ return Se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : re(t) && ut(t) ? t : Un(t);
101
+ }
102
+ function Le(e, t, n) {
103
+ var r;
104
+ t === void 0 && (t = []), n === void 0 && (n = !0);
105
+ const o = Un(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = he(o);
106
+ if (s) {
107
+ const c = Jt(i);
108
+ return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? Le(c) : []);
109
+ }
110
+ return t.concat(o, Le(o, [], n));
111
+ }
112
+ function Jt(e) {
113
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
114
+ }
115
+ const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Sr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Qe = Math.min, be = Math.max, wt = Math.round, je = Math.floor, Ce = (e) => ({
116
+ x: e,
117
+ y: e
118
+ }), Dr = {
119
+ left: "right",
120
+ right: "left",
121
+ bottom: "top",
122
+ top: "bottom"
123
+ }, kr = {
124
+ start: "end",
125
+ end: "start"
126
+ };
127
+ function pn(e, t, n) {
128
+ return be(e, Qe(t, n));
129
+ }
130
+ function Ze(e, t) {
131
+ return typeof e == "function" ? e(t) : e;
132
+ }
133
+ function Te(e) {
134
+ return e.split("-")[0];
135
+ }
136
+ function Ie(e) {
137
+ return e.split("-")[1];
138
+ }
139
+ function Gn(e) {
140
+ return e === "x" ? "y" : "x";
141
+ }
142
+ function jn(e) {
143
+ return e === "y" ? "height" : "width";
144
+ }
145
+ function ze(e) {
146
+ return ["top", "bottom"].includes(Te(e)) ? "y" : "x";
147
+ }
148
+ function qn(e) {
149
+ return Gn(ze(e));
150
+ }
151
+ function Yn(e, t, n) {
152
+ n === void 0 && (n = !1);
153
+ const r = Ie(e), o = qn(e), s = jn(o);
154
+ let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
155
+ return t.reference[s] > t.floating[s] && (i = Et(i)), [i, Et(i)];
156
+ }
157
+ function Lr(e) {
158
+ const t = Et(e);
159
+ return [Rt(e), t, Rt(t)];
160
+ }
161
+ function Rt(e) {
162
+ return e.replace(/start|end/g, (t) => kr[t]);
163
+ }
164
+ function Fr(e, t, n) {
165
+ const r = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], i = ["bottom", "top"];
166
+ switch (e) {
167
+ case "top":
168
+ case "bottom":
169
+ return n ? t ? o : r : t ? r : o;
170
+ case "left":
171
+ case "right":
172
+ return t ? s : i;
173
+ default:
174
+ return [];
175
+ }
176
+ }
177
+ function Nr(e, t, n, r) {
178
+ const o = Ie(e);
179
+ let s = Fr(Te(e), n === "start", r);
180
+ return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Rt)))), s;
181
+ }
182
+ function Et(e) {
183
+ return e.replace(/left|right|bottom|top/g, (t) => Dr[t]);
184
+ }
185
+ function _r(e) {
186
+ return {
187
+ top: 0,
188
+ right: 0,
189
+ bottom: 0,
190
+ left: 0,
191
+ ...e
192
+ };
193
+ }
194
+ function Wr(e) {
195
+ return typeof e != "number" ? _r(e) : {
196
+ top: e,
197
+ right: e,
198
+ bottom: e,
199
+ left: e
200
+ };
201
+ }
202
+ function Ct(e) {
203
+ const {
204
+ x: t,
205
+ y: n,
206
+ width: r,
207
+ height: o
208
+ } = e;
209
+ return {
210
+ width: r,
211
+ height: o,
212
+ top: n,
213
+ left: t,
214
+ right: t + r,
215
+ bottom: n + o,
216
+ x: t,
217
+ y: n
218
+ };
219
+ }
220
+ function rn() {
221
+ const e = navigator.userAgentData;
222
+ return e != null && e.platform ? e.platform : navigator.platform;
223
+ }
224
+ function Xn() {
225
+ const e = navigator.userAgentData;
226
+ return e && Array.isArray(e.brands) ? e.brands.map((t) => {
227
+ let {
228
+ brand: n,
229
+ version: r
230
+ } = t;
231
+ return n + "/" + r;
232
+ }).join(" ") : navigator.userAgent;
233
+ }
234
+ function Jn() {
235
+ return /apple/i.test(navigator.vendor);
236
+ }
237
+ function Qt() {
238
+ const e = /android/i;
239
+ return e.test(rn()) || e.test(Xn());
240
+ }
241
+ function Kr() {
242
+ return rn().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
243
+ }
244
+ function Qn() {
245
+ return Xn().includes("jsdom/");
246
+ }
247
+ const gn = "data-floating-ui-focusable", Vr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", _t = "ArrowLeft", Wt = "ArrowRight", $r = "ArrowUp", Br = "ArrowDown";
248
+ function Ee(e) {
249
+ let t = e.activeElement;
250
+ for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
251
+ var n;
252
+ t = t.shadowRoot.activeElement;
253
+ }
254
+ return t;
255
+ }
256
+ function ce(e, t) {
257
+ if (!e || !t)
258
+ return !1;
259
+ const n = t.getRootNode == null ? void 0 : t.getRootNode();
260
+ if (e.contains(t))
261
+ return !0;
262
+ if (n && Xt(n)) {
263
+ let r = t;
264
+ for (; r; ) {
265
+ if (e === r)
266
+ return !0;
267
+ r = r.parentNode || r.host;
268
+ }
269
+ }
270
+ return !1;
271
+ }
272
+ function Pe(e) {
273
+ return "composedPath" in e ? e.composedPath()[0] : e.target;
274
+ }
275
+ function Kt(e, t) {
276
+ if (t == null)
277
+ return !1;
278
+ if ("composedPath" in e)
279
+ return e.composedPath().includes(t);
280
+ const n = e;
281
+ return n.target != null && t.contains(n.target);
282
+ }
283
+ function Hr(e) {
284
+ return e.matches("html,body");
285
+ }
286
+ function le(e) {
287
+ return (e == null ? void 0 : e.ownerDocument) || document;
288
+ }
289
+ function on(e) {
290
+ return re(e) && e.matches(Vr);
291
+ }
292
+ function Zt(e) {
293
+ return e ? e.getAttribute("role") === "combobox" && on(e) : !1;
294
+ }
295
+ function zr(e) {
296
+ if (!e || Qn()) return !0;
297
+ try {
298
+ return e.matches(":focus-visible");
299
+ } catch {
300
+ return !0;
301
+ }
302
+ }
303
+ function It(e) {
304
+ return e ? e.hasAttribute(gn) ? e : e.querySelector("[" + gn + "]") || e : null;
305
+ }
306
+ function qe(e, t) {
307
+ let n = e.filter((o) => {
308
+ var s;
309
+ return o.parentId === t && ((s = o.context) == null ? void 0 : s.open);
310
+ }), r = n;
311
+ for (; r.length; )
312
+ r = e.filter((o) => {
313
+ var s;
314
+ return (s = r) == null ? void 0 : s.some((i) => {
315
+ var c;
316
+ return o.parentId === i.id && ((c = o.context) == null ? void 0 : c.open);
317
+ });
318
+ }), n = n.concat(r);
319
+ return n;
320
+ }
321
+ function Ur(e, t) {
322
+ let n, r = -1;
323
+ function o(s, i) {
324
+ i > r && (n = s, r = i), qe(e, s).forEach((a) => {
325
+ o(a.id, i + 1);
326
+ });
327
+ }
328
+ return o(t, 0), e.find((s) => s.id === n);
329
+ }
330
+ function hn(e, t) {
331
+ var n;
332
+ let r = [], o = (n = e.find((s) => s.id === t)) == null ? void 0 : n.parentId;
333
+ for (; o; ) {
334
+ const s = e.find((i) => i.id === o);
335
+ o = s == null ? void 0 : s.parentId, s && (r = r.concat(s));
336
+ }
337
+ return r;
338
+ }
339
+ function pe(e) {
340
+ e.preventDefault(), e.stopPropagation();
341
+ }
342
+ function Gr(e) {
343
+ return "nativeEvent" in e;
344
+ }
345
+ function Zn(e) {
346
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Qt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
347
+ }
348
+ function er(e) {
349
+ return Qn() ? !1 : !Qt() && e.width === 0 && e.height === 0 || Qt() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height.
350
+ e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
351
+ }
352
+ function it(e, t) {
353
+ const n = ["mouse", "pen"];
354
+ return t || n.push("", void 0), n.includes(e);
355
+ }
356
+ var jr = typeof document < "u", qr = function() {
357
+ }, X = jr ? $n : qr;
358
+ const Yr = {
359
+ ...f
360
+ };
361
+ function xe(e) {
362
+ const t = f.useRef(e);
363
+ return X(() => {
364
+ t.current = e;
365
+ }), t;
366
+ }
367
+ const Xr = Yr.useInsertionEffect, Jr = Xr || ((e) => e());
368
+ function se(e) {
369
+ const t = f.useRef(() => {
370
+ if (process.env.NODE_ENV !== "production")
371
+ throw new Error("Cannot call an event handler while rendering.");
372
+ });
373
+ return Jr(() => {
374
+ t.current = e;
375
+ }), f.useCallback(function() {
376
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
377
+ r[o] = arguments[o];
378
+ return t.current == null ? void 0 : t.current(...r);
379
+ }, []);
380
+ }
381
+ function pt(e, t, n) {
382
+ return Math.floor(e / t) !== n;
383
+ }
384
+ function Ye(e, t) {
385
+ return t < 0 || t >= e.current.length;
386
+ }
387
+ function yt(e, t) {
388
+ return ue(e, {
389
+ disabledIndices: t
390
+ });
391
+ }
392
+ function en(e, t) {
393
+ return ue(e, {
394
+ decrement: !0,
395
+ startingIndex: e.current.length,
396
+ disabledIndices: t
397
+ });
398
+ }
399
+ function ue(e, t) {
400
+ let {
401
+ startingIndex: n = -1,
402
+ decrement: r = !1,
403
+ disabledIndices: o,
404
+ amount: s = 1
405
+ } = t === void 0 ? {} : t, i = n;
406
+ do
407
+ i += r ? -s : s;
408
+ while (i >= 0 && i <= e.current.length - 1 && He(e, i, o));
409
+ return i;
410
+ }
411
+ function tr(e, t) {
412
+ let {
413
+ event: n,
414
+ orientation: r,
415
+ loop: o,
416
+ rtl: s,
417
+ cols: i,
418
+ disabledIndices: c,
419
+ minIndex: a,
420
+ maxIndex: u,
421
+ prevIndex: l,
422
+ stopEvent: p = !1
423
+ } = t, g = l;
424
+ if (n.key === $r) {
425
+ if (p && pe(n), l === -1)
426
+ g = u;
427
+ else if (g = ue(e, {
428
+ startingIndex: g,
429
+ amount: i,
430
+ decrement: !0,
431
+ disabledIndices: c
432
+ }), o && (l - i < a || g < 0)) {
433
+ const d = l % i, h = u % i, m = u - (h - d);
434
+ h === d ? g = u : g = h > d ? m : m - i;
435
+ }
436
+ Ye(e, g) && (g = l);
437
+ }
438
+ if (n.key === Br && (p && pe(n), l === -1 ? g = a : (g = ue(e, {
439
+ startingIndex: l,
440
+ amount: i,
441
+ disabledIndices: c
442
+ }), o && l + i > u && (g = ue(e, {
443
+ startingIndex: l % i - i,
444
+ amount: i,
445
+ disabledIndices: c
446
+ }))), Ye(e, g) && (g = l)), r === "both") {
447
+ const d = je(l / i);
448
+ n.key === (s ? _t : Wt) && (p && pe(n), l % i !== i - 1 ? (g = ue(e, {
449
+ startingIndex: l,
450
+ disabledIndices: c
451
+ }), o && pt(g, i, d) && (g = ue(e, {
452
+ startingIndex: l - l % i - 1,
453
+ disabledIndices: c
454
+ }))) : o && (g = ue(e, {
455
+ startingIndex: l - l % i - 1,
456
+ disabledIndices: c
457
+ })), pt(g, i, d) && (g = l)), n.key === (s ? Wt : _t) && (p && pe(n), l % i !== 0 ? (g = ue(e, {
458
+ startingIndex: l,
459
+ decrement: !0,
460
+ disabledIndices: c
461
+ }), o && pt(g, i, d) && (g = ue(e, {
462
+ startingIndex: l + (i - l % i),
463
+ decrement: !0,
464
+ disabledIndices: c
465
+ }))) : o && (g = ue(e, {
466
+ startingIndex: l + (i - l % i),
467
+ decrement: !0,
468
+ disabledIndices: c
469
+ })), pt(g, i, d) && (g = l));
470
+ const h = je(u / i) === d;
471
+ Ye(e, g) && (o && h ? g = n.key === (s ? Wt : _t) ? u : ue(e, {
472
+ startingIndex: l - l % i - 1,
473
+ disabledIndices: c
474
+ }) : g = l);
475
+ }
476
+ return g;
477
+ }
478
+ function nr(e, t, n) {
479
+ const r = [];
480
+ let o = 0;
481
+ return e.forEach((s, i) => {
482
+ let {
483
+ width: c,
484
+ height: a
485
+ } = s;
486
+ if (c > t && process.env.NODE_ENV !== "production")
487
+ throw new Error("[Floating UI]: Invalid grid - item width at index " + i + " is greater than grid columns");
488
+ let u = !1;
489
+ for (n && (o = 0); !u; ) {
490
+ const l = [];
491
+ for (let p = 0; p < c; p++)
492
+ for (let g = 0; g < a; g++)
493
+ l.push(o + p + g * t);
494
+ o % t + c <= t && l.every((p) => r[p] == null) ? (l.forEach((p) => {
495
+ r[p] = i;
496
+ }), u = !0) : o++;
497
+ }
498
+ }), [...r];
499
+ }
500
+ function rr(e, t, n, r, o) {
501
+ if (e === -1) return -1;
502
+ const s = n.indexOf(e), i = t[e];
503
+ switch (o) {
504
+ case "tl":
505
+ return s;
506
+ case "tr":
507
+ return i ? s + i.width - 1 : s;
508
+ case "bl":
509
+ return i ? s + (i.height - 1) * r : s;
510
+ case "br":
511
+ return n.lastIndexOf(e);
512
+ }
513
+ }
514
+ function or(e, t) {
515
+ return t.flatMap((n, r) => e.includes(n) ? [r] : []);
516
+ }
517
+ function He(e, t, n) {
518
+ if (typeof n == "function")
519
+ return n(t);
520
+ if (n)
521
+ return n.includes(t);
522
+ const r = e.current[t];
523
+ return r == null || r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true";
524
+ }
525
+ const lt = () => ({
526
+ getShadowRoot: !0,
527
+ displayCheck: (
528
+ // JSDOM does not support the `tabbable` library. To solve this we can
529
+ // check if `ResizeObserver` is a real function (not polyfilled), which
530
+ // determines if the current environment is JSDOM-like.
531
+ typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
532
+ )
533
+ });
534
+ function ir(e, t) {
535
+ const n = At(e, lt()), r = n.length;
536
+ if (r === 0) return;
537
+ const o = Ee(le(e)), s = n.indexOf(o), i = s === -1 ? t === 1 ? 0 : r - 1 : s + t;
538
+ return n[i];
539
+ }
540
+ function sr(e) {
541
+ return ir(le(e).body, 1) || e;
542
+ }
543
+ function cr(e) {
544
+ return ir(le(e).body, -1) || e;
545
+ }
546
+ function ot(e, t) {
547
+ const n = t || e.currentTarget, r = e.relatedTarget;
548
+ return !r || !ce(n, r);
549
+ }
550
+ function Qr(e) {
551
+ At(e, lt()).forEach((n) => {
552
+ n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
553
+ });
554
+ }
555
+ function vn(e) {
556
+ e.querySelectorAll("[data-tabindex]").forEach((n) => {
557
+ const r = n.dataset.tabindex;
558
+ delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
559
+ });
560
+ }
561
+ function bn(e, t, n) {
562
+ let {
563
+ reference: r,
564
+ floating: o
565
+ } = e;
566
+ const s = ze(t), i = qn(t), c = jn(i), a = Te(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
567
+ let d;
568
+ switch (a) {
569
+ case "top":
570
+ d = {
571
+ x: l,
572
+ y: r.y - o.height
573
+ };
574
+ break;
575
+ case "bottom":
576
+ d = {
577
+ x: l,
578
+ y: r.y + r.height
579
+ };
580
+ break;
581
+ case "right":
582
+ d = {
583
+ x: r.x + r.width,
584
+ y: p
585
+ };
586
+ break;
587
+ case "left":
588
+ d = {
589
+ x: r.x - o.width,
590
+ y: p
591
+ };
592
+ break;
593
+ default:
594
+ d = {
595
+ x: r.x,
596
+ y: r.y
597
+ };
598
+ }
599
+ switch (Ie(t)) {
600
+ case "start":
601
+ d[i] -= g * (n && u ? -1 : 1);
602
+ break;
603
+ case "end":
604
+ d[i] += g * (n && u ? -1 : 1);
605
+ break;
606
+ }
607
+ return d;
608
+ }
609
+ const Zr = async (e, t, n) => {
610
+ const {
611
+ placement: r = "bottom",
612
+ strategy: o = "absolute",
613
+ middleware: s = [],
614
+ platform: i
615
+ } = n, c = s.filter(Boolean), a = await (i.isRTL == null ? void 0 : i.isRTL(t));
616
+ let u = await i.getElementRects({
617
+ reference: e,
618
+ floating: t,
619
+ strategy: o
620
+ }), {
621
+ x: l,
622
+ y: p
623
+ } = bn(u, r, a), g = r, d = {}, h = 0;
624
+ for (let m = 0; m < c.length; m++) {
625
+ const {
626
+ name: y,
627
+ fn: R
628
+ } = c[m], {
629
+ x: v,
630
+ y: x,
631
+ data: C,
632
+ reset: A
633
+ } = await R({
634
+ x: l,
635
+ y: p,
636
+ initialPlacement: r,
637
+ placement: g,
638
+ strategy: o,
639
+ middlewareData: d,
640
+ rects: u,
641
+ platform: i,
642
+ elements: {
643
+ reference: e,
644
+ floating: t
645
+ }
646
+ });
647
+ l = v ?? l, p = x ?? p, d = {
648
+ ...d,
649
+ [y]: {
650
+ ...d[y],
651
+ ...C
652
+ }
653
+ }, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (u = A.rects === !0 ? await i.getElementRects({
654
+ reference: e,
655
+ floating: t,
656
+ strategy: o
657
+ }) : A.rects), {
658
+ x: l,
659
+ y: p
660
+ } = bn(u, g, a)), m = -1);
661
+ }
662
+ return {
663
+ x: l,
664
+ y: p,
665
+ placement: g,
666
+ strategy: o,
667
+ middlewareData: d
668
+ };
669
+ };
670
+ async function kt(e, t) {
671
+ var n;
672
+ t === void 0 && (t = {});
673
+ const {
674
+ x: r,
675
+ y: o,
676
+ platform: s,
677
+ rects: i,
678
+ elements: c,
679
+ strategy: a
680
+ } = e, {
681
+ boundary: u = "clippingAncestors",
682
+ rootBoundary: l = "viewport",
683
+ elementContext: p = "floating",
684
+ altBoundary: g = !1,
685
+ padding: d = 0
686
+ } = Ze(t, e), h = Wr(d), y = c[g ? p === "floating" ? "reference" : "floating" : p], R = Ct(await s.getClippingRect({
687
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
688
+ boundary: u,
689
+ rootBoundary: l,
690
+ strategy: a
691
+ })), v = p === "floating" ? {
692
+ x: r,
693
+ y: o,
694
+ width: i.floating.width,
695
+ height: i.floating.height
696
+ } : i.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), C = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
697
+ x: 1,
698
+ y: 1
699
+ } : {
700
+ x: 1,
701
+ y: 1
702
+ }, A = Ct(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
703
+ elements: c,
704
+ rect: v,
705
+ offsetParent: x,
706
+ strategy: a
707
+ }) : v);
708
+ return {
709
+ top: (R.top - A.top + h.top) / C.y,
710
+ bottom: (A.bottom - R.bottom + h.bottom) / C.y,
711
+ left: (R.left - A.left + h.left) / C.x,
712
+ right: (A.right - R.right + h.right) / C.x
713
+ };
714
+ }
715
+ function eo(e, t, n) {
716
+ return (e ? [...n.filter((o) => Ie(o) === e), ...n.filter((o) => Ie(o) !== e)] : n.filter((o) => Te(o) === o)).filter((o) => e ? Ie(o) === e || (t ? Rt(o) !== o : !1) : !0);
717
+ }
718
+ const to = function(e) {
719
+ return e === void 0 && (e = {}), {
720
+ name: "autoPlacement",
721
+ options: e,
722
+ async fn(t) {
723
+ var n, r, o;
724
+ const {
725
+ rects: s,
726
+ middlewareData: i,
727
+ placement: c,
728
+ platform: a,
729
+ elements: u
730
+ } = t, {
731
+ crossAxis: l = !1,
732
+ alignment: p,
733
+ allowedPlacements: g = mn,
734
+ autoAlignment: d = !0,
735
+ ...h
736
+ } = Ze(e, t), m = p !== void 0 || g === mn ? eo(p || null, d, g) : g, y = await kt(t, h), R = ((n = i.autoPlacement) == null ? void 0 : n.index) || 0, v = m[R];
737
+ if (v == null)
738
+ return {};
739
+ const x = Yn(v, s, await (a.isRTL == null ? void 0 : a.isRTL(u.floating)));
740
+ if (c !== v)
741
+ return {
742
+ reset: {
743
+ placement: m[0]
744
+ }
745
+ };
746
+ const C = [y[Te(v)], y[x[0]], y[x[1]]], A = [...((r = i.autoPlacement) == null ? void 0 : r.overflows) || [], {
747
+ placement: v,
748
+ overflows: C
749
+ }], k = m[R + 1];
750
+ if (k)
751
+ return {
752
+ data: {
753
+ index: R + 1,
754
+ overflows: A
755
+ },
756
+ reset: {
757
+ placement: k
758
+ }
759
+ };
760
+ const N = A.map((F) => {
761
+ const _ = Ie(F.placement);
762
+ return [F.placement, _ && l ? (
763
+ // Check along the mainAxis and main crossAxis side.
764
+ F.overflows.slice(0, 2).reduce((U, K) => U + K, 0)
765
+ ) : (
766
+ // Check only the mainAxis.
767
+ F.overflows[0]
768
+ ), F.overflows];
769
+ }).sort((F, _) => F[1] - _[1]), L = ((o = N.filter((F) => F[2].slice(
770
+ 0,
771
+ // Aligned placements should not check their opposite crossAxis
772
+ // side.
773
+ Ie(F[0]) ? 2 : 3
774
+ ).every((_) => _ <= 0))[0]) == null ? void 0 : o[0]) || N[0][0];
775
+ return L !== c ? {
776
+ data: {
777
+ index: R + 1,
778
+ overflows: A
779
+ },
780
+ reset: {
781
+ placement: L
782
+ }
783
+ } : {};
784
+ }
785
+ };
786
+ }, no = function(e) {
787
+ return e === void 0 && (e = {}), {
788
+ name: "flip",
789
+ options: e,
790
+ async fn(t) {
791
+ var n, r;
792
+ const {
793
+ placement: o,
794
+ middlewareData: s,
795
+ rects: i,
796
+ initialPlacement: c,
797
+ platform: a,
798
+ elements: u
799
+ } = t, {
800
+ mainAxis: l = !0,
801
+ crossAxis: p = !0,
802
+ fallbackPlacements: g,
803
+ fallbackStrategy: d = "bestFit",
804
+ fallbackAxisSideDirection: h = "none",
805
+ flipAlignment: m = !0,
806
+ ...y
807
+ } = Ze(e, t);
808
+ if ((n = s.arrow) != null && n.alignmentOffset)
809
+ return {};
810
+ const R = Te(o), v = ze(c), x = Te(c) === c, C = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), A = g || (x || !m ? [Et(c)] : Lr(c)), k = h !== "none";
811
+ !g && k && A.push(...Nr(c, m, h, C));
812
+ const N = [c, ...A], D = await kt(t, y), L = [];
813
+ let F = ((r = s.flip) == null ? void 0 : r.overflows) || [];
814
+ if (l && L.push(D[R]), p) {
815
+ const O = Yn(o, i, C);
816
+ L.push(D[O[0]], D[O[1]]);
817
+ }
818
+ if (F = [...F, {
819
+ placement: o,
820
+ overflows: L
821
+ }], !L.every((O) => O <= 0)) {
822
+ var _, U;
823
+ const O = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, w = N[O];
824
+ if (w)
825
+ return {
826
+ data: {
827
+ index: O,
828
+ overflows: F
829
+ },
830
+ reset: {
831
+ placement: w
832
+ }
833
+ };
834
+ let W = (U = F.filter((T) => T.overflows[0] <= 0).sort((T, b) => T.overflows[1] - b.overflows[1])[0]) == null ? void 0 : U.placement;
835
+ if (!W)
836
+ switch (d) {
837
+ case "bestFit": {
838
+ var K;
839
+ const T = (K = F.filter((b) => {
840
+ if (k) {
841
+ const E = ze(b.placement);
842
+ return E === v || // Create a bias to the `y` side axis due to horizontal
843
+ // reading directions favoring greater width.
844
+ E === "y";
845
+ }
846
+ return !0;
847
+ }).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, P) => E + P, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : K[0];
848
+ T && (W = T);
849
+ break;
850
+ }
851
+ case "initialPlacement":
852
+ W = c;
853
+ break;
854
+ }
855
+ if (o !== W)
856
+ return {
857
+ reset: {
858
+ placement: W
859
+ }
860
+ };
861
+ }
862
+ return {};
863
+ }
864
+ };
865
+ };
866
+ async function ro(e, t) {
867
+ const {
868
+ placement: n,
869
+ platform: r,
870
+ elements: o
871
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Te(n), c = Ie(n), a = ze(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Ze(t, e);
872
+ let {
873
+ mainAxis: g,
874
+ crossAxis: d,
875
+ alignmentAxis: h
876
+ } = typeof p == "number" ? {
877
+ mainAxis: p,
878
+ crossAxis: 0,
879
+ alignmentAxis: null
880
+ } : {
881
+ mainAxis: p.mainAxis || 0,
882
+ crossAxis: p.crossAxis || 0,
883
+ alignmentAxis: p.alignmentAxis
884
+ };
885
+ return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), a ? {
886
+ x: d * l,
887
+ y: g * u
888
+ } : {
889
+ x: g * u,
890
+ y: d * l
891
+ };
892
+ }
893
+ const oo = function(e) {
894
+ return e === void 0 && (e = 0), {
895
+ name: "offset",
896
+ options: e,
897
+ async fn(t) {
898
+ var n, r;
899
+ const {
900
+ x: o,
901
+ y: s,
902
+ placement: i,
903
+ middlewareData: c
904
+ } = t, a = await ro(t, e);
905
+ return i === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
906
+ x: o + a.x,
907
+ y: s + a.y,
908
+ data: {
909
+ ...a,
910
+ placement: i
911
+ }
912
+ };
913
+ }
914
+ };
915
+ }, io = function(e) {
916
+ return e === void 0 && (e = {}), {
917
+ name: "shift",
918
+ options: e,
919
+ async fn(t) {
920
+ const {
921
+ x: n,
922
+ y: r,
923
+ placement: o
924
+ } = t, {
925
+ mainAxis: s = !0,
926
+ crossAxis: i = !1,
927
+ limiter: c = {
928
+ fn: (y) => {
929
+ let {
930
+ x: R,
931
+ y: v
932
+ } = y;
933
+ return {
934
+ x: R,
935
+ y: v
936
+ };
937
+ }
938
+ },
939
+ ...a
940
+ } = Ze(e, t), u = {
941
+ x: n,
942
+ y: r
943
+ }, l = await kt(t, a), p = ze(Te(o)), g = Gn(p);
944
+ let d = u[g], h = u[p];
945
+ if (s) {
946
+ const y = g === "y" ? "top" : "left", R = g === "y" ? "bottom" : "right", v = d + l[y], x = d - l[R];
947
+ d = pn(v, d, x);
948
+ }
949
+ if (i) {
950
+ const y = p === "y" ? "top" : "left", R = p === "y" ? "bottom" : "right", v = h + l[y], x = h - l[R];
951
+ h = pn(v, h, x);
952
+ }
953
+ const m = c.fn({
954
+ ...t,
955
+ [g]: d,
956
+ [p]: h
957
+ });
958
+ return {
959
+ ...m,
960
+ data: {
961
+ x: m.x - n,
962
+ y: m.y - r,
963
+ enabled: {
964
+ [g]: s,
965
+ [p]: i
966
+ }
967
+ }
968
+ };
969
+ }
970
+ };
971
+ }, so = function(e) {
972
+ return e === void 0 && (e = {}), {
973
+ name: "size",
974
+ options: e,
975
+ async fn(t) {
976
+ var n, r;
977
+ const {
978
+ placement: o,
979
+ rects: s,
980
+ platform: i,
981
+ elements: c
982
+ } = t, {
983
+ apply: a = () => {
984
+ },
985
+ ...u
986
+ } = Ze(e, t), l = await kt(t, u), p = Te(o), g = Ie(o), d = ze(o) === "y", {
987
+ width: h,
988
+ height: m
989
+ } = s.floating;
990
+ let y, R;
991
+ p === "top" || p === "bottom" ? (y = p, R = g === (await (i.isRTL == null ? void 0 : i.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (R = p, y = g === "end" ? "top" : "bottom");
992
+ const v = m - l.top - l.bottom, x = h - l.left - l.right, C = Qe(m - l[y], v), A = Qe(h - l[R], x), k = !t.middlewareData.shift;
993
+ let N = C, D = A;
994
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (D = x), (r = t.middlewareData.shift) != null && r.enabled.y && (N = v), k && !g) {
995
+ const F = be(l.left, 0), _ = be(l.right, 0), U = be(l.top, 0), K = be(l.bottom, 0);
996
+ d ? D = h - 2 * (F !== 0 || _ !== 0 ? F + _ : be(l.left, l.right)) : N = m - 2 * (U !== 0 || K !== 0 ? U + K : be(l.top, l.bottom));
997
+ }
998
+ await a({
999
+ ...t,
1000
+ availableWidth: D,
1001
+ availableHeight: N
1002
+ });
1003
+ const L = await i.getDimensions(c.floating);
1004
+ return h !== L.width || m !== L.height ? {
1005
+ reset: {
1006
+ rects: !0
1007
+ }
1008
+ } : {};
1009
+ }
1010
+ };
1011
+ };
1012
+ function ur(e) {
1013
+ const t = we(e);
1014
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1015
+ const o = re(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, c = wt(n) !== s || wt(r) !== i;
1016
+ return c && (n = s, r = i), {
1017
+ width: n,
1018
+ height: r,
1019
+ $: c
1020
+ };
1021
+ }
1022
+ function sn(e) {
1023
+ return Y(e) ? e : e.contextElement;
1024
+ }
1025
+ function Xe(e) {
1026
+ const t = sn(e);
1027
+ if (!re(t))
1028
+ return Ce(1);
1029
+ const n = t.getBoundingClientRect(), {
1030
+ width: r,
1031
+ height: o,
1032
+ $: s
1033
+ } = ur(t);
1034
+ let i = (s ? wt(n.width) : n.width) / r, c = (s ? wt(n.height) : n.height) / o;
1035
+ return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1036
+ x: i,
1037
+ y: c
1038
+ };
1039
+ }
1040
+ const co = /* @__PURE__ */ Ce(0);
1041
+ function lr(e) {
1042
+ const t = he(e);
1043
+ return !St() || !t.visualViewport ? co : {
1044
+ x: t.visualViewport.offsetLeft,
1045
+ y: t.visualViewport.offsetTop
1046
+ };
1047
+ }
1048
+ function uo(e, t, n) {
1049
+ return t === void 0 && (t = !1), !n || t && n !== he(e) ? !1 : t;
1050
+ }
1051
+ function Ue(e, t, n, r) {
1052
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1053
+ const o = e.getBoundingClientRect(), s = sn(e);
1054
+ let i = Ce(1);
1055
+ t && (r ? Y(r) && (i = Xe(r)) : i = Xe(e));
1056
+ const c = uo(s, n, r) ? lr(s) : Ce(0);
1057
+ let a = (o.left + c.x) / i.x, u = (o.top + c.y) / i.y, l = o.width / i.x, p = o.height / i.y;
1058
+ if (s) {
1059
+ const g = he(s), d = r && Y(r) ? he(r) : r;
1060
+ let h = g, m = Jt(h);
1061
+ for (; m && r && d !== h; ) {
1062
+ const y = Xe(m), R = m.getBoundingClientRect(), v = we(m), x = R.left + (m.clientLeft + parseFloat(v.paddingLeft)) * y.x, C = R.top + (m.clientTop + parseFloat(v.paddingTop)) * y.y;
1063
+ a *= y.x, u *= y.y, l *= y.x, p *= y.y, a += x, u += C, h = he(m), m = Jt(h);
1064
+ }
1065
+ }
1066
+ return Ct({
1067
+ width: l,
1068
+ height: p,
1069
+ x: a,
1070
+ y: u
1071
+ });
1072
+ }
1073
+ function cn(e, t) {
1074
+ const n = Dt(e).scrollLeft;
1075
+ return t ? t.left + n : Ue(Oe(e)).left + n;
1076
+ }
1077
+ function ar(e, t, n) {
1078
+ n === void 0 && (n = !1);
1079
+ const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
1080
+ // RTL <body> scrollbar.
1081
+ cn(e, r)
1082
+ )), s = r.top + t.scrollTop;
1083
+ return {
1084
+ x: o,
1085
+ y: s
1086
+ };
1087
+ }
1088
+ function lo(e) {
1089
+ let {
1090
+ elements: t,
1091
+ rect: n,
1092
+ offsetParent: r,
1093
+ strategy: o
1094
+ } = e;
1095
+ const s = o === "fixed", i = Oe(r), c = t ? Pt(t.floating) : !1;
1096
+ if (r === i || c && s)
1097
+ return n;
1098
+ let a = {
1099
+ scrollLeft: 0,
1100
+ scrollTop: 0
1101
+ }, u = Ce(1);
1102
+ const l = Ce(0), p = re(r);
1103
+ if ((p || !p && !s) && ((We(r) !== "body" || ut(i)) && (a = Dt(r)), re(r))) {
1104
+ const d = Ue(r);
1105
+ u = Xe(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
1106
+ }
1107
+ const g = i && !p && !s ? ar(i, a, !0) : Ce(0);
1108
+ return {
1109
+ width: n.width * u.x,
1110
+ height: n.height * u.y,
1111
+ x: n.x * u.x - a.scrollLeft * u.x + l.x + g.x,
1112
+ y: n.y * u.y - a.scrollTop * u.y + l.y + g.y
1113
+ };
1114
+ }
1115
+ function ao(e) {
1116
+ return Array.from(e.getClientRects());
1117
+ }
1118
+ function fo(e) {
1119
+ const t = Oe(e), n = Dt(e), r = e.ownerDocument.body, o = be(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = be(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1120
+ let i = -n.scrollLeft + cn(e);
1121
+ const c = -n.scrollTop;
1122
+ return we(r).direction === "rtl" && (i += be(t.clientWidth, r.clientWidth) - o), {
1123
+ width: o,
1124
+ height: s,
1125
+ x: i,
1126
+ y: c
1127
+ };
1128
+ }
1129
+ function mo(e, t) {
1130
+ const n = he(e), r = Oe(e), o = n.visualViewport;
1131
+ let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
1132
+ if (o) {
1133
+ s = o.width, i = o.height;
1134
+ const u = St();
1135
+ (!u || u && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
1136
+ }
1137
+ return {
1138
+ width: s,
1139
+ height: i,
1140
+ x: c,
1141
+ y: a
1142
+ };
1143
+ }
1144
+ function po(e, t) {
1145
+ const n = Ue(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = re(e) ? Xe(e) : Ce(1), i = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, u = r * s.y;
1146
+ return {
1147
+ width: i,
1148
+ height: c,
1149
+ x: a,
1150
+ y: u
1151
+ };
1152
+ }
1153
+ function yn(e, t, n) {
1154
+ let r;
1155
+ if (t === "viewport")
1156
+ r = mo(e, n);
1157
+ else if (t === "document")
1158
+ r = fo(Oe(e));
1159
+ else if (Y(t))
1160
+ r = po(t, n);
1161
+ else {
1162
+ const o = lr(e);
1163
+ r = {
1164
+ x: t.x - o.x,
1165
+ y: t.y - o.y,
1166
+ width: t.width,
1167
+ height: t.height
1168
+ };
1169
+ }
1170
+ return Ct(r);
1171
+ }
1172
+ function fr(e, t) {
1173
+ const n = De(e);
1174
+ return n === t || !Y(n) || Se(n) ? !1 : we(n).position === "fixed" || fr(n, t);
1175
+ }
1176
+ function go(e, t) {
1177
+ const n = t.get(e);
1178
+ if (n)
1179
+ return n;
1180
+ let r = Le(e, [], !1).filter((c) => Y(c) && We(c) !== "body"), o = null;
1181
+ const s = we(e).position === "fixed";
1182
+ let i = s ? De(e) : e;
1183
+ for (; Y(i) && !Se(i); ) {
1184
+ const c = we(i), a = nn(i);
1185
+ !a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = De(i);
1186
+ }
1187
+ return t.set(e, r), r;
1188
+ }
1189
+ function ho(e) {
1190
+ let {
1191
+ element: t,
1192
+ boundary: n,
1193
+ rootBoundary: r,
1194
+ strategy: o
1195
+ } = e;
1196
+ const i = [...n === "clippingAncestors" ? Pt(t) ? [] : go(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
1197
+ const p = yn(t, l, o);
1198
+ return u.top = be(p.top, u.top), u.right = Qe(p.right, u.right), u.bottom = Qe(p.bottom, u.bottom), u.left = be(p.left, u.left), u;
1199
+ }, yn(t, c, o));
1200
+ return {
1201
+ width: a.right - a.left,
1202
+ height: a.bottom - a.top,
1203
+ x: a.left,
1204
+ y: a.top
1205
+ };
1206
+ }
1207
+ function vo(e) {
1208
+ const {
1209
+ width: t,
1210
+ height: n
1211
+ } = ur(e);
1212
+ return {
1213
+ width: t,
1214
+ height: n
1215
+ };
1216
+ }
1217
+ function bo(e, t, n) {
1218
+ const r = re(t), o = Oe(t), s = n === "fixed", i = Ue(e, !0, s, t);
1219
+ let c = {
1220
+ scrollLeft: 0,
1221
+ scrollTop: 0
1222
+ };
1223
+ const a = Ce(0);
1224
+ if (r || !r && !s)
1225
+ if ((We(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
1226
+ const g = Ue(t, !0, s, t);
1227
+ a.x = g.x + t.clientLeft, a.y = g.y + t.clientTop;
1228
+ } else o && (a.x = cn(o));
1229
+ const u = o && !r && !s ? ar(o, c) : Ce(0), l = i.left + c.scrollLeft - a.x - u.x, p = i.top + c.scrollTop - a.y - u.y;
1230
+ return {
1231
+ x: l,
1232
+ y: p,
1233
+ width: i.width,
1234
+ height: i.height
1235
+ };
1236
+ }
1237
+ function Vt(e) {
1238
+ return we(e).position === "static";
1239
+ }
1240
+ function xn(e, t) {
1241
+ if (!re(e) || we(e).position === "fixed")
1242
+ return null;
1243
+ if (t)
1244
+ return t(e);
1245
+ let n = e.offsetParent;
1246
+ return Oe(e) === n && (n = n.ownerDocument.body), n;
1247
+ }
1248
+ function dr(e, t) {
1249
+ const n = he(e);
1250
+ if (Pt(e))
1251
+ return n;
1252
+ if (!re(e)) {
1253
+ let o = De(e);
1254
+ for (; o && !Se(o); ) {
1255
+ if (Y(o) && !Vt(o))
1256
+ return o;
1257
+ o = De(o);
1258
+ }
1259
+ return n;
1260
+ }
1261
+ let r = xn(e, t);
1262
+ for (; r && Mr(r) && Vt(r); )
1263
+ r = xn(r, t);
1264
+ return r && Se(r) && Vt(r) && !nn(r) ? n : r || Pr(e) || n;
1265
+ }
1266
+ const yo = async function(e) {
1267
+ const t = this.getOffsetParent || dr, n = this.getDimensions, r = await n(e.floating);
1268
+ return {
1269
+ reference: bo(e.reference, await t(e.floating), e.strategy),
1270
+ floating: {
1271
+ x: 0,
1272
+ y: 0,
1273
+ width: r.width,
1274
+ height: r.height
1275
+ }
1276
+ };
1277
+ };
1278
+ function xo(e) {
1279
+ return we(e).direction === "rtl";
1280
+ }
1281
+ const wo = {
1282
+ convertOffsetParentRelativeRectToViewportRelativeRect: lo,
1283
+ getDocumentElement: Oe,
1284
+ getClippingRect: ho,
1285
+ getOffsetParent: dr,
1286
+ getElementRects: yo,
1287
+ getClientRects: ao,
1288
+ getDimensions: vo,
1289
+ getScale: Xe,
1290
+ isElement: Y,
1291
+ isRTL: xo
1292
+ };
1293
+ function mr(e, t) {
1294
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1295
+ }
1296
+ function Ro(e, t) {
1297
+ let n = null, r;
1298
+ const o = Oe(e);
1299
+ function s() {
1300
+ var c;
1301
+ clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
1302
+ }
1303
+ function i(c, a) {
1304
+ c === void 0 && (c = !1), a === void 0 && (a = 1), s();
1305
+ const u = e.getBoundingClientRect(), {
1306
+ left: l,
1307
+ top: p,
1308
+ width: g,
1309
+ height: d
1310
+ } = u;
1311
+ if (c || t(), !g || !d)
1312
+ return;
1313
+ const h = je(p), m = je(o.clientWidth - (l + g)), y = je(o.clientHeight - (p + d)), R = je(l), x = {
1314
+ rootMargin: -h + "px " + -m + "px " + -y + "px " + -R + "px",
1315
+ threshold: be(0, Qe(1, a)) || 1
1316
+ };
1317
+ let C = !0;
1318
+ function A(k) {
1319
+ const N = k[0].intersectionRatio;
1320
+ if (N !== a) {
1321
+ if (!C)
1322
+ return i();
1323
+ N ? i(!1, N) : r = setTimeout(() => {
1324
+ i(!1, 1e-7);
1325
+ }, 1e3);
1326
+ }
1327
+ N === 1 && !mr(u, e.getBoundingClientRect()) && i(), C = !1;
1328
+ }
1329
+ try {
1330
+ n = new IntersectionObserver(A, {
1331
+ ...x,
1332
+ // Handle <iframe>s
1333
+ root: o.ownerDocument
1334
+ });
1335
+ } catch {
1336
+ n = new IntersectionObserver(A, x);
1337
+ }
1338
+ n.observe(e);
1339
+ }
1340
+ return i(!0), s;
1341
+ }
1342
+ function ui(e, t, n, r) {
1343
+ r === void 0 && (r = {});
1344
+ const {
1345
+ ancestorScroll: o = !0,
1346
+ ancestorResize: s = !0,
1347
+ elementResize: i = typeof ResizeObserver == "function",
1348
+ layoutShift: c = typeof IntersectionObserver == "function",
1349
+ animationFrame: a = !1
1350
+ } = r, u = sn(e), l = o || s ? [...u ? Le(u) : [], ...Le(t)] : [];
1351
+ l.forEach((R) => {
1352
+ o && R.addEventListener("scroll", n, {
1353
+ passive: !0
1354
+ }), s && R.addEventListener("resize", n);
1355
+ });
1356
+ const p = u && c ? Ro(u, n) : null;
1357
+ let g = -1, d = null;
1358
+ i && (d = new ResizeObserver((R) => {
1359
+ let [v] = R;
1360
+ v && v.target === u && d && (d.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1361
+ var x;
1362
+ (x = d) == null || x.observe(t);
1363
+ })), n();
1364
+ }), u && !a && d.observe(u), d.observe(t));
1365
+ let h, m = a ? Ue(e) : null;
1366
+ a && y();
1367
+ function y() {
1368
+ const R = Ue(e);
1369
+ m && !mr(m, R) && n(), m = R, h = requestAnimationFrame(y);
1370
+ }
1371
+ return n(), () => {
1372
+ var R;
1373
+ l.forEach((v) => {
1374
+ o && v.removeEventListener("scroll", n), s && v.removeEventListener("resize", n);
1375
+ }), p == null || p(), (R = d) == null || R.disconnect(), d = null, a && cancelAnimationFrame(h);
1376
+ };
1377
+ }
1378
+ const Eo = oo, Co = to, Io = io, To = no, Oo = so, Ao = (e, t, n) => {
1379
+ const r = /* @__PURE__ */ new Map(), o = {
1380
+ platform: wo,
1381
+ ...n
1382
+ }, s = {
1383
+ ...o.platform,
1384
+ _c: r
1385
+ };
1386
+ return Zr(e, t, {
1387
+ ...o,
1388
+ platform: s
1389
+ });
1390
+ };
1391
+ var Mo = typeof document < "u", Po = function() {
1392
+ }, xt = Mo ? $n : Po;
1393
+ function Tt(e, t) {
1394
+ if (e === t)
1395
+ return !0;
1396
+ if (typeof e != typeof t)
1397
+ return !1;
1398
+ if (typeof e == "function" && e.toString() === t.toString())
1399
+ return !0;
1400
+ let n, r, o;
1401
+ if (e && t && typeof e == "object") {
1402
+ if (Array.isArray(e)) {
1403
+ if (n = e.length, n !== t.length) return !1;
1404
+ for (r = n; r-- !== 0; )
1405
+ if (!Tt(e[r], t[r]))
1406
+ return !1;
1407
+ return !0;
1408
+ }
1409
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
1410
+ return !1;
1411
+ for (r = n; r-- !== 0; )
1412
+ if (!{}.hasOwnProperty.call(t, o[r]))
1413
+ return !1;
1414
+ for (r = n; r-- !== 0; ) {
1415
+ const s = o[r];
1416
+ if (!(s === "_owner" && e.$$typeof) && !Tt(e[s], t[s]))
1417
+ return !1;
1418
+ }
1419
+ return !0;
1420
+ }
1421
+ return e !== e && t !== t;
1422
+ }
1423
+ function pr(e) {
1424
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1425
+ }
1426
+ function wn(e, t) {
1427
+ const n = pr(e);
1428
+ return Math.round(t * n) / n;
1429
+ }
1430
+ function $t(e) {
1431
+ const t = f.useRef(e);
1432
+ return xt(() => {
1433
+ t.current = e;
1434
+ }), t;
1435
+ }
1436
+ function So(e) {
1437
+ e === void 0 && (e = {});
1438
+ const {
1439
+ placement: t = "bottom",
1440
+ strategy: n = "absolute",
1441
+ middleware: r = [],
1442
+ platform: o,
1443
+ elements: {
1444
+ reference: s,
1445
+ floating: i
1446
+ } = {},
1447
+ transform: c = !0,
1448
+ whileElementsMounted: a,
1449
+ open: u
1450
+ } = e, [l, p] = f.useState({
1451
+ x: 0,
1452
+ y: 0,
1453
+ strategy: n,
1454
+ placement: t,
1455
+ middlewareData: {},
1456
+ isPositioned: !1
1457
+ }), [g, d] = f.useState(r);
1458
+ Tt(g, r) || d(r);
1459
+ const [h, m] = f.useState(null), [y, R] = f.useState(null), v = f.useCallback((b) => {
1460
+ b !== k.current && (k.current = b, m(b));
1461
+ }, []), x = f.useCallback((b) => {
1462
+ b !== N.current && (N.current = b, R(b));
1463
+ }, []), C = s || h, A = i || y, k = f.useRef(null), N = f.useRef(null), D = f.useRef(l), L = a != null, F = $t(a), _ = $t(o), U = $t(u), K = f.useCallback(() => {
1464
+ if (!k.current || !N.current)
1465
+ return;
1466
+ const b = {
1467
+ placement: t,
1468
+ strategy: n,
1469
+ middleware: g
1470
+ };
1471
+ _.current && (b.platform = _.current), Ao(k.current, N.current, b).then((E) => {
1472
+ const P = {
1473
+ ...E,
1474
+ // The floating element's position may be recomputed while it's closed
1475
+ // but still mounted (such as when transitioning out). To ensure
1476
+ // `isPositioned` will be `false` initially on the next open, avoid
1477
+ // setting it to `true` when `open === false` (must be specified).
1478
+ isPositioned: U.current !== !1
1479
+ };
1480
+ O.current && !Tt(D.current, P) && (D.current = P, tn.flushSync(() => {
1481
+ p(P);
1482
+ }));
1483
+ });
1484
+ }, [g, t, n, _, U]);
1485
+ xt(() => {
1486
+ u === !1 && D.current.isPositioned && (D.current.isPositioned = !1, p((b) => ({
1487
+ ...b,
1488
+ isPositioned: !1
1489
+ })));
1490
+ }, [u]);
1491
+ const O = f.useRef(!1);
1492
+ xt(() => (O.current = !0, () => {
1493
+ O.current = !1;
1494
+ }), []), xt(() => {
1495
+ if (C && (k.current = C), A && (N.current = A), C && A) {
1496
+ if (F.current)
1497
+ return F.current(C, A, K);
1498
+ K();
1499
+ }
1500
+ }, [C, A, K, F, L]);
1501
+ const w = f.useMemo(() => ({
1502
+ reference: k,
1503
+ floating: N,
1504
+ setReference: v,
1505
+ setFloating: x
1506
+ }), [v, x]), W = f.useMemo(() => ({
1507
+ reference: C,
1508
+ floating: A
1509
+ }), [C, A]), T = f.useMemo(() => {
1510
+ const b = {
1511
+ position: n,
1512
+ left: 0,
1513
+ top: 0
1514
+ };
1515
+ if (!W.floating)
1516
+ return b;
1517
+ const E = wn(W.floating, l.x), P = wn(W.floating, l.y);
1518
+ return c ? {
1519
+ ...b,
1520
+ transform: "translate(" + E + "px, " + P + "px)",
1521
+ ...pr(W.floating) >= 1.5 && {
1522
+ willChange: "transform"
1523
+ }
1524
+ } : {
1525
+ position: n,
1526
+ left: E,
1527
+ top: P
1528
+ };
1529
+ }, [n, c, W.floating, l.x, l.y]);
1530
+ return f.useMemo(() => ({
1531
+ ...l,
1532
+ update: K,
1533
+ refs: w,
1534
+ elements: W,
1535
+ floatingStyles: T
1536
+ }), [l, K, w, W, T]);
1537
+ }
1538
+ const li = (e, t) => ({
1539
+ ...Eo(e),
1540
+ options: [e, t]
1541
+ }), ai = (e, t) => ({
1542
+ ...Io(e),
1543
+ options: [e, t]
1544
+ }), fi = (e, t) => ({
1545
+ ...To(e),
1546
+ options: [e, t]
1547
+ }), di = (e, t) => ({
1548
+ ...Oo(e),
1549
+ options: [e, t]
1550
+ }), mi = (e, t) => ({
1551
+ ...Co(e),
1552
+ options: [e, t]
1553
+ });
1554
+ function Do(e) {
1555
+ const t = f.useRef(void 0), n = f.useCallback((r) => {
1556
+ const o = e.map((s) => {
1557
+ if (s != null) {
1558
+ if (typeof s == "function") {
1559
+ const i = s, c = i(r);
1560
+ return typeof c == "function" ? c : () => {
1561
+ i(null);
1562
+ };
1563
+ }
1564
+ return s.current = r, () => {
1565
+ s.current = null;
1566
+ };
1567
+ }
1568
+ });
1569
+ return () => {
1570
+ o.forEach((s) => s == null ? void 0 : s());
1571
+ };
1572
+ }, e);
1573
+ return f.useMemo(() => e.every((r) => r == null) ? null : (r) => {
1574
+ t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
1575
+ }, e);
1576
+ }
1577
+ function ko(e, t) {
1578
+ const n = e.compareDocumentPosition(t);
1579
+ 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;
1580
+ }
1581
+ const gr = /* @__PURE__ */ f.createContext({
1582
+ register: () => {
1583
+ },
1584
+ unregister: () => {
1585
+ },
1586
+ map: /* @__PURE__ */ new Map(),
1587
+ elementsRef: {
1588
+ current: []
1589
+ }
1590
+ });
1591
+ function Lo(e) {
1592
+ const {
1593
+ children: t,
1594
+ elementsRef: n,
1595
+ labelsRef: r
1596
+ } = e, [o, s] = f.useState(() => /* @__PURE__ */ new Set()), i = f.useCallback((u) => {
1597
+ s((l) => new Set(l).add(u));
1598
+ }, []), c = f.useCallback((u) => {
1599
+ s((l) => {
1600
+ const p = new Set(l);
1601
+ return p.delete(u), p;
1602
+ });
1603
+ }, []), a = f.useMemo(() => {
1604
+ const u = /* @__PURE__ */ new Map();
1605
+ return Array.from(o.keys()).sort(ko).forEach((p, g) => {
1606
+ u.set(p, g);
1607
+ }), u;
1608
+ }, [o]);
1609
+ return /* @__PURE__ */ ge(gr.Provider, {
1610
+ value: f.useMemo(() => ({
1611
+ register: i,
1612
+ unregister: c,
1613
+ map: a,
1614
+ elementsRef: n,
1615
+ labelsRef: r
1616
+ }), [i, c, a, n, r]),
1617
+ children: t
1618
+ });
1619
+ }
1620
+ function Fo(e) {
1621
+ e === void 0 && (e = {});
1622
+ const {
1623
+ label: t
1624
+ } = e, {
1625
+ register: n,
1626
+ unregister: r,
1627
+ map: o,
1628
+ elementsRef: s,
1629
+ labelsRef: i
1630
+ } = f.useContext(gr), [c, a] = f.useState(null), u = f.useRef(null), l = f.useCallback((p) => {
1631
+ if (u.current = p, c !== null && (s.current[c] = p, i)) {
1632
+ var g;
1633
+ const d = t !== void 0;
1634
+ i.current[c] = d ? t : (g = p == null ? void 0 : p.textContent) != null ? g : null;
1635
+ }
1636
+ }, [c, s, i, t]);
1637
+ return X(() => {
1638
+ const p = u.current;
1639
+ if (p)
1640
+ return n(p), () => {
1641
+ r(p);
1642
+ };
1643
+ }, [n, r]), X(() => {
1644
+ const p = u.current ? o.get(u.current) : null;
1645
+ p != null && a(p);
1646
+ }, [o]), f.useMemo(() => ({
1647
+ ref: l,
1648
+ index: c ?? -1
1649
+ }), [c, l]);
1650
+ }
1651
+ const No = "data-floating-ui-focusable", Rn = "active", En = "selected", Ne = "ArrowLeft", _e = "ArrowRight", st = "ArrowUp", Fe = "ArrowDown";
1652
+ function hr(e, t) {
1653
+ return typeof e == "function" ? e(t) : e ? /* @__PURE__ */ f.cloneElement(e, t) : /* @__PURE__ */ ge("div", {
1654
+ ...t
1655
+ });
1656
+ }
1657
+ const vr = /* @__PURE__ */ f.createContext({
1658
+ activeIndex: 0,
1659
+ onNavigate: () => {
1660
+ }
1661
+ }), br = [Ne, _e], yr = [st, Fe], Bt = [...br, ...yr], pi = /* @__PURE__ */ f.forwardRef(function(t, n) {
1662
+ const {
1663
+ render: r,
1664
+ orientation: o = "both",
1665
+ loop: s = !0,
1666
+ rtl: i = !1,
1667
+ cols: c = 1,
1668
+ disabledIndices: a,
1669
+ activeIndex: u,
1670
+ onNavigate: l,
1671
+ itemSizes: p,
1672
+ dense: g = !1,
1673
+ ...d
1674
+ } = t, [h, m] = f.useState(0), y = u ?? h, R = se(l ?? m), v = f.useRef([]), x = r && typeof r != "function" ? r.props : {}, C = f.useMemo(() => ({
1675
+ activeIndex: y,
1676
+ onNavigate: R
1677
+ }), [y, R]), A = c > 1;
1678
+ function k(D) {
1679
+ if (!Bt.includes(D.key)) return;
1680
+ let L = y;
1681
+ const F = yt(v, a), _ = en(v, a), U = i ? Ne : _e, K = i ? _e : Ne;
1682
+ if (A) {
1683
+ const b = p || Array.from({
1684
+ length: v.current.length
1685
+ }, () => ({
1686
+ width: 1,
1687
+ height: 1
1688
+ })), E = nr(b, c, g), P = E.findIndex((V) => V != null && !He(v, V, a)), G = E.reduce((V, ee, ae) => ee != null && !He(v, ee, a) ? ae : V, -1), I = E[tr({
1689
+ current: E.map((V) => V ? v.current[V] : null)
1690
+ }, {
1691
+ event: D,
1692
+ orientation: o,
1693
+ loop: s,
1694
+ rtl: i,
1695
+ cols: c,
1696
+ // treat undefined (empty grid spaces) as disabled indices so we
1697
+ // don't end up in them
1698
+ disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((V, ee) => He(v, ee, a) ? ee : void 0), void 0], E),
1699
+ minIndex: P,
1700
+ maxIndex: G,
1701
+ prevIndex: rr(
1702
+ y > _ ? F : y,
1703
+ b,
1704
+ E,
1705
+ c,
1706
+ // use a corner matching the edge closest to the direction we're
1707
+ // moving in so we don't end up in the same item. Prefer
1708
+ // top/left over bottom/right.
1709
+ D.key === Fe ? "bl" : D.key === U ? "tr" : "tl"
1710
+ )
1711
+ })];
1712
+ I != null && (L = I);
1713
+ }
1714
+ const O = {
1715
+ horizontal: [U],
1716
+ vertical: [Fe],
1717
+ both: [U, Fe]
1718
+ }[o], w = {
1719
+ horizontal: [K],
1720
+ vertical: [st],
1721
+ both: [K, st]
1722
+ }[o], W = A ? Bt : {
1723
+ horizontal: br,
1724
+ vertical: yr,
1725
+ both: Bt
1726
+ }[o];
1727
+ if (L === y && [...O, ...w].includes(D.key) && (s && L === _ && O.includes(D.key) ? L = F : s && L === F && w.includes(D.key) ? L = _ : L = ue(v, {
1728
+ startingIndex: L,
1729
+ decrement: w.includes(D.key),
1730
+ disabledIndices: a
1731
+ })), L !== y && !Ye(v, L)) {
1732
+ var T;
1733
+ D.stopPropagation(), W.includes(D.key) && D.preventDefault(), R(L), (T = v.current[L]) == null || T.focus();
1734
+ }
1735
+ }
1736
+ const N = {
1737
+ ...d,
1738
+ ...x,
1739
+ ref: n,
1740
+ "aria-orientation": o === "both" ? void 0 : o,
1741
+ onKeyDown(D) {
1742
+ d.onKeyDown == null || d.onKeyDown(D), x.onKeyDown == null || x.onKeyDown(D), k(D);
1743
+ }
1744
+ };
1745
+ return /* @__PURE__ */ ge(vr.Provider, {
1746
+ value: C,
1747
+ children: /* @__PURE__ */ ge(Lo, {
1748
+ elementsRef: v,
1749
+ children: hr(r, N)
1750
+ })
1751
+ });
1752
+ }), gi = /* @__PURE__ */ f.forwardRef(function(t, n) {
1753
+ const {
1754
+ render: r,
1755
+ ...o
1756
+ } = t, s = r && typeof r != "function" ? r.props : {}, {
1757
+ activeIndex: i,
1758
+ onNavigate: c
1759
+ } = f.useContext(vr), {
1760
+ ref: a,
1761
+ index: u
1762
+ } = Fo(), l = Do([a, n, s.ref]), p = i === u, g = {
1763
+ ...o,
1764
+ ...s,
1765
+ ref: l,
1766
+ tabIndex: p ? 0 : -1,
1767
+ "data-active": p ? "" : void 0,
1768
+ onFocus(d) {
1769
+ o.onFocus == null || o.onFocus(d), s.onFocus == null || s.onFocus(d), c(u);
1770
+ }
1771
+ };
1772
+ return hr(r, g);
1773
+ }), _o = {
1774
+ ...f
1775
+ };
1776
+ let Cn = !1, Wo = 0;
1777
+ const In = () => (
1778
+ // Ensure the id is unique with multiple independent versions of Floating UI
1779
+ // on <React 18
1780
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + Wo++
1781
+ );
1782
+ function Ko() {
1783
+ const [e, t] = f.useState(() => Cn ? In() : void 0);
1784
+ return X(() => {
1785
+ e == null && t(In());
1786
+ }, []), f.useEffect(() => {
1787
+ Cn = !0;
1788
+ }, []), e;
1789
+ }
1790
+ const Vo = _o.useId, Lt = Vo || Ko;
1791
+ let ct;
1792
+ process.env.NODE_ENV !== "production" && (ct = /* @__PURE__ */ new Set());
1793
+ function Ht() {
1794
+ for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1795
+ n[r] = arguments[r];
1796
+ const o = "Floating UI: " + n.join(" ");
1797
+ if (!((e = ct) != null && e.has(o))) {
1798
+ var s;
1799
+ (s = ct) == null || s.add(o), console.warn(o);
1800
+ }
1801
+ }
1802
+ function $o() {
1803
+ for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1804
+ n[r] = arguments[r];
1805
+ const o = "Floating UI: " + n.join(" ");
1806
+ if (!((e = ct) != null && e.has(o))) {
1807
+ var s;
1808
+ (s = ct) == null || s.add(o), console.error(o);
1809
+ }
1810
+ }
1811
+ function xr() {
1812
+ const e = /* @__PURE__ */ new Map();
1813
+ return {
1814
+ emit(t, n) {
1815
+ var r;
1816
+ (r = e.get(t)) == null || r.forEach((o) => o(n));
1817
+ },
1818
+ on(t, n) {
1819
+ e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
1820
+ },
1821
+ off(t, n) {
1822
+ var r;
1823
+ (r = e.get(t)) == null || r.delete(n);
1824
+ }
1825
+ };
1826
+ }
1827
+ const wr = /* @__PURE__ */ f.createContext(null), Rr = /* @__PURE__ */ f.createContext(null), et = () => {
1828
+ var e;
1829
+ return ((e = f.useContext(wr)) == null ? void 0 : e.id) || null;
1830
+ }, tt = () => f.useContext(Rr);
1831
+ function hi(e) {
1832
+ const t = Lt(), n = tt(), o = et();
1833
+ return X(() => {
1834
+ if (!t) return;
1835
+ const s = {
1836
+ id: t,
1837
+ parentId: o
1838
+ };
1839
+ return n == null || n.addNode(s), () => {
1840
+ n == null || n.removeNode(s);
1841
+ };
1842
+ }, [n, t, o]), t;
1843
+ }
1844
+ function vi(e) {
1845
+ const {
1846
+ children: t,
1847
+ id: n
1848
+ } = e, r = et();
1849
+ return /* @__PURE__ */ ge(wr.Provider, {
1850
+ value: f.useMemo(() => ({
1851
+ id: n,
1852
+ parentId: r
1853
+ }), [n, r]),
1854
+ children: t
1855
+ });
1856
+ }
1857
+ function bi(e) {
1858
+ const {
1859
+ children: t
1860
+ } = e, n = f.useRef([]), r = f.useCallback((i) => {
1861
+ n.current = [...n.current, i];
1862
+ }, []), o = f.useCallback((i) => {
1863
+ n.current = n.current.filter((c) => c !== i);
1864
+ }, []), [s] = f.useState(() => xr());
1865
+ return /* @__PURE__ */ ge(Rr.Provider, {
1866
+ value: f.useMemo(() => ({
1867
+ nodesRef: n,
1868
+ addNode: r,
1869
+ removeNode: o,
1870
+ events: s
1871
+ }), [r, o, s]),
1872
+ children: t
1873
+ });
1874
+ }
1875
+ function Ge(e) {
1876
+ return "data-floating-ui-" + e;
1877
+ }
1878
+ function ve(e) {
1879
+ e.current !== -1 && (clearTimeout(e.current), e.current = -1);
1880
+ }
1881
+ const Tn = /* @__PURE__ */ Ge("safe-polygon");
1882
+ function zt(e, t, n) {
1883
+ if (n && !it(n))
1884
+ return 0;
1885
+ if (typeof e == "number")
1886
+ return e;
1887
+ if (typeof e == "function") {
1888
+ const r = e();
1889
+ return typeof r == "number" ? r : r == null ? void 0 : r[t];
1890
+ }
1891
+ return e == null ? void 0 : e[t];
1892
+ }
1893
+ function Ut(e) {
1894
+ return typeof e == "function" ? e() : e;
1895
+ }
1896
+ function yi(e, t) {
1897
+ t === void 0 && (t = {});
1898
+ const {
1899
+ open: n,
1900
+ onOpenChange: r,
1901
+ dataRef: o,
1902
+ events: s,
1903
+ elements: i
1904
+ } = e, {
1905
+ enabled: c = !0,
1906
+ delay: a = 0,
1907
+ handleClose: u = null,
1908
+ mouseOnly: l = !1,
1909
+ restMs: p = 0,
1910
+ move: g = !0
1911
+ } = t, d = tt(), h = et(), m = xe(u), y = xe(a), R = xe(n), v = xe(p), x = f.useRef(), C = f.useRef(-1), A = f.useRef(), k = f.useRef(-1), N = f.useRef(!0), D = f.useRef(!1), L = f.useRef(() => {
1912
+ }), F = f.useRef(!1), _ = se(() => {
1913
+ var T;
1914
+ const b = (T = o.current.openEvent) == null ? void 0 : T.type;
1915
+ return (b == null ? void 0 : b.includes("mouse")) && b !== "mousedown";
1916
+ });
1917
+ f.useEffect(() => {
1918
+ if (!c) return;
1919
+ function T(b) {
1920
+ let {
1921
+ open: E
1922
+ } = b;
1923
+ E || (ve(C), ve(k), N.current = !0, F.current = !1);
1924
+ }
1925
+ return s.on("openchange", T), () => {
1926
+ s.off("openchange", T);
1927
+ };
1928
+ }, [c, s]), f.useEffect(() => {
1929
+ if (!c || !m.current || !n) return;
1930
+ function T(E) {
1931
+ _() && r(!1, E, "hover");
1932
+ }
1933
+ const b = le(i.floating).documentElement;
1934
+ return b.addEventListener("mouseleave", T), () => {
1935
+ b.removeEventListener("mouseleave", T);
1936
+ };
1937
+ }, [i.floating, n, r, c, m, _]);
1938
+ const U = f.useCallback(function(T, b, E) {
1939
+ b === void 0 && (b = !0), E === void 0 && (E = "hover");
1940
+ const P = zt(y.current, "close", x.current);
1941
+ P && !A.current ? (ve(C), C.current = window.setTimeout(() => r(!1, T, E), P)) : b && (ve(C), r(!1, T, E));
1942
+ }, [y, r]), K = se(() => {
1943
+ L.current(), A.current = void 0;
1944
+ }), O = se(() => {
1945
+ if (D.current) {
1946
+ const T = le(i.floating).body;
1947
+ T.style.pointerEvents = "", T.removeAttribute(Tn), D.current = !1;
1948
+ }
1949
+ }), w = se(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
1950
+ f.useEffect(() => {
1951
+ if (!c) return;
1952
+ function T(I) {
1953
+ if (ve(C), N.current = !1, l && !it(x.current) || Ut(v.current) > 0 && !zt(y.current, "open"))
1954
+ return;
1955
+ const V = zt(y.current, "open", x.current);
1956
+ V ? C.current = window.setTimeout(() => {
1957
+ R.current || r(!0, I, "hover");
1958
+ }, V) : n || r(!0, I, "hover");
1959
+ }
1960
+ function b(I) {
1961
+ if (w()) {
1962
+ O();
1963
+ return;
1964
+ }
1965
+ L.current();
1966
+ const V = le(i.floating);
1967
+ if (ve(k), F.current = !1, m.current && o.current.floatingContext) {
1968
+ n || ve(C), A.current = m.current({
1969
+ ...o.current.floatingContext,
1970
+ tree: d,
1971
+ x: I.clientX,
1972
+ y: I.clientY,
1973
+ onClose() {
1974
+ O(), K(), w() || U(I, !0, "safe-polygon");
1975
+ }
1976
+ });
1977
+ const ae = A.current;
1978
+ V.addEventListener("mousemove", ae), L.current = () => {
1979
+ V.removeEventListener("mousemove", ae);
1980
+ };
1981
+ return;
1982
+ }
1983
+ (x.current === "touch" ? !ce(i.floating, I.relatedTarget) : !0) && U(I);
1984
+ }
1985
+ function E(I) {
1986
+ w() || o.current.floatingContext && (m.current == null || m.current({
1987
+ ...o.current.floatingContext,
1988
+ tree: d,
1989
+ x: I.clientX,
1990
+ y: I.clientY,
1991
+ onClose() {
1992
+ O(), K(), w() || U(I);
1993
+ }
1994
+ })(I));
1995
+ }
1996
+ function P() {
1997
+ ve(C);
1998
+ }
1999
+ function G(I) {
2000
+ w() || U(I, !1);
2001
+ }
2002
+ if (Y(i.domReference)) {
2003
+ const I = i.domReference, V = i.floating;
2004
+ return n && I.addEventListener("mouseleave", E), g && I.addEventListener("mousemove", T, {
2005
+ once: !0
2006
+ }), I.addEventListener("mouseenter", T), I.addEventListener("mouseleave", b), V && (V.addEventListener("mouseleave", E), V.addEventListener("mouseenter", P), V.addEventListener("mouseleave", G)), () => {
2007
+ n && I.removeEventListener("mouseleave", E), g && I.removeEventListener("mousemove", T), I.removeEventListener("mouseenter", T), I.removeEventListener("mouseleave", b), V && (V.removeEventListener("mouseleave", E), V.removeEventListener("mouseenter", P), V.removeEventListener("mouseleave", G));
2008
+ };
2009
+ }
2010
+ }, [i, c, e, l, g, U, K, O, r, n, R, d, y, m, o, w, v]), X(() => {
2011
+ var T;
2012
+ if (c && n && (T = m.current) != null && (T = T.__options) != null && T.blockPointerEvents && _()) {
2013
+ D.current = !0;
2014
+ const E = i.floating;
2015
+ if (Y(i.domReference) && E) {
2016
+ var b;
2017
+ const P = le(i.floating).body;
2018
+ P.setAttribute(Tn, "");
2019
+ const G = i.domReference, I = d == null || (b = d.nodesRef.current.find((V) => V.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
2020
+ return I && (I.style.pointerEvents = ""), P.style.pointerEvents = "none", G.style.pointerEvents = "auto", E.style.pointerEvents = "auto", () => {
2021
+ P.style.pointerEvents = "", G.style.pointerEvents = "", E.style.pointerEvents = "";
2022
+ };
2023
+ }
2024
+ }
2025
+ }, [c, n, h, i, d, m, _]), X(() => {
2026
+ n || (x.current = void 0, F.current = !1, K(), O());
2027
+ }, [n, K, O]), f.useEffect(() => () => {
2028
+ K(), ve(C), ve(k), O();
2029
+ }, [c, i.domReference, K, O]);
2030
+ const W = f.useMemo(() => {
2031
+ function T(b) {
2032
+ x.current = b.pointerType;
2033
+ }
2034
+ return {
2035
+ onPointerDown: T,
2036
+ onPointerEnter: T,
2037
+ onMouseMove(b) {
2038
+ const {
2039
+ nativeEvent: E
2040
+ } = b;
2041
+ function P() {
2042
+ !N.current && !R.current && r(!0, E, "hover");
2043
+ }
2044
+ l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ? P() : (F.current = !0, k.current = window.setTimeout(P, Ut(v.current))));
2045
+ }
2046
+ };
2047
+ }, [l, r, n, R, v]);
2048
+ return f.useMemo(() => c ? {
2049
+ reference: W
2050
+ } : {}, [c, W]);
2051
+ }
2052
+ let On = 0;
2053
+ function $e(e, t) {
2054
+ t === void 0 && (t = {});
2055
+ const {
2056
+ preventScroll: n = !1,
2057
+ cancelPrevious: r = !0,
2058
+ sync: o = !1
2059
+ } = t;
2060
+ r && cancelAnimationFrame(On);
2061
+ const s = () => e == null ? void 0 : e.focus({
2062
+ preventScroll: n
2063
+ });
2064
+ o ? s() : On = requestAnimationFrame(s);
2065
+ }
2066
+ function Bo(e) {
2067
+ return (e == null ? void 0 : e.ownerDocument) || document;
2068
+ }
2069
+ const Je = {
2070
+ inert: /* @__PURE__ */ new WeakMap(),
2071
+ "aria-hidden": /* @__PURE__ */ new WeakMap(),
2072
+ none: /* @__PURE__ */ new WeakMap()
2073
+ };
2074
+ function An(e) {
2075
+ return e === "inert" ? Je.inert : e === "aria-hidden" ? Je["aria-hidden"] : Je.none;
2076
+ }
2077
+ let gt = /* @__PURE__ */ new WeakSet(), ht = {}, Gt = 0;
2078
+ const Ho = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Er = (e) => e && (e.host || Er(e.parentNode)), zo = (e, t) => t.map((n) => {
2079
+ if (e.contains(n))
2080
+ return n;
2081
+ const r = Er(n);
2082
+ return e.contains(r) ? r : null;
2083
+ }).filter((n) => n != null);
2084
+ function Uo(e, t, n, r) {
2085
+ const o = "data-floating-ui-inert", s = r ? "inert" : n ? "aria-hidden" : null, i = zo(t, e), c = /* @__PURE__ */ new Set(), a = new Set(i), u = [];
2086
+ ht[o] || (ht[o] = /* @__PURE__ */ new WeakMap());
2087
+ const l = ht[o];
2088
+ i.forEach(p), g(t), c.clear();
2089
+ function p(d) {
2090
+ !d || c.has(d) || (c.add(d), d.parentNode && p(d.parentNode));
2091
+ }
2092
+ function g(d) {
2093
+ !d || a.has(d) || [].forEach.call(d.children, (h) => {
2094
+ if (We(h) !== "script")
2095
+ if (c.has(h))
2096
+ g(h);
2097
+ else {
2098
+ const m = s ? h.getAttribute(s) : null, y = m !== null && m !== "false", R = An(s), v = (R.get(h) || 0) + 1, x = (l.get(h) || 0) + 1;
2099
+ R.set(h, v), l.set(h, x), u.push(h), v === 1 && y && gt.add(h), x === 1 && h.setAttribute(o, ""), !y && s && h.setAttribute(s, s === "inert" ? "" : "true");
2100
+ }
2101
+ });
2102
+ }
2103
+ return Gt++, () => {
2104
+ u.forEach((d) => {
2105
+ const h = An(s), y = (h.get(d) || 0) - 1, R = (l.get(d) || 0) - 1;
2106
+ h.set(d, y), l.set(d, R), y || (!gt.has(d) && s && d.removeAttribute(s), gt.delete(d)), R || d.removeAttribute(o);
2107
+ }), Gt--, Gt || (Je.inert = /* @__PURE__ */ new WeakMap(), Je["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Je.none = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), ht = {});
2108
+ };
2109
+ }
2110
+ function Mn(e, t, n) {
2111
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
2112
+ const r = Bo(e[0]).body;
2113
+ return Uo(e.concat(Array.from(r.querySelectorAll("[aria-live]"))), r, t, n);
2114
+ }
2115
+ const Ft = {
2116
+ border: 0,
2117
+ clip: "rect(0 0 0 0)",
2118
+ height: "1px",
2119
+ margin: "-1px",
2120
+ overflow: "hidden",
2121
+ padding: 0,
2122
+ position: "fixed",
2123
+ whiteSpace: "nowrap",
2124
+ width: "1px",
2125
+ top: 0,
2126
+ left: 0
2127
+ }, Ot = /* @__PURE__ */ f.forwardRef(function(t, n) {
2128
+ const [r, o] = f.useState();
2129
+ X(() => {
2130
+ Jn() && o("button");
2131
+ }, []);
2132
+ const s = {
2133
+ ref: n,
2134
+ tabIndex: 0,
2135
+ // Role is only for VoiceOver
2136
+ role: r,
2137
+ "aria-hidden": r ? void 0 : !0,
2138
+ [Ge("focus-guard")]: "",
2139
+ style: Ft
2140
+ };
2141
+ return /* @__PURE__ */ ge("span", {
2142
+ ...t,
2143
+ ...s
2144
+ });
2145
+ }), Cr = /* @__PURE__ */ f.createContext(null), Pn = /* @__PURE__ */ Ge("portal");
2146
+ function Go(e) {
2147
+ e === void 0 && (e = {});
2148
+ const {
2149
+ id: t,
2150
+ root: n
2151
+ } = e, r = Lt(), o = Ir(), [s, i] = f.useState(null), c = f.useRef(null);
2152
+ return X(() => () => {
2153
+ s == null || s.remove(), queueMicrotask(() => {
2154
+ c.current = null;
2155
+ });
2156
+ }, [s]), X(() => {
2157
+ if (!r || c.current) return;
2158
+ const a = t ? document.getElementById(t) : null;
2159
+ if (!a) return;
2160
+ const u = document.createElement("div");
2161
+ u.id = r, u.setAttribute(Pn, ""), a.appendChild(u), c.current = u, i(u);
2162
+ }, [t, r]), X(() => {
2163
+ if (n === null || !r || c.current) return;
2164
+ let a = n || (o == null ? void 0 : o.portalNode);
2165
+ a && !Y(a) && (a = a.current), a = a || document.body;
2166
+ let u = null;
2167
+ t && (u = document.createElement("div"), u.id = t, a.appendChild(u));
2168
+ const l = document.createElement("div");
2169
+ l.id = r, l.setAttribute(Pn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
2170
+ }, [t, n, r, o]), s;
2171
+ }
2172
+ function xi(e) {
2173
+ const {
2174
+ children: t,
2175
+ id: n,
2176
+ root: r,
2177
+ preserveTabOrder: o = !0
2178
+ } = e, s = Go({
2179
+ id: n,
2180
+ root: r
2181
+ }), [i, c] = f.useState(null), a = f.useRef(null), u = f.useRef(null), l = f.useRef(null), p = f.useRef(null), g = i == null ? void 0 : i.modal, d = i == null ? void 0 : i.open, h = (
2182
+ // The FocusManager and therefore floating element are currently open/
2183
+ // rendered.
2184
+ !!i && // Guards are only for non-modal focus management.
2185
+ !i.modal && // Don't render if unmount is transitioning.
2186
+ i.open && o && !!(r || s)
2187
+ );
2188
+ return f.useEffect(() => {
2189
+ if (!s || !o || g)
2190
+ return;
2191
+ function m(y) {
2192
+ s && ot(y) && (y.type === "focusin" ? vn : Qr)(s);
2193
+ }
2194
+ return s.addEventListener("focusin", m, !0), s.addEventListener("focusout", m, !0), () => {
2195
+ s.removeEventListener("focusin", m, !0), s.removeEventListener("focusout", m, !0);
2196
+ };
2197
+ }, [s, o, g]), f.useEffect(() => {
2198
+ s && (d || vn(s));
2199
+ }, [d, s]), /* @__PURE__ */ Hn(Cr.Provider, {
2200
+ value: f.useMemo(() => ({
2201
+ preserveTabOrder: o,
2202
+ beforeOutsideRef: a,
2203
+ afterOutsideRef: u,
2204
+ beforeInsideRef: l,
2205
+ afterInsideRef: p,
2206
+ portalNode: s,
2207
+ setFocusManagerState: c
2208
+ }), [o, s]),
2209
+ children: [h && s && /* @__PURE__ */ ge(Ot, {
2210
+ "data-type": "outside",
2211
+ ref: a,
2212
+ onFocus: (m) => {
2213
+ if (ot(m, s)) {
2214
+ var y;
2215
+ (y = l.current) == null || y.focus();
2216
+ } else {
2217
+ const R = i ? i.domReference : null, v = cr(R);
2218
+ v == null || v.focus();
2219
+ }
2220
+ }
2221
+ }), h && s && /* @__PURE__ */ ge("span", {
2222
+ "aria-owns": s.id,
2223
+ style: Ft
2224
+ }), s && /* @__PURE__ */ tn.createPortal(t, s), h && s && /* @__PURE__ */ ge(Ot, {
2225
+ "data-type": "outside",
2226
+ ref: u,
2227
+ onFocus: (m) => {
2228
+ if (ot(m, s)) {
2229
+ var y;
2230
+ (y = p.current) == null || y.focus();
2231
+ } else {
2232
+ const R = i ? i.domReference : null, v = sr(R);
2233
+ v == null || v.focus(), i != null && i.closeOnFocusOut && (i == null || i.onOpenChange(!1, m.nativeEvent, "focus-out"));
2234
+ }
2235
+ }
2236
+ })]
2237
+ });
2238
+ }
2239
+ const Ir = () => f.useContext(Cr);
2240
+ function Sn(e) {
2241
+ return f.useMemo(() => (t) => {
2242
+ e.forEach((n) => {
2243
+ n && (n.current = t);
2244
+ });
2245
+ }, e);
2246
+ }
2247
+ const jo = 20;
2248
+ let Be = [];
2249
+ function qo(e) {
2250
+ Be = Be.filter((t) => t.isConnected), e && We(e) !== "body" && (Be.push(e), Be.length > jo && (Be = Be.slice(-20)));
2251
+ }
2252
+ function Dn() {
2253
+ return Be.slice().reverse().find((e) => e.isConnected);
2254
+ }
2255
+ function Yo(e) {
2256
+ const t = lt();
2257
+ return Bn(e, t) ? e : At(e, t)[0] || e;
2258
+ }
2259
+ function kn(e, t) {
2260
+ var n;
2261
+ if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
2262
+ return;
2263
+ const r = lt(), s = Or(e, r).filter((c) => {
2264
+ const a = c.getAttribute("data-tabindex") || "";
2265
+ return Bn(c, r) || c.hasAttribute("data-tabindex") && !a.startsWith("-");
2266
+ }), i = e.getAttribute("tabindex");
2267
+ t.current.includes("floating") || s.length === 0 ? i !== "0" && e.setAttribute("tabindex", "0") : (i !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
2268
+ }
2269
+ const Xo = /* @__PURE__ */ f.forwardRef(function(t, n) {
2270
+ return /* @__PURE__ */ ge("button", {
2271
+ ...t,
2272
+ type: "button",
2273
+ ref: n,
2274
+ tabIndex: -1,
2275
+ style: Ft
2276
+ });
2277
+ });
2278
+ function wi(e) {
2279
+ const {
2280
+ context: t,
2281
+ children: n,
2282
+ disabled: r = !1,
2283
+ order: o = ["content"],
2284
+ guards: s = !0,
2285
+ initialFocus: i = 0,
2286
+ returnFocus: c = !0,
2287
+ restoreFocus: a = !1,
2288
+ modal: u = !0,
2289
+ visuallyHiddenDismiss: l = !1,
2290
+ closeOnFocusOut: p = !0,
2291
+ outsideElementsInert: g = !1,
2292
+ getInsideElements: d = () => []
2293
+ } = e, {
2294
+ open: h,
2295
+ onOpenChange: m,
2296
+ events: y,
2297
+ dataRef: R,
2298
+ elements: {
2299
+ domReference: v,
2300
+ floating: x
2301
+ }
2302
+ } = t, C = se(() => {
2303
+ var H;
2304
+ return (H = R.current.floatingContext) == null ? void 0 : H.nodeId;
2305
+ }), A = se(d), k = typeof i == "number" && i < 0, N = Zt(v) && k, D = Ho(), L = D ? s : !0, F = !L || D && g, _ = xe(o), U = xe(i), K = xe(c), O = tt(), w = Ir(), W = f.useRef(null), T = f.useRef(null), b = f.useRef(!1), E = f.useRef(!1), P = f.useRef(-1), G = w != null, I = It(x), V = se(function(H) {
2306
+ return H === void 0 && (H = I), H ? At(H, lt()) : [];
2307
+ }), ee = se((H) => {
2308
+ const z = V(H);
2309
+ return _.current.map(($) => v && $ === "reference" ? v : I && $ === "floating" ? I : z).filter(Boolean).flat();
2310
+ });
2311
+ f.useEffect(() => {
2312
+ if (r || !u) return;
2313
+ function H($) {
2314
+ if ($.key === "Tab") {
2315
+ ce(I, Ee(le(I))) && V().length === 0 && !N && pe($);
2316
+ const B = ee(), oe = Pe($);
2317
+ _.current[0] === "reference" && oe === v && (pe($), $.shiftKey ? $e(B[B.length - 1]) : $e(B[1])), _.current[1] === "floating" && oe === I && $.shiftKey && (pe($), $e(B[0]));
2318
+ }
2319
+ }
2320
+ const z = le(I);
2321
+ return z.addEventListener("keydown", H), () => {
2322
+ z.removeEventListener("keydown", H);
2323
+ };
2324
+ }, [r, v, I, u, _, N, V, ee]), f.useEffect(() => {
2325
+ if (r || !x) return;
2326
+ function H(z) {
2327
+ const $ = Pe(z), oe = V().indexOf($);
2328
+ oe !== -1 && (P.current = oe);
2329
+ }
2330
+ return x.addEventListener("focusin", H), () => {
2331
+ x.removeEventListener("focusin", H);
2332
+ };
2333
+ }, [r, x, V]), f.useEffect(() => {
2334
+ if (r || !p) return;
2335
+ function H() {
2336
+ E.current = !0, setTimeout(() => {
2337
+ E.current = !1;
2338
+ });
2339
+ }
2340
+ function z($) {
2341
+ const B = $.relatedTarget, oe = $.currentTarget, ne = Pe($);
2342
+ queueMicrotask(() => {
2343
+ const de = C(), me = !(ce(v, B) || ce(x, B) || ce(B, x) || ce(w == null ? void 0 : w.portalNode, B) || B != null && B.hasAttribute(Ge("focus-guard")) || O && (qe(O.nodesRef.current, de).find((q) => {
2344
+ var J, Re;
2345
+ return ce((J = q.context) == null ? void 0 : J.elements.floating, B) || ce((Re = q.context) == null ? void 0 : Re.elements.domReference, B);
2346
+ }) || hn(O.nodesRef.current, de).find((q) => {
2347
+ var J, Re, M;
2348
+ return [(J = q.context) == null ? void 0 : J.elements.floating, It((Re = q.context) == null ? void 0 : Re.elements.floating)].includes(B) || ((M = q.context) == null ? void 0 : M.elements.domReference) === B;
2349
+ })));
2350
+ if (oe === v && I && kn(I, _), a && oe !== v && !(ne != null && ne.isConnected) && Ee(le(I)) === le(I).body) {
2351
+ re(I) && I.focus();
2352
+ const q = P.current, J = V(), Re = J[q] || J[J.length - 1] || I;
2353
+ re(Re) && Re.focus();
2354
+ }
2355
+ if (R.current.insideReactTree) {
2356
+ R.current.insideReactTree = !1;
2357
+ return;
2358
+ }
2359
+ (N || !u) && B && me && !E.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
2360
+ B !== Dn() && (b.current = !0, m(!1, $, "focus-out"));
2361
+ });
2362
+ }
2363
+ if (x && re(v))
2364
+ return v.addEventListener("focusout", z), v.addEventListener("pointerdown", H), x.addEventListener("focusout", z), () => {
2365
+ v.removeEventListener("focusout", z), v.removeEventListener("pointerdown", H), x.removeEventListener("focusout", z);
2366
+ };
2367
+ }, [r, v, x, I, u, O, w, m, p, a, V, N, C, _, R]);
2368
+ const ae = f.useRef(null), te = f.useRef(null), fe = Sn([ae, w == null ? void 0 : w.beforeInsideRef]), Ae = Sn([te, w == null ? void 0 : w.afterInsideRef]);
2369
+ f.useEffect(() => {
2370
+ var H, z;
2371
+ if (r || !x) return;
2372
+ const $ = Array.from((w == null || (H = w.portalNode) == null ? void 0 : H.querySelectorAll("[" + Ge("portal") + "]")) || []), B = O ? hn(O.nodesRef.current, C()) : [], oe = O && !u ? B.map((q) => {
2373
+ var J;
2374
+ return (J = q.context) == null ? void 0 : J.elements.floating;
2375
+ }) : [], ne = (z = B.find((q) => {
2376
+ var J;
2377
+ return Zt(((J = q.context) == null ? void 0 : J.elements.domReference) || null);
2378
+ })) == null || (z = z.context) == null ? void 0 : z.elements.domReference, de = [x, ne, ...$, ...oe, ...A(), W.current, T.current, ae.current, te.current, w == null ? void 0 : w.beforeOutsideRef.current, w == null ? void 0 : w.afterOutsideRef.current, _.current.includes("reference") || N ? v : null].filter((q) => q != null), me = u || N ? Mn(de, !F, F) : Mn(de);
2379
+ return () => {
2380
+ me();
2381
+ };
2382
+ }, [r, v, x, u, _, w, N, L, F, O, C, A]), X(() => {
2383
+ if (r || !re(I)) return;
2384
+ const H = le(I), z = Ee(H);
2385
+ queueMicrotask(() => {
2386
+ const $ = ee(I), B = U.current, oe = (typeof B == "number" ? $[B] : B.current) || I, ne = ce(I, z);
2387
+ !k && !ne && h && $e(oe, {
2388
+ preventScroll: oe === I
2389
+ });
2390
+ });
2391
+ }, [r, h, I, k, ee, U]), X(() => {
2392
+ if (r || !I) return;
2393
+ const H = le(I), z = Ee(H);
2394
+ qo(z);
2395
+ function $(ne) {
2396
+ let {
2397
+ reason: de,
2398
+ event: me,
2399
+ nested: q
2400
+ } = ne;
2401
+ if (["hover", "safe-polygon"].includes(de) && me.type === "mouseleave" && (b.current = !0), de === "outside-press")
2402
+ if (q)
2403
+ b.current = !1;
2404
+ else if (Zn(me) || er(me))
2405
+ b.current = !1;
2406
+ else {
2407
+ let J = !1;
2408
+ document.createElement("div").focus({
2409
+ get preventScroll() {
2410
+ return J = !0, !1;
2411
+ }
2412
+ }), J ? b.current = !1 : b.current = !0;
2413
+ }
2414
+ }
2415
+ y.on("openchange", $);
2416
+ const B = H.createElement("span");
2417
+ B.setAttribute("tabindex", "-1"), B.setAttribute("aria-hidden", "true"), Object.assign(B.style, Ft), G && v && v.insertAdjacentElement("afterend", B);
2418
+ function oe() {
2419
+ if (typeof K.current == "boolean") {
2420
+ const ne = v || Dn();
2421
+ return ne && ne.isConnected ? ne : B;
2422
+ }
2423
+ return K.current.current || B;
2424
+ }
2425
+ return () => {
2426
+ y.off("openchange", $);
2427
+ const ne = Ee(H), de = ce(x, ne) || O && qe(O.nodesRef.current, C()).some((q) => {
2428
+ var J;
2429
+ return ce((J = q.context) == null ? void 0 : J.elements.floating, ne);
2430
+ }), me = oe();
2431
+ queueMicrotask(() => {
2432
+ const q = Yo(me);
2433
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2434
+ K.current && !b.current && re(q) && // If the focus moved somewhere else after mount, avoid returning focus
2435
+ // since it likely entered a different element which should be
2436
+ // respected: https://github.com/floating-ui/floating-ui/issues/2607
2437
+ (!(q !== ne && ne !== H.body) || de) && q.focus({
2438
+ preventScroll: !0
2439
+ }), B.remove();
2440
+ });
2441
+ };
2442
+ }, [r, x, I, K, R, y, O, G, v, C]), f.useEffect(() => {
2443
+ queueMicrotask(() => {
2444
+ b.current = !1;
2445
+ });
2446
+ }, [r]), X(() => {
2447
+ if (!r && w)
2448
+ return w.setFocusManagerState({
2449
+ modal: u,
2450
+ closeOnFocusOut: p,
2451
+ open: h,
2452
+ onOpenChange: m,
2453
+ domReference: v
2454
+ }), () => {
2455
+ w.setFocusManagerState(null);
2456
+ };
2457
+ }, [r, w, u, h, m, p, v]), X(() => {
2458
+ r || I && kn(I, _);
2459
+ }, [r, I, _]);
2460
+ function Ke(H) {
2461
+ return r || !l || !u ? null : /* @__PURE__ */ ge(Xo, {
2462
+ ref: H === "start" ? W : T,
2463
+ onClick: (z) => m(!1, z.nativeEvent),
2464
+ children: typeof l == "string" ? l : "Dismiss"
2465
+ });
2466
+ }
2467
+ const Me = !r && L && (u ? !N : !0) && (G || u);
2468
+ return /* @__PURE__ */ Hn(Ar, {
2469
+ children: [Me && /* @__PURE__ */ ge(Ot, {
2470
+ "data-type": "inside",
2471
+ ref: fe,
2472
+ onFocus: (H) => {
2473
+ if (u) {
2474
+ const $ = ee();
2475
+ $e(o[0] === "reference" ? $[0] : $[$.length - 1]);
2476
+ } else if (w != null && w.preserveTabOrder && w.portalNode)
2477
+ if (b.current = !1, ot(H, w.portalNode)) {
2478
+ const $ = sr(v);
2479
+ $ == null || $.focus();
2480
+ } else {
2481
+ var z;
2482
+ (z = w.beforeOutsideRef.current) == null || z.focus();
2483
+ }
2484
+ }
2485
+ }), !N && Ke("start"), n, Ke("end"), Me && /* @__PURE__ */ ge(Ot, {
2486
+ "data-type": "inside",
2487
+ ref: Ae,
2488
+ onFocus: (H) => {
2489
+ if (u)
2490
+ $e(ee()[0]);
2491
+ else if (w != null && w.preserveTabOrder && w.portalNode)
2492
+ if (p && (b.current = !0), ot(H, w.portalNode)) {
2493
+ const $ = cr(v);
2494
+ $ == null || $.focus();
2495
+ } else {
2496
+ var z;
2497
+ (z = w.afterOutsideRef.current) == null || z.focus();
2498
+ }
2499
+ }
2500
+ })]
2501
+ });
2502
+ }
2503
+ let vt = 0;
2504
+ const Ln = "--floating-ui-scrollbar-width";
2505
+ function Jo() {
2506
+ const e = rn(), t = /iP(hone|ad|od)|iOS/.test(e) || // iPads can claim to be MacIntel
2507
+ e === "MacIntel" && navigator.maxTouchPoints > 1, n = document.body.style, o = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", s = window.innerWidth - document.documentElement.clientWidth, i = n.left ? parseFloat(n.left) : window.scrollX, c = n.top ? parseFloat(n.top) : window.scrollY;
2508
+ if (n.overflow = "hidden", n.setProperty(Ln, s + "px"), s && (n[o] = s + "px"), t) {
2509
+ var a, u;
2510
+ const l = ((a = window.visualViewport) == null ? void 0 : a.offsetLeft) || 0, p = ((u = window.visualViewport) == null ? void 0 : u.offsetTop) || 0;
2511
+ Object.assign(n, {
2512
+ position: "fixed",
2513
+ top: -(c - Math.floor(p)) + "px",
2514
+ left: -(i - Math.floor(l)) + "px",
2515
+ right: "0"
2516
+ });
2517
+ }
2518
+ return () => {
2519
+ Object.assign(n, {
2520
+ overflow: "",
2521
+ [o]: ""
2522
+ }), n.removeProperty(Ln), t && (Object.assign(n, {
2523
+ position: "",
2524
+ top: "",
2525
+ left: "",
2526
+ right: ""
2527
+ }), window.scrollTo(i, c));
2528
+ };
2529
+ }
2530
+ let Fn = () => {
2531
+ };
2532
+ const Ri = /* @__PURE__ */ f.forwardRef(function(t, n) {
2533
+ const {
2534
+ lockScroll: r = !1,
2535
+ ...o
2536
+ } = t;
2537
+ return X(() => {
2538
+ if (r)
2539
+ return vt++, vt === 1 && (Fn = Jo()), () => {
2540
+ vt--, vt === 0 && Fn();
2541
+ };
2542
+ }, [r]), /* @__PURE__ */ ge("div", {
2543
+ ref: n,
2544
+ ...o,
2545
+ style: {
2546
+ position: "fixed",
2547
+ overflow: "auto",
2548
+ top: 0,
2549
+ right: 0,
2550
+ bottom: 0,
2551
+ left: 0,
2552
+ ...o.style
2553
+ }
2554
+ });
2555
+ });
2556
+ function Nn(e) {
2557
+ return re(e.target) && e.target.tagName === "BUTTON";
2558
+ }
2559
+ function Qo(e) {
2560
+ return re(e.target) && e.target.tagName === "A";
2561
+ }
2562
+ function _n(e) {
2563
+ return on(e);
2564
+ }
2565
+ function Ei(e, t) {
2566
+ t === void 0 && (t = {});
2567
+ const {
2568
+ open: n,
2569
+ onOpenChange: r,
2570
+ dataRef: o,
2571
+ elements: {
2572
+ domReference: s
2573
+ }
2574
+ } = e, {
2575
+ enabled: i = !0,
2576
+ event: c = "click",
2577
+ toggle: a = !0,
2578
+ ignoreMouse: u = !1,
2579
+ keyboardHandlers: l = !0,
2580
+ stickIfOpen: p = !0
2581
+ } = t, g = f.useRef(), d = f.useRef(!1), h = f.useMemo(() => ({
2582
+ onPointerDown(m) {
2583
+ g.current = m.pointerType;
2584
+ },
2585
+ onMouseDown(m) {
2586
+ const y = g.current;
2587
+ m.button === 0 && c !== "click" && (it(y, !0) && u || (n && a && (!(o.current.openEvent && p) || o.current.openEvent.type === "mousedown") ? r(!1, m.nativeEvent, "click") : (m.preventDefault(), r(!0, m.nativeEvent, "click"))));
2588
+ },
2589
+ onClick(m) {
2590
+ const y = g.current;
2591
+ if (c === "mousedown" && g.current) {
2592
+ g.current = void 0;
2593
+ return;
2594
+ }
2595
+ it(y, !0) && u || (n && a && (!(o.current.openEvent && p) || o.current.openEvent.type === "click") ? r(!1, m.nativeEvent, "click") : r(!0, m.nativeEvent, "click"));
2596
+ },
2597
+ onKeyDown(m) {
2598
+ g.current = void 0, !(m.defaultPrevented || !l || Nn(m)) && (m.key === " " && !_n(s) && (m.preventDefault(), d.current = !0), !Qo(m) && m.key === "Enter" && r(!(n && a), m.nativeEvent, "click"));
2599
+ },
2600
+ onKeyUp(m) {
2601
+ m.defaultPrevented || !l || Nn(m) || _n(s) || m.key === " " && d.current && (d.current = !1, r(!(n && a), m.nativeEvent, "click"));
2602
+ }
2603
+ }), [o, s, c, u, l, r, n, p, a]);
2604
+ return f.useMemo(() => i ? {
2605
+ reference: h
2606
+ } : {}, [i, h]);
2607
+ }
2608
+ const Zo = {
2609
+ pointerdown: "onPointerDown",
2610
+ mousedown: "onMouseDown",
2611
+ click: "onClick"
2612
+ }, ei = {
2613
+ pointerdown: "onPointerDownCapture",
2614
+ mousedown: "onMouseDownCapture",
2615
+ click: "onClickCapture"
2616
+ }, Wn = (e) => {
2617
+ var t, n;
2618
+ return {
2619
+ escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
2620
+ outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
2621
+ };
2622
+ };
2623
+ function Ci(e, t) {
2624
+ t === void 0 && (t = {});
2625
+ const {
2626
+ open: n,
2627
+ onOpenChange: r,
2628
+ elements: o,
2629
+ dataRef: s
2630
+ } = e, {
2631
+ enabled: i = !0,
2632
+ escapeKey: c = !0,
2633
+ outsidePress: a = !0,
2634
+ outsidePressEvent: u = "pointerdown",
2635
+ referencePress: l = !1,
2636
+ referencePressEvent: p = "pointerdown",
2637
+ ancestorScroll: g = !1,
2638
+ bubbles: d,
2639
+ capture: h
2640
+ } = t, m = tt(), y = se(typeof a == "function" ? a : () => !1), R = typeof a == "function" ? y : a, v = f.useRef(!1), {
2641
+ escapeKey: x,
2642
+ outsidePress: C
2643
+ } = Wn(d), {
2644
+ escapeKey: A,
2645
+ outsidePress: k
2646
+ } = Wn(h), N = f.useRef(!1), D = f.useRef(-1), L = se((w) => {
2647
+ var W;
2648
+ if (!n || !i || !c || w.key !== "Escape" || N.current)
2649
+ return;
2650
+ const T = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, b = m ? qe(m.nodesRef.current, T) : [];
2651
+ if (!x && (w.stopPropagation(), b.length > 0)) {
2652
+ let E = !0;
2653
+ if (b.forEach((P) => {
2654
+ var G;
2655
+ if ((G = P.context) != null && G.open && !P.context.dataRef.current.__escapeKeyBubbles) {
2656
+ E = !1;
2657
+ return;
2658
+ }
2659
+ }), !E)
2660
+ return;
2661
+ }
2662
+ r(!1, Gr(w) ? w.nativeEvent : w, "escape-key");
2663
+ }), F = se((w) => {
2664
+ var W;
2665
+ const T = () => {
2666
+ var b;
2667
+ L(w), (b = Pe(w)) == null || b.removeEventListener("keydown", T);
2668
+ };
2669
+ (W = Pe(w)) == null || W.addEventListener("keydown", T);
2670
+ }), _ = se((w) => {
2671
+ var W;
2672
+ const T = s.current.insideReactTree;
2673
+ s.current.insideReactTree = !1;
2674
+ const b = v.current;
2675
+ if (v.current = !1, u === "click" && b || T || typeof R == "function" && !R(w))
2676
+ return;
2677
+ const E = Pe(w), P = "[" + Ge("inert") + "]", G = le(o.floating).querySelectorAll(P);
2678
+ let I = Y(E) ? E : null;
2679
+ for (; I && !Se(I); ) {
2680
+ const te = De(I);
2681
+ if (Se(te) || !Y(te))
2682
+ break;
2683
+ I = te;
2684
+ }
2685
+ if (G.length && Y(E) && !Hr(E) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2686
+ !ce(E, o.floating) && // If the target root element contains none of the markers, then the
2687
+ // element was injected after the floating element rendered.
2688
+ Array.from(G).every((te) => !ce(I, te)))
2689
+ return;
2690
+ if (re(E) && O) {
2691
+ const te = Se(E), fe = we(E), Ae = /auto|scroll/, Ke = te || Ae.test(fe.overflowX), Me = te || Ae.test(fe.overflowY), H = Ke && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, z = Me && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, $ = fe.direction === "rtl", B = z && ($ ? w.offsetX <= E.offsetWidth - E.clientWidth : w.offsetX > E.clientWidth), oe = H && w.offsetY > E.clientHeight;
2692
+ if (B || oe)
2693
+ return;
2694
+ }
2695
+ const V = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, ee = m && qe(m.nodesRef.current, V).some((te) => {
2696
+ var fe;
2697
+ return Kt(w, (fe = te.context) == null ? void 0 : fe.elements.floating);
2698
+ });
2699
+ if (Kt(w, o.floating) || Kt(w, o.domReference) || ee)
2700
+ return;
2701
+ const ae = m ? qe(m.nodesRef.current, V) : [];
2702
+ if (ae.length > 0) {
2703
+ let te = !0;
2704
+ if (ae.forEach((fe) => {
2705
+ var Ae;
2706
+ if ((Ae = fe.context) != null && Ae.open && !fe.context.dataRef.current.__outsidePressBubbles) {
2707
+ te = !1;
2708
+ return;
2709
+ }
2710
+ }), !te)
2711
+ return;
2712
+ }
2713
+ r(!1, w, "outside-press");
2714
+ }), U = se((w) => {
2715
+ var W;
2716
+ const T = () => {
2717
+ var b;
2718
+ _(w), (b = Pe(w)) == null || b.removeEventListener(u, T);
2719
+ };
2720
+ (W = Pe(w)) == null || W.addEventListener(u, T);
2721
+ });
2722
+ f.useEffect(() => {
2723
+ if (!n || !i)
2724
+ return;
2725
+ s.current.__escapeKeyBubbles = x, s.current.__outsidePressBubbles = C;
2726
+ let w = -1;
2727
+ function W(G) {
2728
+ r(!1, G, "ancestor-scroll");
2729
+ }
2730
+ function T() {
2731
+ window.clearTimeout(w), N.current = !0;
2732
+ }
2733
+ function b() {
2734
+ w = window.setTimeout(
2735
+ () => {
2736
+ N.current = !1;
2737
+ },
2738
+ // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
2739
+ // Only apply to WebKit for the test to remain 0ms.
2740
+ St() ? 5 : 0
2741
+ );
2742
+ }
2743
+ const E = le(o.floating);
2744
+ c && (E.addEventListener("keydown", A ? F : L, A), E.addEventListener("compositionstart", T), E.addEventListener("compositionend", b)), R && E.addEventListener(u, k ? U : _, k);
2745
+ let P = [];
2746
+ return g && (Y(o.domReference) && (P = Le(o.domReference)), Y(o.floating) && (P = P.concat(Le(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (P = P.concat(Le(o.reference.contextElement)))), P = P.filter((G) => {
2747
+ var I;
2748
+ return G !== ((I = E.defaultView) == null ? void 0 : I.visualViewport);
2749
+ }), P.forEach((G) => {
2750
+ G.addEventListener("scroll", W, {
2751
+ passive: !0
2752
+ });
2753
+ }), () => {
2754
+ c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k), P.forEach((G) => {
2755
+ G.removeEventListener("scroll", W);
2756
+ }), window.clearTimeout(w);
2757
+ };
2758
+ }, [s, o, c, R, u, n, r, g, i, x, C, L, A, F, _, k, U]), f.useEffect(() => {
2759
+ s.current.insideReactTree = !1;
2760
+ }, [s, R, u]);
2761
+ const K = f.useMemo(() => ({
2762
+ onKeyDown: L,
2763
+ ...l && {
2764
+ [Zo[p]]: (w) => {
2765
+ r(!1, w.nativeEvent, "reference-press");
2766
+ },
2767
+ ...p !== "click" && {
2768
+ onClick(w) {
2769
+ r(!1, w.nativeEvent, "reference-press");
2770
+ }
2771
+ }
2772
+ }
2773
+ }), [L, r, l, p]), O = f.useMemo(() => ({
2774
+ onKeyDown: L,
2775
+ onMouseDown() {
2776
+ v.current = !0;
2777
+ },
2778
+ onMouseUp() {
2779
+ v.current = !0;
2780
+ },
2781
+ [ei[u]]: () => {
2782
+ s.current.insideReactTree = !0;
2783
+ },
2784
+ onBlurCapture() {
2785
+ m || (ve(D), s.current.insideReactTree = !0, D.current = window.setTimeout(() => {
2786
+ s.current.insideReactTree = !1;
2787
+ }));
2788
+ }
2789
+ }), [L, u, s, m]);
2790
+ return f.useMemo(() => i ? {
2791
+ reference: K,
2792
+ floating: O
2793
+ } : {}, [i, K, O]);
2794
+ }
2795
+ function ti(e) {
2796
+ const {
2797
+ open: t = !1,
2798
+ onOpenChange: n,
2799
+ elements: r
2800
+ } = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => xr()), c = et() != null;
2801
+ if (process.env.NODE_ENV !== "production") {
2802
+ const d = r.reference;
2803
+ d && !Y(d) && $o("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2804
+ }
2805
+ const [a, u] = f.useState(r.reference), l = se((d, h, m) => {
2806
+ s.current.openEvent = d ? h : void 0, i.emit("openchange", {
2807
+ open: d,
2808
+ event: h,
2809
+ reason: m,
2810
+ nested: c
2811
+ }), n == null || n(d, h, m);
2812
+ }), p = f.useMemo(() => ({
2813
+ setPositionReference: u
2814
+ }), []), g = f.useMemo(() => ({
2815
+ reference: a || r.reference || null,
2816
+ floating: r.floating || null,
2817
+ domReference: r.reference
2818
+ }), [a, r.reference, r.floating]);
2819
+ return f.useMemo(() => ({
2820
+ dataRef: s,
2821
+ open: t,
2822
+ onOpenChange: l,
2823
+ elements: g,
2824
+ events: i,
2825
+ floatingId: o,
2826
+ refs: p
2827
+ }), [t, l, g, i, o, p]);
2828
+ }
2829
+ function Ii(e) {
2830
+ e === void 0 && (e = {});
2831
+ const {
2832
+ nodeId: t
2833
+ } = e, n = ti({
2834
+ ...e,
2835
+ elements: {
2836
+ reference: null,
2837
+ floating: null,
2838
+ ...e.elements
2839
+ }
2840
+ }), r = e.rootContext || n, o = r.elements, [s, i] = f.useState(null), [c, a] = f.useState(null), l = (o == null ? void 0 : o.domReference) || s, p = f.useRef(null), g = tt();
2841
+ X(() => {
2842
+ l && (p.current = l);
2843
+ }, [l]);
2844
+ const d = So({
2845
+ ...e,
2846
+ elements: {
2847
+ ...o,
2848
+ ...c && {
2849
+ reference: c
2850
+ }
2851
+ }
2852
+ }), h = f.useCallback((x) => {
2853
+ const C = Y(x) ? {
2854
+ getBoundingClientRect: () => x.getBoundingClientRect(),
2855
+ getClientRects: () => x.getClientRects(),
2856
+ contextElement: x
2857
+ } : x;
2858
+ a(C), d.refs.setReference(C);
2859
+ }, [d.refs]), m = f.useCallback((x) => {
2860
+ (Y(x) || x === null) && (p.current = x, i(x)), (Y(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2861
+ // `null` to support `positionReference` + an unstable `reference`
2862
+ // callback ref.
2863
+ x !== null && !Y(x)) && d.refs.setReference(x);
2864
+ }, [d.refs]), y = f.useMemo(() => ({
2865
+ ...d.refs,
2866
+ setReference: m,
2867
+ setPositionReference: h,
2868
+ domReference: p
2869
+ }), [d.refs, m, h]), R = f.useMemo(() => ({
2870
+ ...d.elements,
2871
+ domReference: l
2872
+ }), [d.elements, l]), v = f.useMemo(() => ({
2873
+ ...d,
2874
+ ...r,
2875
+ refs: y,
2876
+ elements: R,
2877
+ nodeId: t
2878
+ }), [d, y, R, t, r]);
2879
+ return X(() => {
2880
+ r.dataRef.current.floatingContext = v;
2881
+ const x = g == null ? void 0 : g.nodesRef.current.find((C) => C.id === t);
2882
+ x && (x.context = v);
2883
+ }), f.useMemo(() => ({
2884
+ ...d,
2885
+ context: v,
2886
+ refs: y,
2887
+ elements: R
2888
+ }), [d, y, R, v]);
2889
+ }
2890
+ function jt() {
2891
+ return Kr() && Jn();
2892
+ }
2893
+ function Ti(e, t) {
2894
+ t === void 0 && (t = {});
2895
+ const {
2896
+ open: n,
2897
+ onOpenChange: r,
2898
+ events: o,
2899
+ dataRef: s,
2900
+ elements: i
2901
+ } = e, {
2902
+ enabled: c = !0,
2903
+ visibleOnly: a = !0
2904
+ } = t, u = f.useRef(!1), l = f.useRef(-1), p = f.useRef(!0);
2905
+ f.useEffect(() => {
2906
+ if (!c) return;
2907
+ const d = he(i.domReference);
2908
+ function h() {
2909
+ !n && re(i.domReference) && i.domReference === Ee(le(i.domReference)) && (u.current = !0);
2910
+ }
2911
+ function m() {
2912
+ p.current = !0;
2913
+ }
2914
+ function y() {
2915
+ p.current = !1;
2916
+ }
2917
+ return d.addEventListener("blur", h), jt() && (d.addEventListener("keydown", m, !0), d.addEventListener("pointerdown", y, !0)), () => {
2918
+ d.removeEventListener("blur", h), jt() && (d.removeEventListener("keydown", m, !0), d.removeEventListener("pointerdown", y, !0));
2919
+ };
2920
+ }, [i.domReference, n, c]), f.useEffect(() => {
2921
+ if (!c) return;
2922
+ function d(h) {
2923
+ let {
2924
+ reason: m
2925
+ } = h;
2926
+ (m === "reference-press" || m === "escape-key") && (u.current = !0);
2927
+ }
2928
+ return o.on("openchange", d), () => {
2929
+ o.off("openchange", d);
2930
+ };
2931
+ }, [o, c]), f.useEffect(() => () => {
2932
+ ve(l);
2933
+ }, []);
2934
+ const g = f.useMemo(() => ({
2935
+ onMouseLeave() {
2936
+ u.current = !1;
2937
+ },
2938
+ onFocus(d) {
2939
+ if (u.current) return;
2940
+ const h = Pe(d.nativeEvent);
2941
+ if (a && Y(h)) {
2942
+ if (jt() && !d.relatedTarget) {
2943
+ if (!p.current && !on(h))
2944
+ return;
2945
+ } else if (!zr(h))
2946
+ return;
2947
+ }
2948
+ r(!0, d.nativeEvent, "focus");
2949
+ },
2950
+ onBlur(d) {
2951
+ u.current = !1;
2952
+ const h = d.relatedTarget, m = d.nativeEvent, y = Y(h) && h.hasAttribute(Ge("focus-guard")) && h.getAttribute("data-type") === "outside";
2953
+ l.current = window.setTimeout(() => {
2954
+ var R;
2955
+ const v = Ee(i.domReference ? i.domReference.ownerDocument : document);
2956
+ !h && v === i.domReference || ce((R = s.current.floatingContext) == null ? void 0 : R.refs.floating.current, v) || ce(i.domReference, v) || y || r(!1, m, "focus");
2957
+ });
2958
+ }
2959
+ }), [s, i.domReference, r, a]);
2960
+ return f.useMemo(() => c ? {
2961
+ reference: g
2962
+ } : {}, [c, g]);
2963
+ }
2964
+ function qt(e, t, n) {
2965
+ const r = /* @__PURE__ */ new Map(), o = n === "item";
2966
+ let s = e;
2967
+ if (o && e) {
2968
+ const {
2969
+ [Rn]: i,
2970
+ [En]: c,
2971
+ ...a
2972
+ } = e;
2973
+ s = a;
2974
+ }
2975
+ return {
2976
+ ...n === "floating" && {
2977
+ tabIndex: -1,
2978
+ [No]: ""
2979
+ },
2980
+ ...s,
2981
+ ...t.map((i) => {
2982
+ const c = i ? i[n] : null;
2983
+ return typeof c == "function" ? e ? c(e) : null : c;
2984
+ }).concat(e).reduce((i, c) => (c && Object.entries(c).forEach((a) => {
2985
+ let [u, l] = a;
2986
+ if (!(o && [Rn, En].includes(u)))
2987
+ if (u.indexOf("on") === 0) {
2988
+ if (r.has(u) || r.set(u, []), typeof l == "function") {
2989
+ var p;
2990
+ (p = r.get(u)) == null || p.push(l), i[u] = function() {
2991
+ for (var g, d = arguments.length, h = new Array(d), m = 0; m < d; m++)
2992
+ h[m] = arguments[m];
2993
+ return (g = r.get(u)) == null ? void 0 : g.map((y) => y(...h)).find((y) => y !== void 0);
2994
+ };
2995
+ }
2996
+ } else
2997
+ i[u] = l;
2998
+ }), i), {})
2999
+ };
3000
+ }
3001
+ function Oi(e) {
3002
+ e === void 0 && (e = []);
3003
+ const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = f.useCallback(
3004
+ (c) => qt(c, e, "reference"),
3005
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3006
+ t
3007
+ ), s = f.useCallback(
3008
+ (c) => qt(c, e, "floating"),
3009
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3010
+ n
3011
+ ), i = f.useCallback(
3012
+ (c) => qt(c, e, "item"),
3013
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3014
+ r
3015
+ );
3016
+ return f.useMemo(() => ({
3017
+ getReferenceProps: o,
3018
+ getFloatingProps: s,
3019
+ getItemProps: i
3020
+ }), [o, s, i]);
3021
+ }
3022
+ const ni = "Escape";
3023
+ function Nt(e, t, n) {
3024
+ switch (e) {
3025
+ case "vertical":
3026
+ return t;
3027
+ case "horizontal":
3028
+ return n;
3029
+ default:
3030
+ return t || n;
3031
+ }
3032
+ }
3033
+ function bt(e, t) {
3034
+ return Nt(t, e === st || e === Fe, e === Ne || e === _e);
3035
+ }
3036
+ function Yt(e, t, n) {
3037
+ return Nt(t, e === Fe, n ? e === Ne : e === _e) || e === "Enter" || e === " " || e === "";
3038
+ }
3039
+ function Kn(e, t, n) {
3040
+ return Nt(t, n ? e === Ne : e === _e, e === Fe);
3041
+ }
3042
+ function Vn(e, t, n, r) {
3043
+ const o = n ? e === _e : e === Ne, s = e === st;
3044
+ return t === "both" || t === "horizontal" && r && r > 1 ? e === ni : Nt(t, o, s);
3045
+ }
3046
+ function Ai(e, t) {
3047
+ const {
3048
+ open: n,
3049
+ onOpenChange: r,
3050
+ elements: o,
3051
+ floatingId: s
3052
+ } = e, {
3053
+ listRef: i,
3054
+ activeIndex: c,
3055
+ onNavigate: a = () => {
3056
+ },
3057
+ enabled: u = !0,
3058
+ selectedIndex: l = null,
3059
+ allowEscape: p = !1,
3060
+ loop: g = !1,
3061
+ nested: d = !1,
3062
+ rtl: h = !1,
3063
+ virtual: m = !1,
3064
+ focusItemOnOpen: y = "auto",
3065
+ focusItemOnHover: R = !0,
3066
+ openOnArrowKeyDown: v = !0,
3067
+ disabledIndices: x = void 0,
3068
+ orientation: C = "vertical",
3069
+ parentOrientation: A,
3070
+ cols: k = 1,
3071
+ scrollItemIntoView: N = !0,
3072
+ virtualItemRef: D,
3073
+ itemSizes: L,
3074
+ dense: F = !1
3075
+ } = t;
3076
+ process.env.NODE_ENV !== "production" && (p && (g || Ht("`useListNavigation` looping must be enabled to allow escaping."), m || Ht("`useListNavigation` must be virtual to allow escaping.")), C === "vertical" && k > 1 && Ht("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
3077
+ const _ = It(o.floating), U = xe(_), K = et(), O = tt();
3078
+ X(() => {
3079
+ e.dataRef.current.orientation = C;
3080
+ }, [e, C]);
3081
+ const w = se(() => {
3082
+ a(b.current === -1 ? null : b.current);
3083
+ }), W = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null), P = f.useRef(!0), G = f.useRef(w), I = f.useRef(!!o.floating), V = f.useRef(n), ee = f.useRef(!1), ae = f.useRef(!1), te = xe(x), fe = xe(n), Ae = xe(N), Ke = xe(l), [Me, H] = f.useState(), [z, $] = f.useState(), B = se(() => {
3084
+ function M(Z) {
3085
+ if (m) {
3086
+ var ie;
3087
+ (ie = Z.id) != null && ie.endsWith("-fui-option") && (Z.id = s + "-" + Math.random().toString(16).slice(2, 10)), H(Z.id), O == null || O.events.emit("virtualfocus", Z), D && (D.current = Z);
3088
+ } else
3089
+ $e(Z, {
3090
+ sync: ee.current,
3091
+ preventScroll: !0
3092
+ });
3093
+ }
3094
+ const j = i.current[b.current], S = ae.current;
3095
+ j && M(j), (ee.current ? (Z) => Z() : requestAnimationFrame)(() => {
3096
+ const Z = i.current[b.current] || j;
3097
+ if (!Z) return;
3098
+ j || M(Z);
3099
+ const ie = Ae.current;
3100
+ ie && ne && (S || !P.current) && (Z.scrollIntoView == null || Z.scrollIntoView(typeof ie == "boolean" ? {
3101
+ block: "nearest",
3102
+ inline: "nearest"
3103
+ } : ie));
3104
+ });
3105
+ });
3106
+ X(() => {
3107
+ u && (n && o.floating ? T.current && l != null && (ae.current = !0, b.current = l, w()) : I.current && (b.current = -1, G.current()));
3108
+ }, [u, n, o.floating, l, w]), X(() => {
3109
+ if (u && n && o.floating)
3110
+ if (c == null) {
3111
+ if (ee.current = !1, Ke.current != null)
3112
+ return;
3113
+ if (I.current && (b.current = -1, B()), (!V.current || !I.current) && T.current && (E.current != null || T.current === !0 && E.current == null)) {
3114
+ let M = 0;
3115
+ const j = () => {
3116
+ i.current[0] == null ? (M < 2 && (M ? requestAnimationFrame : queueMicrotask)(j), M++) : (b.current = E.current == null || Yt(E.current, C, h) || d ? yt(i, te.current) : en(i, te.current), E.current = null, w());
3117
+ };
3118
+ j();
3119
+ }
3120
+ } else Ye(i, c) || (b.current = c, B(), ae.current = !1);
3121
+ }, [u, n, o.floating, c, Ke, d, i, C, h, w, B, te]), X(() => {
3122
+ var M;
3123
+ if (!u || o.floating || !O || m || !I.current)
3124
+ return;
3125
+ const j = O.nodesRef.current, S = (M = j.find((ie) => ie.id === K)) == null || (M = M.context) == null ? void 0 : M.elements.floating, Q = Ee(le(o.floating)), Z = j.some((ie) => ie.context && ce(ie.context.elements.floating, Q));
3126
+ S && !Z && P.current && S.focus({
3127
+ preventScroll: !0
3128
+ });
3129
+ }, [u, o.floating, O, K, m]), X(() => {
3130
+ if (!u || !O || !m || K) return;
3131
+ function M(j) {
3132
+ $(j.id), D && (D.current = j);
3133
+ }
3134
+ return O.events.on("virtualfocus", M), () => {
3135
+ O.events.off("virtualfocus", M);
3136
+ };
3137
+ }, [u, O, m, K, D]), X(() => {
3138
+ G.current = w, V.current = n, I.current = !!o.floating;
3139
+ }), X(() => {
3140
+ n || (E.current = null, T.current = y);
3141
+ }, [n, y]);
3142
+ const oe = c != null, ne = f.useMemo(() => {
3143
+ function M(S) {
3144
+ if (!fe.current) return;
3145
+ const Q = i.current.indexOf(S);
3146
+ Q !== -1 && b.current !== Q && (b.current = Q, w());
3147
+ }
3148
+ return {
3149
+ onFocus(S) {
3150
+ let {
3151
+ currentTarget: Q
3152
+ } = S;
3153
+ ee.current = !0, M(Q);
3154
+ },
3155
+ onClick: (S) => {
3156
+ let {
3157
+ currentTarget: Q
3158
+ } = S;
3159
+ return Q.focus({
3160
+ preventScroll: !0
3161
+ });
3162
+ },
3163
+ // Safari
3164
+ ...R && {
3165
+ onMouseMove(S) {
3166
+ let {
3167
+ currentTarget: Q
3168
+ } = S;
3169
+ ee.current = !0, ae.current = !1, M(Q);
3170
+ },
3171
+ onPointerLeave(S) {
3172
+ let {
3173
+ pointerType: Q
3174
+ } = S;
3175
+ if (!(!P.current || Q === "touch") && (ee.current = !0, b.current = -1, w(), !m)) {
3176
+ var Z;
3177
+ (Z = U.current) == null || Z.focus({
3178
+ preventScroll: !0
3179
+ });
3180
+ }
3181
+ }
3182
+ }
3183
+ };
3184
+ }, [fe, U, R, i, w, m]), de = f.useCallback(() => {
3185
+ var M;
3186
+ return A ?? (O == null || (M = O.nodesRef.current.find((j) => j.id === K)) == null || (M = M.context) == null || (M = M.dataRef) == null ? void 0 : M.current.orientation);
3187
+ }, [K, O, A]), me = se((M) => {
3188
+ if (P.current = !1, ee.current = !0, M.which === 229 || !fe.current && M.currentTarget === U.current)
3189
+ return;
3190
+ if (d && Vn(M.key, C, h, k)) {
3191
+ bt(M.key, de()) || pe(M), r(!1, M.nativeEvent, "list-navigation"), re(o.domReference) && (m ? O == null || O.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
3192
+ return;
3193
+ }
3194
+ const j = b.current, S = yt(i, x), Q = en(i, x);
3195
+ if (W || (M.key === "Home" && (pe(M), b.current = S, w()), M.key === "End" && (pe(M), b.current = Q, w())), k > 1) {
3196
+ const Z = L || Array.from({
3197
+ length: i.current.length
3198
+ }, () => ({
3199
+ width: 1,
3200
+ height: 1
3201
+ })), ie = nr(Z, k, F), nt = ie.findIndex((ye) => ye != null && !He(i, ye, x)), at = ie.reduce((ye, Ve, ft) => Ve != null && !He(i, Ve, x) ? ft : ye, -1), rt = ie[tr({
3202
+ current: ie.map((ye) => ye != null ? i.current[ye] : null)
3203
+ }, {
3204
+ event: M,
3205
+ orientation: C,
3206
+ loop: g,
3207
+ rtl: h,
3208
+ cols: k,
3209
+ // treat undefined (empty grid spaces) as disabled indices so we
3210
+ // don't end up in them
3211
+ disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, Ve) => He(i, Ve, x) ? Ve : void 0), void 0], ie),
3212
+ minIndex: nt,
3213
+ maxIndex: at,
3214
+ prevIndex: rr(
3215
+ b.current > Q ? S : b.current,
3216
+ Z,
3217
+ ie,
3218
+ k,
3219
+ // use a corner matching the edge closest to the direction
3220
+ // we're moving in so we don't end up in the same item. Prefer
3221
+ // top/left over bottom/right.
3222
+ M.key === Fe ? "bl" : M.key === (h ? Ne : _e) ? "tr" : "tl"
3223
+ ),
3224
+ stopEvent: !0
3225
+ })];
3226
+ if (rt != null && (b.current = rt, w()), C === "both")
3227
+ return;
3228
+ }
3229
+ if (bt(M.key, C)) {
3230
+ if (pe(M), n && !m && Ee(M.currentTarget.ownerDocument) === M.currentTarget) {
3231
+ b.current = Yt(M.key, C, h) ? S : Q, w();
3232
+ return;
3233
+ }
3234
+ Yt(M.key, C, h) ? g ? b.current = j >= Q ? p && j !== i.current.length ? -1 : S : ue(i, {
3235
+ startingIndex: j,
3236
+ disabledIndices: x
3237
+ }) : b.current = Math.min(Q, ue(i, {
3238
+ startingIndex: j,
3239
+ disabledIndices: x
3240
+ })) : g ? b.current = j <= S ? p && j !== -1 ? i.current.length : Q : ue(i, {
3241
+ startingIndex: j,
3242
+ decrement: !0,
3243
+ disabledIndices: x
3244
+ }) : b.current = Math.max(S, ue(i, {
3245
+ startingIndex: j,
3246
+ decrement: !0,
3247
+ disabledIndices: x
3248
+ })), Ye(i, b.current) && (b.current = -1), w();
3249
+ }
3250
+ }), q = f.useMemo(() => m && n && oe && {
3251
+ "aria-activedescendant": z || Me
3252
+ }, [m, n, oe, z, Me]), J = f.useMemo(() => ({
3253
+ "aria-orientation": C === "both" ? void 0 : C,
3254
+ ...W ? {} : q,
3255
+ onKeyDown: me,
3256
+ onPointerMove() {
3257
+ P.current = !0;
3258
+ }
3259
+ }), [q, me, C, W]), Re = f.useMemo(() => {
3260
+ function M(S) {
3261
+ y === "auto" && Zn(S.nativeEvent) && (T.current = !0);
3262
+ }
3263
+ function j(S) {
3264
+ T.current = y, y === "auto" && er(S.nativeEvent) && (T.current = !0);
3265
+ }
3266
+ return {
3267
+ ...q,
3268
+ onKeyDown(S) {
3269
+ P.current = !1;
3270
+ const Q = S.key.startsWith("Arrow"), Z = ["Home", "End"].includes(S.key), ie = Q || Z, nt = Kn(S.key, C, h), at = Vn(S.key, C, h, k), rt = Kn(S.key, de(), h), ye = bt(S.key, C), Ve = (d ? rt : ye) || S.key === "Enter" || S.key.trim() === "";
3271
+ if (m && n) {
3272
+ const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null), ke = O && dt ? Ur(O.nodesRef.current, dt.id) : null;
3273
+ if (ie && ke && D) {
3274
+ const mt = new KeyboardEvent("keydown", {
3275
+ key: S.key,
3276
+ bubbles: !0
3277
+ });
3278
+ if (nt || at) {
3279
+ var ft, un;
3280
+ const Tr = ((ft = ke.context) == null ? void 0 : ft.elements.domReference) === S.currentTarget, an = at && !Tr ? (un = ke.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Me) : null;
3281
+ an && (pe(S), an.dispatchEvent(mt), $(void 0));
3282
+ }
3283
+ if ((ye || Z) && ke.context && ke.context.open && ke.parentId && S.currentTarget !== ke.context.elements.domReference) {
3284
+ var ln;
3285
+ pe(S), (ln = ke.context.elements.domReference) == null || ln.dispatchEvent(mt);
3286
+ return;
3287
+ }
3288
+ }
3289
+ return me(S);
3290
+ }
3291
+ if (!(!n && !v && Q)) {
3292
+ if (Ve) {
3293
+ const dt = bt(S.key, de());
3294
+ E.current = d && dt ? null : S.key;
3295
+ }
3296
+ if (d) {
3297
+ rt && (pe(S), n ? (b.current = yt(i, te.current), w()) : r(!0, S.nativeEvent, "list-navigation"));
3298
+ return;
3299
+ }
3300
+ ye && (l != null && (b.current = l), pe(S), !n && v ? r(!0, S.nativeEvent, "list-navigation") : me(S), n && w());
3301
+ }
3302
+ },
3303
+ onFocus() {
3304
+ n && !m && (b.current = -1, w());
3305
+ },
3306
+ onPointerDown: j,
3307
+ onPointerEnter: j,
3308
+ onMouseDown: M,
3309
+ onClick: M
3310
+ };
3311
+ }, [Me, q, k, me, te, y, i, d, w, r, n, v, C, de, h, l, O, m, D]);
3312
+ return f.useMemo(() => u ? {
3313
+ reference: Re,
3314
+ floating: J,
3315
+ item: ne
3316
+ } : {}, [u, Re, J, ne]);
3317
+ }
3318
+ const ri = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
3319
+ function Mi(e, t) {
3320
+ var n, r;
3321
+ t === void 0 && (t = {});
3322
+ const {
3323
+ open: o,
3324
+ elements: s,
3325
+ floatingId: i
3326
+ } = e, {
3327
+ enabled: c = !0,
3328
+ role: a = "dialog"
3329
+ } = t, u = Lt(), l = ((n = s.domReference) == null ? void 0 : n.id) || u, p = f.useMemo(() => {
3330
+ var v;
3331
+ return ((v = It(s.floating)) == null ? void 0 : v.id) || i;
3332
+ }, [s.floating, i]), g = (r = ri.get(a)) != null ? r : a, h = et() != null, m = f.useMemo(() => g === "tooltip" || a === "label" ? {
3333
+ ["aria-" + (a === "label" ? "labelledby" : "describedby")]: o ? p : void 0
3334
+ } : {
3335
+ "aria-expanded": o ? "true" : "false",
3336
+ "aria-haspopup": g === "alertdialog" ? "dialog" : g,
3337
+ "aria-controls": o ? p : void 0,
3338
+ ...g === "listbox" && {
3339
+ role: "combobox"
3340
+ },
3341
+ ...g === "menu" && {
3342
+ id: l
3343
+ },
3344
+ ...g === "menu" && h && {
3345
+ role: "menuitem"
3346
+ },
3347
+ ...a === "select" && {
3348
+ "aria-autocomplete": "none"
3349
+ },
3350
+ ...a === "combobox" && {
3351
+ "aria-autocomplete": "list"
3352
+ }
3353
+ }, [g, p, h, o, l, a]), y = f.useMemo(() => {
3354
+ const v = {
3355
+ id: p,
3356
+ ...g && {
3357
+ role: g
3358
+ }
3359
+ };
3360
+ return g === "tooltip" || a === "label" ? v : {
3361
+ ...v,
3362
+ ...g === "menu" && {
3363
+ "aria-labelledby": l
3364
+ }
3365
+ };
3366
+ }, [g, p, l, a]), R = f.useCallback((v) => {
3367
+ let {
3368
+ active: x,
3369
+ selected: C
3370
+ } = v;
3371
+ const A = {
3372
+ role: "option",
3373
+ ...x && {
3374
+ id: p + "-fui-option"
3375
+ }
3376
+ };
3377
+ switch (a) {
3378
+ case "select":
3379
+ return {
3380
+ ...A,
3381
+ "aria-selected": x && C
3382
+ };
3383
+ case "combobox":
3384
+ return {
3385
+ ...A,
3386
+ "aria-selected": C
3387
+ };
3388
+ }
3389
+ return {};
3390
+ }, [p, a]);
3391
+ return f.useMemo(() => c ? {
3392
+ reference: m,
3393
+ floating: y,
3394
+ item: R
3395
+ } : {}, [c, m, y, R]);
3396
+ }
3397
+ function oi(e, t) {
3398
+ const [n, r] = f.useState(e);
3399
+ return e && !n && r(!0), f.useEffect(() => {
3400
+ if (!e && n) {
3401
+ const o = setTimeout(() => r(!1), t);
3402
+ return () => clearTimeout(o);
3403
+ }
3404
+ }, [e, n, t]), n;
3405
+ }
3406
+ function Pi(e, t) {
3407
+ t === void 0 && (t = {});
3408
+ const {
3409
+ open: n,
3410
+ elements: {
3411
+ floating: r
3412
+ }
3413
+ } = e, {
3414
+ duration: o = 250
3415
+ } = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u = oi(n, i);
3416
+ return !u && c === "close" && a("unmounted"), X(() => {
3417
+ if (r) {
3418
+ if (n) {
3419
+ a("initial");
3420
+ const l = requestAnimationFrame(() => {
3421
+ tn.flushSync(() => {
3422
+ a("open");
3423
+ });
3424
+ });
3425
+ return () => {
3426
+ cancelAnimationFrame(l);
3427
+ };
3428
+ }
3429
+ a("close");
3430
+ }
3431
+ }, [n, r]), {
3432
+ isMounted: u,
3433
+ status: c
3434
+ };
3435
+ }
3436
+ export {
3437
+ pi as C,
3438
+ bi as F,
3439
+ gi as a,
3440
+ et as b,
3441
+ hi as c,
3442
+ vi as d,
3443
+ xi as e,
3444
+ Lo as f,
3445
+ wi as g,
3446
+ fi as h,
3447
+ Ii as i,
3448
+ ui as j,
3449
+ Ci as k,
3450
+ Mi as l,
3451
+ Oi as m,
3452
+ Ai as n,
3453
+ li as o,
3454
+ mi as p,
3455
+ ai as q,
3456
+ yi as r,
3457
+ di as s,
3458
+ Ti as t,
3459
+ Fo as u,
3460
+ Ei as v,
3461
+ Pi as w,
3462
+ Ri as x
3463
+ };