@overmap-ai/blocks 1.0.31-minimize-size.7 → 1.0.31-tailwind-components.1

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 (221) hide show
  1. package/README.md +3 -3
  2. package/dist/AlertDialog/Content.d.ts +7 -0
  3. package/dist/AlertDialog/Provider.d.ts +2 -0
  4. package/dist/AlertDialog/context.d.ts +5 -0
  5. package/dist/AlertDialog/cva.d.ts +4 -0
  6. package/dist/AlertDialog/hooks.d.ts +1 -0
  7. package/dist/AlertDialog/index.d.ts +14 -0
  8. package/dist/AlertDialog/typings.d.ts +19 -0
  9. package/dist/Avatar/Fallback.d.ts +5 -0
  10. package/dist/Avatar/Image.d.ts +5 -0
  11. package/dist/Avatar/Root.d.ts +7 -0
  12. package/dist/Avatar/context.d.ts +7 -0
  13. package/dist/Avatar/cva.d.ts +6 -0
  14. package/dist/Avatar/index.d.ts +9 -0
  15. package/dist/Avatar/typings.d.ts +12 -0
  16. package/dist/Badge/Badge.d.ts +6 -6
  17. package/dist/Badge/cva.d.ts +5 -0
  18. package/dist/Badge/index.d.ts +1 -0
  19. package/dist/Badge/typings.d.ts +12 -7
  20. package/dist/ButtonGroup/ButtonGroup.d.ts +9 -7
  21. package/dist/ButtonGroup/context.d.ts +10 -4
  22. package/dist/ButtonGroup/index.d.ts +1 -2
  23. package/dist/Buttons/Button.d.ts +6 -4
  24. package/dist/Buttons/IconButton.d.ts +5 -7
  25. package/dist/Buttons/cva.d.ts +5 -0
  26. package/dist/Buttons/index.d.ts +4 -4
  27. package/dist/Buttons/typings.d.ts +11 -24
  28. package/dist/Checkbox/Indicator.d.ts +5 -0
  29. package/dist/Checkbox/Root.d.ts +7 -0
  30. package/dist/Checkbox/cva.d.ts +4 -0
  31. package/dist/Checkbox/index.d.ts +7 -3
  32. package/dist/Checkbox/typings.d.ts +11 -15
  33. package/dist/CollapsibleTree/context.d.ts +1 -4
  34. package/dist/CollapsibleTree/typings.d.ts +3 -16
  35. package/dist/Dialog/Content.d.ts +11 -0
  36. package/dist/Dialog/Root.d.ts +2 -0
  37. package/dist/Dialog/context.d.ts +3 -0
  38. package/dist/Dialog/hooks.d.ts +1 -0
  39. package/dist/Dialog/index.d.ts +11 -0
  40. package/dist/Dialog/typings.d.ts +17 -0
  41. package/dist/HoverCard/Arrow.d.ts +5 -0
  42. package/dist/HoverCard/Content.d.ts +8 -0
  43. package/dist/HoverCard/cva.d.ts +3 -0
  44. package/dist/HoverCard/index.d.ts +10 -0
  45. package/dist/HoverCard/typings.d.ts +10 -0
  46. package/dist/HoverUtility/HoverUtility.d.ts +1 -0
  47. package/dist/Input/Field.d.ts +4 -0
  48. package/dist/Input/Root.d.ts +6 -0
  49. package/dist/Input/Slot.d.ts +4 -0
  50. package/dist/Input/context.d.ts +8 -0
  51. package/dist/Input/cva.d.ts +12 -0
  52. package/dist/Input/index.d.ts +9 -2
  53. package/dist/Input/typings.d.ts +10 -12
  54. package/dist/Layout/Container.d.ts +3 -4
  55. package/dist/Layout/SlideOutOverlay.d.ts +2 -3
  56. package/dist/Layout/index.d.ts +3 -3
  57. package/dist/OvermapMenu/ClickTrigger/index.d.ts +1 -1
  58. package/dist/OvermapMenu/Content/Content.d.ts +1 -1
  59. package/dist/OvermapMenu/Content/context.d.ts +7 -1
  60. package/dist/OvermapMenu/Input/Field.d.ts +3 -0
  61. package/dist/OvermapMenu/Input/Root.d.ts +4 -0
  62. package/dist/OvermapMenu/Input/Slot.d.ts +5 -0
  63. package/dist/OvermapMenu/Input/index.d.ts +3 -1
  64. package/dist/OvermapMenu/Pages/index.d.ts +1 -1
  65. package/dist/OvermapMenu/SelectAll/SelectAllIndicator.d.ts +6 -0
  66. package/dist/OvermapMenu/SelectAll/SelectAllItem.d.ts +3 -0
  67. package/dist/OvermapMenu/SelectAll/context.d.ts +6 -0
  68. package/dist/OvermapMenu/SelectAll/index.d.ts +2 -0
  69. package/dist/OvermapMenu/SelectedIndicator/index.d.ts +1 -1
  70. package/dist/OvermapMenu/Separator/Separator.d.ts +1 -1
  71. package/dist/OvermapMenu/Sub/context.d.ts +1 -1
  72. package/dist/OvermapMenu/Sub/index.d.ts +1 -1
  73. package/dist/OvermapMenu/SubTrigger/index.d.ts +1 -1
  74. package/dist/OvermapMenu/cva.d.ts +20 -0
  75. package/dist/OvermapMenu/root/context.d.ts +1 -4
  76. package/dist/OvermapMenu/root/index.d.ts +1 -1
  77. package/dist/OvermapMenu/typings.d.ts +30 -20
  78. package/dist/Popover/Arrow.d.ts +5 -0
  79. package/dist/Popover/Content.d.ts +8 -0
  80. package/dist/Popover/cva.d.ts +3 -0
  81. package/dist/Popover/index.d.ts +19 -2
  82. package/dist/Popover/typings.d.ts +8 -17
  83. package/dist/Provider/Provider.d.ts +8 -0
  84. package/dist/Provider/context.d.ts +8 -0
  85. package/dist/Provider/index.d.ts +3 -0
  86. package/dist/Provider/typings.d.ts +1 -0
  87. package/dist/RadioGroup/Indicator.d.ts +5 -0
  88. package/dist/RadioGroup/Item.d.ts +6 -0
  89. package/dist/RadioGroup/Root.d.ts +7 -0
  90. package/dist/RadioGroup/context.d.ts +7 -0
  91. package/dist/RadioGroup/cva.d.ts +4 -0
  92. package/dist/RadioGroup/index.d.ts +9 -0
  93. package/dist/RadioGroup/typings.d.ts +10 -0
  94. package/dist/RiIcon/RiIcon.d.ts +4 -5
  95. package/dist/RiIcon/index.d.ts +0 -2
  96. package/dist/SelectContext/index.d.ts +1 -1
  97. package/dist/Separator/Separator.d.ts +8 -3
  98. package/dist/Separator/cva.d.ts +5 -0
  99. package/dist/Separator/index.d.ts +0 -1
  100. package/dist/Separator/typings.d.ts +11 -19
  101. package/dist/SlideOut/SlideOutV2.d.ts +1 -3
  102. package/dist/TextArea/TextArea.d.ts +6 -7
  103. package/dist/TextArea/cva.d.ts +5 -0
  104. package/dist/TextArea/typings.d.ts +13 -15
  105. package/dist/Toast/cva.d.ts +4 -0
  106. package/dist/Toast/typings.d.ts +13 -10
  107. package/dist/ToggleButton/BaseToggleButton.d.ts +3 -0
  108. package/dist/ToggleButton/IconToggleButton.d.ts +3 -0
  109. package/dist/ToggleButton/ToggleButton.d.ts +2 -7
  110. package/dist/ToggleButton/cva.d.ts +5 -0
  111. package/dist/ToggleButton/index.d.ts +2 -0
  112. package/dist/ToggleButton/typings.d.ts +18 -0
  113. package/dist/Tooltip/Arrow.d.ts +5 -0
  114. package/dist/Tooltip/Content.d.ts +8 -0
  115. package/dist/Tooltip/cva.d.ts +4 -0
  116. package/dist/Tooltip/index.d.ts +11 -1
  117. package/dist/Tooltip/typings.d.ts +10 -0
  118. package/dist/blocks.js +3093 -4029
  119. package/dist/blocks.js.map +1 -1
  120. package/dist/blocks.umd.cjs +3365 -19
  121. package/dist/blocks.umd.cjs.map +1 -1
  122. package/dist/constants.d.ts +1 -2
  123. package/dist/cva/floating.d.ts +6 -0
  124. package/dist/cva/index.d.ts +2 -0
  125. package/dist/cva/radius.d.ts +4 -0
  126. package/dist/index.d.ts +17 -35
  127. package/dist/typings.d.ts +3 -3
  128. package/dist/utils.d.ts +2 -27
  129. package/package.json +66 -42
  130. package/dist/Breadcrumb/Breadcrumb.d.ts +0 -27
  131. package/dist/Breadcrumb/context.d.ts +0 -10
  132. package/dist/Breadcrumb/index.d.ts +0 -2
  133. package/dist/ButtonGroup/ButtonList.d.ts +0 -25
  134. package/dist/ButtonGroup/typings.d.ts +0 -37
  135. package/dist/Buttons/constants.d.ts +0 -9
  136. package/dist/Checkbox/Checkbox.d.ts +0 -3
  137. package/dist/Checkbox/SelectAllCheckbox.d.ts +0 -3
  138. package/dist/ConfirmEditInput/ConfirmEditInput.d.ts +0 -3
  139. package/dist/ConfirmEditInput/index.d.ts +0 -2
  140. package/dist/ConfirmEditInput/typings.d.ts +0 -15
  141. package/dist/Dialogs/AlertDialog/AlertDialog.d.ts +0 -11
  142. package/dist/Dialogs/AlertDialog/AlertDialogContent.d.ts +0 -4
  143. package/dist/Dialogs/AlertDialog/context.d.ts +0 -8
  144. package/dist/Dialogs/AlertDialog/hooks.d.ts +0 -7
  145. package/dist/Dialogs/AlertDialog/index.d.ts +0 -3
  146. package/dist/Dialogs/AlertDialog/typings.d.ts +0 -49
  147. package/dist/Dialogs/BaseDialog/BaseDialog.d.ts +0 -3
  148. package/dist/Dialogs/BaseDialog/index.d.ts +0 -2
  149. package/dist/Dialogs/BaseDialog/typings.d.ts +0 -31
  150. package/dist/Dialogs/Dialog/Dialog.d.ts +0 -7
  151. package/dist/Dialogs/Dialog/DialogContent.d.ts +0 -3
  152. package/dist/Dialogs/Dialog/index.d.ts +0 -3
  153. package/dist/Dialogs/Dialog/typings.d.ts +0 -40
  154. package/dist/Dialogs/Dialog/utils.d.ts +0 -7
  155. package/dist/Dialogs/Overlay/Overlay.d.ts +0 -7
  156. package/dist/Dialogs/Overlay/index.d.ts +0 -1
  157. package/dist/Dialogs/index.d.ts +0 -4
  158. package/dist/Dialogs/typings.d.ts +0 -7
  159. package/dist/DownloadButtonUtility/DownloadButtonUtility.d.ts +0 -7
  160. package/dist/DownloadButtonUtility/index.d.ts +0 -1
  161. package/dist/Flex/Flex.d.ts +0 -17
  162. package/dist/Flex/index.d.ts +0 -1
  163. package/dist/IconColorUtility/IconColorUtility.d.ts +0 -17
  164. package/dist/IconColorUtility/index.d.ts +0 -1
  165. package/dist/Input/Input.d.ts +0 -3
  166. package/dist/ItemStack/Group.d.ts +0 -9
  167. package/dist/ItemStack/Item.d.ts +0 -4
  168. package/dist/LeftAndRightPanels/LeftAndRightPanels.d.ts +0 -34
  169. package/dist/LeftAndRightPanels/index.d.ts +0 -1
  170. package/dist/MultiPagePopover/MultiPagePopover.d.ts +0 -3
  171. package/dist/MultiPagePopover/index.d.ts +0 -1
  172. package/dist/MultiPagePopover/typings.d.ts +0 -21
  173. package/dist/MultiSelect/MultiSelect.d.ts +0 -28
  174. package/dist/MultiSelect/MultiSelectItem.d.ts +0 -14
  175. package/dist/MultiSelect/index.d.ts +0 -1
  176. package/dist/OvermapDropdownMenu/DropdownMenu.d.ts +0 -8
  177. package/dist/OvermapDropdownMenu/index.d.ts +0 -1
  178. package/dist/OvermapDropdownMultiSelect/DropdownMultiSelect.d.ts +0 -8
  179. package/dist/OvermapDropdownMultiSelect/index.d.ts +0 -1
  180. package/dist/OvermapDropdownSelect/DropdownSelect.d.ts +0 -8
  181. package/dist/OvermapDropdownSelect/index.d.ts +0 -1
  182. package/dist/OvermapInputItem/OvermapInputItem.d.ts +0 -6
  183. package/dist/OvermapInputItem/index.d.ts +0 -2
  184. package/dist/OvermapInputItem/typings.d.ts +0 -4
  185. package/dist/OvermapItem/OvermapItem.d.ts +0 -5
  186. package/dist/OvermapItem/constants.d.ts +0 -2
  187. package/dist/OvermapItem/index.d.ts +0 -2
  188. package/dist/OvermapItem/typings.d.ts +0 -24
  189. package/dist/OvermapItemGroup/OvermapItemGroup.d.ts +0 -3
  190. package/dist/OvermapItemGroup/context.d.ts +0 -9
  191. package/dist/OvermapItemGroup/index.d.ts +0 -3
  192. package/dist/OvermapItemGroup/typings.d.ts +0 -6
  193. package/dist/OvermapMenu/Input/Input.d.ts +0 -3
  194. package/dist/OvermapMenu/Scroll/Scroll.d.ts +0 -2
  195. package/dist/OvermapMenu/Scroll/index.d.ts +0 -1
  196. package/dist/OvermapMenu/index.d.ts +0 -29
  197. package/dist/Popover/Popover.d.ts +0 -3
  198. package/dist/RiIcon/constants.d.ts +0 -138
  199. package/dist/RiIcon/typings.d.ts +0 -2
  200. package/dist/Select/Select.d.ts +0 -3
  201. package/dist/Select/index.d.ts +0 -2
  202. package/dist/Select/typings.d.ts +0 -22
  203. package/dist/Sidebar/Sidebar.d.ts +0 -30
  204. package/dist/Sidebar/index.d.ts +0 -1
  205. package/dist/Switch/Switch.d.ts +0 -7
  206. package/dist/Switch/index.d.ts +0 -2
  207. package/dist/Switch/typings.d.ts +0 -13
  208. package/dist/Table/Table.d.ts +0 -3
  209. package/dist/Table/index.d.ts +0 -2
  210. package/dist/Table/typings.d.ts +0 -70
  211. package/dist/Text/Text.d.ts +0 -24
  212. package/dist/Text/index.d.ts +0 -1
  213. package/dist/Theme/DefaultTheme.d.ts +0 -4
  214. package/dist/Theme/index.d.ts +0 -2
  215. package/dist/ToggleGroup/ToggleGroup.d.ts +0 -7
  216. package/dist/ToggleGroup/index.d.ts +0 -2
  217. package/dist/ToggleGroup/typings.d.ts +0 -7
  218. package/dist/Toolbar/Toolbar.d.ts +0 -23
  219. package/dist/Toolbar/index.d.ts +0 -1
  220. package/dist/Tooltip/Tooltip.d.ts +0 -6
  221. package/dist/style.css +0 -1
@@ -1,20 +1,3366 @@
1
- (function(a,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("@radix-ui/themes"),require("react"),require("react-responsive"),require("@react-hook/resize-observer"),require("@react-icons/all-files/ri/RiAccountBoxLine"),require("@react-icons/all-files/ri/RiAddLine"),require("@react-icons/all-files/ri/RiAlertLine"),require("@react-icons/all-files/ri/RiArrowDownSLine"),require("@react-icons/all-files/ri/RiArrowLeftDoubleLine"),require("@react-icons/all-files/ri/RiArrowLeftLine"),require("@react-icons/all-files/ri/RiArrowLeftSLine"),require("@react-icons/all-files/ri/RiArrowRightDoubleLine"),require("@react-icons/all-files/ri/RiArrowRightLine"),require("@react-icons/all-files/ri/RiArrowRightSLine"),require("@react-icons/all-files/ri/RiArrowUpLine"),require("@react-icons/all-files/ri/RiArrowUpSLine"),require("@react-icons/all-files/ri/RiArticleFill"),require("@react-icons/all-files/ri/RiAttachment2"),require("@react-icons/all-files/ri/RiBankCardFill"),require("@react-icons/all-files/ri/RiBarChartFill"),require("@react-icons/all-files/ri/RiBardFill"),require("@react-icons/all-files/ri/RiBold"),require("@react-icons/all-files/ri/RiBugLine"),require("@react-icons/all-files/ri/RiBuilding2Fill"),require("@react-icons/all-files/ri/RiCalendarEventFill"),require("@react-icons/all-files/ri/RiCalendarFill"),require("@react-icons/all-files/ri/RiCheckLine"),require("@react-icons/all-files/ri/RiCheckboxBlankFill"),require("@react-icons/all-files/ri/RiCircleFill"),require("@react-icons/all-files/ri/RiCircleLine"),require("@react-icons/all-files/ri/RiCloseLargeLine"),require("@react-icons/all-files/ri/RiCloseLine"),require("@react-icons/all-files/ri/RiColorFilterFill"),require("@react-icons/all-files/ri/RiCommunityLine"),require("@react-icons/all-files/ri/RiDeleteBin2Line"),require("@react-icons/all-files/ri/RiDeleteBin7Fill"),require("@react-icons/all-files/ri/RiDeleteBin7Line"),require("@react-icons/all-files/ri/RiDownload2Line"),require("@react-icons/all-files/ri/RiDraggable"),require("@react-icons/all-files/ri/RiEqualizerFill"),require("@react-icons/all-files/ri/RiEqualizerLine"),require("@react-icons/all-files/ri/RiErrorWarningLine"),require("@react-icons/all-files/ri/RiExpandDiagonalFill"),require("@react-icons/all-files/ri/RiExpandDiagonalLine"),require("@react-icons/all-files/ri/RiExportFill"),require("@react-icons/all-files/ri/RiExpandUpDownLine"),require("@react-icons/all-files/ri/RiExternalLinkFill"),require("@react-icons/all-files/ri/RiExternalLinkLine"),require("@react-icons/all-files/ri/RiFile3Fill"),require("@react-icons/all-files/ri/RiFileCopyFill"),require("@react-icons/all-files/ri/RiFileCopyLine"),require("@react-icons/all-files/ri/RiFileTextFill"),require("@react-icons/all-files/ri/RiFilter3Line"),require("@react-icons/all-files/ri/RiFunctionFill"),require("@react-icons/all-files/ri/RiHome2Line"),require("@react-icons/all-files/ri/RiHomeLine"),require("@react-icons/all-files/ri/RiImportFill"),require("@react-icons/all-files/ri/RiInformationLine"),require("@react-icons/all-files/ri/RiInstanceLine"),require("@react-icons/all-files/ri/RiLayoutColumnLine"),require("@react-icons/all-files/ri/RiLayoutLeftLine"),require("@react-icons/all-files/ri/RiLayoutRightLine"),require("@react-icons/all-files/ri/RiLink"),require("@react-icons/all-files/ri/RiLinkUnlink"),require("@react-icons/all-files/ri/RiLoginBoxLine"),require("@react-icons/all-files/ri/RiLogoutBoxLine"),require("@react-icons/all-files/ri/RiLoopLeftLine"),require("@react-icons/all-files/ri/RiMapPin5Fill"),require("@react-icons/all-files/ri/RiMarkupFill"),require("@react-icons/all-files/ri/RiMenuLine"),require("@react-icons/all-files/ri/RiMoonFill"),require("@react-icons/all-files/ri/RiMore2Fill"),require("@react-icons/all-files/ri/RiMoreFill"),require("@react-icons/all-files/ri/RiMusic2Fill"),require("@react-icons/all-files/ri/RiPencilFill"),require("@react-icons/all-files/ri/RiPencilLine"),require("@react-icons/all-files/ri/RiPlayFill"),require("@react-icons/all-files/ri/RiQuestionLine"),require("@react-icons/all-files/ri/RiQuestionMark"),require("@react-icons/all-files/ri/RiRoadMapFill"),require("@react-icons/all-files/ri/RiSearchLine"),require("@react-icons/all-files/ri/RiSettings2Line"),require("@react-icons/all-files/ri/RiSquareFill"),require("@react-icons/all-files/ri/RiSquareLine"),require("@react-icons/all-files/ri/RiStarLine"),require("@react-icons/all-files/ri/RiSubtractLine"),require("@react-icons/all-files/ri/RiSunFill"),require("@react-icons/all-files/ri/RiThumbDownFill"),require("@react-icons/all-files/ri/RiThumbDownLine"),require("@react-icons/all-files/ri/RiThumbUpFill"),require("@react-icons/all-files/ri/RiThumbUpLine"),require("@react-icons/all-files/ri/RiUploadLine"),require("@react-icons/all-files/ri/RiUser2Fill"),require("@react-icons/all-files/ri/RiUser3Fill"),require("@react-icons/all-files/ri/RiUserAddFill"),require("@react-icons/all-files/ri/RiUserLine"),require("@react-icons/all-files/ri/RiListUnordered"),require("@react-icons/all-files/ri/RiListCheck"),require("@react-icons/all-files/ri/RiListOrdered"),require("@react-icons/all-files/ri/RiTableView"),require("@react-icons/all-files/ri/RiRefreshLine"),require("@react-icons/all-files/ri/RiArrowDownSFill"),require("@react-icons/all-files/ri/RiItalic"),require("@react-icons/all-files/ri/RiStrikethrough"),require("@react-icons/all-files/ri/RiUnderline"),require("@react-icons/all-files/ri/RiQuoteText"),require("@react-icons/all-files/ri/RiFontColor"),require("@react-icons/all-files/ri/RiMarkPenFill"),require("@react-icons/all-files/ri/RiDragDropLine"),require("@react-icons/all-files/ri/RiNavigationFill"),require("@react-icons/all-files/ri/RiEyeOffFill"),require("@react-icons/all-files/ri/RiCloseCircleFill"),require("@react-icons/all-files/ri/RiDragMoveFill"),require("@react-icons/all-files/ri/RiMapPin2Fill"),require("@react-icons/all-files/ri/RiH1"),require("@react-icons/all-files/ri/RiH2"),require("@react-icons/all-files/ri/RiH3"),require("@react-icons/all-files/ri/RiSeparator"),require("@react-icons/all-files/ri/RiUserForbidFill"),require("@react-icons/all-files/ri/RiArrowGoBackLine"),require("@react-icons/all-files/ri/RiFileCopy2Line"),require("@react-icons/all-files/ri/RiArrowDropDownLine"),require("@react-icons/all-files/ri/RiTimeLine"),require("@react-icons/all-files/ri/RiFocus3Line"),require("@react-icons/all-files/ri/RiArrowUpSFill"),require("@react-icons/all-files/ri/RiRestartLine"),require("@react-icons/all-files/ri/RiFolder2Fill"),require("@react-icons/all-files/ri/RiKey2Fill"),require("@react-icons/all-files/ri/RiArrowDownLine"),require("@react-icons/all-files/ri/RiCompass3Fill"),require("@radix-ui/react-dialog"),require("@radix-ui/react-collapsible"),require("@radix-ui/react-slot"),require("react-device-detect"),require("re-resizable"),require("react-transition-group"),require("react-dom"),require("@radix-ui/react-dismissable-layer"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toolbar"),require("@radix-ui/react-toast"),require("@radix-ui/react-toggle"),require("react-error-boundary"),require("@floating-ui/react"),require("@table-library/react-table-library/table.js"),require("@table-library/react-table-library/theme.js"),require("@table-library/react-table-library/sort.js"),require("@table-library/react-table-library/select.js"),require("@table-library/react-table-library/pagination.js")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/themes","react","react-responsive","@react-hook/resize-observer","@react-icons/all-files/ri/RiAccountBoxLine","@react-icons/all-files/ri/RiAddLine","@react-icons/all-files/ri/RiAlertLine","@react-icons/all-files/ri/RiArrowDownSLine","@react-icons/all-files/ri/RiArrowLeftDoubleLine","@react-icons/all-files/ri/RiArrowLeftLine","@react-icons/all-files/ri/RiArrowLeftSLine","@react-icons/all-files/ri/RiArrowRightDoubleLine","@react-icons/all-files/ri/RiArrowRightLine","@react-icons/all-files/ri/RiArrowRightSLine","@react-icons/all-files/ri/RiArrowUpLine","@react-icons/all-files/ri/RiArrowUpSLine","@react-icons/all-files/ri/RiArticleFill","@react-icons/all-files/ri/RiAttachment2","@react-icons/all-files/ri/RiBankCardFill","@react-icons/all-files/ri/RiBarChartFill","@react-icons/all-files/ri/RiBardFill","@react-icons/all-files/ri/RiBold","@react-icons/all-files/ri/RiBugLine","@react-icons/all-files/ri/RiBuilding2Fill","@react-icons/all-files/ri/RiCalendarEventFill","@react-icons/all-files/ri/RiCalendarFill","@react-icons/all-files/ri/RiCheckLine","@react-icons/all-files/ri/RiCheckboxBlankFill","@react-icons/all-files/ri/RiCircleFill","@react-icons/all-files/ri/RiCircleLine","@react-icons/all-files/ri/RiCloseLargeLine","@react-icons/all-files/ri/RiCloseLine","@react-icons/all-files/ri/RiColorFilterFill","@react-icons/all-files/ri/RiCommunityLine","@react-icons/all-files/ri/RiDeleteBin2Line","@react-icons/all-files/ri/RiDeleteBin7Fill","@react-icons/all-files/ri/RiDeleteBin7Line","@react-icons/all-files/ri/RiDownload2Line","@react-icons/all-files/ri/RiDraggable","@react-icons/all-files/ri/RiEqualizerFill","@react-icons/all-files/ri/RiEqualizerLine","@react-icons/all-files/ri/RiErrorWarningLine","@react-icons/all-files/ri/RiExpandDiagonalFill","@react-icons/all-files/ri/RiExpandDiagonalLine","@react-icons/all-files/ri/RiExportFill","@react-icons/all-files/ri/RiExpandUpDownLine","@react-icons/all-files/ri/RiExternalLinkFill","@react-icons/all-files/ri/RiExternalLinkLine","@react-icons/all-files/ri/RiFile3Fill","@react-icons/all-files/ri/RiFileCopyFill","@react-icons/all-files/ri/RiFileCopyLine","@react-icons/all-files/ri/RiFileTextFill","@react-icons/all-files/ri/RiFilter3Line","@react-icons/all-files/ri/RiFunctionFill","@react-icons/all-files/ri/RiHome2Line","@react-icons/all-files/ri/RiHomeLine","@react-icons/all-files/ri/RiImportFill","@react-icons/all-files/ri/RiInformationLine","@react-icons/all-files/ri/RiInstanceLine","@react-icons/all-files/ri/RiLayoutColumnLine","@react-icons/all-files/ri/RiLayoutLeftLine","@react-icons/all-files/ri/RiLayoutRightLine","@react-icons/all-files/ri/RiLink","@react-icons/all-files/ri/RiLinkUnlink","@react-icons/all-files/ri/RiLoginBoxLine","@react-icons/all-files/ri/RiLogoutBoxLine","@react-icons/all-files/ri/RiLoopLeftLine","@react-icons/all-files/ri/RiMapPin5Fill","@react-icons/all-files/ri/RiMarkupFill","@react-icons/all-files/ri/RiMenuLine","@react-icons/all-files/ri/RiMoonFill","@react-icons/all-files/ri/RiMore2Fill","@react-icons/all-files/ri/RiMoreFill","@react-icons/all-files/ri/RiMusic2Fill","@react-icons/all-files/ri/RiPencilFill","@react-icons/all-files/ri/RiPencilLine","@react-icons/all-files/ri/RiPlayFill","@react-icons/all-files/ri/RiQuestionLine","@react-icons/all-files/ri/RiQuestionMark","@react-icons/all-files/ri/RiRoadMapFill","@react-icons/all-files/ri/RiSearchLine","@react-icons/all-files/ri/RiSettings2Line","@react-icons/all-files/ri/RiSquareFill","@react-icons/all-files/ri/RiSquareLine","@react-icons/all-files/ri/RiStarLine","@react-icons/all-files/ri/RiSubtractLine","@react-icons/all-files/ri/RiSunFill","@react-icons/all-files/ri/RiThumbDownFill","@react-icons/all-files/ri/RiThumbDownLine","@react-icons/all-files/ri/RiThumbUpFill","@react-icons/all-files/ri/RiThumbUpLine","@react-icons/all-files/ri/RiUploadLine","@react-icons/all-files/ri/RiUser2Fill","@react-icons/all-files/ri/RiUser3Fill","@react-icons/all-files/ri/RiUserAddFill","@react-icons/all-files/ri/RiUserLine","@react-icons/all-files/ri/RiListUnordered","@react-icons/all-files/ri/RiListCheck","@react-icons/all-files/ri/RiListOrdered","@react-icons/all-files/ri/RiTableView","@react-icons/all-files/ri/RiRefreshLine","@react-icons/all-files/ri/RiArrowDownSFill","@react-icons/all-files/ri/RiItalic","@react-icons/all-files/ri/RiStrikethrough","@react-icons/all-files/ri/RiUnderline","@react-icons/all-files/ri/RiQuoteText","@react-icons/all-files/ri/RiFontColor","@react-icons/all-files/ri/RiMarkPenFill","@react-icons/all-files/ri/RiDragDropLine","@react-icons/all-files/ri/RiNavigationFill","@react-icons/all-files/ri/RiEyeOffFill","@react-icons/all-files/ri/RiCloseCircleFill","@react-icons/all-files/ri/RiDragMoveFill","@react-icons/all-files/ri/RiMapPin2Fill","@react-icons/all-files/ri/RiH1","@react-icons/all-files/ri/RiH2","@react-icons/all-files/ri/RiH3","@react-icons/all-files/ri/RiSeparator","@react-icons/all-files/ri/RiUserForbidFill","@react-icons/all-files/ri/RiArrowGoBackLine","@react-icons/all-files/ri/RiFileCopy2Line","@react-icons/all-files/ri/RiArrowDropDownLine","@react-icons/all-files/ri/RiTimeLine","@react-icons/all-files/ri/RiFocus3Line","@react-icons/all-files/ri/RiArrowUpSFill","@react-icons/all-files/ri/RiRestartLine","@react-icons/all-files/ri/RiFolder2Fill","@react-icons/all-files/ri/RiKey2Fill","@react-icons/all-files/ri/RiArrowDownLine","@react-icons/all-files/ri/RiCompass3Fill","@radix-ui/react-dialog","@radix-ui/react-collapsible","@radix-ui/react-slot","react-device-detect","re-resizable","react-transition-group","react-dom","@radix-ui/react-dismissable-layer","@radix-ui/react-toggle-group","@radix-ui/react-toolbar","@radix-ui/react-toast","@radix-ui/react-toggle","react-error-boundary","@floating-ui/react","@table-library/react-table-library/table.js","@table-library/react-table-library/theme.js","@table-library/react-table-library/sort.js","@table-library/react-table-library/select.js","@table-library/react-table-library/pagination.js"],t):(a=typeof globalThis<"u"?globalThis:a||self,t(a.blocks={},a.jsxRuntime,a.themes,a.React,a.reactResponsive,a.useResizeObserver,a.RiAccountBoxLine,a.RiAddLine,a.RiAlertLine,a.RiArrowDownSLine,a.RiArrowLeftDoubleLine,a.RiArrowLeftLine,a.RiArrowLeftSLine,a.RiArrowRightDoubleLine,a.RiArrowRightLine,a.RiArrowRightSLine,a.RiArrowUpLine,a.RiArrowUpSLine,a.RiArticleFill,a.RiAttachment2,a.RiBankCardFill,a.RiBarChartFill,a.RiBardFill,a.RiBold,a.RiBugLine,a.RiBuilding2Fill,a.RiCalendarEventFill,a.RiCalendarFill,a.RiCheckLine,a.RiCheckboxBlankFill,a.RiCircleFill,a.RiCircleLine,a.RiCloseLargeLine,a.RiCloseLine,a.RiColorFilterFill,a.RiCommunityLine,a.RiDeleteBin2Line,a.RiDeleteBin7Fill,a.RiDeleteBin7Line,a.RiDownload2Line,a.RiDraggable,a.RiEqualizerFill,a.RiEqualizerLine,a.RiErrorWarningLine,a.RiExpandDiagonalFill,a.RiExpandDiagonalLine,a.RiExportFill,a.RiExpandUpDownLine,a.RiExternalLinkFill,a.RiExternalLinkLine,a.RiFile3Fill,a.RiFileCopyFill,a.RiFileCopyLine,a.RiFileTextFill,a.RiFilter3Line,a.RiFunctionFill,a.RiHome2Line,a.RiHomeLine,a.RiImportFill,a.RiInformationLine,a.RiInstanceLine,a.RiLayoutColumnLine,a.RiLayoutLeftLine,a.RiLayoutRightLine,a.RiLink,a.RiLinkUnlink,a.RiLoginBoxLine,a.RiLogoutBoxLine,a.RiLoopLeftLine,a.RiMapPin5Fill,a.RiMarkupFill,a.RiMenuLine,a.RiMoonFill,a.RiMore2Fill,a.RiMoreFill,a.RiMusic2Fill,a.RiPencilFill,a.RiPencilLine,a.RiPlayFill,a.RiQuestionLine,a.RiQuestionMark,a.RiRoadMapFill,a.RiSearchLine,a.RiSettings2Line,a.RiSquareFill,a.RiSquareLine,a.RiStarLine,a.RiSubtractLine,a.RiSunFill,a.RiThumbDownFill,a.RiThumbDownLine,a.RiThumbUpFill,a.RiThumbUpLine,a.RiUploadLine,a.RiUser2Fill,a.RiUser3Fill,a.RiUserAddFill,a.RiUserLine,a.RiListUnordered,a.RiListCheck,a.RiListOrdered,a.RiTableView,a.RiRefreshLine,a.RiArrowDownSFill,a.RiItalic,a.RiStrikethrough,a.RiUnderline,a.RiQuoteText,a.RiFontColor,a.RiMarkPenFill,a.RiDragDropLine,a.RiNavigationFill,a.RiEyeOffFill,a.RiCloseCircleFill,a.RiDragMoveFill,a.RiMapPin2Fill,a.RiH1,a.RiH2,a.RiH3,a.RiSeparator,a.RiUserForbidFill,a.RiArrowGoBackLine,a.RiFileCopy2Line,a.RiArrowDropDownLine,a.RiTimeLine,a.RiFocus3Line,a.RiArrowUpSFill,a.RiRestartLine,a.RiFolder2Fill,a.RiKey2Fill,a.RiArrowDownLine,a.RiCompass3Fill,a.RadixDialogPrimitive,a.RadixPrimitiveCollapsible,a.reactSlot,a.reactDeviceDetect,a.reResizable,a.reactTransitionGroup,a.ReactDOM,a.reactDismissableLayer,a.reactToggleGroup,a.reactToolbar,a.RadixToast,a.Toggle,a.reactErrorBoundary,a.react,a.table_js,a.theme_js,a.sort_js,a.select_js,a.pagination_js))})(this,function(a,t,m,e,Ae,Bt,zt,Ut,Ht,Vt,Wt,jt,Gt,Kt,Qt,Xt,Yt,Jt,Zt,en,tn,nn,rn,on,ln,sn,an,cn,dn,un,fn,hn,pn,gn,Cn,mn,vn,Ln,Sn,yn,wn,xn,bn,_n,Fn,kn,En,Tn,Dn,An,Pn,Mn,On,In,Rn,$n,Nn,qn,Bn,zn,Un,Hn,Vn,Wn,jn,Gn,Kn,Qn,Xn,Yn,Jn,Zn,er,ir,tr,nr,rr,or,lr,sr,ar,cr,dr,ur,fr,hr,pr,gr,Cr,mr,vr,Lr,Sr,yr,wr,xr,br,_r,Fr,kr,Er,Tr,Dr,Ar,Pr,Mr,Or,Ir,Rr,$r,Nr,qr,Br,zr,Ur,Hr,Vr,Wr,jr,Gr,Kr,Qr,Xr,Yr,Jr,Zr,eo,io,to,no,ro,oo,lo,so,Pe,ye,Me,Ne,_i,ao,Fi,co,ii,uo,ki,k,oe,fo,Ei,we,ho){"use strict";function qe(i){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const o in i)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(i,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:()=>i[o]})}}return n.default=i,Object.freeze(n)}const le=qe(lo),Ti=qe(so),Oe=qe(ii),po=qe(uo);function go(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Di={exports:{}};/*!
2
- Copyright (c) 2018 Jed Watson.
3
- Licensed under the MIT License (MIT), see
4
- http://jedwatson.github.io/classnames
5
- */(function(i){(function(){var n={}.hasOwnProperty;function o(){for(var r=[],s=0;s<arguments.length;s++){var l=arguments[s];if(l){var d=typeof l;if(d==="string"||d==="number")r.push(l);else if(Array.isArray(l)){if(l.length){var c=o.apply(null,l);c&&r.push(c)}}else if(d==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){r.push(l.toString());continue}for(var u in l)n.call(l,u)&&l[u]&&r.push(u)}}}return r.join(" ")}i.exports?(o.default=o,i.exports=o):window.classNames=o})()})(Di);var Co=Di.exports;const F=go(Co);function de(i,n){return e.useMemo(()=>{if(i!==void 0)if(typeof i=="object"){if(!("initial"in i))throw new Error("Expected initial property to be set in Responsive object");return Object.fromEntries(Object.entries(i).map(([o,r])=>[o,n[r]]))}else return n[i]},[n,i])}const mo={success:"green",danger:"red",warning:"amber",info:"gray"},K=i=>{const n=m.useThemeContext();if(i)return i==="primary"?n.accentColor:mo[i]},Ai=()=>{const[i,n]=e.useState("initial"),[o,r]=e.useState("initial"),s=Ae.useMediaQuery({minWidth:"520px"}),l=Ae.useMediaQuery({minWidth:"768px"}),d=Ae.useMediaQuery({minWidth:"1024px"}),c=Ae.useMediaQuery({minWidth:"1280px"}),u=Ae.useMediaQuery({minWidth:"1640px"});return e.useLayoutEffect(()=>{r(f=>(n(f),u?"xl":c?"lg":d?"md":l?"sm":s?"xs":"initial"))},[c,d,l,u,s]),{size:o,prevSize:i,xs:s,sm:l,md:d,lg:c,xl:u}},ti=(i,n,o)=>{const[r,s]=e.useState([]),[l,d]=e.useState(!0),c=e.useCallback(p=>{const{repeat:h,key:C}=p;d(!0),!(h||r.includes(C))&&s(v=>[...v,C])},[r]),u=e.useCallback(p=>{const{key:h}=p;d(!1),r.includes(h)&&s(C=>{const v=[...C];return v.splice(C.indexOf(h),1),v})},[r]);e.useEffect(()=>(n||document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0)}),[n,c]),e.useEffect(()=>(n||document.addEventListener("keyup",u,!0),()=>{document.removeEventListener("keyup",u,!0)}),[n,u]);const f=e.useMemo(()=>!n&&l&&r.length===i.length&&r.every(p=>i.includes(p)),[n,l,r,i]);return e.useEffect(()=>{f&&o()},[f,o]),f},vo=i=>{const n=[];for(const o of e.Children.toArray(i))e.isValidElement(o)&&n.push(o);return n},Lo=()=>e.useCallback(i=>{i.stopPropagation()},[]);function So(i,n){const[o,r]=e.useState([]),[s,l]=e.useState("");return e.useEffect(()=>{r(i.filter(d=>n(d,s)))},[n,s,i]),[o,s,l]}const yo=i=>{const[n,o]=e.useState();e.useLayoutEffect(()=>{var s;o((s=i.current)==null?void 0:s.getBoundingClientRect())},[i]);const r=e.useCallback(s=>{const l=s.contentRect;o(l)},[]);return Bt(i,r),n},Pi=(i,n)=>{const o=i.indexOf(" ",n),r=o===-1?i:i.substring(0,o),s=o===-1?"":i.substring(o);return[r,s]},Mi=e.memo;function Oi(i){const{size:n}=Ai();if(i==null)return i;if(typeof i=="object")if("initial"in i)switch(n){case"xl":if(i.xl!==void 0)return i.xl;case"lg":if(i.lg!==void 0)return i.lg;case"md":if(i.md!==void 0)return i.md;case"sm":if(i.sm!==void 0)return i.sm;case"xs":if(i.xs!==void 0)return i.xs;case"initial":return i.initial}else throw new Error("Expected initial property to be set in Responsive object");return i}function ni(i){const{state:n,setState:o,initialState:r}=i,[s,l]=e.useState(r);return[n!==void 0?n:s,o!==void 0?o:l]}const wo=e.forwardRef(function({className:n,severity:o="primary",color:r,children:s,...l},d){const c=K(o);return t.jsx(m.Badge,{className:F("overmap-badge",n),ref:d,color:r||c,...l,children:s})}),xo=e.memo(wo),ri={zeroMinWidth:"_zeroMinWidth_curjh_1",zeroMinHeight:"_zeroMinHeight_curjh_5",radius:"_radius_curjh_9"},se=e.memo(e.forwardRef(({className:i,radius:n=!1,children:o,zeroMinWidth:r=!1,zeroMinHeight:s=!1,...l},d)=>t.jsx(m.Flex,{className:F(i,{[ri.radius]:n,[ri.zeroMinWidth]:r,[ri.zeroMinHeight]:s}),ref:d,...l,children:o}))),Ii=e.createContext({}),bo=()=>e.useContext(Ii),_o=e.memo(e.forwardRef(({className:i,children:n,...o},r)=>{const{size:s,severity:l}=bo(),d=K(l);return t.jsx(m.Box,{className:F("overmap-breadcrumb-item",i),height:"max-content",width:"max-content",children:t.jsx(m.Link,{ref:r,size:s,color:d,...o,children:t.jsx(se,{height:"100%",width:"100%",align:"center",gap:"1",children:n})})})})),Fo={Group:e.memo(e.forwardRef(({className:i,children:n,separator:o,severity:r="info",size:s,gap:l="2",...d},c)=>{const u=K(r),f=vo(n);return t.jsx(Ii.Provider,{value:{size:s,severity:r},children:t.jsx(se,{className:F("overmap-breadcrumb-group",i),ref:c,gap:l,role:"breadcrumb",height:"max-content",width:"max-content",...d,children:f.map((p,h)=>t.jsxs(t.Fragment,{children:[e.cloneElement(p,{key:h}),f.length-1!==h&&t.jsx(m.Text,{color:u,children:t.jsx(se,{height:"100%",width:"100%",align:"center",children:o})})]}))})})})),Item:_o},Ie={fluid:"_fluid_r73gr_1",hoverSpin90Clockwise:"_hoverSpin90Clockwise_r73gr_15",hoverSpin180Clockwise:"_hoverSpin180Clockwise_r73gr_25",hoverSpin360Clockwise:"_hoverSpin360Clockwise_r73gr_35"},Ri={spin90Clockwise:Ie.hoverSpin90Clockwise,spin180Clockwise:Ie.hoverSpin180Clockwise,spin360Clockwise:Ie.hoverSpin360Clockwise},ko={role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&i.currentTarget.click()}},xe={small:"1",medium:"2",large:"3"},$i=e.createContext({}),oi=()=>e.useContext($i),Eo={spinner:"_spinner_1oknc_9",spin:"_spin_1oknc_9"},Be=e.memo(()=>t.jsx("div",{className:Eo.spinner}));Be.displayName="Spinner";const To=e.forwardRef(function(n,o){const r=oi(),{className:s,type:l="button",fluid:d=r.fluid??!1,size:c=r.size??"medium",severity:u=r.severity??"primary",hoverEffects:f=r.hoverEffects??[],variant:p=r.variant,highContrast:h=r.highContrast??!1,shortcut:C={keys:[],action:()=>{},disabled:!1},loading:v,children:L,disabled:w,...g}=n,x=K(u),b=f.map(y=>Ri[y]);return ti(C.keys,C.disabled||C.keys.length===0,C.action),t.jsx(m.Button,{ref:o,type:l,className:F(s,b,{[Ie.fluid]:d}),color:x,size:de(c,xe),variant:p,disabled:v||w,highContrast:h,...g,children:v?t.jsx(Be,{}):L})}),be=e.memo(To),Do=e.forwardRef(function(n,o){const r=oi(),{className:s,children:l,type:d="button",fluid:c=r.fluid??!1,size:u=r.size??"medium",severity:f=r.severity??"primary",hoverEffects:p=r.hoverEffects??[],variant:h=r.variant,highContrast:C=r.highContrast??!1,shortcut:v={keys:[],action:()=>{},disabled:!1},...L}=n,w=K(f),g=(p==null?void 0:p.map(x=>Ri[x]))||[];return ti(v.keys,v.disabled||v.keys.length===0,v.action),t.jsx(m.IconButton,{className:F(s,g,{[Ie.fluid]:c}),ref:o,color:w,size:de(u,xe),variant:h,type:d,highContrast:C,...L,children:l})}),Q=e.memo(Do),Ao={merged:"_merged_wdgxo_1"},Po={row:{small:"4",medium:"4",large:"5"},column:{small:"2",medium:"3",large:"4"}},Mo=e.forwardRef(function({className:n,merged:o=!1,children:r,gap:s,direction:l="row",severity:d,size:c="medium",variant:u,hoverEffects:f,fluid:p,highContrast:h,...C},v){const L=de(c,Po[l]),w=u==="ghost"?L:"0";return t.jsx(m.Flex,{className:F("overmap-button-group",n,{[Ao.merged]:o}),ref:v,gap:o?s??w:s??"2",direction:l,"data-direction":l,...C,children:t.jsx($i.Provider,{value:{size:c,severity:d,variant:u,hoverEffects:f,fluid:p,highContrast:h},children:r})})}),li=e.memo(Mo),Oo={separators:"_separators_1f7v1_1"},Io=e.memo(e.forwardRef((i,n)=>{const{children:o,border:r,before:s,after:l,size:d}=i,c=r?"surface":"ghost",u=de(d,xe),f=s&&l?t.jsx(m.Inset,{side:"x",pt:"current",pb:"current",children:o}):s?t.jsx(m.Inset,{side:"bottom",pt:"current",children:o}):l?t.jsx(m.Inset,{side:"top",pb:"current",children:o}):t.jsx(m.Inset,{children:o}),p=t.jsxs(m.Card,{ref:n,size:u,variant:c,children:[s,f,l]});return c==="ghost"?t.jsx(m.Box,{p:"3",children:p}):p})),Ro=e.memo(e.forwardRef((i,n)=>{const{children:o,variant:r="outline",size:s,className:l,...d}=i,c=r==="outline"||r==="surface",u=r==="outline"?"ghost":r==="surface"?"soft":r;return t.jsx(Io,{...d,border:c,size:s,children:t.jsx(li,{size:s,severity:"info",variant:u,className:F(l,Oo.separators),merged:!0,gap:"0",direction:"column",ref:n,children:o})})})),$o=e.memo(e.forwardRef((i,n)=>{const{variant:o}=oi(),r=t.jsx(be,{ref:n,...i,radius:"large",variant:o});return o==="ghost"?t.jsx(m.Box,{asChild:!0,my:"1",mx:"2",children:r}):r})),No={Root:Ro,Item:$o},si={RiAccountBoxLine:zt.RiAccountBoxLine,RiAddLine:Ut.RiAddLine,RiAlertLine:Ht.RiAlertLine,RiArrowDownLine:ro.RiArrowDownLine,RiArrowDownSFill:Ar.RiArrowDownSFill,RiArrowDownSLine:Vt.RiArrowDownSLine,RiArrowDropDownLine:Yr.RiArrowDropDownLine,RiArrowGoBackLine:Qr.RiArrowGoBackLine,RiArrowLeftDoubleLine:Wt.RiArrowLeftDoubleLine,RiArrowLeftLine:jt.RiArrowLeftLine,RiArrowLeftSLine:Gt.RiArrowLeftSLine,RiArrowRightDoubleLine:Kt.RiArrowRightDoubleLine,RiArrowRightLine:Qt.RiArrowRightLine,RiArrowRightSLine:Xt.RiArrowRightSLine,RiArrowUpLine:Yt.RiArrowUpLine,RiArrowUpSFill:eo.RiArrowUpSFill,RiArrowUpSLine:Jt.RiArrowUpSLine,RiArticleFill:Zt.RiArticleFill,RiAttachment2:en.RiAttachment2,RiBankCardFill:tn.RiBankCardFill,RiBarChartFill:nn.RiBarChartFill,RiBardFill:rn.RiBardFill,RiBold:on.RiBold,RiBugLine:ln.RiBugLine,RiBuilding2Fill:sn.RiBuilding2Fill,RiCalendarEventFill:an.RiCalendarEventFill,RiCalendarFill:cn.RiCalendarFill,RiCheckLine:dn.RiCheckLine,RiCheckboxBlankFill:un.RiCheckboxBlankFill,RiCircleFill:fn.RiCircleFill,RiCircleLine:hn.RiCircleLine,RiCloseCircleFill:zr.RiCloseCircleFill,RiCloseLargeLine:pn.RiCloseLargeLine,RiCloseLine:gn.RiCloseLine,RiColorFilterFill:Cn.RiColorFilterFill,RiCommunityLine:mn.RiCommunityLine,RiCompass3Fill:oo.RiCompass3Fill,RiDeleteBin2Line:vn.RiDeleteBin2Line,RiDeleteBin7Fill:Ln.RiDeleteBin7Fill,RiDeleteBin7Line:Sn.RiDeleteBin7Line,RiDownload2Line:yn.RiDownload2Line,RiDragDropLine:Nr.RiDragDropLine,RiDragMoveFill:Ur.RiDragMoveFill,RiDraggable:wn.RiDraggable,RiEqualizerFill:xn.RiEqualizerFill,RiEqualizerLine:bn.RiEqualizerLine,RiErrorWarningLine:_n.RiErrorWarningLine,RiExpandDiagonalFill:Fn.RiExpandDiagonalFill,RiExpandDiagonalLine:kn.RiExpandDiagonalLine,RiExpandUpDownLine:Tn.RiExpandUpDownLine,RiExportFill:En.RiExportFill,RiExternalLinkFill:Dn.RiExternalLinkFill,RiExternalLinkLine:An.RiExternalLinkLine,RiEyeOffFill:Br.RiEyeOffFill,RiFile3Fill:Pn.RiFile3Fill,RiFileCopy2Line:Xr.RiFileCopy2Line,RiFileCopyFill:Mn.RiFileCopyFill,RiFileCopyLine:On.RiFileCopyLine,RiFileTextFill:In.RiFileTextFill,RiFilter3Line:Rn.RiFilter3Line,RiFocus3Line:Zr.RiFocus3Line,RiFolder2Fill:to.RiFolder2Fill,RiFontColor:Rr.RiFontColor,RiFunctionFill:$n.RiFunctionFill,RiH1:Vr.RiH1,RiH2:Wr.RiH2,RiH3:jr.RiH3,RiHome2Line:Nn.RiHome2Line,RiHomeLine:qn.RiHomeLine,RiImportFill:Bn.RiImportFill,RiInformationLine:zn.RiInformationLine,RiInstanceLine:Un.RiInstanceLine,RiItalic:Pr.RiItalic,RiKey2Fill:no.RiKey2Fill,RiLayoutColumnLine:Hn.RiLayoutColumnLine,RiLayoutLeftLine:Vn.RiLayoutLeftLine,RiLayoutRightLine:Wn.RiLayoutRightLine,RiLink:jn.RiLink,RiLinkUnlink:Gn.RiLinkUnlink,RiListCheck:kr.RiListCheck,RiListOrdered:Er.RiListOrdered,RiListUnordered:Fr.RiListUnordered,RiLoginBoxLine:Kn.RiLoginBoxLine,RiLogoutBoxLine:Qn.RiLogoutBoxLine,RiLoopLeftLine:Xn.RiLoopLeftLine,RiMapPin2Fill:Hr.RiMapPin2Fill,RiMapPin5Fill:Yn.RiMapPin5Fill,RiMarkPenFill:$r.RiMarkPenFill,RiMarkupFill:Jn.RiMarkupFill,RiMenuLine:Zn.RiMenuLine,RiMoonFill:er.RiMoonFill,RiMore2Fill:ir.RiMore2Fill,RiMoreFill:tr.RiMoreFill,RiMusic2Fill:nr.RiMusic2Fill,RiNavigationFill:qr.RiNavigationFill,RiPencilFill:rr.RiPencilFill,RiPencilLine:or.RiPencilLine,RiPlayFill:lr.RiPlayFill,RiQuestionLine:sr.RiQuestionLine,RiQuestionMark:ar.RiQuestionMark,RiQuoteText:Ir.RiQuoteText,RiRefreshLine:Dr.RiRefreshLine,RiRestartLine:io.RiRestartLine,RiRoadMapFill:cr.RiRoadMapFill,RiSearchLine:dr.RiSearchLine,RiSeparator:Gr.RiSeparator,RiSettings2Line:ur.RiSettings2Line,RiSquareFill:fr.RiSquareFill,RiSquareLine:hr.RiSquareLine,RiStarLine:pr.RiStarLine,RiStrikethrough:Mr.RiStrikethrough,RiSubtractLine:gr.RiSubtractLine,RiSunFill:Cr.RiSunFill,RiTableView:Tr.RiTableView,RiThumbDownFill:mr.RiThumbDownFill,RiThumbDownLine:vr.RiThumbDownLine,RiThumbUpFill:Lr.RiThumbUpFill,RiThumbUpLine:Sr.RiThumbUpLine,RiTimeLine:Jr.RiTimeLine,RiUnderline:Or.RiUnderline,RiUploadLine:yr.RiUploadLine,RiUser2Fill:wr.RiUser2Fill,RiUser3Fill:xr.RiUser3Fill,RiUserAddFill:br.RiUserAddFill,RiUserForbidFill:Kr.RiUserForbidFill,RiUserLine:_r.RiUserLine},Ni="15px",M=e.memo(i=>{const{size:n=Ni,icon:o,...r}=i;let s=i.icon;(!s||!si[s])&&(console.error(`You have specified an icon that is not in the list of used icons: ${s}`),s="RiQuestionMark");const l=si[s];return l||console.error(`You have specified an icon that is not in the list of used icons: ${s}`),t.jsx(l,{...r,size:n})});M.displayName="IconComponent";const qo=e.memo(function(n){const{title:o,description:r,content:s,closeDialog:l}=n;return t.jsxs(m.Flex,{direction:"column",gap:"2",grow:"1",children:[t.jsxs(m.Flex,{direction:"column",gap:"1",children:[t.jsxs(m.Flex,{justify:"between",children:[t.jsx(m.Dialog.Title,{mb:"0",children:o}),t.jsx(m.Dialog.Close,{children:t.jsx(m.IconButton,{color:"gray",variant:"ghost","aria-label":"Close",children:t.jsx(M,{icon:"RiCloseLargeLine"})})})]}),r&&t.jsx(m.Dialog.Description,{children:r})]}),s(l)]})}),Bo=e.memo(e.forwardRef((i,n)=>{const{children:o,content:r,title:s,description:l,onOpen:d,onClose:c,defaultOpen:u,onCloseInterrupt:f,open:p,onOpenChange:h,...C}=i,[v,L]=e.useState(u??!1),w=p??v;if((f||d)&&h)throw new Error("Neither the `onCloseInterrupt` nor `onOpen` props can be used with `onOpenChange`.");if(p!==void 0&&h===void 0)throw new Error("The `open` prop requires the `onOpenChange` prop.");if(!o&&p===void 0)throw new Error("Either the `children` or `open` prop must be defined.");if(o&&p!==void 0)throw new Error("The `children` and `open` props cannot be used together.");const g=e.useCallback(b=>{if(h)return h(b);if(b&&d)d();else{if(!b&&f)return f(()=>{L(!1),c&&c()});!b&&c&&c()}L(b)},[h,d,c,f]),x=e.useCallback(b=>{if(b!=null&&b.force)return L(!1);g(!1)},[g]);return t.jsxs(m.Dialog.Root,{open:w,onOpenChange:g,children:[t.jsx(m.Dialog.Trigger,{children:o}),t.jsx(m.Dialog.Content,{ref:n,...C,children:t.jsx(qo,{closeDialog:x,content:r,title:s,description:l})})]})})),zo=(i,n)=>e.useCallback((...o)=>r=>{i(...o),r(n)},[i,n]),qi=i=>t.jsx(m.AlertDialog.Title,{mb:"0",...i}),Uo=i=>{const{title:n,description:o,actionText:r="Confirm",cancelText:s="Cancel",onAction:l,onCancel:d,severity:c}=i;return t.jsxs(m.Flex,{direction:"column",gap:"2",children:[t.jsxs(m.Flex,{direction:"column",gap:"1",children:[t.jsx(qi,{children:n}),t.jsx(m.AlertDialog.Description,{children:o})]}),t.jsxs(m.Flex,{gap:"3",mt:"4",justify:"end",children:[t.jsx(m.AlertDialog.Cancel,{children:t.jsx(be,{variant:"soft",severity:"info",onClick:d,children:s})}),t.jsx(m.AlertDialog.Action,{children:t.jsx(be,{variant:"solid",severity:c,onClick:l,children:r})})]})]})},Bi=e.memo(function(n){const{open:o,setOpen:r,children:s,...l}=n,d=e.useMemo(()=>({close:()=>r(!1),Title:qi,Description:m.AlertDialog.Description}),[r]);return t.jsxs(m.AlertDialog.Root,{open:o,onOpenChange:r,children:[t.jsx(m.AlertDialog.Content,{children:"content"in l?l.content(d):t.jsx(Uo,{...l})}),s]})}),ai=e.createContext(()=>{throw new Error("No AlertDialogProvider found")}),Ho={content:()=>null},Vo=e.memo(function({children:n}){const[o,r]=e.useState(!1),[s,l]=e.useState(Ho),d=e.useCallback(c=>{if(o)throw new Error("AlertDialog is already open");l(c),r(!0)},[o]);return t.jsx(Bi,{open:o,setOpen:r,...s,children:t.jsx(ai.Provider,{value:d,children:n})})}),zi=()=>e.useContext(ai),Wo=()=>{const i=zi();return e.useCallback(n=>i({title:"Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",actionText:"Discard",severity:"danger",onAction:n.onDiscard,onCancel:n.onCancel}),[i])},jo=e.memo(e.forwardRef((i,n)=>{const{children:o,defaultOpen:r=!1,onInterruptClose:s,content:l,onClose:d,open:c,onOpenChange:u,className:f,style:p,overlay:h=!1,overlayClass:C,overlayStyle:v}=i,[L,w]=e.useState(r??!1),g=e.useMemo(()=>c!==void 0?c:L,[c,L]),x=e.useCallback(y=>{u?u(y):!y&&s?s(()=>{w(!1),d&&d()}):y?w(y):(w(!1),d&&d())},[u,d,s]),b=e.useCallback(y=>{y!=null&&y.force?w(!1):x(!1)},[x]);return t.jsxs(le.Root,{open:g,onOpenChange:x,modal:h,children:[o!==void 0&&t.jsx(le.Trigger,{children:o}),t.jsx(le.Portal,{children:t.jsxs(t.Fragment,{children:[h&&t.jsx(m.Theme,{asChild:!0,children:t.jsx(le.Overlay,{className:C,style:v})}),t.jsx(m.Theme,{asChild:!0,children:t.jsx(le.Content,{className:f,style:p,ref:n,children:l(b)})})]})})]})})),Ui={OverlayContent:"_OverlayContent_1nr9w_1",OverlayOverlay:"_OverlayOverlay_1nr9w_6"},Go=e.memo(e.forwardRef((i,n)=>{const{className:o,overlayClass:r,...s}=i;return t.jsx(jo,{ref:n,overlayClass:F("overmap-overlay-overlay",Ui.OverlayOverlay,r),className:F("overmap-overlay-content",Ui.OverlayContent,o),...s})})),Hi=e.createContext({});function Ko(){return e.useContext(Hi)}const Qo={1:{gap:"1",px:"2",height:"5",fontSize:"var(--font-size-2)"},2:{gap:"2",px:"2",height:"6",fontSize:"var(--font-size-2)"},3:{gap:"2",px:"3",height:"7",fontSize:"var(--font-size-3)"},4:{gap:"2",px:"4",height:"8",fontSize:"var(--font-size-3)"},5:{gap:"3",px:"5",height:"9",fontSize:"var(--font-size-4)"}},Vi=e.createContext({}),Wi=()=>e.useContext(Vi),ze=e.memo(i=>{const{size:n,children:o,compact:r=!1}=i;return t.jsx(Vi.Provider,{value:{size:n,compact:r},children:o})});ze.displayName="OvermapItemGroup";const Ue=e.memo(e.forwardRef((i,n)=>{const o=Wi(),{leftSlot:r,compact:s=o.compact,rightSlot:l,children:d,size:c=o.size,style:u,...f}=i,p=Oi(c),{fontSize:h,...C}=Qo[p??"2"];return t.jsxs(m.Flex,{ref:n,align:"center",shrink:"0",style:{fontSize:h,...u},...C,...f,width:s?C.height:void 0,children:[!s&&r&&t.jsx(m.Flex,{width:"max-content",height:"max-content",align:"center",children:r}),t.jsx(m.Flex,{height:"max-content",align:"center",grow:"1",justify:s?"center":void 0,children:d}),!s&&l&&t.jsx(m.Flex,{width:"max-content",height:"max-content",align:"center",children:l})]})})),ji=Mi(function(i){const{meta:n,nodes:o,level:r=0,disabled:s}=i,[l,d]=e.useState(!1),{nodeRenderer:c,disabled:u,nodeGap:f,onNodeOpen:p,onNodeClose:h,onNodeClick:C,nodeStyles:v,nodeClassName:L,levelGap:w}=Ko(),g=s??u,x=e.useCallback(()=>{C&&C(n)},[n,C]),b=e.useCallback(()=>{d(!l),!l&&p&&p(n),l&&h&&h(n)},[n,h,p,l]),{children:y,leftSlot:E,rightSlot:P,style:A,className:T}=e.useMemo(()=>c({meta:n,toggleOpen:b,open:l,disabled:g}),[g,n,c,b,l]),V=e.useMemo(()=>({...v,...A}),[v,A]);return t.jsx(Ti.Root,{asChild:!0,open:l,disabled:g,children:t.jsxs(m.Flex,{width:"100%",direction:"column",children:[t.jsx(Ue,{onClick:x,disabled:s??u,className:F(L,T),style:V,leftSlot:E,rightSlot:P,"data-state":l?"open":"closed","data-disabled":g,children:y}),o&&o.length>0&&t.jsx(Ti.Content,{asChild:!0,children:t.jsx(m.Flex,{width:"100%",pl:w,height:"max-content",direction:"column",gap:f,pt:f,children:o.map((W,B)=>t.jsx(ji,{level:r+1,...W},`${r},${B}`))})})]})})}),Xo=Mi(function(i){const{nodes:n,disabled:o=!1,nodeClassName:r,nodeStyles:s,size:l="2",nodeGap:d="0",levelGap:c="2",onNodeClick:u,onNodeClose:f,onNodeOpen:p,nodeRenderer:h,...C}=i;return t.jsx(Hi.Provider,{value:{nodeRenderer:h,nodeGap:d,levelGap:c,nodeClassName:r,nodeStyles:s,disabled:o,onNodeClick:u,onNodeClose:f,onNodeOpen:p},children:t.jsx(ze,{size:l,children:t.jsx(m.Flex,{width:"100%",height:"max-content",direction:"column",gap:d,...C,children:n.map((v,L)=>t.jsx(ji,{...v},`0,${L}`))})})})}),Gi=e.memo(i=>{const{children:n,file:o}=i,r=e.useRef(null),s=e.useMemo(()=>URL.createObjectURL(o),[o]),l=e.useCallback(()=>{r.current&&r.current.click()},[]);return t.jsxs(t.Fragment,{children:[t.jsx(Pe.Slot,{onClick:l,children:n}),t.jsx("a",{style:{display:"none"},href:s,target:"_blank",rel:"noreferrer",ref:r})]})});Gi.displayName="DownloadButtonUtility";const He=e.memo(function({children:n}){const[o,r]=e.useState(ye.isMobile),s=e.useCallback(()=>{r(!0)},[]),l=e.useCallback(()=>{r(ye.isMobile)},[]);return n({isHovered:o,onPointerEnter:s,onPointerLeave:l})}),Ki={fluid:"_fluid_7n1wr_1"},Yo=e.forwardRef(function({className:n,fluid:o,size:r="medium",variant:s="surface",severity:l="primary",itemSeverity:d="info",placeholder:c="Select",side:u,items:f=[],value:p,id:h,...C},v){const L=de(r,xe),w=K(l),g=K(d);return e.createElement(m.Select.Root,{size:L,...C,key:p===void 0?1:0,value:p},t.jsx(m.Select.Trigger,{className:F(n,{[Ki.fluid]:o}),id:h,ref:v,variant:s,placeholder:c,color:w}),t.jsx(m.Select.Content,{side:u,className:Ki.contentDefault,position:"popper",variant:s!=="surface"?"soft":"solid",color:g,children:f.map(({itemContent:x,value:b,...y})=>t.jsx(m.Select.Item,{className:"overmap-select-item",value:b,...y,children:x},b))}))}),Qi=e.memo(Yo),Xi=e.memo(e.forwardRef((i,n)=>{const{checked:o,label:r,value:s,size:l="2"}=i;return t.jsx(m.Box,{asChild:!0,px:l,children:t.jsx(m.Select.Item,{value:s,ref:n,children:t.jsxs(m.Flex,{gap:l,align:"center",children:[t.jsx(m.Checkbox,{checked:o}),r]})})})})),Ve="__select_all__",Jo=e.memo(e.forwardRef((i,n)=>{const[o,r]=e.useState(!1),{placeholder:s,value:l,onValueChange:d,options:c,disabled:u,name:f,...p}=i,h=de(i.size,xe),C=K(i.severity),v=e.useMemo(()=>new Map(c.map(b=>[b.value,b.label])),[c]),L=l.length>4?`${l.length} options selected`:t.jsx("span",{children:l.flatMap(b=>[v.get(b),", "]).slice(0,-1)}),w=e.useCallback(()=>r(!1),[]),g=e.useCallback(b=>{b&&r(!0)},[]),x=e.useCallback(b=>{let y;b===Ve?y=l.length===c.length?[]:c.map(P=>P.value):y=l.includes(b)?l.filter(E=>E!==b):[...l,b],d(y)},[d,c,l]);return e.useEffect(()=>{if(c.some(({value:b})=>b===Ve))throw new Error(`Cannot have an option with the value "${Ve}"`)},[c]),t.jsxs(m.Select.Root,{open:o,value:"",onOpenChange:g,onValueChange:x,disabled:u,size:h,name:f,autoComplete:"off",children:[t.jsx(m.Select.Trigger,{ref:n,color:C,placeholder:l.length>0?L:s,"data-placeholder":l.length>0?void 0:!0,...p}),t.jsxs(m.Select.Content,{color:"gray",variant:"soft",position:"popper",onEscapeKeyDown:w,onPointerDownOutside:w,children:[t.jsx(Xi,{value:Ve,label:"Select all",checked:l.length===c.length,size:h}),c.map(b=>t.jsx(Xi,{...b,checked:l.includes(b.value),size:h},b.value))]})]})})),Zo={default:"_default_u936h_1"},el=e.forwardRef(function({className:n,severity:o="primary",icon:r,defaultChecked:s=!1,onCheckedChange:l,...d},c){const u=e.useRef(null),[f,p]=e.useState(d.checked?d.checked:s),[h,C]=e.useState(),v=K(o);e.useLayoutEffect(()=>{var x;const g=c||u;"current"in g&&g.current&&C((x=g.current)==null?void 0:x.querySelector("span.rt-SwitchThumb"))},[c]);const L=e.useCallback(g=>{p(g),l&&l(g)},[l]),w=d.checked?d.checked:f;return t.jsxs(t.Fragment,{children:[t.jsx(m.Switch,{className:F("overmap-switch",n,Zo.default),ref:c||u,color:v,radius:"full",defaultChecked:s,onCheckedChange:L,...d}),t.jsx(m.Portal,{container:h,asChild:!0,children:r&&"checked"in r?w?r.checked:r.unchecked:r})]})}),il=e.memo(el),_e={sidebarContent:"_sidebarContent_1onyo_1",right:"_right_1onyo_7",resizeHandle:"_resizeHandle_1onyo_10",left:"_left_1onyo_13",overlay:"_overlay_1onyo_33"},tl={width:"auto",height:"100%"},nl=e.forwardRef(function({side:n="left",modal:o=!0,children:r,open:s,containerSelector:l,overlay:d=!0,resizable:c=!0,minWidth:u="300px",maxWidth:f="500px",...p},h){const C=n==="right",v=n==="left",[L,w]=e.useState();return e.useEffect(()=>{const g=l??'[data-is-root-theme="true"]',x=document.querySelector(g);if(x===void 0)throw new Error(`Could not find a container element using the following selector ${g}`);w(x)},[l]),t.jsx(le.Root,{open:s,modal:o,children:t.jsxs(le.Portal,{container:L,children:[d&&t.jsx(le.Overlay,{className:F(_e.overlay)}),t.jsx(le.Content,{className:F("overmap-sidebar","rt-DialogContent",_e.sidebarContent,{[_e.left]:v,[_e.right]:C}),ref:h,asChild:!0,...p,children:t.jsx(m.Box,{width:"auto",children:t.jsx(Me.Resizable,{minWidth:u,maxWidth:f,defaultSize:tl,enable:{right:c&&v,left:c&&C},handleClasses:{left:_e.resizeHandle,right:_e.resizeHandle},handleComponent:{right:t.jsx(M,{icon:"RiDraggable"}),left:t.jsx(M,{icon:"RiDraggable"})},children:r})})})]})})}),rl=e.memo(nl),ci=e.createContext({}),Ce=()=>e.useContext(ci),Yi=e.memo(i=>{const{children:n,small:o=!1,hideLayout:r=!1}=i,[s,l]=e.useState(!1),[d,c]=e.useState(!1),u=e.useMemo(()=>({small:o,hideLayout:r,showLeftSlideOut:s,setShowLeftSlideOut:l,showRightSlideOut:d,setShowRightSlideOut:c}),[r,s,d,o]);return t.jsx(ci.Provider,{value:u,children:n})});Yi.displayName="Layout.Root";const ol=e.memo(e.forwardRef((i,n)=>{const{children:o,style:r,grow:s="1",height:l="100%",position:d,...c}=i,{hideLayout:u=!1}=Ce();return!u&&t.jsx(m.Flex,{ref:n,grow:s,height:l,position:d,style:r,...c,children:o})})),ll=e.memo(e.forwardRef((i,n)=>{const{className:o,style:r,active:s,side:l,smallModeOnly:d=!1}=i,{small:c,hideLayout:u,showLeftSlideOut:f,showRightSlideOut:p}=Ce();return e.useMemo(()=>s!==void 0?s:u||d&&!c?!1:l==="left"?f:p,[s,u,f,p,l,c,d])&&t.jsx(m.Flex,{className:F("overmap-layout-overlay",o),style:{...r},ref:n,position:"absolute",inset:"0"})}));function sl(i,n=globalThis==null?void 0:globalThis.document.body){const o=dl(i),r=e.useRef(!1),s=e.useRef(()=>{});return e.useEffect(()=>{const l=c=>{if(c.target&&!r.current){const u={originalEvent:c},f=()=>{cl("pointerDownOutside",o,u,{discrete:!0})};c.pointerType==="touch"?(n.removeEventListener("click",s.current),s.current=f,n.addEventListener("click",s.current,{once:!0})):f()}else n.removeEventListener("click",s.current);r.current=!1},d=window.setTimeout(()=>{n.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(d),n.removeEventListener("pointerdown",l),n.removeEventListener("click",s.current)}},[n,o]),{onPointerDownCapture:()=>r.current=!0}}function al(i,n){i&&_i.flushSync(()=>i.dispatchEvent(n))}function cl(i,n,o,{discrete:r}){const s=o.originalEvent.target,l=new CustomEvent(i,{bubbles:!1,cancelable:!0,detail:o});n&&s.addEventListener(i,n,{once:!0}),r?al(s,l):s.dispatchEvent(l)}function dl(i){const n=e.useRef(i);return e.useEffect(()=>{n.current=i}),e.useMemo(()=>(...o)=>{var r;return(r=n.current)==null?void 0:r.call(n,...o)},[])}const ee={EnterRight:"_EnterRight_1jwyv_2",EnterActiveRight:"_EnterActiveRight_1jwyv_6",EnterDoneRight:"_EnterDoneRight_1jwyv_11",ExitRight:"_ExitRight_1jwyv_15",ExitActiveRight:"_ExitActiveRight_1jwyv_19",ExitDoneRight:"_ExitDoneRight_1jwyv_24",EnterLeft:"_EnterLeft_1jwyv_29",EnterActiveLeft:"_EnterActiveLeft_1jwyv_33",EnterDoneLeft:"_EnterDoneLeft_1jwyv_38",ExitLeft:"_ExitLeft_1jwyv_42",ExitActiveLeft:"_ExitActiveLeft_1jwyv_46",ExitDoneLeft:"_ExitDoneLeft_1jwyv_51",Overlay:"_Overlay_1jwyv_56"},ul=200,Ji=e.memo(e.forwardRef((i,n)=>{const{className:o,style:r,children:s,open:l,hide:d=!1,modal:c=!1,overlayComponent:u,resizeable:f=!0,side:p,position:h="relative",initialWidth:C,minWidth:v,maxWidth:L,onDismiss:w,onOpening:g,onClosed:x,content:b}=i,y=p==="left",[E,P]=e.useState(document.body),A=e.useRef(null),[T,V]=e.useState(C),W=e.useCallback((N,Z,J,Le)=>{V(J.clientWidth)},[]),B=e.useCallback(()=>{c&&w&&w()},[c,w]),j=e.useCallback(N=>{N&&P(N)},[]);e.useEffect(()=>{V(C)},[C]),e.useEffect(()=>{if(!A.current)return;const N=A.current.style.pointerEvents;return l&&c&&(A.current.style.pointerEvents="none"),()=>{A.current&&(A.current.style.pointerEvents=N)}},[c,l,E.style]);const{onPointerDownCapture:G}=sl(B,E),R=e.useMemo(()=>({enter:y?ee.EnterLeft:ee.EnterRight,enterActive:y?ee.EnterActiveLeft:ee.EnterActiveRight,enterDone:y?ee.EnterDoneLeft:ee.EnterDoneRight,exit:y?ee.ExitLeft:ee.ExitRight,exitActive:y?ee.ExitActiveLeft:ee.ExitActiveRight,exitDone:y?ee.ExitDoneLeft:ee.ExitDoneRight}),[y]),Y=e.useMemo(()=>({width:T,height:"100%"}),[T]),he=e.useMemo(()=>({position:h,"--slide-out-width":`${T}${typeof T=="number"?"px":""}`}),[h,T]),O=e.useMemo(()=>({left:f&&!y,right:f&&y}),[y,f]),$=e.useMemo(()=>t.jsx(Ne.CSSTransition,{classNames:R,in:l,timeout:ul,unmountOnExit:!0,mountOnEnter:!0,onEntering:g,onExited:x,children:t.jsx(m.Flex,{className:o,top:"0",bottom:"0",left:y?"0":void 0,right:y?void 0:"0",position:h,asChild:!0,style:r,onPointerDownCapture:G,ref:n,children:t.jsx(Me.Resizable,{as:"div",onResize:W,size:Y,style:he,minWidth:v,maxWidth:L,enable:O,children:b})})}),[R,l,g,x,o,y,h,r,G,n,W,Y,he,v,L,O,b]);return t.jsxs(m.Flex,{ref:j,width:"100%",height:"100%",direction:"row",position:"relative",style:{overflow:"hidden",maxWidth:"100%",maxHeight:"100%"},children:[p==="left"&&!d&&t.jsxs(t.Fragment,{children:[l&&u," ",b&&$]}),t.jsx(m.Flex,{ref:A,grow:"1",height:"100%",style:{maxWidth:"100%",maxHeight:"100%",overflow:"hidden"},children:s}),p==="right"&&!d&&t.jsxs(t.Fragment,{children:[l&&u," ",b&&$]})]})})),fl="30%",Zi=e.memo(e.forwardRef((i,n)=>{const{small:o,hideLayout:r}=Ce(),{className:s,showSlideOut:l,setShowSlideOut:d,defaultOpen:c,side:u,...f}=i;e.useEffect(()=>{o&&(c==null?void 0:c.small)!==void 0?d(c==null?void 0:c.small):!o&&(c==null?void 0:c.large)!==void 0&&d(c==null?void 0:c.large)},[c,d,o]);const p=e.useCallback(()=>{d(!1)},[d]),h=e.useMemo(()=>({open:l,initialWidth:fl,modal:o,onDismiss:p,position:o?"absolute":"relative",...f}),[p,f,l,o]);return!r&&t.jsx(Ji,{className:F(`overmap-layout-slideOut-${u}`,s),side:u,ref:n,...h})})),hl=e.memo(e.forwardRef((i,n)=>{const{showLeftSlideOut:o,setShowLeftSlideOut:r}=Ce();return t.jsx(Zi,{side:"left",showSlideOut:o,setShowSlideOut:r,ref:n,...i})})),pl=e.memo(e.forwardRef((i,n)=>{const{showRightSlideOut:o,setShowRightSlideOut:r}=Ce();return t.jsx(Zi,{side:"right",showSlideOut:o,setShowSlideOut:r,ref:n,...i})}));function gl(i,n){switch(n){case"toggle":return!i;case"open":return!0;case"close":return!1}}const Cl=e.memo(e.forwardRef((i,n)=>{const{side:o,type:r="toggle",children:s}=i,{setShowLeftSlideOut:l,setShowRightSlideOut:d}=Ce(),c=e.useCallback(()=>{(o==="left"?l:d)(f=>gl(f,r))},[l,d,o,r]);return t.jsx(Pe.Slot,{ref:n,onClick:c,children:s})})),ml={Root:Yi,Container:ol,SlideOutOverlay:ll,LeftSlideOut:hl,RightSlideOut:pl,SlideOutTrigger:Cl},ie={EnterRight:"_EnterRight_1jwyv_2",EnterActiveRight:"_EnterActiveRight_1jwyv_6",EnterDoneRight:"_EnterDoneRight_1jwyv_11",ExitRight:"_ExitRight_1jwyv_15",ExitActiveRight:"_ExitActiveRight_1jwyv_19",ExitDoneRight:"_ExitDoneRight_1jwyv_24",EnterLeft:"_EnterLeft_1jwyv_29",EnterActiveLeft:"_EnterActiveLeft_1jwyv_33",EnterDoneLeft:"_EnterDoneLeft_1jwyv_38",ExitLeft:"_ExitLeft_1jwyv_42",ExitActiveLeft:"_ExitActiveLeft_1jwyv_46",ExitDoneLeft:"_ExitDoneLeft_1jwyv_51",Overlay:"_Overlay_1jwyv_56"},vl=200,Ll=e.memo(e.forwardRef((i,n)=>{const{className:o,style:r,children:s,open:l,modal:d=!1,resizeable:c=!0,side:u,position:f="relative",initialWidth:p,minWidth:h,maxWidth:C,onDismiss:v,onOpening:L,onClosed:w}=i,g=u==="left",[x,b]=e.useState(p),y=e.useCallback((A,T,V,W)=>{b(V.clientWidth)},[]),E=e.useCallback(A=>{d&&v&&v(A)},[d,v]);e.useEffect(()=>{b(p)},[p]);const P=e.useMemo(()=>({enter:g?ie.EnterLeft:ie.EnterRight,enterActive:g?ie.EnterActiveLeft:ie.EnterActiveRight,enterDone:g?ie.EnterDoneLeft:ie.EnterDoneRight,exit:g?ie.ExitLeft:ie.ExitRight,exitActive:g?ie.ExitActiveLeft:ie.ExitActiveRight,exitDone:g?ie.ExitDoneLeft:ie.ExitDoneRight}),[g]);return t.jsx(Ne.CSSTransition,{classNames:P,in:l,timeout:vl,unmountOnExit:!0,mountOnEnter:!0,onEntering:L,onExited:w,children:t.jsx(ao.DismissableLayer,{disableOutsidePointerEvents:d,style:r,onInteractOutside:E,onEscapeKeyDown:E,asChild:!0,children:t.jsx(m.Flex,{className:o,ref:n,top:"0",bottom:"0",left:g?"0":void 0,right:g?void 0:"0",position:f,asChild:!0,children:t.jsx(Me.Resizable,{onResize:y,size:{width:x,height:"100%"},style:{position:f,"--slide-out-width":`${x}${typeof x=="number"?"px":""}`},minWidth:h,maxWidth:C,enable:{left:c&&!g,right:c&&g},children:s})})},d?"1":"0")})})),me={accommodateCharCount:"_accommodateCharCount_1octa_1",wrapper:"_wrapper_1octa_5",default:"_default_1octa_10",noLeftIcon:"_noLeftIcon_1octa_14",noRightIcon:"_noRightIcon_1octa_18",ghost:"_ghost_1octa_22",charCount:"_charCount_1octa_40"},Sl=e.forwardRef(function({className:n,leftSlot:o,rightSlot:r,size:s="medium",showInputLength:l,value:d,variant:c,severity:u="primary",...f},p){const h=de(s,xe),C=K(u),v=l||l===void 0&&f.maxLength!==void 0,L=d!==void 0?d.toString():void 0;return t.jsxs(m.TextField.Root,{className:F(me.wrapper,n,{[me.ghost]:c==="ghost",[me.accommodateCharCount]:v}),size:h,variant:c!=="ghost"?c:void 0,color:C,children:[o&&t.jsx(m.TextField.Slot,{children:o}),t.jsx(m.TextField.Input,{className:F(me.default,{[me.noLeftIcon]:!o,[me.noRightIcon]:!r}),ref:p,value:d,size:h,variant:c!=="ghost"?c:void 0,color:C,...f}),r&&t.jsx(m.TextField.Slot,{children:r}),v&&t.jsx(m.Text,{as:"p",className:me.charCount,size:"1",color:"gray",children:f.maxLength!==void 0?`${L==null?void 0:L.length}/${f.maxLength}`:`${L==null?void 0:L.length}`})]})}),di=e.memo(Sl),We={ItemStack:"_ItemStack_tj494_1",Row:"_Row_tj494_4",Column:"_Column_tj494_7",ItemStackItem:"_ItemStackItem_tj494_11"},yl=e.memo(e.forwardRef((i,n)=>{const{children:o}=i;return t.jsx("div",{ref:n,className:We.ItemStackItem,"data-item-stack":"",children:o})})),wl=e.memo(e.forwardRef((i,n)=>{const{children:o,direction:r,offset:s}=i,l=Oi(s);return t.jsx(m.Flex,{className:F(We.ItemStack,{[We.Row]:r==="row",[We.Column]:r==="column"}),ref:n,direction:r,width:"max-content",height:"max-content",position:"relative",style:{"--item-stack-offset":l??"0"},children:o})})),xl={Item:yl,Group:wl},bl=e.memo(function({color:n,severity:o,children:r}){const s=K(o??"primary"),l=e.useMemo(()=>({"data-accent-color":o&&s?s:n||"gray",style:{color:"var(--accent-a9)"}}),[n,o,s]);return e.cloneElement(r,{...l})}),_l={wrapper:"_wrapper_tmtz0_1"},Fl=e.forwardRef(function({className:n,trigger:o,open:r,onOpenChange:s,defaultOpen:l=!1,modal:d=!1,children:c,...u},f){return t.jsxs(m.Popover.Root,{defaultOpen:l,modal:d,open:r,onOpenChange:s,children:[t.jsx(m.Popover.Trigger,{children:o}),t.jsx(m.Popover.Content,{ref:f,className:F("overmap-popover",n,_l.wrapper),...u,children:c(m.Popover.Close)})]})}),et=e.memo(Fl),te={wrapper:"_wrapper_1ssf2_1",panelContent:"_panelContent_1ssf2_6",left:"_left_1ssf2_14",right:"_right_1ssf2_18",resizable:"_resizable_1ssf2_23",resizeHandle:"_resizeHandle_1ssf2_28",panelMainContent:"_panelMainContent_1ssf2_48"},it=200,ue=150,kl=e.memo(function({children:n,showLeft:o,leftPanel:r,leftMinWidth:s=it,showRight:l,rightPanel:d,rightMinWidth:c=it,resizeable:u}){const f=e.useRef(null),p=e.useRef(null),[h,C]=e.useState(0),[v,L]=e.useState(),w=e.useRef(null),[g,x]=e.useState(0),[b,y]=e.useState(),E=e.useCallback((O,$,N)=>(Z,J,Le,Ee)=>{if(!f.current)return;const Te=O+Ee.width;N(f.current.clientWidth-Te),$(()=>Te)},[]),P=e.useCallback((O,$,N,Z)=>E(h,C,y)(O,$,N,Z),[E,h]),A=e.useCallback((O,$,N,Z)=>E(g,x,L)(O,$,N,Z),[E,g]),T=e.useCallback((O,$,N,Z,J,Le,Ee,Te)=>{if(!f.current)return;let De=O;if(De===0&&(De=$,N(De)),Le){const pe=f.current.clientWidth-De;Te(pe),J>pe&&(Ee(pe),Z(f.current.clientWidth-pe))}},[]),V=e.useCallback(()=>T(g,c,x,y,h,o,C,L),[T,h,c,g,o]),W=e.useCallback(()=>T(h,s,C,L,g,l,x,y),[T,s,h,g,l]),B=e.useCallback((O,$)=>{f.current&&O&&$(f.current.clientWidth)},[]),j=e.useCallback(()=>B(o,L),[B,o]),G=e.useCallback(()=>B(l,y),[B,l]),R=e.useCallback(()=>{var O,$,N,Z;f.current&&(L(f.current.clientWidth-(((O=w.current)==null?void 0:O.clientWidth)||0)),y(f.current.clientWidth-((($=p.current)==null?void 0:$.clientWidth)||0)),C(((N=p.current)==null?void 0:N.clientWidth)||0),x(((Z=w.current)==null?void 0:Z.clientWidth)||0))},[]);e.useEffect(()=>{if(!f.current)return;const O=new ResizeObserver(R);return O.observe(f.current),()=>{O.disconnect()}},[R]);const Y=e.useMemo(()=>({entering:{transform:`translateX(-${h}px)`,marginRight:`-${h}px`,transitionProperty:"transform, margin-right",transitionDuration:`${ue}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginRight:0,transitionProperty:"transform, margin-right",transitionDuration:`${ue}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(-${h}px)`,marginRight:`-${h}px`,transitionProperty:"transform, margin-right",transitionDuration:`${ue}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[h]),he=e.useMemo(()=>({entering:{transform:`translateX(${g}px)`,marginLeft:`${-g}px`,transitionProperty:"transform, margin-left",transitionDuration:`${ue}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginLeft:0,transitionProperty:"transform, margin-left",transitionDuration:`${ue}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(${g}px)`,marginLeft:`${-g}px`,transitionProperty:"transform, margin-left",transitionDuration:`${ue}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[g]);return t.jsxs(m.Flex,{className:te.wrapper,style:{minWidth:`${s+c}px`},ref:f,width:"100%",height:"100%",justify:"center",m:"0",p:"0",children:[t.jsx(Ne.Transition,{nodeRef:p,timeout:o?0:ue,in:o,unmountOnExit:!0,onEntering:W,onExited:G,children:O=>t.jsx(m.Box,{ref:p,className:F(te.panelContent,te.left),style:Y[O],width:"auto",height:"100%",m:"0",p:"0",children:t.jsx(Me.Resizable,{className:te.resizable,size:{width:h,height:"100%"},onResizeStop:P,enable:{right:(u==null?void 0:u.left)!==void 0?u.left:!0},minWidth:s,maxWidth:v,handleClasses:{right:F(te.resizeHandle,te.left)},handleComponent:{right:t.jsx(M,{icon:"RiDraggable",height:"14px",width:"14px"})},children:r})})}),t.jsx("div",{className:te.panelMainContent,children:n}),t.jsx(Ne.Transition,{nodeRef:w,timeout:l?0:ue,in:l,unmountOnExit:!0,onEntering:V,onExited:j,children:O=>t.jsx(m.Box,{ref:w,className:F(te.panelContent,te.right),style:he[O],width:"auto",height:"100%",m:"0",p:"0",children:t.jsx(Me.Resizable,{className:te.resizable,size:{width:g,height:"100%"},onResizeStop:A,enable:{left:(u==null?void 0:u.right)!==void 0?u.right:!0},minWidth:c,maxWidth:b,handleClasses:{left:F(te.resizeHandle,te.right)},handleComponent:{left:t.jsx(M,{icon:"RiDraggable",height:"14px",width:"14px"})},children:d})})})]})}),je={multiPagePopover:"_multiPagePopover_16xvh_1",pageTitle:"_pageTitle_16xvh_12",buttonContainer:"_buttonContainer_16xvh_16",optionsButtonContainer:"_optionsButtonContainer_16xvh_21",optionsButton:"_optionsButton_16xvh_21"};function tt(i,n,o,r=0){if(!i.options)return i.content||t.jsx(t.Fragment,{});const s=i.options.map((l,d)=>t.jsx(be,{className:F(je.optionsButton,l.buttonClassName),variant:"ghost",radius:"large",style:{width:o==="vertical"?"100%":"auto"},severity:"info",highContrast:!0,onClick:l.onClick||(()=>n(tt(l.page||{},n,o,r+1))),children:l.label},`${l.value}-page-${r}-button-${d}`));return t.jsxs(t.Fragment,{children:[i.title&&t.jsx(m.Text,{className:je.pageTitle,size:"3",children:i.title}),i.content,t.jsx("div",{className:F(je.optionsButtonContainer,i.buttonsContainerClassName),style:{flexDirection:o==="vertical"?"column":"row"},children:s})]})}const El=e.forwardRef(function({page:n,className:o,direction:r="vertical",...s},l){const[d,c]=e.useState(void 0),u=e.useCallback(()=>{c(tt(n,c,r,0))},[r,n]),f=e.useCallback(p=>d,[d]);return t.jsx(et,{className:F(je.multiPagePopover,o),ref:l,onOpenAutoFocus:u,onCloseAutoFocus:u,...s,children:p=>f(p)})}),nt=e.memo(El),rt={charCount:"_charCount_1lz28_1",ghost:"_ghost_1lz28_5"},Tl=e.forwardRef(function({className:n,showInputLength:o,inputLengthTemplate:r,value:s,severity:l="primary",resize:d,variant:c,...u},f){const p=K(l),h=K("info"),C=o||o===void 0&&(u.maxLength!==void 0||u.minLength!==void 0),v=s!==void 0?s.toString():"",L=e.useMemo(()=>{if(r){let w=r.replace("{current}",v.length.toString());return u.minLength!==void 0&&(w=w.replace("{min}",u.minLength.toString())),u.maxLength!==void 0&&(w=w.replace("{max}",u.maxLength.toString())),w}return v.length},[r,u.maxLength,u.minLength,v.length]);return t.jsxs(t.Fragment,{children:[t.jsx(m.TextArea,{className:F("overmap-textarea",n,{[rt.ghost]:c==="ghost"}),style:{resize:d},variant:c!=="ghost"?c:void 0,ref:f,value:s,color:p,...u}),C&&t.jsx(m.Text,{as:"p",className:rt.charCount,color:h,align:"right",children:L})]})}),Dl=e.memo(Tl),Al=e.forwardRef(function({loop:n,type:o,rovingFocus:r,value:s,onValueChange:l,defaultValue:d,disabled:c,items:u,className:f,direction:p="row",...h},C){return t.jsx(Fi.Root,{type:o,className:F("overmap-toggle-group",f),ref:C,value:s,onValueChange:l,disabled:c,orientation:p==="column"?"vertical":"horizontal",loop:n,rovingFocus:r,defaultValue:d,asChild:!0,children:t.jsx(li,{direction:p,...h,children:u.map(({children:v,...L})=>e.createElement(Fi.Item,{asChild:!0,...L,key:L.value},t.jsx(Q,{className:F("overmap-toggle-group-button"),"aria-label":L.value,variant:L.value===s?"solid":"soft",children:v})))})})}),Pl=e.memo(Al),Ml={default:"_default_xqvoc_1"},Ol=e.memo(e.forwardRef(({className:i,minContentGap:n="2",children:o,...r},s)=>t.jsx(co.Root,{className:F(i,"overmap-toolbar",Ml.default),ref:s,asChild:!0,...r,children:t.jsx(se,{grow:"1",width:"100%",height:"max-content",align:"center",gap:n,wrap:"nowrap",children:o})}))),Il=e.memo(e.forwardRef(({children:i,gap:n="2"},o)=>t.jsx(se,{ref:o,grow:"1",width:"max-content",height:"100%",align:"center",gap:n,children:i}))),Rl=e.memo(e.forwardRef(({children:i,gap:n},o)=>t.jsx(se,{ref:o,grow:"1",width:"max-content",direction:"row-reverse",height:"100%",align:"center",gap:n||"2",children:i}))),$l={Root:Ol,LeftContent:Il,RightContent:Rl},ui={ToastViewport:"_ToastViewport_1i6bp_1",actionButton:"_actionButton_1i6bp_20",ToastRoot:"_ToastRoot_1i6bp_24",slideIn:"_slideIn_1i6bp_1",swipeOut:"_swipeOut_1i6bp_1"},Nl=e.forwardRef(function({title:n,description:o,icon:r,severity:s="primary",size:l,onClose:d,sensitivity:c,action:u,...f},p){const[h,C]=e.useState(!0),v=K(s),L=e.useCallback(w=>{!w&&d&&d(),C(w)},[d]);return t.jsx(Oe.Root,{asChild:!0,ref:p,...f,open:h,type:c,onOpenChange:L,children:t.jsx(m.Callout.Root,{className:ui.ToastRoot,variant:"surface",color:v,size:l,children:t.jsxs(m.Flex,{width:"100%",align:"center",gap:"4",justify:"between",children:[t.jsxs(m.Flex,{align:"center",gap:"3",children:[t.jsx(m.Callout.Icon,{children:r}),t.jsxs(m.Flex,{direction:"column",gap:"2",children:[t.jsxs(m.Flex,{direction:"column",gap:"0",children:[t.jsx(Oe.Title,{asChild:!0,children:t.jsx(m.Callout.Text,{size:"3",weight:"medium",children:n})}),t.jsx(Oe.Description,{asChild:!0,children:t.jsx(m.Callout.Text,{children:o})})]}),u&&t.jsx(Oe.Action,{className:ui.actionButton,altText:u.altText,asChild:!0,children:u.content})]})]}),t.jsx(Oe.Close,{asChild:!0,children:t.jsx(Q,{"aria-label":"Close",variant:"ghost",severity:s,children:t.jsx(M,{icon:"RiCloseLine"})})})]})})})}),ot=e.memo(Nl),fi=e.createContext({}),ql=()=>{const i=e.useContext(fi);if(!i)throw new Error("useToast must be used within a ToastProvider");return i},Bl=240/60,lt=5e3,zl=i=>{if(i.duration&&i.duration>=lt)return i.duration;const n=i.severity==="danger"?1.5:1,o=i.description.split(" ").length+i.title.split(" ").length;return(lt+o/Bl)*n};a.unsafeShowToast=void 0;const Ul=e.memo(function({children:n,className:o,hotkey:r,...s}){const[l,d]=e.useState([]),c=e.useCallback((f,p,h)=>{d(C=>{const v=C.find(L=>L.id===f);return v&&p===0&&clearTimeout(v.timeout),C.filter(L=>L.id!==f)}),h&&h()},[]),u=e.useMemo(()=>{let f=0;const p=g=>{const x=zl(g),b=f.toString();f+=1;const y=setTimeout(()=>c(b,1,g.onClose),x);d(E=>[...E,{...g,timeout:y,duration:x,id:b}])},h=g=>p({...g,severity:"primary"}),C=g=>p({...g,severity:"success"}),v=g=>p({...g,severity:"danger"}),L=g=>p({...g,severity:"info"}),w=g=>p({...g,severity:"warning"});return a.unsafeShowToast=p,{showToast:p,showPrimary:h,showSuccess:C,showError:v,showInfo:L,showWarning:w}},[c]);return e.useEffect(()=>()=>{for(const{timeout:f}of l)clearTimeout(f)},[]),t.jsx(fi.Provider,{value:u,children:t.jsxs(ii.ToastProvider,{...s,children:[n,t.jsx(ii.ToastViewport,{className:F(o,ui.ToastViewport),hotkey:r}),l.map(({id:f,onClose:p,...h})=>t.jsx(ot,{...h,onClose:()=>c(f,0,p)},f))]})})}),Hl={default:"_default_1odpt_1"},Vl=e.memo(e.forwardRef(({className:i,children:n,content:o,...r},s)=>t.jsx(m.Tooltip,{className:F("overmap-tooltip",i,Hl.default),ref:s,content:t.jsx(m.Flex,{align:"center",gap:"1",width:"max-content",height:"max-content",justify:"center",children:o}),...r,children:n}))),Wl={ToggleButton:"_ToggleButton_13aus_1"},jl=e.memo(e.forwardRef((i,n)=>{const{children:o,className:r,severity:s,fluid:l,variant:d="solid",size:c,hoverEffects:u,...f}=i;return t.jsx(po.Root,{ref:n,asChild:!0,...f,children:t.jsx(Q,{className:F(r,Wl.ToggleButton),"aria-label":i["aria-label"],severity:s,fluid:l,variant:d,hoverEffects:u,size:c,"data-variant":d,children:o})})})),Gl={noWrap:"_noWrap_1wpa5_1"},Fe=e.memo(e.forwardRef(({className:i,noWrap:n,severity:o,as:r,...s},l)=>{const d=K(o);return t.jsx(m.Text,{ref:l,as:r,className:F(i,{[Gl.noWrap]:n}),color:d,...s})})),wc="",Kl=e.memo(e.forwardRef((i,n)=>{const{panelBackground:o="solid",radius:r="full",...s}=i;return t.jsx(m.Theme,{panelBackground:o,radius:r,ref:n,...s})})),Ge={light:"_light_1u8fs_1",bold:"_bold_1u8fs_8",full:"_full_1u8fs_15",Text:"_Text_1u8fs_22"},Ql={1:"max-content",2:"max-content",3:"max-content",4:"100%"},Xl=e.forwardRef(function({className:n,severity:o="info",textWeight:r="light",gap:s="1",text:l,orientation:d="horizontal",size:c,weight:u="medium",...f},p){const h=de(c,Ql),C=K(o);return t.jsxs(m.Flex,{className:F("overmap-separator",n,{[Ge.light]:u==="light",[Ge.bold]:u==="bold",[Ge.full]:u==="full"}),ref:p,width:d==="horizontal"?h:"max-content",height:d==="vertical"?h:"max-content",direction:d==="vertical"?"column":"row",align:"center",gap:s,children:[t.jsx(m.Separator,{size:c,orientation:d,color:C,...f}),l&&t.jsxs(t.Fragment,{children:[t.jsx(m.Text,{className:Ge.Text,as:"span",size:"1",weight:r,color:C,children:l}),t.jsx(m.Separator,{size:c,orientation:d,color:C,...f})]})]})}),st=e.memo(Xl),hi={placeSelf:"center"},at=e.memo(i=>{const{absoluteCentering:n,message:o="Something went wrong",onRetry:r}=i,{resetBoundary:s}=ki.useErrorBoundary(),l="20px",d=n?{position:"absolute",top:"50%",transform:"translateY(-50%)"}:void 0,c=e.useCallback(()=>{s(),r()},[r,s]);return t.jsxs(se,{gap:"2",direction:"row",width:"100%",style:d,children:[t.jsx("div",{style:{flexGrow:1}}),t.jsx(M,{icon:"RiAlertLine",size:l,style:hi}),t.jsx(Fe,{style:{lineHeight:l,...hi},children:o}),t.jsx(Q,{"aria-label":"Try again",variant:"soft",onClick:c,style:hi,hoverEffects:["spin180Clockwise"],children:t.jsx(M,{icon:"RiLoopLeftLine",size:l})}),t.jsx("div",{style:{flexGrow:1}})]})});at.displayName="ErrorFallback";const ct=e.memo(i=>{const{absoluteCentering:n,message:o}=i,[r,s]=e.useState(0),l=e.useCallback((c,u)=>{console.error(c,u),s(f=>f+1)},[]),d=e.useCallback(()=>{s(c=>c+1)},[]);return t.jsx(ki.ErrorBoundary,{fallback:t.jsx(at,{absoluteCentering:n,message:o,onRetry:d}),onError:l,children:i.children},r)});ct.displayName="OvermapErrorBoundary";const Yl={OvermapInputItem:"_OvermapInputItem_1jgzv_1"},pi=e.memo(e.forwardRef((i,n)=>{const{size:o,className:r,style:s,leftSlot:l,rightSlot:d,...c}=i;return t.jsx(Ue,{className:r,style:s,size:o,leftSlot:l,rightSlot:d,compact:!1,children:t.jsx("input",{className:Yl.OvermapInputItem,ref:n,...c})})}));pi.displayName="OvermapInputItem";const dt=e.createContext({}),fe=()=>e.useContext(dt),Ke=20,ae=8,ut=250,Jl=5,ft=e.memo(i=>{const{children:n,side:o="bottom",align:r="center",offset:s,loop:l=!1,dialog:d=!1,modal:c=d,size:u=d?"3":"2",open:f,onOpenChange:p,defaultOpen:h}=i,[C,v]=ni({state:f,initialState:h??!1,setState:p}),[L,w]=e.useState(null),[g,x]=e.useState(null),b=e.useRef([]),y=k.useFloatingNodeId(),{refs:E,floatingStyles:P,context:A,middlewareData:T}=k.useFloating({nodeId:y,strategy:"fixed",placement:o+(r!=="center"?"-"+r:""),whileElementsMounted:k.autoUpdate,open:C,onOpenChange:v,middleware:[k.offset({mainAxis:s??Jl}),k.size({apply({availableHeight:he,elements:O}){d||(O.floating.style.maxHeight=`${Math.max(he,ut)}px`)},padding:Ke}),k.flip({fallbackStrategy:"initialPlacement"}),k.shift({padding:Ke}),k.hide()]}),V=k.useRole(A,{role:d?"dialog":"menu"}),W=k.useDismiss(A,{ancestorScroll:g==="context"||g==="virtual",outsidePressEvent:d?"mousedown":void 0}),B=k.useClick(A,{enabled:g==="click"}),j=k.useListNavigation(A,{listRef:b,activeIndex:L,onNavigate:w,loop:l}),{getFloatingProps:G,getItemProps:R,getReferenceProps:Y}=k.useInteractions([W,j,B,V]);return t.jsx(k.FloatingTree,{children:t.jsx(dt.Provider,{value:{size:u,open:C,setOpen:v,refs:E,context:A,floatingStyles:P,elementsRef:b,getFloatingProps:G,getItemProps:R,getReferenceProps:Y,nodeId:y,activeIndex:L,setActiveIndex:w,middlewareData:T,side:o,dialog:d,modal:c,setTriggerType:x},children:t.jsx(ze,{size:u,children:n})})})});ft.displayName="Root";const Zl=e.memo(e.forwardRef((i,n)=>{const{children:o,disabled:r=!1}=i,{getReferenceProps:s,refs:l,setTriggerType:d}=fe(),c=k.useMergeRefs([l.setReference,n]);return e.useEffect(()=>{d("click")},[d]),t.jsx(Pe.Slot,{ref:c,"aria-disabled":r,"data-disabled":r?"":void 0,...s({disabled:r}),children:o})})),es=e.memo(e.forwardRef((i,n)=>{const{children:o,disabled:r}=i,s=e.useRef(null),{setOpen:l,refs:d,setTriggerType:c}=fe(),u=k.useMergeRefs([n,s]);e.useEffect(()=>{c("context")},[c]);const f=e.useCallback(p=>{const{clientY:h,clientX:C}=p;!r&&s.current&&(p.preventDefault(),d.setPositionReference({getBoundingClientRect(){return{x:C,y:h,top:h,left:C,height:0,width:0,bottom:h,right:C}},contextElement:s.current}),l(!0))},[r,d,l]);return t.jsx(Pe.Slot,{ref:u,style:{WebkitTouchCallout:r?"none":"unset"},"aria-disabled":r,"data-disabled":r?"":void 0,onContextMenu:f,children:o})})),ht=e.memo(i=>{const{virtualElement:n,disabled:o}=i,{refs:r,setTriggerType:s,setOpen:l}=fe();return e.useEffect(()=>{s("virtual")},[s]),e.useEffect(()=>{!o&&n?(r.setPositionReference(n),l(!0)):(r.setPositionReference(null),l(!1))},[o,r,l,n]),null});ht.displayName="VirtualTrigger";const gi=e.createContext({}),Ci=()=>e.useContext(gi),H={MenuContent:"_MenuContent_t7a5i_41",Dialog:"_Dialog_t7a5i_51",MenuContentInner:"_MenuContentInner_t7a5i_56",slideDownAndFade:"_slideDownAndFade_t7a5i_1",slideLeftAndFade:"_slideLeftAndFade_t7a5i_1",slideUpAndFade:"_slideUpAndFade_t7a5i_1",slideRightAndFade:"_slideRightAndFade_t7a5i_1",MenuOverlay:"_MenuOverlay_t7a5i_83",Modal:"_Modal_t7a5i_90",MenuItem:"_MenuItem_t7a5i_94",MenuSeparator:"_MenuSeparator_t7a5i_121",paddingBottom:"_paddingBottom_t7a5i_121",paddingTop:"_paddingTop_t7a5i_124",extend:"_extend_t7a5i_127",MenuContentScrollArea:"_MenuContentScrollArea_t7a5i_131",MenuContentScrollAreaWrapper:"_MenuContentScrollAreaWrapper_t7a5i_140",ScrollAreaContent:"_ScrollAreaContent_t7a5i_148"},Qe=e.memo(i=>{const{children:n}=i;return t.jsx("div",{className:H.MenuContentScrollAreaWrapper,children:t.jsx(m.ScrollArea,{className:H.MenuContentScrollArea,scrollbars:"vertical",type:"scroll",children:t.jsx("div",{className:H.ScrollAreaContent,children:n})})})});Qe.displayName="Scroll";const is=e.memo(e.forwardRef((i,n)=>{var E;const{children:o,disableScroll:r=!1}=i,{refs:s,getFloatingProps:l,middlewareData:d,elementsRef:c,activeIndex:u,setActiveIndex:f,getItemProps:p,open:h,setOpen:C,nodeId:v,context:L,floatingStyles:w,dialog:g,modal:x,side:b}=fe(),y=e.useMemo(()=>{var P;return{...g?{}:w,visibility:(P=d.hide)!=null&&P.referenceHidden?"hidden":"visible"}},[g,w,(E=d.hide)==null?void 0:E.referenceHidden]);return t.jsx(k.FloatingNode,{id:v,children:h&&t.jsx(k.FloatingPortal,{children:t.jsx(k.FloatingOverlay,{className:F("overmap-menu-overlay",H.MenuOverlay,{[H.Modal]:x}),lockScroll:!0,children:t.jsx(k.FloatingFocusManager,{context:L,children:t.jsx(k.FloatingList,{elementsRef:c,children:t.jsx(gi.Provider,{value:{getItemProps:p,activeIndex:u,elementsRef:c,open:h,setOpen:C,refs:s,setActiveIndex:f},children:t.jsx(m.Theme,{asChild:!0,children:t.jsx("div",{className:F("overmap-menu-content",H.MenuContent,{[H.Dialog]:g}),ref:s.setFloating,tabIndex:-1,style:y,...l(),children:t.jsx("div",{ref:n,className:H.MenuContentInner,"data-side":b,children:r?o:t.jsx(Qe,{children:o})})})})})})})})})})})),pt=e.createContext({}),mi=()=>e.useContext(pt),ts=(i,n)=>{switch(i){case"right":if(n==="start")return{mainAxis:ae+1,crossAxis:-ae};if(n==="end")return{mainAxis:ae+1,crossAxis:ae};break;case"left":if(n==="start")return{mainAxis:ae+1,crossAxis:-ae};if(n==="end")return{mainAxis:ae+1,crossAxis:ae};break}return{mainAxis:ae+1,crossAxis:0}},gt=e.memo(i=>{const{dialog:n}=fe(),{children:o,disabled:r=!1,side:s="right",align:l="start",closeRoot:d=!1,loop:c=!1,modal:u=n,open:f,onOpenChange:p,defaultOpen:h}=i,[C,v]=ni({initialState:h??!1,state:f,setState:p}),L=k.useFloatingNodeId(),{refs:w,floatingStyles:g,context:x}=k.useFloating({nodeId:L,strategy:"fixed",whileElementsMounted:k.autoUpdate,open:C,onOpenChange:(G,R,Y)=>{Y&&v(G)},placement:s+(l!=="center"?"-"+l:""),middleware:[k.offset({...ts(s,l)}),k.size({padding:Ke,apply({availableHeight:G,elements:R}){n||(R.floating.style.maxHeight=`${Math.max(G,ut)}px`)}}),k.flip(),k.shift({padding:Ke}),k.hide()]}),b=k.useDismiss(x,{bubbles:d,outsidePress:d}),y=k.useHover(x,{restMs:50,handleClose:k.safePolygon({blockPointerEvents:!0,requireIntent:!1}),enabled:!r&&!n}),E=k.useClick(x,{enabled:!r&&n}),P=e.useRef([]),[A,T]=e.useState(null),V=k.useListNavigation(x,{listRef:P,nested:!0,activeIndex:A,onNavigate:T,loop:c,rtl:s==="left"}),{getFloatingProps:W,getItemProps:B,getReferenceProps:j}=k.useInteractions([V,b,y,E]);return t.jsx(pt.Provider,{value:{open:C,setOpen:v,nodeId:L,refs:w,floatingStyles:g,context:x,elementsRef:P,activeIndex:A,setActiveIndex:T,getFloatingProps:W,getItemProps:B,getReferenceProps:j,disabled:r,side:s,closeRoot:d,modal:u},children:o})});gt.displayName="SubMenu";const ns=["Enter"," "],Re=e.memo(e.forwardRef((i,n)=>{const o=fe(),{getItemProps:r,activeIndex:s,setOpen:l}=Ci(),{closeRoot:d}=mi(),{className:c,children:u,onSelect:f,onClick:p,onKeyDown:h,closeOnSelect:C=!0,size:v=o.size,leftSlot:L,rightSlot:w,disabled:g,...x}=i,{ref:b,index:y}=k.useListItem(),E=k.useMergeRefs([b,n]),P=e.useCallback(j=>{g||(p&&p(j),f&&f(),C&&l(!1),d&&o.setOpen(!1))},[C,d,g,o,p,f,l]),A=e.useCallback(j=>{g||(h&&h(j),ns.includes(j.key)&&(f&&f(),C&&l(!1)))},[C,g,h,f,l]),T=e.useMemo(()=>y===s,[s,y]),V=e.useMemo(()=>typeof u=="function"?u({active:T,selected:!1}):u,[u,T]),W=e.useMemo(()=>typeof L=="function"?L({active:T,selected:!1}):L,[T,L]),B=e.useMemo(()=>typeof w=="function"?w({active:T,selected:!1}):w,[T,w]);return t.jsx(Ue,{className:F(c,H.MenuItem),ref:E,leftSlot:W,rightSlot:B,size:v,role:"menuitem",type:"button","data-disabled":g?"":void 0,"aria-disabled":g,"data-highlighted":T?"":void 0,...r({onClick:P,onKeyDown:A,tabIndex:T?0:-1,...x}),children:V})})),rs=e.memo(e.forwardRef((i,n)=>{var A;const{children:o,disableScroll:r}=i,{middlewareData:s,dialog:l}=fe(),{open:d,nodeId:c,refs:u,context:f,getFloatingProps:p,getItemProps:h,activeIndex:C,setActiveIndex:v,elementsRef:L,floatingStyles:w,setOpen:g,side:x,modal:b}=mi(),y=e.useRef(null),E=k.useMergeRefs([u.setFloating,y]),P=e.useMemo(()=>{var T;return{...l?{}:w,visibility:(T=s.hide)!=null&&T.referenceHidden?"hidden":"visible"}},[l,w,(A=s.hide)==null?void 0:A.referenceHidden]);return t.jsx(k.FloatingNode,{id:c,children:d&&t.jsx(k.FloatingPortal,{children:t.jsx(k.FloatingOverlay,{className:F("overmap-menu-overlay",H.MenuOverlay,{[H.Modal]:b}),lockScroll:!0,children:t.jsx(k.FloatingFocusManager,{context:f,initialFocus:y,children:t.jsx(k.FloatingList,{elementsRef:L,children:t.jsx(gi.Provider,{value:{getItemProps:h,activeIndex:C,setActiveIndex:v,elementsRef:L,open:d,setOpen:g,refs:u},children:t.jsx(m.Theme,{asChild:!0,children:t.jsx("div",{className:F("overmap-menu-sub-content",H.MenuContent,{[H.Dialog]:l}),ref:E,style:P,"data-side":x,...p(),children:t.jsx("div",{ref:n,className:H.MenuContentInner,"data-side":x,children:r?o:t.jsx(Qe,{children:o})})})})})})})})})})})),os=e.memo(e.forwardRef((i,n)=>{const{size:o,children:r,...s}=i,{refs:l,getReferenceProps:d,open:c,disabled:u}=mi(),f=k.useMergeRefs([n,l.setReference]);return t.jsx(Re,{ref:f,closeOnSelect:!1,"aria-haspopup":"menu","data-open":c,size:o,disabled:u,...d(s),children:r})})),vi=e.memo(e.forwardRef((i,n)=>{const{children:o}=i;return t.jsx(m.Flex,{ref:n,role:"group",width:"100%",height:"max-content",direction:"column",children:o})})),Ct=e.createContext({});function mt(){return e.useContext(Ct)}const Li=e.memo(i=>{const{type:n,children:o}=i,[r,s]=e.useState(n==="single"?(i==null?void 0:i.defaultValue)??null:null),[l,d]=e.useState(n==="multi"?(i==null?void 0:i.defaultValues)??[]:[]),c=e.useCallback(p=>{d(p),n==="multi"&&(i!=null&&i.onValuesChange)&&i.onValuesChange(p)},[i,n]),u=e.useCallback(p=>{s(p),n==="single"&&(i!=null&&i.onValueChange)&&i.onValueChange(p)},[i,n]),f=e.useMemo(()=>n==="multi"?{type:n,values:(i==null?void 0:i.values)??l,handleValuesChange:c}:{type:n,value:i.value??r,handleValueChange:u},[r,l,u,c,i,n]);return t.jsx(Ct.Provider,{value:f,children:o})});Li.displayName="SelectContextProvider";const ls=e.memo(e.forwardRef((i,n)=>{const{children:o,value:r,onValueChange:s}=i;return t.jsx(Li,{type:"single",value:r,onValueChange:s,children:t.jsx(vi,{ref:n,children:o})})})),ss=e.memo(e.forwardRef((i,n)=>{const{values:o,onValuesChange:r,...s}=i;return t.jsx(Li,{type:"multi",values:o,onValuesChange:r,children:t.jsx(vi,{ref:n,...s})})})),Si=e.createContext({}),as=()=>e.useContext(Si),vt=e.memo(i=>{const{children:n}=i,{selected:o}=as();return t.jsx(t.Fragment,{children:o?n:null})});vt.displayName="SelectedIndicator";const cs=e.memo(e.forwardRef((i,n)=>{const{onSelect:o,children:r,closeOnSelect:s=!1,leftSlot:l,rightSlot:d,value:c,...u}=i,{values:f,handleValuesChange:p}=mt(),h=e.useMemo(()=>f.includes(c),[c,f]),C=e.useCallback(()=>{p(h?f.filter(g=>g!==c):[...f,c]),o&&o()},[p,o,h,c,f]),v=e.useMemo(()=>typeof r=="function"?({active:g})=>r({selected:h,active:g}):r,[r,h]),L=e.useMemo(()=>typeof l=="function"?({active:g})=>l({selected:h,active:g}):l,[l,h]),w=e.useMemo(()=>typeof d=="function"?({active:g})=>d({selected:h,active:g}):d,[d,h]);return t.jsx(Si.Provider,{value:{selected:h},children:t.jsx(Re,{ref:n,role:"menuitemcheckbox",onSelect:C,leftSlot:L,rightSlot:w,closeOnSelect:s,...u,children:v})})})),ds=e.memo(e.forwardRef((i,n)=>{const{value:o,onSelect:r,children:s,closeOnSelect:l=!1,leftSlot:d,rightSlot:c,...u}=i,{value:f,handleValueChange:p}=mt(),h=e.useMemo(()=>o===f,[f,o]),C=e.useCallback(()=>{p(h?null:o),r&&r()},[p,r,h,o]),v=e.useMemo(()=>typeof s=="function"?({active:g})=>s({selected:h,active:g}):s,[s,h]),L=e.useMemo(()=>typeof d=="function"?({active:g})=>d({selected:h,active:g}):d,[d,h]),w=e.useMemo(()=>typeof c=="function"?({active:g})=>c({selected:h,active:g}):c,[c,h]);return t.jsx(Si.Provider,{value:{selected:h},children:t.jsx(Re,{ref:n,role:"menuitemcheckbox",onSelect:C,rightSlot:w,leftSlot:L,closeOnSelect:l,...u,children:v})})})),Lt=e.createContext({}),St=()=>e.useContext(Lt),yt=e.memo(i=>{const{children:n,defaultPage:o,page:r,onPageChange:s}=i,[l,d]=ni({state:r,initialState:o??"",setState:s});return t.jsx(Lt.Provider,{value:{activePage:l,setActivePage:d},children:n})});yt.displayName="Pages";const wt=e.memo(i=>{const{page:n,children:o}=i,{activePage:r}=St();return t.jsx(t.Fragment,{children:r===n?o:null})});wt.displayName="PageContent";const us=e.memo(e.forwardRef((i,n)=>{const{onSelect:o,page:r,...s}=i,{refs:l,setActiveIndex:d}=Ci(),{setActivePage:c}=St(),u=e.useCallback(()=>{var f;c(r),(f=l.floating.current)==null||f.focus(),d(null),o&&o()},[o,r,l.floating,d,c]);return t.jsx(Re,{ref:n,onSelect:u,closeOnSelect:!1,...s})})),fs=e.memo(e.forwardRef((i,n)=>{const{className:o,extend:r=!1,spacingBelow:s=!0,spacingAbove:l=!0,...d}=i;return t.jsx("div",{className:F(o,H.MenuSeparator,{[H.extend]:r,[H.paddingTop]:l,[H.paddingBottom]:s}),children:t.jsx(st,{ref:n,size:"4",weight:"light",...d})})})),hs=e.memo(e.forwardRef((i,n)=>{const{onValueChange:o,onChange:r}=i,{size:s}=fe(),{activeIndex:l,getItemProps:d}=Ci(),{index:c,ref:u}=k.useListItem(),f=k.useMergeRefs([u,n]),p=e.useCallback(h=>{r&&r(h),o&&o(h.target.value)},[r,o]);return e.useEffect(()=>()=>{o&&o("")},[]),t.jsx(pi,{ref:f,size:s,...d({...i,tabIndex:c===l?0:-1,onChange:p})})})),X={Root:ft,ClickTrigger:Zl,ContextTrigger:es,VirtualTrigger:ht,Content:is,Item:Re,Sub:gt,SubContent:rs,SubTrigger:os,Group:vi,SelectGroup:ls,MultiSelectGroup:ss,MultiSelectItem:cs,SelectItem:ds,SelectedIndicator:vt,PageContent:wt,Pages:yt,PageTrigger:us,Separator:fs,Input:hs,Scroll:Qe},xt=e.memo(i=>{const{trigger:n,disabled:o,items:r,...s}=i;return t.jsxs(X.Root,{...s,children:[t.jsx(X.ClickTrigger,{disabled:o,children:n}),t.jsx(X.Content,{children:r.map((l,d)=>t.jsx(X.Item,{...l},d))})]})});xt.displayName="DropdownMenu";const bt=e.memo(i=>{const{trigger:n,disabled:o,items:r,value:s,onValueChange:l,...d}=i;return t.jsxs(X.Root,{...d,children:[t.jsx(X.ClickTrigger,{disabled:o,children:n}),t.jsx(X.Content,{children:t.jsx(X.SelectGroup,{value:s,onValueChange:l,children:r.map((c,u)=>t.jsx(X.SelectItem,{...c},u))})})]})});bt.displayName="DropdownSelect";const _t=e.memo(i=>{const{trigger:n,disabled:o,items:r,values:s,onValuesChange:l,...d}=i;return t.jsxs(X.Root,{...d,children:[t.jsx(X.ClickTrigger,{disabled:o,children:n}),t.jsx(X.Content,{children:t.jsx(X.MultiSelectGroup,{values:s,onValuesChange:l,children:r.map((c,u)=>t.jsx(X.MultiSelectItem,{...c},u))})})]})});_t.displayName="DropdownMultiSelect";function ke(){return ke=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(i[r]=o[r])}return i},ke.apply(this,arguments)}function ps(i,n){typeof i=="function"?i(n):i!=null&&(i.current=n)}function gs(...i){return n=>i.forEach(o=>ps(o,n))}function Ft(...i){return e.useCallback(gs(...i),i)}function Cs(i,n=[]){let o=[];function r(l,d){const c=e.createContext(d),u=o.length;o=[...o,d];function f(h){const{scope:C,children:v,...L}=h,w=(C==null?void 0:C[i][u])||c,g=e.useMemo(()=>L,Object.values(L));return e.createElement(w.Provider,{value:g},v)}function p(h,C){const v=(C==null?void 0:C[i][u])||c,L=e.useContext(v);if(L)return L;if(d!==void 0)return d;throw new Error(`\`${h}\` must be used within \`${l}\``)}return f.displayName=l+"Provider",[f,p]}const s=()=>{const l=o.map(d=>e.createContext(d));return function(c){const u=(c==null?void 0:c[i])||l;return e.useMemo(()=>({[`__scope${i}`]:{...c,[i]:u}}),[c,u])}};return s.scopeName=i,[r,ms(s,...n)]}function ms(...i){const n=i[0];if(i.length===1)return n;const o=()=>{const r=i.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const d=r.reduce((c,{useScope:u,scopeName:f})=>{const h=u(l)[`__scope${f}`];return{...c,...h}},{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])}};return o.scopeName=n.scopeName,o}function kt(i,n,{checkForDefaultPrevented:o=!0}={}){return function(s){if(i==null||i(s),o===!1||!s.defaultPrevented)return n==null?void 0:n(s)}}function Et(i){const n=e.useRef(i);return e.useEffect(()=>{n.current=i}),e.useMemo(()=>(...o)=>{var r;return(r=n.current)===null||r===void 0?void 0:r.call(n,...o)},[])}function vs({prop:i,defaultProp:n,onChange:o=()=>{}}){const[r,s]=Ls({defaultProp:n,onChange:o}),l=i!==void 0,d=l?i:r,c=Et(o),u=e.useCallback(f=>{if(l){const h=typeof f=="function"?f(i):f;h!==i&&c(h)}else s(f)},[l,i,s,c]);return[d,u]}function Ls({defaultProp:i,onChange:n}){const o=e.useState(i),[r]=o,s=e.useRef(r),l=Et(n);return e.useEffect(()=>{s.current!==r&&(l(r),s.current=r)},[r,s,l]),o}function Ss(i){const n=e.useRef({value:i,previous:i});return e.useMemo(()=>(n.current.value!==i&&(n.current.previous=n.current.value,n.current.value=i),n.current.previous),[i])}const yi=globalThis!=null&&globalThis.document?e.useLayoutEffect:()=>{};function ys(i){const[n,o]=e.useState(void 0);return yi(()=>{if(i){o({width:i.offsetWidth,height:i.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let d,c;if("borderBoxSize"in l){const u=l.borderBoxSize,f=Array.isArray(u)?u[0]:u;d=f.inlineSize,c=f.blockSize}else d=i.offsetWidth,c=i.offsetHeight;o({width:d,height:c})});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else o(void 0)},[i]),n}function ws(i,n){return e.useReducer((o,r)=>{const s=n[o][r];return s??o},i)}const Tt=i=>{const{present:n,children:o}=i,r=xs(n),s=typeof o=="function"?o({present:r.isPresent}):e.Children.only(o),l=Ft(r.ref,s.ref);return typeof o=="function"||r.isPresent?e.cloneElement(s,{ref:l}):null};Tt.displayName="Presence";function xs(i){const[n,o]=e.useState(),r=e.useRef({}),s=e.useRef(i),l=e.useRef("none"),d=i?"mounted":"unmounted",[c,u]=ws(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const f=Xe(r.current);l.current=c==="mounted"?f:"none"},[c]),yi(()=>{const f=r.current,p=s.current;if(p!==i){const C=l.current,v=Xe(f);i?u("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(p&&C!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=i}},[i,u]),yi(()=>{if(n){const f=h=>{const v=Xe(r.current).includes(h.animationName);h.target===n&&v&&_i.flushSync(()=>u("ANIMATION_END"))},p=h=>{h.target===n&&(l.current=Xe(r.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback(f=>{f&&(r.current=getComputedStyle(f)),o(f)},[])}}function Xe(i){return(i==null?void 0:i.animationName)||"none"}const Dt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((i,n)=>{const o=e.forwardRef((r,s)=>{const{asChild:l,...d}=r,c=l?Pe.Slot:n;return e.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),e.createElement(c,ke({},d,{ref:s}))});return o.displayName=`Primitive.${n}`,{...i,[n]:o}},{}),At="Checkbox",[bs,jc]=Cs(At),[_s,Fs]=bs(At),ks=e.forwardRef((i,n)=>{const{__scopeCheckbox:o,name:r,checked:s,defaultChecked:l,required:d,disabled:c,value:u="on",onCheckedChange:f,...p}=i,[h,C]=e.useState(null),v=Ft(n,y=>C(y)),L=e.useRef(!1),w=h?!!h.closest("form"):!0,[g=!1,x]=vs({prop:s,defaultProp:l,onChange:f}),b=e.useRef(g);return e.useEffect(()=>{const y=h==null?void 0:h.form;if(y){const E=()=>x(b.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[h,x]),e.createElement(_s,{scope:o,state:g,disabled:c},e.createElement(Dt.button,ke({type:"button",role:"checkbox","aria-checked":ve(g)?"mixed":g,"aria-required":d,"data-state":Pt(g),"data-disabled":c?"":void 0,disabled:c,value:u},p,{ref:v,onKeyDown:kt(i.onKeyDown,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:kt(i.onClick,y=>{x(E=>ve(E)?!0:!E),w&&(L.current=y.isPropagationStopped(),L.current||y.stopPropagation())})})),w&&e.createElement(Ds,{control:h,bubbles:!L.current,name:r,value:u,checked:g,required:d,disabled:c,style:{transform:"translateX(-100%)"}}))}),Es="CheckboxIndicator",Ts=e.forwardRef((i,n)=>{const{__scopeCheckbox:o,forceMount:r,...s}=i,l=Fs(Es,o);return e.createElement(Tt,{present:r||ve(l.state)||l.state===!0},e.createElement(Dt.span,ke({"data-state":Pt(l.state),"data-disabled":l.disabled?"":void 0},s,{ref:n,style:{pointerEvents:"none",...i.style}})))}),Ds=i=>{const{control:n,checked:o,bubbles:r=!0,...s}=i,l=e.useRef(null),d=Ss(o),c=ys(n);return e.useEffect(()=>{const u=l.current,f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(d!==o&&h){const C=new Event("click",{bubbles:r});u.indeterminate=ve(o),h.call(u,ve(o)?!1:o),u.dispatchEvent(C)}},[d,o,r]),e.createElement("input",ke({type:"checkbox","aria-hidden":!0,defaultChecked:ve(o)?!1:o},s,{tabIndex:-1,ref:l,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ve(i){return i==="indeterminate"}function Pt(i){return ve(i)?"indeterminate":i?"checked":"unchecked"}const As=ks,Ps=Ts,$e={checkbox:"_checkbox_yl8iy_5",checkboxIndicator:"_checkboxIndicator_yl8iy_22",checkboxLabel:"_checkboxLabel_yl8iy_33",noTextHighlight:"_noTextHighlight_yl8iy_37",checkboxHidden:"_checkboxHidden_yl8iy_46"},Ms=e.forwardRef(function({className:n,labelClassName:o,label:r,checked:s,onCheckedChange:l,checkboxPosition:d="center",alwaysShow:c=!0,...u},f){return t.jsx(He,{children:({isHovered:p,...h})=>t.jsxs(m.Flex,{align:d,...h,children:[t.jsx(As,{className:F($e.checkbox,!c&&!p&&!s&&$e.checkboxHidden,n),checked:s,onCheckedChange:C=>{l&&l(C)},ref:f,...u,children:t.jsx(Ps,{className:$e.checkboxIndicator,children:s==="indeterminate"?t.jsx(M,{icon:"RiSubtractLine"}):t.jsx(M,{icon:"RiCheckLine"})})}),r&&t.jsx("div",{className:F($e.checkboxLabel,o,$e.noTextHighlight),onClick:()=>{l&&l(!s)},children:r})]})})}),Ye=e.memo(Ms);Ye.displayName="Checkbox";const Mt=e.memo(function({className:n,labelClassName:o,label:r,onCheckedChange:s,children:l,...d}){const[c,u]=e.useState(e.Children.toArray(l).every(v=>e.isValidElement(v)&&v.props.checked)?!0:e.Children.toArray(l).some(v=>e.isValidElement(v)&&v.props.checked)?"indeterminate":!1),[f,p]=e.useState(e.Children.map(l,v=>v.props.checked)),h=v=>{const L=c==="indeterminate"||!v;c==="indeterminate"&&(v=!1),p(f.map(w=>!L)),s&&s(v)};e.useEffect(()=>{const v=f.filter(L=>L).length;v===0?u(!1):v===l.length?u(!0):u("indeterminate")},[l,f]);const C=e.Children.map(l,(v,L)=>e.cloneElement(v,{...v.props,checked:f[L],onCheckedChange:w=>{const g=[...f];g[L]=w,p(g),v.props.onCheckedChange&&v.props.onCheckedChange(w)}}));return t.jsxs(t.Fragment,{children:[t.jsx(Ye,{className:n,labelClassName:o,label:r,checked:c,onCheckedChange:h,...d}),C]})}),q={disabled:"_disabled_5i91d_1",outerTableContainer:"_outerTableContainer_5i91d_5",headerContainer:"_headerContainer_5i91d_17",tableTopContainer:"_tableTopContainer_5i91d_21",tableContainer:"_tableContainer_5i91d_25",searchContainer:"_searchContainer_5i91d_30",columnFilterSelect:"_columnFilterSelect_5i91d_40",table:"_table_5i91d_21",tableHeaderCell:"_tableHeaderCell_5i91d_58",showSortIcon:"_showSortIcon_5i91d_74",tableRow:"_tableRow_5i91d_78",tableCell:"_tableCell_5i91d_93",noDataTextContainer:"_noDataTextContainer_5i91d_103",tableBottomContainer:"_tableBottomContainer_5i91d_109",rowsPerPageContainer:"_rowsPerPageContainer_5i91d_113",rowsPerPageText:"_rowsPerPageText_5i91d_123",pageText:"_pageText_5i91d_128",descriptionSecondLine:"_descriptionSecondLine_5i91d_132"},Os=e.forwardRef(function(n,o){var $t;const{columns:r,data:s,color:l="light",title:d="",description:c="",rowsPerPage:u=[10,20,30,40,50],fixHeader:f=!1,showSearchBar:p,searchBarPlaceholder:h,showSelect:C,showFilterButton:v,showContainer:L,showRowsPerPage:w,showPageNumber:g,showPageNavigation:x,showTopBar:b=!0,showBottomBar:y=!0,emptyMessage:E="There is no data",topBarComponents:P,children:A,containerClassName:T,className:V,columnClassName:W,rowClassName:B,cellClassName:j}=n,[G,R]=e.useState(""),[Y,he]=e.useState([]);if(!s.every(S=>Object.keys(S.columns).length===r.length&&Object.values(r).every(_=>Object.keys(S.columns).includes(_.id.toString()))))throw new Error("Columns in rows do not match ones declared in columns variable.");const $=n.defaultRowsPerPage||u[0]||10,N=e.useCallback(S=>r.filter(_=>_.filter).map(_=>({[_.id]:S})).reduce((_,D)=>Object.assign(_,D),{}),[r]),Z=e.useMemo(()=>N([]),[N]),[J,Le]=e.useState(Z),Ee=e.useMemo(()=>N(!1),[N]),[Te,De]=e.useState(Ee);u.includes($)||u.push($),u.sort((S,_)=>S-_);const[pe,Ns]=e.useState($||(u[0]??10)),wi=e.useMemo(()=>u.map(S=>({value:S.toString(),itemContent:S.toString()})),[u]),qs=s.some(S=>S.onClick),Ot=e.useCallback(S=>{var D,I;return(((D=S.searchValue)==null?void 0:D.toString())||((I=S.value)==null?void 0:I.toString())||"").toLowerCase().includes(G.toLowerCase())},[G]),Bs=e.useCallback((S,_)=>{var U,ne,ge,Se;const D=((U=S.sortValue)==null?void 0:U.toString())||((ne=S.value)==null?void 0:ne.toString())||"",I=((ge=_.sortValue)==null?void 0:ge.toString())||((Se=_.value)==null?void 0:Se.toString())||"";return D.toLowerCase().localeCompare(I.toLowerCase(),void 0,{numeric:!0})},[]),It=e.useCallback((S,_)=>{var I,U,ne;const D=((I=S.filterValue)==null?void 0:I.toString())||((U=S.value)==null?void 0:U.toString())||"";return(ne=J[_.id])==null?void 0:ne.some(ge=>D.toString().toLowerCase()===ge.toString().toLowerCase())},[J]),Je=e.useMemo(()=>r.map(S=>({...S,sort:S.sort?{sortKey:S.id.toString().toUpperCase()}:!1})),[r]),xi=r.some(S=>{var _;return S.filter&&S.id in J&&((_=J[S.id])==null?void 0:_.length)!==0}),Ze=e.useMemo(()=>s.filter(S=>!G||r.some(_=>_.search&&Ot(S.columns[_.id]))).filter(S=>!xi||r.every(_=>{var D;return!_.filter||((D=J[_.id])==null?void 0:D.length)===0||It(S.columns[_.id],_)})).map(S=>{const _={...S.columns,...S,disabled:S.disabled},{columns:D,...I}=_;return I}),[It,J,r,s,xi,G,Ot]),[ce,zs]=e.useState(Math.ceil(Ze.length/pe)),bi=e.useCallback(S=>S.filterValues?S.filterValues:[...new Set(s.map(D=>{var I,U;return((I=D.columns[S.id].filterValue)==null?void 0:I.toString())||((U=D.columns[S.id].value)==null?void 0:U.toString())||""}))].sort().map(D=>({value:D,label:D})),[s]),Us=e.useMemo(()=>(C?"auto ":"")+Je.reduce((S,_)=>S+`${_.width?_.width:_.maxWidth?`minmax(auto, ${_.maxWidth})`:"auto"} `,""),[Je,C]),Hs=e.useCallback(S=>{R(S.target.value)},[]),ei={nodes:Ze},Vs=we.useRowSelect(ei,{onChange:(S,_)=>{he(_.ids)}},{rowSelect:we.SelectTypes.MultiSelect,buttonSelect:we.SelectTypes.MultiSelect,clickType:we.SelectClickTypes.ButtonClick,isCarryForward:!1}),z=ho.usePagination(ei,{state:{page:0,size:$||u[0]}},{isServer:!1}),Ws=Ei.useSort(ei,{onChange:(S,_)=>{De({...Ee,[_.sortKey.toLowerCase()]:!0})}},{sortIcon:{margin:"10px",size:"15px",iconDefault:t.jsx(M,{icon:"RiExpandUpDownLine"}),iconUp:t.jsx(M,{icon:"RiArrowUpLine"}),iconDown:t.jsx(M,{icon:"RiArrowUpLine"})},sortFns:Object.assign({},...Je.map(S=>({[S.id.toString().toUpperCase()]:_=>_.sort((D,I)=>Bs(D[S.id],I[S.id]))})))}),js=e.useMemo(()=>({title:"Filter by:",options:r.filter(S=>S.filter).map(S=>({label:S.label,value:S.id.toString(),page:{content:t.jsx(Mt,{label:"Select all",onCheckedChange:_=>{const D=JSON.parse(JSON.stringify(J));_===!0?D[S.id]=bi(S).map(I=>I.value):D[S.id]=[],Le(D)},children:bi(S).map((_,D)=>{var I,U;return t.jsx(Ye,{label:_.label,checked:(U=J[S.id])==null?void 0:U.includes(((I=_.value)==null?void 0:I.toString())||""),onCheckedChange:ne=>{Le(ge=>{var qt;const Se={...ge},Nt=Se[S.id]||[];return ne?Se[S.id]=[...Nt,((qt=_.value)==null?void 0:qt.toString())||""]:Se[S.id]=Nt.filter(Xs=>Xs!==(_.value??"").toString()),Se})}},`checkbox-filter-${S.id}-${D}`)})},`select-all-checkbox-${S.id}`)}}))}),[J,r,bi]),Gs=Je.map(S=>{const _=S.sort?Ei.HeaderCellSort:oe.HeaderCell;let D=S.label,I;if(S.label&&typeof S.label=="string"){const[ne,ge]=Pi(S.label,31);D=ne,I=ge}return t.jsx(He,{children:({isHovered:U,...ne})=>t.jsxs(_,{className:F(q.tableHeaderCell,W,(Te[S.id]||U)&&q.showSortIcon,S.className),sortKey:S.sort?S.id.toString().toUpperCase():"",...ne,children:[D&&t.jsx("div",{children:D}),I&&t.jsxs("div",{className:q.descriptionSecondLine,children:[" ",I]})]})},S.id)}),Rt=ye.isMobile?Q:be,Ks=e.useMemo(()=>({custom:!0,...f&&{fixedHeader:!0}}),[f]),Qs=fo.useTheme({Table:`
6
- --data-table-library_grid-template-columns: ${Us} !important;
7
- `,Row:`
8
- &:hover {
9
- cursor: ${qs?"pointer":"inherit"};
10
- }
11
- &.row-select-selected {
12
- background-color: var(--gray-a4);
13
- }
14
- &:not(:last-of-type) .td {
15
- border-bottom: 1px solid var(--gray-a4);
16
- }
17
- `,BaseRow:`
18
- background-color: inherit;
19
- `});return e.useEffect(()=>{if(x){const S=Math.ceil(Ze.length/pe);zs(S),z.state.page<0&&z.fns.onSetPage(0),z.state.page>S-1&&z.fns.onSetPage(S-1)}},[u,Ze.length,pe,z,x]),t.jsxs(m.Flex,{className:F({[q.outerTableContainer]:L}),direction:"column",height:"100%",children:[(!!d||!!c)&&t.jsxs("div",{className:q.headerContainer,children:[!!d&&t.jsx(Fe,{weight:"bold",size:"5",children:d}),!!c&&t.jsx(Fe,{as:"div",children:c})]}),b&&t.jsxs(m.Flex,{justify:"between",gap:"2",className:q.tableTopContainer,children:[t.jsxs(m.Flex,{gap:"2",children:[p&&t.jsx(m.Flex,{direction:"column",children:t.jsx("div",{className:q.searchContainer,children:t.jsx(di,{value:G,onChange:Hs,leftSlot:t.jsx(M,{icon:"RiSearchLine"}),placeholder:h||"Filter tasks..."})})}),v&&t.jsx(nt,{color:l,page:js,trigger:t.jsx(Q,{variant:"surface","aria-label":"Filter columns",children:t.jsx(M,{icon:"RiEqualizerLine"})}),children:S=>""}),v&&xi&&t.jsx(Q,{variant:"surface",color:"crimson",onClick:()=>{Le(Z),z.fns.onSetPage(0)},"aria-label":"Clear filters",children:t.jsx(M,{icon:"RiCloseLine"})})]}),P,C&&Y.length!==0&&t.jsxs(m.Flex,{gap:"2",children:[t.jsxs(Rt,{variant:"soft","aria-label":"Edit rows",children:[t.jsx(M,{icon:"RiPencilLine"}),!ye.isMobile&&"Edit"]}),t.jsxs(Rt,{color:"red","aria-label":"Delete rows",children:[t.jsx(M,{icon:"RiDeleteBin2Line"}),!ye.isMobile&&"Delete"]})]})]}),A,t.jsx("div",{className:F(q.tableContainer,T),children:t.jsx(oe.Table,{className:F(q.table,V),data:ei,theme:Qs,sort:Ws,pagination:x&&z,select:Vs,layout:Ks,ref:o,children:S=>t.jsxs(t.Fragment,{children:[t.jsx(oe.Header,{children:t.jsxs(oe.HeaderRow,{children:[C&&t.jsx(we.HeaderCellSelect,{className:q.tableHeaderCell}),...Gs]})}),t.jsxs(oe.Body,{children:[S.length===0&&t.jsx(m.TableRow,{className:q.noDataTextContainer,children:t.jsx(oe.Cell,{children:E})}),S.map(_=>t.jsx(oe.Row,{item:_,className:F(q.tableRow,B,_.className,{[q.disabled]:_.disabled}),onClick:!_.disabled&&_.onClick,children:_.loading?t.jsx(oe.Cell,{style:{gridColumn:`1 / span ${r.length}`},children:t.jsx(m.Flex,{justify:"center",pb:"4",pt:"4",children:t.jsx(Be,{})})},`loading-${_.id}`):t.jsxs(t.Fragment,{children:[C&&t.jsx(we.CellSelect,{item:_},_.id),r.map((D,I)=>{const U=_[D.id];return t.jsx(oe.Cell,{className:F(q.tableCell,j,U.className,{[q.disabled]:U.disabled||D.disabled}),onClick:U.disabled||D.disabled?void 0:_[D.id].onClick,children:U.label},I)})]})},_.id))]})]})})}),y&&t.jsxs(m.Flex,{className:q.tableBottomContainer,wrap:"wrap",direction:ye.isMobile?"column":"row",children:[w&&t.jsxs(m.Flex,{className:q.rowsPerPageContainer,children:[t.jsx(Fe,{className:q.rowsPerPageText,size:"2",children:"Rows per page:"}),t.jsx(Qi,{items:wi,defaultValue:($t=wi.find(S=>S.value===$.toString()))==null?void 0:$t.value.toString(),onValueChange:S=>{z.fns.onSetSize(Number(S)),Ns(Number(S))},placeholder:wi[0].itemContent,"aria-label":"Select number of rows per page"})]}),g&&t.jsx(m.Flex,{justify:"center",children:t.jsx(Fe,{className:q.pageText,size:"2",children:ce>0&&`Page ${z.state.page+1} of ${ce}`})}),x&&t.jsxs(m.Flex,{className:q.rowsPerPageContainer,gap:"2",justify:"end",children:[t.jsx(Q,{variant:"surface",onClick:()=>z.fns.onSetPage(0),disabled:z.state.page===0||ce===0,"aria-label":"Go to first page",children:t.jsx(M,{icon:"RiArrowLeftDoubleLine"})}),t.jsx(Q,{variant:"surface",disabled:z.state.page===0||ce===0,onClick:()=>z.fns.onSetPage(z.state.page-1),"aria-label":"Previous page",children:t.jsx(M,{icon:"RiArrowLeftSLine"})}),t.jsx(Q,{variant:"surface",disabled:z.state.page+1===ce||ce===0,onClick:()=>z.fns.onSetPage(z.state.page+1),"aria-label":"Next page",children:t.jsx(M,{icon:"RiArrowRightSLine"})}),t.jsx(Q,{variant:"surface",disabled:z.state.page+1===ce||ce===0,onClick:()=>z.fns.onSetPage(ce-1),"aria-label":"Go to last page",children:t.jsx(M,{icon:"RiArrowRightDoubleLine"})})]})]})]})}),Is=e.memo(Os),re={editableTextContainer:"_editableTextContainer_174g6_1",editableTextText:"_editableTextText_174g6_5",editableTextInput:"_editableTextInput_174g6_19",iconHidden:"_iconHidden_174g6_23"},Rs=e.forwardRef(function({value:n,onChange:o,onEditActivate:r,onEditConfirm:s,onEditCancel:l,textClassName:d,inputClassName:c,iconClassName:u,buttonVariant:f,buttonAlwaysVisible:p=!1,variant:h,severity:C,size:v,mode:L="buttons",...w},g){const[x,b]=e.useState(n==null?void 0:n.toString()),[y,E]=e.useState(n==null?void 0:n.toString()),[P,A]=e.useState(!1),T=!y||x===y,V=e.useCallback(R=>{var Y;E((Y=R.target.value)==null?void 0:Y.toString()),o&&o(R)},[o]),W=e.useCallback(()=>{A(!0),r&&r(x)},[r,x]),B=e.useCallback(()=>{b(y),A(!1),s&&s(y)},[s,y]),j=e.useCallback(()=>{A(!1);const R=y;E(x),l&&l(R)},[x,y,l]),G=e.useCallback(R=>{if(L==="keys")switch(R.key){case"Enter":T||B();break;case"Escape":j();break}},[B,j,T,L]);return t.jsx(He,{children:({isHovered:R,...Y})=>t.jsxs(se,{className:re.editableTextContainer,gap:"2",...Y,children:[t.jsx(di,{className:F(P?re.editableTextInput:re.editableTextText,P?c:d),onClick:()=>!P&&L==="keys"&&W(),value:P?y:x,onChange:V,ref:g,onKeyDown:G,autoFocus:!0,size:v,variant:h,severity:C,readOnly:!P,style:P?void 0:{cursor:L==="keys"?"text":"unset"},...w}),L==="buttons"&&(P?t.jsxs(t.Fragment,{children:[t.jsx(Q,{className:F(u,re.icon,!p&&!R&&re.iconHidden),size:v,variant:f,severity:C,disabled:T,onClick:B,"aria-label":"Confirm edit",children:t.jsx(M,{icon:"RiCheckLine"})}),t.jsx(Q,{className:F(u,re.icon,!p&&!R&&re.iconHidden),color:"red",size:v,variant:f,severity:C,onClick:j,"aria-label":"Cancel edit",children:t.jsx(M,{icon:"RiCloseLargeLine"})})]}):t.jsx(Q,{className:F(u,re.editIcon,re.icon,!p&&!R&&re.iconHidden),size:v,variant:f,severity:C,onClick:W,"aria-label":"Edit text",children:t.jsx(M,{icon:"RiPencilLine"})}))]})})}),$s=e.memo(Rs);Object.defineProperty(a,"Theme",{enumerable:!0,get:()=>m.Theme}),Object.defineProperty(a,"updateThemeAppearanceClass",{enumerable:!0,get:()=>m.updateThemeAppearanceClass}),Object.defineProperty(a,"useThemeContext",{enumerable:!0,get:()=>m.useThemeContext}),a.AlertDialog=Bi,a.AlertDialogContent=ai,a.AlertDialogProvider=Vo,a.Badge=xo,a.Breadcrumb=Fo,a.Button=be,a.ButtonGroup=li,a.ButtonList=No,a.Checkbox=Ye,a.CollapsibleTree=Xo,a.ConfirmEditInput=$s,a.DEFAULT_ICON_SIZE=Ni,a.DefaultTheme=Kl,a.Dialog=Bo,a.DownloadButtonUtility=Gi,a.Flex=se,a.HoverUtility=He,a.IconButton=Q,a.IconColorUtility=bl,a.Input=di,a.ItemStack=xl,a.Layout=ml,a.LayoutContext=ci,a.LeftAndRightPanels=kl,a.MultiPagePopover=nt,a.MultiSelect=Jo,a.Overlay=Go,a.OvermapDropdownMenu=xt,a.OvermapDropdownMultiSelect=_t,a.OvermapDropdownSelect=bt,a.OvermapErrorBoundary=ct,a.OvermapInputItem=pi,a.OvermapItem=Ue,a.OvermapItemGroup=ze,a.OvermapMenu=X,a.Popover=et,a.RiIcon=M,a.Select=Qi,a.SelectAllCheckbox=Mt,a.Separator=st,a.Sidebar=rl,a.SlideOutV2=Ll,a.SlideOutV3=Ji,a.Spinner=Be,a.Switch=il,a.Table=Is,a.Text=Fe,a.TextArea=Dl,a.Toast=ot,a.ToastContext=fi,a.ToastProvider=Ul,a.ToggleButton=jl,a.ToggleGroup=Pl,a.Toolbar=$l,a.Tooltip=Vl,a.USED_ICONS=si,a.divButtonProps=ko,a.splitTextForEllipsisAndExpansion=Pi,a.useAlertDialog=zi,a.useDiscardAlertDialog=Wo,a.useKeyboardShortcut=ti,a.useLayoutContext=Ce,a.useOvermapItemGroupContext=Wi,a.useSeverityColor=K,a.useSize=yo,a.useStopEventPropagation=Lo,a.useTextFilter=So,a.useToast=ql,a.useViewportSize=Ai,a.useWrapCallbackInDialogClose=zo,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
1
+ (function(global, factory) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@radix-ui/react-alert-dialog"), require("react/jsx-runtime"), require("class-variance-authority"), require("react"), require("@radix-ui/react-avatar"), require("@radix-ui/react-checkbox"), require("@radix-ui/react-collapsible"), require("@react-hook/resize-observer"), require("react-responsive"), require("@radix-ui/react-dialog"), require("react-icons/hi"), require("@radix-ui/react-hover-card"), require("@radix-ui/react-slot"), require("re-resizable"), require("react-transition-group"), require("react-dom"), require("react-error-boundary"), require("react-icons/ri"), require("@floating-ui/react"), require("@radix-ui/react-separator"), require("@radix-ui/react-popover"), require("@radix-ui/react-radio-group"), require("@radix-ui/react-dismissable-layer"), require("@radix-ui/react-toast"), require("@radix-ui/react-toggle"), require("@radix-ui/react-tooltip")) : typeof define === "function" && define.amd ? define(["exports", "@radix-ui/react-alert-dialog", "react/jsx-runtime", "class-variance-authority", "react", "@radix-ui/react-avatar", "@radix-ui/react-checkbox", "@radix-ui/react-collapsible", "@react-hook/resize-observer", "react-responsive", "@radix-ui/react-dialog", "react-icons/hi", "@radix-ui/react-hover-card", "@radix-ui/react-slot", "re-resizable", "react-transition-group", "react-dom", "react-error-boundary", "react-icons/ri", "@floating-ui/react", "@radix-ui/react-separator", "@radix-ui/react-popover", "@radix-ui/react-radio-group", "@radix-ui/react-dismissable-layer", "@radix-ui/react-toast", "@radix-ui/react-toggle", "@radix-ui/react-tooltip"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.blocks = {}, global.RadixAlertDialog, global.jsxRuntime, global.classVarianceAuthority, global.React, global.RadixAvatar, global.RadixCheckbox, global.RadixPrimitiveCollapsible, global.useResizeObserver, global.reactResponsive, global.RadixDialog, global.hi, global.RadixHoverCard, global.reactSlot, global.reResizable, global.reactTransitionGroup, global.ReactDOM, global.reactErrorBoundary, global.RiIcons, global.react, global.RadixSeparator, global.RadixPopover, global.RadixRadioGroup, global.reactDismissableLayer, global.RadixToast, global.Toggle, global.RadixTooltip));
3
+ })(this, function(exports2, RadixAlertDialog, jsxRuntime, classVarianceAuthority, React, RadixAvatar, RadixCheckbox, RadixPrimitiveCollapsible, useResizeObserver, reactResponsive, RadixDialog, hi, RadixHoverCard, reactSlot, reResizable, reactTransitionGroup, ReactDOM, reactErrorBoundary, RiIcons, react, RadixSeparator, RadixPopover, RadixRadioGroup, reactDismissableLayer, RadixToast, Toggle, RadixTooltip) {
4
+ "use strict";
5
+ function _interopNamespaceDefault(e) {
6
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
7
+ if (e) {
8
+ for (const k in e) {
9
+ if (k !== "default") {
10
+ const d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: () => e[k]
14
+ });
15
+ }
16
+ }
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+ const RadixAlertDialog__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixAlertDialog);
22
+ const RadixAvatar__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixAvatar);
23
+ const RadixCheckbox__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixCheckbox);
24
+ const RadixPrimitiveCollapsible__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixPrimitiveCollapsible);
25
+ const RadixDialog__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixDialog);
26
+ const RadixHoverCard__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixHoverCard);
27
+ const RiIcons__namespace = /* @__PURE__ */ _interopNamespaceDefault(RiIcons);
28
+ const RadixSeparator__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixSeparator);
29
+ const RadixPopover__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixPopover);
30
+ const RadixRadioGroup__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixRadioGroup);
31
+ const RadixToast__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixToast);
32
+ const Toggle__namespace = /* @__PURE__ */ _interopNamespaceDefault(Toggle);
33
+ const RadixTooltip__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixTooltip);
34
+ const radiusCva = classVarianceAuthority.cva([], {
35
+ variants: {
36
+ maxLarge: {
37
+ true: [],
38
+ false: []
39
+ },
40
+ radius: {
41
+ none: ["rounded-none"],
42
+ xs: ["rounded-xs"],
43
+ sm: ["rounded-sm"],
44
+ md: ["rounded-md"],
45
+ lg: ["rounded-lg"],
46
+ xl: [],
47
+ full: []
48
+ }
49
+ },
50
+ compoundVariants: [
51
+ {
52
+ maxLarge: true,
53
+ radius: "xl",
54
+ className: ["rounded-lg"]
55
+ },
56
+ {
57
+ maxLarge: true,
58
+ radius: "full",
59
+ className: ["rounded-lg"]
60
+ },
61
+ {
62
+ maxLarge: false,
63
+ radius: "xl",
64
+ className: ["rounded-xl"]
65
+ },
66
+ {
67
+ maxLarge: false,
68
+ radius: "full",
69
+ className: ["rounded-full"]
70
+ }
71
+ ]
72
+ });
73
+ const ProviderContext = React.createContext({});
74
+ const useProvider = () => {
75
+ const context = React.useContext(ProviderContext);
76
+ if (!context) {
77
+ throw new Error("useProvider must be used within a Provider");
78
+ }
79
+ return context;
80
+ };
81
+ const Provider = (props) => {
82
+ const { accentColor, radius = "md", children } = props;
83
+ const contextValue = React.useMemo(
84
+ () => ({
85
+ accentColor,
86
+ radius
87
+ }),
88
+ [accentColor, radius]
89
+ );
90
+ return /* @__PURE__ */ jsxRuntime.jsx(ProviderContext.Provider, { value: contextValue, children });
91
+ };
92
+ const dialogOverlay = classVarianceAuthority.cva([
93
+ "fixed",
94
+ "inset-0",
95
+ "duration-200",
96
+ "bg-(--black-a6)",
97
+ "dark:bg-(--black-a8)",
98
+ "data-[state='open']:animate-in",
99
+ "data-[state='open']:fade-in-0",
100
+ "data-[state='closed']:animate-out",
101
+ "data-[state='closed']:fade-out-0"
102
+ ]);
103
+ const dialogContent = classVarianceAuthority.cva(
104
+ [
105
+ "flex",
106
+ "flex-col",
107
+ "h-max",
108
+ "[scrollbar-width:thin]",
109
+ "[scrollbar-color:var(--base-6)_transparent]",
110
+ "max-h-3/4",
111
+ "overflow-hidden",
112
+ "w-full",
113
+ "bg-(--base-2)",
114
+ "ring-1",
115
+ "ring-(--base-6)",
116
+ "fixed",
117
+ "left-[50%]",
118
+ "top-[50%]",
119
+ "translate-x-[-50%]",
120
+ "translate-y-[-50%]",
121
+ "duration-200",
122
+ "data-[state='open']:animate-in",
123
+ "data-[state='open']:fade-in-0",
124
+ "data-[state='open']:zoom-in-95",
125
+ "data-[state='closed']:animate-out",
126
+ "data-[state='closed']:fade-out-0",
127
+ "data-[state='closed']:zoom-out-95"
128
+ ],
129
+ {
130
+ variants: {
131
+ size: {
132
+ xs: ["text-xs", "p-2", "max-w-xs"],
133
+ sm: ["text-sm", "p-3", "max-w-sm"],
134
+ md: ["text-md", "p-4", "max-w-md"],
135
+ lg: ["text-lg", "p-5", "max-w-lg"],
136
+ xl: ["text-xl", "p-6", "max-w-xl"]
137
+ }
138
+ },
139
+ defaultVariants: {
140
+ size: "md"
141
+ }
142
+ }
143
+ );
144
+ const AlertDialogContent = React.forwardRef((props, ref) => {
145
+ const { radius } = useProvider();
146
+ const { className, size, container, ...rest } = props;
147
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixAlertDialog__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(RadixAlertDialog__namespace.Overlay, { className: dialogOverlay({}), children: /* @__PURE__ */ jsxRuntime.jsx(
148
+ RadixAlertDialog__namespace.Content,
149
+ {
150
+ className: classVarianceAuthority.cx(className, dialogContent({ size }), radiusCva({ radius, maxLarge: true })),
151
+ ref,
152
+ ...rest
153
+ }
154
+ ) }) });
155
+ });
156
+ AlertDialogContent.displayName = "AlertDialogContent";
157
+ const AlertDialogContext = React.createContext(() => {
158
+ throw new Error("No AlertDialogProvider found");
159
+ });
160
+ const useAlertDialog = () => {
161
+ const alertDialogContext = React.useContext(AlertDialogContext);
162
+ if (!alertDialogContext) {
163
+ throw new Error("No AlertDialogProvider found");
164
+ }
165
+ return alertDialogContext;
166
+ };
167
+ const ButtonGroupContext = React.createContext({});
168
+ const ButtonGroup = (props) => {
169
+ const providerContext = useProvider();
170
+ const {
171
+ children,
172
+ variant = "solid",
173
+ size = "md",
174
+ radius = providerContext.radius,
175
+ accentColor = providerContext.accentColor
176
+ } = props;
177
+ const value = React.useMemo(
178
+ () => ({
179
+ variant,
180
+ size,
181
+ radius,
182
+ accentColor
183
+ }),
184
+ [accentColor, radius, size, variant]
185
+ );
186
+ return /* @__PURE__ */ jsxRuntime.jsx(ButtonGroupContext.Provider, { value, children });
187
+ };
188
+ ButtonGroup.displayName = "Buttons";
189
+ const useButtonGroup = () => React.useContext(ButtonGroupContext);
190
+ const floating = classVarianceAuthority.cva(
191
+ [
192
+ "data-[state=open]:animate-in",
193
+ "data-[state=open]:fade-in-0",
194
+ "data-[state=open]:zoom-in-95",
195
+ "data-[state=closed]:animate-out",
196
+ "data-[state=closed]:fade-out-0",
197
+ "data-[state=closed]:zoom-out-95"
198
+ ],
199
+ {
200
+ variants: {
201
+ shadow: {
202
+ "1": ["shadow-xs"],
203
+ "2": ["shadow-sm"],
204
+ "3": ["shadow-md"],
205
+ "4": ["shadow-lg"],
206
+ "5": ["shadow-xl"]
207
+ },
208
+ side: {
209
+ top: ["data-[side=top]:slide-in-from-bottom-2"],
210
+ right: ["data-[side=right]:slide-in-from-left-2"],
211
+ bottom: ["data-[side=bottom]:slide-in-from-top-2"],
212
+ left: ["data-[side=left]:slide-in-from-right-2"]
213
+ }
214
+ }
215
+ }
216
+ );
217
+ const button = classVarianceAuthority.cva(
218
+ [
219
+ "flex",
220
+ "items-center",
221
+ "justify-center",
222
+ "outline-none",
223
+ "transition-colors",
224
+ "disabled:opacity-50",
225
+ "disabled:pointer-events-none"
226
+ ],
227
+ {
228
+ variants: {
229
+ variant: {
230
+ solid: [
231
+ "ring-(--accent-9)",
232
+ "bg-(--accent-9)",
233
+ "hover:bg-(--accent-10)",
234
+ "text-(--accent-contrast)",
235
+ "active:brightness-110",
236
+ "data-[state='open']:bg-(--accent-10)",
237
+ "focus-visible:outline-2",
238
+ "focus-visible:outline-(--accent-a8)",
239
+ "focus-visible:outline-offset-2"
240
+ ],
241
+ soft: [
242
+ "bg-(--accent-a3)",
243
+ "hover:bg-(--accent-a4)",
244
+ "active:bg-(--accent-a5)",
245
+ "text-(--accent-a11)",
246
+ "data-[state='open']:bg-(--accent-a4)",
247
+ "focus-visible:ring-2",
248
+ "focus-visible:ring-(--accent-a8)"
249
+ ],
250
+ ghost: [
251
+ "bg-transparent",
252
+ "hover:bg-(--accent-a3)",
253
+ "active:bg-(--accent-a4)",
254
+ "text-(--accent-a11)",
255
+ "data-[state='open']:bg-(--accent-a3)",
256
+ "focus-visible:ring-2",
257
+ "focus-visible:ring-(--accent-a8)"
258
+ ],
259
+ surface: [
260
+ "bg-(--accent-surface)",
261
+ "hover:ring-(--accent-a8)",
262
+ "active:bg-(--accent-a3)",
263
+ "ring-1",
264
+ "ring-(--accent-a7)",
265
+ "text-(--accent-a11)",
266
+ "data-[state='open']:bg-(--accent-a4)",
267
+ "focus-visible:ring-2",
268
+ "focus-visible:ring-(--accent-a8)"
269
+ ],
270
+ outline: [
271
+ "bg-transparent",
272
+ "ring-1",
273
+ "ring-(--accent-a7)",
274
+ "hover:ring-(--accent-a8)",
275
+ "hover:bg-(--accent-a3)",
276
+ "active:bg-(--accent-a4)",
277
+ "text-(--accent-a11)",
278
+ "data-[state='open']:ring-(--accent-a8)",
279
+ "data-[state='open']:bg-(--accent-a3)",
280
+ "focus-visible:ring-2",
281
+ "focus-visible:ring-(--accent-a8)"
282
+ ]
283
+ },
284
+ icon: {
285
+ true: [],
286
+ false: []
287
+ },
288
+ size: {
289
+ xs: ["h-5", "text-xs", "gap-0.25"],
290
+ sm: ["h-6", "text-sm", "gap-0.5"],
291
+ md: ["h-7", "text-base", "gap-1"],
292
+ lg: ["h-8", "text-lg", "gap-1.5"],
293
+ xl: ["h-9", "text-xl", "gap-2"]
294
+ }
295
+ },
296
+ compoundVariants: [
297
+ {
298
+ icon: true,
299
+ size: "xs",
300
+ class: "w-5"
301
+ },
302
+ {
303
+ icon: false,
304
+ size: "xs",
305
+ class: "px-2"
306
+ },
307
+ {
308
+ icon: true,
309
+ size: "sm",
310
+ class: "w-6"
311
+ },
312
+ {
313
+ icon: false,
314
+ size: "sm",
315
+ class: "px-2"
316
+ },
317
+ {
318
+ icon: true,
319
+ size: "md",
320
+ class: "w-7"
321
+ },
322
+ {
323
+ icon: false,
324
+ size: "md",
325
+ class: "px-3"
326
+ },
327
+ {
328
+ icon: true,
329
+ size: "lg",
330
+ class: "w-8"
331
+ },
332
+ {
333
+ icon: false,
334
+ size: "lg",
335
+ class: "px-4"
336
+ },
337
+ {
338
+ icon: true,
339
+ size: "xl",
340
+ class: "w-9"
341
+ },
342
+ {
343
+ icon: false,
344
+ size: "xl",
345
+ class: "px-5"
346
+ }
347
+ ],
348
+ defaultVariants: {
349
+ size: "md",
350
+ icon: false,
351
+ variant: "solid"
352
+ }
353
+ }
354
+ );
355
+ const Button = React.memo(
356
+ React.forwardRef((props, ref) => {
357
+ const providerContext = useProvider();
358
+ const buttonsContext = useButtonGroup();
359
+ const {
360
+ children,
361
+ className,
362
+ variant = buttonsContext.variant,
363
+ size = buttonsContext.size,
364
+ radius = buttonsContext.radius ?? providerContext.radius,
365
+ accentColor = buttonsContext.accentColor ?? providerContext.accentColor,
366
+ ...rest
367
+ } = props;
368
+ return /* @__PURE__ */ jsxRuntime.jsx(
369
+ "button",
370
+ {
371
+ className: classVarianceAuthority.cx(
372
+ className,
373
+ button({ size, icon: false, variant }),
374
+ radiusCva({ radius, maxLarge: false })
375
+ ),
376
+ ref,
377
+ "data-accent-color": accentColor,
378
+ ...rest,
379
+ children
380
+ }
381
+ );
382
+ })
383
+ );
384
+ const IconButton = React.memo(
385
+ React.forwardRef((props, ref) => {
386
+ const providerContext = useProvider();
387
+ const buttonsContext = useButtonGroup();
388
+ const {
389
+ children,
390
+ className,
391
+ variant = buttonsContext.variant,
392
+ size = buttonsContext.size,
393
+ radius = buttonsContext.radius ?? providerContext.radius,
394
+ accentColor = buttonsContext.accentColor ?? providerContext.accentColor,
395
+ ...rest
396
+ } = props;
397
+ return /* @__PURE__ */ jsxRuntime.jsx(
398
+ "button",
399
+ {
400
+ className: classVarianceAuthority.cx(className, button({ size, icon: true, variant }), radiusCva({ radius, maxLarge: false })),
401
+ ref,
402
+ "data-accent-color": accentColor,
403
+ ...rest,
404
+ children
405
+ }
406
+ );
407
+ })
408
+ );
409
+ const AlertDialogProvider = (props) => {
410
+ const { children } = props;
411
+ const [open, setOpen] = React.useState(false);
412
+ const [options, setOptions] = React.useState(null);
413
+ const handleOpenChange = React.useCallback(
414
+ (open2) => {
415
+ var _a;
416
+ setOpen(open2);
417
+ if (open2) return;
418
+ (_a = options == null ? void 0 : options.onClose) == null ? void 0 : _a.call(options);
419
+ },
420
+ [options]
421
+ );
422
+ const openAlertDialog = React.useCallback(
423
+ (config) => {
424
+ if (open) throw new Error("AlertDialog is already open");
425
+ setOpen(true);
426
+ setOptions({
427
+ size: "md",
428
+ action: "Confirm",
429
+ cancel: "Cancel",
430
+ ...config
431
+ });
432
+ },
433
+ [open]
434
+ );
435
+ return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContext.Provider, { value: openAlertDialog, children: [
436
+ children,
437
+ /* @__PURE__ */ jsxRuntime.jsx(RadixAlertDialog__namespace.Root, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsx(AlertDialogContent, { size: options == null ? void 0 : options.size, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
438
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
439
+ /* @__PURE__ */ jsxRuntime.jsx(RadixAlertDialog__namespace.Title, { className: "font-medium", children: options == null ? void 0 : options.title }),
440
+ /* @__PURE__ */ jsxRuntime.jsx(RadixAlertDialog__namespace.Description, { children: options == null ? void 0 : options.description })
441
+ ] }),
442
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
443
+ /* @__PURE__ */ jsxRuntime.jsx(RadixAlertDialog__namespace.Cancel, { onClick: options == null ? void 0 : options.onCancel, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "soft", size: options == null ? void 0 : options.size, accentColor: "base", children: options == null ? void 0 : options.cancel }) }),
444
+ /* @__PURE__ */ jsxRuntime.jsx(RadixAlertDialog__namespace.Action, { onClick: options == null ? void 0 : options.onAction, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "solid", size: options == null ? void 0 : options.size, children: options == null ? void 0 : options.action }) })
445
+ ] })
446
+ ] }) }) })
447
+ ] });
448
+ };
449
+ const AlertDialog = {
450
+ Content: AlertDialogContent,
451
+ Trigger: RadixAlertDialog__namespace.Trigger,
452
+ Root: RadixAlertDialog__namespace.Root,
453
+ Title: RadixAlertDialog__namespace.Title,
454
+ Description: RadixAlertDialog__namespace.Description,
455
+ Action: RadixAlertDialog__namespace.Action,
456
+ Cancel: RadixAlertDialog__namespace.Cancel
457
+ };
458
+ const AvatarContext = React.createContext({});
459
+ const avatar = classVarianceAuthority.cva([], {
460
+ variants: {
461
+ size: {
462
+ xs: ["h-5", "w-5", "text-xs"],
463
+ sm: ["h-6", "w-6", "text-sm"],
464
+ md: ["h-7", "w-7", "text-base"],
465
+ lg: ["h-8", "w-8", "text-lg"],
466
+ xl: ["h-9", "w-9", "text-xl"]
467
+ }
468
+ },
469
+ defaultVariants: {
470
+ size: "md"
471
+ }
472
+ });
473
+ const avatarFallback = classVarianceAuthority.cva(
474
+ ["select-none", "flex", "items-center", "justify-center", "w-full", "h-full", "rounded-[inherit]"],
475
+ {
476
+ variants: {
477
+ variant: {
478
+ solid: ["bg-(--accent-9)", "text-(--accent-contrast)"],
479
+ soft: ["bg-(--accent-a3)", "text-(--accent-a11)"],
480
+ outline: ["bg-transparent", "ring-1", "ring-inset", "ring-(--accent-a7)", "text-(--accent-a11)"],
481
+ surface: ["bg-(--accent-surface)", "ring-1", "ring-inset", "ring-(--accent-a7)", "text-(--accent-a11)"]
482
+ }
483
+ },
484
+ defaultVariants: {
485
+ variant: "solid"
486
+ }
487
+ }
488
+ );
489
+ const AvatarFallback = React.forwardRef((props, ref) => {
490
+ const { className, ...rest } = props;
491
+ const { variant } = React.useContext(AvatarContext);
492
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixAvatar__namespace.AvatarFallback, { className: classVarianceAuthority.cx(className, avatarFallback({ variant })), ref, ...rest });
493
+ });
494
+ AvatarFallback.displayName = "AvatarFallback";
495
+ const AvatarImage = React.forwardRef((props, ref) => {
496
+ const { className, ...rest } = props;
497
+ return /* @__PURE__ */ jsxRuntime.jsx(
498
+ RadixAvatar__namespace.Image,
499
+ {
500
+ className: classVarianceAuthority.cx(className, "object-cover", "rounded-[inherit]", "w-full", "h-full"),
501
+ ref,
502
+ ...rest
503
+ }
504
+ );
505
+ });
506
+ AvatarImage.displayName = "AvatarImage";
507
+ const AvatarRoot = React.forwardRef((props, ref) => {
508
+ const providerContext = useProvider();
509
+ const {
510
+ className,
511
+ size,
512
+ variant = "solid",
513
+ accentColor = providerContext.accentColor,
514
+ radius = providerContext.radius,
515
+ children,
516
+ ...rest
517
+ } = props;
518
+ return /* @__PURE__ */ jsxRuntime.jsx(
519
+ RadixAvatar__namespace.Root,
520
+ {
521
+ className: classVarianceAuthority.cx(className, avatar({ size }), radiusCva({ radius, maxLarge: false })),
522
+ ref,
523
+ "data-accent-color": accentColor,
524
+ ...rest,
525
+ children: /* @__PURE__ */ jsxRuntime.jsx(AvatarContext.Provider, { value: { variant }, children })
526
+ }
527
+ );
528
+ });
529
+ AvatarRoot.displayName = "AvatarRoot";
530
+ const Avatar = {
531
+ Fallback: AvatarFallback,
532
+ Image: AvatarImage,
533
+ Root: AvatarRoot
534
+ };
535
+ const badge = classVarianceAuthority.cva(["flex", "items-center"], {
536
+ variants: {
537
+ icon: {
538
+ true: ["justify-center"],
539
+ false: []
540
+ },
541
+ size: {
542
+ xs: ["h-5", "text-xs", "gap-0.25"],
543
+ sm: ["h-6", "text-sm", "gap-0.5"],
544
+ md: ["h-7", "text-base", "gap-1"],
545
+ lg: ["h-8", "text-lg", "gap-1.5"],
546
+ xl: ["h-9", "text-xl", "gap-2"]
547
+ },
548
+ variant: {
549
+ solid: ["bg-(--accent-9)", "text-(--accent-contrast)"],
550
+ soft: ["bg-(--accent-a3)", "text-(--accent-a11)"],
551
+ outline: ["bg-transparent", "ring-1", "ring-(--accent-a7)", "text-(--accent-a11)"],
552
+ surface: ["bg-(--accent-surface)", "ring-1", "ring-(--accent-a7)", "text-(--accent-a11)"]
553
+ }
554
+ },
555
+ compoundVariants: [
556
+ {
557
+ icon: true,
558
+ size: "xs",
559
+ class: "w-5"
560
+ },
561
+ {
562
+ icon: false,
563
+ size: "xs",
564
+ class: "px-2"
565
+ },
566
+ {
567
+ icon: true,
568
+ size: "sm",
569
+ class: "w-6"
570
+ },
571
+ {
572
+ icon: false,
573
+ size: "sm",
574
+ class: "px-2"
575
+ },
576
+ {
577
+ icon: true,
578
+ size: "md",
579
+ class: "w-7"
580
+ },
581
+ {
582
+ icon: false,
583
+ size: "md",
584
+ class: "px-3"
585
+ },
586
+ {
587
+ icon: true,
588
+ size: "lg",
589
+ class: "w-8"
590
+ },
591
+ {
592
+ icon: false,
593
+ size: "lg",
594
+ class: "px-4"
595
+ },
596
+ {
597
+ icon: true,
598
+ size: "xl",
599
+ class: "w-9"
600
+ },
601
+ {
602
+ icon: false,
603
+ size: "xl",
604
+ class: "px-5"
605
+ }
606
+ ],
607
+ defaultVariants: {
608
+ size: "md",
609
+ variant: "solid",
610
+ icon: false
611
+ }
612
+ });
613
+ const Badge = React.forwardRef((props, ref) => {
614
+ const providerContext = useProvider();
615
+ const {
616
+ children,
617
+ className,
618
+ accentColor = providerContext.accentColor,
619
+ radius = providerContext.radius,
620
+ variant,
621
+ size,
622
+ icon,
623
+ ...rest
624
+ } = props;
625
+ return /* @__PURE__ */ jsxRuntime.jsx(
626
+ "span",
627
+ {
628
+ className: classVarianceAuthority.cx(className, badge({ variant, size, icon }), radiusCva({ radius, maxLarge: false })),
629
+ ref,
630
+ "data-accent-color": accentColor,
631
+ ...rest,
632
+ children
633
+ }
634
+ );
635
+ });
636
+ Badge.displayName = "Badge";
637
+ const CheckboxIndicator = React.forwardRef((props, ref) => {
638
+ const { className, ...rest } = props;
639
+ return /* @__PURE__ */ jsxRuntime.jsx(
640
+ RadixCheckbox__namespace.CheckboxIndicator,
641
+ {
642
+ className: classVarianceAuthority.cx(className, "flex items-center justify-center"),
643
+ ref,
644
+ ...rest
645
+ }
646
+ );
647
+ });
648
+ CheckboxIndicator.displayName = "CheckboxIndicator";
649
+ const checkbox = classVarianceAuthority.cva(
650
+ [
651
+ "outline-0",
652
+ "transition-colors",
653
+ "focus-visible:ring-2",
654
+ "ring-(--accent-a8)",
655
+ "disabled:opacity-50",
656
+ "disabled:pointer-events-none"
657
+ ],
658
+ {
659
+ variants: {
660
+ variant: {
661
+ surface: [
662
+ "ring-1",
663
+ "ring-inset",
664
+ "ring-(--base-a7)",
665
+ "bg-(--base-surface)",
666
+ "data-[state='checked']:bg-(--accent-indicator)",
667
+ "data-[state='checked']:ring-(--accent-indicator)",
668
+ "text-(--accent-contrast)"
669
+ ],
670
+ soft: ["bg-(--accent-a5)", "text-(--accent-a11)"],
671
+ outline: ["bg-transparent", "ring-1", "ring-(--accent-a7)", "text-(--accent-a11)"]
672
+ },
673
+ size: {
674
+ xs: ["h-4", "w-4", "text-xs"],
675
+ sm: ["h-5", "w-5", "text-sm"],
676
+ md: ["h-6", "w-6", "text-base"],
677
+ lg: ["h-7", "w-7", "text-lg"],
678
+ xl: ["h-8", "w-8", "text-xl"]
679
+ }
680
+ },
681
+ defaultVariants: {
682
+ variant: "surface",
683
+ size: "md"
684
+ }
685
+ }
686
+ );
687
+ const CheckboxRoot = React.forwardRef((props, ref) => {
688
+ const providerContext = useProvider();
689
+ const {
690
+ className,
691
+ variant,
692
+ size,
693
+ radius = providerContext.radius,
694
+ accentColor = providerContext.accentColor,
695
+ ...rest
696
+ } = props;
697
+ return /* @__PURE__ */ jsxRuntime.jsx(
698
+ RadixCheckbox__namespace.Root,
699
+ {
700
+ className: classVarianceAuthority.cx(className, checkbox({ variant, size }), radiusCva({ radius, maxLarge: true })),
701
+ ref,
702
+ "data-accent-color": accentColor,
703
+ ...rest
704
+ }
705
+ );
706
+ });
707
+ CheckboxRoot.displayName = "CheckboxRoot";
708
+ const Checkbox = {
709
+ Root: CheckboxRoot,
710
+ Indicator: CheckboxIndicator
711
+ };
712
+ const useViewportSize = () => {
713
+ const [prevSize, setPrevSize] = React.useState("initial");
714
+ const [size, setSize] = React.useState("initial");
715
+ const xs = reactResponsive.useMediaQuery({ minWidth: "520px" });
716
+ const sm = reactResponsive.useMediaQuery({ minWidth: "768px" });
717
+ const md = reactResponsive.useMediaQuery({ minWidth: "1024px" });
718
+ const lg = reactResponsive.useMediaQuery({ minWidth: "1280px" });
719
+ const xl = reactResponsive.useMediaQuery({ minWidth: "1640px" });
720
+ React.useLayoutEffect(() => {
721
+ setSize((prev) => {
722
+ setPrevSize(prev);
723
+ return xl ? "xl" : lg ? "lg" : md ? "md" : sm ? "sm" : xs ? "xs" : "initial";
724
+ });
725
+ }, [lg, md, sm, xl, xs]);
726
+ return { size, prevSize, xs, sm, md, lg, xl };
727
+ };
728
+ const useStopEventPropagation = () => {
729
+ return React.useCallback((event) => {
730
+ event.stopPropagation();
731
+ }, []);
732
+ };
733
+ function useTextFilter(values, filterFunction) {
734
+ const [filteredOptions, setFilteredOptions] = React.useState([]);
735
+ const [filterValue, setFilterValue] = React.useState("");
736
+ React.useEffect(() => {
737
+ setFilteredOptions(values.filter((value) => filterFunction(value, filterValue)));
738
+ }, [filterFunction, filterValue, values]);
739
+ return [filteredOptions, filterValue, setFilterValue];
740
+ }
741
+ const useSize = (target) => {
742
+ const [size, setSize] = React.useState();
743
+ React.useLayoutEffect(() => {
744
+ var _a;
745
+ setSize((_a = target.current) == null ? void 0 : _a.getBoundingClientRect());
746
+ }, [target]);
747
+ const handleResize = React.useCallback((entry) => {
748
+ const rect = entry.contentRect;
749
+ setSize(rect);
750
+ }, []);
751
+ useResizeObserver(target, handleResize);
752
+ return size;
753
+ };
754
+ const splitTextForEllipsisAndExpansion = (text, numChars) => {
755
+ const indexOfSpace = text.indexOf(" ", numChars);
756
+ const firstLine = indexOfSpace === -1 ? text : text.substring(0, indexOfSpace);
757
+ const secondLine = indexOfSpace === -1 ? "" : text.substring(indexOfSpace);
758
+ return [firstLine, secondLine];
759
+ };
760
+ const genericMemo = React.memo;
761
+ function useControlledState(args) {
762
+ const { state, setState, initialState } = args;
763
+ const [uncontrolledState, setUncontrolledState] = React.useState(initialState);
764
+ return [state !== void 0 ? state : uncontrolledState, setState !== void 0 ? setState : setUncontrolledState];
765
+ }
766
+ const CollapsibleTreeContext = React.createContext(
767
+ {}
768
+ );
769
+ function useCollapsibleTreeContext() {
770
+ return React.useContext(CollapsibleTreeContext);
771
+ }
772
+ const CollapsibleNode = genericMemo(function(props) {
773
+ const { meta, nodes, level = 0, disabled } = props;
774
+ const [controlledOpenState, setControlledOpenState] = React.useState(false);
775
+ const {
776
+ nodeRenderer,
777
+ disabled: disabledFromContext,
778
+ onNodeOpen,
779
+ onNodeClose,
780
+ onNodeClick,
781
+ nodeStyles,
782
+ nodeClassName
783
+ } = useCollapsibleTreeContext();
784
+ const isDisabled = disabled ?? disabledFromContext;
785
+ const handleClick = React.useCallback(() => {
786
+ if (onNodeClick) onNodeClick(meta);
787
+ }, [meta, onNodeClick]);
788
+ const toggleOpenState = React.useCallback(() => {
789
+ setControlledOpenState(!controlledOpenState);
790
+ if (!controlledOpenState && onNodeOpen) onNodeOpen(meta);
791
+ if (controlledOpenState && onNodeClose) onNodeClose(meta);
792
+ }, [meta, onNodeClose, onNodeOpen, controlledOpenState]);
793
+ const { children, style, className } = React.useMemo(() => {
794
+ return nodeRenderer({
795
+ meta,
796
+ toggleOpen: toggleOpenState,
797
+ open: controlledOpenState,
798
+ disabled: isDisabled
799
+ });
800
+ }, [isDisabled, meta, nodeRenderer, toggleOpenState, controlledOpenState]);
801
+ const combinedStyles = React.useMemo(
802
+ () => ({
803
+ // want node specific styles to overwrite and global node styles
804
+ ...nodeStyles,
805
+ ...style
806
+ }),
807
+ [nodeStyles, style]
808
+ );
809
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixPrimitiveCollapsible__namespace.Root, { asChild: true, open: controlledOpenState, disabled: isDisabled, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col w-full", children: [
810
+ /* @__PURE__ */ jsxRuntime.jsx(
811
+ "div",
812
+ {
813
+ onClick: handleClick,
814
+ className: classVarianceAuthority.cx(nodeClassName, className, "w-full flex items-center shrink-0"),
815
+ style: combinedStyles,
816
+ "data-state": controlledOpenState ? "open" : "closed",
817
+ "data-disabled": isDisabled,
818
+ children
819
+ }
820
+ ),
821
+ nodes && nodes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(RadixPrimitiveCollapsible__namespace.Content, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full flex flex-col h-max pl-2", children: nodes.map((treeNodeProps, index) => /* @__PURE__ */ jsxRuntime.jsx(
822
+ CollapsibleNode,
823
+ {
824
+ level: level + 1,
825
+ ...treeNodeProps
826
+ },
827
+ `${level},${index}`
828
+ )) }) })
829
+ ] }) });
830
+ });
831
+ const CollapsibleTree = genericMemo(function(props) {
832
+ const {
833
+ nodes,
834
+ disabled = false,
835
+ nodeClassName,
836
+ nodeStyles,
837
+ onNodeClick,
838
+ onNodeClose,
839
+ onNodeOpen,
840
+ nodeRenderer,
841
+ ...rest
842
+ } = props;
843
+ return /* @__PURE__ */ jsxRuntime.jsx(
844
+ CollapsibleTreeContext.Provider,
845
+ {
846
+ value: {
847
+ nodeRenderer,
848
+ nodeClassName,
849
+ nodeStyles,
850
+ disabled,
851
+ onNodeClick,
852
+ onNodeClose,
853
+ onNodeOpen
854
+ },
855
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col w-full h-max", ...rest, children: nodes.map((treeNodeProps, index) => /* @__PURE__ */ jsxRuntime.jsx(CollapsibleNode, { ...treeNodeProps }, `${0},${index}`)) })
856
+ }
857
+ );
858
+ });
859
+ const CloseDialogContext = React.createContext({});
860
+ const useCloseDialog = () => {
861
+ const dialogContext = React.useContext(CloseDialogContext);
862
+ if (!dialogContext) {
863
+ throw new Error("useDialog must be used within a DialogRoot");
864
+ }
865
+ return dialogContext;
866
+ };
867
+ const DialogContent = React.forwardRef((props, ref) => {
868
+ const { radius } = useProvider();
869
+ const close = useCloseDialog();
870
+ const { children, title, container, className, size, ...rest } = props;
871
+ const computedChildren = React.useMemo(() => {
872
+ return typeof children === "function" ? children(close) : children;
873
+ }, [children, close]);
874
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Overlay, { className: dialogOverlay({}), children: /* @__PURE__ */ jsxRuntime.jsxs(
875
+ RadixDialog__namespace.Content,
876
+ {
877
+ className: classVarianceAuthority.cx(className, dialogContent({ size }), radiusCva({ radius, maxLarge: true })),
878
+ ref,
879
+ ...rest,
880
+ children: [
881
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between w-full h-max", children: [
882
+ /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Title, { className: "font-medium", children: title }),
883
+ /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Close, { children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, { accentColor: "base", size, variant: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(hi.HiX, {}) }) })
884
+ ] }),
885
+ computedChildren
886
+ ]
887
+ }
888
+ ) }) });
889
+ });
890
+ DialogContent.displayName = "DialogContent";
891
+ const DialogRoot = (props) => {
892
+ const {
893
+ children,
894
+ onOpen,
895
+ onClose,
896
+ defaultOpen,
897
+ onCloseInterrupt,
898
+ open: externalOpen,
899
+ onOpenChange: externalOpenChange
900
+ } = props;
901
+ const [innerOpen, setInnerOpen] = React.useState(defaultOpen ?? false);
902
+ const open = externalOpen ?? innerOpen;
903
+ if ((!!onCloseInterrupt || !!onOpen) && !!externalOpenChange) {
904
+ throw new Error("Neither the `onCloseInterrupt` nor `onOpen` props can be used with `onOpenChange`.");
905
+ }
906
+ if (externalOpen !== void 0 && externalOpenChange === void 0) {
907
+ throw new Error("The `open` prop requires the `onOpenChange` prop.");
908
+ }
909
+ if (!children && externalOpen === void 0) {
910
+ throw new Error("Either the `children` or `open` prop must be defined.");
911
+ } else if (children && externalOpen !== void 0) {
912
+ throw new Error("The `children` and `open` props cannot be used together.");
913
+ }
914
+ const handleOpenChange = React.useCallback(
915
+ (next) => {
916
+ if (externalOpenChange) return externalOpenChange(next);
917
+ if (next && onOpen) {
918
+ onOpen();
919
+ } else if (!next && onCloseInterrupt) {
920
+ const confirmClose = () => {
921
+ setInnerOpen(false);
922
+ if (onClose) onClose();
923
+ };
924
+ return onCloseInterrupt(confirmClose);
925
+ } else if (!next && onClose) {
926
+ onClose();
927
+ }
928
+ setInnerOpen(next);
929
+ },
930
+ [externalOpenChange, onOpen, onClose, onCloseInterrupt]
931
+ );
932
+ const closeDialog = React.useCallback(
933
+ (options) => {
934
+ if (options == null ? void 0 : options.force) {
935
+ return setInnerOpen(false);
936
+ }
937
+ handleOpenChange(false);
938
+ },
939
+ [handleOpenChange]
940
+ );
941
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Root, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsx(CloseDialogContext.Provider, { value: closeDialog, children }) });
942
+ };
943
+ const Dialog = {
944
+ Root: DialogRoot,
945
+ Content: DialogContent,
946
+ Trigger: RadixDialog__namespace.Trigger,
947
+ Close: RadixDialog__namespace.Close
948
+ };
949
+ const HoverCardArrow = React.forwardRef((props, ref) => {
950
+ const { className, ...rest } = props;
951
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixHoverCard__namespace.Arrow, { className: classVarianceAuthority.cx(className, "fill-(--base-6)"), ref, ...rest });
952
+ });
953
+ HoverCardArrow.displayName = "HoverCardArrow";
954
+ const hoverCardContent = classVarianceAuthority.cva(["bg-(--base-1)", "ring-1", "ring-(--base-6)"], {
955
+ variants: {
956
+ size: {
957
+ xs: ["text-xs", "p-2"],
958
+ sm: ["text-sm", "p-3"],
959
+ md: ["text-base", "p-4"],
960
+ lg: ["text-lg", "p-5"],
961
+ xl: ["text-xl", "p-6"]
962
+ }
963
+ },
964
+ defaultVariants: {
965
+ size: "md"
966
+ }
967
+ });
968
+ const HoverCardContent = React.forwardRef((props, ref) => {
969
+ const providerContext = useProvider();
970
+ const {
971
+ className,
972
+ size,
973
+ side,
974
+ radius = providerContext.radius,
975
+ accentColor = providerContext.accentColor,
976
+ sideOffset = 4,
977
+ container,
978
+ ...rest
979
+ } = props;
980
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixHoverCard__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
981
+ RadixHoverCard__namespace.Content,
982
+ {
983
+ className: classVarianceAuthority.cx(
984
+ className,
985
+ hoverCardContent({ size }),
986
+ floating({ side, shadow: "3" }),
987
+ radiusCva({ radius, maxLarge: true })
988
+ ),
989
+ ref,
990
+ side,
991
+ "data-accent-color": accentColor,
992
+ sideOffset,
993
+ ...rest
994
+ }
995
+ ) });
996
+ });
997
+ HoverCardContent.displayName = "HoverCardContent";
998
+ const HoverCard = {
999
+ Arrow: HoverCardArrow,
1000
+ Content: HoverCardContent,
1001
+ Root: RadixHoverCard__namespace.Root,
1002
+ Trigger: RadixHoverCard__namespace.Trigger
1003
+ };
1004
+ const HoverUtility = React.memo(function Root2({ children, forceHover }) {
1005
+ const [isHovered, setIsHovered] = React.useState(false);
1006
+ const handlePointerEnter = React.useCallback(() => {
1007
+ setIsHovered(true);
1008
+ }, []);
1009
+ const handlePointerLeave = React.useCallback(() => {
1010
+ setIsHovered(false);
1011
+ }, []);
1012
+ return children({
1013
+ isHovered: forceHover !== void 0 ? forceHover : isHovered,
1014
+ onPointerEnter: handlePointerEnter,
1015
+ onPointerLeave: handlePointerLeave
1016
+ });
1017
+ });
1018
+ const InputContext = React.createContext({});
1019
+ const inputRoot$1 = classVarianceAuthority.cva(
1020
+ [
1021
+ "flex",
1022
+ "items-stretch",
1023
+ "transition-colors",
1024
+ "has-[:focus]:ring-2",
1025
+ "has-[:focus]:ring-(--accent-a8)",
1026
+ "has-[:disabled]:opacity-50",
1027
+ "has-[:disabled]:pointer-events-none"
1028
+ ],
1029
+ {
1030
+ variants: {
1031
+ variant: {
1032
+ surface: ["ring-1", "ring-(--accent-a7)", "bg-(--accent-surface)", "text-(--accent-a12)"],
1033
+ soft: ["bg-(--accent-a3)", "text-(--accent-12)"],
1034
+ outline: ["ring-1", "ring-(--base-a7)", "bg-transparent", "text-(--base-12)"]
1035
+ },
1036
+ size: {
1037
+ xs: ["h-5", "text-xs"],
1038
+ sm: ["h-6", "text-sm"],
1039
+ md: ["h-7", "text-base"],
1040
+ lg: ["h-8", "text-lg"],
1041
+ xl: ["h-9", "text-xl"]
1042
+ }
1043
+ },
1044
+ defaultVariants: {
1045
+ size: "md",
1046
+ variant: "surface"
1047
+ }
1048
+ }
1049
+ );
1050
+ const inputField = classVarianceAuthority.cva(["peer-[.slot]/slot:indent-0"], {
1051
+ variants: {
1052
+ variant: {
1053
+ surface: ["placeholder-(--accent-12)", "placeholder:opacity-60", "selection:bg-(--accent-a5)"],
1054
+ soft: ["placeholder-(--accent-12)", "placeholder:opacity-60", "selection:bg-(--accent-a5)"],
1055
+ outline: ["placeholder-(--base-a9)", "selection:bg-(--accent-a5)"]
1056
+ },
1057
+ size: {
1058
+ xs: ["indent-1"],
1059
+ sm: ["indent-1.5"],
1060
+ md: ["indent-2"],
1061
+ lg: ["indent-2.5"],
1062
+ xl: ["indent-3"]
1063
+ }
1064
+ },
1065
+ defaultVariants: {
1066
+ size: "md",
1067
+ variant: "surface"
1068
+ }
1069
+ });
1070
+ const inputSlot = classVarianceAuthority.cva(["peer/slot", "slot"], {
1071
+ variants: {
1072
+ size: {
1073
+ xs: ["px-1"],
1074
+ sm: ["px-1.5"],
1075
+ md: ["px-2"],
1076
+ lg: ["px-2.5"],
1077
+ xl: ["px-3"]
1078
+ },
1079
+ variant: {
1080
+ surface: ["text-(--accent-12)"],
1081
+ soft: ["text-(--accent-12)"],
1082
+ outline: ["text-(--base-a11)"]
1083
+ }
1084
+ },
1085
+ defaultVariants: {
1086
+ size: "md"
1087
+ }
1088
+ });
1089
+ const InputField = React.forwardRef((props, ref) => {
1090
+ const { className, ...rest } = props;
1091
+ const { size, variant } = React.useContext(InputContext);
1092
+ return /* @__PURE__ */ jsxRuntime.jsx(
1093
+ "input",
1094
+ {
1095
+ className: classVarianceAuthority.cx(className, inputField({ size, variant }), "bg-transparent outline-0 grow"),
1096
+ ref,
1097
+ ...rest
1098
+ }
1099
+ );
1100
+ });
1101
+ InputField.displayName = "InputField";
1102
+ const InputRoot = React.forwardRef((props, ref) => {
1103
+ const providerContext = useProvider();
1104
+ const {
1105
+ className,
1106
+ variant = "surface",
1107
+ size = "md",
1108
+ accentColor = providerContext.accentColor,
1109
+ radius = providerContext.radius,
1110
+ ...rest
1111
+ } = props;
1112
+ return /* @__PURE__ */ jsxRuntime.jsx(InputContext.Provider, { value: { size, variant }, children: /* @__PURE__ */ jsxRuntime.jsx(
1113
+ "div",
1114
+ {
1115
+ className: classVarianceAuthority.cx(className, inputRoot$1({ variant, size }), radiusCva({ radius, maxLarge: false })),
1116
+ ref,
1117
+ "data-accent-color": accentColor,
1118
+ ...rest
1119
+ }
1120
+ ) });
1121
+ });
1122
+ InputRoot.displayName = "InputRoot";
1123
+ const InputSlot = React.forwardRef((props, ref) => {
1124
+ const { className, ...rest } = props;
1125
+ const { size, variant } = React.useContext(InputContext);
1126
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classVarianceAuthority.cx(className, inputSlot({ size, variant }), "flex items-center"), ref, ...rest });
1127
+ });
1128
+ InputSlot.displayName = "InputSlot";
1129
+ const Input = {
1130
+ Field: InputField,
1131
+ Root: InputRoot,
1132
+ Slot: InputSlot
1133
+ };
1134
+ const LayoutContext = React.createContext({});
1135
+ const useLayoutContext = () => React.useContext(LayoutContext);
1136
+ const Container = React.memo(
1137
+ React.forwardRef((props, ref) => {
1138
+ const { children, className, ...rest } = props;
1139
+ const { hideLayout = false } = useLayoutContext();
1140
+ return !hideLayout && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classVarianceAuthority.cx(className, "flex grow h-full"), ref, ...rest, children });
1141
+ })
1142
+ );
1143
+ const Root$1 = React.memo((props) => {
1144
+ const { children, small = false, hideLayout = false } = props;
1145
+ const [showLeftSlideOut, setShowLeftSlideOut] = React.useState(false);
1146
+ const [showRightSlideOut, setShowRightSlideOut] = React.useState(false);
1147
+ const contextValue = React.useMemo(
1148
+ () => ({
1149
+ small,
1150
+ hideLayout,
1151
+ showLeftSlideOut,
1152
+ setShowLeftSlideOut,
1153
+ showRightSlideOut,
1154
+ setShowRightSlideOut
1155
+ }),
1156
+ [hideLayout, showLeftSlideOut, showRightSlideOut, small]
1157
+ );
1158
+ return /* @__PURE__ */ jsxRuntime.jsx(LayoutContext.Provider, { value: contextValue, children });
1159
+ });
1160
+ Root$1.displayName = "Layout.Root";
1161
+ function usePointerDownOutside(onPointerDownOutside, ownerElement = globalThis == null ? void 0 : globalThis.document.body) {
1162
+ const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
1163
+ const isPointerInsideReactTreeRef = React.useRef(false);
1164
+ const handleClickRef = React.useRef(() => {
1165
+ });
1166
+ React.useEffect(() => {
1167
+ const handlePointerDown = (event) => {
1168
+ if (event.target && !isPointerInsideReactTreeRef.current) {
1169
+ const eventDetail = { originalEvent: event };
1170
+ const handleAndDispatchPointerDownOutsideEvent = () => {
1171
+ handleAndDispatchCustomEvent("pointerDownOutside", handlePointerDownOutside, eventDetail, {
1172
+ discrete: true
1173
+ });
1174
+ };
1175
+ if (event.pointerType === "touch") {
1176
+ ownerElement.removeEventListener("click", handleClickRef.current);
1177
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
1178
+ ownerElement.addEventListener("click", handleClickRef.current, { once: true });
1179
+ } else {
1180
+ handleAndDispatchPointerDownOutsideEvent();
1181
+ }
1182
+ } else {
1183
+ ownerElement.removeEventListener("click", handleClickRef.current);
1184
+ }
1185
+ isPointerInsideReactTreeRef.current = false;
1186
+ };
1187
+ const timerId = window.setTimeout(() => {
1188
+ ownerElement.addEventListener("pointerdown", handlePointerDown);
1189
+ }, 0);
1190
+ return () => {
1191
+ window.clearTimeout(timerId);
1192
+ ownerElement.removeEventListener("pointerdown", handlePointerDown);
1193
+ ownerElement.removeEventListener("click", handleClickRef.current);
1194
+ };
1195
+ }, [ownerElement, handlePointerDownOutside]);
1196
+ return {
1197
+ // ensures we check React component tree (not just DOM tree)
1198
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
1199
+ };
1200
+ }
1201
+ function dispatchDiscreteCustomEvent(target, event) {
1202
+ if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
1203
+ }
1204
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
1205
+ const target = detail.originalEvent.target;
1206
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
1207
+ if (handler) target.addEventListener(name, handler, { once: true });
1208
+ if (discrete) {
1209
+ dispatchDiscreteCustomEvent(target, event);
1210
+ } else {
1211
+ target.dispatchEvent(event);
1212
+ }
1213
+ }
1214
+ function useCallbackRef(callback) {
1215
+ const callbackRef = React.useRef(callback);
1216
+ React.useEffect(() => {
1217
+ callbackRef.current = callback;
1218
+ });
1219
+ return React.useMemo(() => (...args) => {
1220
+ var _a;
1221
+ return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
1222
+ }, []);
1223
+ }
1224
+ const TIMEOUT_DURATION$1 = 3e3;
1225
+ const SlideOutV3 = React.memo(
1226
+ React.forwardRef((props, ref) => {
1227
+ const {
1228
+ className,
1229
+ style,
1230
+ children,
1231
+ open,
1232
+ hide = false,
1233
+ modal = false,
1234
+ overlayComponent,
1235
+ resizeable = true,
1236
+ side,
1237
+ position = "relative",
1238
+ initialWidth,
1239
+ minWidth,
1240
+ maxWidth,
1241
+ onDismiss,
1242
+ onOpening,
1243
+ onClosed,
1244
+ content
1245
+ } = props;
1246
+ const isLeft = side === "left";
1247
+ const [parentContainer, setParentContainer] = React.useState(document.body);
1248
+ const childrenContainerRef = React.useRef(null);
1249
+ const [slideOutWidth, setSlideOutWidth] = React.useState(initialWidth);
1250
+ const handleResize = React.useCallback(
1251
+ (_event, _dir, ref2, _delta) => {
1252
+ setSlideOutWidth(ref2.clientWidth);
1253
+ },
1254
+ []
1255
+ );
1256
+ const handleDismiss = React.useCallback(() => {
1257
+ if (modal && onDismiss) {
1258
+ onDismiss();
1259
+ }
1260
+ }, [modal, onDismiss]);
1261
+ const handleAssignParentContainer = React.useCallback((element) => {
1262
+ if (element) {
1263
+ setParentContainer(element);
1264
+ }
1265
+ }, []);
1266
+ React.useEffect(() => {
1267
+ setSlideOutWidth(initialWidth);
1268
+ }, [initialWidth]);
1269
+ React.useEffect(() => {
1270
+ if (!childrenContainerRef.current) return;
1271
+ const originalParentPointerEvents = childrenContainerRef.current.style.pointerEvents;
1272
+ if (open && modal) {
1273
+ childrenContainerRef.current.style.pointerEvents = "none";
1274
+ }
1275
+ return () => {
1276
+ if (childrenContainerRef.current) {
1277
+ childrenContainerRef.current.style.pointerEvents = originalParentPointerEvents;
1278
+ }
1279
+ };
1280
+ }, [modal, open, parentContainer.style]);
1281
+ const { onPointerDownCapture: handlePointerDownCapture } = usePointerDownOutside(handleDismiss, parentContainer);
1282
+ const CSSTransitionClassNames = React.useMemo(
1283
+ () => ({
1284
+ enter: isLeft ? "-ml-(--slide-out-width)" : "-mr-(--slide-out-width)",
1285
+ enterActive: isLeft ? "ease-linear duration-200 transition-[margin-left] ml-0" : "ease-linear duration-200 transition-[margin-right] mr-0",
1286
+ enterDone: isLeft ? "ml-0" : "mr-0",
1287
+ exitActive: isLeft ? "ease-linear duration-200 transition-[margin-left] -ml-(--slide-out-width)" : "ease-linear duration-200 transition-[margin-right] -mr-(--slide-out-width)",
1288
+ exitDone: isLeft ? "-ml-(--slide-out-width)" : "-mr-(--slide-out-width)"
1289
+ }),
1290
+ [isLeft]
1291
+ );
1292
+ const resizableSize = React.useMemo(
1293
+ () => (
1294
+ // prettier-ignore
1295
+ { width: slideOutWidth, height: "100%" }
1296
+ ),
1297
+ [slideOutWidth]
1298
+ );
1299
+ const resizableStyle = React.useMemo(
1300
+ () => ({
1301
+ position,
1302
+ "--slide-out-width": `${slideOutWidth}${typeof slideOutWidth === "number" ? "px" : ""}`
1303
+ }),
1304
+ [position, slideOutWidth]
1305
+ );
1306
+ const resizableEnable = React.useMemo(
1307
+ () => ({ left: resizeable && !isLeft, right: resizeable && isLeft }),
1308
+ [isLeft, resizeable]
1309
+ );
1310
+ const SlideOut2 = React.useMemo(
1311
+ () => /* @__PURE__ */ jsxRuntime.jsx(
1312
+ reactTransitionGroup.CSSTransition,
1313
+ {
1314
+ classNames: CSSTransitionClassNames,
1315
+ in: open,
1316
+ timeout: TIMEOUT_DURATION$1,
1317
+ unmountOnExit: true,
1318
+ mountOnEnter: true,
1319
+ onEntering: onOpening,
1320
+ onExited: onClosed,
1321
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1322
+ reactSlot.Slot,
1323
+ {
1324
+ className: classVarianceAuthority.cx(className, "top-0", "bottom-0", {
1325
+ "left-0": isLeft,
1326
+ "right-0": !isLeft,
1327
+ absolute: position === "absolute",
1328
+ relative: position === "relative"
1329
+ }),
1330
+ style,
1331
+ onPointerDownCapture: handlePointerDownCapture,
1332
+ ref,
1333
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1334
+ reResizable.Resizable,
1335
+ {
1336
+ as: "div",
1337
+ onResize: handleResize,
1338
+ size: resizableSize,
1339
+ style: resizableStyle,
1340
+ minWidth,
1341
+ maxWidth,
1342
+ enable: resizableEnable,
1343
+ children: content
1344
+ }
1345
+ )
1346
+ }
1347
+ )
1348
+ }
1349
+ ),
1350
+ [
1351
+ CSSTransitionClassNames,
1352
+ open,
1353
+ onOpening,
1354
+ onClosed,
1355
+ className,
1356
+ isLeft,
1357
+ position,
1358
+ style,
1359
+ handlePointerDownCapture,
1360
+ ref,
1361
+ handleResize,
1362
+ resizableSize,
1363
+ resizableStyle,
1364
+ minWidth,
1365
+ maxWidth,
1366
+ resizableEnable,
1367
+ content
1368
+ ]
1369
+ );
1370
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1371
+ "div",
1372
+ {
1373
+ className: "w-full h-full flex relative overflow-hidden max-w-full max-h-full",
1374
+ ref: handleAssignParentContainer,
1375
+ children: [
1376
+ side === "left" && !hide && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1377
+ open && overlayComponent,
1378
+ " ",
1379
+ content && SlideOut2
1380
+ ] }),
1381
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full grow flex max-w-full max-w-full overflow-hidden", ref: childrenContainerRef, children }),
1382
+ side === "right" && !hide && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1383
+ open && overlayComponent,
1384
+ " ",
1385
+ content && SlideOut2
1386
+ ] })
1387
+ ]
1388
+ }
1389
+ );
1390
+ })
1391
+ );
1392
+ const DEFAULT_INITIAL_WIDTH = "30%";
1393
+ const SlideOut = React.memo(
1394
+ React.forwardRef((props, ref) => {
1395
+ const { small, hideLayout } = useLayoutContext();
1396
+ const { className, showSlideOut, setShowSlideOut, defaultOpen, side, ...rest } = props;
1397
+ React.useEffect(() => {
1398
+ if (small && (defaultOpen == null ? void 0 : defaultOpen.small) !== void 0) {
1399
+ setShowSlideOut(defaultOpen == null ? void 0 : defaultOpen.small);
1400
+ } else if (!small && (defaultOpen == null ? void 0 : defaultOpen.large) !== void 0) {
1401
+ setShowSlideOut(defaultOpen == null ? void 0 : defaultOpen.large);
1402
+ }
1403
+ }, [defaultOpen, setShowSlideOut, small]);
1404
+ const handleDismiss = React.useCallback(() => {
1405
+ setShowSlideOut(false);
1406
+ }, [setShowSlideOut]);
1407
+ const mergedProps = React.useMemo(
1408
+ () => ({
1409
+ // controlled props
1410
+ ...{
1411
+ open: showSlideOut,
1412
+ initialWidth: DEFAULT_INITIAL_WIDTH,
1413
+ modal: small,
1414
+ onDismiss: handleDismiss,
1415
+ position: small ? "absolute" : "relative"
1416
+ },
1417
+ // uncontrolled props
1418
+ ...rest
1419
+ }),
1420
+ [handleDismiss, rest, showSlideOut, small]
1421
+ );
1422
+ return !hideLayout && /* @__PURE__ */ jsxRuntime.jsx(
1423
+ SlideOutV3,
1424
+ {
1425
+ className: classVarianceAuthority.cx(`overmap-layout-slideOut-${side}`, className),
1426
+ side,
1427
+ ref,
1428
+ ...mergedProps
1429
+ }
1430
+ );
1431
+ })
1432
+ );
1433
+ const LeftSlideOut = React.memo(
1434
+ React.forwardRef((props, ref) => {
1435
+ const { showLeftSlideOut, setShowLeftSlideOut } = useLayoutContext();
1436
+ return /* @__PURE__ */ jsxRuntime.jsx(
1437
+ SlideOut,
1438
+ {
1439
+ side: "left",
1440
+ showSlideOut: showLeftSlideOut,
1441
+ setShowSlideOut: setShowLeftSlideOut,
1442
+ ref,
1443
+ ...props
1444
+ }
1445
+ );
1446
+ })
1447
+ );
1448
+ const RightSlideOut = React.memo(
1449
+ React.forwardRef((props, ref) => {
1450
+ const { showRightSlideOut, setShowRightSlideOut } = useLayoutContext();
1451
+ return /* @__PURE__ */ jsxRuntime.jsx(
1452
+ SlideOut,
1453
+ {
1454
+ side: "right",
1455
+ showSlideOut: showRightSlideOut,
1456
+ setShowSlideOut: setShowRightSlideOut,
1457
+ ref,
1458
+ ...props
1459
+ }
1460
+ );
1461
+ })
1462
+ );
1463
+ const SlideOutOverlay = React.memo(
1464
+ React.forwardRef((props, ref) => {
1465
+ const { className, active, side, smallModeOnly = false, ...rest } = props;
1466
+ const { small, hideLayout, showLeftSlideOut, showRightSlideOut } = useLayoutContext();
1467
+ const showOverlay = React.useMemo(() => {
1468
+ if (active !== void 0) return active;
1469
+ if (hideLayout) return false;
1470
+ if (smallModeOnly && !small) return false;
1471
+ return side === "left" ? showLeftSlideOut : showRightSlideOut;
1472
+ }, [active, hideLayout, showLeftSlideOut, showRightSlideOut, side, small, smallModeOnly]);
1473
+ return showOverlay && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classVarianceAuthority.cx("overmap-layout-overlay", className, "inset-0 fixed"), ref, ...rest });
1474
+ })
1475
+ );
1476
+ function nextStateBasedOnType(prevState, type) {
1477
+ switch (type) {
1478
+ case "toggle":
1479
+ return !prevState;
1480
+ case "open":
1481
+ return true;
1482
+ case "close":
1483
+ return false;
1484
+ }
1485
+ }
1486
+ const SlideOutTrigger = React.memo(
1487
+ React.forwardRef((props, ref) => {
1488
+ const { side, type = "toggle", children } = props;
1489
+ const { setShowLeftSlideOut, setShowRightSlideOut } = useLayoutContext();
1490
+ const handleClick = React.useCallback(() => {
1491
+ const setShowSlideOut = side === "left" ? setShowLeftSlideOut : setShowRightSlideOut;
1492
+ setShowSlideOut((prevState) => nextStateBasedOnType(prevState, type));
1493
+ }, [setShowLeftSlideOut, setShowRightSlideOut, side, type]);
1494
+ return /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { ref, onClick: handleClick, children });
1495
+ })
1496
+ );
1497
+ const Layout = {
1498
+ Root: Root$1,
1499
+ Container,
1500
+ SlideOutOverlay,
1501
+ LeftSlideOut,
1502
+ RightSlideOut,
1503
+ SlideOutTrigger
1504
+ };
1505
+ const DEFAULT_ICON_SIZE = "15px";
1506
+ const RiIcon = React.memo((props) => {
1507
+ const { icon, size = DEFAULT_ICON_SIZE, color, ...rest } = props;
1508
+ const Icon = RiIcons__namespace[icon];
1509
+ if (!Icon) console.error(`Icon ${icon} not found`);
1510
+ return Icon ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { size, color, ...rest }) : /* @__PURE__ */ jsxRuntime.jsx(RiIcons.RiQuestionMark, {});
1511
+ });
1512
+ RiIcon.displayName = "IconComponent";
1513
+ const centerStyles = { placeSelf: "center" };
1514
+ const ErrorFallback = React.memo((props) => {
1515
+ const { absoluteCentering, message = "Something went wrong", onRetry } = props;
1516
+ const { resetBoundary } = reactErrorBoundary.useErrorBoundary();
1517
+ const height = "20px";
1518
+ const outerFlexStyles = absoluteCentering ? { position: "absolute", top: "50%", transform: "translateY(-50%)" } : void 0;
1519
+ const handleRetry = React.useCallback(() => {
1520
+ resetBoundary();
1521
+ onRetry();
1522
+ }, [onRetry, resetBoundary]);
1523
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2 w-full", style: outerFlexStyles, children: [
1524
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexGrow: 1 } }),
1525
+ /* @__PURE__ */ jsxRuntime.jsx(RiIcon, { icon: "RiAlertLine", size: height, style: centerStyles }),
1526
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { lineHeight: height, ...centerStyles }, children: message }),
1527
+ /* @__PURE__ */ jsxRuntime.jsx(IconButton, { "aria-label": "Try again", variant: "soft", onClick: handleRetry, style: centerStyles, children: /* @__PURE__ */ jsxRuntime.jsx(RiIcon, { icon: "RiLoopLeftLine", size: height }) }),
1528
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flexGrow: 1 } })
1529
+ ] });
1530
+ });
1531
+ ErrorFallback.displayName = "ErrorFallback";
1532
+ const OvermapErrorBoundary = React.memo((props) => {
1533
+ const { absoluteCentering, message } = props;
1534
+ const [attempt, setAttempt] = React.useState(0);
1535
+ const logError = React.useCallback((error, info) => {
1536
+ console.error(error, info);
1537
+ setAttempt((prev) => prev + 1);
1538
+ }, []);
1539
+ const handleRetry = React.useCallback(() => {
1540
+ setAttempt((prev) => prev + 1);
1541
+ }, []);
1542
+ return /* @__PURE__ */ jsxRuntime.jsx(
1543
+ reactErrorBoundary.ErrorBoundary,
1544
+ {
1545
+ fallback: /* @__PURE__ */ jsxRuntime.jsx(ErrorFallback, { absoluteCentering, message, onRetry: handleRetry }),
1546
+ onError: logError,
1547
+ children: props.children
1548
+ },
1549
+ attempt
1550
+ );
1551
+ });
1552
+ OvermapErrorBoundary.displayName = "OvermapErrorBoundary";
1553
+ const MenuContext = React.createContext({});
1554
+ const useMenuContext = () => React.useContext(MenuContext);
1555
+ const MENU_OVERFLOW_PADDING = 20;
1556
+ const MENU_CONTENT_PADDING = 8;
1557
+ const MENU_MINIMUM_MAX_HEIGHT = 250;
1558
+ const DEFAULT_OFFSET = 5;
1559
+ const Root = React.memo((props) => {
1560
+ const {
1561
+ children,
1562
+ side = "bottom",
1563
+ align = "center",
1564
+ offset,
1565
+ loop = false,
1566
+ modal = false,
1567
+ // open state related props
1568
+ open: controlledOpen,
1569
+ onOpenChange,
1570
+ defaultOpen
1571
+ } = props;
1572
+ const [open, setOpen] = useControlledState({
1573
+ state: controlledOpen,
1574
+ initialState: defaultOpen ?? false,
1575
+ setState: onOpenChange
1576
+ });
1577
+ const [activeIndex, setActiveIndex] = React.useState(null);
1578
+ const [triggerType, setTriggerType] = React.useState(null);
1579
+ const elementsRef = React.useRef([]);
1580
+ const nodeId = react.useFloatingNodeId();
1581
+ const { refs, floatingStyles, context, middlewareData } = react.useFloating({
1582
+ nodeId,
1583
+ strategy: "fixed",
1584
+ placement: side + (align !== "center" ? "-" + align : ""),
1585
+ whileElementsMounted: react.autoUpdate,
1586
+ open,
1587
+ onOpenChange: setOpen,
1588
+ middleware: [
1589
+ react.offset({ mainAxis: offset ?? DEFAULT_OFFSET }),
1590
+ react.size({
1591
+ apply({ availableHeight, elements }) {
1592
+ elements.floating.style.setProperty(
1593
+ "--overmap-menu-available-height",
1594
+ `${Math.max(availableHeight, MENU_MINIMUM_MAX_HEIGHT)}px`
1595
+ );
1596
+ },
1597
+ padding: MENU_OVERFLOW_PADDING
1598
+ }),
1599
+ react.flip({ fallbackStrategy: "initialPlacement" }),
1600
+ react.shift({ padding: MENU_OVERFLOW_PADDING }),
1601
+ react.hide()
1602
+ ]
1603
+ });
1604
+ const role = react.useRole(context, {
1605
+ role: "menu"
1606
+ });
1607
+ const dismiss = react.useDismiss(context, {
1608
+ ancestorScroll: triggerType === "context" || triggerType === "virtual"
1609
+ });
1610
+ const click = react.useClick(context, {
1611
+ enabled: triggerType === "click"
1612
+ });
1613
+ const listNavigation = react.useListNavigation(context, {
1614
+ listRef: elementsRef,
1615
+ activeIndex,
1616
+ onNavigate: setActiveIndex,
1617
+ loop
1618
+ });
1619
+ const { getFloatingProps, getItemProps, getReferenceProps } = react.useInteractions([
1620
+ dismiss,
1621
+ listNavigation,
1622
+ click,
1623
+ role
1624
+ ]);
1625
+ return /* @__PURE__ */ jsxRuntime.jsx(react.FloatingTree, { children: /* @__PURE__ */ jsxRuntime.jsx(
1626
+ MenuContext.Provider,
1627
+ {
1628
+ value: {
1629
+ open,
1630
+ setOpen,
1631
+ refs,
1632
+ context,
1633
+ floatingStyles,
1634
+ elementsRef,
1635
+ getFloatingProps,
1636
+ getItemProps,
1637
+ getReferenceProps,
1638
+ nodeId,
1639
+ activeIndex,
1640
+ setActiveIndex,
1641
+ middlewareData,
1642
+ side,
1643
+ modal,
1644
+ setTriggerType
1645
+ },
1646
+ children
1647
+ }
1648
+ ) });
1649
+ });
1650
+ Root.displayName = "Root";
1651
+ const ClickTrigger = React.memo(
1652
+ React.forwardRef((props, forwardedRef) => {
1653
+ const { children, disabled = false } = props;
1654
+ const { getReferenceProps, refs, setTriggerType } = useMenuContext();
1655
+ const mergedRefs = react.useMergeRefs([refs.setReference, forwardedRef]);
1656
+ React.useEffect(() => {
1657
+ setTriggerType("click");
1658
+ }, [setTriggerType]);
1659
+ return /* @__PURE__ */ jsxRuntime.jsx(
1660
+ reactSlot.Slot,
1661
+ {
1662
+ ref: mergedRefs,
1663
+ "aria-disabled": disabled,
1664
+ "data-disabled": disabled ? "" : void 0,
1665
+ ...getReferenceProps({ disabled }),
1666
+ children
1667
+ }
1668
+ );
1669
+ })
1670
+ );
1671
+ const menuItem = classVarianceAuthority.cva(
1672
+ ["select-none", "relative", "flex", "items-center", "rounded", "outline-none", "data-disabled:text-(--base-a8)"],
1673
+ {
1674
+ variants: {
1675
+ size: {
1676
+ xs: ["h-5", "text-xs", "gap-1", "px-1"],
1677
+ sm: ["h-6", "text-sm", "gap-1.5", "px-1.5"],
1678
+ md: ["h-7", "text-base", "gap-2", "px-2"],
1679
+ lg: ["h-8", "text-lg", "gap-2.5", "px-2.5"],
1680
+ xl: ["h-9", "text-xl", "gap-3", "px-3"]
1681
+ },
1682
+ variant: {
1683
+ solid: [
1684
+ "text-(--base-12)",
1685
+ "data-highlighted:not-data-disabled:text-(--accent-contrast)",
1686
+ "data-highlighted:not-data-disabled:bg-(--accent-a9)"
1687
+ ],
1688
+ soft: ["text-(--base-12)", "data-highlighted:not-data-disabled:bg-(--accent-a4)"]
1689
+ }
1690
+ },
1691
+ defaultVariants: {
1692
+ size: "md",
1693
+ variant: "solid"
1694
+ }
1695
+ }
1696
+ );
1697
+ const menuSeparator = classVarianceAuthority.cva(["h-px", "bg-(--base-a6)", "w-auto"], {
1698
+ variants: {
1699
+ size: {
1700
+ xs: ["-mx-1", "my-1"],
1701
+ sm: ["-mx-1.5", "my-1.5"],
1702
+ md: ["-mx-2", "my-2"],
1703
+ lg: ["-mx-2.5", "my-2.5"],
1704
+ xl: ["-mx-3", "my-3"]
1705
+ }
1706
+ },
1707
+ defaultVariants: {
1708
+ size: "md"
1709
+ }
1710
+ });
1711
+ const menuSelectedIndicator = classVarianceAuthority.cva(["flex", "items-center", "justify-center"], {
1712
+ variants: {
1713
+ size: {
1714
+ xs: ["w-4", "h-4"],
1715
+ sm: ["w-5", "h-5"],
1716
+ md: ["w-6", "h-6"],
1717
+ lg: ["w-7", "h-7"],
1718
+ xl: ["w-8", "h-8"]
1719
+ }
1720
+ },
1721
+ defaultVariants: {
1722
+ size: "md"
1723
+ }
1724
+ });
1725
+ const menuContent = classVarianceAuthority.cva(
1726
+ [
1727
+ "w-max",
1728
+ "outline-none",
1729
+ "pointer-events-auto",
1730
+ "bg-(--base-1)",
1731
+ "ring-1",
1732
+ "ring-(--base-6)",
1733
+ "rounded",
1734
+ "overflow-y-auto",
1735
+ "[scrollbar-width:thin]",
1736
+ "[scrollbar-color:var(--base-6)_transparent]"
1737
+ ],
1738
+ {
1739
+ variants: {
1740
+ size: {
1741
+ xs: ["p-1"],
1742
+ sm: ["p-1.5"],
1743
+ md: ["p-2"],
1744
+ lg: ["p-2.5"],
1745
+ xl: ["p-3"]
1746
+ },
1747
+ radius: {
1748
+ none: ["rounded-none"],
1749
+ xs: ["rounded-xs"],
1750
+ sm: ["rounded-sm"],
1751
+ md: ["rounded-md"],
1752
+ lg: ["rounded-lg"],
1753
+ xl: ["rounded-lg"],
1754
+ full: ["rounded-lg"]
1755
+ }
1756
+ },
1757
+ defaultVariants: {
1758
+ size: "md"
1759
+ }
1760
+ }
1761
+ );
1762
+ const menuOverlay = classVarianceAuthority.cva(["overflow-hidden"], {
1763
+ variants: {
1764
+ modal: {
1765
+ true: ["pointer-events-auto"],
1766
+ false: ["pointer-events-none"]
1767
+ }
1768
+ },
1769
+ defaultVariants: {
1770
+ modal: false
1771
+ }
1772
+ });
1773
+ const inputRoot = classVarianceAuthority.cva(
1774
+ [
1775
+ "flex",
1776
+ "items-stretch",
1777
+ "transition-colors",
1778
+ "has-[:disabled]:opacity-50",
1779
+ "has-[:disabled]:pointer-events-none",
1780
+ "box-border",
1781
+ "bg-transparent",
1782
+ "text-(--base-12)"
1783
+ ],
1784
+ {
1785
+ variants: {
1786
+ size: {
1787
+ xs: ["h-5", "text-xs", "px-1", "gap-1"],
1788
+ sm: ["h-6", "text-sm", "px-1.5", "gap-1.5"],
1789
+ md: ["h-7", "text-base", "px-2", "gap-2"],
1790
+ lg: ["h-8", "text-lg", "px-2.5", "gap-2.5"],
1791
+ xl: ["h-9", "text-xl", "px-3", "gap-3"]
1792
+ }
1793
+ },
1794
+ defaultVariants: {
1795
+ size: "md"
1796
+ }
1797
+ }
1798
+ );
1799
+ const MenuContentContext = React.createContext({});
1800
+ const useMenuContentContext = () => React.useContext(MenuContentContext);
1801
+ const Content = React.memo(
1802
+ React.forwardRef((props, forwardedRef) => {
1803
+ var _a;
1804
+ const providerContext = useProvider();
1805
+ const {
1806
+ children,
1807
+ size = "md",
1808
+ variant = "solid",
1809
+ radius = providerContext.radius,
1810
+ accentColor = providerContext.accentColor,
1811
+ ...rest
1812
+ } = props;
1813
+ const {
1814
+ refs,
1815
+ getFloatingProps,
1816
+ middlewareData,
1817
+ elementsRef,
1818
+ activeIndex,
1819
+ setActiveIndex,
1820
+ getItemProps,
1821
+ open,
1822
+ setOpen,
1823
+ nodeId,
1824
+ context,
1825
+ floatingStyles,
1826
+ modal,
1827
+ side
1828
+ } = useMenuContext();
1829
+ const computedFloatingStyles = React.useMemo(() => {
1830
+ var _a2;
1831
+ return {
1832
+ ...floatingStyles,
1833
+ visibility: ((_a2 = middlewareData.hide) == null ? void 0 : _a2.referenceHidden) ? "hidden" : "visible"
1834
+ };
1835
+ }, [floatingStyles, (_a = middlewareData.hide) == null ? void 0 : _a.referenceHidden]);
1836
+ return /* @__PURE__ */ jsxRuntime.jsx(react.FloatingNode, { id: nodeId, children: open && /* @__PURE__ */ jsxRuntime.jsx(react.FloatingPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.FloatingOverlay, { className: classVarianceAuthority.cx("overmap-menu-overlay", menuOverlay({ modal })), lockScroll: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.FloatingFocusManager, { context, children: /* @__PURE__ */ jsxRuntime.jsx(react.FloatingList, { elementsRef, children: /* @__PURE__ */ jsxRuntime.jsx(
1837
+ MenuContentContext.Provider,
1838
+ {
1839
+ value: {
1840
+ getItemProps,
1841
+ activeIndex,
1842
+ elementsRef,
1843
+ open,
1844
+ setOpen,
1845
+ refs,
1846
+ setActiveIndex,
1847
+ size,
1848
+ variant,
1849
+ accentColor,
1850
+ radius
1851
+ },
1852
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1853
+ "div",
1854
+ {
1855
+ className: "outline-none w-max border-box",
1856
+ ref: refs.setFloating,
1857
+ tabIndex: -1,
1858
+ style: computedFloatingStyles,
1859
+ ...getFloatingProps(),
1860
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1861
+ "div",
1862
+ {
1863
+ className: classVarianceAuthority.cx(
1864
+ "overmap-menu-content",
1865
+ menuContent({ size }),
1866
+ floating({ side, shadow: "3" }),
1867
+ radiusCva({ radius, maxLarge: true }),
1868
+ "max-h-(--overmap-menu-available-height)"
1869
+ ),
1870
+ ref: forwardedRef,
1871
+ "data-state": open ? "open" : "closed",
1872
+ "data-side": side,
1873
+ "data-accent-color": accentColor,
1874
+ ...rest,
1875
+ children
1876
+ }
1877
+ )
1878
+ }
1879
+ )
1880
+ }
1881
+ ) }) }) }) }) });
1882
+ })
1883
+ );
1884
+ const ContextTrigger = React.memo(
1885
+ React.forwardRef((props, forwardedRef) => {
1886
+ const { children, disabled } = props;
1887
+ const ref = React.useRef(null);
1888
+ const { setOpen, refs, setTriggerType } = useMenuContext();
1889
+ const mergedRefs = react.useMergeRefs([forwardedRef, ref]);
1890
+ React.useEffect(() => {
1891
+ setTriggerType("context");
1892
+ }, [setTriggerType]);
1893
+ const handleContextMenu = React.useCallback(
1894
+ (e) => {
1895
+ const { clientY, clientX } = e;
1896
+ if (!disabled && ref.current) {
1897
+ e.preventDefault();
1898
+ refs.setPositionReference({
1899
+ getBoundingClientRect() {
1900
+ return {
1901
+ x: clientX,
1902
+ y: clientY,
1903
+ top: clientY,
1904
+ left: clientX,
1905
+ height: 0,
1906
+ width: 0,
1907
+ bottom: clientY,
1908
+ right: clientX
1909
+ };
1910
+ },
1911
+ contextElement: ref.current
1912
+ });
1913
+ setOpen(true);
1914
+ }
1915
+ },
1916
+ [disabled, refs, setOpen]
1917
+ );
1918
+ return /* @__PURE__ */ jsxRuntime.jsx(
1919
+ reactSlot.Slot,
1920
+ {
1921
+ ref: mergedRefs,
1922
+ style: { WebkitTouchCallout: disabled ? "none" : "unset" },
1923
+ "aria-disabled": disabled,
1924
+ "data-disabled": disabled ? "" : void 0,
1925
+ onContextMenu: handleContextMenu,
1926
+ children
1927
+ }
1928
+ );
1929
+ })
1930
+ );
1931
+ const Group = React.memo(
1932
+ React.forwardRef((props, ref) => {
1933
+ const { children, ...rest } = props;
1934
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, role: "group", ...rest, children });
1935
+ })
1936
+ );
1937
+ const MenuInputField = React.memo(
1938
+ React.forwardRef((props, forwardedRef) => {
1939
+ const { className, onValueChange, onChange, ...rest } = props;
1940
+ const { activeIndex, getItemProps } = useMenuContentContext();
1941
+ const { index, ref } = react.useListItem();
1942
+ const mergedRefs = react.useMergeRefs([ref, forwardedRef]);
1943
+ const handleChange = React.useCallback(
1944
+ (e) => {
1945
+ if (onChange) onChange(e);
1946
+ if (onValueChange) onValueChange(e.target.value);
1947
+ },
1948
+ [onChange, onValueChange]
1949
+ );
1950
+ React.useEffect(() => {
1951
+ return () => {
1952
+ if (onValueChange) onValueChange("");
1953
+ };
1954
+ }, []);
1955
+ return /* @__PURE__ */ jsxRuntime.jsx(
1956
+ "input",
1957
+ {
1958
+ className: classVarianceAuthority.cx(className, "placeholder-(--base-a9)", "selection:bg-(--accent-a5)", "outline-none"),
1959
+ ref: mergedRefs,
1960
+ ...getItemProps({
1961
+ ...rest,
1962
+ tabIndex: index === activeIndex ? 0 : -1,
1963
+ onChange: handleChange
1964
+ })
1965
+ }
1966
+ );
1967
+ })
1968
+ );
1969
+ const MenuInputRoot = React.memo(
1970
+ React.forwardRef((props, ref) => {
1971
+ const { className, ...rest } = props;
1972
+ const { size } = useMenuContentContext();
1973
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classVarianceAuthority.cx(className, inputRoot({ size })), ref, ...rest });
1974
+ })
1975
+ );
1976
+ const MenuInputSlot = React.memo(
1977
+ React.forwardRef((props, ref) => {
1978
+ const { className, ...rest } = props;
1979
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classVarianceAuthority.cx(className, "flex", "items-center", "text-(--base-a11)"), ref, ...rest });
1980
+ })
1981
+ );
1982
+ const SubContext = React.createContext({});
1983
+ const useSubContext = () => React.useContext(SubContext);
1984
+ const computeOffsets = (side, alignment) => {
1985
+ switch (side) {
1986
+ case "right":
1987
+ if (alignment === "start") {
1988
+ return { mainAxis: MENU_CONTENT_PADDING + 1, crossAxis: -8 };
1989
+ } else if (alignment === "end") {
1990
+ return { mainAxis: MENU_CONTENT_PADDING + 1, crossAxis: MENU_CONTENT_PADDING };
1991
+ }
1992
+ break;
1993
+ case "left":
1994
+ if (alignment === "start") {
1995
+ return { mainAxis: MENU_CONTENT_PADDING + 1, crossAxis: -8 };
1996
+ } else if (alignment === "end") {
1997
+ return { mainAxis: MENU_CONTENT_PADDING + 1, crossAxis: MENU_CONTENT_PADDING };
1998
+ }
1999
+ break;
2000
+ }
2001
+ return { mainAxis: MENU_CONTENT_PADDING + 1, crossAxis: 0 };
2002
+ };
2003
+ const Sub = React.memo((props) => {
2004
+ const {
2005
+ children,
2006
+ disabled = false,
2007
+ side = "right",
2008
+ align = "start",
2009
+ closeRoot = false,
2010
+ loop = false,
2011
+ modal = false,
2012
+ // open state related props
2013
+ open: controlledOpen,
2014
+ onOpenChange,
2015
+ defaultOpen
2016
+ } = props;
2017
+ const [open, setOpen] = useControlledState({
2018
+ initialState: defaultOpen ?? false,
2019
+ state: controlledOpen,
2020
+ setState: onOpenChange
2021
+ });
2022
+ const nodeId = react.useFloatingNodeId();
2023
+ const { refs, floatingStyles, context } = react.useFloating({
2024
+ nodeId,
2025
+ strategy: "fixed",
2026
+ whileElementsMounted: react.autoUpdate,
2027
+ open,
2028
+ onOpenChange: (open2, _event, reason) => {
2029
+ if (reason) setOpen(open2);
2030
+ },
2031
+ placement: side + (align !== "center" ? "-" + align : ""),
2032
+ middleware: [
2033
+ react.offset({ ...computeOffsets(side, align) }),
2034
+ react.size({
2035
+ padding: MENU_OVERFLOW_PADDING,
2036
+ apply({ availableHeight, elements }) {
2037
+ elements.floating.style.setProperty(
2038
+ "--overmap-menu-available-height",
2039
+ `${Math.max(availableHeight, MENU_MINIMUM_MAX_HEIGHT)}px`
2040
+ );
2041
+ }
2042
+ }),
2043
+ react.flip(),
2044
+ react.shift({ padding: MENU_OVERFLOW_PADDING }),
2045
+ react.hide()
2046
+ ]
2047
+ });
2048
+ const dismiss = react.useDismiss(context, {
2049
+ bubbles: closeRoot,
2050
+ outsidePress: closeRoot
2051
+ });
2052
+ const hover = react.useHover(context, {
2053
+ restMs: 50,
2054
+ handleClose: react.safePolygon({
2055
+ blockPointerEvents: true,
2056
+ requireIntent: false
2057
+ }),
2058
+ enabled: !disabled
2059
+ });
2060
+ const click = react.useClick(context, {
2061
+ enabled: !disabled
2062
+ });
2063
+ const elementsRef = React.useRef([]);
2064
+ const [activeIndex, setActiveIndex] = React.useState(null);
2065
+ const listNavigation = react.useListNavigation(context, {
2066
+ listRef: elementsRef,
2067
+ nested: true,
2068
+ activeIndex,
2069
+ onNavigate: setActiveIndex,
2070
+ loop,
2071
+ rtl: side === "left"
2072
+ });
2073
+ const { getFloatingProps, getItemProps, getReferenceProps } = react.useInteractions([
2074
+ listNavigation,
2075
+ dismiss,
2076
+ hover,
2077
+ click
2078
+ ]);
2079
+ return /* @__PURE__ */ jsxRuntime.jsx(
2080
+ SubContext.Provider,
2081
+ {
2082
+ value: {
2083
+ open,
2084
+ setOpen,
2085
+ nodeId,
2086
+ refs,
2087
+ floatingStyles,
2088
+ context,
2089
+ elementsRef,
2090
+ activeIndex,
2091
+ setActiveIndex,
2092
+ getFloatingProps,
2093
+ getItemProps,
2094
+ getReferenceProps,
2095
+ disabled,
2096
+ side,
2097
+ closeRoot,
2098
+ modal
2099
+ },
2100
+ children
2101
+ }
2102
+ );
2103
+ });
2104
+ Sub.displayName = "SubMenu";
2105
+ const TRIGGER_SELECT_KEYS = ["Enter", " "];
2106
+ const Item = React.memo(
2107
+ React.forwardRef((props, forwardedRef) => {
2108
+ const rootMenuContext = useMenuContext();
2109
+ const { getItemProps, activeIndex, setOpen, size, variant, radius } = useMenuContentContext();
2110
+ const { closeRoot } = useSubContext();
2111
+ const {
2112
+ className,
2113
+ children,
2114
+ onSelect,
2115
+ onClick,
2116
+ onKeyDown,
2117
+ closeOnSelect = true,
2118
+ disabled,
2119
+ ...rest
2120
+ } = props;
2121
+ const { ref, index } = react.useListItem();
2122
+ const mergeRefs = react.useMergeRefs([ref, forwardedRef]);
2123
+ const handleClick = React.useCallback(
2124
+ (e) => {
2125
+ e.stopPropagation();
2126
+ if (disabled) return;
2127
+ if (onClick) onClick(e);
2128
+ if (onSelect) onSelect();
2129
+ if (closeOnSelect) setOpen(false);
2130
+ if (closeRoot) rootMenuContext.setOpen(false);
2131
+ },
2132
+ [closeOnSelect, closeRoot, disabled, rootMenuContext, onClick, onSelect, setOpen]
2133
+ );
2134
+ const handleKeyDown = React.useCallback(
2135
+ (e) => {
2136
+ if (disabled) return;
2137
+ if (onKeyDown) onKeyDown(e);
2138
+ if (TRIGGER_SELECT_KEYS.includes(e.key)) {
2139
+ if (onSelect) onSelect();
2140
+ if (closeOnSelect) setOpen(false);
2141
+ }
2142
+ },
2143
+ [closeOnSelect, disabled, onKeyDown, onSelect, setOpen]
2144
+ );
2145
+ const isActive = React.useMemo(() => index === activeIndex, [activeIndex, index]);
2146
+ const computedChildren = React.useMemo(() => {
2147
+ return typeof children === "function" ? children({ active: isActive, selected: false }) : children;
2148
+ }, [children, isActive]);
2149
+ return /* @__PURE__ */ jsxRuntime.jsx(
2150
+ "div",
2151
+ {
2152
+ className: classVarianceAuthority.cx(className, menuItem({ size, variant }), radiusCva({ radius, maxLarge: true })),
2153
+ ref: mergeRefs,
2154
+ role: "menuitem",
2155
+ "data-disabled": disabled ? "" : void 0,
2156
+ "aria-disabled": disabled,
2157
+ "data-highlighted": isActive ? "" : void 0,
2158
+ ...getItemProps({
2159
+ onClick: handleClick,
2160
+ onKeyDown: handleKeyDown,
2161
+ tabIndex: isActive ? 0 : -1,
2162
+ ...rest
2163
+ }),
2164
+ children: computedChildren
2165
+ }
2166
+ );
2167
+ })
2168
+ );
2169
+ const SelectContext = React.createContext({});
2170
+ function useSelectContext() {
2171
+ return React.useContext(SelectContext);
2172
+ }
2173
+ const SelectContextProvider = React.memo((props) => {
2174
+ const { type, children } = props;
2175
+ const [controlledValue, setControlledValue] = React.useState(
2176
+ type === "single" ? (props == null ? void 0 : props.defaultValue) ?? null : null
2177
+ );
2178
+ const [controlledValues, setControlledValues] = React.useState(
2179
+ type === "multi" ? (props == null ? void 0 : props.defaultValues) ?? [] : []
2180
+ );
2181
+ const onValuesChange = React.useCallback(
2182
+ (values) => {
2183
+ setControlledValues(values);
2184
+ if (type === "multi" && (props == null ? void 0 : props.onValuesChange)) props.onValuesChange(values);
2185
+ },
2186
+ [props, type]
2187
+ );
2188
+ const onValueChange = React.useCallback(
2189
+ (value2) => {
2190
+ setControlledValue(value2);
2191
+ if (type === "single" && (props == null ? void 0 : props.onValueChange)) props.onValueChange(value2);
2192
+ },
2193
+ [props, type]
2194
+ );
2195
+ const value = React.useMemo(
2196
+ () => type === "multi" ? {
2197
+ type,
2198
+ values: (props == null ? void 0 : props.values) ?? controlledValues,
2199
+ handleValuesChange: onValuesChange
2200
+ } : {
2201
+ type,
2202
+ value: props.value ?? controlledValue,
2203
+ handleValueChange: onValueChange
2204
+ },
2205
+ [controlledValue, controlledValues, onValueChange, onValuesChange, props, type]
2206
+ );
2207
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectContext.Provider, { value, children });
2208
+ });
2209
+ SelectContextProvider.displayName = "SelectContextProvider";
2210
+ const MultiSelectGroup = React.memo(
2211
+ React.forwardRef((props, ref) => {
2212
+ const { children, values, onValuesChange, ...rest } = props;
2213
+ return /* @__PURE__ */ jsxRuntime.jsx(Group, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(SelectContextProvider, { type: "multi", values, onValuesChange, children }) });
2214
+ })
2215
+ );
2216
+ const SelectedIndicatorContext = React.createContext({});
2217
+ const useSelectedIndicatorContext = () => React.useContext(SelectedIndicatorContext);
2218
+ const SelectedIndicator = React.memo((props) => {
2219
+ const { children } = props;
2220
+ const { selected } = useSelectedIndicatorContext();
2221
+ const { size } = useMenuContentContext();
2222
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: menuSelectedIndicator({ size }), children: selected ? children : null });
2223
+ });
2224
+ SelectedIndicator.displayName = "SelectedIndicator";
2225
+ const MultiSelectItem = React.memo(
2226
+ React.forwardRef((props, ref) => {
2227
+ const { onSelect, children, closeOnSelect = false, value, ...rest } = props;
2228
+ const { values, handleValuesChange } = useSelectContext();
2229
+ const selected = React.useMemo(() => values.includes(value), [value, values]);
2230
+ const handleSelect = React.useCallback(() => {
2231
+ if (!selected) {
2232
+ handleValuesChange([...values, value]);
2233
+ } else {
2234
+ handleValuesChange(values.filter((currentValue) => currentValue !== value));
2235
+ }
2236
+ if (onSelect) onSelect();
2237
+ }, [handleValuesChange, onSelect, selected, value, values]);
2238
+ const computedChildren = React.useMemo(() => {
2239
+ return typeof children === "function" ? ({ active }) => children({ selected, active }) : children;
2240
+ }, [children, selected]);
2241
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectedIndicatorContext.Provider, { value: { selected }, children: /* @__PURE__ */ jsxRuntime.jsx(
2242
+ Item,
2243
+ {
2244
+ ref,
2245
+ role: "menuitemcheckbox",
2246
+ onSelect: handleSelect,
2247
+ closeOnSelect,
2248
+ "data-selected": selected ? "" : void 0,
2249
+ ...rest,
2250
+ children: computedChildren
2251
+ }
2252
+ ) });
2253
+ })
2254
+ );
2255
+ const PagesContext = React.createContext({});
2256
+ const usePagesContext = () => React.useContext(PagesContext);
2257
+ const Pages = React.memo((props) => {
2258
+ const { children, defaultPage, page, onPageChange } = props;
2259
+ const [activePage, setActivePage] = useControlledState({
2260
+ state: page,
2261
+ initialState: defaultPage ?? "",
2262
+ setState: onPageChange
2263
+ });
2264
+ return /* @__PURE__ */ jsxRuntime.jsx(PagesContext.Provider, { value: { activePage, setActivePage }, children });
2265
+ });
2266
+ Pages.displayName = "Pages";
2267
+ const PageContent = React.memo((props) => {
2268
+ const { page, children } = props;
2269
+ const { activePage } = usePagesContext();
2270
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: activePage === page ? children : null });
2271
+ });
2272
+ PageContent.displayName = "PageContent";
2273
+ const PageTrigger = React.memo(
2274
+ React.forwardRef((props, ref) => {
2275
+ const { onSelect, page, ...rest } = props;
2276
+ const { refs, setActiveIndex } = useMenuContentContext();
2277
+ const { setActivePage } = usePagesContext();
2278
+ const handleSelect = React.useCallback(() => {
2279
+ var _a;
2280
+ setActivePage(page);
2281
+ (_a = refs.floating.current) == null ? void 0 : _a.focus();
2282
+ setActiveIndex(null);
2283
+ if (onSelect) onSelect();
2284
+ }, [onSelect, page, refs.floating, setActiveIndex, setActivePage]);
2285
+ return /* @__PURE__ */ jsxRuntime.jsx(Item, { ref, onSelect: handleSelect, closeOnSelect: false, ...rest });
2286
+ })
2287
+ );
2288
+ const SelectAllContext = React.createContext({});
2289
+ const SelectAllIndicator = React.forwardRef((props, ref) => {
2290
+ const { className, children, ...rest } = props;
2291
+ const { size } = useMenuContentContext();
2292
+ const { selected } = React.useContext(SelectAllContext);
2293
+ const computedChildren = React.useMemo(() => {
2294
+ return typeof children === "function" ? children(selected === "indeterminate") : children;
2295
+ }, [children, selected]);
2296
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: classVarianceAuthority.cx(className, menuSelectedIndicator({ size })), ...rest, children: selected ? computedChildren : null });
2297
+ });
2298
+ SelectAllIndicator.displayName = "SelectAllIndicator";
2299
+ const SelectAllItem = React.forwardRef((props, ref) => {
2300
+ const { children, allValues, onSelect, closeOnSelect = false, ...rest } = props;
2301
+ const { values, handleValuesChange } = useSelectContext();
2302
+ const selected = React.useMemo(() => {
2303
+ const selectValuesSet = new Set(values);
2304
+ if (allValues.every((value) => selectValuesSet.has(value))) return true;
2305
+ if (values.length > 0) return "indeterminate";
2306
+ return false;
2307
+ }, [allValues, values]);
2308
+ const handleSelect = React.useCallback(() => {
2309
+ onSelect == null ? void 0 : onSelect();
2310
+ switch (selected) {
2311
+ case true:
2312
+ handleValuesChange([]);
2313
+ break;
2314
+ case "indeterminate":
2315
+ case false: {
2316
+ handleValuesChange(allValues);
2317
+ break;
2318
+ }
2319
+ }
2320
+ }, [allValues, handleValuesChange, onSelect, selected]);
2321
+ const computedChildren = React.useMemo(() => {
2322
+ return typeof children === "function" ? ({ active }) => children({ selected, active }) : children;
2323
+ }, [children, selected]);
2324
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectAllContext.Provider, { value: { selected }, children: /* @__PURE__ */ jsxRuntime.jsx(Item, { onSelect: handleSelect, ref, "data-state": selected, closeOnSelect, ...rest, children: computedChildren }) });
2325
+ });
2326
+ SelectAllItem.displayName = "SelectAllItem";
2327
+ const SelectGroup = React.memo(
2328
+ React.forwardRef((props, ref) => {
2329
+ const { children, value, onValueChange } = props;
2330
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectContextProvider, { type: "single", value, onValueChange, children: /* @__PURE__ */ jsxRuntime.jsx(Group, { ref, children }) });
2331
+ })
2332
+ );
2333
+ const SelectItem = React.memo(
2334
+ React.forwardRef((props, ref) => {
2335
+ const { value, onSelect, children, closeOnSelect = false, ...rest } = props;
2336
+ const { value: currentValue, handleValueChange } = useSelectContext();
2337
+ const selected = React.useMemo(() => value === currentValue, [currentValue, value]);
2338
+ const handleSelect = React.useCallback(() => {
2339
+ handleValueChange(!selected ? value : null);
2340
+ if (onSelect) onSelect();
2341
+ }, [handleValueChange, onSelect, selected, value]);
2342
+ const computedChildren = React.useMemo(() => {
2343
+ return typeof children === "function" ? ({ active }) => children({ selected, active }) : children;
2344
+ }, [children, selected]);
2345
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectedIndicatorContext.Provider, { value: { selected }, children: /* @__PURE__ */ jsxRuntime.jsx(
2346
+ Item,
2347
+ {
2348
+ ref,
2349
+ role: "menuitemcheckbox",
2350
+ onSelect: handleSelect,
2351
+ closeOnSelect,
2352
+ "data-selected": selected ? "" : void 0,
2353
+ ...rest,
2354
+ children: computedChildren
2355
+ }
2356
+ ) });
2357
+ })
2358
+ );
2359
+ const Separator$1 = React.memo(
2360
+ React.forwardRef((props, ref) => {
2361
+ const { className, ...rest } = props;
2362
+ const { size } = useMenuContentContext();
2363
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixSeparator__namespace.Root, { className: classVarianceAuthority.cx(className, menuSeparator({ size })), ref, ...rest });
2364
+ })
2365
+ );
2366
+ const SubContent = React.memo(
2367
+ React.forwardRef((props, forwardedRef) => {
2368
+ var _a;
2369
+ const { children, ...rest } = props;
2370
+ const { middlewareData } = useMenuContext();
2371
+ const { accentColor, radius, variant, size } = useMenuContentContext();
2372
+ const {
2373
+ open,
2374
+ nodeId,
2375
+ refs,
2376
+ context,
2377
+ getFloatingProps,
2378
+ getItemProps,
2379
+ activeIndex,
2380
+ setActiveIndex,
2381
+ elementsRef,
2382
+ floatingStyles,
2383
+ setOpen,
2384
+ side
2385
+ } = useSubContext();
2386
+ const wrapperRef = React.useRef(null);
2387
+ const mergeRefs = react.useMergeRefs([refs.setFloating, wrapperRef]);
2388
+ const computedFloatingStyles = React.useMemo(() => {
2389
+ var _a2;
2390
+ return {
2391
+ ...floatingStyles,
2392
+ visibility: ((_a2 = middlewareData.hide) == null ? void 0 : _a2.referenceHidden) ? "hidden" : "visible"
2393
+ };
2394
+ }, [floatingStyles, (_a = middlewareData.hide) == null ? void 0 : _a.referenceHidden]);
2395
+ return /* @__PURE__ */ jsxRuntime.jsx(react.FloatingNode, { id: nodeId, children: open && /* @__PURE__ */ jsxRuntime.jsx(react.FloatingPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.FloatingFocusManager, { context, initialFocus: wrapperRef, children: /* @__PURE__ */ jsxRuntime.jsx(react.FloatingList, { elementsRef, children: /* @__PURE__ */ jsxRuntime.jsx(
2396
+ MenuContentContext.Provider,
2397
+ {
2398
+ value: {
2399
+ getItemProps,
2400
+ activeIndex,
2401
+ setActiveIndex,
2402
+ elementsRef,
2403
+ open,
2404
+ setOpen,
2405
+ refs,
2406
+ size,
2407
+ radius,
2408
+ accentColor,
2409
+ variant
2410
+ },
2411
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2412
+ "div",
2413
+ {
2414
+ className: "outline-none",
2415
+ ref: mergeRefs,
2416
+ style: computedFloatingStyles,
2417
+ ...getFloatingProps(),
2418
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2419
+ "div",
2420
+ {
2421
+ className: classVarianceAuthority.cx(
2422
+ "overmap-menu-sub-content",
2423
+ menuContent({ size }),
2424
+ floating({ side, shadow: "3" }),
2425
+ radiusCva({ radius, maxLarge: true }),
2426
+ "max-h-(--overmap-menu-available-height)"
2427
+ ),
2428
+ ref: forwardedRef,
2429
+ "data-state": open ? "open" : "closed",
2430
+ "data-side": side,
2431
+ "data-accent-color": accentColor,
2432
+ ...rest,
2433
+ children
2434
+ }
2435
+ )
2436
+ }
2437
+ )
2438
+ }
2439
+ ) }) }) }) });
2440
+ })
2441
+ );
2442
+ const SubTrigger = React.memo(
2443
+ React.forwardRef((props, forwardedRef) => {
2444
+ const { children, ...rest } = props;
2445
+ const { refs, getReferenceProps, open, disabled } = useSubContext();
2446
+ const mergedRefs = react.useMergeRefs([forwardedRef, refs.setReference]);
2447
+ return /* @__PURE__ */ jsxRuntime.jsx(
2448
+ Item,
2449
+ {
2450
+ ref: mergedRefs,
2451
+ closeOnSelect: false,
2452
+ "aria-haspopup": "menu",
2453
+ "data-open": open,
2454
+ disabled,
2455
+ ...getReferenceProps(rest),
2456
+ children
2457
+ }
2458
+ );
2459
+ })
2460
+ );
2461
+ const VirtualTrigger = React.memo((props) => {
2462
+ const { virtualElement, disabled } = props;
2463
+ const { refs, setTriggerType, setOpen } = useMenuContext();
2464
+ React.useEffect(() => {
2465
+ setTriggerType("virtual");
2466
+ }, [setTriggerType]);
2467
+ React.useEffect(() => {
2468
+ if (!disabled && virtualElement) {
2469
+ refs.setPositionReference(virtualElement);
2470
+ setOpen(true);
2471
+ } else {
2472
+ refs.setPositionReference(null);
2473
+ setOpen(false);
2474
+ }
2475
+ }, [disabled, refs, setOpen, virtualElement]);
2476
+ return null;
2477
+ });
2478
+ VirtualTrigger.displayName = "VirtualTrigger";
2479
+ const OvermapMenu = {
2480
+ Root,
2481
+ ClickTrigger,
2482
+ ContextTrigger,
2483
+ VirtualTrigger,
2484
+ Content,
2485
+ Item,
2486
+ Sub,
2487
+ SubContent,
2488
+ SubTrigger,
2489
+ Group,
2490
+ SelectGroup,
2491
+ MultiSelectGroup,
2492
+ MultiSelectItem,
2493
+ SelectAllItem,
2494
+ SelectAllIndicator,
2495
+ SelectItem,
2496
+ SelectedIndicator,
2497
+ PageContent,
2498
+ Pages,
2499
+ PageTrigger,
2500
+ Separator: Separator$1,
2501
+ InputField: MenuInputField,
2502
+ InputRoot: MenuInputRoot,
2503
+ InputSlot: MenuInputSlot
2504
+ };
2505
+ const PopoverArrow = React.forwardRef((props, ref) => {
2506
+ const { className, ...rest } = props;
2507
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixPopover__namespace.Arrow, { className: classVarianceAuthority.cx(className, "fill-(--base-6)"), ref, ...rest });
2508
+ });
2509
+ PopoverArrow.displayName = "PopoverArrow";
2510
+ const popoverContent = classVarianceAuthority.cva(["bg-(--base-1)", "ring-1", "ring-(--base-6)"], {
2511
+ variants: {
2512
+ size: {
2513
+ xs: ["text-xs", "p-2"],
2514
+ sm: ["text-sm", "p-3"],
2515
+ md: ["text-base", "p-4"],
2516
+ lg: ["text-lg", "p-5"],
2517
+ xl: ["text-xl", "p-6"]
2518
+ }
2519
+ },
2520
+ defaultVariants: {
2521
+ size: "md"
2522
+ }
2523
+ });
2524
+ const PopoverContent = React.forwardRef((props, ref) => {
2525
+ const providerContext = useProvider();
2526
+ const {
2527
+ className,
2528
+ radius = providerContext.radius,
2529
+ accentColor = providerContext.accentColor,
2530
+ size = "md",
2531
+ sideOffset = 5,
2532
+ container,
2533
+ ...rest
2534
+ } = props;
2535
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixPopover__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
2536
+ RadixPopover__namespace.Content,
2537
+ {
2538
+ className: classVarianceAuthority.cx(
2539
+ className,
2540
+ popoverContent({ size }),
2541
+ floating({ shadow: "3" }),
2542
+ radiusCva({ radius, maxLarge: true })
2543
+ ),
2544
+ ref,
2545
+ sideOffset,
2546
+ "data-accent-color": accentColor,
2547
+ ...rest
2548
+ }
2549
+ ) });
2550
+ });
2551
+ PopoverContent.displayName = "PopoverContent";
2552
+ const Popover = {
2553
+ ...RadixPopover__namespace,
2554
+ Content: PopoverContent,
2555
+ Arrow: PopoverArrow
2556
+ };
2557
+ const RadioGroupIndicator = React.forwardRef((props, ref) => {
2558
+ const { className, ...rest } = props;
2559
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixRadioGroup__namespace.Indicator, { className: classVarianceAuthority.cx(className, "flex items-center justify-center"), ref, ...rest });
2560
+ });
2561
+ RadioGroupIndicator.displayName = "RadioGroupIndicator";
2562
+ const RadioGroupContext = React.createContext({});
2563
+ const radioGroupItem = classVarianceAuthority.cva(
2564
+ [
2565
+ "outline-none",
2566
+ "rounded-full",
2567
+ "focus-visible:outline-2",
2568
+ "focus-visible:outline-(--accent-a8)",
2569
+ "focus-visible:outline-offset-2",
2570
+ "disabled:opacity-50",
2571
+ "disabled:pointer-events-none"
2572
+ ],
2573
+ {
2574
+ variants: {
2575
+ variant: {
2576
+ surface: [
2577
+ "bg-(--base-surface)",
2578
+ "data-[state='checked']:bg-(--accent-indicator)",
2579
+ "ring-1",
2580
+ "ring-inset",
2581
+ "ring-(--base-a6)",
2582
+ "data-[state='checked']:ring-(--accent-indicator)",
2583
+ "text-(--accent-contrast)"
2584
+ ],
2585
+ soft: ["bg-(--accent-a3)", "text-(--accent-a11)"]
2586
+ },
2587
+ size: {
2588
+ xs: ["w-4", "h-4", "text-[0.625rem]"],
2589
+ sm: ["w-5", "h-5", "text-xs"],
2590
+ md: ["w-6", "h-6", "text-sm"],
2591
+ lg: ["w-7", "h-7", "text-md"],
2592
+ xl: ["w-8", "h-8", "text-lg"]
2593
+ }
2594
+ },
2595
+ defaultVariants: {
2596
+ variant: "surface",
2597
+ size: "md"
2598
+ }
2599
+ }
2600
+ );
2601
+ const RadioGroupItem = React.memo(
2602
+ React.forwardRef((props, ref) => {
2603
+ const radioGroupContext = React.useContext(RadioGroupContext);
2604
+ const { className, size = radioGroupContext.size, variant = radioGroupContext.variant, ...rest } = props;
2605
+ return /* @__PURE__ */ jsxRuntime.jsx(
2606
+ RadixRadioGroup__namespace.Item,
2607
+ {
2608
+ className: classVarianceAuthority.cx(className, radioGroupItem({ size, variant }), "flex", "justify-center", "items-center"),
2609
+ ref,
2610
+ ...rest
2611
+ }
2612
+ );
2613
+ })
2614
+ );
2615
+ const RadioGroupRoot = React.memo(
2616
+ React.forwardRef((props, ref) => {
2617
+ const providerContext = useProvider();
2618
+ const {
2619
+ className,
2620
+ accentColor = providerContext.accentColor,
2621
+ variant = "surface",
2622
+ size = "md",
2623
+ children,
2624
+ ...rest
2625
+ } = props;
2626
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixRadioGroup__namespace.Root, { className: classVarianceAuthority.cx(className), ref, "data-accent-color": accentColor, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupContext.Provider, { value: { variant, size }, children }) });
2627
+ })
2628
+ );
2629
+ const RadioGroup = {
2630
+ Indicator: RadioGroupIndicator,
2631
+ Item: RadioGroupItem,
2632
+ Root: RadioGroupRoot
2633
+ };
2634
+ const separator = classVarianceAuthority.cva([], {
2635
+ variants: {
2636
+ size: {
2637
+ xs: [],
2638
+ sm: [],
2639
+ md: [],
2640
+ lg: [],
2641
+ xl: [],
2642
+ full: []
2643
+ },
2644
+ orientation: {
2645
+ horizontal: ["h-px"],
2646
+ vertical: ["w-px"]
2647
+ },
2648
+ weight: {
2649
+ light: ["bg-(--accent-a6)"],
2650
+ medium: ["bg-(--accent-a7)"],
2651
+ heavy: ["bg-(--accent-a8)"]
2652
+ }
2653
+ },
2654
+ compoundVariants: [
2655
+ {
2656
+ size: "xs",
2657
+ orientation: "horizontal",
2658
+ class: ["w-4"]
2659
+ },
2660
+ {
2661
+ size: "sm",
2662
+ orientation: "horizontal",
2663
+ class: ["w-6"]
2664
+ },
2665
+ {
2666
+ size: "md",
2667
+ orientation: "horizontal",
2668
+ class: ["w-10"]
2669
+ },
2670
+ {
2671
+ size: "lg",
2672
+ orientation: "horizontal",
2673
+ class: ["w-16"]
2674
+ },
2675
+ {
2676
+ size: "xl",
2677
+ orientation: "horizontal",
2678
+ class: ["w-24"]
2679
+ },
2680
+ {
2681
+ size: "full",
2682
+ orientation: "horizontal",
2683
+ class: ["w-full"]
2684
+ },
2685
+ {
2686
+ size: "xs",
2687
+ orientation: "vertical",
2688
+ class: ["h-4"]
2689
+ },
2690
+ {
2691
+ size: "sm",
2692
+ orientation: "vertical",
2693
+ class: ["h-6"]
2694
+ },
2695
+ {
2696
+ size: "md",
2697
+ orientation: "vertical",
2698
+ class: ["h-10"]
2699
+ },
2700
+ {
2701
+ size: "lg",
2702
+ orientation: "vertical",
2703
+ class: ["h-16"]
2704
+ },
2705
+ {
2706
+ size: "xl",
2707
+ orientation: "vertical",
2708
+ class: ["h-24"]
2709
+ },
2710
+ {
2711
+ size: "full",
2712
+ orientation: "vertical",
2713
+ class: ["h-full"]
2714
+ }
2715
+ ],
2716
+ defaultVariants: {
2717
+ size: "md",
2718
+ orientation: "horizontal",
2719
+ weight: "medium"
2720
+ }
2721
+ });
2722
+ const Separator = React.forwardRef((props, ref) => {
2723
+ const { className, accentColor = "base", orientation, size, weight, ...rest } = props;
2724
+ return /* @__PURE__ */ jsxRuntime.jsx(
2725
+ RadixSeparator__namespace.Root,
2726
+ {
2727
+ className: classVarianceAuthority.cx(className, separator({ orientation, size, weight })),
2728
+ "data-accent-color": accentColor,
2729
+ ref,
2730
+ ...rest
2731
+ }
2732
+ );
2733
+ });
2734
+ Separator.displayName = "Separator";
2735
+ const TIMEOUT_DURATION = 200;
2736
+ const SlideOutV2 = React.memo(
2737
+ React.forwardRef((props, ref) => {
2738
+ const {
2739
+ className,
2740
+ style,
2741
+ children,
2742
+ open,
2743
+ modal = false,
2744
+ resizeable = true,
2745
+ side,
2746
+ position = "relative",
2747
+ initialWidth,
2748
+ minWidth,
2749
+ maxWidth,
2750
+ onDismiss,
2751
+ onOpening,
2752
+ onClosed
2753
+ } = props;
2754
+ const isLeft = side === "left";
2755
+ const [slideOutWidth, setSlideOutWidth] = React.useState(initialWidth);
2756
+ const handleResize = React.useCallback(
2757
+ (_event, _dir, ref2, _delta) => {
2758
+ setSlideOutWidth(ref2.clientWidth);
2759
+ },
2760
+ []
2761
+ );
2762
+ const handleDismiss = React.useCallback(() => {
2763
+ if (modal && onDismiss) {
2764
+ onDismiss();
2765
+ }
2766
+ }, [modal, onDismiss]);
2767
+ React.useEffect(() => {
2768
+ setSlideOutWidth(initialWidth);
2769
+ }, [initialWidth]);
2770
+ const CSSTransitionClassNames = React.useMemo(
2771
+ () => ({
2772
+ enter: isLeft ? "-ml-(--slide-out-width)" : "-mr-(--slide-out-width)",
2773
+ enterActive: isLeft ? "ease-linear duration-200 transition-[margin-left] ml-0" : "ease-linear duration-200 transition-[margin-right] mr-0",
2774
+ enterDone: isLeft ? "ml-0" : "mr-0",
2775
+ exitActive: isLeft ? "ease-linear duration-200 transition-[margin-left] -ml-(--slide-out-width)" : "ease-linear duration-200 transition-[margin-right] -mr-(--slide-out-width)",
2776
+ exitDone: isLeft ? "-ml-(--slide-out-width)" : "-mr-(--slide-out-width)"
2777
+ }),
2778
+ [isLeft]
2779
+ );
2780
+ return (
2781
+ /** The DismissableLayer Component is strictly a functionality-based component for emulating an overlay. Its main use is for
2782
+ * detecting interactions OUTSIDE whatever content is placed within it, allowing the developer to decide what to do with that
2783
+ * content when it is 'dismissed' (i.e closed, to be hidden, etc.).
2784
+ *
2785
+ * There are three main events that trigger this 'dismissal' behavior
2786
+ * 1) Focus is given to an element outside the content rendered within the DismissableLayer component
2787
+ * 2) PointerEvent occurs on an element outside the content rendered within the DismissableLayer component
2788
+ * 3) Escape key is pressed
2789
+ *
2790
+ * The 'disableOutsidePointerEvents' prop is used for disabling focus and PointerEvents on outside elements.
2791
+ * The dismissal behavior will still eb trigger, it just won't allow any elements to be interacted with until
2792
+ * the DismissableLayer is removed from the DOM, or 'disableOutsidePointerEvents' is set to false
2793
+ *
2794
+ * In this use case, Overmap's SlideOut will have two specific behaviors
2795
+ * 1) Modal mode - the SlideOut has modal-like behavior where it will dismiss PointerEvents and Focus of
2796
+ * outside elements
2797
+ * 2) Non-modal mode - the SlideOut behaves like a side panel the co-exists with content outside of it
2798
+ * */
2799
+ /* @__PURE__ */ jsxRuntime.jsx(
2800
+ reactTransitionGroup.CSSTransition,
2801
+ {
2802
+ classNames: CSSTransitionClassNames,
2803
+ in: open,
2804
+ timeout: TIMEOUT_DURATION,
2805
+ unmountOnExit: true,
2806
+ mountOnEnter: true,
2807
+ onEntering: onOpening,
2808
+ onExited: onClosed,
2809
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2810
+ reactDismissableLayer.DismissableLayer,
2811
+ {
2812
+ disableOutsidePointerEvents: modal,
2813
+ style,
2814
+ onInteractOutside: handleDismiss,
2815
+ onEscapeKeyDown: handleDismiss,
2816
+ asChild: true,
2817
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2818
+ reactSlot.Slot,
2819
+ {
2820
+ className: classVarianceAuthority.cx(className, "top-0", "bottom-0", {
2821
+ "left-0": isLeft,
2822
+ "right-0": !isLeft,
2823
+ absolute: position === "absolute",
2824
+ relative: position === "relative"
2825
+ }),
2826
+ ref,
2827
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2828
+ reResizable.Resizable,
2829
+ {
2830
+ onResize: handleResize,
2831
+ size: { width: slideOutWidth, height: "100%" },
2832
+ style: {
2833
+ position,
2834
+ "--slide-out-width": `${slideOutWidth}${typeof slideOutWidth === "number" ? "px" : ""}`
2835
+ },
2836
+ minWidth,
2837
+ maxWidth,
2838
+ enable: { left: resizeable && !isLeft, right: resizeable && isLeft },
2839
+ children
2840
+ }
2841
+ )
2842
+ }
2843
+ )
2844
+ },
2845
+ modal ? "1" : "0"
2846
+ )
2847
+ }
2848
+ )
2849
+ );
2850
+ })
2851
+ );
2852
+ const Spinner = React.memo(() => {
2853
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-5 rounded-full border border-2 border-(--base-a12) border-b-transparent animate-spin" });
2854
+ });
2855
+ Spinner.displayName = "Spinner";
2856
+ const textAreaCva = classVarianceAuthority.cva(
2857
+ [
2858
+ "focus:ring-2",
2859
+ "focus:ring-(--accent-a8)",
2860
+ "disabled:opacity-50",
2861
+ "disabled:pointer-events-none",
2862
+ "transition-colors",
2863
+ "[scrollbar-width:thin]",
2864
+ "[scrollbar-color:var(--base-6)_transparent]",
2865
+ "outline-none"
2866
+ ],
2867
+ {
2868
+ variants: {
2869
+ variant: {
2870
+ outline: [
2871
+ "placeholder-(--base-a9)",
2872
+ "selection:bg-(--accent-a5)",
2873
+ "ring-1",
2874
+ "ring-(--base-a7)",
2875
+ "bg-transparent",
2876
+ "text-(--base-12)"
2877
+ ],
2878
+ surface: [
2879
+ "placeholder-(--accent-12)",
2880
+ "placeholder:opacity-60",
2881
+ "selection:bg-(--accent-a5)",
2882
+ "ring-1",
2883
+ "ring-(--accent-a7)",
2884
+ "bg-(--accent-surface)",
2885
+ "text-(--accent-a12)"
2886
+ ],
2887
+ soft: [
2888
+ "bg-(--accent-a3)",
2889
+ "text-(--accent-12)",
2890
+ "placeholder-(--accent-12)",
2891
+ "placeholder:opacity-60",
2892
+ "selection:bg-(--accent-a5)"
2893
+ ]
2894
+ },
2895
+ size: {
2896
+ xs: ["p-1", "text-xs"],
2897
+ sm: ["p-1.5", "text-sm"],
2898
+ md: ["p-2", "text-base"],
2899
+ lg: ["p-2.5", "text-lg"],
2900
+ xl: ["p-3", "text-xl"]
2901
+ },
2902
+ resize: {
2903
+ none: ["resize-none"],
2904
+ vertical: ["resize-y"],
2905
+ horizontal: ["resize-x"],
2906
+ both: ["resize"]
2907
+ }
2908
+ },
2909
+ defaultVariants: {
2910
+ variant: "outline",
2911
+ size: "md",
2912
+ resize: "none"
2913
+ }
2914
+ }
2915
+ );
2916
+ const TextArea = React.forwardRef((props, ref) => {
2917
+ const providerContext = useProvider();
2918
+ const {
2919
+ className,
2920
+ size,
2921
+ variant,
2922
+ radius = providerContext.radius,
2923
+ accentColor = providerContext.accentColor,
2924
+ ...rest
2925
+ } = props;
2926
+ return /* @__PURE__ */ jsxRuntime.jsx(
2927
+ "textarea",
2928
+ {
2929
+ className: classVarianceAuthority.cx(className, textAreaCva({ size, variant }), radiusCva({ radius, maxLarge: true })),
2930
+ ref,
2931
+ "data-accent-color": accentColor,
2932
+ ...rest
2933
+ }
2934
+ );
2935
+ });
2936
+ TextArea.displayName = "TextArea";
2937
+ const toastCva = classVarianceAuthority.cva(
2938
+ [
2939
+ "shadow-md",
2940
+ "duration-200",
2941
+ "data-[state='open']:animate-in",
2942
+ "data-[state='open']:fade-in-0",
2943
+ "data-[state='open']:zoom-in-95",
2944
+ "data-[state='closed']:animate-out",
2945
+ "data-[state='closed']:fade-out-0",
2946
+ "data-[state='closed']:zoom-out-95"
2947
+ ],
2948
+ {
2949
+ variants: {
2950
+ variant: {
2951
+ surface: ["bg-(--accent-1)", "text-(--accent-11)", "ring-1", "ring-inset", "ring-(--accent-a6)"],
2952
+ soft: ["bg-(--accent-1)", "text-(--accent-11)"]
2953
+ },
2954
+ size: {
2955
+ xs: ["text-xs", "p-2"],
2956
+ sm: ["text-sm", "p-3"],
2957
+ md: ["text-base", "p-4"],
2958
+ lg: ["text-lg", "p-5"],
2959
+ xl: ["text-xl", "p-6"]
2960
+ }
2961
+ },
2962
+ defaultVariants: {
2963
+ variant: "surface",
2964
+ size: "md"
2965
+ }
2966
+ }
2967
+ );
2968
+ const _Toast = React.forwardRef(function Toast2(props, ref) {
2969
+ const { radius, ...restProviderContext } = useProvider();
2970
+ const {
2971
+ title,
2972
+ description,
2973
+ icon,
2974
+ size = "md",
2975
+ accentColor = restProviderContext.accentColor,
2976
+ variant,
2977
+ onClose,
2978
+ sensitivity,
2979
+ action,
2980
+ ...rest
2981
+ } = props;
2982
+ const [open, setOpen] = React.useState(true);
2983
+ const handleOpenChange = React.useCallback(
2984
+ (open2) => {
2985
+ if (!open2 && onClose) onClose();
2986
+ setOpen(open2);
2987
+ },
2988
+ [onClose]
2989
+ );
2990
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2991
+ RadixToast__namespace.Root,
2992
+ {
2993
+ className: classVarianceAuthority.cx(
2994
+ "flex items-center gap-4 w-max",
2995
+ toastCva({ size, variant }),
2996
+ radiusCva({ radius, maxLarge: true })
2997
+ ),
2998
+ ref,
2999
+ open,
3000
+ type: sensitivity,
3001
+ onOpenChange: handleOpenChange,
3002
+ "data-accent-color": accentColor,
3003
+ ...rest,
3004
+ children: [
3005
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 grow", children: [
3006
+ icon,
3007
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
3008
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
3009
+ /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Title, { className: "font-medium", children: title }),
3010
+ /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Description, { children: description })
3011
+ ] }),
3012
+ action && /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Action, { className: "w-max", altText: action.altText, asChild: true, children: action.content })
3013
+ ] })
3014
+ ] }),
3015
+ /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, { size, "aria-label": "Close", variant: "ghost", accentColor, children: /* @__PURE__ */ jsxRuntime.jsx(hi.HiX, {}) }) })
3016
+ ]
3017
+ }
3018
+ );
3019
+ });
3020
+ const Toast = React.memo(_Toast);
3021
+ const ToastContext = React.createContext({});
3022
+ const useToast = () => {
3023
+ const context = React.useContext(ToastContext);
3024
+ if (!context) {
3025
+ throw new Error("useToast must be used within a ToastProvider");
3026
+ }
3027
+ return context;
3028
+ };
3029
+ const WORDS_PER_SECOND = 240 / 60;
3030
+ const MIN_DURATION = 5e3;
3031
+ const calculatedDuration = (toast) => {
3032
+ if (toast.duration && toast.duration >= MIN_DURATION) return toast.duration;
3033
+ const words = toast.description.split(" ").length + toast.title.split(" ").length;
3034
+ return MIN_DURATION + words / WORDS_PER_SECOND;
3035
+ };
3036
+ exports2.unsafeShowToast = void 0;
3037
+ const ToastProvider = React.memo(function ToastContextProvider({
3038
+ children,
3039
+ // Use this class to change where the viewport for the toasts should be
3040
+ className,
3041
+ hotkey,
3042
+ ...rest
3043
+ }) {
3044
+ const [toasts, setToasts] = React.useState([]);
3045
+ const handleCloseToast = React.useCallback((id, reason, callback) => {
3046
+ setToasts((prevToasts) => {
3047
+ const toast = prevToasts.find((toast2) => toast2.id === id);
3048
+ if (toast && reason === 0) clearTimeout(toast.timeout);
3049
+ return prevToasts.filter((toast2) => toast2.id !== id);
3050
+ });
3051
+ if (callback) callback();
3052
+ }, []);
3053
+ const toastContextValue = React.useMemo(() => {
3054
+ let counter = 0;
3055
+ const showToast = (toastProps) => {
3056
+ const duration = calculatedDuration(toastProps);
3057
+ const id = counter.toString();
3058
+ counter += 1;
3059
+ const pending = setTimeout(() => handleCloseToast(id, 1, toastProps.onClose), duration);
3060
+ setToasts((prevToasts) => [...prevToasts, { ...toastProps, timeout: pending, duration, id }]);
3061
+ };
3062
+ const showPrimary = (toastProps) => showToast(toastProps);
3063
+ const showSuccess = (toastProps) => showToast({ ...toastProps, accentColor: "success" });
3064
+ const showError = (toastProps) => showToast({ ...toastProps, accentColor: "danger" });
3065
+ const showInfo = (toastProps) => showToast({ ...toastProps, accentColor: "base" });
3066
+ const showWarning = (toastProps) => showToast({ ...toastProps, accentColor: "warning" });
3067
+ exports2.unsafeShowToast = showToast;
3068
+ return {
3069
+ showToast,
3070
+ showPrimary,
3071
+ showSuccess,
3072
+ showError,
3073
+ showInfo,
3074
+ showWarning
3075
+ };
3076
+ }, [handleCloseToast]);
3077
+ React.useEffect(() => {
3078
+ return () => {
3079
+ for (const { timeout } of toasts) clearTimeout(timeout);
3080
+ };
3081
+ }, []);
3082
+ return /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Provider, { value: toastContextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(RadixToast.ToastProvider, { ...rest, children: [
3083
+ children,
3084
+ /* @__PURE__ */ jsxRuntime.jsx(
3085
+ RadixToast.ToastViewport,
3086
+ {
3087
+ className: classVarianceAuthority.cx(
3088
+ className,
3089
+ "list-none fixed top-0 right-0 flex gap-3 flex-col items-end p-5 max-w-[100vw] z-[2147483647] outline-none overflow-y-auto overflow-x-hidden"
3090
+ ),
3091
+ hotkey
3092
+ }
3093
+ ),
3094
+ toasts.map(({ id, onClose, ...toastProps }) => /* @__PURE__ */ jsxRuntime.jsx(Toast, { ...toastProps, onClose: () => handleCloseToast(id, 0, onClose) }, id))
3095
+ ] }) });
3096
+ });
3097
+ const toggleButtonCva = classVarianceAuthority.cva(
3098
+ [
3099
+ "flex",
3100
+ "items-center",
3101
+ "justify-center",
3102
+ "outline-none",
3103
+ "transition-colors",
3104
+ "disabled:opacity-50",
3105
+ "disabled:pointer-events-none"
3106
+ ],
3107
+ {
3108
+ variants: {
3109
+ variant: {
3110
+ outline: [
3111
+ "ring-1",
3112
+ "ring-inset",
3113
+ "ring-(--accent-a4)",
3114
+ "text-(--accent-a11)",
3115
+ "data-[state=off]:hover:bg-(--accent-a3)",
3116
+ "data-[state=off]:hover:ring-transparent",
3117
+ "data-[state=on]:bg-(--accent-a4)",
3118
+ "data-[state=on]:ring-transparent",
3119
+ "data-[state=on]:text-(--accent-a12)"
3120
+ ],
3121
+ ghost: [
3122
+ "text-(--accent-a11)",
3123
+ "data-[state=off]:hover:bg-(--accent-a3)",
3124
+ "data-[state=on]:bg-(--accent-a4)",
3125
+ "data-[state=on]:text-(--accent-a12)"
3126
+ ]
3127
+ },
3128
+ icon: {
3129
+ true: [],
3130
+ false: []
3131
+ },
3132
+ size: {
3133
+ xs: ["h-5", "text-xs", "gap-0.25"],
3134
+ sm: ["h-6", "text-sm", "gap-0.5"],
3135
+ md: ["h-7", "text-base", "gap-1"],
3136
+ lg: ["h-8", "text-lg", "gap-1.5"],
3137
+ xl: ["h-9", "text-xl", "gap-2"]
3138
+ }
3139
+ },
3140
+ compoundVariants: [
3141
+ {
3142
+ icon: true,
3143
+ size: "xs",
3144
+ class: "w-5"
3145
+ },
3146
+ {
3147
+ icon: false,
3148
+ size: "xs",
3149
+ class: "px-2"
3150
+ },
3151
+ {
3152
+ icon: true,
3153
+ size: "sm",
3154
+ class: "w-6"
3155
+ },
3156
+ {
3157
+ icon: false,
3158
+ size: "sm",
3159
+ class: "px-2"
3160
+ },
3161
+ {
3162
+ icon: true,
3163
+ size: "md",
3164
+ class: "w-7"
3165
+ },
3166
+ {
3167
+ icon: false,
3168
+ size: "md",
3169
+ class: "px-3"
3170
+ },
3171
+ {
3172
+ icon: true,
3173
+ size: "lg",
3174
+ class: "w-8"
3175
+ },
3176
+ {
3177
+ icon: false,
3178
+ size: "lg",
3179
+ class: "px-4"
3180
+ },
3181
+ {
3182
+ icon: true,
3183
+ size: "xl",
3184
+ class: "w-9"
3185
+ },
3186
+ {
3187
+ icon: false,
3188
+ size: "xl",
3189
+ class: "px-5"
3190
+ }
3191
+ ],
3192
+ defaultVariants: {
3193
+ size: "md",
3194
+ icon: false,
3195
+ variant: "outline"
3196
+ }
3197
+ }
3198
+ );
3199
+ const BaseToggleButton = React.forwardRef((props, ref) => {
3200
+ const providerContext = useProvider();
3201
+ const {
3202
+ className,
3203
+ size,
3204
+ icon,
3205
+ variant,
3206
+ radius = providerContext.radius,
3207
+ accentColor = providerContext.accentColor,
3208
+ ...rest
3209
+ } = props;
3210
+ return /* @__PURE__ */ jsxRuntime.jsx(
3211
+ Toggle__namespace.Root,
3212
+ {
3213
+ ref,
3214
+ className: classVarianceAuthority.cx(className, toggleButtonCva({ size, variant, icon }), radiusCva({ radius, maxLarge: false })),
3215
+ "data-accent-color": accentColor,
3216
+ ...rest
3217
+ }
3218
+ );
3219
+ });
3220
+ BaseToggleButton.displayName = "BaseToggleButton";
3221
+ const IconToggleButton = React.forwardRef((props, ref) => {
3222
+ return /* @__PURE__ */ jsxRuntime.jsx(BaseToggleButton, { ref, icon: true, ...props });
3223
+ });
3224
+ IconToggleButton.displayName = "IconToggleButton";
3225
+ const ToggleButton = React.forwardRef((props, ref) => {
3226
+ return /* @__PURE__ */ jsxRuntime.jsx(BaseToggleButton, { ref, icon: false, ...props });
3227
+ });
3228
+ ToggleButton.displayName = "ToggleButton";
3229
+ const TooltipArrow = React.forwardRef((props, ref) => {
3230
+ const { className, ...rest } = props;
3231
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixTooltip__namespace.Arrow, { className: classVarianceAuthority.cx(className, "fill-(--base-6)"), ref, ...rest });
3232
+ });
3233
+ TooltipArrow.displayName = "TooltipArrow";
3234
+ const tooltipContent = classVarianceAuthority.cva(
3235
+ [
3236
+ "data-[state=delayed-open]:animate-in",
3237
+ "data-[state=delayed-open]:fade-in-0",
3238
+ "data-[state=delayed-open]:zoom-in-95",
3239
+ "data-[state=closed]:animate-out",
3240
+ "data-[state=closed]:fade-out-0",
3241
+ "data-[state=closed]:zoom-out-95",
3242
+ "bg-(--base-1)",
3243
+ "ring-1",
3244
+ "ring-inset",
3245
+ "ring-(--base-a6)",
3246
+ "text-(--base-12)",
3247
+ "shadow-sm"
3248
+ ],
3249
+ {
3250
+ variants: {
3251
+ size: {
3252
+ xs: ["text-xs", "px-2"],
3253
+ sm: ["text-sm", "px-3"],
3254
+ md: ["text-base", "px-4"],
3255
+ lg: ["text-lg", "px-5"],
3256
+ xl: ["text-xl", "px-6"]
3257
+ },
3258
+ side: {
3259
+ top: ["data-[side=top]:slide-in-from-bottom-1"],
3260
+ right: ["data-[side=right]:slide-in-from-left-1"],
3261
+ bottom: ["data-[side=bottom]:slide-in-from-top-1"],
3262
+ left: ["data-[side=left]:slide-in-from-right-1"]
3263
+ }
3264
+ },
3265
+ defaultVariants: {
3266
+ size: "md",
3267
+ side: "top"
3268
+ }
3269
+ }
3270
+ );
3271
+ const TooltipContent = React.forwardRef((props, ref) => {
3272
+ const providerContext = useProvider();
3273
+ const {
3274
+ className,
3275
+ side = "top",
3276
+ size,
3277
+ radius = providerContext.radius,
3278
+ children,
3279
+ sideOffset = 2,
3280
+ container,
3281
+ ...rest
3282
+ } = props;
3283
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixTooltip__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
3284
+ RadixTooltip__namespace.Content,
3285
+ {
3286
+ className: classVarianceAuthority.cx(className, tooltipContent({ size, side }), radiusCva({ radius, maxLarge: false })),
3287
+ ref,
3288
+ sideOffset,
3289
+ ...rest,
3290
+ children
3291
+ }
3292
+ ) });
3293
+ });
3294
+ TooltipContent.displayName = "TooltipContent";
3295
+ const Tooltip = {
3296
+ Arrow: TooltipArrow,
3297
+ Content: TooltipContent,
3298
+ Root: RadixTooltip__namespace.Root,
3299
+ Trigger: RadixTooltip__namespace.Trigger,
3300
+ Provider: RadixTooltip__namespace.Provider
3301
+ };
3302
+ exports2.AlertDialog = AlertDialog;
3303
+ exports2.AlertDialogContent = AlertDialogContent;
3304
+ exports2.AlertDialogProvider = AlertDialogProvider;
3305
+ exports2.Avatar = Avatar;
3306
+ exports2.AvatarFallback = AvatarFallback;
3307
+ exports2.AvatarImage = AvatarImage;
3308
+ exports2.AvatarRoot = AvatarRoot;
3309
+ exports2.Badge = Badge;
3310
+ exports2.Button = Button;
3311
+ exports2.ButtonGroup = ButtonGroup;
3312
+ exports2.Checkbox = Checkbox;
3313
+ exports2.CheckboxIndicator = CheckboxIndicator;
3314
+ exports2.CheckboxRoot = CheckboxRoot;
3315
+ exports2.CollapsibleTree = CollapsibleTree;
3316
+ exports2.Dialog = Dialog;
3317
+ exports2.DialogContent = DialogContent;
3318
+ exports2.DialogRoot = DialogRoot;
3319
+ exports2.HoverCard = HoverCard;
3320
+ exports2.HoverCardArrow = HoverCardArrow;
3321
+ exports2.HoverCardContent = HoverCardContent;
3322
+ exports2.HoverUtility = HoverUtility;
3323
+ exports2.IconButton = IconButton;
3324
+ exports2.IconToggleButton = IconToggleButton;
3325
+ exports2.Input = Input;
3326
+ exports2.InputField = InputField;
3327
+ exports2.InputRoot = InputRoot;
3328
+ exports2.InputSlot = InputSlot;
3329
+ exports2.Layout = Layout;
3330
+ exports2.LayoutContext = LayoutContext;
3331
+ exports2.OvermapErrorBoundary = OvermapErrorBoundary;
3332
+ exports2.OvermapMenu = OvermapMenu;
3333
+ exports2.Popover = Popover;
3334
+ exports2.Provider = Provider;
3335
+ exports2.RadioGroup = RadioGroup;
3336
+ exports2.RadioGroupIndicator = RadioGroupIndicator;
3337
+ exports2.RadioGroupItem = RadioGroupItem;
3338
+ exports2.RadioGroupRoot = RadioGroupRoot;
3339
+ exports2.RiIcon = RiIcon;
3340
+ exports2.Separator = Separator;
3341
+ exports2.SlideOutV2 = SlideOutV2;
3342
+ exports2.SlideOutV3 = SlideOutV3;
3343
+ exports2.Spinner = Spinner;
3344
+ exports2.TextArea = TextArea;
3345
+ exports2.Toast = Toast;
3346
+ exports2.ToastContext = ToastContext;
3347
+ exports2.ToastProvider = ToastProvider;
3348
+ exports2.ToggleButton = ToggleButton;
3349
+ exports2.Tooltip = Tooltip;
3350
+ exports2.TooltipArrow = TooltipArrow;
3351
+ exports2.TooltipContent = TooltipContent;
3352
+ exports2.badge = badge;
3353
+ exports2.button = button;
3354
+ exports2.splitTextForEllipsisAndExpansion = splitTextForEllipsisAndExpansion;
3355
+ exports2.useAlertDialog = useAlertDialog;
3356
+ exports2.useButtonGroup = useButtonGroup;
3357
+ exports2.useLayoutContext = useLayoutContext;
3358
+ exports2.useProvider = useProvider;
3359
+ exports2.useSize = useSize;
3360
+ exports2.useStopEventPropagation = useStopEventPropagation;
3361
+ exports2.useTextFilter = useTextFilter;
3362
+ exports2.useToast = useToast;
3363
+ exports2.useViewportSize = useViewportSize;
3364
+ Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
3365
+ });
20
3366
  //# sourceMappingURL=blocks.umd.cjs.map