@konstructio/ui 0.1.2-alpha.78 → 0.1.2-alpha.79

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 (506) hide show
  1. package/dist/AdditionalOptions-Cx9wU01w.js +37 -0
  2. package/dist/AlertDialogTrigger-C-NMEoDd.js +146 -0
  3. package/dist/Breadcrumb-C95aOsYk.js +77 -0
  4. package/dist/CalendarPanel.css +1 -1
  5. package/dist/Checkbox-Cn0UWlk8.js +239 -0
  6. package/dist/Combination-DUTBK_qM.js +486 -0
  7. package/dist/CommandInput-BKv-EZ7T.js +76 -0
  8. package/dist/Counter-DtQu_T-D.js +191 -0
  9. package/dist/DayPicker-CNWQ1Oyd.js +2884 -0
  10. package/dist/DropdownButton-B2XkEqPt.js +92 -0
  11. package/dist/FlagSelectorList-C17nmEBM.js +597 -0
  12. package/dist/ImageUpload-BzXjGZ2w.js +181 -0
  13. package/dist/Input-GBMxM3Z7.js +188 -0
  14. package/dist/Loading-DKqxR-oV.js +16 -0
  15. package/dist/Modal-DbTe8PVX.js +76 -0
  16. package/dist/Spinner-CyuXAaC8.js +41 -0
  17. package/dist/StepIndicatorContent-D5z1Ziqg.js +30 -0
  18. package/dist/Switch-DjbC0A8y.js +136 -0
  19. package/dist/Toast-C3XjAvtC.js +478 -0
  20. package/dist/Wrapper-BWSOaT1y.js +1056 -0
  21. package/dist/Wrapper-CjUokv72.js +110 -0
  22. package/dist/Wrapper-DEJ-hyar.js +161 -0
  23. package/dist/assets/icons/components/Accounts.js +21 -35
  24. package/dist/assets/icons/components/AddChart.js +17 -25
  25. package/dist/assets/icons/components/AlertOutline.js +18 -26
  26. package/dist/assets/icons/components/AppRepo.js +14 -22
  27. package/dist/assets/icons/components/Apps.js +14 -22
  28. package/dist/assets/icons/components/Archives.js +14 -22
  29. package/dist/assets/icons/components/ArrowDown.js +14 -22
  30. package/dist/assets/icons/components/ArrowLeft.js +17 -25
  31. package/dist/assets/icons/components/ArrowRight.js +18 -26
  32. package/dist/assets/icons/components/ArrowUp.js +18 -26
  33. package/dist/assets/icons/components/BarChart.js +24 -32
  34. package/dist/assets/icons/components/BookOpen.js +18 -26
  35. package/dist/assets/icons/components/CalendarMonth.js +17 -25
  36. package/dist/assets/icons/components/Check.js +17 -25
  37. package/dist/assets/icons/components/CheckCircleFilled.js +25 -26
  38. package/dist/assets/icons/components/CheckCircleOutline.js +14 -22
  39. package/dist/assets/icons/components/CheckboxMarkedCircleOutline.js +14 -20
  40. package/dist/assets/icons/components/ClockAlert.js +17 -25
  41. package/dist/assets/icons/components/ClockOutline.js +17 -25
  42. package/dist/assets/icons/components/Close.js +17 -25
  43. package/dist/assets/icons/components/Cloud.js +14 -19
  44. package/dist/assets/icons/components/CloudLockOutline.js +17 -25
  45. package/dist/assets/icons/components/Clusters.js +27 -41
  46. package/dist/assets/icons/components/CogOutline.js +17 -25
  47. package/dist/assets/icons/components/Copy.js +17 -25
  48. package/dist/assets/icons/components/Cpu.js +22 -36
  49. package/dist/assets/icons/components/Cube.js +14 -22
  50. package/dist/assets/icons/components/Datacenter.js +14 -22
  51. package/dist/assets/icons/components/Delete.js +18 -26
  52. package/dist/assets/icons/components/DollarSign.js +20 -28
  53. package/dist/assets/icons/components/Download.js +17 -25
  54. package/dist/assets/icons/components/Edit.js +17 -25
  55. package/dist/assets/icons/components/Ellipses.js +17 -25
  56. package/dist/assets/icons/components/Environments.js +19 -27
  57. package/dist/assets/icons/components/Error.js +17 -25
  58. package/dist/assets/icons/components/ErrorOutline.js +17 -25
  59. package/dist/assets/icons/components/Exclamation.js +21 -26
  60. package/dist/assets/icons/components/Git.js +17 -25
  61. package/dist/assets/icons/components/GitOpsCatalog.js +21 -35
  62. package/dist/assets/icons/components/GridView.js +11 -16
  63. package/dist/assets/icons/components/Help.js +24 -23
  64. package/dist/assets/icons/components/HideOutline.js +18 -32
  65. package/dist/assets/icons/components/Home.js +17 -25
  66. package/dist/assets/icons/components/Home2.js +20 -25
  67. package/dist/assets/icons/components/Id.js +14 -22
  68. package/dist/assets/icons/components/InfoCircle.js +28 -29
  69. package/dist/assets/icons/components/InformationOutline.js +14 -22
  70. package/dist/assets/icons/components/InvoiceList.js +17 -25
  71. package/dist/assets/icons/components/Key.js +17 -25
  72. package/dist/assets/icons/components/LightBulb.js +24 -38
  73. package/dist/assets/icons/components/Loader.js +15 -23
  74. package/dist/assets/icons/components/Network.js +14 -22
  75. package/dist/assets/icons/components/PagesStack.js +24 -23
  76. package/dist/assets/icons/components/Pageview.js +17 -25
  77. package/dist/assets/icons/components/People.js +17 -25
  78. package/dist/assets/icons/components/PhotoLibrary.js +17 -25
  79. package/dist/assets/icons/components/Pipeline.js +19 -27
  80. package/dist/assets/icons/components/Plus.js +17 -25
  81. package/dist/assets/icons/components/PowerSettings.js +15 -23
  82. package/dist/assets/icons/components/Preview.js +14 -22
  83. package/dist/assets/icons/components/ReceiptLong.js +11 -16
  84. package/dist/assets/icons/components/Refresh.js +14 -22
  85. package/dist/assets/icons/components/ScatterPlot.js +14 -19
  86. package/dist/assets/icons/components/Search.js +26 -26
  87. package/dist/assets/icons/components/Server.js +18 -26
  88. package/dist/assets/icons/components/Start.js +18 -26
  89. package/dist/assets/icons/components/TabNew.js +31 -45
  90. package/dist/assets/icons/components/Teams.js +17 -25
  91. package/dist/assets/icons/components/Upload.js +17 -25
  92. package/dist/assets/icons/components/Warning.js +17 -25
  93. package/dist/assets/icons/components/WarningTriangle.js +17 -25
  94. package/dist/assets/icons/components/X.js +17 -25
  95. package/dist/assets/icons/components/index.js +82 -82
  96. package/dist/assets/icons/index.js +88 -88
  97. package/dist/chevron-down-DgssmYWu.js +8 -0
  98. package/dist/chevron-left-DRJXef9g.js +8 -0
  99. package/dist/chevron-right-BooB_b7g.js +8 -0
  100. package/dist/chevron-up-DuS9MUNr.js +8 -0
  101. package/dist/chunk-D1xtDmiO.js +31 -0
  102. package/dist/{clsx-OuTLNxxd.js → clsx-kDhLfUq2.js} +1 -1
  103. package/dist/components/Alert/Alert.js +53 -57
  104. package/dist/components/Alert/Alert.variants.js +90 -105
  105. package/dist/components/AlertDialog/AlertDialog.js +66 -124
  106. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -6
  107. package/dist/components/AlertDialog/components/index.js +2 -2
  108. package/dist/components/AlertDialog/hooks/useAlertDialog.js +12 -7
  109. package/dist/components/Autocomplete/Autocomplete.js +55 -79
  110. package/dist/components/Autocomplete/Autocomplete.variants.js +7 -3
  111. package/dist/components/Autocomplete/components/List/List.js +30 -42
  112. package/dist/components/Autocomplete/components/List/List.variants.js +7 -7
  113. package/dist/components/Autocomplete/components/index.js +2 -2
  114. package/dist/components/Autocomplete/hooks/useAutocomplete.js +30 -61
  115. package/dist/components/Autocomplete/hooks/useNavigationList.js +42 -54
  116. package/dist/components/Badge/Badge.js +59 -74
  117. package/dist/components/Badge/Badge.variants.js +89 -99
  118. package/dist/components/Breadcrumb/Breadcrumb.js +2 -89
  119. package/dist/components/Breadcrumb/Breadcrumb.variants.js +9 -5
  120. package/dist/components/Breadcrumb/components/Item/Item.js +31 -45
  121. package/dist/components/Breadcrumb/components/Item/Item.variants.js +52 -65
  122. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +2 -2
  123. package/dist/components/Button/Button.js +21 -39
  124. package/dist/components/Button/Button.variants.js +314 -291
  125. package/dist/components/ButtonGroup/ButtonGroup.js +80 -134
  126. package/dist/components/ButtonGroup/ButtonGroup.variants.js +20 -27
  127. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +55 -111
  128. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +88 -101
  129. package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +2 -2
  130. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +20 -42
  131. package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +2 -2
  132. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +13 -32
  133. package/dist/components/ButtonGroup/components/index.js +6 -6
  134. package/dist/components/ButtonGroup/hooks/index.js +2 -2
  135. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +27 -40
  136. package/dist/components/Card/Card.js +20 -32
  137. package/dist/components/Card/Card.variants.js +40 -39
  138. package/dist/components/Checkbox/Checkbox.js +2 -364
  139. package/dist/components/Checkbox/Checkbox.variants.js +54 -64
  140. package/dist/components/Command/Command.js +27 -36
  141. package/dist/components/Command/Command.variants.js +3 -3
  142. package/dist/components/Command/components/Command.js +13 -5
  143. package/dist/components/Command/components/CommandEmpty.js +10 -13
  144. package/dist/components/Command/components/CommandGroup.js +8 -14
  145. package/dist/components/Command/components/CommandInput.js +2 -82
  146. package/dist/components/Command/components/CommandItem.js +16 -25
  147. package/dist/components/Command/components/CommandList.js +9 -12
  148. package/dist/components/Command/components/CommandSeparator.js +9 -12
  149. package/dist/components/Command/components/CommandShortcut.js +8 -17
  150. package/dist/components/Command/components/DialogContent.js +19 -28
  151. package/dist/components/Command/components/DialogOverlay.js +11 -17
  152. package/dist/components/Command/components/index.js +16 -16
  153. package/dist/components/Command/contexts/Command.context.js +1 -1
  154. package/dist/components/Command/contexts/Command.provider.js +15 -21
  155. package/dist/components/Command/contexts/index.js +2 -2
  156. package/dist/components/Counter/Counter.js +3 -209
  157. package/dist/components/Counter/Counter.variants.js +35 -48
  158. package/dist/components/DateRangePicker/DateRangePicker.js +68 -153
  159. package/dist/components/DateRangePicker/DateRangePicker.variants.js +5 -5
  160. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +64 -104
  161. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +17 -17
  162. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +5 -17
  163. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +34 -56
  164. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +181 -304
  165. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +17 -36
  166. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +79 -127
  167. package/dist/components/DateRangePicker/components/CalendarPanel/components/index.js +6 -6
  168. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +2 -3
  169. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +10 -147
  170. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +19 -19
  171. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +98 -96
  172. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +75 -60
  173. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +8 -8
  174. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +54 -97
  175. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +13 -8
  176. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +40 -87
  177. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +41 -88
  178. package/dist/components/DateRangePicker/components/DateTimeInputs/components/index.js +2 -2
  179. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/index.js +2 -2
  180. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +151 -156
  181. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +37 -61
  182. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +2 -2
  183. package/dist/components/DateRangePicker/components/index.js +6 -6
  184. package/dist/components/DateRangePicker/constants/index.js +2 -2
  185. package/dist/components/DateRangePicker/constants/presets.js +21 -6
  186. package/dist/components/DateRangePicker/contexts/date-range-picker.context.js +3 -3
  187. package/dist/components/DateRangePicker/contexts/date-range-picker.hook.js +4 -7
  188. package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +113 -170
  189. package/dist/components/DateRangePicker/contexts/index.js +6 -6
  190. package/dist/components/DateRangePicker/utils/disabled-dates.js +25 -45
  191. package/dist/components/DateRangePicker/utils/index.js +20 -20
  192. package/dist/components/DateRangePicker/utils/presets.js +6 -8
  193. package/dist/components/DateRangePicker/utils/validation.js +48 -60
  194. package/dist/components/Datepicker/DatePicker.js +45 -133
  195. package/dist/components/Datepicker/DatePicker.variants.js +3 -3
  196. package/dist/components/Divider/Divider.js +6 -6
  197. package/dist/components/Divider/Divider.variants.js +9 -11
  198. package/dist/components/Drawer/Drawer.js +67 -125
  199. package/dist/components/Drawer/Drawer.variants.js +59 -73
  200. package/dist/components/Drawer/components/Body/Body.js +8 -17
  201. package/dist/components/Drawer/components/Body/index.js +2 -2
  202. package/dist/components/Drawer/components/Footer/Footer.js +10 -21
  203. package/dist/components/Drawer/components/Footer/index.js +2 -2
  204. package/dist/components/Drawer/components/Header/Header.js +11 -22
  205. package/dist/components/Drawer/components/Header/index.js +2 -2
  206. package/dist/components/Drawer/components/index.js +6 -6
  207. package/dist/components/Drawer/constants/index.js +1 -1
  208. package/dist/components/Drawer/contexts/Drawer.context.js +4 -4
  209. package/dist/components/Drawer/contexts/index.js +3 -3
  210. package/dist/components/Drawer/hooks/index.js +2 -2
  211. package/dist/components/Drawer/hooks/useDrawer.js +32 -36
  212. package/dist/components/DropdownButton/DropdownButton.js +2 -133
  213. package/dist/components/Filter/Filter.js +23 -20
  214. package/dist/components/Filter/Filter.variants.js +9 -5
  215. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +48 -82
  216. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +71 -143
  217. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +40 -71
  218. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +50 -119
  219. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +35 -57
  220. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +53 -116
  221. package/dist/components/Filter/components/ResetButton/ResetButton.js +19 -30
  222. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +72 -135
  223. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +33 -54
  224. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +72 -143
  225. package/dist/components/Filter/components/index.js +6 -6
  226. package/dist/components/Filter/contexts/filter.context.js +2 -4
  227. package/dist/components/Filter/contexts/filter.hook.js +5 -6
  228. package/dist/components/Filter/contexts/filter.provider.js +6 -3
  229. package/dist/components/Filter/contexts/index.js +4 -4
  230. package/dist/components/Filter/events/index.js +4 -8
  231. package/dist/components/Filter/utils/index.js +2 -2435
  232. package/dist/components/ImageUpload/ImageUpload.js +2 -221
  233. package/dist/components/ImageUpload/ImageUpload.variants.js +78 -95
  234. package/dist/components/Input/Input.js +2 -286
  235. package/dist/components/Input/Input.variants.js +47 -54
  236. package/dist/components/LineChart/LineChart.js +103 -133
  237. package/dist/components/Loading/Loading.js +2 -18
  238. package/dist/components/Loading/Loading.variants.js +2 -2
  239. package/dist/components/Modal/Modal.js +3 -8
  240. package/dist/components/Modal/components/Body/Body.js +8 -5
  241. package/dist/components/Modal/components/Footer/Footer.js +8 -11
  242. package/dist/components/Modal/components/Header/Header.js +8 -11
  243. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -10
  244. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +2 -2
  245. package/dist/components/Modal/components/index.js +8 -8
  246. package/dist/components/Modal/contexts/Modal.context.js +2 -4
  247. package/dist/components/Modal/contexts/Modal.provider.js +17 -20
  248. package/dist/components/Modal/contexts/index.js +2 -2
  249. package/dist/components/Modal/hooks/useModal.js +10 -10
  250. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +2 -32
  251. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +6 -6
  252. package/dist/components/MultiSelectDropdown/components/Item/Item.js +16 -24
  253. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +26 -35
  254. package/dist/components/MultiSelectDropdown/components/List/List.js +2 -28
  255. package/dist/components/MultiSelectDropdown/components/List/List.variants.js +3 -3
  256. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +2 -124
  257. package/dist/components/MultiSelectDropdown/components/index.js +4 -5
  258. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +4 -4
  259. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +3 -6
  260. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +100 -131
  261. package/dist/components/MultiSelectDropdown/contexts/index.js +2 -2
  262. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +12 -21
  263. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +11 -5
  264. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +31 -38
  265. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +15 -32
  266. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +2 -728
  267. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +22 -54
  268. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +37 -30
  269. package/dist/components/PhoneNumberInput/components/Wrapper.js +2 -650
  270. package/dist/components/PhoneNumberInput/components/index.js +4 -4
  271. package/dist/components/PhoneNumberInput/contexts/index.js +3 -3
  272. package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +1 -1
  273. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +5 -8
  274. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +2 -6064
  275. package/dist/components/PhoneNumberInput/utils/index.js +7 -8
  276. package/dist/components/PieChart/PieChart.js +40 -66
  277. package/dist/components/ProgressBar/ProgressBar.js +27 -36
  278. package/dist/components/ProgressBar/ProgressBar.variants.js +19 -26
  279. package/dist/components/Radio/Radio.js +51 -95
  280. package/dist/components/Radio/Radio.variants.js +82 -88
  281. package/dist/components/RadioCard/RadioCard.js +14 -31
  282. package/dist/components/RadioCard/RadioCard.variants.js +7 -2
  283. package/dist/components/RadioCardGroup/RadioCardGroup.js +24 -42
  284. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +8 -12
  285. package/dist/components/RadioGroup/RadioGroup.js +26 -48
  286. package/dist/components/RadioGroup/RadioGroup.variants.js +8 -12
  287. package/dist/components/Range/Range.js +47 -59
  288. package/dist/components/Range/Range.variants.js +35 -44
  289. package/dist/components/Select/Select.js +35 -68
  290. package/dist/components/Select/Select.variants.js +49 -48
  291. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +2 -9
  292. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +3 -24
  293. package/dist/components/Select/components/EmptyList.js +2 -2
  294. package/dist/components/Select/components/List/List.js +126 -180
  295. package/dist/components/Select/components/List/List.variants.js +3 -3
  296. package/dist/components/Select/components/ListItem/ListItem.js +54 -107
  297. package/dist/components/Select/components/ListItem/ListItem.variants.js +3 -3
  298. package/dist/components/Select/components/Wrapper.js +2 -248
  299. package/dist/components/Select/components/index.js +8 -8
  300. package/dist/components/Select/constants/index.js +4 -4
  301. package/dist/components/Select/constants/list.js +2 -2
  302. package/dist/components/Select/constants/pagination.js +2 -2
  303. package/dist/components/Select/contexts/index.js +4 -4
  304. package/dist/components/Select/contexts/select.context.js +2 -2
  305. package/dist/components/Select/contexts/select.hook.js +6 -7
  306. package/dist/components/Select/contexts/select.provider.js +41 -51
  307. package/dist/components/Select/hooks/useNavigationList.js +28 -37
  308. package/dist/components/Select/hooks/useSelect.js +36 -72
  309. package/dist/components/Sidebar/Sidebar.js +22 -21
  310. package/dist/components/Sidebar/Sidebar.variants.js +4 -4
  311. package/dist/components/Sidebar/components/Footer/Footer.js +9 -6
  312. package/dist/components/Sidebar/components/Footer/Footer.variants.js +2 -2
  313. package/dist/components/Sidebar/components/Logo/Logo.js +7 -4
  314. package/dist/components/Sidebar/components/Logo/Logo.variants.js +2 -2
  315. package/dist/components/Sidebar/components/Navigation/Navigation.js +13 -13
  316. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +8 -3
  317. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +12 -22
  318. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +6 -2
  319. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +12 -23
  320. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +33 -40
  321. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +4 -4
  322. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +2 -2
  323. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +9 -6
  324. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +3 -3
  325. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +31 -77
  326. package/dist/components/Sidebar/components/index.js +14 -14
  327. package/dist/components/Slider/Slider.js +38 -56
  328. package/dist/components/Slider/Slider.variants.js +36 -45
  329. package/dist/components/Spinner/Spinner.js +2 -55
  330. package/dist/components/Spinner/Spinner.variants.js +37 -51
  331. package/dist/components/Stepper/Stepper.js +44 -71
  332. package/dist/components/Stepper/Stepper.variants.js +270 -229
  333. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +119 -196
  334. package/dist/components/Stepper/components/StepConnector/StepConnector.js +14 -26
  335. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +2 -21
  336. package/dist/components/Stepper/components/StepItem/StepItem.js +4 -4
  337. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +69 -111
  338. package/dist/components/Stepper/constants/index.js +1 -1
  339. package/dist/components/Stepper/hooks/index.js +2 -2
  340. package/dist/components/Stepper/hooks/useStepItemLogic.js +15 -18
  341. package/dist/components/Stepper/utils/index.js +4 -5
  342. package/dist/components/Switch/Switch.js +2 -228
  343. package/dist/components/Switch/Switch.variants.js +2 -2
  344. package/dist/components/Table/Table.js +17 -24
  345. package/dist/components/Table/Table.variants.js +18 -25
  346. package/dist/components/Table/components/Body.js +8 -15
  347. package/dist/components/Table/components/Filter.js +13 -7
  348. package/dist/components/Table/components/Head.js +9 -16
  349. package/dist/components/Table/components/Row.js +14 -26
  350. package/dist/components/Table/components/index.js +6 -6
  351. package/dist/components/Tabs/Tabs.js +20 -20
  352. package/dist/components/Tabs/Tabs.variants.js +55 -72
  353. package/dist/components/Tabs/components/Content.js +12 -12
  354. package/dist/components/Tabs/components/List.js +16 -18
  355. package/dist/components/Tabs/components/Trigger.js +13 -15
  356. package/dist/components/Tabs/components/index.js +4 -4
  357. package/dist/components/Tag/Tag.js +25 -16
  358. package/dist/components/Tag/Tag.variants.js +32 -39
  359. package/dist/components/TagSelect/TagSelect.js +13 -7
  360. package/dist/components/TagSelect/TagSelect.variants.js +6 -6
  361. package/dist/components/TagSelect/components/Item/Item.js +13 -16
  362. package/dist/components/TagSelect/components/Item/Item.variants.js +21 -30
  363. package/dist/components/TagSelect/components/List/List.js +15 -7
  364. package/dist/components/TagSelect/components/List/List.variants.js +3 -3
  365. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -85
  366. package/dist/components/TagSelect/components/index.js +6 -6
  367. package/dist/components/TagSelect/contexts/TagSelect.context.js +1 -1
  368. package/dist/components/TagSelect/contexts/TagSelect.hook.js +6 -7
  369. package/dist/components/TagSelect/contexts/TagSelect.provider.js +43 -59
  370. package/dist/components/TagSelect/contexts/index.js +4 -4
  371. package/dist/components/TagSelect/hooks/useTagSelect.js +13 -22
  372. package/dist/components/TextArea/TextArea.js +26 -33
  373. package/dist/components/TextArea/TextArea.variants.js +3 -3
  374. package/dist/components/TimePicker/TimePicker.js +12 -10
  375. package/dist/components/TimePicker/TimePicker.variants.js +2 -2
  376. package/dist/components/TimePicker/components/HoursList/HoursList.js +84 -110
  377. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +53 -88
  378. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +56 -82
  379. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +128 -221
  380. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +34 -71
  381. package/dist/components/TimePicker/components/index.js +2 -2
  382. package/dist/components/TimePicker/contexts/index.js +6 -6
  383. package/dist/components/TimePicker/contexts/time-picker.context.js +1 -1
  384. package/dist/components/TimePicker/contexts/time-picker.hook.js +4 -7
  385. package/dist/components/TimePicker/contexts/time-picker.provider.js +46 -48
  386. package/dist/components/TimePicker/utils/index.js +17 -19
  387. package/dist/components/Toast/Toast.js +3 -511
  388. package/dist/components/Toast/Toast.variants.js +32 -35
  389. package/dist/components/Tooltip/Tooltip.js +15 -34
  390. package/dist/components/Typography/Typography.js +16 -24
  391. package/dist/components/Typography/Typography.variants.js +72 -62
  392. package/dist/components/VirtualizedTable/VirtualizedTable.js +89 -159
  393. package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +1 -1
  394. package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +2 -2
  395. package/dist/components/VirtualizedTable/assets/chevron-down.js +13 -22
  396. package/dist/components/VirtualizedTable/assets/chevron-up.js +13 -22
  397. package/dist/components/VirtualizedTable/assets/index.js +4 -4
  398. package/dist/components/VirtualizedTable/components/Actions/Actions.js +34 -115
  399. package/dist/components/VirtualizedTable/components/Body/Body.js +49 -111
  400. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +91 -157
  401. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +22 -30
  402. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +27 -47
  403. package/dist/components/VirtualizedTable/components/Filter/Filter.js +99 -164
  404. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +41 -56
  405. package/dist/components/VirtualizedTable/components/Header/Header.js +36 -98
  406. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +28 -62
  407. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +38 -101
  408. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +29 -49
  409. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +9 -23
  410. package/dist/components/VirtualizedTable/components/index.js +10 -10
  411. package/dist/components/VirtualizedTable/constants/index.js +3 -3
  412. package/dist/components/VirtualizedTable/constants/pagination.js +6 -1
  413. package/dist/components/VirtualizedTable/contexts/index.js +6 -6
  414. package/dist/components/VirtualizedTable/contexts/table.context.js +3 -3
  415. package/dist/components/VirtualizedTable/contexts/table.hook.js +7 -8
  416. package/dist/components/VirtualizedTable/contexts/table.provider.js +2 -268
  417. package/dist/components/VirtualizedTable/contexts/table.types.d.ts +1 -1
  418. package/dist/components/VirtualizedTable/events/index.js +19 -24
  419. package/dist/components/index.js +140 -140
  420. package/dist/components-DNFycJGm.js +120 -0
  421. package/dist/constants-D96yCePL.js +31 -0
  422. package/dist/contexts/index.js +6 -6
  423. package/dist/contexts/theme.context.js +2 -2
  424. package/dist/contexts/theme.hook.js +2 -2
  425. package/dist/contexts/theme.provider.js +2 -84
  426. package/dist/createLucideIcon-BVGkzDZC.js +42 -0
  427. package/dist/debounce-CzFlgg9h.js +86 -0
  428. package/dist/dist-B5SlrgYz.js +263 -0
  429. package/dist/{index-BZPx6jYI.js → dist-BL-H4bEw2.js} +5 -2
  430. package/dist/dist-BL8l9uRy.js +361 -0
  431. package/dist/{index-DLcqcWxM.js → dist-ByyYBtbL.js} +9 -11
  432. package/dist/dist-C8r5DW7s.js +10 -0
  433. package/dist/dist-CBnErrr1.js +58 -0
  434. package/dist/dist-COY3FRYC.js +480 -0
  435. package/dist/dist-CSP6X06u.js +1701 -0
  436. package/dist/dist-DNSmoWJp.js +469 -0
  437. package/dist/dist-DRmqW28Z2.js +7479 -0
  438. package/dist/dist-DXJSck4j.js +74 -0
  439. package/dist/dist-DXXHfL7M.js +132 -0
  440. package/dist/dist-DZNdbzbm.js +120 -0
  441. package/dist/dist-DZcOdXgW.js +13 -0
  442. package/dist/dist-DeVdyMHW2.js +31 -0
  443. package/dist/{index-3fEdeexs.js → dist-DpqiA4Yn.js} +25 -28
  444. package/dist/dist-DstQl8xY.js +10 -0
  445. package/dist/dist-DtEbXv47.js +34 -0
  446. package/dist/dist-uVUx9i0a.js +223 -0
  447. package/dist/ellipsis-vertical-My0S9QY5.js +24 -0
  448. package/dist/hooks/index.js +2 -2
  449. package/dist/hooks/useToggle.js +5 -8
  450. package/dist/icons.js +88 -88
  451. package/dist/index.js +150 -149
  452. package/dist/isObject--aYwGuhx.js +62 -0
  453. package/dist/libphonenumber-7uXgv7U8.js +81977 -0
  454. package/dist/package.json +18 -18
  455. package/dist/phone-number.provider-B5TfHi8y.js +6646 -0
  456. package/dist/prop-types-DTnODft1.js +547 -0
  457. package/dist/proxy-uLtw-ZML.js +4690 -0
  458. package/dist/style.css +1 -1
  459. package/dist/styles.css +1 -1
  460. package/dist/{index-CSWGJT-v.js → table.provider-4OQNqxH3.js} +805 -674
  461. package/dist/theme.provider-BgxXUOMP.js +74 -0
  462. package/dist/useBreadcrumb-BBm5lX0U.js +1263 -0
  463. package/dist/utils/index.js +5 -2922
  464. package/dist/utils-CQSRNcoF.js +2022 -0
  465. package/dist/utils-DHuiYnx1.js +1689 -0
  466. package/dist/x-BwIi6Wii.js +63 -0
  467. package/dist/x-a0ouxoIM.js +11 -0
  468. package/package.json +18 -18
  469. package/dist/AdditionalOptions-C2FDVZhu.js +0 -45
  470. package/dist/Combination-BtmnusWq.js +0 -480
  471. package/dist/DayPicker-CaeUXRCF.js +0 -2798
  472. package/dist/Modal-DAWdufZ_.js +0 -120
  473. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  474. package/dist/chevron-down-BBFYYzZq.js +0 -5
  475. package/dist/chevron-left-BHBf-gQY.js +0 -5
  476. package/dist/chevron-right-DvXGOiS_.js +0 -5
  477. package/dist/chevron-up-DEfvgPCw.js +0 -54
  478. package/dist/chevron-up-IlDPxR7j.js +0 -5
  479. package/dist/createLucideIcon-CP-mMPfa.js +0 -75
  480. package/dist/debounce-DJveWHr_.js +0 -114
  481. package/dist/ellipsis-vertical-Cl3yNtOy.js +0 -9
  482. package/dist/index--l0zux8V.js +0 -200
  483. package/dist/index-0ioNhtNM.js +0 -10
  484. package/dist/index-BKMaItIC.js +0 -13
  485. package/dist/index-BKjcReYh.js +0 -55
  486. package/dist/index-BOE_3f_Z.js +0 -646
  487. package/dist/index-BRXMsxSL.js +0 -27
  488. package/dist/index-BdMNhZnh.js +0 -9
  489. package/dist/index-BmVmDQGH.js +0 -662
  490. package/dist/index-BvEpLnOv.js +0 -144
  491. package/dist/index-BvoZGpli.js +0 -60
  492. package/dist/index-C7zAY3xv.js +0 -139
  493. package/dist/index-CJnS4BVW.js +0 -93
  494. package/dist/index-Cmf-IG4l.js +0 -322
  495. package/dist/index-CrCTywU1.js +0 -314
  496. package/dist/index-D29mdTf5.js +0 -34
  497. package/dist/index-DWyM654o.js +0 -478
  498. package/dist/index-Jr0cra7i.js +0 -431
  499. package/dist/index-mPinF0Ho.js +0 -1885
  500. package/dist/index-qDQP8rW4.js +0 -7281
  501. package/dist/isObject-9XxUefZH.js +0 -97
  502. package/dist/libphonenumber-aZ-2KWIf.js +0 -11581
  503. package/dist/proxy-BGrSEZuV.js +0 -5046
  504. package/dist/useBreadcrumb-C_Wb2cXs.js +0 -1435
  505. package/dist/x-B9bYxG31.js +0 -8
  506. package/dist/x-Eoa9FJjA.js +0 -62
@@ -1,1885 +0,0 @@
1
- import * as g from "react";
2
- import { useLayoutEffect as jt } from "react";
3
- import { P as ce, b as tt, u as ze, a as Yt, c as J } from "./index--l0zux8V.js";
4
- import { u as we } from "./index-DLcqcWxM.js";
5
- import { D as Xt, P as Gt } from "./index-BvEpLnOv.js";
6
- import { u as qt } from "./index-BKMaItIC.js";
7
- import * as Ut from "react-dom";
8
- import { jsx as T, Fragment as Kt, jsxs as Zt } from "react/jsx-runtime";
9
- import { u as Jt } from "./index-0ioNhtNM.js";
10
- import { u as Qt } from "./index-BRXMsxSL.js";
11
- import { P as nt } from "./index-3fEdeexs.js";
12
- const en = ["top", "right", "bottom", "left"], U = Math.min, F = Math.max, pe = Math.round, ue = Math.floor, j = (e) => ({
13
- x: e,
14
- y: e
15
- }), tn = {
16
- left: "right",
17
- right: "left",
18
- bottom: "top",
19
- top: "bottom"
20
- }, nn = {
21
- start: "end",
22
- end: "start"
23
- };
24
- function Te(e, t, n) {
25
- return F(e, U(t, n));
26
- }
27
- function G(e, t) {
28
- return typeof e == "function" ? e(t) : e;
29
- }
30
- function q(e) {
31
- return e.split("-")[0];
32
- }
33
- function ne(e) {
34
- return e.split("-")[1];
35
- }
36
- function De(e) {
37
- return e === "x" ? "y" : "x";
38
- }
39
- function Me(e) {
40
- return e === "y" ? "height" : "width";
41
- }
42
- const on = /* @__PURE__ */ new Set(["top", "bottom"]);
43
- function z(e) {
44
- return on.has(q(e)) ? "y" : "x";
45
- }
46
- function _e(e) {
47
- return De(z(e));
48
- }
49
- function rn(e, t, n) {
50
- n === void 0 && (n = !1);
51
- const o = ne(e), r = _e(e), i = Me(r);
52
- let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
53
- return t.reference[i] > t.floating[i] && (s = he(s)), [s, he(s)];
54
- }
55
- function sn(e) {
56
- const t = he(e);
57
- return [Oe(e), t, Oe(t)];
58
- }
59
- function Oe(e) {
60
- return e.replace(/start|end/g, (t) => nn[t]);
61
- }
62
- const je = ["left", "right"], Ye = ["right", "left"], cn = ["top", "bottom"], ln = ["bottom", "top"];
63
- function an(e, t, n) {
64
- switch (e) {
65
- case "top":
66
- case "bottom":
67
- return n ? t ? Ye : je : t ? je : Ye;
68
- case "left":
69
- case "right":
70
- return t ? cn : ln;
71
- default:
72
- return [];
73
- }
74
- }
75
- function fn(e, t, n, o) {
76
- const r = ne(e);
77
- let i = an(q(e), n === "start", o);
78
- return r && (i = i.map((s) => s + "-" + r), t && (i = i.concat(i.map(Oe)))), i;
79
- }
80
- function he(e) {
81
- return e.replace(/left|right|bottom|top/g, (t) => tn[t]);
82
- }
83
- function un(e) {
84
- return {
85
- top: 0,
86
- right: 0,
87
- bottom: 0,
88
- left: 0,
89
- ...e
90
- };
91
- }
92
- function ot(e) {
93
- return typeof e != "number" ? un(e) : {
94
- top: e,
95
- right: e,
96
- bottom: e,
97
- left: e
98
- };
99
- }
100
- function me(e) {
101
- const {
102
- x: t,
103
- y: n,
104
- width: o,
105
- height: r
106
- } = e;
107
- return {
108
- width: o,
109
- height: r,
110
- top: n,
111
- left: t,
112
- right: t + o,
113
- bottom: n + r,
114
- x: t,
115
- y: n
116
- };
117
- }
118
- function Xe(e, t, n) {
119
- let {
120
- reference: o,
121
- floating: r
122
- } = e;
123
- const i = z(t), s = _e(t), l = Me(s), c = q(t), f = i === "y", a = o.x + o.width / 2 - r.width / 2, d = o.y + o.height / 2 - r.height / 2, p = o[l] / 2 - r[l] / 2;
124
- let u;
125
- switch (c) {
126
- case "top":
127
- u = {
128
- x: a,
129
- y: o.y - r.height
130
- };
131
- break;
132
- case "bottom":
133
- u = {
134
- x: a,
135
- y: o.y + o.height
136
- };
137
- break;
138
- case "right":
139
- u = {
140
- x: o.x + o.width,
141
- y: d
142
- };
143
- break;
144
- case "left":
145
- u = {
146
- x: o.x - r.width,
147
- y: d
148
- };
149
- break;
150
- default:
151
- u = {
152
- x: o.x,
153
- y: o.y
154
- };
155
- }
156
- switch (ne(t)) {
157
- case "start":
158
- u[s] -= p * (n && f ? -1 : 1);
159
- break;
160
- case "end":
161
- u[s] += p * (n && f ? -1 : 1);
162
- break;
163
- }
164
- return u;
165
- }
166
- async function dn(e, t) {
167
- var n;
168
- t === void 0 && (t = {});
169
- const {
170
- x: o,
171
- y: r,
172
- platform: i,
173
- rects: s,
174
- elements: l,
175
- strategy: c
176
- } = e, {
177
- boundary: f = "clippingAncestors",
178
- rootBoundary: a = "viewport",
179
- elementContext: d = "floating",
180
- altBoundary: p = !1,
181
- padding: u = 0
182
- } = G(t, e), h = ot(u), w = l[p ? d === "floating" ? "reference" : "floating" : d], y = me(await i.getClippingRect({
183
- element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
184
- boundary: f,
185
- rootBoundary: a,
186
- strategy: c
187
- })), v = d === "floating" ? {
188
- x: o,
189
- y: r,
190
- width: s.floating.width,
191
- height: s.floating.height
192
- } : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), x = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
193
- x: 1,
194
- y: 1
195
- } : {
196
- x: 1,
197
- y: 1
198
- }, C = me(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
199
- elements: l,
200
- rect: v,
201
- offsetParent: b,
202
- strategy: c
203
- }) : v);
204
- return {
205
- top: (y.top - C.top + h.top) / x.y,
206
- bottom: (C.bottom - y.bottom + h.bottom) / x.y,
207
- left: (y.left - C.left + h.left) / x.x,
208
- right: (C.right - y.right + h.right) / x.x
209
- };
210
- }
211
- const pn = async (e, t, n) => {
212
- const {
213
- placement: o = "bottom",
214
- strategy: r = "absolute",
215
- middleware: i = [],
216
- platform: s
217
- } = n, l = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
218
- let f = await s.getElementRects({
219
- reference: e,
220
- floating: t,
221
- strategy: r
222
- }), {
223
- x: a,
224
- y: d
225
- } = Xe(f, o, c), p = o, u = {}, h = 0;
226
- for (let w = 0; w < l.length; w++) {
227
- var m;
228
- const {
229
- name: y,
230
- fn: v
231
- } = l[w], {
232
- x: b,
233
- y: x,
234
- data: C,
235
- reset: A
236
- } = await v({
237
- x: a,
238
- y: d,
239
- initialPlacement: o,
240
- placement: p,
241
- strategy: r,
242
- middlewareData: u,
243
- rects: f,
244
- platform: {
245
- ...s,
246
- detectOverflow: (m = s.detectOverflow) != null ? m : dn
247
- },
248
- elements: {
249
- reference: e,
250
- floating: t
251
- }
252
- });
253
- a = b ?? a, d = x ?? d, u = {
254
- ...u,
255
- [y]: {
256
- ...u[y],
257
- ...C
258
- }
259
- }, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (f = A.rects === !0 ? await s.getElementRects({
260
- reference: e,
261
- floating: t,
262
- strategy: r
263
- }) : A.rects), {
264
- x: a,
265
- y: d
266
- } = Xe(f, p, c)), w = -1);
267
- }
268
- return {
269
- x: a,
270
- y: d,
271
- placement: p,
272
- strategy: r,
273
- middlewareData: u
274
- };
275
- }, hn = (e) => ({
276
- name: "arrow",
277
- options: e,
278
- async fn(t) {
279
- const {
280
- x: n,
281
- y: o,
282
- placement: r,
283
- rects: i,
284
- platform: s,
285
- elements: l,
286
- middlewareData: c
287
- } = t, {
288
- element: f,
289
- padding: a = 0
290
- } = G(e, t) || {};
291
- if (f == null)
292
- return {};
293
- const d = ot(a), p = {
294
- x: n,
295
- y: o
296
- }, u = _e(r), h = Me(u), m = await s.getDimensions(f), w = u === "y", y = w ? "top" : "left", v = w ? "bottom" : "right", b = w ? "clientHeight" : "clientWidth", x = i.reference[h] + i.reference[u] - p[u] - i.floating[h], C = p[u] - i.reference[u], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
297
- let P = A ? A[b] : 0;
298
- (!P || !await (s.isElement == null ? void 0 : s.isElement(A))) && (P = l.floating[b] || i.floating[h]);
299
- const M = x / 2 - C / 2, H = P / 2 - m[h] / 2 - 1, D = U(d[y], H), k = U(d[v], H), N = D, E = P - m[h] - k, O = P / 2 - m[h] / 2 + M, $ = Te(N, O, E), S = !c.arrow && ne(r) != null && O !== $ && i.reference[h] / 2 - (O < N ? D : k) - m[h] / 2 < 0, L = S ? O < N ? O - N : O - E : 0;
300
- return {
301
- [u]: p[u] + L,
302
- data: {
303
- [u]: $,
304
- centerOffset: O - $ - L,
305
- ...S && {
306
- alignmentOffset: L
307
- }
308
- },
309
- reset: S
310
- };
311
- }
312
- }), mn = function(e) {
313
- return e === void 0 && (e = {}), {
314
- name: "flip",
315
- options: e,
316
- async fn(t) {
317
- var n, o;
318
- const {
319
- placement: r,
320
- middlewareData: i,
321
- rects: s,
322
- initialPlacement: l,
323
- platform: c,
324
- elements: f
325
- } = t, {
326
- mainAxis: a = !0,
327
- crossAxis: d = !0,
328
- fallbackPlacements: p,
329
- fallbackStrategy: u = "bestFit",
330
- fallbackAxisSideDirection: h = "none",
331
- flipAlignment: m = !0,
332
- ...w
333
- } = G(e, t);
334
- if ((n = i.arrow) != null && n.alignmentOffset)
335
- return {};
336
- const y = q(r), v = z(l), b = q(l) === l, x = await (c.isRTL == null ? void 0 : c.isRTL(f.floating)), C = p || (b || !m ? [he(l)] : sn(l)), A = h !== "none";
337
- !p && A && C.push(...fn(l, m, h, x));
338
- const P = [l, ...C], M = await c.detectOverflow(t, w), H = [];
339
- let D = ((o = i.flip) == null ? void 0 : o.overflows) || [];
340
- if (a && H.push(M[y]), d) {
341
- const O = rn(r, s, x);
342
- H.push(M[O[0]], M[O[1]]);
343
- }
344
- if (D = [...D, {
345
- placement: r,
346
- overflows: H
347
- }], !H.every((O) => O <= 0)) {
348
- var k, N;
349
- const O = (((k = i.flip) == null ? void 0 : k.index) || 0) + 1, $ = P[O];
350
- if ($ && (!(d === "alignment" ? v !== z($) : !1) || // We leave the current main axis only if every placement on that axis
351
- // overflows the main axis.
352
- D.every((R) => z(R.placement) === v ? R.overflows[0] > 0 : !0)))
353
- return {
354
- data: {
355
- index: O,
356
- overflows: D
357
- },
358
- reset: {
359
- placement: $
360
- }
361
- };
362
- let S = (N = D.filter((L) => L.overflows[0] <= 0).sort((L, R) => L.overflows[1] - R.overflows[1])[0]) == null ? void 0 : N.placement;
363
- if (!S)
364
- switch (u) {
365
- case "bestFit": {
366
- var E;
367
- const L = (E = D.filter((R) => {
368
- if (A) {
369
- const _ = z(R.placement);
370
- return _ === v || // Create a bias to the `y` side axis due to horizontal
371
- // reading directions favoring greater width.
372
- _ === "y";
373
- }
374
- return !0;
375
- }).map((R) => [R.placement, R.overflows.filter((_) => _ > 0).reduce((_, V) => _ + V, 0)]).sort((R, _) => R[1] - _[1])[0]) == null ? void 0 : E[0];
376
- L && (S = L);
377
- break;
378
- }
379
- case "initialPlacement":
380
- S = l;
381
- break;
382
- }
383
- if (r !== S)
384
- return {
385
- reset: {
386
- placement: S
387
- }
388
- };
389
- }
390
- return {};
391
- }
392
- };
393
- };
394
- function Ge(e, t) {
395
- return {
396
- top: e.top - t.height,
397
- right: e.right - t.width,
398
- bottom: e.bottom - t.height,
399
- left: e.left - t.width
400
- };
401
- }
402
- function qe(e) {
403
- return en.some((t) => e[t] >= 0);
404
- }
405
- const gn = function(e) {
406
- return e === void 0 && (e = {}), {
407
- name: "hide",
408
- options: e,
409
- async fn(t) {
410
- const {
411
- rects: n,
412
- platform: o
413
- } = t, {
414
- strategy: r = "referenceHidden",
415
- ...i
416
- } = G(e, t);
417
- switch (r) {
418
- case "referenceHidden": {
419
- const s = await o.detectOverflow(t, {
420
- ...i,
421
- elementContext: "reference"
422
- }), l = Ge(s, n.reference);
423
- return {
424
- data: {
425
- referenceHiddenOffsets: l,
426
- referenceHidden: qe(l)
427
- }
428
- };
429
- }
430
- case "escaped": {
431
- const s = await o.detectOverflow(t, {
432
- ...i,
433
- altBoundary: !0
434
- }), l = Ge(s, n.floating);
435
- return {
436
- data: {
437
- escapedOffsets: l,
438
- escaped: qe(l)
439
- }
440
- };
441
- }
442
- default:
443
- return {};
444
- }
445
- }
446
- };
447
- }, rt = /* @__PURE__ */ new Set(["left", "top"]);
448
- async function wn(e, t) {
449
- const {
450
- placement: n,
451
- platform: o,
452
- elements: r
453
- } = e, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = q(n), l = ne(n), c = z(n) === "y", f = rt.has(s) ? -1 : 1, a = i && c ? -1 : 1, d = G(t, e);
454
- let {
455
- mainAxis: p,
456
- crossAxis: u,
457
- alignmentAxis: h
458
- } = typeof d == "number" ? {
459
- mainAxis: d,
460
- crossAxis: 0,
461
- alignmentAxis: null
462
- } : {
463
- mainAxis: d.mainAxis || 0,
464
- crossAxis: d.crossAxis || 0,
465
- alignmentAxis: d.alignmentAxis
466
- };
467
- return l && typeof h == "number" && (u = l === "end" ? h * -1 : h), c ? {
468
- x: u * a,
469
- y: p * f
470
- } : {
471
- x: p * f,
472
- y: u * a
473
- };
474
- }
475
- const yn = function(e) {
476
- return e === void 0 && (e = 0), {
477
- name: "offset",
478
- options: e,
479
- async fn(t) {
480
- var n, o;
481
- const {
482
- x: r,
483
- y: i,
484
- placement: s,
485
- middlewareData: l
486
- } = t, c = await wn(t, e);
487
- return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
488
- x: r + c.x,
489
- y: i + c.y,
490
- data: {
491
- ...c,
492
- placement: s
493
- }
494
- };
495
- }
496
- };
497
- }, xn = function(e) {
498
- return e === void 0 && (e = {}), {
499
- name: "shift",
500
- options: e,
501
- async fn(t) {
502
- const {
503
- x: n,
504
- y: o,
505
- placement: r,
506
- platform: i
507
- } = t, {
508
- mainAxis: s = !0,
509
- crossAxis: l = !1,
510
- limiter: c = {
511
- fn: (y) => {
512
- let {
513
- x: v,
514
- y: b
515
- } = y;
516
- return {
517
- x: v,
518
- y: b
519
- };
520
- }
521
- },
522
- ...f
523
- } = G(e, t), a = {
524
- x: n,
525
- y: o
526
- }, d = await i.detectOverflow(t, f), p = z(q(r)), u = De(p);
527
- let h = a[u], m = a[p];
528
- if (s) {
529
- const y = u === "y" ? "top" : "left", v = u === "y" ? "bottom" : "right", b = h + d[y], x = h - d[v];
530
- h = Te(b, h, x);
531
- }
532
- if (l) {
533
- const y = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", b = m + d[y], x = m - d[v];
534
- m = Te(b, m, x);
535
- }
536
- const w = c.fn({
537
- ...t,
538
- [u]: h,
539
- [p]: m
540
- });
541
- return {
542
- ...w,
543
- data: {
544
- x: w.x - n,
545
- y: w.y - o,
546
- enabled: {
547
- [u]: s,
548
- [p]: l
549
- }
550
- }
551
- };
552
- }
553
- };
554
- }, vn = function(e) {
555
- return e === void 0 && (e = {}), {
556
- options: e,
557
- fn(t) {
558
- const {
559
- x: n,
560
- y: o,
561
- placement: r,
562
- rects: i,
563
- middlewareData: s
564
- } = t, {
565
- offset: l = 0,
566
- mainAxis: c = !0,
567
- crossAxis: f = !0
568
- } = G(e, t), a = {
569
- x: n,
570
- y: o
571
- }, d = z(r), p = De(d);
572
- let u = a[p], h = a[d];
573
- const m = G(l, t), w = typeof m == "number" ? {
574
- mainAxis: m,
575
- crossAxis: 0
576
- } : {
577
- mainAxis: 0,
578
- crossAxis: 0,
579
- ...m
580
- };
581
- if (c) {
582
- const b = p === "y" ? "height" : "width", x = i.reference[p] - i.floating[b] + w.mainAxis, C = i.reference[p] + i.reference[b] - w.mainAxis;
583
- u < x ? u = x : u > C && (u = C);
584
- }
585
- if (f) {
586
- var y, v;
587
- const b = p === "y" ? "width" : "height", x = rt.has(q(r)), C = i.reference[d] - i.floating[b] + (x && ((y = s.offset) == null ? void 0 : y[d]) || 0) + (x ? 0 : w.crossAxis), A = i.reference[d] + i.reference[b] + (x ? 0 : ((v = s.offset) == null ? void 0 : v[d]) || 0) - (x ? w.crossAxis : 0);
588
- h < C ? h = C : h > A && (h = A);
589
- }
590
- return {
591
- [p]: u,
592
- [d]: h
593
- };
594
- }
595
- };
596
- }, bn = function(e) {
597
- return e === void 0 && (e = {}), {
598
- name: "size",
599
- options: e,
600
- async fn(t) {
601
- var n, o;
602
- const {
603
- placement: r,
604
- rects: i,
605
- platform: s,
606
- elements: l
607
- } = t, {
608
- apply: c = () => {
609
- },
610
- ...f
611
- } = G(e, t), a = await s.detectOverflow(t, f), d = q(r), p = ne(r), u = z(r) === "y", {
612
- width: h,
613
- height: m
614
- } = i.floating;
615
- let w, y;
616
- d === "top" || d === "bottom" ? (w = d, y = p === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (y = d, w = p === "end" ? "top" : "bottom");
617
- const v = m - a.top - a.bottom, b = h - a.left - a.right, x = U(m - a[w], v), C = U(h - a[y], b), A = !t.middlewareData.shift;
618
- let P = x, M = C;
619
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (M = b), (o = t.middlewareData.shift) != null && o.enabled.y && (P = v), A && !p) {
620
- const D = F(a.left, 0), k = F(a.right, 0), N = F(a.top, 0), E = F(a.bottom, 0);
621
- u ? M = h - 2 * (D !== 0 || k !== 0 ? D + k : F(a.left, a.right)) : P = m - 2 * (N !== 0 || E !== 0 ? N + E : F(a.top, a.bottom));
622
- }
623
- await c({
624
- ...t,
625
- availableWidth: M,
626
- availableHeight: P
627
- });
628
- const H = await s.getDimensions(l.floating);
629
- return h !== H.width || m !== H.height ? {
630
- reset: {
631
- rects: !0
632
- }
633
- } : {};
634
- }
635
- };
636
- };
637
- function ye() {
638
- return typeof window < "u";
639
- }
640
- function oe(e) {
641
- return it(e) ? (e.nodeName || "").toLowerCase() : "#document";
642
- }
643
- function I(e) {
644
- var t;
645
- return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
646
- }
647
- function X(e) {
648
- var t;
649
- return (t = (it(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
650
- }
651
- function it(e) {
652
- return ye() ? e instanceof Node || e instanceof I(e).Node : !1;
653
- }
654
- function W(e) {
655
- return ye() ? e instanceof Element || e instanceof I(e).Element : !1;
656
- }
657
- function Y(e) {
658
- return ye() ? e instanceof HTMLElement || e instanceof I(e).HTMLElement : !1;
659
- }
660
- function Ue(e) {
661
- return !ye() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof I(e).ShadowRoot;
662
- }
663
- const Cn = /* @__PURE__ */ new Set(["inline", "contents"]);
664
- function le(e) {
665
- const {
666
- overflow: t,
667
- overflowX: n,
668
- overflowY: o,
669
- display: r
670
- } = B(e);
671
- return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Cn.has(r);
672
- }
673
- const An = /* @__PURE__ */ new Set(["table", "td", "th"]);
674
- function Rn(e) {
675
- return An.has(oe(e));
676
- }
677
- const Pn = [":popover-open", ":modal"];
678
- function xe(e) {
679
- return Pn.some((t) => {
680
- try {
681
- return e.matches(t);
682
- } catch {
683
- return !1;
684
- }
685
- });
686
- }
687
- const Tn = ["transform", "translate", "scale", "rotate", "perspective"], On = ["transform", "translate", "scale", "rotate", "perspective", "filter"], En = ["paint", "layout", "strict", "content"];
688
- function ke(e) {
689
- const t = Ne(), n = W(e) ? B(e) : e;
690
- return Tn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || On.some((o) => (n.willChange || "").includes(o)) || En.some((o) => (n.contain || "").includes(o));
691
- }
692
- function Sn(e) {
693
- let t = K(e);
694
- for (; Y(t) && !ee(t); ) {
695
- if (ke(t))
696
- return t;
697
- if (xe(t))
698
- return null;
699
- t = K(t);
700
- }
701
- return null;
702
- }
703
- function Ne() {
704
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
705
- }
706
- const Ln = /* @__PURE__ */ new Set(["html", "body", "#document"]);
707
- function ee(e) {
708
- return Ln.has(oe(e));
709
- }
710
- function B(e) {
711
- return I(e).getComputedStyle(e);
712
- }
713
- function ve(e) {
714
- return W(e) ? {
715
- scrollLeft: e.scrollLeft,
716
- scrollTop: e.scrollTop
717
- } : {
718
- scrollLeft: e.scrollX,
719
- scrollTop: e.scrollY
720
- };
721
- }
722
- function K(e) {
723
- if (oe(e) === "html")
724
- return e;
725
- const t = (
726
- // Step into the shadow DOM of the parent of a slotted node.
727
- e.assignedSlot || // DOM Element detected.
728
- e.parentNode || // ShadowRoot detected.
729
- Ue(e) && e.host || // Fallback.
730
- X(e)
731
- );
732
- return Ue(t) ? t.host : t;
733
- }
734
- function st(e) {
735
- const t = K(e);
736
- return ee(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && le(t) ? t : st(t);
737
- }
738
- function ie(e, t, n) {
739
- var o;
740
- t === void 0 && (t = []), n === void 0 && (n = !0);
741
- const r = st(e), i = r === ((o = e.ownerDocument) == null ? void 0 : o.body), s = I(r);
742
- if (i) {
743
- const l = Ee(s);
744
- return t.concat(s, s.visualViewport || [], le(r) ? r : [], l && n ? ie(l) : []);
745
- }
746
- return t.concat(r, ie(r, [], n));
747
- }
748
- function Ee(e) {
749
- return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
750
- }
751
- function ct(e) {
752
- const t = B(e);
753
- let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
754
- const r = Y(e), i = r ? e.offsetWidth : n, s = r ? e.offsetHeight : o, l = pe(n) !== i || pe(o) !== s;
755
- return l && (n = i, o = s), {
756
- width: n,
757
- height: o,
758
- $: l
759
- };
760
- }
761
- function He(e) {
762
- return W(e) ? e : e.contextElement;
763
- }
764
- function Q(e) {
765
- const t = He(e);
766
- if (!Y(t))
767
- return j(1);
768
- const n = t.getBoundingClientRect(), {
769
- width: o,
770
- height: r,
771
- $: i
772
- } = ct(t);
773
- let s = (i ? pe(n.width) : n.width) / o, l = (i ? pe(n.height) : n.height) / r;
774
- return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
775
- x: s,
776
- y: l
777
- };
778
- }
779
- const Dn = /* @__PURE__ */ j(0);
780
- function lt(e) {
781
- const t = I(e);
782
- return !Ne() || !t.visualViewport ? Dn : {
783
- x: t.visualViewport.offsetLeft,
784
- y: t.visualViewport.offsetTop
785
- };
786
- }
787
- function Mn(e, t, n) {
788
- return t === void 0 && (t = !1), !n || t && n !== I(e) ? !1 : t;
789
- }
790
- function Z(e, t, n, o) {
791
- t === void 0 && (t = !1), n === void 0 && (n = !1);
792
- const r = e.getBoundingClientRect(), i = He(e);
793
- let s = j(1);
794
- t && (o ? W(o) && (s = Q(o)) : s = Q(e));
795
- const l = Mn(i, n, o) ? lt(i) : j(0);
796
- let c = (r.left + l.x) / s.x, f = (r.top + l.y) / s.y, a = r.width / s.x, d = r.height / s.y;
797
- if (i) {
798
- const p = I(i), u = o && W(o) ? I(o) : o;
799
- let h = p, m = Ee(h);
800
- for (; m && o && u !== h; ) {
801
- const w = Q(m), y = m.getBoundingClientRect(), v = B(m), b = y.left + (m.clientLeft + parseFloat(v.paddingLeft)) * w.x, x = y.top + (m.clientTop + parseFloat(v.paddingTop)) * w.y;
802
- c *= w.x, f *= w.y, a *= w.x, d *= w.y, c += b, f += x, h = I(m), m = Ee(h);
803
- }
804
- }
805
- return me({
806
- width: a,
807
- height: d,
808
- x: c,
809
- y: f
810
- });
811
- }
812
- function be(e, t) {
813
- const n = ve(e).scrollLeft;
814
- return t ? t.left + n : Z(X(e)).left + n;
815
- }
816
- function at(e, t) {
817
- const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - be(e, n), r = n.top + t.scrollTop;
818
- return {
819
- x: o,
820
- y: r
821
- };
822
- }
823
- function _n(e) {
824
- let {
825
- elements: t,
826
- rect: n,
827
- offsetParent: o,
828
- strategy: r
829
- } = e;
830
- const i = r === "fixed", s = X(o), l = t ? xe(t.floating) : !1;
831
- if (o === s || l && i)
832
- return n;
833
- let c = {
834
- scrollLeft: 0,
835
- scrollTop: 0
836
- }, f = j(1);
837
- const a = j(0), d = Y(o);
838
- if ((d || !d && !i) && ((oe(o) !== "body" || le(s)) && (c = ve(o)), Y(o))) {
839
- const u = Z(o);
840
- f = Q(o), a.x = u.x + o.clientLeft, a.y = u.y + o.clientTop;
841
- }
842
- const p = s && !d && !i ? at(s, c) : j(0);
843
- return {
844
- width: n.width * f.x,
845
- height: n.height * f.y,
846
- x: n.x * f.x - c.scrollLeft * f.x + a.x + p.x,
847
- y: n.y * f.y - c.scrollTop * f.y + a.y + p.y
848
- };
849
- }
850
- function kn(e) {
851
- return Array.from(e.getClientRects());
852
- }
853
- function Nn(e) {
854
- const t = X(e), n = ve(e), o = e.ownerDocument.body, r = F(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = F(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
855
- let s = -n.scrollLeft + be(e);
856
- const l = -n.scrollTop;
857
- return B(o).direction === "rtl" && (s += F(t.clientWidth, o.clientWidth) - r), {
858
- width: r,
859
- height: i,
860
- x: s,
861
- y: l
862
- };
863
- }
864
- const Ke = 25;
865
- function Hn(e, t) {
866
- const n = I(e), o = X(e), r = n.visualViewport;
867
- let i = o.clientWidth, s = o.clientHeight, l = 0, c = 0;
868
- if (r) {
869
- i = r.width, s = r.height;
870
- const a = Ne();
871
- (!a || a && t === "fixed") && (l = r.offsetLeft, c = r.offsetTop);
872
- }
873
- const f = be(o);
874
- if (f <= 0) {
875
- const a = o.ownerDocument, d = a.body, p = getComputedStyle(d), u = a.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(o.clientWidth - d.clientWidth - u);
876
- h <= Ke && (i -= h);
877
- } else f <= Ke && (i += f);
878
- return {
879
- width: i,
880
- height: s,
881
- x: l,
882
- y: c
883
- };
884
- }
885
- const $n = /* @__PURE__ */ new Set(["absolute", "fixed"]);
886
- function Fn(e, t) {
887
- const n = Z(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, i = Y(e) ? Q(e) : j(1), s = e.clientWidth * i.x, l = e.clientHeight * i.y, c = r * i.x, f = o * i.y;
888
- return {
889
- width: s,
890
- height: l,
891
- x: c,
892
- y: f
893
- };
894
- }
895
- function Ze(e, t, n) {
896
- let o;
897
- if (t === "viewport")
898
- o = Hn(e, n);
899
- else if (t === "document")
900
- o = Nn(X(e));
901
- else if (W(t))
902
- o = Fn(t, n);
903
- else {
904
- const r = lt(e);
905
- o = {
906
- x: t.x - r.x,
907
- y: t.y - r.y,
908
- width: t.width,
909
- height: t.height
910
- };
911
- }
912
- return me(o);
913
- }
914
- function ft(e, t) {
915
- const n = K(e);
916
- return n === t || !W(n) || ee(n) ? !1 : B(n).position === "fixed" || ft(n, t);
917
- }
918
- function In(e, t) {
919
- const n = t.get(e);
920
- if (n)
921
- return n;
922
- let o = ie(e, [], !1).filter((l) => W(l) && oe(l) !== "body"), r = null;
923
- const i = B(e).position === "fixed";
924
- let s = i ? K(e) : e;
925
- for (; W(s) && !ee(s); ) {
926
- const l = B(s), c = ke(s);
927
- !c && l.position === "fixed" && (r = null), (i ? !c && !r : !c && l.position === "static" && !!r && $n.has(r.position) || le(s) && !c && ft(e, s)) ? o = o.filter((a) => a !== s) : r = l, s = K(s);
928
- }
929
- return t.set(e, o), o;
930
- }
931
- function Wn(e) {
932
- let {
933
- element: t,
934
- boundary: n,
935
- rootBoundary: o,
936
- strategy: r
937
- } = e;
938
- const s = [...n === "clippingAncestors" ? xe(t) ? [] : In(t, this._c) : [].concat(n), o], l = s[0], c = s.reduce((f, a) => {
939
- const d = Ze(t, a, r);
940
- return f.top = F(d.top, f.top), f.right = U(d.right, f.right), f.bottom = U(d.bottom, f.bottom), f.left = F(d.left, f.left), f;
941
- }, Ze(t, l, r));
942
- return {
943
- width: c.right - c.left,
944
- height: c.bottom - c.top,
945
- x: c.left,
946
- y: c.top
947
- };
948
- }
949
- function Bn(e) {
950
- const {
951
- width: t,
952
- height: n
953
- } = ct(e);
954
- return {
955
- width: t,
956
- height: n
957
- };
958
- }
959
- function Vn(e, t, n) {
960
- const o = Y(t), r = X(t), i = n === "fixed", s = Z(e, !0, i, t);
961
- let l = {
962
- scrollLeft: 0,
963
- scrollTop: 0
964
- };
965
- const c = j(0);
966
- function f() {
967
- c.x = be(r);
968
- }
969
- if (o || !o && !i)
970
- if ((oe(t) !== "body" || le(r)) && (l = ve(t)), o) {
971
- const u = Z(t, !0, i, t);
972
- c.x = u.x + t.clientLeft, c.y = u.y + t.clientTop;
973
- } else r && f();
974
- i && !o && r && f();
975
- const a = r && !o && !i ? at(r, l) : j(0), d = s.left + l.scrollLeft - c.x - a.x, p = s.top + l.scrollTop - c.y - a.y;
976
- return {
977
- x: d,
978
- y: p,
979
- width: s.width,
980
- height: s.height
981
- };
982
- }
983
- function Re(e) {
984
- return B(e).position === "static";
985
- }
986
- function Je(e, t) {
987
- if (!Y(e) || B(e).position === "fixed")
988
- return null;
989
- if (t)
990
- return t(e);
991
- let n = e.offsetParent;
992
- return X(e) === n && (n = n.ownerDocument.body), n;
993
- }
994
- function ut(e, t) {
995
- const n = I(e);
996
- if (xe(e))
997
- return n;
998
- if (!Y(e)) {
999
- let r = K(e);
1000
- for (; r && !ee(r); ) {
1001
- if (W(r) && !Re(r))
1002
- return r;
1003
- r = K(r);
1004
- }
1005
- return n;
1006
- }
1007
- let o = Je(e, t);
1008
- for (; o && Rn(o) && Re(o); )
1009
- o = Je(o, t);
1010
- return o && ee(o) && Re(o) && !ke(o) ? n : o || Sn(e) || n;
1011
- }
1012
- const zn = async function(e) {
1013
- const t = this.getOffsetParent || ut, n = this.getDimensions, o = await n(e.floating);
1014
- return {
1015
- reference: Vn(e.reference, await t(e.floating), e.strategy),
1016
- floating: {
1017
- x: 0,
1018
- y: 0,
1019
- width: o.width,
1020
- height: o.height
1021
- }
1022
- };
1023
- };
1024
- function jn(e) {
1025
- return B(e).direction === "rtl";
1026
- }
1027
- const Yn = {
1028
- convertOffsetParentRelativeRectToViewportRelativeRect: _n,
1029
- getDocumentElement: X,
1030
- getClippingRect: Wn,
1031
- getOffsetParent: ut,
1032
- getElementRects: zn,
1033
- getClientRects: kn,
1034
- getDimensions: Bn,
1035
- getScale: Q,
1036
- isElement: W,
1037
- isRTL: jn
1038
- };
1039
- function dt(e, t) {
1040
- return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1041
- }
1042
- function Xn(e, t) {
1043
- let n = null, o;
1044
- const r = X(e);
1045
- function i() {
1046
- var l;
1047
- clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
1048
- }
1049
- function s(l, c) {
1050
- l === void 0 && (l = !1), c === void 0 && (c = 1), i();
1051
- const f = e.getBoundingClientRect(), {
1052
- left: a,
1053
- top: d,
1054
- width: p,
1055
- height: u
1056
- } = f;
1057
- if (l || t(), !p || !u)
1058
- return;
1059
- const h = ue(d), m = ue(r.clientWidth - (a + p)), w = ue(r.clientHeight - (d + u)), y = ue(a), b = {
1060
- rootMargin: -h + "px " + -m + "px " + -w + "px " + -y + "px",
1061
- threshold: F(0, U(1, c)) || 1
1062
- };
1063
- let x = !0;
1064
- function C(A) {
1065
- const P = A[0].intersectionRatio;
1066
- if (P !== c) {
1067
- if (!x)
1068
- return s();
1069
- P ? s(!1, P) : o = setTimeout(() => {
1070
- s(!1, 1e-7);
1071
- }, 1e3);
1072
- }
1073
- P === 1 && !dt(f, e.getBoundingClientRect()) && s(), x = !1;
1074
- }
1075
- try {
1076
- n = new IntersectionObserver(C, {
1077
- ...b,
1078
- // Handle <iframe>s
1079
- root: r.ownerDocument
1080
- });
1081
- } catch {
1082
- n = new IntersectionObserver(C, b);
1083
- }
1084
- n.observe(e);
1085
- }
1086
- return s(!0), i;
1087
- }
1088
- function Gn(e, t, n, o) {
1089
- o === void 0 && (o = {});
1090
- const {
1091
- ancestorScroll: r = !0,
1092
- ancestorResize: i = !0,
1093
- elementResize: s = typeof ResizeObserver == "function",
1094
- layoutShift: l = typeof IntersectionObserver == "function",
1095
- animationFrame: c = !1
1096
- } = o, f = He(e), a = r || i ? [...f ? ie(f) : [], ...ie(t)] : [];
1097
- a.forEach((y) => {
1098
- r && y.addEventListener("scroll", n, {
1099
- passive: !0
1100
- }), i && y.addEventListener("resize", n);
1101
- });
1102
- const d = f && l ? Xn(f, n) : null;
1103
- let p = -1, u = null;
1104
- s && (u = new ResizeObserver((y) => {
1105
- let [v] = y;
1106
- v && v.target === f && u && (u.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1107
- var b;
1108
- (b = u) == null || b.observe(t);
1109
- })), n();
1110
- }), f && !c && u.observe(f), u.observe(t));
1111
- let h, m = c ? Z(e) : null;
1112
- c && w();
1113
- function w() {
1114
- const y = Z(e);
1115
- m && !dt(m, y) && n(), m = y, h = requestAnimationFrame(w);
1116
- }
1117
- return n(), () => {
1118
- var y;
1119
- a.forEach((v) => {
1120
- r && v.removeEventListener("scroll", n), i && v.removeEventListener("resize", n);
1121
- }), d?.(), (y = u) == null || y.disconnect(), u = null, c && cancelAnimationFrame(h);
1122
- };
1123
- }
1124
- const qn = yn, Un = xn, Kn = mn, Zn = bn, Jn = gn, Qe = hn, Qn = vn, eo = (e, t, n) => {
1125
- const o = /* @__PURE__ */ new Map(), r = {
1126
- platform: Yn,
1127
- ...n
1128
- }, i = {
1129
- ...r.platform,
1130
- _c: o
1131
- };
1132
- return pn(e, t, {
1133
- ...r,
1134
- platform: i
1135
- });
1136
- };
1137
- var to = typeof document < "u", no = function() {
1138
- }, de = to ? jt : no;
1139
- function ge(e, t) {
1140
- if (e === t)
1141
- return !0;
1142
- if (typeof e != typeof t)
1143
- return !1;
1144
- if (typeof e == "function" && e.toString() === t.toString())
1145
- return !0;
1146
- let n, o, r;
1147
- if (e && t && typeof e == "object") {
1148
- if (Array.isArray(e)) {
1149
- if (n = e.length, n !== t.length) return !1;
1150
- for (o = n; o-- !== 0; )
1151
- if (!ge(e[o], t[o]))
1152
- return !1;
1153
- return !0;
1154
- }
1155
- if (r = Object.keys(e), n = r.length, n !== Object.keys(t).length)
1156
- return !1;
1157
- for (o = n; o-- !== 0; )
1158
- if (!{}.hasOwnProperty.call(t, r[o]))
1159
- return !1;
1160
- for (o = n; o-- !== 0; ) {
1161
- const i = r[o];
1162
- if (!(i === "_owner" && e.$$typeof) && !ge(e[i], t[i]))
1163
- return !1;
1164
- }
1165
- return !0;
1166
- }
1167
- return e !== e && t !== t;
1168
- }
1169
- function pt(e) {
1170
- return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1171
- }
1172
- function et(e, t) {
1173
- const n = pt(e);
1174
- return Math.round(t * n) / n;
1175
- }
1176
- function Pe(e) {
1177
- const t = g.useRef(e);
1178
- return de(() => {
1179
- t.current = e;
1180
- }), t;
1181
- }
1182
- function oo(e) {
1183
- e === void 0 && (e = {});
1184
- const {
1185
- placement: t = "bottom",
1186
- strategy: n = "absolute",
1187
- middleware: o = [],
1188
- platform: r,
1189
- elements: {
1190
- reference: i,
1191
- floating: s
1192
- } = {},
1193
- transform: l = !0,
1194
- whileElementsMounted: c,
1195
- open: f
1196
- } = e, [a, d] = g.useState({
1197
- x: 0,
1198
- y: 0,
1199
- strategy: n,
1200
- placement: t,
1201
- middlewareData: {},
1202
- isPositioned: !1
1203
- }), [p, u] = g.useState(o);
1204
- ge(p, o) || u(o);
1205
- const [h, m] = g.useState(null), [w, y] = g.useState(null), v = g.useCallback((R) => {
1206
- R !== A.current && (A.current = R, m(R));
1207
- }, []), b = g.useCallback((R) => {
1208
- R !== P.current && (P.current = R, y(R));
1209
- }, []), x = i || h, C = s || w, A = g.useRef(null), P = g.useRef(null), M = g.useRef(a), H = c != null, D = Pe(c), k = Pe(r), N = Pe(f), E = g.useCallback(() => {
1210
- if (!A.current || !P.current)
1211
- return;
1212
- const R = {
1213
- placement: t,
1214
- strategy: n,
1215
- middleware: p
1216
- };
1217
- k.current && (R.platform = k.current), eo(A.current, P.current, R).then((_) => {
1218
- const V = {
1219
- ..._,
1220
- // The floating element's position may be recomputed while it's closed
1221
- // but still mounted (such as when transitioning out). To ensure
1222
- // `isPositioned` will be `false` initially on the next open, avoid
1223
- // setting it to `true` when `open === false` (must be specified).
1224
- isPositioned: N.current !== !1
1225
- };
1226
- O.current && !ge(M.current, V) && (M.current = V, Ut.flushSync(() => {
1227
- d(V);
1228
- }));
1229
- });
1230
- }, [p, t, n, k, N]);
1231
- de(() => {
1232
- f === !1 && M.current.isPositioned && (M.current.isPositioned = !1, d((R) => ({
1233
- ...R,
1234
- isPositioned: !1
1235
- })));
1236
- }, [f]);
1237
- const O = g.useRef(!1);
1238
- de(() => (O.current = !0, () => {
1239
- O.current = !1;
1240
- }), []), de(() => {
1241
- if (x && (A.current = x), C && (P.current = C), x && C) {
1242
- if (D.current)
1243
- return D.current(x, C, E);
1244
- E();
1245
- }
1246
- }, [x, C, E, D, H]);
1247
- const $ = g.useMemo(() => ({
1248
- reference: A,
1249
- floating: P,
1250
- setReference: v,
1251
- setFloating: b
1252
- }), [v, b]), S = g.useMemo(() => ({
1253
- reference: x,
1254
- floating: C
1255
- }), [x, C]), L = g.useMemo(() => {
1256
- const R = {
1257
- position: n,
1258
- left: 0,
1259
- top: 0
1260
- };
1261
- if (!S.floating)
1262
- return R;
1263
- const _ = et(S.floating, a.x), V = et(S.floating, a.y);
1264
- return l ? {
1265
- ...R,
1266
- transform: "translate(" + _ + "px, " + V + "px)",
1267
- ...pt(S.floating) >= 1.5 && {
1268
- willChange: "transform"
1269
- }
1270
- } : {
1271
- position: n,
1272
- left: _,
1273
- top: V
1274
- };
1275
- }, [n, l, S.floating, a.x, a.y]);
1276
- return g.useMemo(() => ({
1277
- ...a,
1278
- update: E,
1279
- refs: $,
1280
- elements: S,
1281
- floatingStyles: L
1282
- }), [a, E, $, S, L]);
1283
- }
1284
- const ro = (e) => {
1285
- function t(n) {
1286
- return {}.hasOwnProperty.call(n, "current");
1287
- }
1288
- return {
1289
- name: "arrow",
1290
- options: e,
1291
- fn(n) {
1292
- const {
1293
- element: o,
1294
- padding: r
1295
- } = typeof e == "function" ? e(n) : e;
1296
- return o && t(o) ? o.current != null ? Qe({
1297
- element: o.current,
1298
- padding: r
1299
- }).fn(n) : {} : o ? Qe({
1300
- element: o,
1301
- padding: r
1302
- }).fn(n) : {};
1303
- }
1304
- };
1305
- }, io = (e, t) => ({
1306
- ...qn(e),
1307
- options: [e, t]
1308
- }), so = (e, t) => ({
1309
- ...Un(e),
1310
- options: [e, t]
1311
- }), co = (e, t) => ({
1312
- ...Qn(e),
1313
- options: [e, t]
1314
- }), lo = (e, t) => ({
1315
- ...Kn(e),
1316
- options: [e, t]
1317
- }), ao = (e, t) => ({
1318
- ...Zn(e),
1319
- options: [e, t]
1320
- }), fo = (e, t) => ({
1321
- ...Jn(e),
1322
- options: [e, t]
1323
- }), uo = (e, t) => ({
1324
- ...ro(e),
1325
- options: [e, t]
1326
- });
1327
- var po = "Arrow", ht = g.forwardRef((e, t) => {
1328
- const { children: n, width: o = 10, height: r = 5, ...i } = e;
1329
- return /* @__PURE__ */ T(
1330
- ce.svg,
1331
- {
1332
- ...i,
1333
- ref: t,
1334
- width: o,
1335
- height: r,
1336
- viewBox: "0 0 30 10",
1337
- preserveAspectRatio: "none",
1338
- children: e.asChild ? n : /* @__PURE__ */ T("polygon", { points: "0,0 30,0 15,10" })
1339
- }
1340
- );
1341
- });
1342
- ht.displayName = po;
1343
- var ho = ht, $e = "Popper", [mt, gt] = tt($e), [mo, wt] = mt($e), yt = (e) => {
1344
- const { __scopePopper: t, children: n } = e, [o, r] = g.useState(null);
1345
- return /* @__PURE__ */ T(mo, { scope: t, anchor: o, onAnchorChange: r, children: n });
1346
- };
1347
- yt.displayName = $e;
1348
- var xt = "PopperAnchor", vt = g.forwardRef(
1349
- (e, t) => {
1350
- const { __scopePopper: n, virtualRef: o, ...r } = e, i = wt(xt, n), s = g.useRef(null), l = we(t, s), c = g.useRef(null);
1351
- return g.useEffect(() => {
1352
- const f = c.current;
1353
- c.current = o?.current || s.current, f !== c.current && i.onAnchorChange(c.current);
1354
- }), o ? null : /* @__PURE__ */ T(ce.div, { ...r, ref: l });
1355
- }
1356
- );
1357
- vt.displayName = xt;
1358
- var Fe = "PopperContent", [go, wo] = mt(Fe), bt = g.forwardRef(
1359
- (e, t) => {
1360
- const {
1361
- __scopePopper: n,
1362
- side: o = "bottom",
1363
- sideOffset: r = 0,
1364
- align: i = "center",
1365
- alignOffset: s = 0,
1366
- arrowPadding: l = 0,
1367
- avoidCollisions: c = !0,
1368
- collisionBoundary: f = [],
1369
- collisionPadding: a = 0,
1370
- sticky: d = "partial",
1371
- hideWhenDetached: p = !1,
1372
- updatePositionStrategy: u = "optimized",
1373
- onPlaced: h,
1374
- ...m
1375
- } = e, w = wt(Fe, n), [y, v] = g.useState(null), b = we(t, (re) => v(re)), [x, C] = g.useState(null), A = Qt(x), P = A?.width ?? 0, M = A?.height ?? 0, H = o + (i !== "center" ? "-" + i : ""), D = typeof a == "number" ? a : { top: 0, right: 0, bottom: 0, left: 0, ...a }, k = Array.isArray(f) ? f : [f], N = k.length > 0, E = {
1376
- padding: D,
1377
- boundary: k.filter(xo),
1378
- // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
1379
- altBoundary: N
1380
- }, { refs: O, floatingStyles: $, placement: S, isPositioned: L, middlewareData: R } = oo({
1381
- // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
1382
- strategy: "fixed",
1383
- placement: H,
1384
- whileElementsMounted: (...re) => Gn(...re, {
1385
- animationFrame: u === "always"
1386
- }),
1387
- elements: {
1388
- reference: w.anchor
1389
- },
1390
- middleware: [
1391
- io({ mainAxis: r + M, alignmentAxis: s }),
1392
- c && so({
1393
- mainAxis: !0,
1394
- crossAxis: !1,
1395
- limiter: d === "partial" ? co() : void 0,
1396
- ...E
1397
- }),
1398
- c && lo({ ...E }),
1399
- ao({
1400
- ...E,
1401
- apply: ({ elements: re, rects: Ve, availableWidth: Wt, availableHeight: Bt }) => {
1402
- const { width: Vt, height: zt } = Ve.reference, fe = re.floating.style;
1403
- fe.setProperty("--radix-popper-available-width", `${Wt}px`), fe.setProperty("--radix-popper-available-height", `${Bt}px`), fe.setProperty("--radix-popper-anchor-width", `${Vt}px`), fe.setProperty("--radix-popper-anchor-height", `${zt}px`);
1404
- }
1405
- }),
1406
- x && uo({ element: x, padding: l }),
1407
- vo({ arrowWidth: P, arrowHeight: M }),
1408
- p && fo({ strategy: "referenceHidden", ...E })
1409
- ]
1410
- }), [_, V] = Rt(S), Be = Jt(h);
1411
- ze(() => {
1412
- L && Be?.();
1413
- }, [L, Be]);
1414
- const Nt = R.arrow?.x, Ht = R.arrow?.y, $t = R.arrow?.centerOffset !== 0, [Ft, It] = g.useState();
1415
- return ze(() => {
1416
- y && It(window.getComputedStyle(y).zIndex);
1417
- }, [y]), /* @__PURE__ */ T(
1418
- "div",
1419
- {
1420
- ref: O.setFloating,
1421
- "data-radix-popper-content-wrapper": "",
1422
- style: {
1423
- ...$,
1424
- transform: L ? $.transform : "translate(0, -200%)",
1425
- // keep off the page when measuring
1426
- minWidth: "max-content",
1427
- zIndex: Ft,
1428
- "--radix-popper-transform-origin": [
1429
- R.transformOrigin?.x,
1430
- R.transformOrigin?.y
1431
- ].join(" "),
1432
- // hide the content if using the hide middleware and should be hidden
1433
- // set visibility to hidden and disable pointer events so the UI behaves
1434
- // as if the PopperContent isn't there at all
1435
- ...R.hide?.referenceHidden && {
1436
- visibility: "hidden",
1437
- pointerEvents: "none"
1438
- }
1439
- },
1440
- dir: e.dir,
1441
- children: /* @__PURE__ */ T(
1442
- go,
1443
- {
1444
- scope: n,
1445
- placedSide: _,
1446
- onArrowChange: C,
1447
- arrowX: Nt,
1448
- arrowY: Ht,
1449
- shouldHideArrow: $t,
1450
- children: /* @__PURE__ */ T(
1451
- ce.div,
1452
- {
1453
- "data-side": _,
1454
- "data-align": V,
1455
- ...m,
1456
- ref: b,
1457
- style: {
1458
- ...m.style,
1459
- // if the PopperContent hasn't been placed yet (not all measurements done)
1460
- // we prevent animations so that users's animation don't kick in too early referring wrong sides
1461
- animation: L ? void 0 : "none"
1462
- }
1463
- }
1464
- )
1465
- }
1466
- )
1467
- }
1468
- );
1469
- }
1470
- );
1471
- bt.displayName = Fe;
1472
- var Ct = "PopperArrow", yo = {
1473
- top: "bottom",
1474
- right: "left",
1475
- bottom: "top",
1476
- left: "right"
1477
- }, At = g.forwardRef(function(t, n) {
1478
- const { __scopePopper: o, ...r } = t, i = wo(Ct, o), s = yo[i.placedSide];
1479
- return (
1480
- // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
1481
- // doesn't report size as we'd expect on SVG elements.
1482
- // it reports their bounding box which is effectively the largest path inside the SVG.
1483
- /* @__PURE__ */ T(
1484
- "span",
1485
- {
1486
- ref: i.onArrowChange,
1487
- style: {
1488
- position: "absolute",
1489
- left: i.arrowX,
1490
- top: i.arrowY,
1491
- [s]: 0,
1492
- transformOrigin: {
1493
- top: "",
1494
- right: "0 0",
1495
- bottom: "center 0",
1496
- left: "100% 0"
1497
- }[i.placedSide],
1498
- transform: {
1499
- top: "translateY(100%)",
1500
- right: "translateY(50%) rotate(90deg) translateX(-50%)",
1501
- bottom: "rotate(180deg)",
1502
- left: "translateY(50%) rotate(-90deg) translateX(50%)"
1503
- }[i.placedSide],
1504
- visibility: i.shouldHideArrow ? "hidden" : void 0
1505
- },
1506
- children: /* @__PURE__ */ T(
1507
- ho,
1508
- {
1509
- ...r,
1510
- ref: n,
1511
- style: {
1512
- ...r.style,
1513
- // ensures the element can be measured correctly (mostly for if SVG)
1514
- display: "block"
1515
- }
1516
- }
1517
- )
1518
- }
1519
- )
1520
- );
1521
- });
1522
- At.displayName = Ct;
1523
- function xo(e) {
1524
- return e !== null;
1525
- }
1526
- var vo = (e) => ({
1527
- name: "transformOrigin",
1528
- options: e,
1529
- fn(t) {
1530
- const { placement: n, rects: o, middlewareData: r } = t, s = r.arrow?.centerOffset !== 0, l = s ? 0 : e.arrowWidth, c = s ? 0 : e.arrowHeight, [f, a] = Rt(n), d = { start: "0%", center: "50%", end: "100%" }[a], p = (r.arrow?.x ?? 0) + l / 2, u = (r.arrow?.y ?? 0) + c / 2;
1531
- let h = "", m = "";
1532
- return f === "bottom" ? (h = s ? d : `${p}px`, m = `${-c}px`) : f === "top" ? (h = s ? d : `${p}px`, m = `${o.floating.height + c}px`) : f === "right" ? (h = `${-c}px`, m = s ? d : `${u}px`) : f === "left" && (h = `${o.floating.width + c}px`, m = s ? d : `${u}px`), { data: { x: h, y: m } };
1533
- }
1534
- });
1535
- function Rt(e) {
1536
- const [t, n = "center"] = e.split("-");
1537
- return [t, n];
1538
- }
1539
- var bo = yt, Co = vt, Ao = bt, Ro = At, Po = /* @__PURE__ */ Symbol("radix.slottable");
1540
- // @__NO_SIDE_EFFECTS__
1541
- function To(e) {
1542
- const t = ({ children: n }) => /* @__PURE__ */ T(Kt, { children: n });
1543
- return t.displayName = `${e}.Slottable`, t.__radixId = Po, t;
1544
- }
1545
- var Oo = Object.freeze({
1546
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
1547
- position: "absolute",
1548
- border: 0,
1549
- width: 1,
1550
- height: 1,
1551
- padding: 0,
1552
- margin: -1,
1553
- overflow: "hidden",
1554
- clip: "rect(0, 0, 0, 0)",
1555
- whiteSpace: "nowrap",
1556
- wordWrap: "normal"
1557
- }), Eo = "VisuallyHidden", Pt = g.forwardRef(
1558
- (e, t) => /* @__PURE__ */ T(
1559
- ce.span,
1560
- {
1561
- ...e,
1562
- ref: t,
1563
- style: { ...Oo, ...e.style }
1564
- }
1565
- )
1566
- );
1567
- Pt.displayName = Eo;
1568
- var So = Pt, [Ce] = tt("Tooltip", [
1569
- gt
1570
- ]), Ae = gt(), Tt = "TooltipProvider", Lo = 700, Se = "tooltip.open", [Do, Ie] = Ce(Tt), Ot = (e) => {
1571
- const {
1572
- __scopeTooltip: t,
1573
- delayDuration: n = Lo,
1574
- skipDelayDuration: o = 300,
1575
- disableHoverableContent: r = !1,
1576
- children: i
1577
- } = e, s = g.useRef(!0), l = g.useRef(!1), c = g.useRef(0);
1578
- return g.useEffect(() => {
1579
- const f = c.current;
1580
- return () => window.clearTimeout(f);
1581
- }, []), /* @__PURE__ */ T(
1582
- Do,
1583
- {
1584
- scope: t,
1585
- isOpenDelayedRef: s,
1586
- delayDuration: n,
1587
- onOpen: g.useCallback(() => {
1588
- window.clearTimeout(c.current), s.current = !1;
1589
- }, []),
1590
- onClose: g.useCallback(() => {
1591
- window.clearTimeout(c.current), c.current = window.setTimeout(
1592
- () => s.current = !0,
1593
- o
1594
- );
1595
- }, [o]),
1596
- isPointerInTransitRef: l,
1597
- onPointerInTransitChange: g.useCallback((f) => {
1598
- l.current = f;
1599
- }, []),
1600
- disableHoverableContent: r,
1601
- children: i
1602
- }
1603
- );
1604
- };
1605
- Ot.displayName = Tt;
1606
- var se = "Tooltip", [Mo, ae] = Ce(se), Et = (e) => {
1607
- const {
1608
- __scopeTooltip: t,
1609
- children: n,
1610
- open: o,
1611
- defaultOpen: r,
1612
- onOpenChange: i,
1613
- disableHoverableContent: s,
1614
- delayDuration: l
1615
- } = e, c = Ie(se, e.__scopeTooltip), f = Ae(t), [a, d] = g.useState(null), p = qt(), u = g.useRef(0), h = s ?? c.disableHoverableContent, m = l ?? c.delayDuration, w = g.useRef(!1), [y, v] = Yt({
1616
- prop: o,
1617
- defaultProp: r ?? !1,
1618
- onChange: (P) => {
1619
- P ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Se))) : c.onClose(), i?.(P);
1620
- },
1621
- caller: se
1622
- }), b = g.useMemo(() => y ? w.current ? "delayed-open" : "instant-open" : "closed", [y]), x = g.useCallback(() => {
1623
- window.clearTimeout(u.current), u.current = 0, w.current = !1, v(!0);
1624
- }, [v]), C = g.useCallback(() => {
1625
- window.clearTimeout(u.current), u.current = 0, v(!1);
1626
- }, [v]), A = g.useCallback(() => {
1627
- window.clearTimeout(u.current), u.current = window.setTimeout(() => {
1628
- w.current = !0, v(!0), u.current = 0;
1629
- }, m);
1630
- }, [m, v]);
1631
- return g.useEffect(() => () => {
1632
- u.current && (window.clearTimeout(u.current), u.current = 0);
1633
- }, []), /* @__PURE__ */ T(bo, { ...f, children: /* @__PURE__ */ T(
1634
- Mo,
1635
- {
1636
- scope: t,
1637
- contentId: p,
1638
- open: y,
1639
- stateAttribute: b,
1640
- trigger: a,
1641
- onTriggerChange: d,
1642
- onTriggerEnter: g.useCallback(() => {
1643
- c.isOpenDelayedRef.current ? A() : x();
1644
- }, [c.isOpenDelayedRef, A, x]),
1645
- onTriggerLeave: g.useCallback(() => {
1646
- h ? C() : (window.clearTimeout(u.current), u.current = 0);
1647
- }, [C, h]),
1648
- onOpen: x,
1649
- onClose: C,
1650
- disableHoverableContent: h,
1651
- children: n
1652
- }
1653
- ) });
1654
- };
1655
- Et.displayName = se;
1656
- var Le = "TooltipTrigger", St = g.forwardRef(
1657
- (e, t) => {
1658
- const { __scopeTooltip: n, ...o } = e, r = ae(Le, n), i = Ie(Le, n), s = Ae(n), l = g.useRef(null), c = we(t, l, r.onTriggerChange), f = g.useRef(!1), a = g.useRef(!1), d = g.useCallback(() => f.current = !1, []);
1659
- return g.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ T(Co, { asChild: !0, ...s, children: /* @__PURE__ */ T(
1660
- ce.button,
1661
- {
1662
- "aria-describedby": r.open ? r.contentId : void 0,
1663
- "data-state": r.stateAttribute,
1664
- ...o,
1665
- ref: c,
1666
- onPointerMove: J(e.onPointerMove, (p) => {
1667
- p.pointerType !== "touch" && !a.current && !i.isPointerInTransitRef.current && (r.onTriggerEnter(), a.current = !0);
1668
- }),
1669
- onPointerLeave: J(e.onPointerLeave, () => {
1670
- r.onTriggerLeave(), a.current = !1;
1671
- }),
1672
- onPointerDown: J(e.onPointerDown, () => {
1673
- r.open && r.onClose(), f.current = !0, document.addEventListener("pointerup", d, { once: !0 });
1674
- }),
1675
- onFocus: J(e.onFocus, () => {
1676
- f.current || r.onOpen();
1677
- }),
1678
- onBlur: J(e.onBlur, r.onClose),
1679
- onClick: J(e.onClick, r.onClose)
1680
- }
1681
- ) });
1682
- }
1683
- );
1684
- St.displayName = Le;
1685
- var We = "TooltipPortal", [_o, ko] = Ce(We, {
1686
- forceMount: void 0
1687
- }), Lt = (e) => {
1688
- const { __scopeTooltip: t, forceMount: n, children: o, container: r } = e, i = ae(We, t);
1689
- return /* @__PURE__ */ T(_o, { scope: t, forceMount: n, children: /* @__PURE__ */ T(nt, { present: n || i.open, children: /* @__PURE__ */ T(Gt, { asChild: !0, container: r, children: o }) }) });
1690
- };
1691
- Lt.displayName = We;
1692
- var te = "TooltipContent", Dt = g.forwardRef(
1693
- (e, t) => {
1694
- const n = ko(te, e.__scopeTooltip), { forceMount: o = n.forceMount, side: r = "top", ...i } = e, s = ae(te, e.__scopeTooltip);
1695
- return /* @__PURE__ */ T(nt, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ T(Mt, { side: r, ...i, ref: t }) : /* @__PURE__ */ T(No, { side: r, ...i, ref: t }) });
1696
- }
1697
- ), No = g.forwardRef((e, t) => {
1698
- const n = ae(te, e.__scopeTooltip), o = Ie(te, e.__scopeTooltip), r = g.useRef(null), i = we(t, r), [s, l] = g.useState(null), { trigger: c, onClose: f } = n, a = r.current, { onPointerInTransitChange: d } = o, p = g.useCallback(() => {
1699
- l(null), d(!1);
1700
- }, [d]), u = g.useCallback(
1701
- (h, m) => {
1702
- const w = h.currentTarget, y = { x: h.clientX, y: h.clientY }, v = Io(y, w.getBoundingClientRect()), b = Wo(y, v), x = Bo(m.getBoundingClientRect()), C = zo([...b, ...x]);
1703
- l(C), d(!0);
1704
- },
1705
- [d]
1706
- );
1707
- return g.useEffect(() => () => p(), [p]), g.useEffect(() => {
1708
- if (c && a) {
1709
- const h = (w) => u(w, a), m = (w) => u(w, c);
1710
- return c.addEventListener("pointerleave", h), a.addEventListener("pointerleave", m), () => {
1711
- c.removeEventListener("pointerleave", h), a.removeEventListener("pointerleave", m);
1712
- };
1713
- }
1714
- }, [c, a, u, p]), g.useEffect(() => {
1715
- if (s) {
1716
- const h = (m) => {
1717
- const w = m.target, y = { x: m.clientX, y: m.clientY }, v = c?.contains(w) || a?.contains(w), b = !Vo(y, s);
1718
- v ? p() : b && (p(), f());
1719
- };
1720
- return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
1721
- }
1722
- }, [c, a, s, f, p]), /* @__PURE__ */ T(Mt, { ...e, ref: i });
1723
- }), [Ho, $o] = Ce(se, { isInside: !1 }), Fo = /* @__PURE__ */ To("TooltipContent"), Mt = g.forwardRef(
1724
- (e, t) => {
1725
- const {
1726
- __scopeTooltip: n,
1727
- children: o,
1728
- "aria-label": r,
1729
- onEscapeKeyDown: i,
1730
- onPointerDownOutside: s,
1731
- ...l
1732
- } = e, c = ae(te, n), f = Ae(n), { onClose: a } = c;
1733
- return g.useEffect(() => (document.addEventListener(Se, a), () => document.removeEventListener(Se, a)), [a]), g.useEffect(() => {
1734
- if (c.trigger) {
1735
- const d = (p) => {
1736
- p.target?.contains(c.trigger) && a();
1737
- };
1738
- return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
1739
- }
1740
- }, [c.trigger, a]), /* @__PURE__ */ T(
1741
- Xt,
1742
- {
1743
- asChild: !0,
1744
- disableOutsidePointerEvents: !1,
1745
- onEscapeKeyDown: i,
1746
- onPointerDownOutside: s,
1747
- onFocusOutside: (d) => d.preventDefault(),
1748
- onDismiss: a,
1749
- children: /* @__PURE__ */ Zt(
1750
- Ao,
1751
- {
1752
- "data-state": c.stateAttribute,
1753
- ...f,
1754
- ...l,
1755
- ref: t,
1756
- style: {
1757
- ...l.style,
1758
- "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
1759
- "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
1760
- "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
1761
- "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
1762
- "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
1763
- },
1764
- children: [
1765
- /* @__PURE__ */ T(Fo, { children: o }),
1766
- /* @__PURE__ */ T(Ho, { scope: n, isInside: !0, children: /* @__PURE__ */ T(So, { id: c.contentId, role: "tooltip", children: r || o }) })
1767
- ]
1768
- }
1769
- )
1770
- }
1771
- );
1772
- }
1773
- );
1774
- Dt.displayName = te;
1775
- var _t = "TooltipArrow", kt = g.forwardRef(
1776
- (e, t) => {
1777
- const { __scopeTooltip: n, ...o } = e, r = Ae(n);
1778
- return $o(
1779
- _t,
1780
- n
1781
- ).isInside ? null : /* @__PURE__ */ T(Ro, { ...r, ...o, ref: t });
1782
- }
1783
- );
1784
- kt.displayName = _t;
1785
- function Io(e, t) {
1786
- const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), r = Math.abs(t.right - e.x), i = Math.abs(t.left - e.x);
1787
- switch (Math.min(n, o, r, i)) {
1788
- case i:
1789
- return "left";
1790
- case r:
1791
- return "right";
1792
- case n:
1793
- return "top";
1794
- case o:
1795
- return "bottom";
1796
- default:
1797
- throw new Error("unreachable");
1798
- }
1799
- }
1800
- function Wo(e, t, n = 5) {
1801
- const o = [];
1802
- switch (t) {
1803
- case "top":
1804
- o.push(
1805
- { x: e.x - n, y: e.y + n },
1806
- { x: e.x + n, y: e.y + n }
1807
- );
1808
- break;
1809
- case "bottom":
1810
- o.push(
1811
- { x: e.x - n, y: e.y - n },
1812
- { x: e.x + n, y: e.y - n }
1813
- );
1814
- break;
1815
- case "left":
1816
- o.push(
1817
- { x: e.x + n, y: e.y - n },
1818
- { x: e.x + n, y: e.y + n }
1819
- );
1820
- break;
1821
- case "right":
1822
- o.push(
1823
- { x: e.x - n, y: e.y - n },
1824
- { x: e.x - n, y: e.y + n }
1825
- );
1826
- break;
1827
- }
1828
- return o;
1829
- }
1830
- function Bo(e) {
1831
- const { top: t, right: n, bottom: o, left: r } = e;
1832
- return [
1833
- { x: r, y: t },
1834
- { x: n, y: t },
1835
- { x: n, y: o },
1836
- { x: r, y: o }
1837
- ];
1838
- }
1839
- function Vo(e, t) {
1840
- const { x: n, y: o } = e;
1841
- let r = !1;
1842
- for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
1843
- const l = t[i], c = t[s], f = l.x, a = l.y, d = c.x, p = c.y;
1844
- a > o != p > o && n < (d - f) * (o - a) / (p - a) + f && (r = !r);
1845
- }
1846
- return r;
1847
- }
1848
- function zo(e) {
1849
- const t = e.slice();
1850
- return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), jo(t);
1851
- }
1852
- function jo(e) {
1853
- if (e.length <= 1) return e.slice();
1854
- const t = [];
1855
- for (let o = 0; o < e.length; o++) {
1856
- const r = e[o];
1857
- for (; t.length >= 2; ) {
1858
- const i = t[t.length - 1], s = t[t.length - 2];
1859
- if ((i.x - s.x) * (r.y - s.y) >= (i.y - s.y) * (r.x - s.x)) t.pop();
1860
- else break;
1861
- }
1862
- t.push(r);
1863
- }
1864
- t.pop();
1865
- const n = [];
1866
- for (let o = e.length - 1; o >= 0; o--) {
1867
- const r = e[o];
1868
- for (; n.length >= 2; ) {
1869
- const i = n[n.length - 1], s = n[n.length - 2];
1870
- if ((i.x - s.x) * (r.y - s.y) >= (i.y - s.y) * (r.x - s.x)) n.pop();
1871
- else break;
1872
- }
1873
- n.push(r);
1874
- }
1875
- return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
1876
- }
1877
- var er = Ot, tr = Et, nr = St, or = Lt, rr = Dt, ir = kt;
1878
- export {
1879
- ir as A,
1880
- rr as C,
1881
- er as P,
1882
- tr as R,
1883
- nr as T,
1884
- or as a
1885
- };