@vertesia/ui 0.56.0 → 0.57.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/lib/esm/core/components/Avatar.js +31 -0
  2. package/lib/esm/core/components/Avatar.js.map +1 -0
  3. package/lib/esm/core/components/Badge.js +62 -0
  4. package/lib/esm/core/components/Badge.js.map +1 -0
  5. package/lib/esm/core/components/Button.js +32 -0
  6. package/lib/esm/core/components/Button.js.map +1 -0
  7. package/lib/esm/core/components/Center.js +6 -0
  8. package/lib/esm/core/components/Center.js.map +1 -0
  9. package/lib/esm/core/components/ComboBox.js +356 -0
  10. package/lib/esm/core/components/ComboBox.js.map +1 -0
  11. package/lib/esm/core/components/ConfirmModal.js +10 -0
  12. package/lib/esm/core/components/ConfirmModal.js.map +1 -0
  13. package/lib/esm/core/components/DeleteModal.js +28 -0
  14. package/lib/esm/core/components/DeleteModal.js.map +1 -0
  15. package/lib/esm/core/components/Divider.js +6 -0
  16. package/lib/esm/core/components/Divider.js.map +1 -0
  17. package/lib/esm/core/components/Dropdown.js +16 -0
  18. package/lib/esm/core/components/Dropdown.js.map +1 -0
  19. package/lib/esm/core/components/DropdownList.js +9 -0
  20. package/lib/esm/core/components/DropdownList.js.map +1 -0
  21. package/lib/esm/core/components/EmptyCollection.js +7 -0
  22. package/lib/esm/core/components/EmptyCollection.js.map +1 -0
  23. package/lib/esm/core/components/FileUpload.js +119 -0
  24. package/lib/esm/core/components/FileUpload.js.map +1 -0
  25. package/lib/esm/core/components/Input.js +16 -0
  26. package/lib/esm/core/components/Input.js.map +1 -0
  27. package/lib/esm/core/components/InputList.js +42 -0
  28. package/lib/esm/core/components/InputList.js.map +1 -0
  29. package/lib/esm/core/components/Link.js +13 -0
  30. package/lib/esm/core/components/Link.js.map +1 -0
  31. package/lib/esm/core/components/MenuList.js +23 -0
  32. package/lib/esm/core/components/MenuList.js.map +1 -0
  33. package/lib/esm/core/components/MessageBox.js +66 -0
  34. package/lib/esm/core/components/MessageBox.js.map +1 -0
  35. package/lib/esm/core/components/Modal.js +26 -0
  36. package/lib/esm/core/components/Modal.js.map +1 -0
  37. package/lib/esm/core/components/NumberInput.js +43 -0
  38. package/lib/esm/core/components/NumberInput.js.map +1 -0
  39. package/lib/esm/core/components/Portal.js +28 -0
  40. package/lib/esm/core/components/Portal.js.map +1 -0
  41. package/lib/esm/core/components/RadioGroup.js +34 -0
  42. package/lib/esm/core/components/RadioGroup.js.map +1 -0
  43. package/lib/esm/core/components/SelectBox.js +68 -0
  44. package/lib/esm/core/components/SelectBox.js.map +1 -0
  45. package/lib/esm/core/components/SelectList.js +47 -0
  46. package/lib/esm/core/components/SelectList.js.map +1 -0
  47. package/lib/esm/core/components/SelectStack.js +8 -0
  48. package/lib/esm/core/components/SelectStack.js.map +1 -0
  49. package/lib/esm/core/components/SidePanel.js +33 -0
  50. package/lib/esm/core/components/SidePanel.js.map +1 -0
  51. package/lib/esm/core/components/Spinner.js +18 -0
  52. package/lib/esm/core/components/Spinner.js.map +1 -0
  53. package/lib/esm/core/components/Switch.js +12 -0
  54. package/lib/esm/core/components/Switch.js.map +1 -0
  55. package/lib/esm/core/components/Textarea.js +15 -0
  56. package/lib/esm/core/components/Textarea.js.map +1 -0
  57. package/lib/esm/core/components/index.js +34 -0
  58. package/lib/esm/core/components/index.js.map +1 -0
  59. package/lib/esm/core/components/libs/utils.js +6 -0
  60. package/lib/esm/core/components/libs/utils.js.map +1 -0
  61. package/lib/esm/core/components/libs/visuallyHidden.js +16 -0
  62. package/lib/esm/core/components/libs/visuallyHidden.js.map +1 -0
  63. package/lib/esm/core/components/popup/Popup.js +60 -0
  64. package/lib/esm/core/components/popup/Popup.js.map +1 -0
  65. package/lib/esm/core/components/popup/PopupController.js +149 -0
  66. package/lib/esm/core/components/popup/PopupController.js.map +1 -0
  67. package/lib/esm/core/components/popup/index.js +4 -0
  68. package/lib/esm/core/components/popup/index.js.map +1 -0
  69. package/lib/esm/core/components/popup/position.js +221 -0
  70. package/lib/esm/core/components/popup/position.js.map +1 -0
  71. package/lib/esm/core/components/popup/utils.js +74 -0
  72. package/lib/esm/core/components/popup/utils.js.map +1 -0
  73. package/lib/esm/core/components/shadcn/breadcrumb.js +30 -0
  74. package/lib/esm/core/components/shadcn/breadcrumb.js.map +1 -0
  75. package/lib/esm/core/components/shadcn/button.js +45 -0
  76. package/lib/esm/core/components/shadcn/button.js.map +1 -0
  77. package/lib/esm/core/components/shadcn/calendar.js +46 -0
  78. package/lib/esm/core/components/shadcn/calendar.js.map +1 -0
  79. package/lib/esm/core/components/shadcn/card.js +17 -0
  80. package/lib/esm/core/components/shadcn/card.js.map +1 -0
  81. package/lib/esm/core/components/shadcn/checkbox.js +10 -0
  82. package/lib/esm/core/components/shadcn/checkbox.js.map +1 -0
  83. package/lib/esm/core/components/shadcn/command.js +30 -0
  84. package/lib/esm/core/components/shadcn/command.js.map +1 -0
  85. package/lib/esm/core/components/shadcn/dialog.js +61 -0
  86. package/lib/esm/core/components/shadcn/dialog.js.map +1 -0
  87. package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js +23 -0
  88. package/lib/esm/core/components/shadcn/filters/animateChangeInHeight.js.map +1 -0
  89. package/lib/esm/core/components/shadcn/filters/comboBox.js +82 -0
  90. package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -0
  91. package/lib/esm/core/components/shadcn/filters/dateFilter.js +31 -0
  92. package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +1 -0
  93. package/lib/esm/core/components/shadcn/filters/filterBar.js +140 -0
  94. package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -0
  95. package/lib/esm/core/components/shadcn/filters/filters.js +42 -0
  96. package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -0
  97. package/lib/esm/core/components/shadcn/filters/index.js +6 -0
  98. package/lib/esm/core/components/shadcn/filters/index.js.map +1 -0
  99. package/lib/esm/core/components/shadcn/filters/selectFilter.js +58 -0
  100. package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -0
  101. package/lib/esm/core/components/shadcn/filters/textFilter.js +20 -0
  102. package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -0
  103. package/lib/esm/core/components/shadcn/filters/types.js +10 -0
  104. package/lib/esm/core/components/shadcn/filters/types.js.map +1 -0
  105. package/lib/esm/core/components/shadcn/heading.js +17 -0
  106. package/lib/esm/core/components/shadcn/heading.js.map +1 -0
  107. package/lib/esm/core/components/shadcn/index.js +22 -0
  108. package/lib/esm/core/components/shadcn/index.js.map +1 -0
  109. package/lib/esm/core/components/shadcn/input.js +38 -0
  110. package/lib/esm/core/components/shadcn/input.js.map +1 -0
  111. package/lib/esm/core/components/shadcn/label.js +11 -0
  112. package/lib/esm/core/components/shadcn/label.js.map +1 -0
  113. package/lib/esm/core/components/shadcn/popover.js +50 -0
  114. package/lib/esm/core/components/shadcn/popover.js.map +1 -0
  115. package/lib/esm/core/components/shadcn/selectBox.js +62 -0
  116. package/lib/esm/core/components/shadcn/selectBox.js.map +1 -0
  117. package/lib/esm/core/components/shadcn/separator.js +8 -0
  118. package/lib/esm/core/components/shadcn/separator.js.map +1 -0
  119. package/lib/esm/core/components/shadcn/tabs.js +77 -0
  120. package/lib/esm/core/components/shadcn/tabs.js.map +1 -0
  121. package/lib/esm/core/components/shadcn/text.js +30 -0
  122. package/lib/esm/core/components/shadcn/text.js.map +1 -0
  123. package/lib/esm/core/components/shadcn/theme/ThemeProvider.js +38 -0
  124. package/lib/esm/core/components/shadcn/theme/ThemeProvider.js.map +1 -0
  125. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js +13 -0
  126. package/lib/esm/core/components/shadcn/theme/ThemeSwitcher.js.map +1 -0
  127. package/lib/esm/core/components/shadcn/tooltip.js +14 -0
  128. package/lib/esm/core/components/shadcn/tooltip.js.map +1 -0
  129. package/lib/esm/core/components/styles.js +10 -0
  130. package/lib/esm/core/components/styles.js.map +1 -0
  131. package/lib/esm/core/components/table/index.js +20 -0
  132. package/lib/esm/core/components/table/index.js.map +1 -0
  133. package/lib/esm/core/components/tabs/Tabs.js +78 -0
  134. package/lib/esm/core/components/tabs/Tabs.js.map +1 -0
  135. package/lib/esm/core/components/tabs/TabsContext.js +7 -0
  136. package/lib/esm/core/components/tabs/TabsContext.js.map +1 -0
  137. package/lib/esm/core/components/tabs/index.js +3 -0
  138. package/lib/esm/core/components/tabs/index.js.map +1 -0
  139. package/lib/esm/core/components/toast/NotificationPanel.js +37 -0
  140. package/lib/esm/core/components/toast/NotificationPanel.js.map +1 -0
  141. package/lib/esm/core/components/toast/ToastContext.js +7 -0
  142. package/lib/esm/core/components/toast/ToastContext.js.map +1 -0
  143. package/lib/esm/core/components/toast/ToastProps.js +2 -0
  144. package/lib/esm/core/components/toast/ToastProps.js.map +1 -0
  145. package/lib/esm/core/components/toast/ToastProvider.js +13 -0
  146. package/lib/esm/core/components/toast/ToastProvider.js.map +1 -0
  147. package/lib/esm/core/components/toast/index.js +3 -0
  148. package/lib/esm/core/components/toast/index.js.map +1 -0
  149. package/lib/esm/core/hooks/CompositeState.js +118 -0
  150. package/lib/esm/core/hooks/CompositeState.js.map +1 -0
  151. package/lib/esm/core/hooks/SharedState.js +64 -0
  152. package/lib/esm/core/hooks/SharedState.js.map +1 -0
  153. package/lib/esm/core/hooks/index.js +14 -0
  154. package/lib/esm/core/hooks/index.js.map +1 -0
  155. package/lib/esm/core/hooks/useClickOutside.js +29 -0
  156. package/lib/esm/core/hooks/useClickOutside.js.map +1 -0
  157. package/lib/esm/core/hooks/useCopyToClipboard.js +23 -0
  158. package/lib/esm/core/hooks/useCopyToClipboard.js.map +1 -0
  159. package/lib/esm/core/hooks/useDarkMode.js +11 -0
  160. package/lib/esm/core/hooks/useDarkMode.js.map +1 -0
  161. package/lib/esm/core/hooks/useDebounce.js +14 -0
  162. package/lib/esm/core/hooks/useDebounce.js.map +1 -0
  163. package/lib/esm/core/hooks/useEventSource.js +31 -0
  164. package/lib/esm/core/hooks/useEventSource.js.map +1 -0
  165. package/lib/esm/core/hooks/useFetch.js +40 -0
  166. package/lib/esm/core/hooks/useFetch.js.map +1 -0
  167. package/lib/esm/core/hooks/useFlag.js +13 -0
  168. package/lib/esm/core/hooks/useFlag.js.map +1 -0
  169. package/lib/esm/core/hooks/useIntersectionObserver.js +34 -0
  170. package/lib/esm/core/hooks/useIntersectionObserver.js.map +1 -0
  171. package/lib/esm/core/hooks/useIsFistRendering.js +14 -0
  172. package/lib/esm/core/hooks/useIsFistRendering.js.map +1 -0
  173. package/lib/esm/core/hooks/useSafeLayoutEffect.js +4 -0
  174. package/lib/esm/core/hooks/useSafeLayoutEffect.js.map +1 -0
  175. package/lib/esm/core/hooks/useSharedValue.js +21 -0
  176. package/lib/esm/core/hooks/useSharedValue.js.map +1 -0
  177. package/lib/esm/core/index.js +3 -0
  178. package/lib/esm/core/index.js.map +1 -0
  179. package/lib/esm/env/index.js +69 -0
  180. package/lib/esm/env/index.js.map +1 -0
  181. package/lib/esm/features/activity-doc/ActivityDoc.js +71 -0
  182. package/lib/esm/features/activity-doc/ActivityDoc.js.map +1 -0
  183. package/lib/esm/features/activity-doc/index.js +2 -0
  184. package/lib/esm/features/activity-doc/index.js.map +1 -0
  185. package/lib/esm/features/index.js +2 -2
  186. package/lib/esm/features/index.js.map +1 -1
  187. package/lib/esm/features/permissions/SecureButton.js +13 -0
  188. package/lib/esm/features/permissions/SecureButton.js.map +1 -0
  189. package/lib/esm/features/permissions/SecureSidebarItem.js +14 -0
  190. package/lib/esm/features/permissions/SecureSidebarItem.js.map +1 -0
  191. package/lib/esm/features/permissions/UserPermissionsProvider.js +86 -0
  192. package/lib/esm/features/permissions/UserPermissionsProvider.js.map +1 -0
  193. package/lib/esm/features/permissions/helpers.js +12 -0
  194. package/lib/esm/features/permissions/helpers.js.map +1 -0
  195. package/lib/esm/features/permissions/index.js +5 -0
  196. package/lib/esm/features/permissions/index.js.map +1 -0
  197. package/lib/esm/layout/AppLayout.js +46 -0
  198. package/lib/esm/layout/AppLayout.js.map +1 -0
  199. package/lib/esm/layout/FullHeightLayout.js +20 -0
  200. package/lib/esm/layout/FullHeightLayout.js.map +1 -0
  201. package/lib/esm/layout/Navbar.js +40 -0
  202. package/lib/esm/layout/Navbar.js.map +1 -0
  203. package/lib/esm/layout/Sidebar.js +35 -0
  204. package/lib/esm/layout/Sidebar.js.map +1 -0
  205. package/lib/esm/layout/SidebarContext.js +10 -0
  206. package/lib/esm/layout/SidebarContext.js.map +1 -0
  207. package/lib/esm/layout/TitleBar.js +5 -0
  208. package/lib/esm/layout/TitleBar.js.map +1 -0
  209. package/lib/esm/layout/index.js +7 -0
  210. package/lib/esm/layout/index.js.map +1 -0
  211. package/lib/esm/router/FixLinks.js +23 -0
  212. package/lib/esm/router/FixLinks.js.map +1 -0
  213. package/lib/esm/router/HistoryNavigator.js +149 -0
  214. package/lib/esm/router/HistoryNavigator.js.map +1 -0
  215. package/lib/esm/router/Nav.js +26 -0
  216. package/lib/esm/router/Nav.js.map +1 -0
  217. package/lib/esm/router/NestedNavigationContext.js +19 -0
  218. package/lib/esm/router/NestedNavigationContext.js.map +1 -0
  219. package/lib/esm/router/NestedRouterProvider.js +44 -0
  220. package/lib/esm/router/NestedRouterProvider.js.map +1 -0
  221. package/lib/esm/router/PathMatcher.js +159 -0
  222. package/lib/esm/router/PathMatcher.js.map +1 -0
  223. package/lib/esm/router/PathWithParams.js +34 -0
  224. package/lib/esm/router/PathWithParams.js.map +1 -0
  225. package/lib/esm/router/Route404.js +18 -0
  226. package/lib/esm/router/Route404.js.map +1 -0
  227. package/lib/esm/router/RouteComponent.js +32 -0
  228. package/lib/esm/router/RouteComponent.js.map +1 -0
  229. package/lib/esm/router/Router.js +161 -0
  230. package/lib/esm/router/Router.js.map +1 -0
  231. package/lib/esm/router/RouterProvider.js +41 -0
  232. package/lib/esm/router/RouterProvider.js.map +1 -0
  233. package/lib/esm/router/index.js +10 -5
  234. package/lib/esm/router/index.js.map +1 -1
  235. package/lib/esm/router/path.js +137 -0
  236. package/lib/esm/router/path.js.map +1 -0
  237. package/lib/esm/session/TypeRegistry.js +24 -0
  238. package/lib/esm/session/TypeRegistry.js.map +1 -0
  239. package/lib/esm/session/UserSession.js +191 -0
  240. package/lib/esm/session/UserSession.js.map +1 -0
  241. package/lib/esm/session/UserSessionProvider.js +161 -0
  242. package/lib/esm/session/UserSessionProvider.js.map +1 -0
  243. package/lib/esm/session/auth/composable.js +162 -0
  244. package/lib/esm/session/auth/composable.js.map +1 -0
  245. package/lib/esm/session/auth/firebase.js +151 -0
  246. package/lib/esm/session/auth/firebase.js.map +1 -0
  247. package/lib/esm/session/auth/useAuthState.js +49 -0
  248. package/lib/esm/session/auth/useAuthState.js.map +1 -0
  249. package/lib/esm/session/index.js +6 -2
  250. package/lib/esm/session/index.js.map +1 -1
  251. package/lib/esm/session/useUXTracking.js +29 -0
  252. package/lib/esm/session/useUXTracking.js.map +1 -0
  253. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +103 -0
  254. package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -0
  255. package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js +33 -0
  256. package/lib/esm/widgets/codemirror/CodemirrorStateSingleton.js.map +1 -0
  257. package/lib/esm/widgets/codemirror/index.js +2 -0
  258. package/lib/esm/widgets/codemirror/index.js.map +1 -0
  259. package/lib/esm/widgets/form/Form.js +102 -0
  260. package/lib/esm/widgets/form/Form.js.map +1 -0
  261. package/lib/esm/widgets/form/FormContext.js +29 -0
  262. package/lib/esm/widgets/form/FormContext.js.map +1 -0
  263. package/lib/esm/widgets/form/ManagedObject.js +283 -0
  264. package/lib/esm/widgets/form/ManagedObject.js.map +1 -0
  265. package/lib/esm/widgets/form/fields.js +11 -0
  266. package/lib/esm/widgets/form/fields.js.map +1 -0
  267. package/lib/esm/widgets/form/index.js +7 -0
  268. package/lib/esm/widgets/form/index.js.map +1 -0
  269. package/lib/esm/widgets/form/inputs.js +36 -0
  270. package/lib/esm/widgets/form/inputs.js.map +1 -0
  271. package/lib/esm/widgets/form/schema.js +191 -0
  272. package/lib/esm/widgets/form/schema.js.map +1 -0
  273. package/lib/esm/widgets/index.js +6 -0
  274. package/lib/esm/widgets/index.js.map +1 -0
  275. package/lib/esm/widgets/json-view/JSONCode.js +157 -0
  276. package/lib/esm/widgets/json-view/JSONCode.js.map +1 -0
  277. package/lib/esm/widgets/json-view/JSONDisplay.js +10 -0
  278. package/lib/esm/widgets/json-view/JSONDisplay.js.map +1 -0
  279. package/lib/esm/widgets/json-view/JSONView.js +106 -0
  280. package/lib/esm/widgets/json-view/JSONView.js.map +1 -0
  281. package/lib/esm/widgets/json-view/index.js +4 -0
  282. package/lib/esm/widgets/json-view/index.js.map +1 -0
  283. package/lib/esm/widgets/json-view/types.js +2 -0
  284. package/lib/esm/widgets/json-view/types.js.map +1 -0
  285. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +50 -0
  286. package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +1 -0
  287. package/lib/esm/widgets/schema-editor/ManagedSchema.js +303 -0
  288. package/lib/esm/widgets/schema-editor/ManagedSchema.js.map +1 -0
  289. package/lib/esm/widgets/schema-editor/editor/Editable.js +111 -0
  290. package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -0
  291. package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js +8 -0
  292. package/lib/esm/widgets/schema-editor/editor/EditableSchemaProperty.js.map +1 -0
  293. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js +81 -0
  294. package/lib/esm/widgets/schema-editor/editor/PropertyEditor.js.map +1 -0
  295. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +7 -0
  296. package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -0
  297. package/lib/esm/widgets/schema-editor/editor/SchemaContext.js +9 -0
  298. package/lib/esm/widgets/schema-editor/editor/SchemaContext.js.map +1 -0
  299. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +84 -0
  300. package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -0
  301. package/lib/esm/widgets/schema-editor/index.js +8 -0
  302. package/lib/esm/widgets/schema-editor/index.js.map +1 -0
  303. package/lib/esm/widgets/schema-editor/json-schema4-utils.js +188 -0
  304. package/lib/esm/widgets/schema-editor/json-schema4-utils.js.map +1 -0
  305. package/lib/esm/widgets/schema-editor/type-signature.js +30 -0
  306. package/lib/esm/widgets/schema-editor/type-signature.js.map +1 -0
  307. package/lib/esm/widgets/xml-viewer/components/Attributes/index.js +11 -0
  308. package/lib/esm/widgets/xml-viewer/components/Attributes/index.js.map +1 -0
  309. package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js +8 -0
  310. package/lib/esm/widgets/xml-viewer/components/CDataTag/index.js.map +1 -0
  311. package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js +11 -0
  312. package/lib/esm/widgets/xml-viewer/components/CollapseIcon/index.js.map +1 -0
  313. package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js +11 -0
  314. package/lib/esm/widgets/xml-viewer/components/CommentTag/index.js.map +1 -0
  315. package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js +9 -0
  316. package/lib/esm/widgets/xml-viewer/components/DeclarationTag/index.js.map +1 -0
  317. package/lib/esm/widgets/xml-viewer/components/Elements/index.js +36 -0
  318. package/lib/esm/widgets/xml-viewer/components/Elements/index.js.map +1 -0
  319. package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js +5 -0
  320. package/lib/esm/widgets/xml-viewer/components/InvalidXml/index.js.map +1 -0
  321. package/lib/esm/widgets/xml-viewer/components/Tag/index.js +13 -0
  322. package/lib/esm/widgets/xml-viewer/components/Tag/index.js.map +1 -0
  323. package/lib/esm/widgets/xml-viewer/components/TextElement/index.js +13 -0
  324. package/lib/esm/widgets/xml-viewer/components/TextElement/index.js.map +1 -0
  325. package/lib/esm/widgets/xml-viewer/components/XMLViewer.js +30 -0
  326. package/lib/esm/widgets/xml-viewer/components/XMLViewer.js.map +1 -0
  327. package/lib/esm/widgets/xml-viewer/components/types.js +2 -0
  328. package/lib/esm/widgets/xml-viewer/components/types.js.map +1 -0
  329. package/lib/esm/widgets/xml-viewer/constants/index.js +17 -0
  330. package/lib/esm/widgets/xml-viewer/constants/index.js.map +1 -0
  331. package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js +10 -0
  332. package/lib/esm/widgets/xml-viewer/context/xml-viewer-context.js.map +1 -0
  333. package/lib/esm/widgets/xml-viewer/helpers/index.js +40 -0
  334. package/lib/esm/widgets/xml-viewer/helpers/index.js.map +1 -0
  335. package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js +22 -0
  336. package/lib/esm/widgets/xml-viewer/hooks/useCollapsible.js.map +1 -0
  337. package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js +31 -0
  338. package/lib/esm/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -0
  339. package/lib/esm/widgets/xml-viewer/index.js +3 -0
  340. package/lib/esm/widgets/xml-viewer/index.js.map +1 -0
  341. package/lib/esm/widgets/xml-viewer/types/index.js +2 -0
  342. package/lib/esm/widgets/xml-viewer/types/index.js.map +1 -0
  343. package/lib/tsconfig.tsbuildinfo +1 -1
  344. package/lib/types/core/components/Avatar.d.ts +15 -0
  345. package/lib/types/core/components/Badge.d.ts +20 -0
  346. package/lib/types/core/components/Button.d.ts +13 -0
  347. package/lib/types/core/components/Center.d.ts +7 -0
  348. package/lib/types/core/components/ComboBox.d.ts +123 -0
  349. package/lib/types/core/components/ConfirmModal.d.ts +10 -0
  350. package/lib/types/core/components/DeleteModal.d.ts +10 -0
  351. package/lib/types/core/components/Divider.d.ts +5 -0
  352. package/lib/types/core/components/Dropdown.d.ts +14 -0
  353. package/lib/types/core/components/DropdownList.d.ts +12 -0
  354. package/lib/types/core/components/EmptyCollection.d.ts +8 -0
  355. package/lib/types/core/components/FileUpload.d.ts +28 -0
  356. package/lib/types/core/components/Input.d.ts +8 -0
  357. package/lib/types/core/components/InputList.d.ts +10 -0
  358. package/lib/types/core/components/Link.d.ts +6 -0
  359. package/lib/types/core/components/MenuList.d.ts +13 -0
  360. package/lib/types/core/components/MessageBox.d.ts +35 -0
  361. package/lib/types/core/components/Modal.d.ts +29 -0
  362. package/lib/types/core/components/NumberInput.d.ts +15 -0
  363. package/lib/types/core/components/Portal.d.ts +5 -0
  364. package/lib/types/core/components/RadioGroup.d.ts +25 -0
  365. package/lib/types/core/components/SelectBox.d.ts +35 -0
  366. package/lib/types/core/components/SelectList.d.ts +17 -0
  367. package/lib/types/core/components/SelectStack.d.ts +12 -0
  368. package/lib/types/core/components/SidePanel.d.ts +8 -0
  369. package/lib/types/core/components/Spinner.d.ts +6 -0
  370. package/lib/types/core/components/Switch.d.ts +9 -0
  371. package/lib/types/core/components/Textarea.d.ts +7 -0
  372. package/lib/types/core/components/index.d.ts +37 -0
  373. package/lib/types/core/components/libs/utils.d.ts +2 -0
  374. package/lib/types/core/components/libs/visuallyHidden.d.ts +6 -0
  375. package/lib/types/core/components/popup/Popup.d.ts +25 -0
  376. package/lib/types/core/components/popup/PopupController.d.ts +40 -0
  377. package/lib/types/core/components/popup/index.d.ts +3 -0
  378. package/lib/types/core/components/popup/position.d.ts +58 -0
  379. package/lib/types/core/components/popup/utils.d.ts +29 -0
  380. package/lib/types/core/components/shadcn/breadcrumb.d.ts +13 -0
  381. package/lib/types/core/components/shadcn/button.d.ts +15 -0
  382. package/lib/types/core/components/shadcn/calendar.d.ts +10 -0
  383. package/lib/types/core/components/shadcn/card.d.ts +8 -0
  384. package/lib/types/core/components/shadcn/checkbox.d.ts +4 -0
  385. package/lib/types/core/components/shadcn/command.d.ts +80 -0
  386. package/lib/types/core/components/shadcn/dialog.d.ts +34 -0
  387. package/lib/types/core/components/shadcn/filters/animateChangeInHeight.d.ts +6 -0
  388. package/lib/types/core/components/shadcn/filters/comboBox.d.ts +17 -0
  389. package/lib/types/core/components/shadcn/filters/dateFilter.d.ts +14 -0
  390. package/lib/types/core/components/shadcn/filters/filterBar.d.ts +9 -0
  391. package/lib/types/core/components/shadcn/filters/filters.d.ts +9 -0
  392. package/lib/types/core/components/shadcn/filters/index.d.ts +5 -0
  393. package/lib/types/core/components/shadcn/filters/selectFilter.d.ts +11 -0
  394. package/lib/types/core/components/shadcn/filters/textFilter.d.ts +12 -0
  395. package/lib/types/core/components/shadcn/filters/types.d.ts +26 -0
  396. package/lib/types/core/components/shadcn/heading.d.ts +5 -0
  397. package/lib/types/core/components/shadcn/index.d.ts +21 -0
  398. package/lib/types/core/components/shadcn/input.d.ts +16 -0
  399. package/lib/types/core/components/shadcn/label.d.ts +7 -0
  400. package/lib/types/core/components/shadcn/popover.d.ts +16 -0
  401. package/lib/types/core/components/shadcn/selectBox.d.ts +21 -0
  402. package/lib/types/core/components/shadcn/separator.d.ts +4 -0
  403. package/lib/types/core/components/shadcn/tabs.d.ts +26 -0
  404. package/lib/types/core/components/shadcn/text.d.ts +10 -0
  405. package/lib/types/core/components/shadcn/theme/ThemeProvider.d.ts +13 -0
  406. package/lib/types/core/components/shadcn/theme/ThemeSwitcher.d.ts +9 -0
  407. package/lib/types/core/components/shadcn/tooltip.d.ts +19 -0
  408. package/lib/types/core/components/styles.d.ts +6 -0
  409. package/lib/types/core/components/table/index.d.ts +13 -0
  410. package/lib/types/core/components/tabs/Tabs.d.ts +24 -0
  411. package/lib/types/core/components/tabs/TabsContext.d.ts +16 -0
  412. package/lib/types/core/components/tabs/index.d.ts +2 -0
  413. package/lib/types/core/components/toast/NotificationPanel.d.ts +7 -0
  414. package/lib/types/core/components/toast/ToastContext.d.ts +5 -0
  415. package/lib/types/core/components/toast/ToastProps.d.ts +6 -0
  416. package/lib/types/core/components/toast/ToastProvider.d.ts +5 -0
  417. package/lib/types/core/components/toast/index.d.ts +2 -0
  418. package/lib/types/core/hooks/CompositeState.d.ts +27 -0
  419. package/lib/types/core/hooks/SharedState.d.ts +9 -0
  420. package/lib/types/core/hooks/index.d.ts +13 -0
  421. package/lib/types/core/hooks/useClickOutside.d.ts +7 -0
  422. package/lib/types/core/hooks/useCopyToClipboard.d.ts +4 -0
  423. package/lib/types/core/hooks/useDarkMode.d.ts +1 -0
  424. package/lib/types/core/hooks/useDebounce.d.ts +1 -0
  425. package/lib/types/core/hooks/useEventSource.d.ts +1 -0
  426. package/lib/types/core/hooks/useFetch.d.ts +23 -0
  427. package/lib/types/core/hooks/useFlag.d.ts +8 -0
  428. package/lib/types/core/hooks/useIntersectionObserver.d.ts +13 -0
  429. package/lib/types/core/hooks/useIsFistRendering.d.ts +1 -0
  430. package/lib/types/core/hooks/useSafeLayoutEffect.d.ts +3 -0
  431. package/lib/types/core/hooks/useSharedValue.d.ts +11 -0
  432. package/lib/types/core/index.d.ts +2 -0
  433. package/lib/types/env/index.d.ts +70 -0
  434. package/lib/types/features/activity-doc/ActivityDoc.d.ts +13 -0
  435. package/lib/types/features/activity-doc/index.d.ts +1 -0
  436. package/lib/types/features/index.d.ts +2 -0
  437. package/lib/types/features/permissions/SecureButton.d.ts +7 -0
  438. package/lib/types/features/permissions/SecureSidebarItem.d.ts +7 -0
  439. package/lib/types/features/permissions/UserPermissionsProvider.d.ts +19 -0
  440. package/lib/types/features/permissions/helpers.d.ts +4 -0
  441. package/lib/types/features/permissions/index.d.ts +4 -0
  442. package/lib/types/layout/AppLayout.d.ts +12 -0
  443. package/lib/types/layout/FullHeightLayout.d.ts +26 -0
  444. package/lib/types/layout/Navbar.d.ts +32 -0
  445. package/lib/types/layout/Sidebar.d.ts +29 -0
  446. package/lib/types/layout/SidebarContext.d.ts +8 -0
  447. package/lib/types/layout/TitleBar.d.ts +5 -0
  448. package/lib/types/layout/index.d.ts +6 -0
  449. package/lib/types/router/FixLinks.d.ts +6 -0
  450. package/lib/types/router/HistoryNavigator.d.ts +55 -0
  451. package/lib/types/router/Nav.d.ts +28 -0
  452. package/lib/types/router/NestedNavigationContext.d.ts +8 -0
  453. package/lib/types/router/NestedRouterProvider.d.ts +13 -0
  454. package/lib/types/router/PathMatcher.d.ts +35 -0
  455. package/lib/types/router/PathWithParams.d.ts +8 -0
  456. package/lib/types/router/Route404.d.ts +3 -0
  457. package/lib/types/router/RouteComponent.d.ts +5 -0
  458. package/lib/types/router/Router.d.ts +73 -0
  459. package/lib/types/router/RouterProvider.d.ts +14 -0
  460. package/lib/types/router/index.d.ts +10 -4
  461. package/lib/types/router/path.d.ts +7 -0
  462. package/lib/types/session/TypeRegistry.d.ts +9 -0
  463. package/lib/types/session/UserSession.d.ts +39 -0
  464. package/lib/types/session/UserSessionProvider.d.ts +6 -0
  465. package/lib/types/session/auth/composable.d.ts +25 -0
  466. package/lib/types/session/auth/firebase.d.ts +9 -0
  467. package/lib/types/session/auth/useAuthState.d.ts +9 -0
  468. package/lib/types/session/index.d.ts +6 -0
  469. package/lib/types/session/useUXTracking.d.ts +5 -0
  470. package/lib/types/widgets/codemirror/CodeMirrorEditor.d.ts +22 -0
  471. package/lib/types/widgets/codemirror/CodemirrorStateSingleton.d.ts +14 -0
  472. package/lib/types/widgets/codemirror/index.d.ts +1 -0
  473. package/lib/types/widgets/form/Form.d.ts +20 -0
  474. package/lib/types/widgets/form/FormContext.d.ts +16 -0
  475. package/lib/types/widgets/form/ManagedObject.d.ts +81 -0
  476. package/lib/types/widgets/form/fields.d.ts +15 -0
  477. package/lib/types/widgets/form/index.d.ts +6 -0
  478. package/lib/types/widgets/form/inputs.d.ts +7 -0
  479. package/lib/types/widgets/form/schema.d.ts +45 -0
  480. package/lib/types/widgets/index.d.ts +5 -0
  481. package/lib/types/widgets/json-view/JSONCode.d.ts +21 -0
  482. package/lib/types/widgets/json-view/JSONDisplay.d.ts +7 -0
  483. package/lib/types/widgets/json-view/JSONView.d.ts +6 -0
  484. package/lib/types/widgets/json-view/index.d.ts +4 -0
  485. package/lib/types/widgets/json-view/types.d.ts +7 -0
  486. package/lib/types/widgets/schema-editor/JSONSchemaEditorModal.d.ts +9 -0
  487. package/lib/types/widgets/schema-editor/ManagedSchema.d.ts +74 -0
  488. package/lib/types/widgets/schema-editor/editor/Editable.d.ts +39 -0
  489. package/lib/types/widgets/schema-editor/editor/EditableSchemaProperty.d.ts +7 -0
  490. package/lib/types/widgets/schema-editor/editor/PropertyEditor.d.ts +4 -0
  491. package/lib/types/widgets/schema-editor/editor/PropertyViewer.d.ts +3 -0
  492. package/lib/types/widgets/schema-editor/editor/SchemaContext.d.ts +2 -0
  493. package/lib/types/widgets/schema-editor/editor/SchemaEditor.d.ts +8 -0
  494. package/lib/types/widgets/schema-editor/index.d.ts +7 -0
  495. package/lib/types/widgets/schema-editor/json-schema4-utils.d.ts +15 -0
  496. package/lib/types/widgets/schema-editor/type-signature.d.ts +18 -0
  497. package/lib/types/widgets/xml-viewer/components/Attributes/index.d.ts +5 -0
  498. package/lib/types/widgets/xml-viewer/components/CDataTag/index.d.ts +7 -0
  499. package/lib/types/widgets/xml-viewer/components/CollapseIcon/index.d.ts +4 -0
  500. package/lib/types/widgets/xml-viewer/components/CommentTag/index.d.ts +8 -0
  501. package/lib/types/widgets/xml-viewer/components/DeclarationTag/index.d.ts +7 -0
  502. package/lib/types/widgets/xml-viewer/components/Elements/index.d.ts +7 -0
  503. package/lib/types/widgets/xml-viewer/components/InvalidXml/index.d.ts +1 -0
  504. package/lib/types/widgets/xml-viewer/components/Tag/index.d.ts +12 -0
  505. package/lib/types/widgets/xml-viewer/components/TextElement/index.d.ts +7 -0
  506. package/lib/types/widgets/xml-viewer/components/XMLViewer.d.ts +2 -0
  507. package/lib/types/widgets/xml-viewer/components/types.d.ts +103 -0
  508. package/lib/types/widgets/xml-viewer/constants/index.d.ts +16 -0
  509. package/lib/types/widgets/xml-viewer/context/xml-viewer-context.d.ts +3 -0
  510. package/lib/types/widgets/xml-viewer/helpers/index.d.ts +12 -0
  511. package/lib/types/widgets/xml-viewer/hooks/useCollapsible.d.ts +14 -0
  512. package/lib/types/widgets/xml-viewer/hooks/useXMLViewer.d.ts +9 -0
  513. package/lib/types/widgets/xml-viewer/index.d.ts +2 -0
  514. package/lib/types/widgets/xml-viewer/types/index.d.ts +15 -0
  515. package/lib/vertesia-ui-core.js +2 -0
  516. package/lib/vertesia-ui-core.js.map +1 -0
  517. package/lib/vertesia-ui-env.js +2 -0
  518. package/lib/vertesia-ui-env.js.map +1 -0
  519. package/lib/vertesia-ui-features.js +1 -1
  520. package/lib/vertesia-ui-features.js.map +1 -1
  521. package/lib/vertesia-ui-layout.js +2 -0
  522. package/lib/vertesia-ui-layout.js.map +1 -0
  523. package/lib/vertesia-ui-router.js +1 -1
  524. package/lib/vertesia-ui-router.js.map +1 -1
  525. package/lib/vertesia-ui-session.js +1 -1
  526. package/lib/vertesia-ui-session.js.map +1 -1
  527. package/lib/vertesia-ui-widgets.js +2 -0
  528. package/lib/vertesia-ui-widgets.js.map +1 -0
  529. package/package.json +80 -19
  530. package/src/code/index.ts +1 -1
  531. package/src/core/components/Avatar.tsx +67 -0
  532. package/src/core/components/Badge.tsx +114 -0
  533. package/src/core/components/Button.tsx +63 -0
  534. package/src/core/components/Center.tsx +12 -0
  535. package/src/core/components/ComboBox.tsx +488 -0
  536. package/src/core/components/ConfirmModal.tsx +51 -0
  537. package/src/core/components/DeleteModal.tsx +45 -0
  538. package/src/core/components/Divider.tsx +11 -0
  539. package/src/core/components/Dropdown.tsx +63 -0
  540. package/src/core/components/DropdownList.tsx +72 -0
  541. package/src/core/components/EmptyCollection.tsx +39 -0
  542. package/src/core/components/FileUpload.tsx +196 -0
  543. package/src/core/components/Input.tsx +43 -0
  544. package/src/core/components/InputList.tsx +75 -0
  545. package/src/core/components/Link.tsx +16 -0
  546. package/src/core/components/MenuList.tsx +44 -0
  547. package/src/core/components/MessageBox.tsx +96 -0
  548. package/src/core/components/Modal.tsx +144 -0
  549. package/src/core/components/NumberInput.tsx +64 -0
  550. package/src/core/components/Portal.tsx +33 -0
  551. package/src/core/components/RadioGroup.tsx +100 -0
  552. package/src/core/components/SelectBox.tsx +189 -0
  553. package/src/core/components/SelectList.tsx +85 -0
  554. package/src/core/components/SelectStack.tsx +63 -0
  555. package/src/core/components/SidePanel.tsx +104 -0
  556. package/src/core/components/Spinner.tsx +33 -0
  557. package/src/core/components/Switch.tsx +29 -0
  558. package/src/core/components/Textarea.tsx +25 -0
  559. package/src/core/components/index.ts +39 -0
  560. package/src/core/components/libs/utils.tsx +6 -0
  561. package/src/core/components/libs/visuallyHidden.tsx +25 -0
  562. package/src/core/components/popup/Popup.tsx +94 -0
  563. package/src/core/components/popup/PopupController.ts +182 -0
  564. package/src/core/components/popup/index.ts +3 -0
  565. package/src/core/components/popup/position.ts +277 -0
  566. package/src/core/components/popup/utils.ts +82 -0
  567. package/src/core/components/shadcn/breadcrumb.tsx +174 -0
  568. package/src/core/components/shadcn/button.tsx +95 -0
  569. package/src/core/components/shadcn/calendar.tsx +87 -0
  570. package/src/core/components/shadcn/card.tsx +76 -0
  571. package/src/core/components/shadcn/checkbox.tsx +30 -0
  572. package/src/core/components/shadcn/command.tsx +155 -0
  573. package/src/core/components/shadcn/dialog.tsx +230 -0
  574. package/src/core/components/shadcn/filters/animateChangeInHeight.tsx +41 -0
  575. package/src/core/components/shadcn/filters/comboBox.tsx +251 -0
  576. package/src/core/components/shadcn/filters/dateFilter.tsx +65 -0
  577. package/src/core/components/shadcn/filters/filterBar.tsx +262 -0
  578. package/src/core/components/shadcn/filters/filters.tsx +110 -0
  579. package/src/core/components/shadcn/filters/index.ts +5 -0
  580. package/src/core/components/shadcn/filters/selectFilter.tsx +91 -0
  581. package/src/core/components/shadcn/filters/textFilter.tsx +59 -0
  582. package/src/core/components/shadcn/filters/types.ts +29 -0
  583. package/src/core/components/shadcn/heading.tsx +23 -0
  584. package/src/core/components/shadcn/index.ts +22 -0
  585. package/src/core/components/shadcn/input.tsx +89 -0
  586. package/src/core/components/shadcn/label.tsx +31 -0
  587. package/src/core/components/shadcn/popover.tsx +115 -0
  588. package/src/core/components/shadcn/selectBox.tsx +186 -0
  589. package/src/core/components/shadcn/separator.tsx +29 -0
  590. package/src/core/components/shadcn/tabs.tsx +218 -0
  591. package/src/core/components/shadcn/text.tsx +33 -0
  592. package/src/core/components/shadcn/theme/ThemeProvider.tsx +73 -0
  593. package/src/core/components/shadcn/theme/ThemeSwitcher.tsx +35 -0
  594. package/src/core/components/shadcn/tooltip.tsx +57 -0
  595. package/src/core/components/styles.ts +11 -0
  596. package/src/core/components/table/index.tsx +49 -0
  597. package/src/core/components/tabs/Tabs.tsx +132 -0
  598. package/src/core/components/tabs/TabsContext.ts +25 -0
  599. package/src/core/components/tabs/index.ts +2 -0
  600. package/src/core/components/toast/NotificationPanel.tsx +91 -0
  601. package/src/core/components/toast/ToastContext.ts +12 -0
  602. package/src/core/components/toast/ToastProps.ts +6 -0
  603. package/src/core/components/toast/ToastProvider.tsx +26 -0
  604. package/src/core/components/toast/index.ts +2 -0
  605. package/src/core/hooks/CompositeState.tsx +142 -0
  606. package/src/core/hooks/SharedState.tsx +69 -0
  607. package/src/core/hooks/index.ts +13 -0
  608. package/src/core/hooks/useClickOutside.tsx +29 -0
  609. package/src/core/hooks/useCopyToClipboard.tsx +28 -0
  610. package/src/core/hooks/useDarkMode.ts +11 -0
  611. package/src/core/hooks/useDebounce.tsx +15 -0
  612. package/src/core/hooks/useEventSource.ts +35 -0
  613. package/src/core/hooks/useFetch.ts +51 -0
  614. package/src/core/hooks/useFlag.tsx +13 -0
  615. package/src/core/hooks/useIntersectionObserver.tsx +40 -0
  616. package/src/core/hooks/useIsFistRendering.ts +17 -0
  617. package/src/core/hooks/useSafeLayoutEffect.ts +5 -0
  618. package/src/core/hooks/useSharedValue.ts +22 -0
  619. package/src/core/index.ts +2 -0
  620. package/src/env/index.ts +116 -0
  621. package/src/features/activity-doc/ActivityDoc.tsx +199 -0
  622. package/src/features/activity-doc/index.ts +1 -0
  623. package/src/features/index.ts +2 -1
  624. package/src/features/permissions/SecureButton.tsx +18 -0
  625. package/src/features/permissions/SecureSidebarItem.tsx +19 -0
  626. package/src/features/permissions/UserPermissionsProvider.tsx +102 -0
  627. package/src/features/permissions/helpers.ts +16 -0
  628. package/src/features/permissions/index.ts +4 -0
  629. package/src/layout/AppLayout.tsx +132 -0
  630. package/src/layout/FullHeightLayout.tsx +74 -0
  631. package/src/layout/Navbar.tsx +127 -0
  632. package/src/layout/Sidebar.tsx +129 -0
  633. package/src/layout/SidebarContext.ts +17 -0
  634. package/src/layout/TitleBar.tsx +7 -0
  635. package/src/layout/index.ts +6 -0
  636. package/src/router/FixLinks.tsx +28 -0
  637. package/src/router/HistoryNavigator.ts +178 -0
  638. package/src/router/Nav.tsx +55 -0
  639. package/src/router/NestedNavigationContext.tsx +32 -0
  640. package/src/router/NestedRouterProvider.tsx +64 -0
  641. package/src/router/PathMatcher.ts +166 -0
  642. package/src/router/PathWithParams.ts +34 -0
  643. package/src/router/Route404.tsx +18 -0
  644. package/src/router/RouteComponent.tsx +41 -0
  645. package/src/router/Router.tsx +216 -0
  646. package/src/router/RouterProvider.tsx +55 -0
  647. package/src/router/index.ts +10 -8
  648. package/src/router/path.ts +151 -0
  649. package/src/session/TypeRegistry.ts +27 -0
  650. package/src/session/UserSession.ts +227 -0
  651. package/src/session/UserSessionProvider.tsx +170 -0
  652. package/src/session/auth/composable.ts +190 -0
  653. package/src/session/auth/firebase.ts +160 -0
  654. package/src/session/auth/useAuthState.ts +61 -0
  655. package/src/session/index.ts +6 -1
  656. package/src/session/useUXTracking.tsx +38 -0
  657. package/src/widgets/codemirror/CodeMirrorEditor.tsx +121 -0
  658. package/src/widgets/codemirror/CodemirrorStateSingleton.tsx +39 -0
  659. package/src/widgets/codemirror/index.ts +2 -0
  660. package/src/widgets/form/Form.tsx +194 -0
  661. package/src/widgets/form/FormContext.ts +38 -0
  662. package/src/widgets/form/ManagedObject.ts +332 -0
  663. package/src/widgets/form/fields.tsx +34 -0
  664. package/src/widgets/form/index.ts +6 -0
  665. package/src/widgets/form/inputs.tsx +44 -0
  666. package/src/widgets/form/schema.ts +215 -0
  667. package/src/widgets/index.ts +5 -0
  668. package/src/widgets/json-view/JSONCode.tsx +176 -0
  669. package/src/widgets/json-view/JSONDisplay.tsx +24 -0
  670. package/src/widgets/json-view/JSONView.tsx +183 -0
  671. package/src/widgets/json-view/index.ts +4 -0
  672. package/src/widgets/json-view/types.ts +5 -0
  673. package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +68 -0
  674. package/src/widgets/schema-editor/ManagedSchema.ts +340 -0
  675. package/src/widgets/schema-editor/editor/Editable.tsx +252 -0
  676. package/src/widgets/schema-editor/editor/EditableSchemaProperty.tsx +15 -0
  677. package/src/widgets/schema-editor/editor/PropertyEditor.tsx +150 -0
  678. package/src/widgets/schema-editor/editor/PropertyViewer.tsx +15 -0
  679. package/src/widgets/schema-editor/editor/SchemaContext.tsx +9 -0
  680. package/src/widgets/schema-editor/editor/SchemaEditor.test.ts +48 -0
  681. package/src/widgets/schema-editor/editor/SchemaEditor.tsx +161 -0
  682. package/src/widgets/schema-editor/index.ts +7 -0
  683. package/src/widgets/schema-editor/json-schema4-utils.ts +187 -0
  684. package/src/widgets/schema-editor/type-signature.ts +39 -0
  685. package/src/widgets/xml-viewer/components/Attributes/index.tsx +27 -0
  686. package/src/widgets/xml-viewer/components/CDataTag/index.tsx +21 -0
  687. package/src/widgets/xml-viewer/components/CollapseIcon/index.tsx +32 -0
  688. package/src/widgets/xml-viewer/components/CommentTag/index.tsx +30 -0
  689. package/src/widgets/xml-viewer/components/DeclarationTag/index.tsx +23 -0
  690. package/src/widgets/xml-viewer/components/Elements/index.tsx +83 -0
  691. package/src/widgets/xml-viewer/components/InvalidXml/index.tsx +3 -0
  692. package/src/widgets/xml-viewer/components/Tag/index.tsx +47 -0
  693. package/src/widgets/xml-viewer/components/TextElement/index.tsx +28 -0
  694. package/src/widgets/xml-viewer/components/XMLViewer.tsx +53 -0
  695. package/src/widgets/xml-viewer/components/types.ts +104 -0
  696. package/src/widgets/xml-viewer/constants/index.ts +17 -0
  697. package/src/widgets/xml-viewer/context/xml-viewer-context.ts +12 -0
  698. package/src/widgets/xml-viewer/helpers/index.ts +56 -0
  699. package/src/widgets/xml-viewer/hooks/useCollapsible.ts +28 -0
  700. package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +34 -0
  701. package/src/widgets/xml-viewer/index.ts +2 -0
  702. package/src/widgets/xml-viewer/types/index.ts +21 -0
  703. package/lib/esm/components/index.js +0 -3
  704. package/lib/esm/components/index.js.map +0 -1
  705. package/lib/types/components/index.d.ts +0 -0
  706. package/lib/vertesia-ui-components.js +0 -2
  707. package/lib/vertesia-ui-components.js.map +0 -1
  708. package/src/components/index.ts +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertesia-ui-core.js","sources":["esm/core/hooks/CompositeState.js","esm/core/hooks/SharedState.js","esm/core/hooks/useClickOutside.js","esm/core/hooks/useCopyToClipboard.js","esm/core/hooks/useDarkMode.js","esm/core/hooks/useDebounce.js","esm/core/hooks/useEventSource.js","esm/core/hooks/useFetch.js","esm/core/hooks/useFlag.js","esm/core/hooks/useIntersectionObserver.js","esm/core/hooks/useIsFistRendering.js","esm/core/hooks/useSafeLayoutEffect.js","esm/core/hooks/useSharedValue.js","esm/core/components/Avatar.js","esm/core/components/libs/utils.js","esm/core/components/Badge.js","esm/core/components/Center.js","esm/core/components/popup/position.js","esm/core/components/popup/utils.js","esm/core/components/popup/PopupController.js","esm/core/components/popup/Popup.js","esm/core/components/ComboBox.js","esm/core/components/shadcn/tooltip.js","esm/core/components/shadcn/button.js","esm/core/components/shadcn/theme/ThemeProvider.js","esm/core/components/shadcn/theme/ThemeSwitcher.js","esm/core/components/shadcn/card.js","esm/core/components/libs/visuallyHidden.js","esm/core/components/shadcn/dialog.js","esm/core/components/shadcn/input.js","esm/core/components/shadcn/separator.js","esm/core/components/shadcn/popover.js","esm/core/components/shadcn/command.js","esm/core/components/shadcn/selectBox.js","esm/core/components/shadcn/tabs.js","esm/core/components/shadcn/label.js","esm/core/components/shadcn/breadcrumb.js","esm/core/components/shadcn/filters/animateChangeInHeight.js","esm/core/components/shadcn/calendar.js","esm/core/components/shadcn/checkbox.js","esm/core/components/shadcn/filters/comboBox.js","esm/core/components/shadcn/filters/filters.js","esm/core/components/shadcn/filters/textFilter.js","esm/core/components/shadcn/filters/dateFilter.js","esm/core/components/shadcn/filters/selectFilter.js","esm/core/components/shadcn/filters/filterBar.js","esm/core/components/shadcn/filters/types.js","esm/core/components/shadcn/heading.js","esm/core/components/shadcn/text.js","esm/core/components/ConfirmModal.js","esm/core/components/toast/ToastContext.js","esm/core/components/Portal.js","esm/core/components/toast/NotificationPanel.js","esm/core/components/toast/ToastProvider.js","esm/core/components/DeleteModal.js","esm/core/components/Divider.js","esm/core/components/SidePanel.js","esm/core/components/Dropdown.js","esm/core/components/DropdownList.js","esm/core/components/Spinner.js","esm/core/components/Button.js","esm/core/components/EmptyCollection.js","esm/core/components/FileUpload.js","esm/core/components/styles.js","esm/core/components/Input.js","esm/core/components/InputList.js","esm/core/components/Link.js","esm/core/components/MenuList.js","esm/core/components/MessageBox.js","esm/core/components/Modal.js","esm/core/components/NumberInput.js","esm/core/components/RadioGroup.js","esm/core/components/SelectBox.js","esm/core/components/SelectList.js","esm/core/components/SelectStack.js","esm/core/components/Switch.js","esm/core/components/table/index.js","esm/core/components/tabs/TabsContext.js","esm/core/components/tabs/Tabs.js","esm/core/components/Textarea.js"],"sourcesContent":["import React, { useContext, useEffect, useState } from \"react\";\n//type KeysOfType<T, V> = { [K in keyof T]-?: T[K] extends V ? K : never }[keyof T];\n//type KeysNotOfType<T, V> = { [K in keyof T]-?: T[K] extends V ? never : K }[keyof T];\nexport class Property {\n _value;\n watchers = [];\n constructor(value) {\n this._value = value;\n }\n get value() {\n return this._value;\n }\n set value(value) {\n if (value !== this._value) {\n this._value = value;\n for (const watcher of this.watchers) {\n watcher(value);\n }\n }\n }\n watch(watcher) {\n this.watchers.push(watcher);\n return () => {\n this.watchers = this.watchers.filter(w => w !== watcher);\n };\n }\n}\nexport function createCompositeStateProvider(StateClass) {\n const context = React.createContext(undefined);\n StateClass.Context = context;\n return context.Provider;\n}\nexport class Slot {\n consume = undefined;\n _current;\n constructor(content) {\n this._current = content;\n }\n set current(content) {\n if (content !== this._current) {\n this._current = content;\n this.consume?.(content);\n }\n }\n get current() {\n return this._current;\n }\n withConsumer(consume) {\n this.consume = consume;\n consume && consume(this.current);\n return this;\n }\n}\nexport function useCompositeState(StateClass) {\n const context = StateClass.Context;\n if (!context) {\n throw new Error(\"Context not defined for \" + StateClass.name);\n }\n return useContext(context);\n}\nexport function useGetCompositeStateProperty(property) {\n const [value, setValue] = useState(property.value);\n useEffect(() => {\n return property.watch((value) => {\n if (typeof value === 'function') {\n setValue(() => value); // cannot directly store functions\n }\n else {\n setValue(value);\n }\n });\n }, [property]);\n return value;\n}\n// use memo on value to avoid re-computations if needed\nexport function useSetCompositeStateProperty(property, value) {\n useEffect(() => {\n property.value = value;\n return () => {\n property.value = undefined;\n };\n }, [property, value]);\n return value;\n}\n// use memo on watcher to avoid re-computations if needed\nexport function useWatchCompositeStateProperty(property, watcher) {\n useEffect(() => {\n return property.watch(watcher);\n }, [property, watcher]);\n}\nexport function useSlot(slot) {\n const [value, setValue] = useState(slot.current);\n useEffect(() => {\n slot.withConsumer(setValue);\n return () => {\n slot.withConsumer(undefined);\n };\n }, [slot]);\n return value;\n}\nexport function useWatchSlot(slot, watcher) {\n useEffect(() => {\n slot.withConsumer(watcher);\n return () => {\n slot.withConsumer(undefined);\n };\n }, [slot, watcher]);\n}\n// use memo for value if needed\nexport function useDefineSlot(slot, value) {\n useEffect(() => {\n slot.current = value;\n return () => {\n slot.current = undefined;\n };\n }, [slot, value]);\n}\n//# sourceMappingURL=CompositeState.js.map","import { useEffect, useState } from \"react\";\nexport class SharedState {\n _value;\n watchers = [];\n constructor(value) {\n this._value = value;\n }\n get value() {\n return this._value;\n }\n set value(value) {\n if (value !== this._value) {\n this._value = value;\n for (const watcher of this.watchers) {\n watcher(value);\n }\n }\n }\n addWatcher(watcher) {\n this.watchers.push(watcher);\n return () => {\n this.watchers = this.watchers.filter(w => w !== watcher);\n };\n }\n}\nexport function useWatchSharedState(state) {\n const [value, setValue] = useState(state.value);\n useEffect(() => {\n return state.addWatcher((value) => {\n if (typeof value === 'function') {\n setValue(() => value); // cannot directly store functions\n }\n else {\n setValue(value);\n }\n });\n }, [state]);\n return value;\n}\n// export function createSharedStateContext<T>(initialValue: T) {\n// const Context = React.createContext<SharedState<T>>(undefined as any);\n// function SharedStateProvider({ value = initialValue, children }: {\n// value?: T,\n// children: React.ReactNode\n// }) {\n// const state = useMemo(() => {\n// return new SharedState(value);\n// }, []);\n// return <Context.Provider value={state}>{children}</Context.Provider>\n// }\n// const useSharedState = () => {\n// return React.useContext(Context);\n// }\n// return {\n// Context,\n// Provider: SharedStateProvider,\n// useSharedState,\n// useWatchSharedState: () => {\n// const state = useSharedState();\n// return state ? useWatchSharedState(state) : undefined;\n// }\n// }\n// }\n//# sourceMappingURL=SharedState.js.map","import { useEffect, useRef } from \"react\";\n/**\n *\n * @param callback\n * @param skipFn an optional function to skip the callback if the event matches some condition. Return true to skip\n * @returns\n */\nexport function useClickOutside(callback, skipFn) {\n const ref = useRef(null);\n useEffect(() => {\n const handleClick = (e) => {\n if (ref.current && !ref.current.contains(e.target)) {\n if (!skipFn || !skipFn(e)) {\n callback(e);\n }\n }\n };\n // add te listener just after the render to avoid the callback to be called on the current click\n // if you are in a click context\n window.setTimeout(() => {\n document.addEventListener('click', handleClick);\n }, 0);\n return () => {\n document.removeEventListener('click', handleClick);\n };\n }, []);\n return ref;\n}\n//# sourceMappingURL=useClickOutside.js.map","import { useState } from 'react';\nexport function useCopyToClipboard() {\n const [copiedText, setCopiedText] = useState(null);\n const copy = async (text) => {\n if (!navigator?.clipboard) {\n console.warn('Clipboard not supported');\n return false;\n }\n // Try to save to clipboard then save it in the state if worked\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n }\n catch (error) {\n console.warn('Copy failed', error);\n setCopiedText(null);\n return false;\n }\n };\n return [copiedText, copy];\n}\n//# sourceMappingURL=useCopyToClipboard.js.map","import { useEffect } from \"react\";\nexport function useDarkMode(cb) {\n useEffect(() => {\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n const _cb = (e) => cb(e.matches);\n mediaQuery.addEventListener('change', _cb);\n cb(mediaQuery.matches);\n return () => mediaQuery.removeEventListener('change', _cb);\n }, []);\n}\n//# sourceMappingURL=useDarkMode.js.map","import { useEffect, useState } from \"react\";\nexport function useDebounce(value, delay) {\n const [debounceValue, setDebounceValue] = useState(value);\n useEffect(() => {\n const handler = setTimeout(() => {\n setDebounceValue(value);\n }, delay);\n return () => {\n clearTimeout(handler);\n };\n }, [value, delay]);\n return debounceValue;\n}\n//# sourceMappingURL=useDebounce.js.map","import { useEffect } from \"react\";\nfunction startSse(url, onMessage, onCompleted) {\n const chunks = [];\n const sse = new EventSource(url);\n sse.addEventListener(\"message\", ev => {\n const data = JSON.parse(ev.data);\n if (data) {\n chunks.push(data);\n onMessage(chunks.join(''));\n }\n });\n sse.addEventListener(\"close\", (ev) => {\n sse.close();\n const msg = JSON.parse(ev.data);\n onCompleted(msg);\n });\n return () => {\n sse.close();\n };\n}\nexport function useEventSource(url, onMessage, onCompleted) {\n useEffect(() => {\n if (typeof url === 'function') {\n url().then(url => startSse(url, onMessage, onCompleted));\n }\n else {\n startSse(url, onMessage, onCompleted);\n }\n }, [url]);\n}\n//# sourceMappingURL=useEventSource.js.map","import { useEffect, useState } from \"react\";\nexport function useFetch(fetcher, opts) {\n if (Array.isArray(opts)) {\n opts = { deps: opts };\n }\n const options = (opts || {});\n const [error, setError] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n const [data, setData] = useState(options.defaultValue);\n const fetch = () => {\n options.start && options.start();\n setIsLoading(true);\n return fetcher().then((result) => {\n setData(result);\n options.onSuccess && options.onSuccess(result);\n }).catch(error => {\n setError(error);\n options.onError && options.onError(error);\n }).finally(() => {\n setIsLoading(false);\n options.end && options.end();\n });\n };\n useEffect(() => {\n if (!options.condition || options.condition()) {\n fetch();\n }\n }, options.deps);\n return { data, isLoading, error, setData, refetch: fetch };\n}\nexport function useFetchOnce(fetcher, opts) {\n if (!opts || Array.isArray(opts)) {\n opts = { deps: [] };\n }\n else if (opts) {\n opts.deps = [];\n }\n return useFetch(fetcher, opts);\n}\n//# sourceMappingURL=useFetch.js.map","import { useState } from \"react\";\nexport function useFlag(isOn = false) {\n const [state, setState] = useState(isOn);\n return {\n isOn: state,\n isOff: !state,\n set: (value) => setState(value),\n on: () => setState(true),\n off: () => setState(false),\n toggle: () => setState(!state)\n };\n}\n//# sourceMappingURL=useFlag.js.map","import { useEffect } from \"react\";\n/**\n * if leave option is true then callback will be called when the target leaves the viewport\n * otherwise when it enters the viewport\n * @param target\n * @param cb\n * @param opts\n */\nexport function useIntersectionObserver(target, cb, opts = {}) {\n useEffect(() => {\n const observer = new IntersectionObserver(entries => {\n const isEntering = entries[0].isIntersecting;\n if (opts.leave) {\n if (!isEntering) {\n cb(entries[0]);\n }\n }\n else {\n if (isEntering) {\n cb(entries[0]);\n }\n }\n }, { threshold: opts.threshold || 1 });\n if (target.current) {\n observer.observe(target.current);\n }\n return () => {\n if (target.current) {\n observer.unobserve(target.current);\n }\n };\n }, opts.deps ? opts.deps.concat(target) : [target]);\n}\n//# sourceMappingURL=useIntersectionObserver.js.map","import { useEffect, useRef } from \"react\";\nexport function useIsFirstRendering() {\n const isFirstRender = useRef(true);\n useEffect((cb) => {\n if (cb && isFirstRender.current) {\n cb();\n }\n isFirstRender.current = false;\n // ---> StrictMode: The following is REQUIRED to reset/cleanup:\n return () => { isFirstRender.current = true; };\n }, []);\n return isFirstRender.current;\n}\n//# sourceMappingURL=useIsFistRendering.js.map","import { useEffect, useLayoutEffect } from \"react\";\nconst useSafeLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\nexport { useSafeLayoutEffect };\n//# sourceMappingURL=useSafeLayoutEffect.js.map","import { useState } from \"react\";\nexport class SharedValue {\n state;\n constructor(state) {\n this.state = state;\n }\n get() {\n return this.state[0];\n }\n set(value) {\n this.state[1](value);\n }\n}\n/**\n * Share a stateful value\n */\nexport function useSharedValue(initialValue) {\n const state = useState(initialValue);\n return new SharedValue(state);\n}\n//# sourceMappingURL=useSharedValue.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getRealSize(size) {\n switch (size) {\n case 'xs': return 'size-4';\n case 'sm': return 'size-6';\n case 'md': return 'size-8';\n case 'lg': return 'size-10';\n case 'xl': return 'size-12';\n case '2xl': return 'size-14';\n default: throw new Error('Unexpected size: ' + size);\n }\n}\nexport function Avatar({ size, src, name, shape = \"circle\", color = 'bg-gray-500', className }) {\n const rounded = shape === 'circle' ? 'rounded-full' : 'rounded-md';\n const sizeClass = getRealSize(size || 'md');\n if (src) {\n return (_jsx(\"img\", { className: `inline-block ${sizeClass} ${rounded} ${color} ${className}`, src: src, alt: name || src, title: name }));\n }\n if (name) {\n const [first, second] = name.split(' ');\n let text = second ? `${first[0]}${second[0]}` : `${first[0]}${first[1]}`;\n return (_jsx(\"span\", { className: `inline-flex ${sizeClass} items-center justify-center ${rounded} ${color} ${className}`, title: name, children: _jsx(\"span\", { className: `${(size != 'xs') ? 'text-xs' : 'text-[0.6rem]'} font-medium leading-none text-white`, children: text }) }));\n }\n return (_jsx(\"span\", { className: `inline-block ${sizeClass} overflow-hidden ${rounded} ${color}`, children: _jsx(\"svg\", { className: \"h-full w-full text-gray-300\", fill: \"currentColor\", viewBox: \"0 0 24 24\", children: _jsx(\"path\", { d: \"M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z\" }) }) }));\n}\nexport function SvgAvatar({ size, shape = \"circle\", color = 'bg-gray-500', className, children }) {\n const rounded = shape === 'circle' ? 'rounded-full' : 'rounded-md';\n const sizeClass = getRealSize(size || 'md');\n return (_jsx(\"span\", { className: `inline-block ${sizeClass} overflow-hidden ${rounded} ${color} ${className}`, children: children }));\n}\n//# sourceMappingURL=Avatar.js.map","import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nexport function cn(...inputs) {\n return twMerge(clsx(inputs));\n}\n//# sourceMappingURL=utils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"./libs/utils\";\n// Base badge variants\nconst badgeVariants = cva(\"inline-flex items-center rounded-md px-2 py-1 text-xs font-medium\", {\n variants: {\n variant: {\n default: \"text-foreground bg-muted\",\n secondary: \"bg-secondary text-primary\",\n destructive: \"bg-destructive text-destructive\",\n attention: \"bg-attention text-attention\",\n success: \"bg-success text-success\",\n info: \"bg-info text-info\",\n done: \"bg-done text-done\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n// Base Badge component\nexport function Badge({ className, variant, children, onClick, ...props }) {\n return (_jsx(\"span\", { className: cn(badgeVariants({ variant }), className), onClick: onClick, ...props, children: children }));\n}\nconst dotBadgeVariants = cva(\n// Base styles\n\"inline-flex items-center gap-x-1.5 rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ring-border\", {\n variants: {\n variant: {\n default: \"\",\n success: \"\",\n destructive: \"\",\n attention: \"\",\n done: \"\",\n info: \"\",\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n});\n// Separate dot variants to allow className overrides\nconst dotVariants = cva(\"h-1.5 w-1.5\", {\n variants: {\n variant: {\n default: \"fill-foreground\",\n success: \"fill-success\",\n destructive: \"fill-destructive\",\n attention: \"fill-attention\",\n done: \"fill-done\",\n info: \"fill-info\",\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n});\nexport function DotBadge({ variant, className, dotClassName, // New prop for dot-specific classes\nchildren, ...props }) {\n return (_jsxs(\"span\", { className: cn(dotBadgeVariants({ variant }), className), ...props, children: [_jsx(\"svg\", { className: cn(dotVariants({ variant }), dotClassName), viewBox: \"0 0 6 6\", \"aria-hidden\": \"true\", children: _jsx(\"circle\", { cx: 3, cy: 3, r: 3 }) }), children] }));\n}\n//# sourceMappingURL=Badge.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nexport function Center({ className, children }) {\n return (_jsx(\"div\", { className: clsx('flex items-ceter justify-center', className), children: children }));\n}\n//# sourceMappingURL=Center.js.map","function flipPos(position) {\n switch (position) {\n case \"top\": return \"bottom\";\n case \"bottom\": return \"top\";\n case \"left\": return \"right\";\n case \"right\": return \"left\";\n case \"ne\": return \"sw\";\n case \"nw\": return \"se\";\n case \"se\": return \"nw\";\n case \"sw\": return \"ne\";\n default: return position;\n }\n}\nfunction flipAlign(align) {\n switch (align) {\n case \"start\": return \"end\";\n case \"end\": return \"start\";\n default: return align;\n }\n}\nclass PositionResolver {\n /**\n * The computed left coordinate (i.e. x)\n */\n left;\n /**\n * The computed top coordinate (i.e. y)\n */\n top;\n /**\n * The computed width constraint. If undefined it means that the width is not constrained.\n */\n width;\n /**\n * The computed height constraint. If undefined it means that the height is not constrained.\n */\n height;\n /**\n * Alignment axis. The axis is computed from the position constraints.\n * If no axis is found - no alignment will be done\n */\n alignAxis;\n /**\n * A gap size between the anchor element and the target element.\n */\n gap;\n constructor(gap = 0) {\n this.gap = gap;\n }\n position(pos, anchorRect, elemRect) {\n switch (pos) {\n case \"top\": {\n this.top = anchorRect.top - elemRect.height - this.gap;\n this.alignAxis = 'x';\n break;\n }\n case \"bottom\": {\n this.top = anchorRect.bottom + this.gap;\n this.alignAxis = 'x';\n break;\n }\n case \"left\": {\n this.left = anchorRect.left - elemRect.width - this.gap;\n this.alignAxis = 'y';\n break;\n }\n case \"right\": {\n this.left = anchorRect.right + this.gap;\n this.alignAxis = 'y';\n break;\n }\n case \"ne\": {\n this.top = anchorRect.top - elemRect.height - this.gap;\n this.left = anchorRect.right + this.gap;\n break;\n }\n case \"nw\": {\n this.top = anchorRect.top - elemRect.height - this.gap;\n this.left = anchorRect.left - elemRect.width - this.gap;\n break;\n }\n case \"se\": {\n this.top = anchorRect.bottom + this.gap;\n this.left = anchorRect.right + this.gap;\n break;\n }\n case \"sw\": {\n this.top = anchorRect.bottom + this.gap;\n this.left = anchorRect.left - elemRect.width - this.gap;\n break;\n }\n }\n }\n align(align, anchorRect, elemRect) {\n if (!this.alignAxis)\n return; // no alignment axis\n switch (align) {\n case 'start': {\n if (this.alignAxis === 'x') {\n this.left = anchorRect.left;\n }\n else {\n this.top = anchorRect.top;\n }\n break;\n }\n case 'end': {\n if (this.alignAxis === 'x') {\n this.left = anchorRect.right - elemRect.width;\n }\n else {\n this.top = anchorRect.bottom - elemRect.height;\n }\n break;\n }\n case 'center': {\n // centering depend on the final value of the width / height\n if (this.alignAxis === 'x') {\n this.left = anchorRect.left + anchorRect.width / 2 - elemRect.width / 2;\n }\n else {\n this.top = anchorRect.top + anchorRect.height / 2 - elemRect.height / 2;\n }\n break;\n }\n case 'fill': {\n if (this.alignAxis === 'x') {\n this.left = anchorRect.left;\n this.width = anchorRect.right - anchorRect.left;\n }\n else {\n this.top = anchorRect.top;\n this.height = anchorRect.bottom - anchorRect.top;\n }\n break;\n }\n }\n }\n computePosition(constraints, elemRect, anchorRect) {\n this.position(constraints.position, anchorRect, elemRect);\n constraints.align && this.align(constraints.align, anchorRect, elemRect);\n if (!this.left && !this.top) {\n throw new Error(\"Invalid position. Cannot compute x,y coordinates\");\n }\n const constrainWidth = this.width != null;\n const constrainHeight = this.height != null;\n const width = constrainWidth ? this.width : elemRect.width;\n const height = constrainHeight ? this.height : elemRect.height;\n return {\n rect: new DOMRect(this.left, this.top, width, height),\n constrainWidth,\n constrainHeight,\n position: constraints.position,\n align: constraints.align\n };\n }\n flipAxis(constraints, axis) {\n if (this.alignAxis === axis) { // flip alignment\n if (constraints.align) {\n const newAlign = flipAlign(constraints.align);\n if (newAlign !== constraints.align) {\n return { ...constraints, align: newAlign };\n }\n }\n }\n else { // flip positioning\n const newPos = flipPos(constraints.position);\n if (newPos !== constraints.position) {\n return { ...constraints, position: newPos };\n }\n }\n return null; // nothing to do\n }\n}\nfunction isElementVisible(elemRect, clientRect) {\n return elemRect.left >= clientRect.left && elemRect.right <= clientRect.right\n &&\n elemRect.top >= clientRect.top && elemRect.bottom <= clientRect.bottom;\n}\nfunction isElementVisibleOnAxis(elemRect, clientRect, axis) {\n if (axis === 'x') {\n return elemRect.left >= clientRect.left && elemRect.right <= clientRect.right;\n }\n else {\n return elemRect.top >= clientRect.top && elemRect.bottom <= clientRect.bottom;\n }\n}\n/**\n * Compute the position by trying to adjust the constraints until the computed position fits into the client area.\n * Returns the best position that fits the constraints.\n * @param constraints\n * @param elemRect\n * @param anchorRect\n * @param clientRect\n * @returns null if the element cannot be positioned otherwise returns a position object\n */\nexport function computePosition(constraints, elemRect, anchorRect, clientRect) {\n const resolver = new PositionResolver(constraints.gap);\n let computedPos = resolver.computePosition(constraints, elemRect, anchorRect);\n const isVisibleOnXAxis = isElementVisibleOnAxis(computedPos.rect, clientRect, 'x');\n const isVisibleOnYAxis = isElementVisibleOnAxis(computedPos.rect, clientRect, 'y');\n if (isVisibleOnXAxis && isVisibleOnYAxis) {\n return computedPos; // the element is visible on both axis\n }\n let newConstraints = null;\n if (!isVisibleOnXAxis) {\n newConstraints = resolver.flipAxis(constraints, 'x');\n }\n if (!isVisibleOnYAxis) {\n newConstraints = resolver.flipAxis(newConstraints || constraints, 'y');\n }\n if (!newConstraints) {\n return null; // cannot find a better position\n }\n computedPos = new PositionResolver(resolver.gap).computePosition(newConstraints, elemRect, anchorRect);\n if (isElementVisible(computedPos.rect, clientRect)) {\n return computedPos;\n }\n return null; // cannot find a better position\n}\n//# sourceMappingURL=position.js.map","/**\n * Compute the intersection of the two given rects.\n * @param rect1\n * @param rect2\n * @returns\n */\nexport function intersectRects(rect1, rect2) {\n const x1 = Math.max(rect1.left, rect2.left);\n const y1 = Math.max(rect1.top, rect2.top);\n const x2 = Math.min(rect1.right, rect2.right);\n const y2 = Math.min(rect1.bottom, rect2.bottom);\n if (x2 <= x1 || y2 <= y1) {\n return null; // No intersection\n }\n return new DOMRect(x1, y1, x2 - x1, y2 - y1);\n}\n/**\n * Compute the visible rectangle of the scrollable parents.\n * @param scrollableParents\n * @returns\n */\nexport function computeVisibleClientRect(scrollableParents) {\n if (scrollableParents.length === 0)\n return null;\n // Initialize the rect as the bounding rect of the first scrollable parent\n let rect = scrollableParents[0].getBoundingClientRect();\n // Iterate over the remaining scrollable parents to compute the intersection\n for (let i = 1, l = scrollableParents.length; i < l; i++) {\n const parentRect = scrollableParents[i].getBoundingClientRect();\n rect = intersectRects(parentRect, rect);\n // If there is no intersection, exit early\n if (!rect) {\n return null;\n }\n }\n return rect;\n}\n/**\n * Tests whether the given element is scrollable in any direction.\n * @param element\n * @returns\n */\nexport function isScrollable(element) {\n const hasScrollY = element.scrollHeight > element.clientHeight;\n const hasScrollX = element.scrollWidth > element.clientWidth;\n if (hasScrollY || hasScrollX) {\n const style = getComputedStyle(element);\n if ((hasScrollY && style.overflowY !== 'visible') || (hasScrollX && style.overflowX !== 'visible')) {\n return true;\n }\n }\n return false;\n}\n/**\n * Get the list of scrollable parents of the given element. The list always include the root parent at the end.\n * The root parent is either the document.documentElement or the given root element.\n * To iterate the list from top to down you need to iterate from the end to the start of the list,\n * since the root parent is always the last element and the nearest scrollable parent is the first element.\n * @param element\n * @param root\n * @returns\n */\nexport function getScrollableParents(element, root = document.documentElement) {\n const parents = [];\n let parent = element.parentElement;\n while (parent && parent !== root) {\n isScrollable(parent) && parents.push(parent);\n parent = parent.parentElement;\n }\n // Always push the root element\n parents.push(root);\n return parents;\n}\n//# sourceMappingURL=utils.js.map","import { computePosition } from \"./position\";\nimport { computeVisibleClientRect, getScrollableParents } from \"./utils\";\nexport class PopupController {\n options;\n root;\n scrollableParents;\n visibleClientRect;\n context;\n constructor(options) {\n this.options = options;\n this.root = options.root || document.documentElement;\n this.scrollableParents = getScrollableParents(this.anchor, this.root);\n this.visibleClientRect = computeVisibleClientRect(this.scrollableParents);\n }\n get anchor() {\n return this.options.anchor;\n }\n registerListeners(element) {\n const parents = this.scrollableParents;\n const updateHandler = () => {\n this.update();\n };\n // add a window resize listener\n window.addEventListener('resize', updateHandler);\n //TODO do we add scroll listeners to the window?\n // add scroll listeners to all scrollable parents\n for (const parent of parents) {\n parent.addEventListener('scroll', updateHandler);\n }\n let closeOnClick;\n if (this.options.closeOnClick) {\n closeOnClick = (ev) => {\n if (!element.contains(ev.target)) {\n this.tryClose();\n }\n };\n // register in the next event loop cycle since the current one\n // is may be triggered by a click event\n window.setTimeout(function () {\n closeOnClick && document.addEventListener('click', closeOnClick);\n }, 0);\n }\n let closeOnEsc;\n if (this.options.closeOnEsc) {\n closeOnEsc = (ev) => {\n if (ev.key === 'Escape') {\n this.tryClose();\n }\n };\n window.setTimeout(function () {\n closeOnEsc && document.addEventListener('keydown', closeOnEsc);\n }, 0);\n }\n const blockPageScroll = this.options.blockPageScroll;\n if (blockPageScroll) {\n document.body.style.overflow = \"hidden\";\n document.body.style.height = \"100%\";\n }\n return () => {\n window.removeEventListener('resize', updateHandler);\n for (const parent of parents) {\n parent.removeEventListener('scroll', updateHandler);\n }\n closeOnClick && document.removeEventListener('click', closeOnClick);\n closeOnEsc && document.removeEventListener('keydown', closeOnEsc);\n if (blockPageScroll) {\n document.body.style.overflow = \"\";\n document.body.style.height = \"\";\n }\n };\n }\n open(element, constraints) {\n if (this.context) {\n throw new Error(\"The popup controller is already bound to an element\");\n }\n this.tryOpen(element, constraints);\n }\n tryOpen(element, constraints) {\n if (this.context) {\n return; // do nothing if the popup is already open\n }\n this.context = {\n element,\n constraints,\n cleanup: this.registerListeners(element)\n };\n element.style.display = \"\";\n element.style.visibility = \"hidden\";\n // update the popup position\n this.update();\n this.options.onOpen && this.options.onOpen(this);\n }\n close() {\n if (!this.context) {\n throw new Error(\"The popup controller is not bound to an element\");\n }\n this.tryClose();\n }\n tryClose() {\n if (!this.context) {\n return; // do nothing if the popup is not open\n }\n this.options.onClose && this.options.onClose(this);\n this.context.cleanup();\n //TODO\n this.context.element.style.display = \"none\";\n this.context = undefined;\n }\n get isOpen() {\n return !!this.context;\n }\n update() {\n if (!this.context)\n return; // do nothing if the popup is not open\n // update the position of the popup\n const element = this.context.element;\n const constraints = this.context.constraints;\n const elemRect = element.getBoundingClientRect();\n const anchorRect = this.anchor.getBoundingClientRect();\n const clientRect = this.visibleClientRect;\n if (!clientRect) {\n // the popup is not visible\n return;\n }\n const position = computePosition(constraints, elemRect, anchorRect, clientRect);\n this.context.position = position || undefined;\n if (position) {\n if (position.constrainHeight) {\n element.style.height = position.rect.height + 'px';\n }\n if (position.constrainWidth) {\n element.style.width = position.rect.width + 'px';\n }\n element.style.left = position.rect.left + 'px';\n element.style.top = position.rect.top + 'px';\n element.style.visibility = \"visible\";\n }\n }\n createPopupElement() {\n const popup = document.createElement('div');\n popup.style.margin = \"0\";\n popup.style.padding = \"0\";\n popup.style.border = \"none\";\n popup.style.background = \"transparent\";\n popup.className = \"composable-Popup\";\n return popup;\n }\n}\n//# sourceMappingURL=PopupController.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createContext, useContext, useEffect, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { PopupController } from \"./PopupController\";\nconst PopupContext = createContext(undefined);\nexport function usePopupController() {\n const ctrl = useContext(PopupContext);\n if (!ctrl)\n throw new Error(\"usePopupController must be used inside a Popup component\");\n return ctrl;\n}\nexport function DOMPopup({ ctrlRef, id, constraints, isOpen, children, className, onClose, zIndex, position, ...props }) {\n const popupRef = useRef(null);\n const [ctrl, setCtrl] = useState();\n useEffect(() => {\n if (!props.anchor)\n throw new Error(\"Anchor element is required\");\n const _ctrl = new PopupController({\n ...props,\n onClose\n });\n setCtrl(_ctrl);\n return () => {\n _ctrl.tryClose();\n };\n }, []);\n useEffect(() => {\n if (ctrlRef) {\n ctrlRef.current = ctrl;\n }\n }, [ctrl]);\n // effect to open / close the popup\n useEffect(() => {\n if (ctrl && popupRef.current) {\n if (ctrl.isOpen !== isOpen) {\n if (isOpen) {\n ctrl.open(popupRef.current, constraints);\n }\n else {\n ctrl.close();\n }\n }\n }\n else if (ctrl?.isOpen && !isOpen) {\n // close the popup - happens when isOpen becomes false but the ctrl is still open\n // and the popupRef was destroyed by the isOpen && below\n ctrl.close();\n }\n }, [isOpen, ctrl, popupRef.current]);\n return (_jsx(PopupContext.Provider, { value: ctrl, children: isOpen && createPortal(_jsx(\"div\", { id: id, style: {\n //display: isOpen ? 'block' : 'none',\n visibility: 'hidden',\n position: position || 'absolute',\n zIndex: zIndex || 100,\n }, ref: popupRef, className: className, children: children }), document.body) }));\n}\nexport function Popup({ anchor, root, children, ...others }) {\n return anchor.current && (!root || root.current) ? (_jsx(DOMPopup, { anchor: anchor.current, root: root?.current || undefined, ...others, children: children })) : null;\n}\n//# sourceMappingURL=Popup.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\nimport clsx from 'clsx';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { Popup } from \"./popup/index\";\nconst INPUT_UNSTYLED = \"block m-0 p-0 border-0 focus:outline-none focus:ring-0 bg-transparent\";\nconst INPUT_NO_PADDING = \"block sm:text-sm sm:leading-6 rounded-md border-0 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-slate-600 dark:text-slate-50 dark:bg-slate-800 placeholder:text-gray-400 dark:placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 dark:focus:ring-indigo-800\";\nconst INPUT = INPUT_NO_PADDING + \" py-1.5\";\nconst COMBOBOX_POPUP = \"combobox-popup\";\nfunction genComboboxPopupId() {\n return `combobox-popup-${Math.floor(Math.random() * 1000000)}`;\n}\nexport class OptionAdapter {\n filter(items, text) {\n const lcText = text.toLowerCase();\n return items.filter((item) => this.valueOf(item).toLowerCase().includes(lcText));\n }\n renderOption(item) {\n return this.valueOf(item);\n }\n findById(items, id) {\n return items.find(item => this.idOf(item) === id);\n }\n // override to support creating new items\n createItem(_value) {\n return null; // default is no new item\n }\n}\nexport class StringOptionAdapter extends OptionAdapter {\n valueOf(item) {\n return String(item);\n }\n idOf(item) {\n return String(item);\n }\n static instance = new StringOptionAdapter();\n}\nexport class StringOptionAdapterWithCreate extends StringOptionAdapter {\n createItem(value) {\n return value;\n }\n static instance = new StringOptionAdapterWithCreate();\n}\nexport function getDefaultComboBoxLayout(fullWidth, unstyledInput) {\n return {\n buttonRight: 4,\n buttonWidth: 24,\n maxMenuHeight: 240,\n menuClass: \"w-72 bg-white mt-1 shadow-md border border-gray-200 overflow-auto p-0 z-10\",\n inputClass: clsx(unstyledInput ? INPUT_UNSTYLED : INPUT, fullWidth ? \"w-full\" : \"!w-auto\"),\n optionClass: \"py-2 px-3 shadow-sm flex flex-col [&.option-selected]:font-semibold [&.option-highlighted]:bg-blue-300\",\n Input: (ComboInput),\n Menu: (ComboMenu),\n Toggle: (ComboToggle),\n };\n}\nexport function ComboBox({ menuAlign = \"fill\", menuGap, focusOnMount, onSelect, value, zIndex, unstyledInput, fullWidth, api, layout: layoutOpts, adapter, items, placeholder }) {\n const [popupId] = useState(genComboboxPopupId());\n const popupCtrl = useRef(undefined);\n const inputRef = useRef(null);\n const layout = layoutOpts ? Object.assign(getDefaultComboBoxLayout(fullWidth, unstyledInput), layoutOpts) : getDefaultComboBoxLayout(fullWidth, unstyledInput);\n const inputBoxRef = React.useRef(null);\n const ctrl = useComboboxCtrl({\n adapter,\n items,\n value,\n popupId\n });\n useEffect(() => {\n if (inputRef.current) {\n focusOnMount && inputRef.current.focus();\n }\n }, [inputRef.current]);\n // the onSelect callback may change so we need to refresh it.\n useEffect(() => {\n ctrl.onSelect = onSelect;\n ctrl.popupCtrl = popupCtrl.current;\n }, [onSelect, popupCtrl.current]);\n useEffect(() => {\n if (api && ctrl && inputRef.current) {\n api.current = {\n open: () => ctrl.openMenu(),\n close: () => ctrl.closeMenu(),\n toggle: () => ctrl.toggleMenu(),\n setInputValue: (value) => ctrl.inputText = value,\n inputValue: ctrl.inputText || '',\n selectedItem: ctrl.selectedItem,\n focus: () => inputRef.current?.focus()\n };\n return () => {\n api.current = null;\n };\n }\n }, [api, ctrl, inputRef.current]);\n const showMenu = ctrl.isMenuOpen && ctrl.filteredItems.length > 0;\n return (_jsxs(_Fragment, { children: [_jsx(layout.Input, { boxRef: inputBoxRef, inputRef: inputRef, ctrl: ctrl, layout: layout, placeholder: placeholder }), _jsx(Popup, { id: popupId, ctrlRef: popupCtrl, className: COMBOBOX_POPUP, closeOnClick: true, closeOnEsc: true, onClose: () => ctrl.closeMenu(), isOpen: showMenu, anchor: inputBoxRef, zIndex: zIndex, constraints: {\n position: \"bottom\",\n align: menuAlign,\n gap: menuGap != null ? menuGap : 4\n }, children: _jsx(layout.Menu, { fillWidth: menuAlign === \"fill\", items: ctrl.filteredItems, ctrl: ctrl, layout: layout, adapter: adapter }) })] }));\n}\nfunction ComboInput({ inputRef, placeholder, boxRef, ctrl, layout }) {\n const buttonWidth = layout.buttonWidth;\n const style = buttonWidth > 0 ? { paddingRight: `${buttonWidth}px` } : undefined;\n const Toggle = layout.Toggle;\n return (_jsxs(\"div\", { className: \"relative\", ref: boxRef, children: [_jsx(\"input\", { ref: inputRef, placeholder: placeholder, ...ctrl.getInputProps(), style: style, className: layout.inputClass }), Toggle &&\n _jsx(\"button\", { style: {\n top: 0, bottom: 0, right: `${layout.buttonRight}px`, width: `${buttonWidth}px`,\n position: \"absolute\",\n border: \"none\",\n padding: 0,\n margin: 0,\n backgroundColor: \"transparent\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n }, ...ctrl.getToggleButtonProps(), children: _jsx(Toggle, { ctrl: ctrl, layout: layout }) })] }));\n}\nfunction ComboToggle({ ctrl }) {\n return ctrl.isMenuOpen ? _jsx(ChevronUpIcon, { className: \"w-4 h-4\" }) : _jsx(ChevronDownIcon, { className: \"w-4 h-4\" });\n}\nfunction ComboMenu({ fillWidth, items, layout, ctrl, adapter }) {\n const { highlightedIndex, selectedItem } = ctrl;\n return (_jsx(\"ul\", { style: { width: fillWidth ? \"100%\" : undefined, maxHeight: layout.maxMenuHeight ? `${layout.maxMenuHeight}px` : '240px' }, className: layout.menuClass, ...ctrl.getMenuProps(), children: items.map((item, index) => (_jsx(\"li\", { \"data-index\": index, className: clsx(layout.optionClass, highlightedIndex === index && \"option-highlighted\", selectedItem === item && \"option-selected\"), ...ctrl.getItemProps(item, index), children: adapter.renderOption(item) }, adapter.idOf(item)))) }));\n}\nexport function useComboboxCtrl(props) {\n const [ctrl, setCtrl] = useState(new ComboboxController(props));\n useEffect(() => {\n ctrl?.withState(setCtrl);\n }, []);\n return ctrl;\n}\nclass ComboboxController {\n popupId;\n items;\n adapter;\n onSelect;\n setState;\n _selectedItem = null;\n _filteredItems;\n _inputText = \"\";\n _highlightedIndex = null;\n _isMenuOpen = false;\n popupCtrl;\n constructor({ adapter, items, value, popupId }) {\n this.adapter = adapter;\n this.items = items;\n this.popupId = popupId;\n if (typeof value === \"string\") {\n this._inputText = value;\n }\n else if (value) {\n this._selectedItem = adapter.findById(items, adapter.idOf(value)) || null;\n if (this._selectedItem) {\n this._inputText = adapter.valueOf(value);\n }\n }\n if (this._inputText) {\n this._filteredItems = this.adapter.filter(this.items, this._inputText);\n }\n else {\n this._filteredItems = this.items;\n }\n }\n withState(setState) {\n this.setState = setState;\n return this;\n }\n clone() {\n const clone = new ComboboxController({ adapter: this.adapter, items: this.items, popupId: this.popupId });\n clone.setState = this.setState;\n clone.onSelect = this.onSelect;\n clone._inputText = this._inputText;\n clone._highlightedIndex = this._highlightedIndex;\n clone._selectedItem = this._selectedItem;\n clone._isMenuOpen = this._isMenuOpen;\n clone._filteredItems = this._filteredItems;\n clone.popupCtrl = this.popupCtrl;\n return clone;\n }\n updateState() {\n this.setState?.(this.clone());\n }\n get filteredItems() {\n if (this._inputText) {\n return this.adapter.filter(this.items, this._inputText);\n }\n else {\n return this.items;\n }\n }\n get selectedItem() {\n return this._selectedItem;\n }\n set selectedItem(item) {\n this._selectedItem = item;\n this._inputText = item ? this.adapter.valueOf(item) : \"\";\n this._filteredItems = this._inputText ?\n this.adapter.filter(this.items, this._inputText)\n : this.items;\n this.updateState();\n this.onSelect?.(item);\n }\n get isMenuOpen() {\n return this._isMenuOpen;\n }\n set inputText(inputText) {\n this._inputText = inputText;\n if (inputText) {\n this._filteredItems = this.adapter.filter(this.items, inputText);\n }\n else {\n this._filteredItems = this.items;\n }\n this._highlightedIndex = null;\n this._selectedItem = null;\n this.updateState();\n // TODO -- experimental - it works but it's not perfect\n // we need to update if the popup is on top and the filtered items changed\n if (this.isMenuOpen && this.popupCtrl) {\n const popupCtrl = this.popupCtrl;\n const popupPosition = popupCtrl.context?.position?.position;\n if (popupPosition && popupPosition === \"top\") {\n window.setTimeout(() => {\n popupCtrl.update();\n }, 100);\n }\n }\n }\n get inputText() {\n return this._inputText;\n }\n set highlightedIndex(index) {\n this._highlightedIndex = index;\n this.updateState();\n }\n get highlightedIndex() {\n return this._highlightedIndex;\n }\n openMenu() {\n if (this._filteredItems.length > 0) {\n this._isMenuOpen = true;\n //this._highlightedIndex = 0;\n this.updateState();\n }\n else {\n // TODO nothing to show.\n // display a create value option?\n }\n }\n closeMenu(_item) {\n if (this._isMenuOpen) {\n this._highlightedIndex = null;\n this._isMenuOpen = false;\n this.updateState();\n }\n }\n toggleMenu() {\n if (this._isMenuOpen) {\n this.closeMenu();\n }\n else {\n this.openMenu();\n }\n }\n highlightIndex(index, navigateToTop = false) {\n this.highlightedIndex = index;\n const popup = document.getElementById(this.popupId);\n if (popup) {\n popup.querySelector(`li[data-index=\"${index}\"]`)?.scrollIntoView(navigateToTop);\n }\n }\n getMenuProps() {\n return {};\n }\n getToggleButtonProps() {\n return {\n onClick: () => {\n this._isMenuOpen = !this._isMenuOpen;\n this.updateState();\n }\n };\n }\n getItemProps(item, index) {\n return {\n \"aria-selected\": this._highlightedIndex === index,\n onClick: () => {\n this.selectedItem = item;\n this.closeMenu();\n },\n onMouseEnter: () => {\n if (this.highlightedIndex !== index) {\n this.highlightedIndex = index;\n }\n },\n onMouseLeave: () => {\n if (this.highlightedIndex === index) {\n this.highlightedIndex = null;\n }\n }\n };\n }\n getInputProps() {\n const items = this._filteredItems;\n return {\n onClick: () => {\n this.openMenu();\n },\n onChange: (ev) => {\n const value = ev.target.value;\n this.inputText = value;\n this.openMenu();\n },\n value: this.inputText,\n onKeyDown: (ev) => {\n const key = ev.key;\n if (key === \"Enter\") {\n if (this.highlightedIndex != null) {\n this.selectedItem = items[this.highlightedIndex || 0];\n }\n else {\n // create new value?\n if (this.inputText) {\n const item = this.adapter.createItem(this.inputText);\n if (item) {\n this.items.push(item);\n this.selectedItem = item;\n }\n }\n }\n this.closeMenu();\n }\n else if (key === \"ArrowDown\") {\n if (this.isMenuOpen) {\n this.highlightIndex(this.highlightedIndex === null ? 0 : incrModulo(this.highlightedIndex, items.length), false);\n }\n else {\n this.openMenu();\n }\n }\n else if (key === \"ArrowUp\") {\n if (this.isMenuOpen) {\n this.highlightIndex(this.highlightedIndex === null ? 0 : decrModulo(this.highlightedIndex, items.length), true);\n }\n }\n }\n };\n }\n}\nfunction incrModulo(value, max) {\n return (value + 1) % max;\n}\nfunction decrModulo(value, max) {\n return (value - 1 + max) % max;\n}\n//# sourceMappingURL=ComboBox.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cn } from \"../libs/utils\";\nconst TooltipProvider = TooltipPrimitive.Provider;\nconst Tooltip = TooltipPrimitive.Root;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\nconst TooltipContent = React.forwardRef(({ className, sideOffset = 4, side = \"top\", ...props }, ref) => (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, side: side, style: { zIndex: 100 }, className: cn(\"max-w-[90vw]\", \"z-50 overflow-hidden rounded-md bg-tooltips border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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\", className), ...props }) })));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\nexport function VTooltip({ description, children, size = 'sm', placement = 'top', className, asChild }) {\n return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: \"cursor-pointer\", asChild: asChild, children: children }), _jsx(TooltipContent, { side: placement, className: `px-3 py-1.5 max-w-${size} text-${size} px-3 ${className}`, children: description })] }) }));\n}\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n//# sourceMappingURL=tooltip.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva } from \"class-variance-authority\";\nimport { VTooltip } from \"./tooltip\";\nimport { cn } from \"../libs/utils\";\nimport { Loader2 } from \"lucide-react\";\nimport clsx from \"clsx\";\nconst buttonVariants = cva(\"hover:cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\", {\n variants: {\n variant: {\n destructive: \"bg-destructive dark:bg-destructive/10 text-destructive ring-1 ring-inset ring-destructive-muted/50 dark:ring-destructive-muted/50 shadow-xs hover:bg-destructive/50\",\n outline: \"border border-input bg-background shadow-xs hover:bg-muted dark:hover:text-secondary\",\n secondary: \"bg-secondary text-primary shadow-xs hover:bg-muted hover:text-primary\",\n ghost: \"hover:bg-muted/50 dark:hover:bg-muted/20\",\n link: \"text-white underline-offset-4 hover:underline\",\n primary: \"bg-primary text-white shadow-xs hover:bg-primary/90\",\n soft: \"bg-primary/5 dark:bg-primary/10 text-primary shadow-xs hover:bg-primary/10 dark:hover:bg-primary/20\",\n unstyled: \"\"\n },\n size: {\n xs: 'h-7 rounded px-2 py-1 text-xs gap-x-1',\n sm: \"h-8 rounded px-2 text-xs\",\n md: \"h-9 rounded-md px-4 py-2\",\n lg: \"h-10 rounded-md px-3\",\n xl: 'rounded-md px-3.5 py-2.5 text-sm gap-x-2',\n icon: \"p-0 m-0 rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n});\nconst Button = React.forwardRef(({ className, variant, size, asChild = false, alt, isDisabled, isLoading, title, onClick, type, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n const buttonElement = (_jsxs(Comp, { className: clsx(className, cn(buttonVariants({ variant, size }))), disabled: isDisabled || isLoading || props.disabled, ref: ref, onClick: onClick, type: type, autoFocus: false, ...props, children: [isLoading && _jsx(Loader2, { className: \"animate-spin\" }), props.children] }));\n if (alt || title) {\n return (_jsx(VTooltip, { description: alt || title, asChild: true, className: \"cursor-pointer\", size: \"xs\", placement: \"top\", children: buttonElement }));\n }\n return buttonElement;\n});\nButton.displayName = \"Button\";\nexport { Button, buttonVariants };\n//# sourceMappingURL=button.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createContext, useContext, useEffect, useState } from \"react\";\nconst initialState = {\n theme: \"system\",\n setTheme: () => null,\n};\nconst ThemeProviderContext = createContext(initialState);\nexport function ThemeProvider({ children, defaultTheme = \"system\", storageKey = \"vite-ui-theme\", ...props }) {\n const [theme, setTheme] = useState(() => localStorage.getItem(storageKey) || defaultTheme);\n useEffect(() => {\n const root = window.document.documentElement;\n root.classList.remove(\"light\", \"dark\");\n if (theme === \"system\") {\n const systemTheme = window.matchMedia(\"(prefers-color-scheme: dark)\")\n .matches\n ? \"dark\"\n : \"light\";\n root.classList.add(systemTheme);\n return;\n }\n root.classList.add(theme);\n }, [theme]);\n const value = {\n theme,\n setTheme: (theme) => {\n localStorage.setItem(storageKey, theme);\n setTheme(theme);\n },\n };\n return (_jsx(ThemeProviderContext.Provider, { ...props, value: value, children: children }));\n}\nexport const useTheme = () => {\n const context = useContext(ThemeProviderContext);\n if (context === undefined)\n throw new Error(\"useTheme must be used within a ThemeProvider\");\n return context;\n};\n//# sourceMappingURL=ThemeProvider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Computer, Moon, Sun } from \"lucide-react\";\nimport { Button } from \"../button\";\nimport { useTheme } from \"./ThemeProvider\";\nexport function ModeOption({ option, current, setTheme, icon }) {\n return (_jsx(Button, { variant: current === option ? \"secondary\" : \"outline\", size: \"sm\", onClick: () => setTheme(option), alt: option, children: icon }));\n}\nexport default function ModeToggle() {\n const { setTheme } = useTheme();\n const theme = useTheme().theme;\n return (_jsxs(\"div\", { className: \"flex justify-between px-2 items-center\", children: [_jsx(\"p\", { className: \"text-sm font-semibold\", children: \"Theme\" }), _jsxs(\"div\", { className: \"flex gap-2\", children: [_jsx(ModeOption, { current: theme, option: \"system\", setTheme: setTheme, icon: _jsx(Computer, { className: \"text-muted\" }) }), _jsx(ModeOption, { current: theme, option: \"light\", setTheme: setTheme, icon: _jsx(Sun, { className: \"text-muted\" }) }), _jsx(ModeOption, { current: theme, option: \"dark\", setTheme: setTheme, icon: _jsx(Moon, { className: \"text-muted\" }) })] })] }));\n}\n//# sourceMappingURL=ThemeSwitcher.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { cn } from \"../libs/utils\";\nconst Card = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"div\", { ref: ref, className: cn(\"rounded-xl border bg-card text-card-foreground shadow\", className), ...props })));\nCard.displayName = \"Card\";\nconst CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"div\", { ref: ref, className: cn(\"flex flex-col p-6\", className), ...props })));\nCardHeader.displayName = \"CardHeader\";\nconst CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"div\", { ref: ref, className: cn(\"font-semibold leading-none tracking-tight\", className), ...props })));\nCardTitle.displayName = \"CardTitle\";\nconst CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"div\", { ref: ref, className: cn(\"text-sm text-muted-foreground\", className), ...props })));\nCardDescription.displayName = \"CardDescription\";\nconst CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"div\", { ref: ref, className: cn(\"p-6 pt-0\", className), ...props })));\nCardContent.displayName = \"CardContent\";\nconst CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"div\", { ref: ref, className: cn(\"flex items-center p-6 pt-0\", className), ...props })));\nCardFooter.displayName = \"CardFooter\";\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n//# sourceMappingURL=card.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nexport function VisuallyHidden({ children }) {\n return (_jsx(\"span\", { style: {\n border: 0,\n clip: \"rect(0 0 0 0)\",\n height: \"1px\",\n margin: \"-1px\",\n overflow: \"hidden\",\n padding: 0,\n position: \"absolute\",\n width: \"1px\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\",\n }, children: children }));\n}\n//# sourceMappingURL=visuallyHidden.js.map","\"use client\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { cn } from \"../libs/utils\";\nimport { X } from \"lucide-react\";\nimport { Button } from \"./button\";\nimport { VisuallyHidden } from \"../libs/visuallyHidden\";\nimport { createContext, useContext } from \"react\";\nconst ModalContext = createContext(false);\nexport function useIsInModal() {\n return !!useContext(ModalContext);\n}\nexport function ModalContextProvider({ children }) {\n return _jsx(ModalContext.Provider, { value: true, children: children });\n}\nexport function VModal({ className, children, isOpen, onClose, description = \"Modal Description\", noCloseButton = false, allowOverflow = false, disableCloseOnClickOutside = false, }) {\n const handleOpenChange = (open) => {\n if (!open) {\n onClose();\n }\n };\n return (_jsxs(Dialog, { open: isOpen, onOpenChange: (open) => {\n if (!disableCloseOnClickOutside || open) {\n handleOpenChange(open);\n }\n }, children: [allowOverflow && _jsx(DialogOverlay, { className: \"z-50 fixed inset-0 bg-black/80\" }), _jsx(VisuallyHidden, { children: _jsx(DialogDescription, { children: description }) }), _jsxs(DialogContent, { className: cn(\"min-h-20 p-2\", \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200 sm:rounded-lg\", className), children: [!noCloseButton && (_jsx(DialogClose, { onClick: () => handleOpenChange(false), asChild: true, autoFocus: false, children: _jsx(Button, { variant: \"outline\", alt: \"Close\", className: \"top-4 right-4 absolute data-[state=open]:bg-accent opacity-70 hover:opacity-100 rounded-sm focus:outline-none focus:ring-2 focus:ring-ring ring-offset-background focus:ring-offset-2 data-[state=open]:text-muted-foreground transition-opacity disabled:pointer-events-none\", children: _jsx(X, { className: \"w-4 h-4\" }) }) })), _jsx(ModalContextProvider, { children: children })] })] }));\n}\nexport const VModalTitle = ({ children, show = true, className, ...props }) => {\n if (!show) {\n return (_jsx(VisuallyHidden, { children: _jsx(DialogTitle, { children: children }) }));\n }\n return (_jsx(DialogTitle, { className: cn(\"text-lg font-semibold leading-6 tracking-tight p-4\", className), ...props, children: children }));\n};\nexport const VModalBody = ({ children, className, ...props }) => {\n return (_jsx(\"div\", { className: cn(\"text-sm p-4 max-h-[80vh] overflow-y-auto\", className), ...props, children: children }));\n};\nexport const VModalFooter = ({ align = \"right\", children, className, ...props }) => {\n const alignClass = {\n left: \"justify-start\",\n center: \"justify-center\",\n right: \"justify-end\",\n };\n return (_jsx(\"div\", { className: cn(\"w-full flex py-3 sm:py-2 sm:flex sm:flex-row-reverse sm:flex-row sm:justify-end sm:space-x-2\", alignClass[align], className), ...props, children: children }));\n};\nconst Dialog = DialogPrimitive.Root;\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogPortal = DialogPrimitive.Portal;\nconst DialogClose = DialogPrimitive.Close;\nconst DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn(\"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\", className), ...props })));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\nconst DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(DialogPrimitive.Content, { ref: ref, autoFocus: false, onOpenAutoFocus: (event) => {\n event.preventDefault();\n }, className: cn(\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-2 border bg-background shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\", className), ...props, children: children })] })));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\nconst DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn(\"text-sm text-muted-foreground\", className), ...props })));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\nconst DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn(\"text-lg font-semibold leading-none tracking-tight\", className), ...props })));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\nexport { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogTitle, DialogDescription, };\n//# sourceMappingURL=dialog.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"../libs/utils\";\nimport { X } from \"lucide-react\";\nconst variants = cva(\"\", {\n variants: {\n size: {\n xs: \"rounded py-1 text-xs rounded-xs\",\n sm: \"rounded text-xs rounded-sm\",\n md: \"rounded-md py-2 text-sm\",\n lg: \"rounded-md text-base\",\n xl: \"rounded-md py-2.5 text-lg\",\n },\n variant: {\n default: \"flex w-full rounded-md border border-input bg-background py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n unstyled: \"block m-0 p-0 w-full border-0 focus:outline-hidden focus:ring-0 bg-transparent\",\n noPadding: \"block rounded-md border-0 bg-background shadow-2xs ring-1 ring-inset ring-ring placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-ring ring-offset-background\",\n legacy: \"py-1.5 block rounded-md border-0 bg-background shadow-2xs ring-1 ring-inset ring-ring placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-ring ring-offset-background\",\n },\n },\n defaultVariants: {\n size: \"md\",\n variant: \"default\",\n },\n});\nconst VInput = React.forwardRef(({ className, type, size = \"md\", variant = \"default\", clearable = true, onChange, value, ...props }, ref) => {\n const _onClear = () => {\n onChange && onChange('');\n };\n const _onChange = (ev) => {\n onChange && onChange(ev.target.value);\n };\n return (_jsxs(\"div\", { className: \"w-full\", style: { position: 'relative', display: 'inline-block' }, children: [_jsx(\"input\", { type: type, className: cn(variants({ size, variant }), className, clearable && value ? \"pr-6\" : \"\"), ref: ref, value: value == null ? '' : value, onChange: _onChange, ...props }), clearable && value && !props.readOnly && !props.disabled && (_jsx(\"button\", { onClick: _onClear, className: `absolute ${type !== 'number' ? 'right-0' : 'right-7'} top-1/2 -translate-y-1/2 size-7 text-muted-foreground hover:text-destructive cursor-pointer flex items-center justify-center`, type: \"button\", \"aria-label\": \"Clear input\", children: _jsx(X, { size: 16 }) }))] }));\n});\nVInput.displayName = \"VInput\";\nexport { VInput, };\n//# sourceMappingURL=input.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport { cn } from \"../libs/utils\";\nconst Separator = React.forwardRef(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn(\"shrink-0 bg-border\", orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", className), ...props })));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\nexport { Separator };\n//# sourceMappingURL=separator.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"../libs/utils\";\nimport { useIsInModal } from \"./dialog\";\nconst PopoverContext = React.createContext(null);\nconst Popover = ({ hover = false, click = false, children, _open, onOpenChange }) => {\n const [open, setOpen] = React.useState(_open || false);\n const insideModal = useIsInModal();\n const handleOpenChange = (open) => {\n setOpen(open);\n if (onOpenChange) {\n onOpenChange(open);\n }\n };\n return (_jsx(PopoverContext.Provider, { value: { open, setOpen, hover, click }, children: _jsx(PopoverPrimitive.Root, { open: open, onOpenChange: handleOpenChange, modal: insideModal, children: children }) }));\n};\nfunction handleHover(hover = false, setOpen = () => { }, type) {\n if (hover) {\n setOpen(type === \"enter\");\n }\n}\nconst PopoverTrigger = React.forwardRef(({ children, ...props }, ref) => {\n const context = React.useContext(PopoverContext);\n if (!context) {\n throw new Error(\"PopoverTrigger must be used within a Popover\");\n }\n const { setOpen, hover, click } = context;\n return (_jsx(PopoverPrimitive.Trigger, { ref: ref, asChild: true, onMouseEnter: () => handleHover(hover, setOpen, \"enter\"), onMouseLeave: () => handleHover(hover, setOpen, \"leave\"), onClick: () => {\n if (click)\n setOpen((prev) => !prev);\n }, ...props, children: children }));\n});\nPopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;\nconst PopoverAnchor = PopoverPrimitive.Anchor;\nconst PopoverContent = React.forwardRef(({ className, align = \"center\", side = \"bottom\", ...props }, ref) => {\n const context = React.useContext(PopoverContext);\n if (!context) {\n throw new Error(\"PopoverContent must be used within a Popover\");\n }\n const { setOpen, hover } = context;\n return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, side: side, onMouseEnter: () => handleHover(hover, setOpen, \"enter\"), onMouseLeave: () => handleHover(hover, setOpen, \"leave\"), \n // onClick={() => {setOpen(false)}}\n className: cn(\"z-50 w-72 rounded-md border-popover bg-popover text-popover-foreground ring-1 ring-gray-200 dark:ring-slate-700 shadow-md focus:outline-none animate-in\", \"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\", className), ...props }) }));\n});\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\nconst PopoverClose = PopoverPrimitive.Close;\nPopoverClose.displayName = PopoverPrimitive.Close.displayName;\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverClose };\n//# sourceMappingURL=popover.js.map","\"use client\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport { cn } from \"../libs/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\nconst Command = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive, { ref: ref, className: cn(\"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\", className), ...props })));\nCommand.displayName = CommandPrimitive.displayName;\nconst CommandDialog = ({ children, ...props }) => {\n return (_jsx(Dialog, { ...props, children: _jsx(DialogContent, { className: \"shadow-lg p-0 overflow-hidden\", children: _jsx(Command, { className: \"[&_[cmdk-group]]:px-2 [&_[cmdk-item]]:px-2 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-item]_svg]:w-5 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\", children: children }) }) }));\n};\nconst CommandInput = React.forwardRef(({ className, ...props }, ref) => (_jsxs(\"div\", { className: \"flex items-center px-3 border-b\", \"cmdk-input-wrapper\": \"\", children: [_jsx(Search, { className: \"opacity-50 size-4 shrink-0\" }), _jsx(CommandPrimitive.Input, { ref: ref, className: cn(\"focus:ring-0\", \"border-0 flex h-8 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\", className), ...props })] })));\nCommandInput.displayName = CommandPrimitive.Input.displayName;\nconst CommandList = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.List, { ref: ref, className: cn(\"max-h-[200px] overflow-y-auto overflow-x-hidden\", className), ...props })));\nCommandList.displayName = CommandPrimitive.List.displayName;\nconst CommandEmpty = React.forwardRef((props, ref) => (_jsx(CommandPrimitive.Empty, { ref: ref, className: \"py-2 text-sm text-center\", ...props })));\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\nconst CommandGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Group, { ref: ref, className: cn(\"overflow-y-auto overflow-x-hidden p-1 text-foreground\", \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\", className), ...props })));\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\nconst CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Separator, { ref: ref, className: cn(\"-mx-1 h-px bg-border\", className), ...props })));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\nconst CommandItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Item, { ref: ref, className: cn(\"hover:bg-muted cursor-pointer relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\", className), ...props })));\nCommandItem.displayName = CommandPrimitive.Item.displayName;\nconst CommandShortcut = ({ className, ...props }) => {\n return (_jsx(\"span\", { className: cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className), ...props }));\n};\nCommandShortcut.displayName = \"CommandShortcut\";\nexport { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };\n//# sourceMappingURL=command.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { isEqual } from 'lodash-es';\nimport { Check, ChevronsUpDown, SearchIcon, SquarePlus, X } from 'lucide-react';\nimport { useState, useEffect, useRef } from 'react';\nimport { Popover, PopoverContent, PopoverTrigger, PopoverClose } from './popover';\nimport { Command, CommandEmpty, CommandGroup, CommandItem, CommandList } from './command';\nimport { VInput } from './input';\nexport function VSelectBox({ options, optionLabel, value, onChange, addNew, addNewLabel, disabled, filterBy, label, placeholder, className, popupClass, isClearable, border = true }) {\n const triggerRef = useRef(null);\n const [open, setOpen] = useState(false);\n const [width, setWidth] = useState(0);\n const [filterValue, setFilterValue] = useState('');\n useEffect(() => {\n const element = triggerRef.current;\n if (!element) {\n return;\n }\n const updateWidth = () => {\n const contentWidth = element.getBoundingClientRect().width;\n setWidth(contentWidth);\n };\n const resizeObserver = new ResizeObserver(() => {\n updateWidth();\n });\n updateWidth();\n resizeObserver.observe(element);\n return () => {\n resizeObserver.disconnect();\n };\n }, []);\n const handleTriggerClick = (e) => {\n if (disabled) {\n e.preventDefault();\n return;\n }\n setOpen(!open);\n };\n const _onClick = (opt) => {\n setOpen(false);\n onChange(opt);\n };\n let filteredOptions = options || [];\n function getFilterByFn(filterBy) {\n if (!filterBy) {\n return (o) => String(o).toLowerCase();\n }\n else if (typeof filterBy === 'string') {\n return (o) => String(o[filterBy]).toLowerCase();\n }\n else {\n return filterBy;\n }\n }\n const filterLc = filterValue.toLowerCase();\n const filterFn = getFilterByFn(filterBy);\n filteredOptions = filteredOptions.filter(o => filterFn(o).includes(filterLc));\n return (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(\"div\", { ref: triggerRef, onClick: handleTriggerClick, className: clsx(className, border && 'border border-border', 'flex flex-row gap-2 items-center justify-between p-2 rounded-md group', !disabled && \"cursor-pointer hover:bg-muted\"), children: [_jsxs(\"div\", { className: clsx(\"flex flex-col w-fill rounded-md text-sm items-center justify-center truncate \", !disabled && \"\"), children: [label && _jsx(\"div\", { className: 'w-full text-left text-xs font-semibold', children: label }), _jsx(\"div\", { className: clsx('w-full text-left', !disabled && ''), children: value ? (optionLabel ? optionLabel(value) : value) : placeholder }), isClearable && value && (_jsx(\"div\", { onClick: (e) => {\n e.stopPropagation();\n }, className: \"absolute right-2 top-1/2 transform -translate-y-1/2 cursor-pointer\", children: _jsx(X, { className: \"size-4\" }) }))] }), !disabled && (_jsx(ChevronsUpDown, { className: \"size-4 opacity-50\" }))] }) }), _jsxs(PopoverContent, { style: { width: `${width}px`, zIndex: 1000000 }, className: clsx(\"min-w-[8rem] w-64 bg-popover p-1 border shadow\", \"divide-y divide-border\", popupClass), children: [filterBy && (_jsxs(\"div\", { className: 'flex justify-start items-center mb-1', children: [_jsx(\"div\", { className: 'mx-2', children: _jsx(SearchIcon, { className: \"size-4\" }) }), _jsx(VInput, { variant: 'unstyled', value: filterValue, onChange: setFilterValue, className: \"w-full p-1 rounded-md\", placeholder: \"Search...\" })] })), _jsx(Command, { className: \"overflow-hidden\", children: _jsxs(CommandList, { className: \"max-h-[200px] overflow-y-auto\", children: [_jsx(CommandEmpty, { children: \"No result found.\" }), _jsx(CommandGroup, { className: \"overflow-visible\", children: filteredOptions?.map((opt, index) => (_jsx(CommandItem, { onSelect: () => _onClick(opt), className: \"w-full\", children: _jsxs(PopoverClose, { className: 'w-full flex justify-between items-center', children: [_jsx(\"div\", { className: 'w-full truncate text-left', children: optionLabel ? optionLabel(opt) : opt }), isEqual(value, opt) && _jsx(Check, { className: \"size-4\" })] }) }, index))) })] }) }), addNew && (_jsx(\"div\", { className: 'p-1', children: _jsxs(\"a\", { onClick: addNew, className: clsx('gap-x-2 px-2 py-1.5 truncate group flex rounded-md items-center text-sm cursor-pointer hover:bg-accent'), children: [_jsx(SquarePlus, { size: 16, strokeWidth: 1.25, absoluteStrokeWidth: true }), addNewLabel] }) }))] })] }));\n}\n//# sourceMappingURL=selectBox.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport { cn } from \"../libs/utils\";\nimport { VSelectBox } from \"./selectBox\";\nconst TabsContext = React.createContext({\n size: undefined,\n tabs: undefined,\n current: undefined,\n setTab: undefined,\n responsive: false\n});\nconst VTabs = ({ tabs, defaultValue, current, className, fullWidth, children, onTabChange, responsive = false }) => {\n const currentValue = typeof current === 'function' ? current() : current || defaultValue;\n const [value, setValue] = React.useState(currentValue);\n React.useEffect(() => {\n if (currentValue) {\n setValue(currentValue);\n }\n }, [currentValue]);\n const handleValueChange = (newValue) => {\n setValue(newValue);\n if (onTabChange) {\n onTabChange(newValue);\n }\n };\n const setTab = React.useCallback((tabName) => {\n handleValueChange(tabName);\n }, [handleValueChange]);\n return (_jsx(TabsContext.Provider, { value: { tabs, size: fullWidth ? tabs.length : 0, current: value, setTab, responsive: responsive }, children: _jsx(TabsPrimitive.Root, { defaultValue: tabs[0]?.name, value: value, onValueChange: handleValueChange, className: className, children: children }) }));\n};\nconst VTabsBar = ({ className }) => {\n const { tabs, size, current, setTab, responsive } = React.useContext(TabsContext);\n const fullWidth = size !== 0;\n const handleTabChange = React.useCallback((tabName) => {\n if (!tabs || !setTab)\n return;\n const tab = tabs.find(t => t.name === tabName);\n if (tab?.href) {\n window.history.pushState(null, '', tab.href);\n }\n setTab(tabName);\n }, [tabs, setTab]);\n if (!tabs || !setTab) {\n console.warn(\"TabsBar: No tabs provided or setTab not available\");\n return null;\n }\n return (_jsxs(_Fragment, { children: [responsive && (_jsx(\"div\", { className: \"px-2 block lg:hidden\", children: _jsx(VSelectBox, { label: \"Tab\", className: (className), options: tabs, optionLabel: (tab) => typeof tab.label === 'string' ? tab.label : String(tab.label), value: tabs.find(tab => tab.name === current), onChange: (tab) => {\n handleTabChange(tab.name);\n } }) })), _jsx(TabsList, { size: size, className: cn((fullWidth ? \"w-full\" : \"\"), className, (responsive ? \"hidden lg:flex\" : \"\")), children: tabs.map((tab) => (_jsx(TabsTrigger, { value: tab.name, disabled: tab.disabled, href: tab.href, onClick: () => handleTabChange(tab.name), children: tab.label }, tab.name))) })] }));\n};\nconst VTabsPanel = () => {\n const { tabs } = React.useContext(TabsContext);\n if (!tabs)\n return null;\n return (_jsx(_Fragment, { children: tabs.map((tab) => (_jsx(TabsContent, { value: tab.name, children: tab.content }, tab.name))) }));\n};\nconst TabsList = React.forwardRef(({ className, size, ...props }, ref) => (_jsx(TabsContext.Provider, { value: { size }, children: _jsx(TabsPrimitive.List, { ref: ref, className: cn(\"border-b -mb-px flex space-x-4\", className), ...props }) })));\nTabsList.displayName = TabsPrimitive.List.displayName;\nconst TabsTrigger = React.forwardRef(({ className, href, ...props }, ref) => {\n const { size } = React.useContext(TabsContext);\n const handleClick = React.useCallback((event) => {\n if (href) {\n event.preventDefault();\n window.history.pushState(null, '', href);\n }\n if (props.onClick) {\n props.onClick(event);\n }\n }, [href, props.onClick]);\n return (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn(\"border-b-2 px-2 py-1.5 text-sm font-medium whitespace-nowrap cursor-pointer\", \"border-transparent text-muted-foreground hover:border-border hover:text-foreground\", \"data-[state=active]:border-primary data-[state=active]:text-primary\", \"disabled:pointer-events-none disabled:opacity-50\", className, size ? `w-1/${size}` : \"\"), onClick: handleClick, ...props }));\n});\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\nconst TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn(\"focus-visible:outline-none\", className), ...props })));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\nexport { VTabs, VTabsBar, VTabsPanel, TabsList, TabsTrigger, TabsContent };\n//# sourceMappingURL=tabs.js.map","\"use client\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"../libs/utils\";\nconst labelVariants = cva(\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\");\nconst Label = React.forwardRef(({ className, required, ...props }, ref) => (_jsxs(LabelPrimitive.Root, { ref: ref, className: cn(labelVariants(), className), ...props, children: [props.children, required && _jsx(\"span\", { className: \"text-destructive-foreground ml-1\", children: \"*\" })] })));\nLabel.displayName = LabelPrimitive.Root.displayName;\nexport { Label };\n//# sourceMappingURL=label.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\";\nimport { cn } from \"../libs/utils\";\nexport function Breadcrumbs({ children, maxItems = 3, className, separator }) {\n if (children.length <= maxItems) {\n return (_jsx(Breadcrumb, { className: cn(\"w-full\", className), children: _jsx(BreadcrumbList, { children: children.map((item, index) => (_jsxs(React.Fragment, { children: [_jsx(BreadcrumbItem, { children: item.href ? (_jsx(BreadcrumbLink, { href: item.href, children: item.label })) : (_jsx(BreadcrumbPage, { children: item.label })) }), index < children.length - 1 &&\n _jsx(BreadcrumbSeparator, { children: separator ?? _jsx(ChevronRight, {}) })] }, index))) }) }));\n }\n const firstItem = children[0];\n const lastItems = children.slice(-(maxItems - 2));\n return (_jsx(Breadcrumb, { className: cn(\"w-full\", className), children: _jsxs(BreadcrumbList, { children: [_jsx(BreadcrumbItem, { children: firstItem.href ? (_jsx(BreadcrumbLink, { href: firstItem.href, children: firstItem.label })) : (_jsx(BreadcrumbPage, { children: firstItem.label })) }), _jsx(BreadcrumbSeparator, { children: separator ?? _jsx(ChevronRight, {}) }), _jsx(BreadcrumbItem, { children: _jsx(BreadcrumbEllipsis, {}) }), _jsx(BreadcrumbSeparator, { children: separator ?? _jsx(ChevronRight, {}) }), lastItems.map((item, index) => (_jsxs(React.Fragment, { children: [_jsx(BreadcrumbItem, { children: item.href ? (_jsx(BreadcrumbLink, { href: item.href, children: item.label })) : (_jsx(BreadcrumbPage, { children: item.label })) }), index < lastItems.length - 1 && _jsx(BreadcrumbSeparator, { children: separator ?? _jsx(ChevronRight, {}) })] }, index)))] }) }));\n}\nconst Breadcrumb = React.forwardRef(({ ...props }, ref) => _jsx(\"nav\", { ref: ref, \"aria-label\": \"breadcrumb\", ...props }));\nBreadcrumb.displayName = \"Breadcrumb\";\nconst BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"ol\", { ref: ref, className: cn(\"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5\", className), ...props })));\nBreadcrumbList.displayName = \"BreadcrumbList\";\nconst BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"li\", { ref: ref, className: cn(\"inline-flex items-center gap-1.5\", className), ...props })));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\nconst BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {\n return (_jsx(\"a\", { ref: ref, className: cn(\"transition-colors hover:text-foreground\", className), ...props }));\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\nconst BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (_jsx(\"span\", { ref: ref, role: \"link\", \"aria-disabled\": \"true\", \"aria-current\": \"page\", className: cn(\"font-normal text-foreground\", className), ...props })));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\nconst BreadcrumbSeparator = ({ children, className, ...props }) => (_jsx(\"li\", { role: \"presentation\", \"aria-hidden\": \"true\", className: cn(\"[&>svg]:w-3.5 [&>svg]:h-3.5\", className), ...props, children: children ?? _jsx(ChevronRight, {}) }));\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\nconst BreadcrumbEllipsis = ({ className, ...props }) => (_jsxs(\"span\", { role: \"presentation\", \"aria-hidden\": \"true\", className: cn(\"flex h-9 w-9 items-center justify-center\", className), ...props, children: [_jsx(MoreHorizontal, { className: \"h-4 w-4\" }), _jsx(\"span\", { className: \"sr-only\", children: \"More\" })] }));\nBreadcrumbEllipsis.displayName = \"BreadcrumbEllipsis\";\n//# sourceMappingURL=breadcrumb.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { cn } from \"../../libs/utils\";\nimport { useEffect, useRef, useState } from \"react\";\nexport const AnimateChangeInHeight = ({ children, className, }) => {\n const containerRef = useRef(null);\n const [height, setHeight] = useState(\"auto\");\n useEffect(() => {\n if (containerRef.current) {\n const resizeObserver = new ResizeObserver((entries) => {\n // We only have one entry, so we can use entries[0].\n const observedHeight = entries[0].contentRect.height;\n setHeight(observedHeight);\n });\n resizeObserver.observe(containerRef.current);\n return () => {\n // Cleanup the observer when the component is unmounted\n resizeObserver.disconnect();\n };\n }\n }, []);\n return (_jsx(\"div\", { className: cn(className, \"overflow-hidden transition-all duration-100 ease-in\"), style: { height }, children: _jsx(\"div\", { ref: containerRef, children: children }) }));\n};\n//# sourceMappingURL=animateChangeInHeight.js.map","\"use client\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { DayPicker } from \"react-day-picker\";\nimport { cn } from \"../libs/utils\";\nimport { buttonVariants } from \"./button\";\nfunction Calendar({ className, classNames, showOutsideDays = true, size = \"md\", ...props }) {\n const daySize = {\n sm: \"size-6\",\n md: \"size-8\",\n lg: \"size-10\",\n }[size];\n return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn(\"\", className), classNames: {\n months: \"flex w-full flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0 flex-1\",\n month: \"space-y-4 w-full flex flex-col\",\n caption: \"flex justify-center pt-1 relative items-center\",\n caption_label: \"text-sm font-medium\",\n nav: \"space-x-1 flex items-center\",\n nav_button: cn(buttonVariants({ variant: \"outline\" }), \"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100\"),\n nav_button_previous: \"absolute left-1\",\n nav_button_next: \"absolute right-1\",\n table: \"w-full h-full border-collapse space-y-1\",\n head_row: \"\",\n head_cell: \"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]\",\n row: \"w-full mt-2\",\n cell: cn(\"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md\", props.mode === \"range\"\n ? \"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\n : \"[&:has([aria-selected])]:rounded-md\"),\n day: cn(buttonVariants({ variant: \"ghost\" }), daySize, \"flex items-center justify-center\", \"p-0 font-normal aria-selected:opacity-100\"),\n day_range_start: \"day-range-start\",\n day_range_end: \"day-range-end\",\n day_selected: \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n day_today: \"bg-accent text-accent-foreground\",\n day_outside: \"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground\",\n day_disabled: \"text-muted-foreground opacity-50\",\n day_range_middle: \"aria-selected:bg-accent aria-selected:text-accent-foreground\",\n day_hidden: \"invisible\",\n ...classNames,\n }, components: {\n IconLeft: ({ className, ...props }) => (_jsx(ChevronLeft, { className: cn(\"h-4 w-4\", className), ...props })),\n IconRight: ({ className, ...props }) => (_jsx(ChevronRight, { className: cn(\"h-4 w-4\", className), ...props })),\n }, ...props }));\n}\nCalendar.displayName = \"Calendar\";\nexport { Calendar };\n//# sourceMappingURL=calendar.js.map","\"use client\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\nimport { cn } from \"../libs/utils\";\nconst Checkbox = React.forwardRef(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn(\"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: cn(\"flex items-center justify-center text-current\"), children: _jsx(Check, { className: \"h-4 w-4\" }) }) })));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\nexport { Checkbox };\n//# sourceMappingURL=checkbox.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { useRef, useState } from \"react\";\n// import { AnimatePresence, motion } from \"motion/react\";\nimport { Calendar } from \"../calendar\";\nimport { format } from \"date-fns\";\nimport { Checkbox } from \"../checkbox\";\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from \"../command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../popover\";\nimport { AnimateChangeInHeight } from \"./animateChangeInHeight\";\nimport { Button } from \"../button\";\nimport { VInput } from \"../input\";\nexport const SelectionCombobox = ({ filterType, filterValues, setFilterValues, options, }) => {\n const [open, setOpen] = useState(false);\n const [commandInput, setCommandInput] = useState(\"\");\n const commandInputRef = useRef(null);\n const nonSelectedFilterValues = options?.filter((option) => !filterValues.some(filter => filter.value === option.value));\n return (_jsxs(Popover, { _open: open, onOpenChange: (open) => {\n setOpen(open);\n if (!open) {\n setTimeout(() => {\n setCommandInput(\"\");\n }, 200);\n }\n }, children: [_jsx(PopoverTrigger, { className: \"rounded-none px-1.5 py-1 bg-muted hover:bg-muted/50 transition\\n text-muted-foreground hover:text-primary shrink-0\", children: _jsx(\"div\", { className: \"flex gap-1.5 items-center\", children: filterValues?.length === 1 ? ((() => {\n const option = filterValues[0];\n return option.label;\n })()) : (`${filterValues?.length} selected`) }) }), _jsx(PopoverContent, { className: \"w-[200px] p-0\", children: _jsx(AnimateChangeInHeight, { children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: filterType, className: \"h-9\", value: commandInput, onInputCapture: (e) => {\n setCommandInput(e.currentTarget.value);\n }, ref: commandInputRef }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: \"No results found.\" }), _jsx(CommandGroup, { children: filterValues.map((value) => {\n return (_jsxs(CommandItem, { className: \"group flex gap-2 items-center\", onSelect: () => {\n setFilterValues(filterValues.filter((v) => v.value !== value.value));\n setTimeout(() => {\n setCommandInput(\"\");\n }, 200);\n setOpen(false);\n }, children: [_jsx(Checkbox, { checked: true }), value.label] }, value.value));\n }) }), nonSelectedFilterValues?.length > 0 && (_jsxs(_Fragment, { children: [_jsx(CommandSeparator, {}), _jsx(CommandGroup, { children: nonSelectedFilterValues\n .filter(option => String(option.label).toLowerCase().includes(commandInput.toLowerCase()))\n .map((filter) => (_jsxs(CommandItem, { className: \"group flex gap-2 items-center\", value: String(filter.label), onSelect: () => {\n setFilterValues([...filterValues, filter]);\n setTimeout(() => {\n setCommandInput(\"\");\n }, 200);\n setOpen(false);\n }, children: [_jsx(Checkbox, { checked: false, className: \"opacity-0 group-data-[selected=true]:opacity-100\" }), _jsx(\"span\", { className: \"text-accent-foreground\", children: filter.label })] }, filter.value))) })] }))] })] }) }) })] }));\n};\nexport const DateCombobox = ({ filterValues, setFilterValues, }) => {\n const [open, setOpen] = useState(false);\n const [dateRange, setDateRange] = useState({\n from: filterValues[0] ? new Date(filterValues[0]) : undefined,\n to: filterValues[1] ? new Date(filterValues[1]) : undefined,\n });\n return (_jsxs(Popover, { _open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { className: \"rounded-none px-1.5 py-1 bg-muted hover:bg-muted/50 transition\\n text-muted-foreground hover:text-primary shrink-0\", children: _jsx(\"div\", { className: \"flex gap-1.5 items-center\", children: dateRange?.from ? (dateRange.to ? (_jsxs(_Fragment, { children: [format(dateRange.from, \"LLL dd, y\"), \" -\", \" \", format(dateRange.to, \"LLL dd, y\")] })) : (format(dateRange.from, \"LLL dd, y\"))) : (_jsx(\"span\", { children: \"Pick a date\" })) }) }), _jsx(PopoverContent, { className: \"w-full p-0\", align: \"start\", children: _jsx(Calendar, { initialFocus: true, mode: \"range\", className: \"w-4/5 p-0\", defaultMonth: dateRange?.from, selected: dateRange, onSelect: (range) => {\n setDateRange(range);\n if (range?.from) {\n setFilterValues([\n format(range.from, \"yyyy-MM-dd\"),\n range.to ? format(range.to, \"yyyy-MM-dd\") : \"\",\n ]);\n }\n }, numberOfMonths: 2 }) })] }));\n};\nexport const TextCombobox = ({ filterValue, setFilterValue, }) => {\n const [open, setOpen] = useState(false);\n const [inputValue, setInputValue] = useState(filterValue);\n const handleKeyDown = (event) => {\n if (event.key === \"Enter\") {\n setFilterValue(inputValue);\n setOpen(false);\n }\n };\n return (_jsxs(Popover, { _open: open, onOpenChange: (open) => {\n setOpen(open);\n if (!open && inputValue !== filterValue) {\n setInputValue(filterValue);\n }\n }, children: [_jsx(PopoverTrigger, { className: \"rounded-none px-1.5 py-1 bg-muted hover:bg-muted/50 transition\\n text-muted-foreground hover:text-primary shrink-0\", children: _jsx(\"div\", { className: \"flex gap-1.5 items-center\", children: filterValue || \"Enter text...\" }) }), _jsx(PopoverContent, { className: \"w-[200px] p-3\", children: _jsxs(\"div\", { className: \"flex flex-col gap-2 p-2\", children: [_jsx(VInput, { autoFocus: true, type: \"text\", size: \"sm\", value: inputValue, onChange: setInputValue, onKeyDown: handleKeyDown, placeholder: \"Enter text...\" }), _jsx(Button, { size: \"sm\", variant: \"outline\", onClick: () => {\n setFilterValue(inputValue);\n setOpen(false);\n }, children: \"Apply\" })] }) })] }));\n};\n//# sourceMappingURL=comboBox.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { X } from \"lucide-react\";\nimport { Button } from \"../button\";\nimport { SelectionCombobox, DateCombobox, TextCombobox } from \"./comboBox\";\nimport { format } from \"date-fns\";\nfunction generateComboboxOptions(filter, setFilters, filterGroups) {\n switch (filter.type) {\n case 'date':\n return (_jsx(DateCombobox, { filterType: filter.name, filterValues: filter.value.map(v => v.value || ''), setFilterValues: (filterValues) => {\n setFilters((prev) => prev.map((f) => f === filter ? {\n ...f,\n value: filterValues.map(val => ({\n value: val,\n label: format(new Date(val), \"LLL dd, y\")\n }))\n } : f));\n } }));\n case 'text':\n return (_jsx(TextCombobox, { filterType: filter.placeholder || filter.name, filterValue: filter.value[0]?.value || '', setFilterValue: (textValue) => {\n setFilters((prev) => prev.map((f) => f === filter ? {\n ...f,\n value: [{\n value: textValue,\n label: textValue\n }]\n } : f));\n } }));\n case 'select':\n default:\n return (_jsx(SelectionCombobox, { filterType: filter.placeholder || filter.name, filterValues: filter.value, setFilterValues: (filterValues) => {\n setFilters((prev) => prev.map((f) => f === filter ? { ...f, value: filterValues } : f));\n }, options: filterGroups.find(group => group.name === filter.name)?.options || [] }));\n }\n}\nexport default function Filters({ filters, setFilters, filterGroups, }) {\n return (_jsx(\"div\", { className: \"flex gap-2 flex-wrap justify-end\", children: filters\n .filter((filter) => filter.value?.length > 0)\n .map((filter) => (_jsxs(\"div\", { className: \"flex gap-[1px] items-center text-sm\", children: [_jsx(\"div\", { className: \"flex gap-1.5 shrink-0 rounded-l bg-muted px-1.5 py-1 items-center\", children: filter.placeholder || filter.name }), generateComboboxOptions(filter, setFilters, filterGroups), _jsx(Button, { variant: \"ghost\", size: \"icon\", onClick: () => {\n setFilters((prev) => prev.filter((f) => f !== filter));\n }, className: \"bg-muted rounded-l-none rounded-r-sm size-7 hover:text-primary hover:bg-muted/50 transition shrink-0\", children: _jsx(X, { className: \"size-6\" }) })] }, filter.name + '-' + (filter.type == 'date' ? 'date' : filter.value.map(v => v.value).join(','))))) }));\n}\n//# sourceMappingURL=filters.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Button, VInput } from \"../index\";\nexport default function TextFilter({ selectedView, textValue, setTextValue, setFilters, handleClose, filterGroups, }) {\n const handleTextFilterAdd = () => {\n setFilters((prev) => {\n return [\n ...prev,\n {\n name: selectedView || \"\",\n placeholder: filterGroups.find(group => group.name === selectedView)?.placeholder,\n value: [{ value: textValue, label: textValue }],\n type: \"text\",\n }\n ];\n });\n handleClose();\n };\n return (_jsxs(\"div\", { className: \"p-2 flex flex-col gap-2\", children: [_jsx(VInput, { autoFocus: true, type: \"text\", size: \"sm\", value: textValue, onChange: setTextValue, onKeyDown: (e) => e.key === \"Enter\" && handleTextFilterAdd(), placeholder: \"Enter text...\" }), _jsx(Button, { size: \"sm\", variant: \"outline\", onClick: handleTextFilterAdd, disabled: !textValue.trim(), children: \"Apply\" })] }));\n}\n//# sourceMappingURL=textFilter.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Calendar } from \"../calendar\";\nimport { format } from \"date-fns\";\nexport default function DateFilter({ selectedView, dateRange, setDateRange, setFilters, filters, handleClose, filterGroups, }) {\n const handleDateRangeSelect = (range) => {\n setDateRange(range);\n if (range?.from && range?.to) {\n const selectedGroup = filterGroups.find(g => g.name === selectedView);\n setFilters([\n ...filters,\n {\n name: selectedView || \"\",\n value: [\n {\n value: format(range.from, \"yyyy-MM-dd\"),\n label: format(range.from, \"LLL dd, y\")\n },\n {\n value: format(range.to, \"yyyy-MM-dd\"),\n label: format(range.to, \"LLL dd, y\")\n }\n ],\n type: selectedGroup?.type || \"date\",\n },\n ]);\n handleClose();\n }\n };\n return (_jsx(\"div\", { className: \"p-2\", children: _jsx(Calendar, { initialFocus: true, mode: \"range\", defaultMonth: dateRange?.from, selected: dateRange, onSelect: handleDateRangeSelect, size: \"sm\" }) }));\n}\n//# sourceMappingURL=dateFilter.js.map","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { CommandItem, CommandEmpty } from \"../index\";\nexport default function SelectFilter({ selectedView, commandInput, setFilters, handleClose, filterGroups, }) {\n const getFilteredOptions = (groupName) => {\n const group = filterGroups.find(g => g.name === groupName);\n if (!group)\n return [];\n let filteredOptions = group.options || [];\n if (!commandInput.trim()) {\n return filteredOptions;\n }\n if (group.filterBy) {\n const filterLc = commandInput.toLowerCase();\n const results = filteredOptions.filter(option => {\n if (option.value === undefined)\n return false;\n const result = group.filterBy(option.value, filterLc);\n return result;\n });\n return results;\n }\n const filterLc = commandInput.toLowerCase();\n return filteredOptions.filter(option => {\n const optionValue = String(option.value || '').toLowerCase();\n return optionValue.includes(filterLc);\n });\n };\n if (!selectedView)\n return null;\n const options = getFilteredOptions(selectedView);\n if (options.length === 0) {\n return _jsx(CommandEmpty, { children: \"No matching options\" });\n }\n return (_jsx(_Fragment, { children: options.map((option) => (_jsx(CommandItem, { className: \"group flex gap-2 items-center w-full hover:bg-muted\", onSelect: () => {\n setFilters((prev) => {\n const existingFilterIndex = prev.findIndex(f => f.name === selectedView);\n const selectedGroup = filterGroups.find(g => g.name === selectedView);\n if (existingFilterIndex >= 0) {\n const updatedFilters = [...prev];\n updatedFilters[existingFilterIndex] = {\n ...updatedFilters[existingFilterIndex],\n value: [...updatedFilters[existingFilterIndex].value, option]\n };\n return updatedFilters;\n }\n else {\n return [...prev, {\n name: selectedView || \"\",\n placeholder: selectedGroup?.placeholder || \"\",\n value: [option],\n type: selectedGroup?.type || \"select\",\n }];\n }\n });\n handleClose();\n }, children: option.label || option.value || 'Unnamed option' }, option.value || `option-${Math.random()}`))) }));\n}\n//# sourceMappingURL=selectFilter.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect } from \"react\";\nimport { cn } from \"../../libs/utils\";\nimport { Button, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandGroup, CommandItem, CommandEmpty } from \"../index\";\nimport { ListFilter } from \"lucide-react\";\nimport Filters from \"./filters\";\nimport TextFilter from \"./textFilter\";\nimport DateFilter from \"./dateFilter\";\nimport SelectFilter from \"./selectFilter\";\nexport function FilterBar({ filters, setFilters, filterGroups }) {\n const [open, setOpen] = React.useState(false);\n const [selectedView, setSelectedView] = React.useState(null);\n const [commandInput, setCommandInput] = React.useState(\"\");\n const commandInputRef = React.useRef(null);\n const [dateRange, setDateRange] = React.useState();\n const [textValue, setTextValue] = React.useState(\"\");\n const handleSelect = (groupName) => {\n setSelectedView(groupName);\n setCommandInput(\"\");\n commandInputRef.current?.focus();\n };\n const getAvailableFilterGroups = () => {\n let options = filterGroups.map(group => ({\n ...group,\n options: (group.options ?? []).filter(option => !filters.some(filter => {\n if (filter.type === \"date\") {\n return filter.name === group.name;\n }\n return filter.name === group.name &&\n filter.value.some(val => val.value === option.value);\n }))\n })).filter(group => ((group.options ?? []).length > 0) ||\n (group.type === \"date\" && !filters.some(filter => filter.name === group.name)) ||\n (group.type === \"text\" && !filters.some(filter => filter.name === group.name)));\n if (options.length === 0) {\n return _jsx(CommandEmpty, { children: \"No available filters\" });\n }\n return options.map((group, index) => (_jsx(CommandItem, { onSelect: () => handleSelect(group.name), className: \"group flex gap-2 items-center hover:bg-muted\", children: _jsx(\"span\", { children: group.placeholder ?? group.name }) }, index)));\n };\n const handleClose = () => {\n setOpen(false);\n setTimeout(() => {\n setSelectedView(null);\n setCommandInput(\"\");\n setDateRange(undefined);\n }, 200);\n };\n const handleOpen = (open) => {\n setOpen(open);\n if (!open) {\n setTimeout(() => {\n setSelectedView(null);\n setCommandInput(\"\");\n setTextValue(\"\");\n }, 200);\n }\n };\n const ButtonClearFilter = () => {\n return (_jsx(\"div\", { className: \"flex gap-2 items-center\", children: _jsx(Button, { variant: \"outline\", size: \"xs\", className: \"transition group\", onClick: () => setFilters([]), children: \"Clear All\" }) }));\n };\n const renderFilterOptions = () => {\n if (!selectedView)\n return null;\n const selectedGroupType = filterGroups.find(g => g.name === selectedView)?.type;\n switch (selectedGroupType) {\n case \"date\":\n return (_jsx(DateFilter, { selectedView: selectedView, dateRange: dateRange, setDateRange: setDateRange, setFilters: setFilters, filters: filters, handleClose: handleClose, filterGroups: filterGroups }));\n case \"text\":\n return (_jsx(TextFilter, { selectedView: selectedView, textValue: textValue, setTextValue: setTextValue, setFilters: setFilters, handleClose: handleClose, filterGroups: filterGroups }));\n default:\n return (_jsx(SelectFilter, { selectedView: selectedView, commandInput: commandInput, setFilters: setFilters, handleClose: handleClose, filterGroups: filterGroups }));\n }\n };\n const url = new URL(window.location.href);\n const searchParams = url.searchParams;\n useEffect(() => {\n try {\n const urlSafeFilters = filters.map(filter => {\n const safeValue = Array.isArray(filter.value)\n ? filter.value.map(item => ({\n value: item.value\n }))\n : filter.value;\n return {\n name: filter.name,\n type: filter.type,\n value: safeValue,\n placeholder: filter.placeholder\n };\n });\n const params = new URLSearchParams(searchParams.toString());\n if (filters.length > 0) {\n params.set('filters', encodeURIComponent(JSON.stringify(urlSafeFilters)));\n }\n else {\n params.delete('filters');\n }\n const newUrl = `${window.location.pathname}?${params.toString()}`;\n window.history.replaceState({}, '', newUrl);\n }\n catch (error) {\n console.error(\"Failed to update URL with filters:\", error);\n }\n }, [filters]);\n useEffect(() => {\n const filtersParam = searchParams.get('filters');\n if (filtersParam) {\n try {\n const parsedFilters = JSON.parse(decodeURIComponent(filtersParam));\n const hydratedFilters = parsedFilters.map((filter) => {\n if (Array.isArray(filter.value)) {\n const group = filterGroups.find(g => g.name === filter.name);\n console.log(\"group\", group);\n const valuesWithLabels = filter.value.map((item) => {\n const matchingOption = group?.options?.find(opt => opt.value === item.value);\n return {\n value: item.value,\n label: matchingOption?.label || item.value\n };\n });\n console.log(\"valuesWithLabels\", valuesWithLabels);\n return {\n ...filter,\n value: valuesWithLabels\n };\n }\n return filter;\n });\n setFilters(hydratedFilters);\n }\n catch (error) {\n console.error(\"Failed to parse filters from URL:\", error);\n }\n }\n }, []);\n return (_jsxs(\"div\", { className: \"flex gap-2 flex-wrap justify-start w-full items-center\", children: [_jsx(\"div\", { className: \"flex gap-2 items-center\", children: _jsxs(Popover, { _open: open, onOpenChange: handleOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: \"ghost\", role: \"combobox\", \"aria-expanded\": open, size: \"md\", className: cn(\"transition group flex gap-1.5\"), children: [_jsx(ListFilter, { className: \"size-4 shrink-0 transition-all text-muted\" }), \"Filter\"] }) }), _jsx(PopoverContent, { className: \"w-[200px] p-0\", align: \"start\", children: _jsxs(Command, { children: [filterGroups.find(group => group.name === selectedView)?.type === \"select\" ? (_jsx(CommandInput, { placeholder: selectedView ? `Filter by ${selectedView}` : \"Filter...\", className: \"h-9 ring-0\", value: commandInput, onValueChange: (value) => {\n setCommandInput(value);\n }, ref: commandInputRef, autoFocus: true })) : null, _jsx(CommandList, { className: \"max-h-[300px] overflow-y-auto\", children: _jsx(CommandGroup, { children: !selectedView ? getAvailableFilterGroups() : renderFilterOptions() }) })] }) })] }) }), _jsx(Filters, { filters: filters, setFilters: setFilters, filterGroups: filterGroups }), filters.filter((filter) => filter.value?.length > 0).length > 0 && _jsx(ButtonClearFilter, {})] }));\n}\n//# sourceMappingURL=filterBar.js.map","export var FilterOperator;\n(function (FilterOperator) {\n FilterOperator[\"IS\"] = \"is\";\n FilterOperator[\"IS_NOT\"] = \"is_not\";\n FilterOperator[\"CONTAINS\"] = \"contains\";\n FilterOperator[\"BEFORE\"] = \"before\";\n FilterOperator[\"AFTER\"] = \"after\";\n FilterOperator[\"IS_ANY_OF\"] = \"is_any_of\";\n})(FilterOperator || (FilterOperator = {}));\n//# sourceMappingURL=types.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { cn } from \"../libs/utils\";\nimport { forwardRef } from \"react\";\nexport const Heading = forwardRef(({ className, level = 3, ...props }, ref) => {\n const Component = `h${level}`;\n const styles = {\n h1: \"text-2xl font-medium tracking-tight\",\n h2: \"text-xl font-medium tracking-tight\",\n h3: \"text-lg font-medium\",\n h4: \"text-base font-medium\",\n h5: \"text-sm font-medium\",\n h6: \"text-xs font-medium\",\n };\n return _jsx(Component, { ref: ref, className: cn(styles[`h${level}`], 'mb-2', className), ...props });\n});\nHeading.displayName = \"Heading\";\n//# sourceMappingURL=heading.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { cn } from \"../libs/utils\";\nimport { cva } from \"class-variance-authority\";\nimport { forwardRef } from \"react\";\n// Update the text variants to match the new sizing requirements\nconst textVariants = cva(\"text-foreground\", {\n variants: {\n size: {\n xl: \"text-base md:text-lg leading-relaxed\",\n lg: \"text-base leading-relaxed\",\n default: \"text-sm leading-normal\",\n sm: \"text-sm leading-normal\",\n xs: \"text-xs leading-normal\",\n },\n weight: {\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n },\n },\n defaultVariants: {\n size: \"default\",\n weight: \"normal\",\n },\n});\nexport const Text = forwardRef(({ className, size, weight, ...props }, ref) => {\n return _jsx(\"p\", { ref: ref, className: cn(textVariants({ size, weight, className })), ...props });\n});\nText.displayName = \"Text\";\n//# sourceMappingURL=text.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { TriangleAlert } from \"lucide-react\";\nimport { useRef } from \"react\";\nimport { VModal, VModalTitle, VModalFooter } from \"./shadcn\";\nimport { Button } from \"./shadcn/button\";\nexport function ConfirmModal({ title, content, onConfirm, onCancel, isOpen }) {\n const cancelButtonRef = useRef(null);\n return (_jsxs(VModal, { isOpen: isOpen, onClose: onCancel, description: \"Confirm Modal\", children: [_jsxs(\"div\", { className: \"sm:flex sm:items-start p-2\", children: [_jsx(\"div\", { className: \"mx-auto flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10\", children: _jsx(TriangleAlert, { className: \"size-6 text-red-600\", \"aria-hidden\": \"true\" }) }), _jsxs(\"div\", { className: \"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left\", children: [_jsx(VModalTitle, { className: \"leading-6\", show: true, children: title }), _jsx(\"div\", { className: \"mt-2\", children: _jsx(\"div\", { className: \"prose text-sm text-gray-500\", children: content }) })] })] }), _jsxs(VModalFooter, { align: \"right\", children: [_jsx(Button, { variant: \"destructive\", onClick: onConfirm, children: \"Confirm\" }), _jsx(Button, { variant: \"outline\", onClick: onCancel, ref: cancelButtonRef, children: \"Cancel\" })] })] }));\n}\n//# sourceMappingURL=ConfirmModal.js.map","import { createContext, useContext } from \"react\";\nexport function useToast() {\n return useContext(ToastContext);\n}\nconst ToastContext = createContext(() => { });\nexport { ToastContext };\n//# sourceMappingURL=ToastContext.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nconst PORTAL_ID = '--tailwind-portal';\nexport function Portal({ children }) {\n const tempNode = useRef(null);\n const [portalEl, setPortalEl] = useState(null);\n // hack to have the Portal not generating hydration errors (content mismatch) on SSR / CSR\n useEffect(() => {\n if (tempNode.current) { // we are on the browser -> we an use the portal\n const doc = tempNode.current.ownerDocument;\n let portalEl = doc.getElementById(PORTAL_ID);\n if (!portalEl) {\n portalEl = doc.createElement('DIV');\n portalEl.id = PORTAL_ID;\n doc.body.appendChild(portalEl);\n }\n setPortalEl(portalEl);\n }\n }, [tempNode.current]);\n if (portalEl) {\n return createPortal(children, portalEl);\n }\n else {\n return _jsx(\"span\", { ref: tempNode });\n }\n}\n//# sourceMappingURL=Portal.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Transition } from \"@headlessui/react\";\nimport { CircleCheck, AlertTriangle, Info, CircleX, X } from \"lucide-react\";\nimport { Fragment, useEffect, useState } from \"react\";\nconst icons = {\n success: CircleCheck,\n error: CircleX,\n warning: AlertTriangle,\n info: Info\n};\nconst colors = {\n success: 'text-green-600',\n error: 'text-red-600',\n warning: 'text-yellow-600',\n info: 'text-blue-600'\n};\nexport function NotificationPanel({ data, onClose }) {\n const [show, setShow] = useState(true);\n useEffect(() => {\n let timeoutId;\n if (data.duration) {\n timeoutId = setTimeout(() => {\n setShow(false);\n }, data.duration);\n }\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, []);\n const Icon = icons[data.status] || Info;\n const color = colors[data.status] || 'text-blue-600';\n // Global notification live region, render this permanently at the end of the document\n return (_jsx(\"div\", { \"aria-live\": \"assertive\", className: \"pointer-events-none fixed inset-0 flex items-end px-4 py-6 sm:items-start sm:p-6 z-100\", children: _jsx(\"div\", { className: \"flex w-full flex-col items-center space-y-4 sm:items-end\", children: _jsx(Transition, { appear: true, show: show, as: Fragment, afterLeave: onClose, enter: \"transform ease-out duration-700 transition\", enterFrom: \"translate-y-0 opacity-0 sm:translate-y-0 sm:translate-x-2\", enterTo: \"translate-y-2 opacity-100 sm:translate-x-0\", leave: \"transition ease-in duration-300\", leaveFrom: \"opacity-100\", leaveTo: \"opacity-0\", children: _jsx(\"div\", { className: \"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white shadow-lg ring-1 ring-black ring-opacity-5\", children: _jsx(\"div\", { className: \"p-4\", children: _jsxs(\"div\", { className: \"flex items-start\", children: [_jsx(\"div\", { className: \"shrink-0\", children: _jsx(Icon, { className: `size-6 ${color}`, \"aria-hidden\": \"true\" }) }), _jsxs(\"div\", { className: \"ml-3 w-0 flex-1 pt-0.5\", children: [_jsx(\"p\", { className: \"text-sm font-medium text-gray-900\", children: data.title }), _jsx(\"p\", { className: \"mt-1 text-sm text-gray-500\", children: data.description })] }), _jsx(\"div\", { className: \"ml-4 flex shrink-0\", children: _jsxs(\"button\", { type: \"button\", className: \"inline-flex rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-hidden focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2\", onClick: () => setShow(false), children: [_jsx(\"span\", { className: \"sr-only\", children: \"Close\" }), _jsx(X, { className: \"size-5\", \"aria-hidden\": \"true\" })] }) })] }) }) }) }) }) }));\n}\n//# sourceMappingURL=NotificationPanel.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { Portal } from \"../Portal.js\";\nimport { NotificationPanel } from \"./NotificationPanel.js\";\nimport { ToastContext } from \"./ToastContext.js\";\nexport function ToastProvider({ children }) {\n const [data, setData] = useState(null);\n const toast = (data) => {\n setData(data);\n };\n return (_jsxs(_Fragment, { children: [_jsx(ToastContext.Provider, { value: toast, children: children }), data && _jsx(Portal, { children: _jsx(NotificationPanel, { data: data, onClose: () => toast(null) }) })] }));\n}\n//# sourceMappingURL=ToastProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { ConfirmModal } from \"./ConfirmModal.js\";\nimport { useToast } from \"./toast/index.js\";\nexport function DeleteModal({ idToDelete, title, content, setIdToDelete, deleteApi }) {\n const toast = useToast();\n const doDelete = async () => {\n if (!idToDelete) {\n return;\n }\n return deleteApi(idToDelete)\n .then(() => {\n toast({\n title: 'Delete succeeded',\n status: 'success'\n });\n }).catch((err) => {\n toast({\n title: 'Failed to delete',\n description: err.message ?? 'An error occurred while deleting the object',\n status: 'error'\n });\n }).finally(() => {\n setIdToDelete(undefined);\n });\n };\n return (_jsx(ConfirmModal, { title: title, content: content, isOpen: !!idToDelete, onConfirm: doDelete, onCancel: () => { setIdToDelete(undefined); } }));\n}\n//# sourceMappingURL=DeleteModal.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nexport function Divider({ className }) {\n return (_jsx(\"hr\", { className: clsx(\"w-full h-0.5 border-t-0 bg-border\", className) }));\n}\n//# sourceMappingURL=Divider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useState, Fragment } from 'react';\nimport { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react';\nimport { X } from 'lucide-react';\nimport { Button } from './shadcn/button';\nexport function SidePanel({ isOpen, title, onClose, children }) {\n const [panelWidth, setPanelWidth] = useState(768);\n const handleDragStart = (e) => {\n e.preventDefault();\n let isDragging = true;\n const startX = e.pageX;\n const startWidth = panelWidth;\n const handleMouseMove = (e) => {\n if (isDragging) {\n const deltaX = startX - e.pageX;\n const newWidth = Math.max(startWidth + deltaX, 480);\n setPanelWidth(newWidth);\n }\n };\n const handleMouseUp = () => {\n isDragging = false;\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n };\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n };\n return (_jsx(Transition, { show: isOpen, as: Fragment, children: _jsxs(Dialog, { as: \"div\", className: \"relative z-10\", onClose: onClose, children: [_jsx(\"div\", { className: \"fixed inset-0\" }), _jsx(\"div\", { className: \"fixed inset-0 overflow-hidden\", children: _jsx(\"div\", { className: \"absolute inset-0 overflow-hidden\", children: _jsx(\"div\", { className: \"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 sm:pl-16\", children: _jsx(TransitionChild, { as: Fragment, enter: \"transform transition ease-in-out duration-500 sm:duration-700\", enterFrom: \"translate-x-full\", enterTo: \"translate-x-0\", leave: \"transform transition ease-in-out duration-500 sm:duration-700\", leaveFrom: \"translate-x-0\", leaveTo: \"translate-x-full\", unmount: true, children: _jsx(DialogPanel, { className: \"pointer-events-auto border-l\", style: { width: `${panelWidth}px` }, children: _jsxs(\"div\", { className: \"relative flex h-full\", children: [_jsx(\"div\", { className: \"absolute left-0 top-0 bottom-0 w-1 cursor-ew-resize hover:bg-indigo-500 transition-colors\", onMouseDown: handleDragStart }), _jsxs(\"div\", { className: \"flex-1 flex flex-col overflow-y-scroll gap-4 bg-background py-6 shadow-xl\", children: [_jsx(\"div\", { className: \"px-4 sm:px-6\", children: _jsxs(\"div\", { className: \"flex items-start justify-between\", children: [_jsx(DialogTitle, { className: \"w-full text-base font-semibold leading-6\", children: _jsx(\"div\", { className: \"text-2xl\", children: title ?? \"\" }) }), _jsx(\"div\", { className: \"ml-3 flex h-7 items-center\", children: _jsx(CloseButton, { onClose: onClose }) })] }) }), _jsx(\"div\", { className: \"px-4 sm:px-6\", children: children })] })] }) }) }) }) }) })] }) }));\n}\nfunction CloseButton({ onClose }) {\n return (_jsx(Button, { alt: \"Close panel\", variant: \"ghost\", onClick: onClose, children: _jsx(X, { className: \"size-6\", \"aria-hidden\": \"true\" }) }));\n}\n//# sourceMappingURL=SidePanel.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Menu, MenuButton, MenuItems, MenuItem as _MenuItem, Transition } from '@headlessui/react';\nimport clsx from 'clsx';\nimport { Fragment } from 'react';\nexport function Dropdown({ trigger, children }) {\n return (_jsxs(Menu, { as: \"div\", className: \"relative\", children: [_jsx(MenuButton, { as: \"span\", className: \"-m-1.5 flex items-center p-1.5\", children: trigger }), _jsx(Transition, { as: Fragment, enter: \"transition ease-out duration-100\", enterFrom: \"transform opacity-0 scale-95\", enterTo: \"transform opacity-100 scale-100\", leave: \"transition ease-in duration-75\", leaveFrom: \"transform opacity-100 scale-100\", leaveTo: \"transform opacity-0 scale-95\", children: _jsx(MenuItems, { className: \"absolute right-0 z-10 mt-2.5 w-48 origin-top-right rounded-md bg-white dark:bg-slate-900 dark:border-slate-800 dark:border py-2 shadow-lg ring-1 ring-gray-900/5 dark:ring-slate-200/5 focus:outline-hidden\", children: children }) })] }));\n}\nexport function MenuItem({ children, href = '#', onClick, closeOnClick = true, isDisabled = false }) {\n return (_jsx(_MenuItem, { disabled: isDisabled, children: ({ active, close }) => (_jsx(\"a\", { href: href, onClick: (e) => {\n e.preventDefault();\n e.stopPropagation();\n onClick && onClick(e);\n closeOnClick && close();\n }, className: clsx(active ? 'bg-gray-50 dark:bg-slate-800' : '', isDisabled ? 'opacity-50 cursor-not-allowed' : '', 'block px-3 py-1 text-sm leading-6 text-gray-900 dark:text-gray-200'), children: children })) }));\n}\n//# sourceMappingURL=Dropdown.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Listbox, ListboxButton, ListboxOption, ListboxOptions, Transition } from \"@headlessui/react\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport clsx from \"clsx\";\nimport { Fragment } from \"react\";\nexport function DropdownList({ items, value, onChange }) {\n return (_jsx(Listbox, { value: value, onChange: onChange, children: ({ open }) => (_jsxs(\"div\", { className: \"relative\", children: [_jsxs(\"div\", { className: \"inline-flex divide-x divide-indigo-700 rounded-md shadow-2xs\", children: [_jsxs(\"div\", { className: \"inline-flex items-center gap-x-1.5 rounded-l-md bg-indigo-600 px-3 py-2 text-white shadow-2xs\", children: [value.name && _jsx(Check, { className: \"-ml-0.5 size-5\", \"aria-hidden\": \"true\" }), _jsx(\"p\", { className: \"text-sm font-semibold\", children: value.name || \"\" })] }), _jsxs(ListboxButton, { className: \"inline-flex items-center rounded-l-none rounded-r-md bg-indigo-600 p-2 hover:bg-indigo-700 focus:outline-hidden focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2 focus:ring-offset-gray-50\", children: [_jsx(\"span\", { className: \"sr-only\", children: \"Change selection\" }), _jsx(ChevronDown, { className: \"size-5 text-white\", \"aria-hidden\": \"true\" })] })] }), _jsx(Transition, { show: open, as: Fragment, leave: \"transition ease-in duration-100\", leaveFrom: \"opacity-100\", leaveTo: \"opacity-0\", children: _jsx(ListboxOptions, { className: \"absolute right-0 z-10 mt-2 w-72 origin-top-right divide-y divide-gray-200 overflow-hidden rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-hidden\", children: items.map((option) => (_jsx(ListboxOption, { className: ({ active }) => clsx(active ? 'bg-indigo-600 text-white' : 'text-gray-900', 'cursor-default select-none p-4 text-sm'), value: option, children: ({ selected, active }) => (_jsxs(\"div\", { className: \"flex flex-col\", children: [_jsxs(\"div\", { className: \"flex justify-between\", children: [_jsx(\"p\", { className: selected ? 'font-semibold' : 'font-normal', children: option.name }), selected ? (_jsx(\"span\", { className: active ? 'text-white' : 'text-indigo-600', children: _jsx(Check, { className: \"size-5\", \"aria-hidden\": \"true\" }) })) : null] }), _jsx(\"p\", { className: clsx(active ? 'text-indigo-200' : 'text-gray-500', 'mt-2'), children: option.description })] })) }, option.id))) }) })] })) }));\n}\n//# sourceMappingURL=DropdownList.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nfunction getRealSize(size) {\n switch (size) {\n case 'xs': return 'size-2';\n case 'sm': return 'size-3';\n case 'md': return 'size-4';\n case 'lg': return 'size-5';\n case 'xl': return 'size-7';\n case '2xl': return 'size-10';\n default: throw new Error('Unexpected size: ' + size);\n }\n}\nexport function Spinner({ size, className }) {\n const sizeClass = getRealSize(size || 'md');\n return (_jsx(_Fragment, { children: _jsxs(\"svg\", { className: clsx(\"animate-[spin_0.8s_linear_infinite] text-indigo-500\", sizeClass, className), xmlns: \"http://www.w3.org/2000/svg\", fill: \"none\", viewBox: \"0 0 24 24\", children: [_jsx(\"circle\", { className: \"opacity-25\", cx: \"12\", cy: \"12\", r: \"10\", stroke: \"currentColor\", strokeWidth: \"4\" }), _jsx(\"path\", { className: \"opacity-75\", fill: \"currentColor\", d: \"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\" })] }) }));\n}\n//# sourceMappingURL=Spinner.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { Spinner } from \"./Spinner.js\";\nfunction getRealSize(size) {\n switch (size) {\n case 'xs': return 'rounded-xs px-2 py-1 text-xs gap-x-1';\n case 'sm': return 'rounded-xs px-2 py-1 text-sm gap-x-1';\n case 'md': return 'rounded-md px-2.5 py-1.5 text-sm gap-x-1.5';\n case 'lg': return 'rounded-md px-3 py-2 text-sm gap-x-1.5';\n case 'xl': return 'rounded-md px-3.5 py-2.5 text-sm gap-x-2';\n default: throw new Error('Unexpected size: ' + size);\n }\n}\nconst Variants = {\n primary: \"shadow-2xs bg-indigo-600 text-white hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600\",\n secondary: \"shadow-2xs bg-white text-gray-900 hover:bg-gray-50 ring-1 ring-inset ring-gray-300\",\n soft: \"shadow-2xs bg-indigo-50 text-indigo-600 hover:bg-indigo-100\",\n ghost: \"text-indigo-600 hover:bg-indigo-100 dark:text-indigo-400 dark:hover:bg-indigo-900\",\n unstyled: \"\"\n};\nconst SpinnerVariants = {\n primary: \"text-white\",\n secondary: \"text-indigo-500\",\n soft: \"text-indigo-600\",\n ghost: \"text-indigo-600\",\n unstyled: \"text-gray-600\"\n};\nexport function Button({ title, className, type = 'button', children, size, onClick, variant = \"primary\", isLoading = false, isDisabled = false }) {\n const sizeClass = getRealSize(size || 'md');\n return (_jsxs(\"button\", { title: title, disabled: isDisabled || isLoading, onClick: onClick, type: type, className: clsx(\"whitespace-nowrap inline-flex items-center justify-center font-semibold hover:cursor-pointer\", Variants[variant], sizeClass, isDisabled && \"cursor-not-allowed text-gray-300!\", className), children: [isLoading && _jsx(Spinner, { className: SpinnerVariants[variant], size: size }), children] }));\n}\n//# sourceMappingURL=Button.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Plus } from \"lucide-react\";\nimport { Button } from \"./Button.js\";\nexport function EmptyCollection({ buttonLabel, title, children, onClick }) {\n return (_jsxs(\"div\", { className: \"text-center py-12\", children: [_jsx(\"svg\", { className: \"mx-auto h-12 w-12 text-gray-400 dark:text-gray-200\", fill: \"none\", viewBox: \"0 0 24 24\", stroke: \"currentColor\", \"aria-hidden\": \"true\", children: _jsx(\"path\", { vectorEffect: \"non-scaling-stroke\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: 2, d: \"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z\" }) }), _jsx(\"h3\", { className: \"mt-2 text-sm font-semibold text-gray-500\", children: title }), _jsx(\"p\", { className: \"mt-1 text-sm text-gray-500\", children: children }), _jsx(\"div\", { className: \"mt-6\", children: _jsxs(Button, { onClick: onClick, size: 'lg', children: [_jsx(Plus, { className: \"-ml-0.5 mr-1.5 size-5\", \"aria-hidden\": \"true\" }), buttonLabel] }) })] }));\n}\n//# sourceMappingURL=EmptyCollection.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useRef } from \"react\";\n/**\n * TODO: TS complains that:\n * Type 'FileList' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.\n * So as a quick fix aI use a for loop to convert FileList to File[]\n * @param files\n * @returns\n */\nfunction fileListToArray(files) {\n const ar = [];\n for (let i = 0, l = files.length; i < l; i++) {\n ar.push(files[i]);\n }\n return ar;\n}\nexport function FileUploadInput({ children, onUpload }) {\n const inputRef = useRef(null);\n const _onUpload = () => {\n if (inputRef.current?.files) {\n onUpload(fileListToArray(inputRef.current.files));\n }\n };\n return (_jsxs(\"label\", { style: { cursor: \"pointer\" }, children: [children, _jsx(\"input\", { ref: inputRef, type: \"file\", style: { display: \"none\" }, onChange: _onUpload })] }));\n}\n//TODO implement using tailwind\nexport function DropZone({ onUpload }) {\n const dropZoneProps = useDropZone({ onUpload });\n return (_jsx(\"div\", { ...dropZoneProps, className: \"flex items-center justify-center w-full h-64 border-2 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600\", children: _jsxs(\"label\", { htmlFor: \"dropzone-file\", className: \"flex flex-col items-center justify-center w-full h-full\", children: [_jsxs(\"div\", { className: \"flex flex-col items-center justify-center pt-5 pb-6\", children: [_jsx(\"svg\", { className: \"w-8 h-8 mb-4 text-gray-500 dark:text-gray-400\", \"aria-hidden\": \"true\", xmlns: \"http://www.w3.org/2000/svg\", fill: \"none\", viewBox: \"0 0 20 16\", children: _jsx(\"path\", { stroke: \"currentColor\", \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\", \"stroke-width\": \"2\", d: \"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2\" }) }), _jsxs(\"p\", { className: \"mb-2 text-sm text-gray-500 dark:text-gray-400\", children: [_jsx(\"span\", { className: \"font-semibold\", children: \"Click to upload\" }), \" or drag and drop\"] }), _jsx(\"p\", { className: \"text-xs text-gray-500 dark:text-gray-400\", children: \"SVG, PNG, JPG or GIF (MAX. 800x400px)\" })] }), _jsx(\"input\", { id: \"dropzone-file\", type: \"file\", className: \"hidden\" })] }) }));\n}\nfunction _onDragEnter(el) {\n let cnt = el.__dragOver_cnt__ || 0;\n el.__dragOver_cnt__ = cnt + 1;\n return !cnt; // true if first drag o ver false if dragover already recorded\n}\nfunction _onDragLeave(el) {\n let cnt = el.__dragOver_cnt__;\n if (!cnt)\n return false;\n el.__dragOver_cnt__ = cnt - 1;\n return cnt === 1; // true if leave false if not\n}\nfunction _onDrop(el) {\n delete el.__dragOver_cnt__;\n}\nexport function useDropZone({ onUpload, dragOverClass = \"is-drag-over-on\", dropEffect = \"copy\", }) {\n const ref = useRef(null);\n const onDrop = (ev) => {\n ev.preventDefault();\n _onDrop(ref.current);\n ref.current?.classList.remove(dragOverClass);\n const items = ev.dataTransfer.items;\n if (items) {\n const promises = [];\n const traverseFileTree = (item, path = \"\") => {\n return new Promise((resolve) => {\n if (item.isFile) {\n item.file((file) => {\n Object.defineProperty(file, \"webkitRelativePath\", { value: path + file.name });\n resolve([file]);\n });\n }\n else if (item.isDirectory) {\n const dirReader = item.createReader();\n const entries = [];\n const readEntries = () => {\n dirReader.readEntries((results) => {\n if (!results.length) {\n Promise.all(entries).then((filesArrays) => resolve(filesArrays.flat()));\n }\n else {\n for (const entry of results) {\n entries.push(traverseFileTree(entry, path + item.name + \"/\"));\n }\n readEntries();\n }\n });\n };\n readEntries();\n }\n });\n };\n for (let i = 0; i < items.length; i++) {\n const entry = items[i].webkitGetAsEntry();\n if (entry) {\n promises.push(traverseFileTree(entry));\n }\n }\n Promise.all(promises).then((filesArrays) => {\n const allFiles = filesArrays.flat();\n if (allFiles.length) {\n onUpload(allFiles);\n }\n });\n }\n };\n const onDragOver = (ev) => {\n ev.preventDefault();\n ev.dataTransfer.dropEffect = dropEffect;\n };\n const onDragEnter = () => {\n if (_onDragEnter(ref.current)) {\n ref.current?.classList.add(dragOverClass);\n }\n };\n const onDragLeave = () => {\n if (_onDragLeave(ref.current)) {\n ref.current?.classList.remove(dragOverClass);\n }\n };\n return {\n onDrop,\n onDragOver,\n onDragEnter,\n onDragLeave,\n ref,\n };\n}\n//# sourceMappingURL=FileUpload.js.map","const INPUT_UNSTYLED = \"block m-0 p-0 w-full border-0 focus:outline-hidden focus:ring-0 bg-transparent\";\nconst INPUT_NO_PADDING = \"block sm:text-sm sm:leading-6 rounded-md border-0 text-gray-900 shadow-2xs ring-1 ring-inset ring-gray-300 dark:ring-slate-600 dark:text-slate-50 dark:bg-slate-800 placeholder:text-gray-400 dark:placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 dark:focus:ring-indigo-800\";\nconst INPUT = INPUT_NO_PADDING + \" py-1.5\";\nconst Styles = {\n INPUT_UNSTYLED,\n INPUT_NO_PADDING,\n INPUT\n};\nexport { Styles };\n//# sourceMappingURL=styles.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport React from 'react';\nimport { X } from 'lucide-react';\nimport { Styles } from './styles.js';\nconst Input = React.forwardRef(({ unstyled, value, onChange, className, type, ...others }, ref) => {\n const _onChange = (ev) => {\n onChange && onChange(ev.target.value);\n };\n const _onClear = () => {\n onChange && onChange('');\n };\n return (_jsxs(\"div\", { style: { position: 'relative', display: 'inline-block' }, className: clsx(\"w-full\", className), children: [_jsx(\"input\", { type: type || 'text', value: value == null ? '' : value, onChange: _onChange, className: clsx('w-full', unstyled ? Styles.INPUT_UNSTYLED : Styles.INPUT, className), ref: ref, ...others }), value && (_jsx(\"button\", { onClick: _onClear, className: `absolute ${type !== 'number' ? 'right-2' : 'right-7'} top-1/2 -translate-y-1/2 size-7 text-gray-400 hover:text-red-500 cursor-pointer`, children: _jsx(X, {}) }))] }));\n});\nexport { Input };\n//# sourceMappingURL=Input.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { useState } from 'react';\nimport { Badge } from './Badge';\nimport { VInput } from './shadcn/input';\nexport function InputList({ value = [], onChange, className, delimiters = \", \", placeholder }) {\n const [text, setText] = useState('');\n const onBlur = (ev) => {\n const v = ev.target.value;\n if (v && v.trim()) {\n onChange([...value, v.trim()]);\n setText('');\n }\n };\n const onKeyDown = (ev) => {\n const v = ev.target.value;\n const isEmpty = !v.trim();\n const key = ev.key;\n if (key === 'Enter' || delimiters.indexOf(key) > -1) {\n ev.preventDefault();\n if (value && !isEmpty) {\n onChange([...value, v.trim()]);\n setText('');\n }\n }\n else if (key === 'Backspace' && isEmpty) {\n if (value && value.length > 0) {\n value.pop();\n onChange([...value]);\n }\n }\n };\n const _onClick = (index) => {\n if (value && value.length > 0) {\n value.splice(index, 1);\n onChange([...value]);\n }\n };\n return (_jsxs(\"div\", { className: clsx(className, 'w-full space-x-1 space-y-1 flex flex-wrap w-full rounded-md py-2 px-1 text-sm border border-input bg-background dark:bg-slate-800 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2'), children: [value && value.length > 0 &&\n (value.map((v, index) => _jsx(Badge, { variant: \"secondary\", onClick: () => _onClick(index), style: { whiteSpace: 'nowrap' }, className: 'cursor-pointer', children: v }, index))), _jsx(\"div\", { children: _jsx(VInput, { clearable: false, className: 'placeholder:text-muted-foreground px-1', variant: 'unstyled', type: 'text', value: text, onBlur: onBlur, onKeyDown: onKeyDown, onChange: setText, placeholder: !value || value.length === 0 ? placeholder : '' }) })] }));\n}\n//# sourceMappingURL=InputList.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nexport function Link({ underline = 'always', className, children, ...others }) {\n let underlineClass;\n if (underline === 'always') {\n underlineClass = 'underline';\n }\n else if (underline === 'hover') {\n underlineClass = 'hover:underline';\n }\n return _jsx(\"a\", { className: clsx(\"text-indigo-800 dark:text-indigo-300\", className, underlineClass), ...others, children: children });\n}\n//# sourceMappingURL=Link.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nexport function MenuList({ className, children }) {\n return (_jsx(\"ul\", { className: `${className} space-y-1 flex flex-col items-start dark:px-2`, children: children }));\n}\nconst MenuListItem = forwardRef(function _MenuListItem(props, ref) {\n const { current, children, className, href = '#', onClick, ...others } = props;\n return (_jsx(\"li\", { className: clsx(className, current ?\n 'bg-gray-50 text-indigo-600'\n :\n 'text-gray-700 dark:dark:text-slate-300 hover:text-indigo-600 hover:bg-gray-50 dark:hover:bg-slate-800 dark:hover:text-slate-50 dark:border dark:border-transparent dark:hover:border-slate-50', 'w-full rounded-md p-2 pl-3 text-sm leading-6 font-semibold'), children: _jsx(\"a\", { ref: ref, href: href, onClick: (e) => {\n if (onClick) {\n e.preventDefault();\n onClick(e);\n }\n else if (href === '#') {\n e.preventDefault();\n }\n }, className: 'w-full flex items-center gap-x-3', ...others, children: children }) }));\n});\nMenuList.Item = MenuListItem;\n//# sourceMappingURL=MenuList.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { CircleX, CircleCheck, AlertTriangle, Info } from 'lucide-react';\nexport function MessageBox({ icon, status, title, children, className }) {\n let defaultIcon, titleColor, textColor, bgColor;\n switch (status) {\n case 'error': {\n defaultIcon = _jsx(CircleX, { className: \"size-5 text-destructive\", \"aria-hidden\": \"true\" });\n titleColor = \"\";\n textColor = \"text-foreground\";\n bgColor = \"bg-destructive border border-destructive\";\n break;\n }\n case 'warning': {\n defaultIcon = _jsx(AlertTriangle, { className: \"size-5 text-attention\", \"aria-hidden\": \"true\" });\n titleColor = \"\";\n textColor = \"text-foreground\";\n bgColor = \"bg-attention border border-attention\";\n break;\n }\n case 'success': {\n defaultIcon = _jsx(CircleCheck, { className: \"size-5 text-success\", \"aria-hidden\": \"true\" });\n titleColor = \"\";\n textColor = \"text-foreground\";\n bgColor = \"bg-success border border-success\";\n break;\n }\n case 'info': {\n defaultIcon = _jsx(Info, { className: \"size-5 text-info\", \"aria-hidden\": \"true\" });\n titleColor = \"\";\n textColor = \"text-foreground\";\n bgColor = \"bg-info border border-info\";\n break;\n }\n case 'default': {\n defaultIcon = _jsx(Info, { className: \"size-5 text-muted\", \"aria-hidden\": \"true\" });\n titleColor = \"\";\n textColor = \"text-foreground\";\n bgColor = \"bg-muted border border-muted\";\n break;\n }\n case 'done': {\n defaultIcon = _jsx(Info, { className: \"size-5 text-done\", \"aria-hidden\": \"true\" });\n titleColor = \"\";\n textColor = \"text-foreground\";\n bgColor = \"bg-done border border-done\";\n break;\n }\n }\n return (_jsx(\"div\", { className: `rounded-md p-4 ${bgColor} ${className}`, children: _jsxs(\"div\", { className: \"flex\", children: [_jsx(\"div\", { className: \"shrink-0\", children: icon ?? defaultIcon }), _jsxs(\"div\", { className: \"w-full ml-2 px-1\", children: [title && _jsx(\"h3\", { className: `text-sm font-medium mb-2 ${titleColor}`, children: title }), _jsx(\"div\", { className: `text-sm ${textColor} break-words`, children: children })] })] }) }));\n}\nexport function ErrorBox({ title, className, children }) {\n return _jsx(MessageBox, { status: \"error\", title: title, className: className, children: _jsx(\"pre\", { children: children }) });\n}\nexport function InfoBox({ title, className, children }) {\n return _jsx(MessageBox, { status: \"info\", title: title, className: className, children: children });\n}\nexport function WarningBox({ title, className, children }) {\n return _jsx(MessageBox, { status: \"warning\", title: title, className: className, children: children });\n}\nexport function SuccessBox({ title, className, children }) {\n return _jsx(MessageBox, { status: \"success\", title: title, className: className, children: children });\n}\nexport function DefaultBox({ title, className, children }) {\n return _jsx(MessageBox, { status: \"default\", title: title, className: className, children: children });\n}\n//# sourceMappingURL=MessageBox.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nimport { Fragment } from \"react\";\nimport { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from \"@headlessui/react\";\nimport { X } from \"lucide-react\";\nexport function Modal({ className, children, isOpen, onClose, noCloseButton = false, allowOverflow = false, disableCloseOnClickOutside = false, }) {\n const setOpen = (open) => {\n if (!open) {\n onClose();\n }\n };\n return (_jsx(Transition, { show: isOpen, as: Fragment, children: _jsxs(Dialog, { style: { zIndex: 50 }, as: \"div\", className: \"relative\", onClose: disableCloseOnClickOutside ? () => { } : setOpen, children: [_jsx(TransitionChild, { as: Fragment, enter: \"ease-out duration-300\", enterFrom: \"opacity-0\", enterTo: \"opacity-100\", leave: \"ease-in duration-200\", leaveFrom: \"opacity-100\", leaveTo: \"opacity-0\", unmount: true, children: _jsx(\"div\", { className: \"fixed inset-0 bg-gray-500 dark:bg-slate-800 dark:opacity-75 opacity-75 transition-opacity\" }) }), _jsx(\"div\", { className: \"fixed inset-0 z-10 w-screen overflow-y-auto\", children: _jsx(\"div\", { className: \"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0\", children: _jsx(TransitionChild, { as: Fragment, enter: \"ease-out duration-300\", enterFrom: \"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95\", enterTo: \"opacity-100 translate-y-0 sm:scale-100\", leave: \"ease-in duration-200\", leaveFrom: \"opacity-100 translate-y-0 sm:scale-100\", leaveTo: \"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95\", children: _jsxs(DialogPanel, { className: clsx(\"p-0! relative transform rounded-lg bg-white dark:bg-slate-900 text-left dark:text-slate-100 shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-md sm:p-6\", allowOverflow ? \"overflow-visible\" : \"overflow-hidden\", className), children: [!noCloseButton && _jsx(ModalCloseButton, { onClose: onClose }), children] }) }) }) })] }) }));\n}\nfunction ModalCloseButton({ onClose }) {\n return (_jsx(\"div\", { className: \"absolute right-0 top-0 hidden pr-4 pt-4 sm:block\", children: _jsxs(\"button\", { tabIndex: -1, type: \"button\", className: \"rounded-md bg-white text-gray-400 dark:text-slate-200 dark:bg-slate-800 hover:brightness-95 focus:outline-hidden focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 hover:cursor-pointer\", onClick: onClose, children: [_jsx(\"span\", { className: \"sr-only\", children: \"Close\" }), _jsx(X, { className: \"size-6\", \"aria-hidden\": \"true\" })] }) }));\n}\nexport function ModalTitle({ children, showDivider = false }) {\n return (_jsx(\"div\", { className: showDivider ? \"border-b-solid border-b border-b-1\" : \"\", children: _jsx(DialogTitle, { as: \"h3\", className: \"py-4 pl-4 pr-8 text-base font-semibold leading-6 text-gray-900 dark:text-slate-50\", children: children }) }));\n}\nexport function ModalFooter({ children, className = \"justify-end\", fill = false }) {\n return (_jsx(\"div\", { className: clsx(\"w-full flex space-x-2 p-4 border-t-solid border-t-gray-100 dark:border-t-gray-800 border-t\", className || \"justify-end\", fill ? \"bg-gray-100 dark:bg-slate-800\" : \"\"), children: children }));\n}\nexport function ModalBody({ children, className = \"\" }) {\n return _jsx(\"div\", { className: clsx(\"p-4\", className), children: children });\n}\n//# sourceMappingURL=Modal.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nimport React, { useEffect } from \"react\";\nimport { Styles } from \"./styles.js\";\nfunction numberToString(value) {\n if (value == null || isNaN(value)) {\n return '';\n }\n else {\n return value.toString();\n }\n}\n/**\n * The value of this input is always a number. It can be undefined or NaN. If NaN the input value will not be updated with the NaN one.\n * If undefined the input will be updated to be empty.\n * The onChange callback is called whenever the value changes. If the input cannot be parsed as a number\n * it will be returned as NaN.\n */\nconst NumberInput = React.forwardRef(({ value, onChange, className, noScroll = false, noSpinners = false, ...others }, ref) => {\n // we need to store the state here in string\n const [textValue, setTextValue] = React.useState(numberToString(value));\n const _onChange = (ev) => {\n const value = ev.target.value;\n setTextValue(value);\n if (value === '') {\n onChange && onChange(undefined, value);\n }\n else {\n const num = parseFloat(value);\n onChange && onChange(num, value);\n }\n };\n useEffect(() => {\n // we do not update if not empty and NaN\n if (value == null || !isNaN(value)) {\n const text = numberToString(value);\n setTextValue(text);\n }\n }, [value]);\n return (_jsx(\"input\", { onWheel: noScroll ? event => { event.target.blur(); } : others.onWheel, type: 'number', value: textValue, onChange: _onChange, className: clsx(className, Styles.INPUT, { \"no-spinners\": noSpinners }, noSpinners && \"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none\"), ref: ref, ...others }));\n});\nexport { NumberInput };\n//# sourceMappingURL=NumberInput.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nimport { useState } from \"react\";\nexport class RadioOptionAdapter {\n renderOption(item) {\n return this.labelOf(item);\n }\n findById(items, id) {\n return items.find(item => this.idOf(item) === id);\n }\n}\nexport function RadioGroup({ checkColor, cols = \"grid-cols-1\", gap = \"gap-2\", value, onChange, options, checkIcon: CheckIcon = DefaultCheckIcon, adapter }) {\n const [selected, setSelected] = useState(value);\n const onSelect = (option) => {\n setSelected(option);\n onChange(option);\n };\n const selectedId = selected ? adapter.idOf(selected) : undefined;\n return (_jsx(\"div\", { className: clsx(\"grid\", cols, gap), children: options.map(option => {\n const key = adapter.idOf(option);\n return (_jsx(RadioOption, { checkColor: checkColor, isSelected: key === selectedId, option: option, adapter: adapter, onSelect: onSelect, CheckIcon: CheckIcon }, key));\n }) }));\n}\nfunction RadioOption({ checkColor, CheckIcon, adapter, isSelected, option, onSelect }) {\n const [isHighlighted, setIsHighlighted] = useState(false);\n return (_jsxs(\"div\", { className: \"flex gap-1 cursor-pointer items-center\", onClick: () => onSelect(option), onMouseEnter: () => setIsHighlighted(true), onMouseLeave: () => setIsHighlighted(false), children: [_jsx(\"div\", { className: \"\", children: _jsx(CheckIcon, { size: 24, isChecked: isSelected, isHighlighted: isHighlighted, color: checkColor }) }), _jsx(\"div\", { children: adapter.renderOption(option) })] }));\n}\nfunction DefaultCheckIcon({ size, isChecked, isHighlighted, color = \"currentColor\" }) {\n //https://www.svgrepo.com/svg/309414/checkbox-checked\n //https://www.svgrepo.com/svg/309415/checkbox-unchecked\n const opacity = isHighlighted ? 1 : 0.6;\n return isChecked ? (_jsx(\"svg\", { width: `${size}px`, height: `${size}px`, viewBox: \"0 0 24 24\", version: \"1.1\", children: _jsx(\"g\", { stroke: \"none\", strokeWidth: \"1\", fill: \"none\", fillRule: \"evenodd\", children: _jsx(\"g\", { id: \"ic_fluent_checkbox_checked_24_regular\", fill: color, fillRule: \"nonzero\", opacity: opacity, children: _jsx(\"path\", { d: \"M18.25,3 C19.7687831,3 21,4.23121694 21,5.75 L21,18.25 C21,19.7687831 19.7687831,21 18.25,21 L5.75,21 C4.23121694,21 3,19.7687831 3,18.25 L3,5.75 C3,4.23121694 4.23121694,3 5.75,3 L18.25,3 Z M18.25,4.5 L5.75,4.5 C5.05964406,4.5 4.5,5.05964406 4.5,5.75 L4.5,18.25 C4.5,18.9403559 5.05964406,19.5 5.75,19.5 L18.25,19.5 C18.9403559,19.5 19.5,18.9403559 19.5,18.25 L19.5,5.75 C19.5,5.05964406 18.9403559,4.5 18.25,4.5 Z M10,14.4393398 L16.4696699,7.96966991 C16.7625631,7.6767767 17.2374369,7.6767767 17.5303301,7.96966991 C17.7965966,8.23593648 17.8208027,8.65260016 17.6029482,8.94621165 L17.5303301,9.03033009 L10.5303301,16.0303301 C10.2640635,16.2965966 9.84739984,16.3208027 9.55378835,16.1029482 L9.46966991,16.0303301 L6.46966991,13.0303301 C6.1767767,12.7374369 6.1767767,12.2625631 6.46966991,11.9696699 C6.73593648,11.7034034 7.15260016,11.6791973 7.44621165,11.8970518 L7.53033009,11.9696699 L10,14.4393398 L16.4696699,7.96966991 L10,14.4393398 Z\" }) }) }) })) : (_jsx(\"svg\", { width: `${size}px`, height: `${size}px`, viewBox: \"0 0 24 24\", version: \"1.1\", children: _jsx(\"g\", { stroke: \"none\", strokeWidth: \"1\", fill: \"none\", fillRule: \"evenodd\", children: _jsx(\"g\", { id: \"ic_fluent_checkbox_unchecked_24_regular\", fill: color, fillRule: \"nonzero\", opacity: opacity, children: _jsx(\"path\", { d: \"M5.75,3 L18.25,3 C19.7687831,3 21,4.23121694 21,5.75 L21,18.25 C21,19.7687831 19.7687831,21 18.25,21 L5.75,21 C4.23121694,21 3,19.7687831 3,18.25 L3,5.75 C3,4.23121694 4.23121694,3 5.75,3 Z M5.75,4.5 C5.05964406,4.5 4.5,5.05964406 4.5,5.75 L4.5,18.25 C4.5,18.9403559 5.05964406,19.5 5.75,19.5 L18.25,19.5 C18.9403559,19.5 19.5,18.9403559 19.5,18.25 L19.5,5.75 C19.5,5.05964406 18.9403559,4.5 18.25,4.5 L5.75,4.5 Z\" }) }) }) }));\n}\n//# sourceMappingURL=RadioGroup.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Listbox, ListboxButton, ListboxOption, ListboxOptions } from \"@headlessui/react\";\nimport { X } from \"lucide-react\";\nimport { Check, ChevronsUpDownIcon } from \"lucide-react\";\nimport clsx from \"clsx\";\nimport { useState, useEffect, useRef } from \"react\";\nimport { Button } from \"./Button\";\nimport { Center } from \"./Center\";\nfunction getFilterByFn(filterBy) {\n if (!filterBy) {\n return (o) => String(o).toLowerCase();\n }\n else if (typeof filterBy === 'string') {\n return (o) => String(o[filterBy]).toLowerCase();\n }\n else {\n return filterBy;\n }\n}\nexport function SelectBox({ clearTitle, ClearIcon = X, showFilter, filterBy, isClearable, disabled, by, options, value, onChange, className, addNew, addNewLabel, placeholder, optionLabel = (option) => String(option), label }) {\n const [filter, setFilter] = useState();\n const buttonRef = useRef(null);\n const [buttonWidth, setButtonWidth] = useState();\n useEffect(() => {\n if (buttonRef.current) {\n const resizeObserver = new ResizeObserver((entries) => {\n setButtonWidth(entries[0].contentRect.width);\n });\n resizeObserver.observe(buttonRef.current);\n return () => resizeObserver.disconnect();\n }\n }, []);\n const onClear = (e) => {\n e.preventDefault();\n e.stopPropagation();\n if (isClearable) {\n onChange(undefined);\n }\n };\n const onFilterChange = (e) => {\n setFilter(e.target.value);\n };\n let filteredOptions = options || [];\n if (showFilter === undefined) {\n showFilter = filteredOptions?.length >= 10;\n }\n if (showFilter && filter) {\n const filterLc = filter.toLowerCase();\n const filterFn = getFilterByFn(filterBy);\n filteredOptions = filteredOptions.filter(o => filterFn(o).includes(filterLc));\n }\n const onFilterKeyDown = (e) => {\n if (e.key !== \"Escape\"\n && e.key !== \"Enter\"\n && e.key !== \"ArrowDown\"\n && e.key !== \"ArrowUp\") {\n e.stopPropagation();\n }\n };\n return (_jsx(Listbox, { value: value || null, onChange: onChange, by: by, disabled: disabled, children: () => (_jsx(\"div\", { className: 'overflow-y-visible ' + className, children: _jsxs(\"div\", { className: \"relative\", children: [_jsxs(ListboxButton, { ref: buttonRef, className: \"relative w-full cursor-default rounded-md bg-white py-1.5 text-left text-gray-900 shadow-2xs ring-1 ring-inset ring-gray-300 focus:outline-hidden focus:ring-2 focus:ring-indigo-600 dark:ring-slate-600 dark:text-slate-50 dark:bg-slate-800 sm:text-sm sm:leading-6 hover:cursor-pointer\", children: [label && _jsx(\"div\", { className: 'w-full text-gray-500 text-left px-2', children: label }), _jsx(\"span\", { className: \"block truncate pl-3 pr-14\", children: value ? optionLabel(value) : placeholder }), isClearable && value != null && _jsx(\"span\", { className: \"absolute inset-y-0 right-0 mr-5 flex items-center pr-2\", onClick: onClear, children: _jsx(ClearIcon, { title: clearTitle, className: \"size-5 text-gray-400 hover:text-red-500 cursor-pointer\", \"aria-hidden\": \"true\" }) }), !disabled &&\n _jsx(\"span\", { className: \"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2\", children: _jsx(ChevronsUpDownIcon, { className: \"size-5 text-gray-400\", \"aria-hidden\": \"true\" }) })] }), _jsxs(ListboxOptions, { anchor: \"bottom\", style: { width: buttonWidth, zIndex: 100000000 }, className: \"absolute z-10 mt-1 overflow-auto rounded-md bg-white dark:ring-slate-600 dark:text-slate-50 dark:bg-slate-800 py-1 text-base shadow-lg ring-1 ring-gray-300 ring-opacity-5 focus:outline-hidden sm:text-sm\", children: [showFilter &&\n _jsx(\"div\", { className: \"p-1\", children: _jsx(\"input\", { type: \"text\", value: filter || '', onKeyDown: onFilterKeyDown, onChange: onFilterChange, className: \"w-full p-1 border border-gray-300 rounded-md dark:bg-slate-700 dark:text-slate-50\", placeholder: \"Filter...\" }) }), _jsx(\"div\", { className: \"overflow-y-auto max-h-60\", children: filteredOptions.map((option, i) => _jsx(ListOption, { option: option, optionLabel: optionLabel, className: \"hover:cursor-pointer\" }, i)) }), addNew &&\n _jsx(Center, { className: \"font-semibold py-2 border-t\", children: _jsx(Button, { variant: 'secondary', onClick: addNew, children: addNewLabel }) })] })] }) })) }));\n}\nexport function ListOption({ option, optionLabel, onClick, className }) {\n return (_jsx(ListboxOption, { className: ({ active }) => clsx(active ? 'bg-indigo-600 text-white dark:bg-indigo-800 dark:text-white' : 'text-gray-900 dark:text-slate-50', 'relative cursor-default select-none py-2 pl-3 pr-9', className), value: option, onClick: onClick, children: ({ selected, active }) => (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: clsx(selected ? 'font-semibold' : 'font-inherit', 'block truncate'), children: optionLabel(option) }), selected ? (_jsx(\"div\", { className: clsx(active ? 'text-white' : 'text-indigo-600', 'absolute inset-y-0 right-0 flex items-center pr-4'), children: _jsx(Check, { className: \"size-5\", \"aria-hidden\": \"true\" }) })) : null] })) }));\n}\n//# sourceMappingURL=SelectBox.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Check } from \"lucide-react\";\nimport clsx from \"clsx\";\nimport { useMemo, useState } from \"react\";\nconst Default_Option_Style = \"flex-1 px-2 py-2 hover:bg-accent nowrap\";\nfunction defaultOptionLayout(option, isSelected) {\n return {\n label: String(option),\n check: isSelected ? _jsx(Check, { className: 'size-4' }) : _jsx(\"div\", { className: \"size-4\" }),\n reverse: false,\n className: Default_Option_Style,\n };\n}\nexport function SelectList({ value, options, onChange, className, optionLayout, by, noCheck }) {\n const [selected, setSelected] = useState(value);\n const onSelect = (option) => {\n setSelected(option);\n onChange(option);\n };\n const optionEquals = useMemo(() => {\n if (typeof by === 'string') {\n return (o1, o2) => o1[by] === o2[by];\n }\n else if (!by) {\n return (o1, o2) => o1 === o2;\n }\n else {\n return by;\n }\n }, [by]);\n return (_jsx(\"div\", { className: clsx(\"\", className), children: options.map((option, i) => {\n const isSelected = selected ? optionEquals(selected, option) : false;\n let layout;\n if (optionLayout) {\n layout = optionLayout(option, isSelected);\n layout = Object.assign(defaultOptionLayout(option, isSelected), layout);\n }\n else {\n layout = defaultOptionLayout(option, isSelected);\n }\n return (_jsx(SelectListOption, { option: option, onSelect: onSelect, layout: layout, noCheck: noCheck }, i));\n }) }));\n}\nfunction SelectListOption({ option, onSelect, layout, noCheck }) {\n return (_jsxs(\"div\", { className: clsx('group flex items-center cursor-pointer gap-x-2 hover:bg-muted', layout.reverse && 'flex-row-reverse', layout.className), onClick: () => onSelect(option), children: [noCheck ? null : _jsx(\"div\", { className: \"\", children: layout.check }), _jsx(\"div\", { className: 'flex-1', children: layout.label })] }));\n}\n//# sourceMappingURL=SelectList.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { RadioGroup } from '@headlessui/react';\nimport clsx from 'clsx';\nexport function SelectStack({ onSelect, selected, options }) {\n return (_jsxs(RadioGroup, { value: selected, onChange: onSelect, children: [_jsx(RadioGroup.Label, { className: \"sr-only\", children: \"Server size\" }), _jsx(\"div\", { className: \"space-y-4\", children: options.map((option) => (_jsx(RadioGroup.Option, { value: option, className: ({ active }) => clsx(active ? 'border-border ring-2 ring-ring' : 'border-border', 'relative block cursor-pointer rounded-lg border bg-accent px-6 py-4 shadow-2xs focus:outline-hidden sm:flex sm:justify-between'), children: ({ active, checked }) => (_jsxs(_Fragment, { children: [_jsx(\"span\", { className: \"flex items-center\", children: _jsxs(\"span\", { className: \"flex flex-col text-sm\", children: [_jsx(RadioGroup.Label, { as: \"span\", className: \"font-medium text-text\", children: option.label }), option.description &&\n _jsx(RadioGroup.Description, { as: \"span\", className: \"text-muted-foreground\", children: option.description })] }) }), _jsx(\"span\", { className: clsx(active ? 'border' : 'border-2', checked ? 'border-accent-foreground' : 'border-transparent', 'pointer-events-none absolute -inset-px rounded-lg'), \"aria-hidden\": \"true\" })] })) }, option.id))) })] }));\n}\n//# sourceMappingURL=SelectStack.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Switch as UISwitch } from \"@headlessui/react\";\nconst sizes = {\n 'sm': ['h-5 w-8', 'size-3', 'translate-x-4'],\n 'md': ['h-6 w-11', 'size-4', 'translate-x-6'],\n 'lg': ['h-8 w-16', 'size-6', 'translate-x-9'],\n};\nexport function Switch({ value, onChange, size = 'md', children, className }) {\n const sizeClass = sizes[size];\n return (_jsxs(UISwitch, { checked: value, onChange: () => onChange(!value), className: `flex items-center ${className} hover:cursor-pointer`, children: [_jsx(\"div\", { className: `${value ? 'bg-primary' : 'bg-muted'} relative inline-flex ${sizeClass[0]} items-center rounded-full`, children: _jsx(\"span\", { className: `${value ? sizeClass[2] : 'translate-x-1'} inline-block ${sizeClass[1]} transform rounded-full bg-white transition` }) }), children && _jsx(\"span\", { className: \"px-2\", children: children })] }));\n}\n//# sourceMappingURL=Switch.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nconst defaultTableCass = `\ndivide-y divide-border\n[&>tbody]:divide-y [&>tbody]:divide-border\n[&_th]:text-left [&_th]:px-3 [&_th]:py-3.5 [&_th]:text-sm [&_th]:font-normal [&_th]:text-muted-foreground\n[&_td]:px-3 [&_td]:py-4 [&_td]:text-sm\n`;\nexport function Table({ className, children, ...others }) {\n return (_jsx(\"table\", { className: clsx(defaultTableCass, className), ...others, children: children }));\n}\nexport function RowSkeleton({ columns }) {\n return (_jsx(\"tr\", { className: \"hover:bg-muted\", children: Array(columns).fill(0).map((_, index) => _jsx(\"td\", { children: _jsx(\"div\", { className: \"animate-pulse rounded-xs h-5 bg-gray-200 dark:bg-gray-600\" }) }, index)) }));\n}\nexport function TBody({ isLoading = false, columns, rows = 3, children }) {\n return (_jsx(\"tbody\", { children: isLoading ?\n Array(rows).fill(0).map((_, index) => _jsx(RowSkeleton, { columns: columns }, index))\n : children }));\n}\n//# sourceMappingURL=index.js.map","import { createContext, useContext } from \"react\";\nexport function useTabs() {\n return useContext(TabsContext);\n}\nconst TabsContext = createContext({});\nexport { TabsContext };\n//# sourceMappingURL=TabsContext.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport clsx from 'clsx';\nimport { isValidElement, useEffect, useState } from 'react';\nimport { TabsContext, useTabs } from './TabsContext.js';\nfunction applyCurrentTab(tabs, current) {\n const name = typeof current === 'function' ? current() : current;\n let currentTab = null;\n const newTabs = [];\n for (const tab of tabs) {\n const newTab = { ...tab };\n newTab.current = false;\n newTabs.push(newTab);\n if (newTab.name === name) {\n currentTab = newTab;\n }\n }\n if (!currentTab) {\n currentTab = newTabs[0];\n }\n currentTab.current = true;\n return newTabs;\n}\nexport function Tabs({ current, onSelect, tabs, children, navigate }) {\n const [_tabs, _setTabs] = useState([]);\n useEffect(() => {\n _setTabs(applyCurrentTab(tabs, current));\n }, [current, tabs]);\n const context = {\n tabs: _tabs,\n select: (tab) => {\n if (onSelect) {\n if (onSelect(tab) === false) {\n return;\n }\n }\n if (tab.href) {\n if (navigate) {\n navigate(tab.href);\n }\n else {\n window.location.href = tab.href;\n }\n }\n else {\n _setTabs([...applyCurrentTab(_tabs, tab.name)]);\n }\n }\n };\n return (_jsx(TabsContext.Provider, { value: context, children: _jsx(\"div\", { className: \"flex flex-col h-full\", children: children }) }));\n}\nexport function TabsBar({ actions, className }) {\n const { tabs, select } = useTabs();\n const _onClick = (e, tab) => {\n e.preventDefault();\n e.stopPropagation();\n // ignore if disabled\n !tab.disabled && select(tab);\n };\n return (_jsxs(\"div\", { className: \"border-b flex items-start justify-between\", children: [_jsx(\"nav\", { className: \"flex space-x-4 px-4\", \"aria-label\": \"Tabs\", children: tabs.map((tab) => {\n const cursor = tab.disabled ? 'cursor-not-allowed' : 'cursor-pointer';\n return (_jsx(\"a\", { href: tab.href || '#' + tab.name, onClick: (e) => _onClick(e, tab), className: clsx(tab.current\n ? 'border-indigo-500 text-indigo-600 dark:border-indigo-400 dark:text-indigo-50'\n : 'border-transparent text-gray-500 dark:text-slate-300 hover:border-slate-400 hover:text-gray-700 dark:hover:border-slate-200 dark:hover:text-gray-200 ', className, 'whitespace-nowrap border-b-2 py-2 px-1 text-sm font-medium', cursor), \"aria-current\": tab.current ? 'page' : undefined, children: tab.label }, tab.name));\n }) }), _jsx(\"div\", { className: \"flex gap-x-1\", children: actions })] }));\n}\nexport function TabsPanel({}) {\n const { tabs } = useTabs();\n const content = tabs.find((t) => t.current)?.content;\n if (!content) {\n return null;\n }\n if (isValidElement(content)) {\n return _jsx(\"div\", { className: \"h-full overflow-y-auto flex-1\", children: content });\n }\n const Component = content;\n return (_jsx(\"div\", { className: \"h-full overflow-y-auto flex-1\", children: _jsx(Component, {}) }));\n}\n//# sourceMappingURL=Tabs.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport clsx from \"clsx\";\nimport React, { useState } from \"react\";\nimport { Styles } from \"./styles\";\nconst Textarea = React.forwardRef(({ unstyled, value, onChange, className, ...others }, ref) => {\n const [currentValue, setCurrentValue] = useState(value || \"\");\n const _onChange = (ev) => {\n const value = ev.target.value;\n setCurrentValue(value);\n onChange && onChange(value);\n };\n return (_jsx(\"textarea\", { ref: ref, ...others, className: clsx('w-full', unstyled ? Styles.INPUT_UNSTYLED : Styles.INPUT, className), value: currentValue, onChange: _onChange }));\n});\nexport { Textarea };\n//# sourceMappingURL=Textarea.js.map"],"names":["Property","_value","watchers","constructor","value","this","watcher","watch","push","filter","w","createCompositeStateProvider","StateClass","context","React","createContext","undefined","Context","Provider","Slot","consume","_current","content","current","withConsumer","useCompositeState","Error","name","useContext","useGetCompositeStateProperty","property","setValue","useState","useEffect","useSetCompositeStateProperty","useWatchCompositeStateProperty","useSlot","slot","useWatchSlot","useDefineSlot","SharedState","addWatcher","useWatchSharedState","state","useClickOutside","callback","skipFn","ref","useRef","handleClick","e","contains","target","window","setTimeout","document","addEventListener","removeEventListener","useCopyToClipboard","copiedText","setCopiedText","async","text","navigator","clipboard","console","warn","writeText","error","useDarkMode","cb","mediaQuery","matchMedia","_cb","matches","useDebounce","delay","debounceValue","setDebounceValue","handler","clearTimeout","startSse","url","onMessage","onCompleted","chunks","sse","EventSource","ev","data","JSON","parse","join","close","msg","useEventSource","then","useFetch","fetcher","opts","Array","isArray","deps","options","setError","isLoading","setIsLoading","setData","defaultValue","fetch","start","result","onSuccess","catch","onError","finally","end","condition","refetch","useFetchOnce","useFlag","isOn","setState","isOff","set","on","off","toggle","useIntersectionObserver","observer","IntersectionObserver","entries","isEntering","isIntersecting","leave","threshold","observe","unobserve","concat","useIsFirstRendering","isFirstRender","useSafeLayoutEffect","useLayoutEffect","SharedValue","get","useSharedValue","initialValue","getRealSize","size","Avatar","src","shape","color","className","rounded","sizeClass","_jsx","alt","title","first","second","split","children","fill","viewBox","d","SvgAvatar","cn","inputs","twMerge","clsx","badgeVariants","cva","variants","variant","default","secondary","destructive","attention","success","info","done","defaultVariants","Badge","onClick","props","dotBadgeVariants","dotVariants","DotBadge","dotClassName","_jsxs","cx","cy","r","Center","PositionResolver","left","top","width","height","alignAxis","gap","position","pos","anchorRect","elemRect","bottom","right","align","computePosition","constraints","constrainWidth","constrainHeight","rect","DOMRect","flipAxis","axis","newAlign","flipAlign","newPos","flipPos","isElementVisibleOnAxis","clientRect","resolver","computedPos","isVisibleOnXAxis","isVisibleOnYAxis","newConstraints","isElementVisible","intersectRects","rect1","rect2","x1","Math","max","y1","x2","min","y2","isScrollable","element","hasScrollY","scrollHeight","clientHeight","hasScrollX","scrollWidth","clientWidth","style","getComputedStyle","overflowY","overflowX","PopupController","root","scrollableParents","visibleClientRect","documentElement","parents","parent","parentElement","getScrollableParents","anchor","length","getBoundingClientRect","i","l","computeVisibleClientRect","registerListeners","updateHandler","update","closeOnClick","closeOnEsc","tryClose","key","blockPageScroll","body","overflow","open","tryOpen","cleanup","display","visibility","onOpen","onClose","isOpen","createPopupElement","popup","createElement","margin","padding","border","background","PopupContext","usePopupController","ctrl","DOMPopup","ctrlRef","id","zIndex","popupRef","setCtrl","_ctrl","createPortal","Popup","others","OptionAdapter","items","lcText","toLowerCase","item","valueOf","includes","renderOption","findById","find","idOf","createItem","StringOptionAdapter","String","static","StringOptionAdapterWithCreate","getDefaultComboBoxLayout","fullWidth","unstyledInput","buttonRight","buttonWidth","maxMenuHeight","menuClass","inputClass","INPUT_NO_PADDING","optionClass","Input","Menu","Toggle","ComboBox","menuAlign","menuGap","focusOnMount","onSelect","api","layout","layoutOpts","adapter","placeholder","popupId","floor","random","popupCtrl","inputRef","Object","assign","inputBoxRef","useComboboxCtrl","focus","openMenu","closeMenu","toggleMenu","setInputValue","inputText","inputValue","selectedItem","showMenu","isMenuOpen","filteredItems","_Fragment","boxRef","fillWidth","ComboInput","paddingRight","getInputProps","backgroundColor","alignItems","justifyContent","getToggleButtonProps","ComboToggle","ChevronUpIcon","ChevronDownIcon","ComboMenu","highlightedIndex","maxHeight","getMenuProps","map","index","getItemProps","ComboboxController","withState","_selectedItem","_filteredItems","_inputText","_highlightedIndex","_isMenuOpen","clone","updateState","popupPosition","_item","highlightIndex","navigateToTop","getElementById","querySelector","scrollIntoView","onMouseEnter","onMouseLeave","onChange","onKeyDown","decrModulo","TooltipProvider","TooltipPrimitive","Tooltip","Root","TooltipTrigger","Trigger","TooltipContent","forwardRef","sideOffset","side","Portal","Content","VTooltip","description","placement","asChild","delayDuration","displayName","buttonVariants","outline","ghost","link","primary","soft","unstyled","xs","sm","md","lg","xl","icon","Button","isDisabled","type","buttonElement","disabled","autoFocus","Loader2","ThemeProviderContext","theme","setTheme","ThemeProvider","defaultTheme","storageKey","localStorage","getItem","classList","remove","add","systemTheme","setItem","useTheme","ModeOption","option","ModeToggle","Computer","Sun","Moon","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","VisuallyHidden","clip","whiteSpace","wordWrap","ModalContext","useIsInModal","ModalContextProvider","VModal","noCloseButton","allowOverflow","disableCloseOnClickOutside","handleOpenChange","Dialog","onOpenChange","DialogOverlay","DialogDescription","DialogContent","DialogClose","X","VModalTitle","show","DialogTitle","VModalBody","VModalFooter","center","DialogPrimitive","DialogTrigger","DialogPortal","Close","Overlay","onOpenAutoFocus","event","preventDefault","Description","Title","noPadding","legacy","VInput","clearable","readOnly","Separator","orientation","decorative","SeparatorPrimitive","PopoverContext","Popover","hover","click","_open","setOpen","insideModal","PopoverPrimitive","modal","handleHover","PopoverTrigger","prev","PopoverAnchor","Anchor","PopoverContent","PopoverClose","Command","CommandPrimitive","CommandDialog","CommandInput","Search","CommandList","List","CommandEmpty","Empty","CommandGroup","Group","CommandSeparator","CommandItem","Item","CommandShortcut","VSelectBox","optionLabel","addNew","addNewLabel","filterBy","label","popupClass","isClearable","triggerRef","setWidth","filterValue","setFilterValue","updateWidth","contentWidth","resizeObserver","ResizeObserver","disconnect","filteredOptions","filterLc","filterFn","o","getFilterByFn","stopPropagation","ChevronsUpDown","SearchIcon","opt","_onClick","isEqual","Check","SquarePlus","strokeWidth","absoluteStrokeWidth","TabsContext","tabs","setTab","responsive","VTabs","onTabChange","currentValue","handleValueChange","newValue","useCallback","tabName","TabsPrimitive","onValueChange","VTabsBar","handleTabChange","tab","t","href","history","pushState","TabsList","TabsTrigger","VTabsPanel","TabsContent","labelVariants","Label","required","LabelPrimitive","Breadcrumbs","maxItems","separator","Breadcrumb","BreadcrumbList","Fragment","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","ChevronRight","firstItem","lastItems","slice","BreadcrumbEllipsis","role","MoreHorizontal","AnimateChangeInHeight","containerRef","setHeight","observedHeight","contentRect","Calendar","classNames","showOutsideDays","daySize","DayPicker","months","month","caption","caption_label","nav","nav_button","nav_button_previous","nav_button_next","table","head_row","head_cell","row","cell","mode","day","day_range_start","day_range_end","day_selected","day_today","day_outside","day_disabled","day_range_middle","day_hidden","components","IconLeft","ChevronLeft","IconRight","Checkbox","CheckboxPrimitive","Indicator","SelectionCombobox","filterType","filterValues","setFilterValues","commandInput","setCommandInput","commandInputRef","nonSelectedFilterValues","some","onInputCapture","currentTarget","v","checked","DateCombobox","dateRange","setDateRange","from","Date","to","format","initialFocus","defaultMonth","selected","range","numberOfMonths","TextCombobox","generateComboboxOptions","setFilters","filterGroups","f","val","textValue","group","Filters","filters","TextFilter","selectedView","setTextValue","handleClose","handleTextFilterAdd","trim","DateFilter","selectedGroup","g","SelectFilter","groupName","getFilteredOptions","existingFilterIndex","findIndex","updatedFilters","FilterBar","setSelectedView","searchParams","URL","location","urlSafeFilters","safeValue","params","URLSearchParams","toString","encodeURIComponent","stringify","delete","newUrl","pathname","replaceState","filtersParam","hydratedFilters","decodeURIComponent","log","valuesWithLabels","matchingOption","ListFilter","selectedGroupType","renderFilterOptions","handleSelect","getAvailableFilterGroups","FilterOperator","Heading","level","h1","h2","h3","h4","h5","h6","textVariants","weight","normal","medium","semibold","Text","ConfirmModal","onConfirm","onCancel","cancelButtonRef","TriangleAlert","useToast","ToastContext","PORTAL_ID","tempNode","portalEl","setPortalEl","doc","ownerDocument","appendChild","icons","CircleCheck","CircleX","warning","AlertTriangle","Info","colors","NotificationPanel","setShow","timeoutId","duration","Icon","status","Transition","appear","as","afterLeave","enter","enterFrom","enterTo","leaveFrom","leaveTo","ToastProvider","toast","DeleteModal","idToDelete","setIdToDelete","deleteApi","err","message","Divider","SidePanel","panelWidth","setPanelWidth","TransitionChild","unmount","DialogPanel","onMouseDown","isDragging","startX","pageX","startWidth","handleMouseMove","deltaX","newWidth","handleMouseUp","CloseButton","Dropdown","trigger","MenuButton","MenuItems","MenuItem","_MenuItem","active","DropdownList","Listbox","ListboxButton","ChevronDown","ListboxOptions","ListboxOption","Spinner","xmlns","stroke","Variants","SpinnerVariants","EmptyCollection","buttonLabel","vectorEffect","strokeLinecap","strokeLinejoin","Plus","FileUploadInput","onUpload","cursor","files","ar","fileListToArray","DropZone","dropZoneProps","useDropZone","htmlFor","dragOverClass","dropEffect","onDrop","__dragOver_cnt__","dataTransfer","promises","traverseFileTree","path","Promise","resolve","isFile","file","defineProperty","isDirectory","dirReader","createReader","readEntries","results","entry","all","filesArrays","flat","webkitGetAsEntry","allFiles","onDragOver","onDragEnter","el","cnt","_onDragEnter","onDragLeave","_onDragLeave","Styles","INPUT_UNSTYLED","INPUT","InputList","delimiters","setText","splice","onBlur","isEmpty","indexOf","pop","Link","underline","underlineClass","MenuList","MenuListItem","MessageBox","defaultIcon","titleColor","textColor","bgColor","ErrorBox","InfoBox","WarningBox","SuccessBox","DefaultBox","Modal","ModalCloseButton","tabIndex","ModalTitle","showDivider","ModalFooter","ModalBody","numberToString","isNaN","NumberInput","noScroll","noSpinners","onWheel","blur","num","parseFloat","RadioOptionAdapter","labelOf","RadioGroup","checkColor","cols","checkIcon","CheckIcon","DefaultCheckIcon","setSelected","selectedId","RadioOption","isSelected","isHighlighted","setIsHighlighted","isChecked","opacity","version","fillRule","SelectBox","clearTitle","ClearIcon","showFilter","by","setFilter","buttonRef","setButtonWidth","onClear","onFilterChange","onFilterKeyDown","ChevronsUpDownIcon","ListOption","defaultOptionLayout","check","reverse","SelectList","optionLayout","noCheck","optionEquals","useMemo","o1","o2","SelectListOption","SelectStack","Option","sizes","Switch","UISwitch","Table","RowSkeleton","columns","_","TBody","rows","useTabs","applyCurrentTab","currentTab","newTabs","newTab","Tabs","navigate","_tabs","_setTabs","select","TabsBar","actions","TabsPanel","isValidElement","Textarea","setCurrentValue"],"mappings":"sjDAGO,MAAMA,GACTC,OACAC,SAAW,GACX,WAAAC,CAAYC,GACRC,KAAKJ,OAASG,CACtB,CACI,SAAIA,GACA,OAAOC,KAAKJ,MACpB,CACI,SAAIG,CAAMA,GACN,GAAIA,IAAUC,KAAKJ,OAAQ,CACvBI,KAAKJ,OAASG,EACd,IAAK,MAAME,KAAWD,KAAKH,SACvBI,EAAQF,EAExB,CACA,CACI,KAAAG,CAAMD,GAEF,OADAD,KAAKH,SAASM,KAAKF,GACZ,KACHD,KAAKH,SAAWG,KAAKH,SAASO,QAAOC,GAAKA,IAAMJ,GAAQ,CAEpE,EAEO,SAASK,GAA6BC,GACzC,MAAMC,EAAUC,EAAMC,mBAAcC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