xertica-ui 2.2.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (708) hide show
  1. package/CHANGELOG.md +564 -525
  2. package/README.md +417 -382
  3. package/bin/cli.ts +1244 -748
  4. package/bin/generate-tokens.ts +262 -262
  5. package/bin/language-config.ts +5 -8
  6. package/components/assets/xertica-orbe-animation.ts +1162 -1162
  7. package/components/assistant/code-block/CodeBlock.tsx +268 -268
  8. package/components/assistant/code-block/code-block.stories.tsx +57 -57
  9. package/components/assistant/code-block/code-block.test.tsx +44 -44
  10. package/components/assistant/code-block/index.ts +1 -1
  11. package/components/assistant/formatted-document/FormattedDocument.tsx +147 -147
  12. package/components/assistant/formatted-document/formatted-document.stories.tsx +51 -51
  13. package/components/assistant/formatted-document/formatted-document.test.tsx +42 -42
  14. package/components/assistant/formatted-document/index.ts +1 -1
  15. package/components/assistant/index.ts +6 -6
  16. package/components/assistant/markdown-message/MarkdownMessage.tsx +152 -152
  17. package/components/assistant/markdown-message/index.ts +1 -1
  18. package/components/assistant/markdown-message/markdown-message.stories.tsx +50 -50
  19. package/components/assistant/markdown-message/markdown-message.test.tsx +33 -33
  20. package/components/assistant/modern-chat-input/ModernChatInput.tsx +17 -7
  21. package/components/assistant/modern-chat-input/index.ts +1 -1
  22. package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +131 -131
  23. package/components/assistant/modern-chat-input/modern-chat-input.test.tsx +79 -79
  24. package/components/assistant/xertica-assistant/index.ts +3 -3
  25. package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +99 -99
  26. package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +104 -106
  27. package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -81
  28. package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +88 -78
  29. package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +75 -75
  30. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +564 -560
  31. package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +67 -67
  32. package/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.tsx +41 -41
  33. package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +103 -103
  34. package/components/assistant/xertica-assistant/parts/index.ts +16 -16
  35. package/components/assistant/xertica-assistant/types.ts +134 -134
  36. package/components/assistant/xertica-assistant/use-assistant.ts +615 -615
  37. package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +407 -407
  38. package/components/assistant/xertica-assistant/xertica-assistant.test.tsx +65 -65
  39. package/components/assistant/xertica-assistant/xertica-assistant.tsx +611 -613
  40. package/components/blocks/card-patterns/ActivityCard.tsx +100 -100
  41. package/components/blocks/card-patterns/FeatureCard.tsx +109 -109
  42. package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +1 -6
  43. package/components/blocks/card-patterns/NotificationCard.tsx +140 -140
  44. package/components/blocks/card-patterns/ProfileCard.tsx +112 -114
  45. package/components/blocks/card-patterns/ProjectCard.tsx +123 -123
  46. package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +1 -6
  47. package/components/blocks/card-patterns/QuickActionCard.tsx +68 -68
  48. package/components/blocks/card-patterns/card-patterns.mdx +123 -123
  49. package/components/blocks/card-patterns/card-patterns.stories.tsx +594 -594
  50. package/components/blocks/card-patterns/index.ts +29 -29
  51. package/components/blocks/index.ts +1 -1
  52. package/components/brand/branding/branding.stories.tsx +57 -57
  53. package/components/brand/index.ts +6 -6
  54. package/components/brand/language-selector/index.ts +1 -1
  55. package/components/brand/language-selector/language-selector.mdx +126 -126
  56. package/components/brand/language-selector/language-selector.stories.tsx +1 -4
  57. package/components/brand/theme-toggle/ThemeToggle.tsx +74 -70
  58. package/components/brand/theme-toggle/index.ts +1 -1
  59. package/components/brand/theme-toggle/theme-toggle.stories.tsx +34 -34
  60. package/components/brand/theme-toggle/theme-toggle.test.tsx +34 -34
  61. package/components/brand/xertica-logo/XerticaLogo.stories.tsx +82 -82
  62. package/components/brand/xertica-logo/XerticaLogo.tsx +104 -104
  63. package/components/brand/xertica-logo/index.ts +1 -1
  64. package/components/brand/xertica-logo/xertica-logo.test.tsx +26 -26
  65. package/components/brand/xertica-orbe/XerticaOrbe.tsx +1927 -1927
  66. package/components/brand/xertica-orbe/index.ts +1 -1
  67. package/components/brand/xertica-orbe/xertica-orbe.stories.tsx +40 -40
  68. package/components/brand/xertica-orbe/xertica-orbe.test.tsx +19 -19
  69. package/components/brand/xertica-provider/XerticaProvider.tsx +1 -4
  70. package/components/brand/xertica-provider/index.ts +1 -1
  71. package/components/brand/xertica-provider/xertica-provider.test.tsx +74 -74
  72. package/components/brand/xertica-xlogo/XerticaXLogo.stories.tsx +79 -79
  73. package/components/brand/xertica-xlogo/XerticaXLogo.tsx +65 -65
  74. package/components/brand/xertica-xlogo/index.ts +1 -1
  75. package/components/brand/xertica-xlogo/xertica-xlogo.test.tsx +16 -16
  76. package/components/examples/ApiKeyMapExample.tsx +71 -71
  77. package/components/examples/DrawingMapExample.tsx +565 -565
  78. package/components/examples/FilterableMapExample.tsx +393 -393
  79. package/components/examples/LocationPickerExample.tsx +348 -348
  80. package/components/examples/MapExamples.tsx +268 -268
  81. package/components/examples/MapGmpExample.tsx +169 -169
  82. package/components/examples/MapShowcase.tsx +471 -471
  83. package/components/examples/RouteMapExamples.tsx +329 -329
  84. package/components/examples/SidebarLogoExample.tsx +65 -65
  85. package/components/examples/SimpleFilterableMap.tsx +219 -219
  86. package/components/examples/index.ts +45 -45
  87. package/components/figma/ImageWithFallback.tsx +27 -27
  88. package/components/hooks/index.ts +13 -13
  89. package/components/hooks/use-layout-shortcuts.ts +43 -43
  90. package/components/index.ts +86 -90
  91. package/components/layout/header/header.stories.tsx +204 -204
  92. package/components/layout/header/header.test.tsx +75 -75
  93. package/components/layout/header/header.tsx +349 -349
  94. package/components/layout/header/index.ts +1 -1
  95. package/components/layout/index.ts +2 -2
  96. package/components/layout/sidebar/index.ts +3 -3
  97. package/components/layout/sidebar/sidebar.stories.tsx +586 -586
  98. package/components/layout/sidebar/sidebar.test.tsx +76 -76
  99. package/components/layout/sidebar/sidebar.tsx +1079 -1073
  100. package/components/layout/sidebar/use-sidebar.ts +104 -104
  101. package/components/media/FloatingMediaWrapper.tsx +371 -371
  102. package/components/media/audio-player/AudioPlayer.stories.tsx +124 -124
  103. package/components/media/audio-player/AudioPlayer.test.tsx +106 -106
  104. package/components/media/audio-player/AudioPlayer.tsx +767 -765
  105. package/components/media/audio-player/index.ts +1 -1
  106. package/components/media/audio-player/use-audio-player.ts +312 -312
  107. package/components/media/index.ts +3 -3
  108. package/components/media/video-player/VideoPlayer.stories.tsx +98 -98
  109. package/components/media/video-player/VideoPlayer.test.tsx +73 -73
  110. package/components/media/video-player/VideoPlayer.tsx +310 -310
  111. package/components/media/video-player/index.ts +1 -1
  112. package/components/pages/forgot-password-page/ForgotPasswordPage.stories.tsx +24 -24
  113. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
  114. package/components/pages/forgot-password-page/forgot-password-page.test.tsx +45 -45
  115. package/components/pages/forgot-password-page/index.ts +1 -1
  116. package/components/pages/home-content/HomeContent.stories.tsx +43 -43
  117. package/components/pages/home-content/HomeContent.tsx +120 -120
  118. package/components/pages/home-content/index.ts +1 -1
  119. package/components/pages/home-page/HomePage.stories.tsx +39 -39
  120. package/components/pages/home-page/HomePage.tsx +78 -74
  121. package/components/pages/home-page/home-page.test.tsx +53 -53
  122. package/components/pages/home-page/index.ts +1 -1
  123. package/components/pages/index.ts +8 -8
  124. package/components/pages/login-page/LoginPage.stories.tsx +39 -39
  125. package/components/pages/login-page/LoginPage.tsx +218 -216
  126. package/components/pages/login-page/index.ts +1 -1
  127. package/components/pages/login-page/login-page.test.tsx +63 -63
  128. package/components/pages/reset-password-page/ResetPasswordPage.stories.tsx +24 -24
  129. package/components/pages/reset-password-page/ResetPasswordPage.tsx +243 -239
  130. package/components/pages/reset-password-page/index.ts +1 -1
  131. package/components/pages/template-content/TemplateContent.stories.tsx +43 -43
  132. package/components/pages/template-content/TemplateContent.tsx +1354 -1235
  133. package/components/pages/template-content/index.ts +1 -1
  134. package/components/pages/template-page/TemplatePage.stories.tsx +39 -39
  135. package/components/pages/template-page/TemplatePage.tsx +62 -62
  136. package/components/pages/template-page/index.ts +1 -1
  137. package/components/pages/template-page/template-page.test.tsx +52 -52
  138. package/components/pages/verify-email-page/VerifyEmailPage.stories.tsx +41 -41
  139. package/components/pages/verify-email-page/VerifyEmailPage.tsx +206 -206
  140. package/components/pages/verify-email-page/index.ts +1 -1
  141. package/components/public-api-smoke.test.tsx +52 -52
  142. package/components/shared/CustomTooltipContent.tsx +48 -48
  143. package/components/shared/assistant-utils.test.ts +16 -16
  144. package/components/shared/assistant-utils.ts +225 -225
  145. package/components/shared/error-boundary.stories.tsx +114 -132
  146. package/components/shared/error-boundary.tsx +150 -154
  147. package/components/shared/error-fallbacks.tsx +222 -226
  148. package/components/shared/layout-constants.ts +8 -8
  149. package/components/shared/navigation.ts +35 -35
  150. package/components/shared/use-mobile.test.ts +16 -16
  151. package/components/shared/use-mobile.ts +36 -36
  152. package/components/shared/utils.test.ts +14 -14
  153. package/components/shared/utils.ts +6 -6
  154. package/components/ui/accordion/accordion.stories.tsx +105 -105
  155. package/components/ui/accordion/accordion.test.tsx +59 -59
  156. package/components/ui/accordion/accordion.tsx +77 -77
  157. package/components/ui/accordion/index.ts +1 -1
  158. package/components/ui/alert/alert.stories.tsx +86 -86
  159. package/components/ui/alert/alert.test.tsx +53 -53
  160. package/components/ui/alert/alert.tsx +93 -93
  161. package/components/ui/alert/index.ts +1 -1
  162. package/components/ui/alert-dialog/alert-dialog.stories.tsx +84 -84
  163. package/components/ui/alert-dialog/alert-dialog.test.tsx +70 -70
  164. package/components/ui/alert-dialog/alert-dialog.tsx +149 -149
  165. package/components/ui/alert-dialog/index.ts +1 -1
  166. package/components/ui/aspect-ratio/aspect-ratio.stories.tsx +46 -46
  167. package/components/ui/aspect-ratio/aspect-ratio.test.tsx +28 -28
  168. package/components/ui/aspect-ratio/aspect-ratio.tsx +20 -20
  169. package/components/ui/aspect-ratio/index.ts +1 -1
  170. package/components/ui/assistant-chart/AssistantChart.tsx +64 -64
  171. package/components/ui/assistant-chart/assistant-chart.stories.tsx +44 -44
  172. package/components/ui/assistant-chart/assistant-chart.test.tsx +46 -46
  173. package/components/ui/assistant-chart/index.ts +1 -1
  174. package/components/ui/avatar/avatar.stories.tsx +86 -86
  175. package/components/ui/avatar/avatar.test.tsx +55 -55
  176. package/components/ui/avatar/avatar.tsx +71 -71
  177. package/components/ui/avatar/index.ts +1 -1
  178. package/components/ui/badge/badge.stories.tsx +72 -72
  179. package/components/ui/badge/badge.test.tsx +40 -40
  180. package/components/ui/badge/badge.tsx +58 -58
  181. package/components/ui/badge/index.ts +1 -1
  182. package/components/ui/breadcrumb/breadcrumb.stories.tsx +123 -123
  183. package/components/ui/breadcrumb/breadcrumb.test.tsx +70 -70
  184. package/components/ui/breadcrumb/breadcrumb.tsx +114 -114
  185. package/components/ui/breadcrumb/index.ts +1 -1
  186. package/components/ui/button/button.stories.tsx +183 -183
  187. package/components/ui/button/button.test.tsx +64 -64
  188. package/components/ui/button/button.tsx +98 -98
  189. package/components/ui/button/index.ts +1 -1
  190. package/components/ui/calendar/calendar.stories.tsx +108 -108
  191. package/components/ui/calendar/calendar.test.tsx +53 -53
  192. package/components/ui/calendar/calendar.tsx +230 -230
  193. package/components/ui/calendar/index.ts +1 -1
  194. package/components/ui/card/card.stories.tsx +301 -301
  195. package/components/ui/card/card.test.tsx +55 -55
  196. package/components/ui/card/card.tsx +83 -83
  197. package/components/ui/card/index.ts +1 -1
  198. package/components/ui/carousel/carousel.stories.tsx +80 -80
  199. package/components/ui/carousel/carousel.test.tsx +75 -75
  200. package/components/ui/carousel/carousel.tsx +242 -242
  201. package/components/ui/carousel/index.ts +1 -1
  202. package/components/ui/chart/chart.stories.tsx +1328 -1328
  203. package/components/ui/chart/chart.test.tsx +178 -178
  204. package/components/ui/chart/chart.tsx +2232 -2232
  205. package/components/ui/chart/index.ts +1 -1
  206. package/components/ui/checkbox/checkbox.stories.tsx +109 -109
  207. package/components/ui/checkbox/checkbox.test.tsx +49 -49
  208. package/components/ui/checkbox/checkbox.tsx +68 -68
  209. package/components/ui/checkbox/index.ts +1 -1
  210. package/components/ui/collapsible/collapsible.stories.tsx +45 -45
  211. package/components/ui/collapsible/collapsible.test.tsx +51 -51
  212. package/components/ui/collapsible/collapsible.tsx +32 -32
  213. package/components/ui/collapsible/index.ts +1 -1
  214. package/components/ui/command/command.stories.tsx +134 -134
  215. package/components/ui/command/command.test.tsx +48 -48
  216. package/components/ui/command/command.tsx +163 -163
  217. package/components/ui/command/index.ts +1 -1
  218. package/components/ui/context-menu/context-menu.stories.tsx +76 -76
  219. package/components/ui/context-menu/context-menu.test.tsx +61 -61
  220. package/components/ui/context-menu/context-menu.tsx +236 -236
  221. package/components/ui/context-menu/index.ts +1 -1
  222. package/components/ui/dialog/dialog.stories.tsx +174 -174
  223. package/components/ui/dialog/dialog.test.tsx +78 -78
  224. package/components/ui/dialog/dialog.tsx +189 -189
  225. package/components/ui/dialog/index.ts +1 -1
  226. package/components/ui/drawer/drawer.stories.tsx +71 -71
  227. package/components/ui/drawer/drawer.test.tsx +67 -67
  228. package/components/ui/drawer/drawer.tsx +146 -146
  229. package/components/ui/drawer/index.ts +1 -1
  230. package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +156 -156
  231. package/components/ui/dropdown-menu/dropdown-menu.test.tsx +62 -62
  232. package/components/ui/dropdown-menu/dropdown-menu.tsx +240 -240
  233. package/components/ui/dropdown-menu/index.ts +1 -1
  234. package/components/ui/empty/empty.stories.tsx +85 -85
  235. package/components/ui/empty/empty.test.tsx +31 -31
  236. package/components/ui/empty/empty.tsx +88 -88
  237. package/components/ui/empty/index.ts +1 -1
  238. package/components/ui/file-upload/file-upload.stories.tsx +144 -144
  239. package/components/ui/file-upload/file-upload.test.tsx +65 -65
  240. package/components/ui/file-upload/file-upload.tsx +142 -142
  241. package/components/ui/file-upload/index.ts +2 -2
  242. package/components/ui/file-upload/use-file-upload.ts +177 -177
  243. package/components/ui/form/form.stories.tsx +85 -85
  244. package/components/ui/form/form.test.tsx +75 -75
  245. package/components/ui/form/form.tsx +163 -163
  246. package/components/ui/form/index.ts +1 -1
  247. package/components/ui/google-maps-loader/google-maps-loader.test.tsx +35 -35
  248. package/components/ui/google-maps-loader/google-maps-loader.tsx +465 -465
  249. package/components/ui/google-maps-loader/index.ts +1 -1
  250. package/components/ui/hover-card/hover-card.stories.tsx +61 -61
  251. package/components/ui/hover-card/hover-card.test.tsx +48 -48
  252. package/components/ui/hover-card/hover-card.tsx +50 -50
  253. package/components/ui/hover-card/index.ts +1 -1
  254. package/components/ui/index.ts +400 -400
  255. package/components/ui/input/index.ts +1 -1
  256. package/components/ui/input/input.stories.tsx +153 -153
  257. package/components/ui/input/input.test.tsx +47 -47
  258. package/components/ui/input/input.tsx +57 -57
  259. package/components/ui/input-otp/index.ts +1 -1
  260. package/components/ui/input-otp/input-otp.stories.tsx +120 -120
  261. package/components/ui/input-otp/input-otp.test.tsx +74 -74
  262. package/components/ui/input-otp/input-otp.tsx +101 -101
  263. package/components/ui/label/index.ts +1 -1
  264. package/components/ui/label/label.stories.tsx +74 -74
  265. package/components/ui/label/label.test.tsx +45 -45
  266. package/components/ui/label/label.tsx +53 -53
  267. package/components/ui/map/index.ts +1 -1
  268. package/components/ui/map/map.stories.tsx +86 -86
  269. package/components/ui/map/map.test.tsx +82 -82
  270. package/components/ui/map/map.tsx +506 -506
  271. package/components/ui/map/mock.test.tsx +13 -13
  272. package/components/ui/map-config/index.ts +1 -1
  273. package/components/ui/map-config/map-config.ts +18 -18
  274. package/components/ui/map-layers/index.ts +1 -1
  275. package/components/ui/map-layers/map-layers.test.tsx +48 -48
  276. package/components/ui/map-layers/map-layers.tsx +126 -126
  277. package/components/ui/map.exports/index.ts +1 -1
  278. package/components/ui/map.exports/map.exports.ts +31 -31
  279. package/components/ui/menubar/index.ts +1 -1
  280. package/components/ui/menubar/menubar.stories.tsx +130 -130
  281. package/components/ui/menubar/menubar.test.tsx +53 -53
  282. package/components/ui/menubar/menubar.tsx +265 -265
  283. package/components/ui/navigation-menu/index.ts +1 -1
  284. package/components/ui/navigation-menu/navigation-menu.stories.tsx +126 -126
  285. package/components/ui/navigation-menu/navigation-menu.test.tsx +47 -47
  286. package/components/ui/navigation-menu/navigation-menu.tsx +165 -165
  287. package/components/ui/notification-badge/index.ts +1 -1
  288. package/components/ui/notification-badge/notification-badge.stories.tsx +66 -66
  289. package/components/ui/notification-badge/notification-badge.test.tsx +61 -61
  290. package/components/ui/notification-badge/notification-badge.tsx +91 -91
  291. package/components/ui/page-header/index.ts +1 -1
  292. package/components/ui/page-header/page-header.stories.tsx +69 -69
  293. package/components/ui/page-header/page-header.test.tsx +37 -37
  294. package/components/ui/page-header/page-header.tsx +124 -124
  295. package/components/ui/pagination/index.ts +3 -3
  296. package/components/ui/pagination/pagination.stories.tsx +210 -210
  297. package/components/ui/pagination/pagination.test.tsx +63 -63
  298. package/components/ui/pagination/pagination.tsx +140 -140
  299. package/components/ui/pagination/use-pagination.ts +173 -173
  300. package/components/ui/popover/index.ts +1 -1
  301. package/components/ui/popover/popover.stories.tsx +73 -73
  302. package/components/ui/popover/popover.test.tsx +48 -48
  303. package/components/ui/popover/popover.tsx +54 -54
  304. package/components/ui/progress/index.ts +1 -1
  305. package/components/ui/progress/progress.stories.tsx +55 -55
  306. package/components/ui/progress/progress.test.tsx +23 -23
  307. package/components/ui/progress/progress.tsx +68 -68
  308. package/components/ui/radio-group/index.ts +1 -1
  309. package/components/ui/radio-group/radio-group.stories.tsx +114 -114
  310. package/components/ui/radio-group/radio-group.test.tsx +78 -78
  311. package/components/ui/radio-group/radio-group.tsx +93 -93
  312. package/components/ui/rating/index.ts +1 -1
  313. package/components/ui/rating/rating.stories.tsx +50 -50
  314. package/components/ui/rating/rating.test.tsx +48 -48
  315. package/components/ui/rating/rating.tsx +145 -145
  316. package/components/ui/resizable/index.ts +1 -1
  317. package/components/ui/resizable/resizable.stories.tsx +88 -88
  318. package/components/ui/resizable/resizable.test.tsx +61 -61
  319. package/components/ui/resizable/resizable.tsx +452 -452
  320. package/components/ui/rich-text-editor/index.ts +7 -7
  321. package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +290 -290
  322. package/components/ui/rich-text-editor/rich-text-editor.test.tsx +86 -86
  323. package/components/ui/rich-text-editor/rich-text-editor.tsx +634 -634
  324. package/components/ui/rich-text-editor/use-rich-text-editor.ts +453 -453
  325. package/components/ui/route-map/index.ts +1 -1
  326. package/components/ui/route-map/route-map.stories.tsx +48 -48
  327. package/components/ui/route-map/route-map.test.tsx +108 -108
  328. package/components/ui/route-map/route-map.tsx +349 -349
  329. package/components/ui/scroll-area/index.ts +1 -1
  330. package/components/ui/scroll-area/scroll-area.stories.tsx +31 -31
  331. package/components/ui/scroll-area/scroll-area.test.tsx +27 -27
  332. package/components/ui/scroll-area/scroll-area.tsx +70 -70
  333. package/components/ui/search/index.ts +1 -1
  334. package/components/ui/search/search.stories.tsx +107 -107
  335. package/components/ui/search/search.test.tsx +67 -67
  336. package/components/ui/search/search.tsx +141 -141
  337. package/components/ui/select/index.ts +1 -1
  338. package/components/ui/select/select.stories.tsx +163 -163
  339. package/components/ui/select/select.test.tsx +99 -99
  340. package/components/ui/select/select.tsx +195 -195
  341. package/components/ui/separator/index.ts +1 -1
  342. package/components/ui/separator/separator.stories.tsx +55 -55
  343. package/components/ui/separator/separator.test.tsx +23 -23
  344. package/components/ui/separator/separator.tsx +39 -39
  345. package/components/ui/sheet/index.ts +1 -1
  346. package/components/ui/sheet/sheet.stories.tsx +93 -93
  347. package/components/ui/sheet/sheet.test.tsx +62 -62
  348. package/components/ui/sheet/sheet.tsx +149 -149
  349. package/components/ui/simple-map/index.ts +1 -1
  350. package/components/ui/simple-map/simple-map.stories.tsx +44 -44
  351. package/components/ui/simple-map/simple-map.test.tsx +36 -36
  352. package/components/ui/simple-map/simple-map.tsx +92 -92
  353. package/components/ui/skeleton/index.ts +1 -1
  354. package/components/ui/skeleton/skeleton.stories.tsx +36 -36
  355. package/components/ui/skeleton/skeleton.test.tsx +19 -19
  356. package/components/ui/skeleton/skeleton.tsx +25 -25
  357. package/components/ui/slider/index.ts +1 -1
  358. package/components/ui/slider/slider.stories.tsx +44 -44
  359. package/components/ui/slider/slider.test.tsx +25 -25
  360. package/components/ui/slider/slider.tsx +66 -66
  361. package/components/ui/sonner/index.ts +1 -1
  362. package/components/ui/sonner/sonner.stories.tsx +41 -41
  363. package/components/ui/sonner/sonner.test.tsx +24 -24
  364. package/components/ui/sonner/sonner.tsx +74 -74
  365. package/components/ui/stats-card/index.ts +2 -2
  366. package/components/ui/stats-card/stats-card-skeleton.tsx +1 -3
  367. package/components/ui/stats-card/stats-card.stories.tsx +99 -99
  368. package/components/ui/stats-card/stats-card.test.tsx +34 -34
  369. package/components/ui/stats-card/stats-card.tsx +93 -93
  370. package/components/ui/stepper/index.ts +3 -3
  371. package/components/ui/stepper/stepper.stories.tsx +171 -171
  372. package/components/ui/stepper/stepper.test.tsx +47 -47
  373. package/components/ui/stepper/stepper.tsx +190 -190
  374. package/components/ui/stepper/use-stepper.ts +139 -139
  375. package/components/ui/switch/index.ts +1 -1
  376. package/components/ui/switch/switch.stories.tsx +93 -93
  377. package/components/ui/switch/switch.test.tsx +44 -44
  378. package/components/ui/switch/switch.tsx +70 -70
  379. package/components/ui/table/index.ts +1 -1
  380. package/components/ui/table/table.stories.tsx +114 -114
  381. package/components/ui/table/table.test.tsx +43 -43
  382. package/components/ui/table/table.tsx +104 -104
  383. package/components/ui/tabs/index.ts +1 -1
  384. package/components/ui/tabs/tabs.stories.tsx +140 -140
  385. package/components/ui/tabs/tabs.test.tsx +50 -50
  386. package/components/ui/tabs/tabs.tsx +66 -66
  387. package/components/ui/textarea/index.ts +1 -1
  388. package/components/ui/textarea/textarea.stories.tsx +69 -69
  389. package/components/ui/textarea/textarea.test.tsx +41 -41
  390. package/components/ui/textarea/textarea.tsx +61 -61
  391. package/components/ui/timeline/index.ts +1 -1
  392. package/components/ui/timeline/timeline.stories.tsx +97 -97
  393. package/components/ui/timeline/timeline.test.tsx +53 -53
  394. package/components/ui/timeline/timeline.tsx +124 -124
  395. package/components/ui/toggle/index.ts +1 -1
  396. package/components/ui/toggle/toggle.stories.tsx +56 -56
  397. package/components/ui/toggle/toggle.test.tsx +32 -32
  398. package/components/ui/toggle/toggle.tsx +55 -55
  399. package/components/ui/toggle-group/index.ts +1 -1
  400. package/components/ui/toggle-group/toggle-group.stories.tsx +66 -66
  401. package/components/ui/toggle-group/toggle-group.test.tsx +47 -47
  402. package/components/ui/toggle-group/toggle-group.tsx +79 -79
  403. package/components/ui/tooltip/index.ts +1 -1
  404. package/components/ui/tooltip/tooltip.stories.tsx +83 -83
  405. package/components/ui/tooltip/tooltip.test.tsx +39 -39
  406. package/components/ui/tooltip/tooltip.tsx +69 -69
  407. package/components/ui/tree-view/index.ts +4 -4
  408. package/components/ui/tree-view/tree-view.stories.tsx +154 -154
  409. package/components/ui/tree-view/tree-view.test.tsx +58 -58
  410. package/components/ui/tree-view/tree-view.tsx +171 -171
  411. package/components/ui/tree-view/use-tree-view.ts +237 -237
  412. package/components.json +892 -892
  413. package/contexts/ApiKeyContext.test.tsx +26 -26
  414. package/contexts/ApiKeyContext.tsx +196 -196
  415. package/contexts/AssistenteContext.test.tsx +17 -17
  416. package/contexts/AssistenteContext.tsx +113 -113
  417. package/contexts/AuthContext.tsx +121 -118
  418. package/contexts/BrandColorsContext.test.tsx +21 -21
  419. package/contexts/BrandColorsContext.tsx +251 -251
  420. package/contexts/LanguageContext.tsx +1 -2
  421. package/contexts/LayoutContext.test.tsx +29 -29
  422. package/contexts/LayoutContext.tsx +140 -140
  423. package/contexts/ThemeContext.test.tsx +38 -38
  424. package/contexts/ThemeContext.tsx +111 -111
  425. package/contexts/index.ts +8 -8
  426. package/contexts/theme-data.ts +340 -340
  427. package/dist/AssistantChart-COGiOV-g.cjs +3541 -0
  428. package/dist/AssistantChart-CWX1OWNM.js +3373 -0
  429. package/dist/AudioPlayer-9psiEucT.cjs +1282 -0
  430. package/dist/AudioPlayer-Dp2bD1Gk.js +1278 -0
  431. package/dist/BrandColorsContext-DZT7JjeD.js +659 -0
  432. package/dist/BrandColorsContext-awnBCmC4.cjs +666 -0
  433. package/dist/CodeBlock-DYkTfR0f.js +221 -0
  434. package/dist/CodeBlock-EOvp9cVu.cjs +223 -0
  435. package/dist/CustomTooltipContent-BhdIeBEg.cjs +54 -0
  436. package/dist/CustomTooltipContent-CNbVB2NS.js +33 -0
  437. package/dist/FeatureCard-BZ4CYxFf.cjs +497 -0
  438. package/dist/FeatureCard-DNycVGwT.js +485 -0
  439. package/dist/FeatureCardSkeleton-DZqc96mt.js +27 -0
  440. package/dist/FeatureCardSkeleton-pTa0YNKP.cjs +29 -0
  441. package/dist/LayoutContext-BEq_-n98.cjs +96 -0
  442. package/dist/LayoutContext-DNl1xSoX.js +92 -0
  443. package/dist/ThemeContext-CMD3z2Dz.cjs +1930 -0
  444. package/dist/ThemeContext-x_F2zsnv.js +1923 -0
  445. package/dist/VerifyEmailPage-BJjAMUTW.js +3223 -0
  446. package/dist/VerifyEmailPage-Bv8Ah_TK.cjs +3235 -0
  447. package/dist/VerifyEmailPage-CkBYfsNy.cjs +3232 -0
  448. package/dist/VerifyEmailPage-Cyl55sJb.js +3226 -0
  449. package/dist/VerifyEmailPage-X14vhdyl.js +3296 -0
  450. package/dist/VerifyEmailPage-u_Dn7t1U.cjs +3305 -0
  451. package/dist/XerticaOrbe-Uk2JML1-.cjs +1927 -0
  452. package/dist/XerticaOrbe-jA5T2iOk.js +1925 -0
  453. package/dist/XerticaProvider-BErr83Bg.js +42 -0
  454. package/dist/XerticaProvider-CwOkHxiT.cjs +44 -0
  455. package/dist/XerticaProvider-DUOJg9iX.js +49 -0
  456. package/dist/XerticaProvider-Dl_b72_l.cjs +51 -0
  457. package/dist/XerticaXLogo-BX3ueACh.js +255 -0
  458. package/dist/XerticaXLogo-mqjoBiLI.js +252 -0
  459. package/dist/XerticaXLogo-qBPhwK3g.cjs +260 -0
  460. package/dist/XerticaXLogo-uQgwns_E.cjs +257 -0
  461. package/dist/alert-dialog-DhwPioBa.cjs +885 -0
  462. package/dist/alert-dialog-DqlRW_An.js +831 -0
  463. package/dist/assistant.cjs.js +8 -4
  464. package/dist/assistant.es.js +5 -11
  465. package/dist/avatar-3kO2Anrp.js +54 -0
  466. package/dist/avatar-BCM7YQRC.cjs +77 -0
  467. package/dist/blocks.cjs.js +9 -4
  468. package/dist/blocks.es.js +2 -16
  469. package/dist/brand.cjs.js +10 -5
  470. package/dist/brand.es.js +3 -11
  471. package/dist/breadcrumb-BKtHF4gk.cjs +98 -0
  472. package/dist/breadcrumb-ifNsA7Zl.js +90 -0
  473. package/dist/button-0BlA47It.cjs +85 -0
  474. package/dist/button-DZHzN1Gd.js +62 -0
  475. package/dist/cli.js +471 -93
  476. package/dist/components/brand/theme-toggle/ThemeToggle.d.ts +1 -1
  477. package/dist/components/index.d.ts +1 -1
  478. package/dist/dropdown-menu-BMcykFDf.cjs +225 -0
  479. package/dist/dropdown-menu-Dn_eV2Xb.js +190 -0
  480. package/dist/google-maps-loader-BCe58h9D.js +308 -0
  481. package/dist/google-maps-loader-casMyxlo.cjs +316 -0
  482. package/dist/hooks.cjs.js +12 -8
  483. package/dist/hooks.es.js +10 -27
  484. package/dist/index-9GWd0qxq.cjs +12 -0
  485. package/dist/index-BabBx2pa.js +6 -0
  486. package/dist/index.cjs.js +37 -32
  487. package/dist/index.es.js +30 -363
  488. package/dist/input-C_UiS2Py.cjs +152 -0
  489. package/dist/input-cc-PTD4R.js +123 -0
  490. package/dist/layout.cjs.js +10 -6
  491. package/dist/layout.es.js +7 -9
  492. package/dist/media.cjs.js +8 -3
  493. package/dist/media.es.js +1 -6
  494. package/dist/pages.cjs.js +8 -3
  495. package/dist/pages.es.js +1 -11
  496. package/dist/progress-C7Lti5wo.js +80 -0
  497. package/dist/progress-Cqwxbqs1.cjs +103 -0
  498. package/dist/rich-text-editor-DqLICivI.js +2832 -0
  499. package/dist/rich-text-editor-DxO1Hz3a.cjs +2903 -0
  500. package/dist/select-CH6v_KcQ.cjs +161 -0
  501. package/dist/select-D-xvCZK2.js +130 -0
  502. package/dist/sidebar-3XyzjVBw.js +792 -0
  503. package/dist/sidebar-B4ZWaMrE.js +792 -0
  504. package/dist/sidebar-BS1p2V7t.cjs +795 -0
  505. package/dist/sidebar-DyYvgyBj.cjs +795 -0
  506. package/dist/skeleton-DjiHerJn.cjs +87 -0
  507. package/dist/skeleton-DtR5tkYe.js +78 -0
  508. package/dist/slider-B00b9SVK.cjs +78 -0
  509. package/dist/slider-DQCNUUMj.js +56 -0
  510. package/dist/sonner-B-jWlik1.cjs +68 -0
  511. package/dist/sonner-C9tiqj4f.js +47 -0
  512. package/dist/tooltip-D8n9UYoU.cjs +72 -0
  513. package/dist/tooltip-RtbSmPYJ.js +48 -0
  514. package/dist/ui.cjs.js +23 -18
  515. package/dist/ui.es.js +16 -303
  516. package/dist/use-audio-player-B78fd2ct.js +188 -0
  517. package/dist/use-audio-player-DGvhPrgR.cjs +190 -0
  518. package/dist/use-mobile-BdXTRb0Z.cjs +51 -0
  519. package/dist/use-mobile-Ce2cBAQe.js +29 -0
  520. package/dist/xertica-assistant-B1NaSFFj.js +2173 -0
  521. package/dist/xertica-assistant-B687qEPU.js +2165 -0
  522. package/dist/xertica-assistant-CIaUlbIt.cjs +2180 -0
  523. package/dist/xertica-assistant-sOHwTgIP.cjs +2172 -0
  524. package/dist/xertica-ui.css +1 -1
  525. package/docs/ai-usage.md +195 -195
  526. package/docs/architecture-improvements.md +456 -456
  527. package/docs/architecture.md +312 -306
  528. package/docs/components/accordion.md +109 -109
  529. package/docs/components/alert-dialog.md +127 -127
  530. package/docs/components/alert.md +106 -106
  531. package/docs/components/aspect-ratio.md +58 -58
  532. package/docs/components/assistant-chart.md +47 -47
  533. package/docs/components/assistant.md +428 -426
  534. package/docs/components/audio-player.md +167 -167
  535. package/docs/components/avatar.md +101 -101
  536. package/docs/components/badge.md +84 -84
  537. package/docs/components/branding.md +252 -252
  538. package/docs/components/breadcrumb.md +104 -104
  539. package/docs/components/button.md +156 -156
  540. package/docs/components/calendar.md +141 -141
  541. package/docs/components/card-patterns.md +447 -445
  542. package/docs/components/card.md +245 -245
  543. package/docs/components/carousel.md +100 -100
  544. package/docs/components/chart.md +638 -638
  545. package/docs/components/checkbox.md +88 -88
  546. package/docs/components/code-block.md +105 -105
  547. package/docs/components/collapsible.md +86 -86
  548. package/docs/components/command.md +113 -113
  549. package/docs/components/context-menu.md +81 -81
  550. package/docs/components/dialog.md +198 -198
  551. package/docs/components/drawer.md +105 -105
  552. package/docs/components/dropdown-menu.md +127 -127
  553. package/docs/components/empty.md +127 -127
  554. package/docs/components/error-boundary.md +201 -191
  555. package/docs/components/file-upload.md +189 -189
  556. package/docs/components/floating-media-wrapper.md +63 -63
  557. package/docs/components/form.md +177 -177
  558. package/docs/components/formatted-document.md +105 -105
  559. package/docs/components/google-maps-loader.md +44 -44
  560. package/docs/components/header.md +177 -177
  561. package/docs/components/hooks.md +432 -430
  562. package/docs/components/hover-card.md +86 -86
  563. package/docs/components/image-with-fallback.md +107 -107
  564. package/docs/components/input-otp.md +95 -95
  565. package/docs/components/input.md +130 -130
  566. package/docs/components/label.md +69 -69
  567. package/docs/components/language-selector.md +20 -16
  568. package/docs/components/map-layers.md +138 -138
  569. package/docs/components/map.md +84 -84
  570. package/docs/components/markdown-message.md +47 -47
  571. package/docs/components/menubar.md +89 -89
  572. package/docs/components/modern-chat-input.md +164 -164
  573. package/docs/components/navigation-menu.md +83 -83
  574. package/docs/components/notification-badge.md +78 -78
  575. package/docs/components/page-header.md +93 -93
  576. package/docs/components/pages.md +323 -309
  577. package/docs/components/pagination.md +334 -334
  578. package/docs/components/popover.md +116 -116
  579. package/docs/components/progress.md +103 -103
  580. package/docs/components/radio-group.md +133 -133
  581. package/docs/components/rating.md +77 -77
  582. package/docs/components/resizable.md +84 -84
  583. package/docs/components/rich-text-editor.md +255 -255
  584. package/docs/components/route-map.md +124 -124
  585. package/docs/components/scroll-area.md +58 -58
  586. package/docs/components/search.md +87 -87
  587. package/docs/components/select.md +144 -144
  588. package/docs/components/separator.md +58 -58
  589. package/docs/components/sheet.md +122 -122
  590. package/docs/components/sidebar.md +314 -314
  591. package/docs/components/simple-map.md +51 -51
  592. package/docs/components/skeleton.md +99 -99
  593. package/docs/components/slider.md +84 -84
  594. package/docs/components/sonner.md +115 -115
  595. package/docs/components/stats-card.md +120 -120
  596. package/docs/components/stepper.md +268 -268
  597. package/docs/components/switch.md +106 -106
  598. package/docs/components/table.md +138 -138
  599. package/docs/components/tabs.md +117 -117
  600. package/docs/components/textarea.md +86 -86
  601. package/docs/components/theme-toggle.md +73 -73
  602. package/docs/components/timeline.md +121 -121
  603. package/docs/components/toggle-group.md +68 -68
  604. package/docs/components/toggle.md +62 -62
  605. package/docs/components/tooltip.md +116 -116
  606. package/docs/components/tree-view.md +238 -238
  607. package/docs/components/use-mobile.md +96 -96
  608. package/docs/components/video-player.md +68 -68
  609. package/docs/components/xertica-logo.md +36 -36
  610. package/docs/components/xertica-orbe.md +35 -35
  611. package/docs/components/xertica-provider.md +65 -65
  612. package/docs/components/xertica-xlogo.md +35 -35
  613. package/docs/decision-tree.md +293 -293
  614. package/docs/doc-audit.md +244 -243
  615. package/docs/form-sizing.md +162 -162
  616. package/docs/getting-started.md +616 -591
  617. package/docs/guidelines.md +330 -328
  618. package/docs/i18n.md +61 -57
  619. package/docs/installation.md +268 -267
  620. package/docs/layout.md +143 -143
  621. package/docs/llms.md +295 -295
  622. package/docs/patterns/analytics.md +194 -194
  623. package/docs/patterns/crud.md +149 -149
  624. package/docs/patterns/dashboard.md +138 -138
  625. package/docs/patterns/detail-page.md +296 -296
  626. package/docs/patterns/form.md +241 -241
  627. package/docs/patterns/login.md +156 -156
  628. package/docs/patterns/settings.md +368 -368
  629. package/docs/patterns/wizard.md +213 -213
  630. package/docs/state-management.md +289 -289
  631. package/guidelines/Guidelines.md +409 -406
  632. package/hooks/useTheme.test.tsx +16 -16
  633. package/hooks/useTheme.ts +4 -4
  634. package/imports/Podcast.tsx +540 -540
  635. package/imports/XerticaAi.tsx +46 -46
  636. package/imports/XerticaX.tsx +15 -15
  637. package/imports/svg-aueiaqngck.ts +20 -20
  638. package/imports/svg-v9krss1ozd.ts +23 -23
  639. package/imports/svg-vhrdofe3qe.ts +6 -6
  640. package/llms-compact.txt +2 -1
  641. package/llms.txt +2 -1
  642. package/mcp/resources.json +22 -22
  643. package/mcp/tools.json +35 -35
  644. package/package.json +219 -213
  645. package/scripts/ai-validator.ts +91 -91
  646. package/scripts/cleanup-case-dupes.ts +62 -62
  647. package/scripts/generate-ai-manifests.ts +107 -107
  648. package/styles/globals.css +13 -13
  649. package/styles/xertica/app-overrides/chat.css +61 -61
  650. package/styles/xertica/app-overrides/scrollbar.css +33 -33
  651. package/styles/xertica/base.css +90 -71
  652. package/styles/xertica/integrations/google-maps.css +76 -76
  653. package/styles/xertica/integrations/sonner.css +73 -73
  654. package/styles/xertica/theme-map.css +102 -99
  655. package/styles/xertica/tokens.css +240 -236
  656. package/templates/CLAUDE.md +16 -1
  657. package/templates/eslint.config.js +26 -26
  658. package/templates/guidelines/Guidelines.md +577 -553
  659. package/templates/package.json +69 -69
  660. package/templates/postcss.config.js +6 -6
  661. package/templates/src/app/App.tsx +46 -46
  662. package/templates/src/app/components/AppLayout.tsx +55 -55
  663. package/templates/src/app/components/AuthGuard.tsx +131 -82
  664. package/templates/src/app/context/AuthContext.tsx +108 -108
  665. package/templates/src/features/assistant/index.ts +5 -5
  666. package/templates/src/features/auth/index.ts +4 -4
  667. package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
  668. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -72
  669. package/templates/src/features/auth/ui/LoginContent.tsx +92 -92
  670. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +6 -2
  671. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +78 -78
  672. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +2 -6
  673. package/templates/src/features/home/data/mock.ts +41 -35
  674. package/templates/src/features/home/index.ts +11 -11
  675. package/templates/src/features/home/store/dashboardStore.ts +25 -25
  676. package/templates/src/features/home/ui/HomeContent.tsx +117 -119
  677. package/templates/src/features/template/index.ts +5 -5
  678. package/templates/src/features/template/ui/CrudTemplate.tsx +1 -4
  679. package/templates/src/features/template/ui/LoginTemplate.tsx +1 -1
  680. package/templates/src/features/template/ui/TemplateContent.tsx +29 -21
  681. package/templates/src/locales/en/pages/templates.json +17 -17
  682. package/templates/src/locales/es/pages/templates.json +17 -17
  683. package/templates/src/locales/pt-BR/pages/templates.json +17 -17
  684. package/templates/src/main.tsx +11 -11
  685. package/templates/src/pages/AssistantPage.tsx +26 -20
  686. package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
  687. package/templates/src/pages/HomePage.tsx +53 -49
  688. package/templates/src/pages/LoginPage.tsx +10 -10
  689. package/templates/src/pages/ResetPasswordPage.tsx +6 -6
  690. package/templates/src/pages/TemplatePage.tsx +28 -28
  691. package/templates/src/pages/VerifyEmailPage.tsx +6 -6
  692. package/templates/src/shared/config/navigation.ts +19 -19
  693. package/templates/src/shared/error-boundary.tsx +150 -154
  694. package/templates/src/shared/error-fallbacks.tsx +222 -226
  695. package/templates/src/shared/lib/auth.ts +20 -20
  696. package/templates/src/shared/types/auth.ts +3 -3
  697. package/templates/src/styles/index.css +95 -95
  698. package/templates/src/styles/xertica/tokens.css +240 -236
  699. package/templates/tsconfig.json +25 -25
  700. package/templates/tsconfig.node.json +12 -12
  701. package/templates/vite-env.d.ts +1 -1
  702. package/templates/vite.config.js +20 -20
  703. package/templates/vite.config.ts +54 -51
  704. package/utils/color-utils.ts +72 -72
  705. package/utils/demo-responses.test.ts +10 -10
  706. package/utils/demo-responses.ts +151 -151
  707. package/utils/gemini.test.ts +25 -25
  708. package/utils/gemini.ts +155 -155
@@ -0,0 +1,3373 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
3
+ import { GripVerticalIcon, ChevronDownIcon, MoreHorizontalIcon, ChevronRightIcon, ChevronLeftIcon, MinusIcon, ChevronLeft, ChevronRight, ChevronDown, XIcon, CheckIcon, CircleIcon, SearchIcon, TrendingUp, TrendingDown, Minus, ArrowRight, ArrowLeft, X, Check, Upload, AlertCircle, FileIcon, Star, Search as Search$1 } from 'lucide-react';
4
+ import * as React from 'react';
5
+ import React__default, { useState, useCallback, useMemo, useRef, useEffect } from 'react';
6
+ import { c as cn, b as buttonVariants, B as Button } from './button-DZHzN1Gd.js';
7
+ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
8
+ import { cva } from 'class-variance-authority';
9
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
10
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
11
+ import { OTPInput, OTPInputContext } from 'input-otp';
12
+ import { Slot } from '@radix-ui/react-slot';
13
+ import { FormProvider, Controller, useFormContext, useFormState } from 'react-hook-form';
14
+ import { L as Label, M as Map$1 } from './alert-dialog-DqlRW_An.js';
15
+ import { getDefaultClassNames, DayPicker } from 'react-day-picker';
16
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
17
+ import { Drawer as Drawer$1 } from 'vaul';
18
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
19
+ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
20
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
21
+ import { Command as Command$1 } from 'cmdk';
22
+ import { k as Dialog, q as DialogHeader, t as DialogTitle, o as DialogDescription, n as DialogContent, c as ChartContainer, g as ChartTooltip, h as ChartTooltipContent } from './rich-text-editor-DqLICivI.js';
23
+ import { C as Card, b as CardContent, S as Skeleton } from './skeleton-DtR5tkYe.js';
24
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
25
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
26
+ import useEmblaCarousel from 'embla-carousel-react';
27
+ import { u as useGoogleMapsLoader } from './google-maps-loader-BCe58h9D.js';
28
+ import { BarChart, CartesianGrid, XAxis, Bar } from 'recharts';
29
+
30
+ function AspectRatio({ ...props }) {
31
+ return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
32
+ }
33
+
34
+ const ResizableContext = React.createContext(null);
35
+ const ResizablePanelGroup = ({
36
+ children,
37
+ className,
38
+ direction = "horizontal",
39
+ id,
40
+ autoSaveId,
41
+ storage,
42
+ onLayout,
43
+ ...props
44
+ }) => {
45
+ const [panels, setPanels] = React.useState(/* @__PURE__ */ new Map());
46
+ const [handles, setHandles] = React.useState(/* @__PURE__ */ new Map());
47
+ const [sizes, setSizes] = React.useState(/* @__PURE__ */ new Map());
48
+ const [isDragging, setIsDragging] = React.useState(false);
49
+ const containerRef = React.useRef(null);
50
+ const getSortedItems = React.useCallback(
51
+ (items) => {
52
+ if (!containerRef.current) return [];
53
+ return Array.from(items.values()).sort((a, b) => {
54
+ if (!a.ref.current || !b.ref.current) return 0;
55
+ const position = a.ref.current.compareDocumentPosition(b.ref.current);
56
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
57
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
58
+ return 0;
59
+ });
60
+ },
61
+ []
62
+ );
63
+ React.useEffect(() => {
64
+ const sortedPanels = getSortedItems(panels);
65
+ if (sortedPanels.length === 0) return;
66
+ const uninitialized = sortedPanels.some((p) => !sizes.has(p.id));
67
+ if (uninitialized) {
68
+ const newSizes = new Map(sizes);
69
+ const remainingSpace = 100;
70
+ const defaultSizeCount = sortedPanels.filter((p) => p.defaultSize).length;
71
+ let usedSpace = 0;
72
+ sortedPanels.forEach((p) => {
73
+ if (p.defaultSize) usedSpace += p.defaultSize;
74
+ });
75
+ const spaceForOthers = Math.max(0, remainingSpace - usedSpace);
76
+ const countOthers = sortedPanels.length - defaultSizeCount;
77
+ const sizeForOthers = countOthers > 0 ? spaceForOthers / countOthers : 0;
78
+ sortedPanels.forEach((p) => {
79
+ if (!newSizes.has(p.id)) {
80
+ newSizes.set(p.id, p.defaultSize ?? sizeForOthers);
81
+ }
82
+ });
83
+ setSizes(newSizes);
84
+ }
85
+ }, [panels, sizes, getSortedItems]);
86
+ const registerPanel = React.useCallback((data) => {
87
+ setPanels((prev) => {
88
+ const next = new Map(prev);
89
+ next.set(data.id, data);
90
+ return next;
91
+ });
92
+ }, []);
93
+ const unregisterPanel = React.useCallback((id2) => {
94
+ setPanels((prev) => {
95
+ const next = new Map(prev);
96
+ next.delete(id2);
97
+ return next;
98
+ });
99
+ setSizes((prev) => {
100
+ const next = new Map(prev);
101
+ next.delete(id2);
102
+ return next;
103
+ });
104
+ }, []);
105
+ const registerHandle = React.useCallback((data) => {
106
+ setHandles((prev) => {
107
+ const next = new Map(prev);
108
+ next.set(data.id, data);
109
+ return next;
110
+ });
111
+ }, []);
112
+ const unregisterHandle = React.useCallback((id2) => {
113
+ setHandles((prev) => {
114
+ const next = new Map(prev);
115
+ next.delete(id2);
116
+ return next;
117
+ });
118
+ }, []);
119
+ const startDragging = React.useCallback(
120
+ (handleId, event) => {
121
+ event.preventDefault();
122
+ setIsDragging(true);
123
+ const sortedPanels = getSortedItems(panels);
124
+ const sortedHandles = getSortedItems(handles);
125
+ const handleIndex = sortedHandles.findIndex((h) => h.id === handleId);
126
+ if (handleIndex === -1) return;
127
+ const leftPanel = sortedPanels[handleIndex];
128
+ const rightPanel = sortedPanels[handleIndex + 1];
129
+ if (!leftPanel || !rightPanel) return;
130
+ const startX = "touches" in event ? event.touches[0].clientX : event.clientX;
131
+ const startY = "touches" in event ? event.touches[0].clientY : event.clientY;
132
+ const startSizeLeft = sizes.get(leftPanel.id) || 0;
133
+ const startSizeRight = sizes.get(rightPanel.id) || 0;
134
+ const containerSize = direction === "horizontal" ? containerRef.current?.offsetWidth || 1 : containerRef.current?.offsetHeight || 1;
135
+ const onMove = (e) => {
136
+ const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
137
+ const currentY = "touches" in e ? e.touches[0].clientY : e.clientY;
138
+ const deltaPixels = direction === "horizontal" ? currentX - startX : currentY - startY;
139
+ const deltaPercent = deltaPixels / containerSize * 100;
140
+ let finalLeft = startSizeLeft + deltaPercent;
141
+ let finalRight = startSizeRight - deltaPercent;
142
+ if (leftPanel.minSize !== void 0 && finalLeft < leftPanel.minSize) {
143
+ const diff = leftPanel.minSize - finalLeft;
144
+ finalLeft = leftPanel.minSize;
145
+ finalRight -= diff;
146
+ }
147
+ if (rightPanel.minSize !== void 0 && finalRight < rightPanel.minSize) {
148
+ const diff = rightPanel.minSize - finalRight;
149
+ finalRight = rightPanel.minSize;
150
+ finalLeft -= diff;
151
+ }
152
+ if (leftPanel.maxSize !== void 0 && finalLeft > leftPanel.maxSize) {
153
+ const diff = finalLeft - leftPanel.maxSize;
154
+ finalLeft = leftPanel.maxSize;
155
+ finalRight += diff;
156
+ }
157
+ if (rightPanel.maxSize !== void 0 && finalRight > rightPanel.maxSize) {
158
+ const diff = finalRight - rightPanel.maxSize;
159
+ finalRight = rightPanel.maxSize;
160
+ finalLeft -= diff;
161
+ }
162
+ finalLeft = Math.max(0, Math.min(100, finalLeft));
163
+ finalRight = Math.max(0, Math.min(100, finalRight));
164
+ setSizes((prev) => {
165
+ const next = new Map(prev);
166
+ next.set(leftPanel.id, finalLeft);
167
+ next.set(rightPanel.id, finalRight);
168
+ return next;
169
+ });
170
+ leftPanel.onResize?.(finalLeft);
171
+ rightPanel.onResize?.(finalRight);
172
+ };
173
+ const onUp = () => {
174
+ setIsDragging(false);
175
+ window.removeEventListener("mousemove", onMove);
176
+ window.removeEventListener("mouseup", onUp);
177
+ window.removeEventListener("touchmove", onMove);
178
+ window.removeEventListener("touchend", onUp);
179
+ if (onLayout) {
180
+ onLayout(sortedPanels.map((p) => sizes.get(p.id) || 0));
181
+ }
182
+ };
183
+ window.addEventListener("mousemove", onMove);
184
+ window.addEventListener("mouseup", onUp);
185
+ window.addEventListener("touchmove", onMove);
186
+ window.addEventListener("touchend", onUp);
187
+ },
188
+ [panels, handles, sizes, direction, getSortedItems, onLayout]
189
+ );
190
+ const getPanelStyle = React.useCallback(
191
+ (id2) => {
192
+ const size = sizes.get(id2);
193
+ if (size === void 0) return { flex: "1 1 0%", overflow: "hidden" };
194
+ return { flex: `${size} 1 0%`, overflow: "hidden" };
195
+ },
196
+ [sizes]
197
+ );
198
+ const contextValue = React.useMemo(
199
+ () => ({
200
+ direction,
201
+ registerPanel,
202
+ unregisterPanel,
203
+ registerHandle,
204
+ unregisterHandle,
205
+ isDragging,
206
+ startDragging,
207
+ getPanelStyle
208
+ }),
209
+ [
210
+ direction,
211
+ registerPanel,
212
+ unregisterPanel,
213
+ registerHandle,
214
+ unregisterHandle,
215
+ isDragging,
216
+ startDragging,
217
+ getPanelStyle
218
+ ]
219
+ );
220
+ return /* @__PURE__ */ jsx(ResizableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
221
+ "div",
222
+ {
223
+ ref: containerRef,
224
+ "data-slot": "resizable-panel-group",
225
+ "data-panel-group-direction": direction,
226
+ className: cn(
227
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
228
+ className
229
+ ),
230
+ ...props,
231
+ children
232
+ }
233
+ ) });
234
+ };
235
+ const ResizablePanel = ({
236
+ className,
237
+ defaultSize,
238
+ minSize = 0,
239
+ maxSize = 100,
240
+ collapsible,
241
+ collapsedSize,
242
+ onCollapse,
243
+ onExpand,
244
+ onResize,
245
+ order,
246
+ tagName,
247
+ id: propId,
248
+ children,
249
+ ...props
250
+ }) => {
251
+ const context = React.useContext(ResizableContext);
252
+ const ref = React.useRef(null);
253
+ const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
254
+ const id = propId || generatedId;
255
+ const registerPanel = context?.registerPanel;
256
+ const unregisterPanel = context?.unregisterPanel;
257
+ React.useLayoutEffect(() => {
258
+ if (!registerPanel || !unregisterPanel) return;
259
+ registerPanel({
260
+ id,
261
+ ref,
262
+ defaultSize,
263
+ minSize,
264
+ maxSize,
265
+ collapsible,
266
+ onCollapse,
267
+ onExpand,
268
+ onResize
269
+ });
270
+ return () => unregisterPanel(id);
271
+ }, [
272
+ registerPanel,
273
+ unregisterPanel,
274
+ id,
275
+ defaultSize,
276
+ minSize,
277
+ maxSize,
278
+ collapsible,
279
+ onCollapse,
280
+ onExpand,
281
+ onResize
282
+ ]);
283
+ if (!context) {
284
+ return /* @__PURE__ */ jsx("div", { className: cn("flex-1", className), ...props, children });
285
+ }
286
+ return /* @__PURE__ */ jsx(
287
+ "div",
288
+ {
289
+ ref,
290
+ "data-slot": "resizable-panel",
291
+ className: cn("relative transition-[flex-grow] duration-0", className),
292
+ style: context.getPanelStyle(id),
293
+ ...props,
294
+ children
295
+ }
296
+ );
297
+ };
298
+ const ResizableHandle = ({
299
+ withHandle,
300
+ className,
301
+ id: propId,
302
+ tagName,
303
+ ...props
304
+ }) => {
305
+ const context = React.useContext(ResizableContext);
306
+ const ref = React.useRef(null);
307
+ const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
308
+ const id = propId || generatedId;
309
+ const registerHandle = context?.registerHandle;
310
+ const unregisterHandle = context?.unregisterHandle;
311
+ React.useLayoutEffect(() => {
312
+ if (!registerHandle || !unregisterHandle) return;
313
+ registerHandle({ id, ref });
314
+ return () => unregisterHandle(id);
315
+ }, [registerHandle, unregisterHandle, id]);
316
+ const handleMouseDown = (e) => {
317
+ if (context) {
318
+ context.startDragging(id, e);
319
+ }
320
+ };
321
+ if (!context) return null;
322
+ return /* @__PURE__ */ jsx(
323
+ "div",
324
+ {
325
+ ref,
326
+ "data-slot": "resizable-handle",
327
+ className: cn(
328
+ "bg-border relative flex items-center justify-center focus-visible:outline-hidden",
329
+ "touch-none select-none",
330
+ context.direction === "vertical" ? "h-px w-full cursor-row-resize after:left-0 after:h-1 after:w-full after:-translate-y-1/2 hover:after:h-4" : "w-px h-full cursor-col-resize after:top-0 after:w-1 after:h-full after:-translate-x-1/2 hover:after:w-4",
331
+ "after:absolute after:z-10",
332
+ className
333
+ ),
334
+ onMouseDown: handleMouseDown,
335
+ onTouchStart: handleMouseDown,
336
+ ...props,
337
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
338
+ }
339
+ );
340
+ };
341
+
342
+ function NavigationMenu({
343
+ className,
344
+ children,
345
+ viewport = true,
346
+ ...props
347
+ }) {
348
+ return /* @__PURE__ */ jsxs(
349
+ NavigationMenuPrimitive.Root,
350
+ {
351
+ "data-slot": "navigation-menu",
352
+ className: cn("relative z-10 flex w-full flex-1 items-center justify-center", className),
353
+ ...props,
354
+ children: [
355
+ children,
356
+ viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
357
+ ]
358
+ }
359
+ );
360
+ }
361
+ function NavigationMenuList({
362
+ className,
363
+ ...props
364
+ }) {
365
+ return /* @__PURE__ */ jsx(
366
+ NavigationMenuPrimitive.List,
367
+ {
368
+ "data-slot": "navigation-menu-list",
369
+ className: cn("group flex flex-1 list-none items-center justify-center gap-1", className),
370
+ ...props
371
+ }
372
+ );
373
+ }
374
+ function NavigationMenuItem({
375
+ className,
376
+ ...props
377
+ }) {
378
+ return /* @__PURE__ */ jsx(
379
+ NavigationMenuPrimitive.Item,
380
+ {
381
+ "data-slot": "navigation-menu-item",
382
+ className: cn("relative", className),
383
+ ...props
384
+ }
385
+ );
386
+ }
387
+ const navigationMenuTriggerStyle = cva(
388
+ "group inline-flex h-10 w-max items-center justify-center rounded-[var(--radius)] bg-background px-4 py-2 text-[var(--text-p)] font-[var(--font-weight-medium)] hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 outline-none focus-visible:ring-2 focus-visible:ring-ring"
389
+ );
390
+ function NavigationMenuTrigger({
391
+ className,
392
+ children,
393
+ ...props
394
+ }) {
395
+ return /* @__PURE__ */ jsxs(
396
+ NavigationMenuPrimitive.Trigger,
397
+ {
398
+ "data-slot": "navigation-menu-trigger",
399
+ className: cn(navigationMenuTriggerStyle(), "group", className),
400
+ ...props,
401
+ children: [
402
+ children,
403
+ " ",
404
+ /* @__PURE__ */ jsx(
405
+ ChevronDownIcon,
406
+ {
407
+ className: "relative top-[1px] ml-1 size-3 group-data-[state=open]:rotate-180",
408
+ "aria-hidden": "true"
409
+ }
410
+ )
411
+ ]
412
+ }
413
+ );
414
+ }
415
+ function NavigationMenuContent({
416
+ className,
417
+ ...props
418
+ }) {
419
+ return /* @__PURE__ */ jsx(
420
+ NavigationMenuPrimitive.Content,
421
+ {
422
+ "data-slot": "navigation-menu-content",
423
+ className: cn("left-0 top-0 w-full md:w-auto", className),
424
+ ...props
425
+ }
426
+ );
427
+ }
428
+ function NavigationMenuViewport({
429
+ className,
430
+ ...props
431
+ }) {
432
+ return /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center w-full"), children: /* @__PURE__ */ jsx(
433
+ NavigationMenuPrimitive.Viewport,
434
+ {
435
+ "data-slot": "navigation-menu-viewport",
436
+ className: cn(
437
+ "origin-top-center relative mt-1.5 overflow-hidden rounded-[var(--radius)] border border-border bg-popover text-popover-foreground shadow-lg",
438
+ className
439
+ ),
440
+ ...props
441
+ }
442
+ ) });
443
+ }
444
+ function NavigationMenuLink({
445
+ className,
446
+ ...props
447
+ }) {
448
+ return /* @__PURE__ */ jsx(
449
+ NavigationMenuPrimitive.Link,
450
+ {
451
+ "data-slot": "navigation-menu-link",
452
+ className: cn(
453
+ "block select-none space-y-1 rounded-[var(--radius)] p-3 leading-none no-underline outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
454
+ className
455
+ ),
456
+ ...props
457
+ }
458
+ );
459
+ }
460
+ function NavigationMenuIndicator({
461
+ className,
462
+ ...props
463
+ }) {
464
+ return /* @__PURE__ */ jsx(
465
+ NavigationMenuPrimitive.Indicator,
466
+ {
467
+ "data-slot": "navigation-menu-indicator",
468
+ className: cn(
469
+ "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
470
+ className
471
+ ),
472
+ ...props,
473
+ children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
474
+ }
475
+ );
476
+ }
477
+
478
+ function Pagination({ className, ...props }) {
479
+ return /* @__PURE__ */ jsx(
480
+ "nav",
481
+ {
482
+ role: "navigation",
483
+ "aria-label": "pagination",
484
+ "data-slot": "pagination",
485
+ className: cn("mx-auto flex w-full justify-center", className),
486
+ ...props
487
+ }
488
+ );
489
+ }
490
+ function PaginationContent({ className, ...props }) {
491
+ return /* @__PURE__ */ jsx(
492
+ "ul",
493
+ {
494
+ "data-slot": "pagination-content",
495
+ className: cn("flex flex-row items-center gap-1", className),
496
+ ...props
497
+ }
498
+ );
499
+ }
500
+ function PaginationItem({ ...props }) {
501
+ return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
502
+ }
503
+ function PaginationLink({
504
+ className,
505
+ isActive,
506
+ disabled,
507
+ size = "icon",
508
+ href,
509
+ ...props
510
+ }) {
511
+ return /* @__PURE__ */ jsx(
512
+ "a",
513
+ {
514
+ "aria-current": isActive ? "page" : void 0,
515
+ "aria-disabled": disabled || void 0,
516
+ tabIndex: disabled ? -1 : void 0,
517
+ "data-slot": "pagination-link",
518
+ "data-active": isActive,
519
+ href: disabled ? void 0 : href ?? "#",
520
+ className: cn(
521
+ buttonVariants({
522
+ variant: isActive ? "outline" : "ghost",
523
+ size
524
+ }),
525
+ disabled && "pointer-events-none opacity-50",
526
+ className
527
+ ),
528
+ ...props
529
+ }
530
+ );
531
+ }
532
+ function PaginationPrevious({
533
+ className,
534
+ disabled,
535
+ ...props
536
+ }) {
537
+ return /* @__PURE__ */ jsxs(
538
+ PaginationLink,
539
+ {
540
+ "aria-label": "Go to previous page",
541
+ size: "default",
542
+ disabled,
543
+ className: cn("gap-1 px-2.5 sm:pl-2.5", className),
544
+ ...props,
545
+ children: [
546
+ /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
547
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
548
+ ]
549
+ }
550
+ );
551
+ }
552
+ function PaginationNext({
553
+ className,
554
+ disabled,
555
+ ...props
556
+ }) {
557
+ return /* @__PURE__ */ jsxs(
558
+ PaginationLink,
559
+ {
560
+ "aria-label": "Go to next page",
561
+ size: "default",
562
+ disabled,
563
+ className: cn("gap-1 px-2.5 sm:pr-2.5", className),
564
+ ...props,
565
+ children: [
566
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
567
+ /* @__PURE__ */ jsx(ChevronRightIcon, {})
568
+ ]
569
+ }
570
+ );
571
+ }
572
+ function PaginationEllipsis({ className, ...props }) {
573
+ return /* @__PURE__ */ jsxs(
574
+ "span",
575
+ {
576
+ "aria-hidden": true,
577
+ "data-slot": "pagination-ellipsis",
578
+ className: cn("flex size-9 items-center justify-center", className),
579
+ ...props,
580
+ children: [
581
+ /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
582
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
583
+ ]
584
+ }
585
+ );
586
+ }
587
+
588
+ function usePagination({
589
+ totalItems,
590
+ pageSize = 10,
591
+ initialPage = 1,
592
+ page: controlledPage,
593
+ onPageChange,
594
+ siblingCount = 1
595
+ }) {
596
+ const [internalPage, setInternalPage] = useState(initialPage);
597
+ const isControlled = controlledPage !== void 0;
598
+ const currentPage = isControlled ? controlledPage : internalPage;
599
+ const totalPages = Math.max(1, Math.ceil(totalItems / pageSize));
600
+ const setPage = useCallback(
601
+ (p) => {
602
+ const clamped = Math.min(Math.max(1, p), totalPages);
603
+ if (!isControlled) setInternalPage(clamped);
604
+ onPageChange?.(clamped);
605
+ },
606
+ [isControlled, onPageChange, totalPages]
607
+ );
608
+ const startIndex = (currentPage - 1) * pageSize;
609
+ const endIndex = Math.min(startIndex + pageSize, totalItems);
610
+ const canGoPrev = currentPage > 1;
611
+ const canGoNext = currentPage < totalPages;
612
+ const isFirstPage = currentPage === 1;
613
+ const isLastPage = currentPage === totalPages;
614
+ const items = useMemo(() => {
615
+ const pageSet = /* @__PURE__ */ new Set();
616
+ pageSet.add(1);
617
+ if (totalPages > 1) pageSet.add(totalPages);
618
+ for (let p = Math.max(2, currentPage - siblingCount); p <= Math.min(totalPages - 1, currentPage + siblingCount); p++) {
619
+ pageSet.add(p);
620
+ }
621
+ const sorted = Array.from(pageSet).sort((a, b) => a - b);
622
+ const result = [];
623
+ for (let i = 0; i < sorted.length; i++) {
624
+ result.push({ type: "page", page: sorted[i] });
625
+ if (i < sorted.length - 1 && sorted[i + 1] - sorted[i] > 1) {
626
+ result.push({ type: "ellipsis", key: `ellipsis-${sorted[i]}` });
627
+ }
628
+ }
629
+ return result;
630
+ }, [currentPage, siblingCount, totalPages]);
631
+ const goTo = useCallback((p) => setPage(p), [setPage]);
632
+ const next = useCallback(() => setPage(currentPage + 1), [currentPage, setPage]);
633
+ const prev = useCallback(() => setPage(currentPage - 1), [currentPage, setPage]);
634
+ const first = useCallback(() => setPage(1), [setPage]);
635
+ const last = useCallback(() => setPage(totalPages), [setPage, totalPages]);
636
+ return {
637
+ currentPage,
638
+ totalPages,
639
+ startIndex,
640
+ endIndex,
641
+ canGoPrev,
642
+ canGoNext,
643
+ isFirstPage,
644
+ isLastPage,
645
+ items,
646
+ goTo,
647
+ next,
648
+ prev,
649
+ first,
650
+ last
651
+ };
652
+ }
653
+
654
+ const toggleVariants = cva(
655
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
656
+ {
657
+ variants: {
658
+ variant: {
659
+ default: "bg-transparent",
660
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
661
+ },
662
+ size: {
663
+ default: "h-9 px-2 min-w-9",
664
+ sm: "h-8 px-1.5 min-w-8",
665
+ lg: "h-10 px-2.5 min-w-10"
666
+ }
667
+ },
668
+ defaultVariants: {
669
+ variant: "default",
670
+ size: "default"
671
+ }
672
+ }
673
+ );
674
+ const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
675
+ TogglePrimitive.Root,
676
+ {
677
+ ref,
678
+ "data-slot": "toggle",
679
+ className: cn(toggleVariants({ variant, size, className })),
680
+ ...props
681
+ }
682
+ ));
683
+ Toggle.displayName = TogglePrimitive.Root.displayName;
684
+
685
+ const ToggleGroupContext = React.createContext({
686
+ size: "default",
687
+ variant: "default"
688
+ });
689
+ const ToggleGroup = React.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
690
+ ToggleGroupPrimitive.Root,
691
+ {
692
+ ref,
693
+ "data-slot": "toggle-group",
694
+ "data-variant": variant,
695
+ "data-size": size,
696
+ className: cn(
697
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
698
+ className
699
+ ),
700
+ ...props,
701
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
702
+ }
703
+ ));
704
+ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
705
+ const ToggleGroupItem = React.forwardRef(({ className, children, variant, size, ...props }, ref) => {
706
+ const context = React.useContext(ToggleGroupContext);
707
+ return /* @__PURE__ */ jsx(
708
+ ToggleGroupPrimitive.Item,
709
+ {
710
+ ref,
711
+ "data-slot": "toggle-group-item",
712
+ "data-variant": context.variant || variant,
713
+ "data-size": context.size || size,
714
+ className: cn(
715
+ toggleVariants({
716
+ variant: context.variant || variant,
717
+ size: context.size || size
718
+ }),
719
+ "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
720
+ className
721
+ ),
722
+ ...props,
723
+ children
724
+ }
725
+ );
726
+ });
727
+ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
728
+
729
+ function InputOTP({
730
+ className,
731
+ containerClassName,
732
+ ...props
733
+ }) {
734
+ return /* @__PURE__ */ jsx(
735
+ OTPInput,
736
+ {
737
+ "data-slot": "input-otp",
738
+ containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
739
+ className: cn("disabled:cursor-not-allowed", className),
740
+ ...props
741
+ }
742
+ );
743
+ }
744
+ function InputOTPGroup({ className, ...props }) {
745
+ return /* @__PURE__ */ jsx(
746
+ "div",
747
+ {
748
+ "data-slot": "input-otp-group",
749
+ className: cn("flex items-center gap-1", className),
750
+ ...props
751
+ }
752
+ );
753
+ }
754
+ function InputOTPSlot({
755
+ index,
756
+ className,
757
+ size = "md",
758
+ ...props
759
+ }) {
760
+ const inputOTPContext = React.useContext(OTPInputContext);
761
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
762
+ const sizeClasses = {
763
+ sm: "h-8 w-8 text-sm",
764
+ md: "h-10 w-10 text-base",
765
+ lg: "h-12 w-12 text-lg"
766
+ };
767
+ return /* @__PURE__ */ jsxs(
768
+ "div",
769
+ {
770
+ "data-slot": "input-otp-slot",
771
+ "data-active": isActive,
772
+ className: cn(
773
+ "data-[active=true]:border-primary data-[active=true]:ring-primary/20 data-[active=true]:aria-invalid:ring-destructive/20 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex items-center justify-center border border-border rounded-[var(--radius)] bg-background transition-all outline-none data-[active=true]:z-10 data-[active=true]:ring-2",
774
+ sizeClasses[size],
775
+ className
776
+ ),
777
+ ...props,
778
+ children: [
779
+ char,
780
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
781
+ ]
782
+ }
783
+ );
784
+ }
785
+ function InputOTPSeparator({ ...props }) {
786
+ return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
787
+ }
788
+
789
+ const Form = FormProvider;
790
+ const FormFieldContext = React.createContext({});
791
+ const FormField = ({
792
+ ...props
793
+ }) => {
794
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
795
+ };
796
+ const useFormField = () => {
797
+ const fieldContext = React.useContext(FormFieldContext);
798
+ const itemContext = React.useContext(FormItemContext);
799
+ const { getFieldState } = useFormContext();
800
+ const formState = useFormState({ name: fieldContext.name });
801
+ const fieldState = getFieldState(fieldContext.name, formState);
802
+ if (!fieldContext) {
803
+ throw new Error("useFormField should be used within <FormField>");
804
+ }
805
+ const { id } = itemContext;
806
+ return {
807
+ id,
808
+ name: fieldContext.name,
809
+ formItemId: `${id}-form-item`,
810
+ formDescriptionId: `${id}-form-item-description`,
811
+ formMessageId: `${id}-form-item-message`,
812
+ ...fieldState
813
+ };
814
+ };
815
+ const FormItemContext = React.createContext({});
816
+ function FormItem({ className, ...props }) {
817
+ const id = React.useId();
818
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { "data-slot": "form-item", className: cn("grid gap-2", className), ...props }) });
819
+ }
820
+ function FormLabel({ className, ...props }) {
821
+ const { error, formItemId } = useFormField();
822
+ return /* @__PURE__ */ jsx(
823
+ Label,
824
+ {
825
+ "data-slot": "form-label",
826
+ "data-error": !!error,
827
+ className: cn("data-[error=true]:text-destructive", className),
828
+ htmlFor: formItemId,
829
+ ...props
830
+ }
831
+ );
832
+ }
833
+ function FormControl({ ...props }) {
834
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
835
+ return /* @__PURE__ */ jsx(
836
+ Slot,
837
+ {
838
+ "data-slot": "form-control",
839
+ id: formItemId,
840
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
841
+ "aria-invalid": !!error,
842
+ ...props
843
+ }
844
+ );
845
+ }
846
+ function FormDescription({ className, ...props }) {
847
+ const { formDescriptionId } = useFormField();
848
+ return /* @__PURE__ */ jsx(
849
+ "p",
850
+ {
851
+ "data-slot": "form-description",
852
+ id: formDescriptionId,
853
+ className: cn("text-muted-foreground text-sm", className),
854
+ ...props
855
+ }
856
+ );
857
+ }
858
+ function FormMessage({ className, ...props }) {
859
+ const { error, formMessageId } = useFormField();
860
+ const body = error ? String(error?.message ?? "") : props.children;
861
+ if (!body) {
862
+ return null;
863
+ }
864
+ return /* @__PURE__ */ jsx(
865
+ "p",
866
+ {
867
+ "data-slot": "form-message",
868
+ id: formMessageId,
869
+ className: cn("text-destructive text-sm", className),
870
+ ...props,
871
+ children: body
872
+ }
873
+ );
874
+ }
875
+
876
+ function Calendar({
877
+ className,
878
+ classNames,
879
+ showOutsideDays = true,
880
+ captionLayout = "label",
881
+ buttonVariant = "ghost",
882
+ formatters,
883
+ components,
884
+ ...props
885
+ }) {
886
+ const defaultClassNames = getDefaultClassNames();
887
+ const isDropdownCaption = captionLayout.startsWith("dropdown");
888
+ return /* @__PURE__ */ jsx(
889
+ DayPicker,
890
+ {
891
+ showOutsideDays,
892
+ className: cn(
893
+ "bg-background group/calendar p-4 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent font-sans",
894
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
895
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
896
+ className
897
+ ),
898
+ captionLayout,
899
+ formatters,
900
+ classNames: {
901
+ root: cn("w-fit", defaultClassNames.root),
902
+ months: cn("flex gap-6 flex-col md:flex-row relative", defaultClassNames.months),
903
+ month: cn("flex flex-col w-full gap-5", defaultClassNames.month),
904
+ nav: cn(
905
+ "flex items-center gap-2 w-full absolute top-0 inset-x-0 justify-between",
906
+ defaultClassNames.nav
907
+ ),
908
+ button_previous: cn(
909
+ buttonVariants({ variant: buttonVariant }),
910
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
911
+ defaultClassNames.button_previous
912
+ ),
913
+ button_next: cn(
914
+ buttonVariants({ variant: buttonVariant }),
915
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
916
+ defaultClassNames.button_next
917
+ ),
918
+ month_caption: cn(
919
+ "flex items-center justify-center w-full",
920
+ isDropdownCaption ? "h-auto px-0" : "h-(--cell-size) px-(--cell-size)",
921
+ defaultClassNames.month_caption
922
+ ),
923
+ dropdowns: cn(
924
+ "w-full flex items-center justify-center gap-2",
925
+ isDropdownCaption ? "h-auto" : "h-(--cell-size)",
926
+ defaultClassNames.dropdowns
927
+ ),
928
+ dropdown_root: cn(
929
+ isDropdownCaption ? "relative flex min-w-[7rem] items-center rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none focus-within:ring-2 focus-within:ring-primary focus-within:border-transparent data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50 px-2.5 py-1" : "relative rounded-[var(--radius)] hover:bg-accent transition-colors",
930
+ defaultClassNames.dropdown_root
931
+ ),
932
+ dropdown: cn(
933
+ isDropdownCaption ? "absolute inset-0 cursor-pointer opacity-0" : "absolute bg-popover inset-0 opacity-0 cursor-pointer",
934
+ defaultClassNames.dropdown
935
+ ),
936
+ caption_label: cn(
937
+ "select-none font-[family-name:var(--font-family,Roboto)] tracking-tight transition-all duration-200",
938
+ captionLayout === "label" ? "rounded-[var(--radius)] px-2 py-1 text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] hover:bg-accent hover:text-accent-foreground" : "flex h-full w-full items-center justify-between gap-2 rounded-[var(--radius)] text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] [&>svg]:text-muted-foreground [&>svg]:size-4",
939
+ defaultClassNames.caption_label
940
+ ),
941
+ table: "w-full border-collapse mt-1",
942
+ weekdays: cn("flex gap-1", defaultClassNames.weekdays),
943
+ weekday: cn(
944
+ "text-muted-foreground rounded-(--cell-radius) flex-1 select-none text-[length:var(--calendar-weekday-size)] font-[number:var(--font-weight-medium)] uppercase tracking-wider",
945
+ defaultClassNames.weekday
946
+ ),
947
+ week: cn("flex w-full gap-1", defaultClassNames.week),
948
+ week_number_header: cn("select-none w-(--cell-size)", defaultClassNames.week_number_header),
949
+ week_number: cn(
950
+ "select-none text-muted-foreground text-[length:var(--calendar-weekday-size)]",
951
+ defaultClassNames.week_number
952
+ ),
953
+ day: cn(
954
+ "relative w-full rounded-(--cell-radius) h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius) group/day aspect-square select-none",
955
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
956
+ defaultClassNames.day
957
+ ),
958
+ range_start: cn(
959
+ "rounded-l-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:right-0 -z-0 isolate",
960
+ defaultClassNames.range_start
961
+ ),
962
+ range_middle: cn("rounded-none bg-accent/30", defaultClassNames.range_middle),
963
+ range_end: cn(
964
+ "rounded-r-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:left-0 -z-0 isolate",
965
+ defaultClassNames.range_end
966
+ ),
967
+ today: cn(
968
+ "bg-accent/60 text-accent-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none font-[number:var(--font-weight-semibold)]",
969
+ defaultClassNames.today
970
+ ),
971
+ outside: cn(
972
+ "text-muted-foreground aria-selected:text-muted-foreground",
973
+ defaultClassNames.outside
974
+ ),
975
+ disabled: cn("text-muted-foreground/30 opacity-40", defaultClassNames.disabled),
976
+ hidden: cn("invisible", defaultClassNames.hidden),
977
+ ...classNames
978
+ },
979
+ components: {
980
+ Root: ({ className: className2, rootRef, ...props2 }) => {
981
+ return /* @__PURE__ */ jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className2), ...props2 });
982
+ },
983
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
984
+ if (orientation === "left") {
985
+ return /* @__PURE__ */ jsx(
986
+ ChevronLeft,
987
+ {
988
+ className: cn("size-5 transition-transform group-hover:scale-110", className2),
989
+ ...props2
990
+ }
991
+ );
992
+ }
993
+ if (orientation === "right") {
994
+ return /* @__PURE__ */ jsx(
995
+ ChevronRight,
996
+ {
997
+ className: cn("size-5 transition-transform group-hover:scale-110", className2),
998
+ ...props2
999
+ }
1000
+ );
1001
+ }
1002
+ return /* @__PURE__ */ jsx(ChevronDown, { className: cn("size-4", className2), ...props2 });
1003
+ },
1004
+ DayButton: CalendarDayButton,
1005
+ WeekNumber: ({ children, ...props2 }) => {
1006
+ return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center font-[number:var(--font-weight-medium)]", children }) });
1007
+ },
1008
+ ...components
1009
+ },
1010
+ ...props
1011
+ }
1012
+ );
1013
+ }
1014
+ function CalendarDayButton({
1015
+ className,
1016
+ day,
1017
+ modifiers,
1018
+ ...props
1019
+ }) {
1020
+ const defaultClassNames = getDefaultClassNames();
1021
+ const ref = React.useRef(null);
1022
+ React.useEffect(() => {
1023
+ if (modifiers.focused) ref.current?.focus();
1024
+ }, [modifiers.focused]);
1025
+ return /* @__PURE__ */ jsx(
1026
+ Button,
1027
+ {
1028
+ ref,
1029
+ variant: "ghost",
1030
+ size: "icon",
1031
+ "data-day": day.date.toLocaleDateString(),
1032
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1033
+ "data-range-start": modifiers.range_start,
1034
+ "data-range-end": modifiers.range_end,
1035
+ "data-range-middle": modifiers.range_middle,
1036
+ className: cn(
1037
+ "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col items-center justify-center gap-1 border-0 leading-none transition-all duration-200 cursor-pointer disabled:cursor-not-allowed",
1038
+ "text-[length:var(--calendar-day-size)] font-[number:var(--font-weight-regular)]",
1039
+ "hover:bg-accent/70 hover:text-accent-foreground hover:scale-105",
1040
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:font-[number:var(--font-weight-semibold)] data-[selected-single=true]:shadow-sm",
1041
+ "data-[range-middle=true]:bg-accent/50 data-[range-middle=true]:text-foreground",
1042
+ "data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:font-[number:var(--font-weight-semibold)] data-[range-start=true]:shadow-sm",
1043
+ "data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:font-[number:var(--font-weight-semibold)] data-[range-end=true]:shadow-sm",
1044
+ "group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:ring-2 group-data-[focused=true]/day:ring-offset-2 group-data-[focused=true]/day:ring-offset-background",
1045
+ "data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius)",
1046
+ "data-[range-middle=true]:rounded-none",
1047
+ "data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius)",
1048
+ "[&>span]:opacity-80",
1049
+ defaultClassNames.day,
1050
+ className
1051
+ ),
1052
+ ...props,
1053
+ children: day.date.getDate()
1054
+ }
1055
+ );
1056
+ }
1057
+
1058
+ function Sheet({ ...props }) {
1059
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
1060
+ }
1061
+ function SheetTrigger({ ...props }) {
1062
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
1063
+ }
1064
+ function SheetClose({ ...props }) {
1065
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "sheet-close", ...props });
1066
+ }
1067
+ function SheetPortal({ ...props }) {
1068
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
1069
+ }
1070
+ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1071
+ DialogPrimitive.Overlay,
1072
+ {
1073
+ className: cn(
1074
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1075
+ className
1076
+ ),
1077
+ ...props,
1078
+ ref
1079
+ }
1080
+ ));
1081
+ SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
1082
+ function SheetContent({
1083
+ className,
1084
+ children,
1085
+ side = "right",
1086
+ ...props
1087
+ }) {
1088
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
1089
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
1090
+ /* @__PURE__ */ jsxs(
1091
+ DialogPrimitive.Content,
1092
+ {
1093
+ "data-slot": "sheet-content",
1094
+ className: cn(
1095
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
1096
+ side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
1097
+ side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
1098
+ side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
1099
+ side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
1100
+ className
1101
+ ),
1102
+ ...props,
1103
+ children: [
1104
+ children,
1105
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
1106
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
1107
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1108
+ ] })
1109
+ ]
1110
+ }
1111
+ )
1112
+ ] });
1113
+ }
1114
+ function SheetHeader({ className, ...props }) {
1115
+ return /* @__PURE__ */ jsx(
1116
+ "div",
1117
+ {
1118
+ "data-slot": "sheet-header",
1119
+ className: cn("flex flex-col gap-1.5 px-6 pt-6", className),
1120
+ ...props
1121
+ }
1122
+ );
1123
+ }
1124
+ function SheetBody({ className, ...props }) {
1125
+ return /* @__PURE__ */ jsx("div", { "data-slot": "sheet-body", className: cn("flex-1 overflow-auto px-6", className), ...props });
1126
+ }
1127
+ function SheetFooter({ className, ...props }) {
1128
+ return /* @__PURE__ */ jsx(
1129
+ "div",
1130
+ {
1131
+ "data-slot": "sheet-footer",
1132
+ className: cn("mt-auto flex flex-col gap-2 px-6 pb-6", className),
1133
+ ...props
1134
+ }
1135
+ );
1136
+ }
1137
+ function SheetTitle({ className, ...props }) {
1138
+ return /* @__PURE__ */ jsx(
1139
+ DialogPrimitive.Title,
1140
+ {
1141
+ "data-slot": "sheet-title",
1142
+ className: cn("text-foreground font-semibold", className),
1143
+ ...props
1144
+ }
1145
+ );
1146
+ }
1147
+ function SheetDescription({
1148
+ className,
1149
+ ...props
1150
+ }) {
1151
+ return /* @__PURE__ */ jsx(
1152
+ DialogPrimitive.Description,
1153
+ {
1154
+ "data-slot": "sheet-description",
1155
+ className: cn("text-muted-foreground text-sm", className),
1156
+ ...props
1157
+ }
1158
+ );
1159
+ }
1160
+
1161
+ function Drawer({ ...props }) {
1162
+ return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
1163
+ }
1164
+ function DrawerTrigger({ ...props }) {
1165
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
1166
+ }
1167
+ function DrawerPortal({ ...props }) {
1168
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
1169
+ }
1170
+ function DrawerClose({ ...props }) {
1171
+ return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
1172
+ }
1173
+ const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => {
1174
+ return /* @__PURE__ */ jsx(
1175
+ Drawer$1.Overlay,
1176
+ {
1177
+ ref,
1178
+ "data-slot": "drawer-overlay",
1179
+ className: cn(
1180
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1181
+ className
1182
+ ),
1183
+ ...props
1184
+ }
1185
+ );
1186
+ });
1187
+ DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
1188
+ function DrawerContent({
1189
+ className,
1190
+ children,
1191
+ ...props
1192
+ }) {
1193
+ return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
1194
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
1195
+ /* @__PURE__ */ jsxs(
1196
+ Drawer$1.Content,
1197
+ {
1198
+ "data-slot": "drawer-content",
1199
+ className: cn(
1200
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
1201
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
1202
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
1203
+ "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
1204
+ "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
1205
+ className
1206
+ ),
1207
+ ...props,
1208
+ children: [
1209
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
1210
+ children
1211
+ ]
1212
+ }
1213
+ )
1214
+ ] });
1215
+ }
1216
+ function DrawerHeader({ className, ...props }) {
1217
+ return /* @__PURE__ */ jsx(
1218
+ "div",
1219
+ {
1220
+ "data-slot": "drawer-header",
1221
+ className: cn("flex flex-col gap-1.5 p-4", className),
1222
+ ...props
1223
+ }
1224
+ );
1225
+ }
1226
+ function DrawerFooter({ className, ...props }) {
1227
+ return /* @__PURE__ */ jsx(
1228
+ "div",
1229
+ {
1230
+ "data-slot": "drawer-footer",
1231
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
1232
+ ...props
1233
+ }
1234
+ );
1235
+ }
1236
+ function DrawerTitle({ className, ...props }) {
1237
+ return /* @__PURE__ */ jsx(
1238
+ Drawer$1.Title,
1239
+ {
1240
+ "data-slot": "drawer-title",
1241
+ className: cn("text-foreground font-semibold", className),
1242
+ ...props
1243
+ }
1244
+ );
1245
+ }
1246
+ function DrawerDescription({
1247
+ className,
1248
+ ...props
1249
+ }) {
1250
+ return /* @__PURE__ */ jsx(
1251
+ Drawer$1.Description,
1252
+ {
1253
+ "data-slot": "drawer-description",
1254
+ className: cn("text-muted-foreground text-sm", className),
1255
+ ...props
1256
+ }
1257
+ );
1258
+ }
1259
+ function DrawerHandle({ className, ...props }) {
1260
+ return /* @__PURE__ */ jsx(
1261
+ "div",
1262
+ {
1263
+ "data-slot": "drawer-handle",
1264
+ className: cn("bg-muted mx-auto mt-4 h-2 w-[100px] shrink-0 rounded-full", className),
1265
+ ...props
1266
+ }
1267
+ );
1268
+ }
1269
+
1270
+ function HoverCard({ ...props }) {
1271
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
1272
+ }
1273
+ function HoverCardTrigger({ ...props }) {
1274
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
1275
+ }
1276
+ function HoverCardContent({
1277
+ className,
1278
+ align = "center",
1279
+ sideOffset = 4,
1280
+ ...props
1281
+ }) {
1282
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
1283
+ HoverCardPrimitive.Content,
1284
+ {
1285
+ "data-slot": "hover-card-content",
1286
+ align,
1287
+ sideOffset,
1288
+ className: cn(
1289
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
1290
+ className
1291
+ ),
1292
+ ...props
1293
+ }
1294
+ ) });
1295
+ }
1296
+
1297
+ function ContextMenu({ ...props }) {
1298
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
1299
+ }
1300
+ function ContextMenuTrigger({
1301
+ ...props
1302
+ }) {
1303
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
1304
+ }
1305
+ function ContextMenuGroup({ ...props }) {
1306
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
1307
+ }
1308
+ function ContextMenuPortal({ ...props }) {
1309
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
1310
+ }
1311
+ function ContextMenuSub({ ...props }) {
1312
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
1313
+ }
1314
+ function ContextMenuRadioGroup({
1315
+ ...props
1316
+ }) {
1317
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.RadioGroup, { "data-slot": "context-menu-radio-group", ...props });
1318
+ }
1319
+ function ContextMenuSubTrigger({
1320
+ className,
1321
+ inset,
1322
+ children,
1323
+ ...props
1324
+ }) {
1325
+ return /* @__PURE__ */ jsxs(
1326
+ ContextMenuPrimitive.SubTrigger,
1327
+ {
1328
+ "data-slot": "context-menu-sub-trigger",
1329
+ "data-inset": inset,
1330
+ className: cn(
1331
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1332
+ className
1333
+ ),
1334
+ ...props,
1335
+ children: [
1336
+ children,
1337
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
1338
+ ]
1339
+ }
1340
+ );
1341
+ }
1342
+ function ContextMenuSubContent({
1343
+ className,
1344
+ ...props
1345
+ }) {
1346
+ return /* @__PURE__ */ jsx(
1347
+ ContextMenuPrimitive.SubContent,
1348
+ {
1349
+ "data-slot": "context-menu-sub-content",
1350
+ className: cn(
1351
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
1352
+ className
1353
+ ),
1354
+ ...props
1355
+ }
1356
+ );
1357
+ }
1358
+ function ContextMenuContent({
1359
+ className,
1360
+ ...props
1361
+ }) {
1362
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1363
+ ContextMenuPrimitive.Content,
1364
+ {
1365
+ "data-slot": "context-menu-content",
1366
+ className: cn(
1367
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
1368
+ className
1369
+ ),
1370
+ ...props
1371
+ }
1372
+ ) });
1373
+ }
1374
+ function ContextMenuItem({
1375
+ className,
1376
+ inset,
1377
+ variant = "default",
1378
+ ...props
1379
+ }) {
1380
+ return /* @__PURE__ */ jsx(
1381
+ ContextMenuPrimitive.Item,
1382
+ {
1383
+ "data-slot": "context-menu-item",
1384
+ "data-inset": inset,
1385
+ "data-variant": variant,
1386
+ className: cn(
1387
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1388
+ className
1389
+ ),
1390
+ ...props
1391
+ }
1392
+ );
1393
+ }
1394
+ function ContextMenuCheckboxItem({
1395
+ className,
1396
+ children,
1397
+ checked,
1398
+ ...props
1399
+ }) {
1400
+ return /* @__PURE__ */ jsxs(
1401
+ ContextMenuPrimitive.CheckboxItem,
1402
+ {
1403
+ "data-slot": "context-menu-checkbox-item",
1404
+ className: cn(
1405
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1406
+ className
1407
+ ),
1408
+ checked,
1409
+ ...props,
1410
+ children: [
1411
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
1412
+ children
1413
+ ]
1414
+ }
1415
+ );
1416
+ }
1417
+ function ContextMenuRadioItem({
1418
+ className,
1419
+ children,
1420
+ ...props
1421
+ }) {
1422
+ return /* @__PURE__ */ jsxs(
1423
+ ContextMenuPrimitive.RadioItem,
1424
+ {
1425
+ "data-slot": "context-menu-radio-item",
1426
+ className: cn(
1427
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1428
+ className
1429
+ ),
1430
+ ...props,
1431
+ children: [
1432
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
1433
+ children
1434
+ ]
1435
+ }
1436
+ );
1437
+ }
1438
+ function ContextMenuLabel({
1439
+ className,
1440
+ inset,
1441
+ ...props
1442
+ }) {
1443
+ return /* @__PURE__ */ jsx(
1444
+ ContextMenuPrimitive.Label,
1445
+ {
1446
+ "data-slot": "context-menu-label",
1447
+ "data-inset": inset,
1448
+ className: cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
1449
+ ...props
1450
+ }
1451
+ );
1452
+ }
1453
+ function ContextMenuSeparator({
1454
+ className,
1455
+ ...props
1456
+ }) {
1457
+ return /* @__PURE__ */ jsx(
1458
+ ContextMenuPrimitive.Separator,
1459
+ {
1460
+ "data-slot": "context-menu-separator",
1461
+ className: cn("bg-border -mx-1 my-1 h-px", className),
1462
+ ...props
1463
+ }
1464
+ );
1465
+ }
1466
+ function ContextMenuShortcut({ className, ...props }) {
1467
+ return /* @__PURE__ */ jsx(
1468
+ "span",
1469
+ {
1470
+ "data-slot": "context-menu-shortcut",
1471
+ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1472
+ ...props
1473
+ }
1474
+ );
1475
+ }
1476
+
1477
+ function Menubar({ className, ...props }) {
1478
+ return /* @__PURE__ */ jsx(
1479
+ MenubarPrimitive.Root,
1480
+ {
1481
+ "data-slot": "menubar",
1482
+ className: cn(
1483
+ "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
1484
+ className
1485
+ ),
1486
+ ...props
1487
+ }
1488
+ );
1489
+ }
1490
+ function MenubarMenu({ ...props }) {
1491
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
1492
+ }
1493
+ function MenubarGroup({ ...props }) {
1494
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
1495
+ }
1496
+ function MenubarPortal({ ...props }) {
1497
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
1498
+ }
1499
+ function MenubarRadioGroup({ ...props }) {
1500
+ return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
1501
+ }
1502
+ function MenubarTrigger({
1503
+ className,
1504
+ ...props
1505
+ }) {
1506
+ return /* @__PURE__ */ jsx(
1507
+ MenubarPrimitive.Trigger,
1508
+ {
1509
+ "data-slot": "menubar-trigger",
1510
+ className: cn(
1511
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
1512
+ className
1513
+ ),
1514
+ ...props
1515
+ }
1516
+ );
1517
+ }
1518
+ function MenubarContent({
1519
+ className,
1520
+ align = "start",
1521
+ alignOffset = -4,
1522
+ sideOffset = 8,
1523
+ ...props
1524
+ }) {
1525
+ return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
1526
+ MenubarPrimitive.Content,
1527
+ {
1528
+ "data-slot": "menubar-content",
1529
+ align,
1530
+ alignOffset,
1531
+ sideOffset,
1532
+ className: cn(
1533
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
1534
+ className
1535
+ ),
1536
+ ...props
1537
+ }
1538
+ ) });
1539
+ }
1540
+ function MenubarItem({
1541
+ className,
1542
+ inset,
1543
+ variant = "default",
1544
+ ...props
1545
+ }) {
1546
+ return /* @__PURE__ */ jsx(
1547
+ MenubarPrimitive.Item,
1548
+ {
1549
+ "data-slot": "menubar-item",
1550
+ "data-inset": inset,
1551
+ "data-variant": variant,
1552
+ className: cn(
1553
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1554
+ className
1555
+ ),
1556
+ ...props
1557
+ }
1558
+ );
1559
+ }
1560
+ function MenubarCheckboxItem({
1561
+ className,
1562
+ children,
1563
+ checked,
1564
+ ...props
1565
+ }) {
1566
+ return /* @__PURE__ */ jsxs(
1567
+ MenubarPrimitive.CheckboxItem,
1568
+ {
1569
+ "data-slot": "menubar-checkbox-item",
1570
+ className: cn(
1571
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1572
+ className
1573
+ ),
1574
+ checked,
1575
+ ...props,
1576
+ children: [
1577
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
1578
+ children
1579
+ ]
1580
+ }
1581
+ );
1582
+ }
1583
+ function MenubarRadioItem({
1584
+ className,
1585
+ children,
1586
+ ...props
1587
+ }) {
1588
+ return /* @__PURE__ */ jsxs(
1589
+ MenubarPrimitive.RadioItem,
1590
+ {
1591
+ "data-slot": "menubar-radio-item",
1592
+ className: cn(
1593
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1594
+ className
1595
+ ),
1596
+ ...props,
1597
+ children: [
1598
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
1599
+ children
1600
+ ]
1601
+ }
1602
+ );
1603
+ }
1604
+ function MenubarLabel({
1605
+ className,
1606
+ inset,
1607
+ ...props
1608
+ }) {
1609
+ return /* @__PURE__ */ jsx(
1610
+ MenubarPrimitive.Label,
1611
+ {
1612
+ "data-slot": "menubar-label",
1613
+ "data-inset": inset,
1614
+ className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
1615
+ ...props
1616
+ }
1617
+ );
1618
+ }
1619
+ function MenubarSeparator({
1620
+ className,
1621
+ ...props
1622
+ }) {
1623
+ return /* @__PURE__ */ jsx(
1624
+ MenubarPrimitive.Separator,
1625
+ {
1626
+ "data-slot": "menubar-separator",
1627
+ className: cn("bg-border -mx-1 my-1 h-px", className),
1628
+ ...props
1629
+ }
1630
+ );
1631
+ }
1632
+ function MenubarShortcut({ className, ...props }) {
1633
+ return /* @__PURE__ */ jsx(
1634
+ "span",
1635
+ {
1636
+ "data-slot": "menubar-shortcut",
1637
+ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1638
+ ...props
1639
+ }
1640
+ );
1641
+ }
1642
+ function MenubarSub({ ...props }) {
1643
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
1644
+ }
1645
+ function MenubarSubTrigger({
1646
+ className,
1647
+ inset,
1648
+ children,
1649
+ ...props
1650
+ }) {
1651
+ return /* @__PURE__ */ jsxs(
1652
+ MenubarPrimitive.SubTrigger,
1653
+ {
1654
+ "data-slot": "menubar-sub-trigger",
1655
+ "data-inset": inset,
1656
+ className: cn(
1657
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
1658
+ className
1659
+ ),
1660
+ ...props,
1661
+ children: [
1662
+ children,
1663
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
1664
+ ]
1665
+ }
1666
+ );
1667
+ }
1668
+ function MenubarSubContent({
1669
+ className,
1670
+ ...props
1671
+ }) {
1672
+ return /* @__PURE__ */ jsx(
1673
+ MenubarPrimitive.SubContent,
1674
+ {
1675
+ "data-slot": "menubar-sub-content",
1676
+ className: cn(
1677
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
1678
+ className
1679
+ ),
1680
+ ...props
1681
+ }
1682
+ );
1683
+ }
1684
+
1685
+ function Command({ className, ...props }) {
1686
+ return /* @__PURE__ */ jsx(
1687
+ Command$1,
1688
+ {
1689
+ "data-slot": "command",
1690
+ className: cn(
1691
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
1692
+ className
1693
+ ),
1694
+ ...props
1695
+ }
1696
+ );
1697
+ }
1698
+ function CommandDialog({
1699
+ title = "Command Palette",
1700
+ description = "Search for a command to run...",
1701
+ children,
1702
+ ...props
1703
+ }) {
1704
+ return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
1705
+ /* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
1706
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
1707
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
1708
+ ] }),
1709
+ /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) })
1710
+ ] });
1711
+ }
1712
+ function CommandInput({
1713
+ className,
1714
+ ...props
1715
+ }) {
1716
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [
1717
+ /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
1718
+ /* @__PURE__ */ jsx(
1719
+ Command$1.Input,
1720
+ {
1721
+ "data-slot": "command-input",
1722
+ className: cn(
1723
+ "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
1724
+ className
1725
+ ),
1726
+ ...props
1727
+ }
1728
+ )
1729
+ ] });
1730
+ }
1731
+ function CommandList({ className, ...props }) {
1732
+ return /* @__PURE__ */ jsx(
1733
+ Command$1.List,
1734
+ {
1735
+ "data-slot": "command-list",
1736
+ role: "listbox",
1737
+ className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
1738
+ ...props
1739
+ }
1740
+ );
1741
+ }
1742
+ function CommandEmpty({ ...props }) {
1743
+ return /* @__PURE__ */ jsx(
1744
+ Command$1.Empty,
1745
+ {
1746
+ "data-slot": "command-empty",
1747
+ className: "py-6 text-center text-sm",
1748
+ ...props
1749
+ }
1750
+ );
1751
+ }
1752
+ function CommandGroup({
1753
+ className,
1754
+ ...props
1755
+ }) {
1756
+ return /* @__PURE__ */ jsx(
1757
+ Command$1.Group,
1758
+ {
1759
+ "data-slot": "command-group",
1760
+ className: cn(
1761
+ "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
1762
+ className
1763
+ ),
1764
+ ...props
1765
+ }
1766
+ );
1767
+ }
1768
+ function CommandSeparator({
1769
+ className,
1770
+ ...props
1771
+ }) {
1772
+ return /* @__PURE__ */ jsx(
1773
+ Command$1.Separator,
1774
+ {
1775
+ "data-slot": "command-separator",
1776
+ className: cn("bg-border -mx-1 h-px", className),
1777
+ ...props
1778
+ }
1779
+ );
1780
+ }
1781
+ function CommandItem({ className, ...props }) {
1782
+ return /* @__PURE__ */ jsx(
1783
+ Command$1.Item,
1784
+ {
1785
+ "data-slot": "command-item",
1786
+ role: "option",
1787
+ className: cn(
1788
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1789
+ className
1790
+ ),
1791
+ ...props
1792
+ }
1793
+ );
1794
+ }
1795
+ function CommandShortcut({ className, ...props }) {
1796
+ return /* @__PURE__ */ jsx(
1797
+ "span",
1798
+ {
1799
+ "data-slot": "command-shortcut",
1800
+ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1801
+ ...props
1802
+ }
1803
+ );
1804
+ }
1805
+
1806
+ const variantStyles = {
1807
+ default: "bg-primary text-primary-foreground",
1808
+ secondary: "bg-secondary text-secondary-foreground",
1809
+ destructive: "bg-destructive text-destructive-foreground",
1810
+ outline: "border-2 border-primary bg-background text-primary",
1811
+ success: "bg-success text-success-foreground",
1812
+ info: "bg-info text-info-foreground",
1813
+ warning: "bg-warning text-warning-foreground"
1814
+ };
1815
+ const NotificationBadge = React.forwardRef(
1816
+ ({
1817
+ className,
1818
+ count = 0,
1819
+ max = 99,
1820
+ showZero = false,
1821
+ dot = false,
1822
+ variant = "destructive",
1823
+ children,
1824
+ ...props
1825
+ }, ref) => {
1826
+ const displayCount = count > max ? `${max}+` : count;
1827
+ const shouldShow = count > 0 || showZero;
1828
+ if (!shouldShow && !dot) {
1829
+ return /* @__PURE__ */ jsx("div", { ref, className, ...props, children });
1830
+ }
1831
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("relative inline-block", className), ...props, children: [
1832
+ children,
1833
+ /* @__PURE__ */ jsx(
1834
+ "span",
1835
+ {
1836
+ className: cn(
1837
+ "absolute -right-1 -top-1 flex items-center justify-center rounded-full",
1838
+ variantStyles[variant],
1839
+ dot ? "h-2 w-2" : "min-w-[1.25rem] h-5 px-1.5"
1840
+ ),
1841
+ children: !dot && shouldShow && /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-none", children: displayCount })
1842
+ }
1843
+ )
1844
+ ] });
1845
+ }
1846
+ );
1847
+ NotificationBadge.displayName = "NotificationBadge";
1848
+
1849
+ const StatsCard = React.forwardRef(
1850
+ ({ className, title, value, description, trend, icon, ...props }, ref) => {
1851
+ const getTrendIcon = () => {
1852
+ if (!trend) return null;
1853
+ if (trend.value > 0) {
1854
+ return /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-success" });
1855
+ } else if (trend.value < 0) {
1856
+ return /* @__PURE__ */ jsx(TrendingDown, { className: "h-4 w-4 text-destructive" });
1857
+ } else {
1858
+ return /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4 text-muted-foreground" });
1859
+ }
1860
+ };
1861
+ const getTrendColor = () => {
1862
+ if (!trend) return "";
1863
+ if (trend.value > 0) {
1864
+ return "text-success";
1865
+ } else if (trend.value < 0) {
1866
+ return "text-destructive";
1867
+ } else {
1868
+ return "text-muted-foreground";
1869
+ }
1870
+ };
1871
+ return /* @__PURE__ */ jsx(Card, { ref, className: cn("", className), ...props, children: /* @__PURE__ */ jsx(CardContent, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
1872
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
1873
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-1 text-sm", children: title }),
1874
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
1875
+ /* @__PURE__ */ jsx("h3", { className: "text-foreground text-xl sm:text-2xl", children: value }),
1876
+ trend && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1 text-sm", getTrendColor()), children: [
1877
+ getTrendIcon(),
1878
+ /* @__PURE__ */ jsxs("span", { children: [
1879
+ Math.abs(trend.value),
1880
+ "%"
1881
+ ] })
1882
+ ] })
1883
+ ] }),
1884
+ (description || trend?.label) && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1 text-xs sm:text-sm", children: trend?.label || description })
1885
+ ] }),
1886
+ icon && /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius)] bg-muted p-2 sm:p-3 text-muted-foreground flex-shrink-0", children: icon })
1887
+ ] }) }) });
1888
+ }
1889
+ );
1890
+ StatsCard.displayName = "StatsCard";
1891
+
1892
+ function StatsCardSkeleton({
1893
+ showIcon = true,
1894
+ showTrend = true,
1895
+ className,
1896
+ ...props
1897
+ }) {
1898
+ return /* @__PURE__ */ jsx(Card, { className: cn("", className), ...props, children: /* @__PURE__ */ jsx(CardContent, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
1899
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
1900
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-28 mb-2" }),
1901
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
1902
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-24" }),
1903
+ showTrend && /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-14 rounded-full" })
1904
+ ] }),
1905
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-32 mt-2" })
1906
+ ] }),
1907
+ showIcon && /* @__PURE__ */ jsx(Skeleton, { className: "size-9 sm:size-11 rounded-[var(--radius)] shrink-0" })
1908
+ ] }) }) });
1909
+ }
1910
+ StatsCardSkeleton.displayName = "StatsCardSkeleton";
1911
+
1912
+ const Timeline = React.forwardRef(
1913
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("ol", { ref, className: cn("relative border-l border-border", className), ...props })
1914
+ );
1915
+ Timeline.displayName = "Timeline";
1916
+ const TimelineItem = React.forwardRef(
1917
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("mb-10 ml-6", className), ...props })
1918
+ );
1919
+ TimelineItem.displayName = "TimelineItem";
1920
+ const TimelineDot = React.forwardRef(({ className, variant = "default", icon, children, ...props }, ref) => {
1921
+ const variantStyles = {
1922
+ default: "bg-muted border-border",
1923
+ primary: "bg-primary border-primary",
1924
+ success: "bg-success border-success",
1925
+ info: "bg-info border-info",
1926
+ warning: "bg-warning border-warning",
1927
+ destructive: "bg-destructive border-destructive",
1928
+ outline: "bg-background border-border"
1929
+ };
1930
+ const iconColorStyles = {
1931
+ default: "text-muted-foreground",
1932
+ primary: "text-primary-foreground",
1933
+ success: "text-success-foreground",
1934
+ info: "text-info-foreground",
1935
+ warning: "text-warning-foreground",
1936
+ destructive: "text-destructive-foreground",
1937
+ outline: "text-foreground"
1938
+ };
1939
+ if (icon || children) {
1940
+ return /* @__PURE__ */ jsx(
1941
+ "div",
1942
+ {
1943
+ ref,
1944
+ className: cn(
1945
+ "absolute -left-[17px] mt-0.5 h-8 w-8 rounded-full border-2 flex items-center justify-center",
1946
+ variantStyles[variant],
1947
+ className
1948
+ ),
1949
+ ...props,
1950
+ children: /* @__PURE__ */ jsx("span", { className: cn("h-4 w-4", iconColorStyles[variant]), children: icon || children })
1951
+ }
1952
+ );
1953
+ }
1954
+ return /* @__PURE__ */ jsx(
1955
+ "div",
1956
+ {
1957
+ ref,
1958
+ className: cn(
1959
+ "absolute -left-[9px] mt-1.5 h-4 w-4 rounded-full border-2",
1960
+ variantStyles[variant],
1961
+ className
1962
+ ),
1963
+ ...props
1964
+ }
1965
+ );
1966
+ });
1967
+ TimelineDot.displayName = "TimelineDot";
1968
+ const TimelineContent = React.forwardRef(
1969
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props })
1970
+ );
1971
+ TimelineContent.displayName = "TimelineContent";
1972
+ const TimelineHeading = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("mb-1 text-foreground", className), ...props }));
1973
+ TimelineHeading.displayName = "TimelineHeading";
1974
+ const TimelineTime = React.forwardRef(
1975
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("time", { ref, className: cn("mb-2 block text-muted-foreground", className), ...props })
1976
+ );
1977
+ TimelineTime.displayName = "TimelineTime";
1978
+ const TimelineDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-muted-foreground", className), ...props }));
1979
+ TimelineDescription.displayName = "TimelineDescription";
1980
+
1981
+ function useTreeView({
1982
+ data,
1983
+ defaultExpanded = [],
1984
+ selectedNodeId,
1985
+ onNodeClick,
1986
+ onNodeSelect
1987
+ }) {
1988
+ const [expanded, setExpanded] = useState(new Set(defaultExpanded));
1989
+ const [internalSelectedId, setInternalSelectedId] = useState(void 0);
1990
+ const nodeRefs = useRef(/* @__PURE__ */ new Map());
1991
+ const isControlled = selectedNodeId !== void 0;
1992
+ const effectiveSelectedId = isControlled ? selectedNodeId : internalSelectedId;
1993
+ const getNodeRef = useCallback(
1994
+ (nodeId) => (el) => {
1995
+ if (el) nodeRefs.current.set(nodeId, el);
1996
+ else nodeRefs.current.delete(nodeId);
1997
+ },
1998
+ []
1999
+ );
2000
+ const getVisibleNodes = useCallback(() => {
2001
+ const result = [];
2002
+ const traverse = (nodes) => {
2003
+ for (const node of nodes) {
2004
+ result.push(node);
2005
+ if (node.children?.length && expanded.has(node.id)) traverse(node.children);
2006
+ }
2007
+ };
2008
+ traverse(data);
2009
+ return result;
2010
+ }, [data, expanded]);
2011
+ const findParent = useCallback(
2012
+ (nodes, targetId) => {
2013
+ for (const n of nodes) {
2014
+ if (n.children?.some((c) => c.id === targetId)) return n;
2015
+ if (n.children) {
2016
+ const found = findParent(n.children, targetId);
2017
+ if (found) return found;
2018
+ }
2019
+ }
2020
+ return null;
2021
+ },
2022
+ // findParent is a pure recursive function over `data` — no reactive deps needed
2023
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2024
+ []
2025
+ );
2026
+ const toggleExpand = useCallback((nodeId) => {
2027
+ setExpanded((prev) => {
2028
+ const next = new Set(prev);
2029
+ next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
2030
+ return next;
2031
+ });
2032
+ }, []);
2033
+ const handleSelect = useCallback(
2034
+ (node) => {
2035
+ if (!isControlled) setInternalSelectedId(node.id);
2036
+ onNodeSelect?.(node);
2037
+ onNodeClick?.(node);
2038
+ },
2039
+ [isControlled, onNodeClick, onNodeSelect]
2040
+ );
2041
+ const handleKeyDown = useCallback(
2042
+ (e, node) => {
2043
+ const visibleNodes = getVisibleNodes();
2044
+ const idx = visibleNodes.findIndex((n) => n.id === node.id);
2045
+ const hasChildren = !!node.children?.length;
2046
+ const isExpanded = expanded.has(node.id);
2047
+ const focusNode = (id) => {
2048
+ nodeRefs.current.get(id)?.focus();
2049
+ };
2050
+ switch (e.key) {
2051
+ case "ArrowDown": {
2052
+ e.preventDefault();
2053
+ const next = visibleNodes[idx + 1];
2054
+ if (next) focusNode(next.id);
2055
+ break;
2056
+ }
2057
+ case "ArrowUp": {
2058
+ e.preventDefault();
2059
+ const prev = visibleNodes[idx - 1];
2060
+ if (prev) focusNode(prev.id);
2061
+ break;
2062
+ }
2063
+ case "ArrowRight": {
2064
+ e.preventDefault();
2065
+ if (hasChildren && !isExpanded) {
2066
+ toggleExpand(node.id);
2067
+ } else if (hasChildren && isExpanded && node.children?.length) {
2068
+ focusNode(node.children[0].id);
2069
+ }
2070
+ break;
2071
+ }
2072
+ case "ArrowLeft": {
2073
+ e.preventDefault();
2074
+ if (hasChildren && isExpanded) {
2075
+ toggleExpand(node.id);
2076
+ } else {
2077
+ const parent = findParent(data, node.id);
2078
+ if (parent) focusNode(parent.id);
2079
+ }
2080
+ break;
2081
+ }
2082
+ case "Home": {
2083
+ e.preventDefault();
2084
+ if (visibleNodes.length > 0) focusNode(visibleNodes[0].id);
2085
+ break;
2086
+ }
2087
+ case "End": {
2088
+ e.preventDefault();
2089
+ const last = visibleNodes[visibleNodes.length - 1];
2090
+ if (last) focusNode(last.id);
2091
+ break;
2092
+ }
2093
+ case " ": {
2094
+ e.preventDefault();
2095
+ if (hasChildren) {
2096
+ toggleExpand(node.id);
2097
+ } else {
2098
+ handleSelect(node);
2099
+ }
2100
+ break;
2101
+ }
2102
+ case "Enter": {
2103
+ e.preventDefault();
2104
+ if (hasChildren) toggleExpand(node.id);
2105
+ handleSelect(node);
2106
+ break;
2107
+ }
2108
+ }
2109
+ },
2110
+ [data, expanded, findParent, getVisibleNodes, handleSelect, toggleExpand]
2111
+ );
2112
+ return {
2113
+ expanded,
2114
+ effectiveSelectedId,
2115
+ nodeRefs,
2116
+ getNodeRef,
2117
+ toggleExpand,
2118
+ handleSelect,
2119
+ handleKeyDown,
2120
+ getVisibleNodes
2121
+ };
2122
+ }
2123
+
2124
+ const TreeView = React.forwardRef(
2125
+ ({
2126
+ className,
2127
+ data,
2128
+ onNodeClick,
2129
+ onNodeSelect,
2130
+ defaultExpanded = [],
2131
+ selectedNodeId,
2132
+ ariaLabel,
2133
+ ...props
2134
+ }, ref) => {
2135
+ const { expanded, effectiveSelectedId, getNodeRef, toggleExpand, handleSelect, handleKeyDown } = useTreeView({ data, defaultExpanded, selectedNodeId, onNodeClick, onNodeSelect });
2136
+ const focusableId = effectiveSelectedId ?? data[0]?.id;
2137
+ return /* @__PURE__ */ jsx(
2138
+ "div",
2139
+ {
2140
+ ref,
2141
+ className: cn("w-full", className),
2142
+ role: "tree",
2143
+ "aria-label": ariaLabel ?? "Navegação em árvore",
2144
+ ...props,
2145
+ children: data.map((node) => /* @__PURE__ */ jsx(
2146
+ TreeNodeComponent,
2147
+ {
2148
+ node,
2149
+ level: 0,
2150
+ expanded,
2151
+ selectedId: effectiveSelectedId,
2152
+ focusableId,
2153
+ onToggle: toggleExpand,
2154
+ onSelect: handleSelect,
2155
+ onKeyDown: handleKeyDown,
2156
+ getNodeRef
2157
+ },
2158
+ node.id
2159
+ ))
2160
+ }
2161
+ );
2162
+ }
2163
+ );
2164
+ TreeView.displayName = "TreeView";
2165
+ const TreeNodeComponent = ({
2166
+ node,
2167
+ level,
2168
+ expanded,
2169
+ selectedId,
2170
+ focusableId,
2171
+ onToggle,
2172
+ onSelect,
2173
+ onKeyDown,
2174
+ getNodeRef
2175
+ }) => {
2176
+ const hasChildren = !!node.children?.length;
2177
+ const isExpanded = expanded.has(node.id);
2178
+ const isSelected = node.id === selectedId;
2179
+ const handleClick = () => {
2180
+ if (hasChildren) onToggle(node.id);
2181
+ onSelect(node);
2182
+ };
2183
+ return /* @__PURE__ */ jsxs("div", { role: "none", children: [
2184
+ /* @__PURE__ */ jsxs(
2185
+ "button",
2186
+ {
2187
+ ref: getNodeRef(node.id),
2188
+ role: "treeitem",
2189
+ "aria-expanded": hasChildren ? isExpanded : void 0,
2190
+ "aria-selected": isSelected,
2191
+ tabIndex: node.id === focusableId ? 0 : -1,
2192
+ onClick: handleClick,
2193
+ onKeyDown: (e) => onKeyDown(e, node),
2194
+ className: cn(
2195
+ "flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors",
2196
+ "hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
2197
+ isSelected && "bg-primary/10 text-primary font-medium"
2198
+ ),
2199
+ style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
2200
+ children: [
2201
+ hasChildren ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsx("span", { className: "w-4 flex-shrink-0", "aria-hidden": "true" }),
2202
+ node.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
2203
+ /* @__PURE__ */ jsx("span", { className: "flex-1 text-foreground", children: node.label })
2204
+ ]
2205
+ }
2206
+ ),
2207
+ hasChildren && isExpanded && /* @__PURE__ */ jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsx(
2208
+ TreeNodeComponent,
2209
+ {
2210
+ node: child,
2211
+ level: level + 1,
2212
+ expanded,
2213
+ selectedId,
2214
+ focusableId,
2215
+ onToggle,
2216
+ onSelect,
2217
+ onKeyDown,
2218
+ getNodeRef
2219
+ },
2220
+ child.id
2221
+ )) })
2222
+ ] });
2223
+ };
2224
+
2225
+ function Collapsible({ ...props }) {
2226
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
2227
+ }
2228
+ function CollapsibleTrigger({
2229
+ ...props
2230
+ }) {
2231
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
2232
+ }
2233
+ function CollapsibleContent({
2234
+ ...props
2235
+ }) {
2236
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
2237
+ }
2238
+
2239
+ function Accordion({ ...props }) {
2240
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
2241
+ }
2242
+ function AccordionItem({
2243
+ className,
2244
+ ...props
2245
+ }) {
2246
+ return /* @__PURE__ */ jsx(
2247
+ AccordionPrimitive.Item,
2248
+ {
2249
+ "data-slot": "accordion-item",
2250
+ className: cn("border-b last:border-b-0", className),
2251
+ ...props
2252
+ }
2253
+ );
2254
+ }
2255
+ function AccordionTrigger({
2256
+ className,
2257
+ children,
2258
+ ...props
2259
+ }) {
2260
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
2261
+ AccordionPrimitive.Trigger,
2262
+ {
2263
+ "data-slot": "accordion-trigger",
2264
+ className: cn(
2265
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
2266
+ className
2267
+ ),
2268
+ ...props,
2269
+ children: [
2270
+ children,
2271
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
2272
+ ]
2273
+ }
2274
+ ) });
2275
+ }
2276
+ function AccordionContent({
2277
+ className,
2278
+ children,
2279
+ ...props
2280
+ }) {
2281
+ return /* @__PURE__ */ jsx(
2282
+ AccordionPrimitive.Content,
2283
+ {
2284
+ "data-slot": "accordion-content",
2285
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
2286
+ ...props,
2287
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
2288
+ }
2289
+ );
2290
+ }
2291
+
2292
+ const CarouselContext = React.createContext(null);
2293
+ function useCarousel() {
2294
+ const context = React.useContext(CarouselContext);
2295
+ if (!context) {
2296
+ throw new Error("useCarousel must be used within a <Carousel />");
2297
+ }
2298
+ return context;
2299
+ }
2300
+ function Carousel({
2301
+ orientation = "horizontal",
2302
+ opts,
2303
+ setApi,
2304
+ plugins,
2305
+ className,
2306
+ children,
2307
+ ...props
2308
+ }) {
2309
+ const [carouselRef, api] = useEmblaCarousel(
2310
+ {
2311
+ ...opts,
2312
+ axis: orientation === "horizontal" ? "x" : "y"
2313
+ },
2314
+ plugins
2315
+ );
2316
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
2317
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
2318
+ const onSelect = React.useCallback((api2) => {
2319
+ if (!api2) return;
2320
+ setCanScrollPrev(api2.canScrollPrev());
2321
+ setCanScrollNext(api2.canScrollNext());
2322
+ }, []);
2323
+ const scrollPrev = React.useCallback(() => {
2324
+ api?.scrollPrev();
2325
+ }, [api]);
2326
+ const scrollNext = React.useCallback(() => {
2327
+ api?.scrollNext();
2328
+ }, [api]);
2329
+ const handleKeyDown = React.useCallback(
2330
+ (event) => {
2331
+ if (event.key === "ArrowLeft") {
2332
+ event.preventDefault();
2333
+ scrollPrev();
2334
+ } else if (event.key === "ArrowRight") {
2335
+ event.preventDefault();
2336
+ scrollNext();
2337
+ }
2338
+ },
2339
+ [scrollPrev, scrollNext]
2340
+ );
2341
+ React.useEffect(() => {
2342
+ if (!api || !setApi) return;
2343
+ setApi(api);
2344
+ }, [api, setApi]);
2345
+ React.useEffect(() => {
2346
+ if (!api) return;
2347
+ onSelect(api);
2348
+ api.on("reInit", onSelect);
2349
+ api.on("select", onSelect);
2350
+ return () => {
2351
+ api?.off("select", onSelect);
2352
+ };
2353
+ }, [api, onSelect]);
2354
+ return /* @__PURE__ */ jsx(
2355
+ CarouselContext.Provider,
2356
+ {
2357
+ value: {
2358
+ carouselRef,
2359
+ api,
2360
+ opts,
2361
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
2362
+ scrollPrev,
2363
+ scrollNext,
2364
+ canScrollPrev,
2365
+ canScrollNext
2366
+ },
2367
+ children: /* @__PURE__ */ jsx(
2368
+ "div",
2369
+ {
2370
+ onKeyDownCapture: handleKeyDown,
2371
+ className: cn("relative", className),
2372
+ role: "region",
2373
+ "aria-roledescription": "carousel",
2374
+ "data-slot": "carousel",
2375
+ ...props,
2376
+ children
2377
+ }
2378
+ )
2379
+ }
2380
+ );
2381
+ }
2382
+ function CarouselContent({ className, ...props }) {
2383
+ const { carouselRef, orientation } = useCarousel();
2384
+ return /* @__PURE__ */ jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: /* @__PURE__ */ jsx(
2385
+ "div",
2386
+ {
2387
+ className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
2388
+ ...props
2389
+ }
2390
+ ) });
2391
+ }
2392
+ function CarouselItem({ className, ...props }) {
2393
+ const { orientation } = useCarousel();
2394
+ return /* @__PURE__ */ jsx(
2395
+ "div",
2396
+ {
2397
+ role: "group",
2398
+ "aria-roledescription": "slide",
2399
+ "data-slot": "carousel-item",
2400
+ className: cn(
2401
+ "min-w-0 shrink-0 grow-0 basis-full",
2402
+ orientation === "horizontal" ? "pl-4" : "pt-4",
2403
+ className
2404
+ ),
2405
+ ...props
2406
+ }
2407
+ );
2408
+ }
2409
+ function CarouselPrevious({
2410
+ className,
2411
+ variant = "outline",
2412
+ size = "icon",
2413
+ ...props
2414
+ }) {
2415
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
2416
+ return /* @__PURE__ */ jsxs(
2417
+ Button,
2418
+ {
2419
+ "data-slot": "carousel-previous",
2420
+ variant,
2421
+ size,
2422
+ className: cn(
2423
+ "absolute size-8 rounded-full",
2424
+ orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
2425
+ className
2426
+ ),
2427
+ disabled: !canScrollPrev,
2428
+ onClick: scrollPrev,
2429
+ ...props,
2430
+ children: [
2431
+ /* @__PURE__ */ jsx(ArrowLeft, {}),
2432
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
2433
+ ]
2434
+ }
2435
+ );
2436
+ }
2437
+ function CarouselNext({
2438
+ className,
2439
+ variant = "outline",
2440
+ size = "icon",
2441
+ ...props
2442
+ }) {
2443
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
2444
+ return /* @__PURE__ */ jsxs(
2445
+ Button,
2446
+ {
2447
+ "data-slot": "carousel-next",
2448
+ variant,
2449
+ size,
2450
+ className: cn(
2451
+ "absolute size-8 rounded-full",
2452
+ orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
2453
+ className
2454
+ ),
2455
+ disabled: !canScrollNext,
2456
+ onClick: scrollNext,
2457
+ ...props,
2458
+ children: [
2459
+ /* @__PURE__ */ jsx(ArrowRight, {}),
2460
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
2461
+ ]
2462
+ }
2463
+ );
2464
+ }
2465
+
2466
+ const StepperContext = React.createContext(void 0);
2467
+ const useStepperContext = () => {
2468
+ const context = React.useContext(StepperContext);
2469
+ if (!context) throw new Error("useStepperContext must be used within a Stepper");
2470
+ return context;
2471
+ };
2472
+ const Stepper = React.forwardRef(
2473
+ ({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
2474
+ const totalSteps = React.Children.count(children);
2475
+ return /* @__PURE__ */ jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsx(
2476
+ "div",
2477
+ {
2478
+ className: cn(
2479
+ orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
2480
+ ),
2481
+ role: "list",
2482
+ "aria-label": `Progresso: etapa ${currentStep} de ${totalSteps}`,
2483
+ children
2484
+ }
2485
+ ) }) });
2486
+ }
2487
+ );
2488
+ Stepper.displayName = "Stepper";
2489
+ const Step = React.forwardRef(
2490
+ ({ step, label, description, error = false, className, ...props }, ref) => {
2491
+ const { currentStep, totalSteps, orientation } = useStepperContext();
2492
+ const isActive = step === currentStep;
2493
+ const isCompleted = step < currentStep && !error;
2494
+ const isFirst = step === 1;
2495
+ const isLast = step === totalSteps;
2496
+ const circleClasses = cn(
2497
+ "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
2498
+ isActive && !error && "border-primary bg-primary text-primary-foreground",
2499
+ isCompleted && "border-primary bg-primary text-primary-foreground",
2500
+ error && "border-destructive bg-destructive text-destructive-foreground",
2501
+ !isActive && !isCompleted && !error && "border-muted bg-background text-muted-foreground"
2502
+ );
2503
+ const connectorClasses = (filled) => cn("transition-colors", filled ? "bg-primary" : "bg-muted");
2504
+ if (orientation === "vertical") {
2505
+ return /* @__PURE__ */ jsxs(
2506
+ "div",
2507
+ {
2508
+ ref,
2509
+ className: cn("flex gap-4", className),
2510
+ role: "listitem",
2511
+ "aria-current": isActive ? "step" : void 0,
2512
+ "aria-label": `Etapa ${step}: ${label}${isCompleted ? ", concluída" : isActive ? ", atual" : ""}`,
2513
+ ...props,
2514
+ children: [
2515
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
2516
+ /* @__PURE__ */ jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx("span", { children: step }) }),
2517
+ !isLast && /* @__PURE__ */ jsx(
2518
+ "div",
2519
+ {
2520
+ className: cn(
2521
+ "w-0.5 flex-1 min-h-[2rem] mt-1",
2522
+ connectorClasses(step < currentStep)
2523
+ )
2524
+ }
2525
+ )
2526
+ ] }),
2527
+ /* @__PURE__ */ jsxs("div", { className: cn("pb-6", isLast && "pb-0"), children: [
2528
+ /* @__PURE__ */ jsx(
2529
+ "div",
2530
+ {
2531
+ className: cn(
2532
+ "transition-colors",
2533
+ isActive || error ? "text-foreground" : "text-muted-foreground"
2534
+ ),
2535
+ children: label
2536
+ }
2537
+ ),
2538
+ description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
2539
+ ] })
2540
+ ]
2541
+ }
2542
+ );
2543
+ }
2544
+ return /* @__PURE__ */ jsxs(
2545
+ "div",
2546
+ {
2547
+ ref,
2548
+ className: cn("flex flex-1 flex-col items-center", className),
2549
+ role: "listitem",
2550
+ "aria-current": isActive ? "step" : void 0,
2551
+ "aria-label": `Etapa ${step}: ${label}${isCompleted ? ", concluída" : isActive ? ", atual" : ""}`,
2552
+ ...props,
2553
+ children: [
2554
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full items-start", children: [
2555
+ step > 1 && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step <= currentStep)) }),
2556
+ /* @__PURE__ */ jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx("span", { children: step }) }),
2557
+ step < totalSteps && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step < currentStep)) })
2558
+ ] }),
2559
+ /* @__PURE__ */ jsxs(
2560
+ "div",
2561
+ {
2562
+ className: cn(
2563
+ "mt-2 px-1",
2564
+ isFirst && "text-left self-start",
2565
+ isLast && "text-right self-end",
2566
+ !isFirst && !isLast && "text-center w-full"
2567
+ ),
2568
+ children: [
2569
+ /* @__PURE__ */ jsx(
2570
+ "div",
2571
+ {
2572
+ className: cn(
2573
+ "transition-colors",
2574
+ isActive || error ? "text-foreground" : "text-muted-foreground"
2575
+ ),
2576
+ children: label
2577
+ }
2578
+ ),
2579
+ description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
2580
+ ]
2581
+ }
2582
+ )
2583
+ ]
2584
+ }
2585
+ );
2586
+ }
2587
+ );
2588
+ Step.displayName = "Step";
2589
+
2590
+ function useStepper({
2591
+ totalSteps,
2592
+ initialStep = 1,
2593
+ step: controlledStep,
2594
+ onStepChange,
2595
+ onBeforeNext
2596
+ }) {
2597
+ const [internalStep, setInternalStep] = useState(
2598
+ () => Math.min(Math.max(1, initialStep), totalSteps)
2599
+ );
2600
+ const isControlled = controlledStep !== void 0;
2601
+ const currentStep = isControlled ? controlledStep : internalStep;
2602
+ const setStep = useCallback(
2603
+ (s) => {
2604
+ const clamped = Math.min(Math.max(1, s), totalSteps);
2605
+ if (!isControlled) setInternalStep(clamped);
2606
+ onStepChange?.(clamped);
2607
+ },
2608
+ [isControlled, onStepChange, totalSteps]
2609
+ );
2610
+ const isFirstStep = currentStep === 1;
2611
+ const isLastStep = currentStep === totalSteps;
2612
+ const canGoPrev = currentStep > 1;
2613
+ const canGoNext = currentStep < totalSteps;
2614
+ const next = useCallback(async () => {
2615
+ if (!canGoNext) return;
2616
+ if (onBeforeNext) {
2617
+ const allowed = await onBeforeNext(currentStep);
2618
+ if (!allowed) return;
2619
+ }
2620
+ setStep(currentStep + 1);
2621
+ }, [canGoNext, currentStep, onBeforeNext, setStep]);
2622
+ const prev = useCallback(() => {
2623
+ if (!canGoPrev) return;
2624
+ setStep(currentStep - 1);
2625
+ }, [canGoPrev, currentStep, setStep]);
2626
+ const goTo = useCallback((s) => setStep(s), [setStep]);
2627
+ const reset = useCallback(() => setStep(1), [setStep]);
2628
+ return {
2629
+ currentStep,
2630
+ totalSteps,
2631
+ isFirstStep,
2632
+ isLastStep,
2633
+ canGoPrev,
2634
+ canGoNext,
2635
+ next,
2636
+ prev,
2637
+ goTo,
2638
+ reset
2639
+ };
2640
+ }
2641
+
2642
+ function useFileUpload({
2643
+ maxFiles = 1,
2644
+ maxSize = 5 * 1024 * 1024,
2645
+ onFilesChange,
2646
+ onError,
2647
+ disabled = false
2648
+ } = {}) {
2649
+ const [files, setFiles] = useState([]);
2650
+ const [dragActive, setDragActive] = useState(false);
2651
+ const [errorMessage, setErrorMessage] = useState(null);
2652
+ const inputRef = useRef(null);
2653
+ const handleFiles = useCallback(
2654
+ (newFiles) => {
2655
+ if (!newFiles) return;
2656
+ setErrorMessage(null);
2657
+ const filesArray = Array.from(newFiles);
2658
+ const oversized = filesArray.filter((f) => f.size > maxSize);
2659
+ const validFiles = filesArray.filter((f) => f.size <= maxSize);
2660
+ if (oversized.length > 0) {
2661
+ const limitMB = (maxSize / 1024 / 1024).toFixed(0);
2662
+ setErrorMessage(
2663
+ `${oversized.length} file(s) exceed the ${limitMB}MB limit and were not added.`
2664
+ );
2665
+ onError?.(oversized, "size");
2666
+ }
2667
+ const merged = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
2668
+ const countRejected = maxFiles === 1 ? validFiles.slice(1) : [...files, ...validFiles].slice(maxFiles);
2669
+ if (countRejected.length > 0) {
2670
+ setErrorMessage(
2671
+ `Only ${maxFiles} file(s) allowed. ${countRejected.length} file(s) were not added.`
2672
+ );
2673
+ onError?.(countRejected, "count");
2674
+ }
2675
+ setFiles(merged);
2676
+ onFilesChange?.(merged);
2677
+ },
2678
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2679
+ [files, maxFiles, maxSize, onError, onFilesChange]
2680
+ );
2681
+ const handleDrag = useCallback((e) => {
2682
+ e.preventDefault();
2683
+ e.stopPropagation();
2684
+ if (e.type === "dragenter" || e.type === "dragover") {
2685
+ setDragActive(true);
2686
+ } else if (e.type === "dragleave") {
2687
+ setDragActive(false);
2688
+ }
2689
+ }, []);
2690
+ const handleDrop = useCallback(
2691
+ (e) => {
2692
+ e.preventDefault();
2693
+ e.stopPropagation();
2694
+ setDragActive(false);
2695
+ if (disabled) return;
2696
+ handleFiles(e.dataTransfer.files);
2697
+ },
2698
+ [disabled, handleFiles]
2699
+ );
2700
+ const handleChange = useCallback(
2701
+ (e) => {
2702
+ e.preventDefault();
2703
+ if (disabled) return;
2704
+ handleFiles(e.target.files);
2705
+ },
2706
+ [disabled, handleFiles]
2707
+ );
2708
+ const removeFile = useCallback(
2709
+ (index) => {
2710
+ setFiles((prev) => {
2711
+ const updated = prev.filter((_, i) => i !== index);
2712
+ onFilesChange?.(updated);
2713
+ if (updated.length === 0) setErrorMessage(null);
2714
+ return updated;
2715
+ });
2716
+ },
2717
+ [onFilesChange]
2718
+ );
2719
+ const openFileDialog = useCallback(() => {
2720
+ if (!disabled) {
2721
+ setErrorMessage(null);
2722
+ inputRef.current?.click();
2723
+ }
2724
+ }, [disabled]);
2725
+ return {
2726
+ files,
2727
+ dragActive,
2728
+ errorMessage,
2729
+ inputRef,
2730
+ handleFiles,
2731
+ handleDrag,
2732
+ handleDrop,
2733
+ handleChange,
2734
+ removeFile,
2735
+ openFileDialog
2736
+ };
2737
+ }
2738
+
2739
+ const FileUpload = React.forwardRef(
2740
+ ({
2741
+ className,
2742
+ onFilesChange,
2743
+ maxFiles = 1,
2744
+ maxSize = 5 * 1024 * 1024,
2745
+ // 5MB default
2746
+ showPreview = true,
2747
+ onError,
2748
+ accept,
2749
+ disabled,
2750
+ ...props
2751
+ }, ref) => {
2752
+ const {
2753
+ files,
2754
+ dragActive,
2755
+ errorMessage,
2756
+ inputRef,
2757
+ handleDrag,
2758
+ handleDrop,
2759
+ handleChange,
2760
+ removeFile,
2761
+ openFileDialog
2762
+ } = useFileUpload({ maxFiles, maxSize, onFilesChange, onError, disabled });
2763
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("w-full", className), children: [
2764
+ /* @__PURE__ */ jsxs(
2765
+ "div",
2766
+ {
2767
+ onDragEnter: handleDrag,
2768
+ onDragLeave: handleDrag,
2769
+ onDragOver: handleDrag,
2770
+ onDrop: handleDrop,
2771
+ onClick: openFileDialog,
2772
+ className: cn(
2773
+ "relative flex cursor-pointer flex-col items-center justify-center rounded-[var(--radius)] border-2 border-dashed border-border bg-background p-8 transition-colors hover:bg-muted/50",
2774
+ dragActive && "border-primary bg-primary/5",
2775
+ errorMessage && "border-destructive/50",
2776
+ disabled && "cursor-not-allowed opacity-50"
2777
+ ),
2778
+ children: [
2779
+ /* @__PURE__ */ jsx(Upload, { className: "mb-4 h-10 w-10 text-muted-foreground" }),
2780
+ /* @__PURE__ */ jsxs("p", { className: "mb-2 text-foreground", children: [
2781
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: "Click to upload" }),
2782
+ " or drag and drop"
2783
+ ] }),
2784
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2785
+ maxFiles > 1 ? `Up to ${maxFiles} files` : "1 file",
2786
+ " • Max",
2787
+ " ",
2788
+ (maxSize / 1024 / 1024).toFixed(0),
2789
+ "MB"
2790
+ ] }),
2791
+ /* @__PURE__ */ jsx(
2792
+ "input",
2793
+ {
2794
+ ...props,
2795
+ ref: inputRef,
2796
+ type: "file",
2797
+ className: "hidden",
2798
+ onChange: handleChange,
2799
+ multiple: maxFiles > 1,
2800
+ accept,
2801
+ disabled
2802
+ }
2803
+ )
2804
+ ]
2805
+ }
2806
+ ),
2807
+ errorMessage && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2 rounded-[var(--radius)] border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: [
2808
+ /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4 shrink-0" }),
2809
+ /* @__PURE__ */ jsx("span", { children: errorMessage })
2810
+ ] }),
2811
+ showPreview && files.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxs(
2812
+ "div",
2813
+ {
2814
+ className: "flex items-center justify-between rounded-[var(--radius)] border border-border bg-card p-3",
2815
+ children: [
2816
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
2817
+ /* @__PURE__ */ jsx(FileIcon, { className: "h-5 w-5 text-muted-foreground" }),
2818
+ /* @__PURE__ */ jsxs("div", { children: [
2819
+ /* @__PURE__ */ jsx("p", { className: "text-foreground", children: file.name }),
2820
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
2821
+ (file.size / 1024).toFixed(2),
2822
+ " KB"
2823
+ ] })
2824
+ ] })
2825
+ ] }),
2826
+ /* @__PURE__ */ jsx(
2827
+ Button,
2828
+ {
2829
+ type: "button",
2830
+ variant: "ghost",
2831
+ size: "sm",
2832
+ onClick: (e) => {
2833
+ e.stopPropagation();
2834
+ removeFile(index);
2835
+ },
2836
+ disabled,
2837
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
2838
+ }
2839
+ )
2840
+ ]
2841
+ },
2842
+ index
2843
+ )) })
2844
+ ] });
2845
+ }
2846
+ );
2847
+ FileUpload.displayName = "FileUpload";
2848
+
2849
+ const Rating = React.forwardRef(
2850
+ ({
2851
+ className,
2852
+ value = 0,
2853
+ onChange,
2854
+ max = 5,
2855
+ readonly = false,
2856
+ disabled = false,
2857
+ size = "md",
2858
+ showValue = false,
2859
+ allowHalf = false,
2860
+ getAriaLabel,
2861
+ ...props
2862
+ }, ref) => {
2863
+ const [hoverValue, setHoverValue] = React.useState(null);
2864
+ const isInteractive = !readonly && !disabled;
2865
+ const sizeStyles = {
2866
+ sm: "h-4 w-4",
2867
+ md: "h-5 w-5",
2868
+ lg: "h-6 w-6"
2869
+ };
2870
+ const handleClick = (rating) => {
2871
+ if (isInteractive) onChange?.(rating);
2872
+ };
2873
+ const handleMouseMove = (e, rating) => {
2874
+ if (!isInteractive) return;
2875
+ if (allowHalf) {
2876
+ const rect = e.currentTarget.getBoundingClientRect();
2877
+ setHoverValue(e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating);
2878
+ } else {
2879
+ setHoverValue(rating);
2880
+ }
2881
+ };
2882
+ const handleMouseLeave = () => {
2883
+ if (isInteractive) setHoverValue(null);
2884
+ };
2885
+ const handleClickWithHalf = (e, rating) => {
2886
+ if (!isInteractive) return;
2887
+ if (allowHalf) {
2888
+ const rect = e.currentTarget.getBoundingClientRect();
2889
+ const half = e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating;
2890
+ onChange?.(half);
2891
+ } else {
2892
+ handleClick(rating);
2893
+ }
2894
+ };
2895
+ const displayValue = hoverValue ?? value;
2896
+ return /* @__PURE__ */ jsxs(
2897
+ "div",
2898
+ {
2899
+ ref,
2900
+ className: cn("flex items-center gap-1", disabled && "opacity-50", className),
2901
+ ...props,
2902
+ children: [
2903
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
2904
+ const rating = index + 1;
2905
+ const isFull = rating <= displayValue;
2906
+ const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
2907
+ return /* @__PURE__ */ jsxs(
2908
+ "button",
2909
+ {
2910
+ type: "button",
2911
+ onClick: (e) => handleClickWithHalf(e, rating),
2912
+ onMouseMove: (e) => handleMouseMove(e, rating),
2913
+ onMouseLeave: handleMouseLeave,
2914
+ disabled: readonly || disabled,
2915
+ "aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
2916
+ className: cn(
2917
+ "relative transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2918
+ isInteractive && "cursor-pointer hover:scale-110",
2919
+ !isInteractive && "cursor-default"
2920
+ ),
2921
+ children: [
2922
+ /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-none text-muted-foreground") }),
2923
+ (isFull || isHalf) && /* @__PURE__ */ jsx(
2924
+ "span",
2925
+ {
2926
+ className: cn("absolute inset-0 overflow-hidden", isHalf ? "w-1/2" : "w-full"),
2927
+ children: /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-warning text-warning") })
2928
+ }
2929
+ )
2930
+ ]
2931
+ },
2932
+ index
2933
+ );
2934
+ }) }),
2935
+ showValue && /* @__PURE__ */ jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
2936
+ ]
2937
+ }
2938
+ );
2939
+ }
2940
+ );
2941
+ Rating.displayName = "Rating";
2942
+
2943
+ const Search = React.forwardRef(
2944
+ ({
2945
+ className,
2946
+ containerClassName,
2947
+ onSearch,
2948
+ onClear,
2949
+ onChange,
2950
+ size = "md",
2951
+ searchLabel = "Search",
2952
+ clearLabel = "Clear search",
2953
+ value: controlledValue,
2954
+ defaultValue,
2955
+ ...props
2956
+ }, ref) => {
2957
+ const isControlled = controlledValue !== void 0;
2958
+ const [internalValue, setInternalValue] = React.useState(
2959
+ isControlled ? "" : defaultValue ?? ""
2960
+ );
2961
+ const displayValue = isControlled ? controlledValue : internalValue;
2962
+ const sizeClasses = {
2963
+ sm: "h-8 px-8 py-1 text-sm",
2964
+ md: "h-10 px-10 py-2 text-base",
2965
+ lg: "h-12 px-12 py-3 text-base"
2966
+ };
2967
+ const iconSizeClasses = {
2968
+ sm: "left-2 h-3.5 w-3.5",
2969
+ md: "left-3 h-4 w-4",
2970
+ lg: "left-4 h-5 w-5"
2971
+ };
2972
+ const clearSizeClasses = {
2973
+ sm: "right-2",
2974
+ md: "right-3",
2975
+ lg: "right-4"
2976
+ };
2977
+ const handleChange = (e) => {
2978
+ const newValue = e.target.value;
2979
+ if (!isControlled) setInternalValue(newValue);
2980
+ onChange?.(e);
2981
+ onSearch?.(newValue);
2982
+ };
2983
+ const handleClear = () => {
2984
+ if (!isControlled) setInternalValue("");
2985
+ onClear?.();
2986
+ onSearch?.("");
2987
+ };
2988
+ const handleKeyDown = (e) => {
2989
+ if (e.key === "Escape") {
2990
+ handleClear();
2991
+ }
2992
+ props.onKeyDown?.(e);
2993
+ };
2994
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", containerClassName), children: [
2995
+ /* @__PURE__ */ jsx(
2996
+ Search$1,
2997
+ {
2998
+ "aria-hidden": "true",
2999
+ className: cn(
3000
+ "absolute top-1/2 -translate-y-1/2 text-muted-foreground",
3001
+ iconSizeClasses[size]
3002
+ )
3003
+ }
3004
+ ),
3005
+ /* @__PURE__ */ jsx(
3006
+ "input",
3007
+ {
3008
+ ref,
3009
+ type: "text",
3010
+ value: displayValue,
3011
+ onChange: handleChange,
3012
+ onKeyDown: handleKeyDown,
3013
+ className: cn(
3014
+ "flex w-full rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none",
3015
+ "placeholder:text-muted-foreground",
3016
+ "focus:ring-2 focus:ring-primary focus:border-transparent",
3017
+ "disabled:cursor-not-allowed disabled:opacity-50",
3018
+ sizeClasses[size],
3019
+ className
3020
+ ),
3021
+ "aria-label": props.placeholder || searchLabel,
3022
+ ...props
3023
+ }
3024
+ ),
3025
+ displayValue && /* @__PURE__ */ jsx(
3026
+ "button",
3027
+ {
3028
+ type: "button",
3029
+ onClick: handleClear,
3030
+ "aria-label": clearLabel,
3031
+ className: cn(
3032
+ "absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
3033
+ clearSizeClasses[size]
3034
+ ),
3035
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
3036
+ }
3037
+ )
3038
+ ] });
3039
+ }
3040
+ );
3041
+ Search.displayName = "Search";
3042
+
3043
+ const __vite_import_meta_env__ = {"BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo"};
3044
+ const RouteMapContent = React__default.forwardRef(
3045
+ ({ apiKey, ...props }, ref) => {
3046
+ const { isLoaded, loadError, load } = useGoogleMapsLoader();
3047
+ const {
3048
+ origin,
3049
+ destination,
3050
+ waypoints = [],
3051
+ travelMode = "DRIVING",
3052
+ height = "450px",
3053
+ mapContainerClassName,
3054
+ disableDefaultUI = false,
3055
+ zoomControl = true,
3056
+ streetViewControl = false,
3057
+ mapTypeControl = false,
3058
+ fullscreenControl = true,
3059
+ onRouteCalculated,
3060
+ className,
3061
+ ...divProps
3062
+ } = props;
3063
+ const mapRef = useRef(null);
3064
+ const gmpMapRef = useRef(null);
3065
+ const directionsRendererRef = useRef(null);
3066
+ useRef(false);
3067
+ const isCalculatingRef = useRef(false);
3068
+ useEffect(() => {
3069
+ if (!isLoaded && apiKey && !loadError && load) {
3070
+ load(apiKey).catch(console.error);
3071
+ }
3072
+ }, [isLoaded, apiKey, loadError, load]);
3073
+ useEffect(() => {
3074
+ if (!isLoaded || !gmpMapRef.current) return;
3075
+ const setupMap = (map) => {
3076
+ mapRef.current = map;
3077
+ const computedStyle = getComputedStyle(document.documentElement);
3078
+ const primaryColor = computedStyle.getPropertyValue("--primary").trim() || "#4F46E5";
3079
+ if (!directionsRendererRef.current) {
3080
+ directionsRendererRef.current = new google.maps.DirectionsRenderer({
3081
+ map,
3082
+ suppressMarkers: false,
3083
+ polylineOptions: {
3084
+ strokeColor: primaryColor,
3085
+ strokeWeight: 5,
3086
+ strokeOpacity: 0.8
3087
+ }
3088
+ });
3089
+ } else {
3090
+ directionsRendererRef.current.setMap(map);
3091
+ }
3092
+ };
3093
+ const gmpMap = gmpMapRef.current;
3094
+ if (gmpMap.innerMap) {
3095
+ setupMap(gmpMap.innerMap);
3096
+ } else {
3097
+ const interval = setInterval(() => {
3098
+ if (gmpMap.innerMap) {
3099
+ setupMap(gmpMap.innerMap);
3100
+ clearInterval(interval);
3101
+ }
3102
+ }, 100);
3103
+ return () => clearInterval(interval);
3104
+ }
3105
+ return () => {
3106
+ if (directionsRendererRef.current) {
3107
+ directionsRendererRef.current.setMap(null);
3108
+ }
3109
+ mapRef.current = null;
3110
+ };
3111
+ }, [isLoaded]);
3112
+ useEffect(() => {
3113
+ if (gmpMapRef.current && origin) {
3114
+ gmpMapRef.current.center = origin;
3115
+ }
3116
+ }, [origin.lat, origin.lng]);
3117
+ useEffect(() => {
3118
+ if (gmpMapRef.current) {
3119
+ gmpMapRef.current.zoom = 13;
3120
+ }
3121
+ }, []);
3122
+ useEffect(() => {
3123
+ const map = mapRef.current;
3124
+ const renderer = directionsRendererRef.current;
3125
+ if (!map || !renderer || !isLoaded || isCalculatingRef.current) return;
3126
+ if (!origin || !destination) return;
3127
+ isCalculatingRef.current = true;
3128
+ const directionsService = new google.maps.DirectionsService();
3129
+ const request = {
3130
+ origin,
3131
+ destination,
3132
+ waypoints: waypoints.map((wp) => ({
3133
+ location: wp,
3134
+ stopover: true
3135
+ })),
3136
+ travelMode: google.maps.TravelMode[travelMode]
3137
+ };
3138
+ directionsService.route(request, (result, status) => {
3139
+ isCalculatingRef.current = false;
3140
+ if (status === "OK" && result) {
3141
+ renderer.setDirections(result);
3142
+ const route = result.routes[0];
3143
+ if (route?.legs?.length > 0 && onRouteCalculated) {
3144
+ let totalDistance = 0;
3145
+ let totalDuration = 0;
3146
+ route.legs.forEach((leg) => {
3147
+ if (leg.distance) totalDistance += leg.distance.value;
3148
+ if (leg.duration) totalDuration += leg.duration.value;
3149
+ });
3150
+ const distanceKm = (totalDistance / 1e3).toFixed(1);
3151
+ const distanceText = `${distanceKm} km`;
3152
+ const hours = Math.floor(totalDuration / 3600);
3153
+ const minutes = Math.floor(totalDuration % 3600 / 60);
3154
+ const durationText = hours > 0 ? `${hours}h ${minutes}min` : `${minutes} min`;
3155
+ onRouteCalculated(distanceText, durationText);
3156
+ }
3157
+ }
3158
+ });
3159
+ }, [
3160
+ isLoaded,
3161
+ origin.lat,
3162
+ origin.lng,
3163
+ destination.lat,
3164
+ destination.lng,
3165
+ travelMode,
3166
+ mapRef.current
3167
+ ]);
3168
+ if (loadError) {
3169
+ return /* @__PURE__ */ jsx(
3170
+ "div",
3171
+ {
3172
+ ref,
3173
+ className: cn(
3174
+ "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
3175
+ className
3176
+ ),
3177
+ style: { height },
3178
+ ...divProps,
3179
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2 p-6", children: [
3180
+ /* @__PURE__ */ jsx("div", { className: "text-destructive", children: /* @__PURE__ */ jsx(
3181
+ "svg",
3182
+ {
3183
+ className: "w-12 h-12 mx-auto",
3184
+ fill: "none",
3185
+ stroke: "currentColor",
3186
+ viewBox: "0 0 24 24",
3187
+ children: /* @__PURE__ */ jsx(
3188
+ "path",
3189
+ {
3190
+ strokeLinecap: "round",
3191
+ strokeLinejoin: "round",
3192
+ strokeWidth: 2,
3193
+ d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
3194
+ }
3195
+ )
3196
+ }
3197
+ ) }),
3198
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: "Failed to load Google Maps" }),
3199
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
3200
+ ] }) })
3201
+ }
3202
+ );
3203
+ }
3204
+ if (!isLoaded) {
3205
+ return /* @__PURE__ */ jsx(
3206
+ "div",
3207
+ {
3208
+ ref,
3209
+ className: cn(
3210
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
3211
+ className
3212
+ ),
3213
+ style: { height },
3214
+ ...divProps
3215
+ }
3216
+ );
3217
+ }
3218
+ return /* @__PURE__ */ jsx(
3219
+ "div",
3220
+ {
3221
+ ref,
3222
+ className: cn(
3223
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
3224
+ className
3225
+ ),
3226
+ style: { height },
3227
+ ...divProps,
3228
+ children: /* @__PURE__ */ jsx(
3229
+ "gmp-map",
3230
+ {
3231
+ ref: gmpMapRef,
3232
+ style: { height: "100%", width: "100%", display: "block" },
3233
+ "map-id": props.mapId || "xertica-route-map"
3234
+ }
3235
+ )
3236
+ }
3237
+ );
3238
+ }
3239
+ );
3240
+ RouteMapContent.displayName = "RouteMapContent";
3241
+ const RouteMap = React__default.forwardRef((props, ref) => {
3242
+ const { isLoaded, loadError } = useGoogleMapsLoader();
3243
+ const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
3244
+ const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
3245
+ if (isLoaded || isValidKey || loadError) {
3246
+ return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
3247
+ }
3248
+ const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
3249
+ if (isScriptInjected) {
3250
+ return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
3251
+ }
3252
+ const {
3253
+ origin,
3254
+ destination,
3255
+ waypoints,
3256
+ travelMode,
3257
+ height,
3258
+ apiKey,
3259
+ mapContainerClassName,
3260
+ disableDefaultUI,
3261
+ zoomControl,
3262
+ streetViewControl,
3263
+ mapTypeControl,
3264
+ fullscreenControl,
3265
+ onRouteCalculated,
3266
+ ...divProps
3267
+ } = props;
3268
+ return /* @__PURE__ */ jsx(
3269
+ "div",
3270
+ {
3271
+ ref,
3272
+ className: cn(
3273
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
3274
+ props.className
3275
+ ),
3276
+ style: { height: props.height || "450px" },
3277
+ ...divProps,
3278
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-muted/50 to-muted", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-3 p-6", children: [
3279
+ /* @__PURE__ */ jsx("div", { className: "w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxs(
3280
+ "svg",
3281
+ {
3282
+ className: "w-8 h-8 text-primary",
3283
+ fill: "none",
3284
+ stroke: "currentColor",
3285
+ viewBox: "0 0 24 24",
3286
+ children: [
3287
+ /* @__PURE__ */ jsx(
3288
+ "path",
3289
+ {
3290
+ strokeLinecap: "round",
3291
+ strokeLinejoin: "round",
3292
+ strokeWidth: 2,
3293
+ d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
3294
+ }
3295
+ ),
3296
+ /* @__PURE__ */ jsx(
3297
+ "path",
3298
+ {
3299
+ strokeLinecap: "round",
3300
+ strokeLinejoin: "round",
3301
+ strokeWidth: 2,
3302
+ d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
3303
+ }
3304
+ )
3305
+ ]
3306
+ }
3307
+ ) }),
3308
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
3309
+ ] }) })
3310
+ }
3311
+ );
3312
+ });
3313
+ RouteMap.displayName = "RouteMap";
3314
+
3315
+ const SimpleMap = React__default.forwardRef(
3316
+ ({
3317
+ center,
3318
+ address,
3319
+ markerTitle,
3320
+ markerInfo,
3321
+ showMarker = true,
3322
+ zoom = 15,
3323
+ height = "350px",
3324
+ ...props
3325
+ }, ref) => {
3326
+ const markers = showMarker && center ? [
3327
+ {
3328
+ position: center,
3329
+ title: markerTitle || address || "Location",
3330
+ info: markerInfo || address
3331
+ }
3332
+ ] : [];
3333
+ return /* @__PURE__ */ jsx(Map$1, { ref, center, zoom, height, markers, ...props });
3334
+ }
3335
+ );
3336
+ SimpleMap.displayName = "SimpleMap";
3337
+
3338
+ function AssistantChart({
3339
+ data,
3340
+ config,
3341
+ categoryKey = "month",
3342
+ bars,
3343
+ xAxisFormatter,
3344
+ className
3345
+ }) {
3346
+ const resolvedBars = bars ?? Object.keys(config).map((key) => ({ dataKey: key }));
3347
+ const formatTick = xAxisFormatter ?? ((value) => value.slice(0, 3));
3348
+ return /* @__PURE__ */ jsx(ChartContainer, { config, className: cn("min-h-[200px] w-full", className), children: /* @__PURE__ */ jsxs(BarChart, { accessibilityLayer: true, data, children: [
3349
+ /* @__PURE__ */ jsx(CartesianGrid, { vertical: false }),
3350
+ /* @__PURE__ */ jsx(
3351
+ XAxis,
3352
+ {
3353
+ dataKey: categoryKey,
3354
+ tickLine: false,
3355
+ tickMargin: 10,
3356
+ axisLine: false,
3357
+ tickFormatter: formatTick
3358
+ }
3359
+ ),
3360
+ /* @__PURE__ */ jsx(ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsx(ChartTooltipContent, { indicator: "dashed" }) }),
3361
+ resolvedBars.map((bar) => /* @__PURE__ */ jsx(
3362
+ Bar,
3363
+ {
3364
+ dataKey: bar.dataKey,
3365
+ fill: bar.fill ?? `var(--color-${bar.dataKey})`,
3366
+ radius: bar.radius ?? 4
3367
+ },
3368
+ bar.dataKey
3369
+ ))
3370
+ ] }) });
3371
+ }
3372
+
3373
+ export { FormControl as $, Accordion as A, ContextMenuGroup as B, Calendar as C, ContextMenuItem as D, ContextMenuLabel as E, ContextMenuPortal as F, ContextMenuRadioGroup as G, ContextMenuRadioItem as H, ContextMenuSeparator as I, ContextMenuShortcut as J, ContextMenuSub as K, ContextMenuSubContent as L, ContextMenuSubTrigger as M, ContextMenuTrigger as N, Drawer as O, DrawerClose as P, DrawerContent as Q, DrawerDescription as R, DrawerFooter as S, DrawerHandle as T, DrawerHeader as U, DrawerOverlay as V, DrawerPortal as W, DrawerTitle as X, DrawerTrigger as Y, FileUpload as Z, Form as _, AccordionContent as a, Step as a$, FormDescription as a0, FormField as a1, FormItem as a2, FormLabel as a3, FormMessage as a4, HoverCard as a5, HoverCardContent as a6, HoverCardTrigger as a7, InputOTP as a8, InputOTPGroup as a9, NotificationBadge as aA, Pagination as aB, PaginationContent as aC, PaginationEllipsis as aD, PaginationItem as aE, PaginationLink as aF, PaginationNext as aG, PaginationPrevious as aH, Rating as aI, ResizableHandle as aJ, ResizablePanel as aK, ResizablePanelGroup as aL, RouteMap as aM, Search as aN, Sheet as aO, SheetBody as aP, SheetClose as aQ, SheetContent as aR, SheetDescription as aS, SheetFooter as aT, SheetHeader as aU, SheetPortal as aV, SheetTitle as aW, SheetTrigger as aX, SimpleMap as aY, StatsCard as aZ, StatsCardSkeleton as a_, InputOTPSeparator as aa, InputOTPSlot as ab, Menubar as ac, MenubarCheckboxItem as ad, MenubarContent as ae, MenubarGroup as af, MenubarItem as ag, MenubarLabel as ah, MenubarMenu as ai, MenubarPortal as aj, MenubarRadioGroup as ak, MenubarRadioItem as al, MenubarSeparator as am, MenubarShortcut as an, MenubarSub as ao, MenubarSubContent as ap, MenubarSubTrigger as aq, MenubarTrigger as ar, NavigationMenu as as, NavigationMenuContent as at, NavigationMenuIndicator as au, NavigationMenuItem as av, NavigationMenuLink as aw, NavigationMenuList as ax, NavigationMenuTrigger as ay, NavigationMenuViewport as az, AccordionItem as b, Stepper as b0, Timeline as b1, TimelineContent as b2, TimelineDescription as b3, TimelineDot as b4, TimelineHeading as b5, TimelineItem as b6, TimelineTime as b7, Toggle as b8, ToggleGroup as b9, ToggleGroupItem as ba, TreeView as bb, navigationMenuTriggerStyle as bc, toggleVariants as bd, useFileUpload as be, useFormField as bf, usePagination as bg, useStepper as bh, useStepperContext as bi, useTreeView as bj, AccordionTrigger as c, AspectRatio as d, AssistantChart as e, CalendarDayButton as f, Carousel as g, CarouselContent as h, CarouselItem as i, CarouselNext as j, CarouselPrevious as k, Collapsible as l, CollapsibleContent as m, CollapsibleTrigger as n, Command as o, CommandDialog as p, CommandEmpty as q, CommandGroup as r, CommandInput as s, CommandItem as t, CommandList as u, CommandSeparator as v, CommandShortcut as w, ContextMenu as x, ContextMenuCheckboxItem as y, ContextMenuContent as z };